Permalink
Browse files

MDL-30986 external API, check and update DocBlock

Conflicts:

	group/externallib.php
  • Loading branch information...
1 parent aa753ac commit 4615817d1c31673ba9b3c702f7da63619e0e8ce2 @mouneyrac mouneyrac committed Jan 18, 2012
Showing with 794 additions and 239 deletions.
  1. +71 −16 course/externallib.php
  2. +107 −36 enrol/externallib.php
  3. +43 −12 enrol/manual/externallib.php
  4. +80 −32 files/externallib.php
  5. +167 −56 group/externallib.php
  6. +96 −22 lib/externallib.php
  7. +39 −16 message/externallib.php
  8. +43 −11 notes/externallib.php
  9. +148 −38 user/externallib.php
View
@@ -1,5 +1,4 @@
<?php
-
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
@@ -15,12 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
/**
* External course API
*
- * @package core
- * @subpackage course
- * @copyright 2010 Moodle Pty Ltd (http://moodle.com)
+ * @package core_course
+ * @category external
+ * @copyright 2009 Petr Skodak
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -29,13 +29,21 @@
require_once("$CFG->libdir/externallib.php");
/**
- * Course functions
+ * Course external functions
+ *
+ * @package core_course
+ * @category external
+ * @copyright 2011 Jerome Mouneyrac
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.2
*/
class core_course_external extends external_api {
/**
* Returns description of method parameters
+ *
* @return external_function_parameters
+ * @since Moodle 2.2
*/
public static function get_course_contents_parameters() {
return new external_function_parameters(
@@ -52,9 +60,11 @@ public static function get_course_contents_parameters() {
/**
* Get course contents
- * @param int $courseid
- * @param array $options, not used yet, might be used in later version
+ *
+ * @param int $courseid course id
+ * @param array $options These options are not used yet, might be used in later version
* @return array
+ * @since Moodle 2.2
*/
public static function get_course_contents($courseid, $options) {
global $CFG, $DB;
@@ -183,7 +193,9 @@ public static function get_course_contents($courseid, $options) {
/**
* Returns description of method result value
+ *
* @return external_description
+ * @since Moodle 2.2
*/
public static function get_course_contents_returns() {
return new external_multiple_structure(
@@ -238,7 +250,9 @@ public static function get_course_contents_returns() {
/**
* Returns description of method parameters
+ *
* @return external_function_parameters
+ * @since Moodle 2.2
*/
public static function get_courses_parameters() {
return new external_function_parameters(
@@ -255,8 +269,10 @@ public static function get_courses_parameters() {
/**
* Get courses
- * @param array $options
+ *
+ * @param array $options It contains an array (list of ids)
* @return array
+ * @since Moodle 2.2
*/
public static function get_courses($options) {
global $CFG, $DB;
@@ -336,7 +352,9 @@ public static function get_courses($options) {
/**
* Returns description of method result value
+ *
* @return external_description
+ * @since Moodle 2.2
*/
public static function get_courses_returns() {
return new external_multiple_structure(
@@ -402,7 +420,9 @@ public static function get_courses_returns() {
/**
* Returns description of method parameters
+ *
* @return external_function_parameters
+ * @since Moodle 2.2
*/
public static function create_courses_parameters() {
$courseconfig = get_config('moodlecourse'); //needed for many default values
@@ -471,8 +491,10 @@ public static function create_courses_parameters() {
/**
* Create courses
+ *
* @param array $courses
* @return array courses (id and shortname only)
+ * @since Moodle 2.2
*/
public static function create_courses($courses) {
global $CFG, $DB;
@@ -556,7 +578,9 @@ public static function create_courses($courses) {
/**
* Returns description of method result value
+ *
* @return external_description
+ * @since Moodle 2.2
*/
public static function create_courses_returns() {
return new external_multiple_structure(
@@ -572,62 +596,93 @@ public static function create_courses_returns() {
}
/**
- * Deprecated course functions
- * @deprecated since Moodle 2.2 please use core_course_external instead
+ * Deprecated course external functions
+ *
+ * @package core_course
+ * @copyright 2009 Petr Skodak
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since Moodle 2.0
+ * @deprecated Moodle 2.2 MDL-29106 - Please do not use this class any more.
+ * @todo MDL-31194 This will be deleted in Moodle 2.5.
+ * @see core_course_external
*/
class moodle_course_external extends external_api {
/**
* Returns description of method parameters
- * @deprecated since Moodle 2.2 please use core_course_external::get_courses_parameters instead
+ *
* @return external_function_parameters
+ * @since Moodle 2.0
+ * @deprecated Moodle 2.2 MDL-29106 - Please do not call this function any more.
+ * @todo MDL-31194 This will be deleted in Moodle 2.5.
+ * @see core_course_external::get_courses_parameters()
*/
public static function get_courses_parameters() {
return core_course_external::get_courses_parameters();
}
/**
* Get courses
+ *
* @param array $options
- * @deprecated since Moodle 2.2 please use core_course_external::get_courses instead
* @return array
+ * @since Moodle 2.0
+ * @deprecated Moodle 2.2 MDL-29106 - Please do not call this function any more.
+ * @todo MDL-31194 This will be deleted in Moodle 2.5.
+ * @see core_course_external::get_courses()
*/
public static function get_courses($options) {
return core_course_external::get_courses($options);
}
/**
* Returns description of method result value
- * @deprecated since Moodle 2.2 please use core_course_external::get_courses_returns instead
+ *
* @return external_description
+ * @since Moodle 2.0
+ * @deprecated Moodle 2.2 MDL-29106 - Please do not call this function any more.
+ * @todo MDL-31194 This will be deleted in Moodle 2.5.
+ * @see core_course_external::get_courses_returns()
*/
public static function get_courses_returns() {
return core_course_external::get_courses_returns();
}
/**
* Returns description of method parameters
- * @deprecated since Moodle 2.2 please use core_course_external::create_courses_parameters instead
+ *
* @return external_function_parameters
+ * @since Moodle 2.0
+ * @deprecated Moodle 2.2 MDL-29106 - Please do not call this function any more.
+ * @todo MDL-31194 This will be deleted in Moodle 2.5.
+ * @see core_course_external::create_courses_parameters()
*/
public static function create_courses_parameters() {
return core_course_external::create_courses_parameters();
}
/**
* Create courses
- * @deprecated since Moodle 2.2 please use core_course_external::create_courses instead
+ *
* @param array $courses
* @return array courses (id and shortname only)
+ * @since Moodle 2.0
+ * @deprecated Moodle 2.2 MDL-29106 - Please do not call this function any more.
+ * @todo MDL-31194 This will be deleted in Moodle 2.5.
+ * @see core_course_external::create_courses()
*/
public static function create_courses($courses) {
return core_course_external::create_courses($courses);
}
/**
* Returns description of method result value
- * @deprecated since Moodle 2.2 please use core_course_external::create_courses_returns instead
+ *
* @return external_description
+ * @since Moodle 2.0
+ * @deprecated Moodle 2.2 MDL-29106 - Please do not call this function any more.
+ * @todo MDL-31194 This will be deleted in Moodle 2.5.
+ * @see core_course_external::create_courses_returns()
*/
public static function create_courses_returns() {
return core_course_external::create_courses_returns();
Oops, something went wrong.

0 comments on commit 4615817

Please sign in to comment.