]> git.mjollnir.org Git - moodle.git/commitdiff
Improve doc comments on get_context_* funcitions.
authortjhunt <tjhunt>
Tue, 12 Jun 2007 11:11:42 +0000 (11:11 +0000)
committertjhunt <tjhunt>
Tue, 12 Jun 2007 11:11:42 +0000 (11:11 +0000)
lib/accesslib.php

index bf0dd69a39f3188e7a64d986fc71ab6a0f4534aa..8ba921824e1b4d2d71a39e1c65495c8441d8ab22 100755 (executable)
@@ -1791,8 +1791,10 @@ function validate_context($contextlevel, $instanceid) {
 /**
  * Get the context instance as an object. This function will create the
  * context instance if it does not exist yet.
- * @param $level
- * @param $instance
+ * @param integer $level The context level, for example CONTEXT_COURSE, or CONTEXT_MODULE.
+ * @param integer $instance The instance id. For $level = CONTEXT_COURSE, this would be $course->id,
+ *      for $level = CONTEXT_MODULE, this would be $cm->id. And so on.
+ * @return object The context object.
  */
 function get_context_instance($contextlevel=NULL, $instance=0) {
 
@@ -1853,8 +1855,9 @@ function get_context_instance($contextlevel=NULL, $instance=0) {
 
 
 /**
- * Get a context instance as an object, from a given id.
- * @param $id
+ * Get a context instance as an object, from a given context id.
+ * @param $id a context id.
+ * @return object The context object.
  */
 function get_context_instance_by_id($id) {