]> git.mjollnir.org Git - moodle.git/commitdiff
Improve PHP doc comments.
authortjhunt <tjhunt>
Wed, 12 Dec 2007 17:10:48 +0000 (17:10 +0000)
committertjhunt <tjhunt>
Wed, 12 Dec 2007 17:10:48 +0000 (17:10 +0000)
lib/datalib.php
lib/grouplib.php

index abbb1f580657eaa02feba15933cf79b610e7302d..2343a46c4bf2a9edab2edb5a6cdd5c4a848c917d 100644 (file)
@@ -1678,15 +1678,21 @@ function get_all_instances_in_courses($modulename, $courses, $userid=NULL, $incl
 }
 
 /**
- * Returns an array of all the active instances of a particular module in a given course, sorted in the order they are defined
+ * Returns an array of all the active instances of a particular module in a given course,
+ * sorted in the order they are defined.
  *
  * Returns an array of all the active instances of a particular
  * module in a given course, sorted in the order they are defined
- * in the course.   Returns false on any errors.
+ * in the course. Returns an empty array on any errors.
+ *
+ * The returned objects includle the columns cw.section, cm.visible,
+ * cm.groupmode and cm.groupingid, and are indexed by cm.id.
  *
  * @uses $CFG
- * @param string  $modulename The name of the module to get instances for
- * @param object(course)  $course This depends on an accurate $course->modinfo
+ * @param string $modulename The name of the module to get instances for
+ * @param object $course This depends on an accurate $course->modinfo
+ * @return array of module instance objects, including some extra fields from the course_modules
+ *          and course_sections tables, or an empty array if an error occurred.
  */
 function get_all_instances_in_course($modulename, $course, $userid=NULL, $includeinvisible=false) {
 
index 55ab489183b86668107db35b863d3f3c9acec9ee..6bbe49bab9c9446f37c5a8fd53d45aa2bf3063b4 100644 (file)
@@ -258,6 +258,7 @@ function groups_get_course_groupmode($course) {
 /**
  * Returns effective groupmode used in activity, course setting
  * overrides activity setting if groupmodeforce enabled.
+ * @param $cm the course module object. Only the ->course and ->groupmode need to be set.
  * @return integer group mode
  */
 function groups_get_activity_groupmode($cm) {