Skip to content
Browse files

Improve doc comments on get_context_* funcitions.

  • Loading branch information...
1 parent 08f5787 commit 19798dc28d46fb0467b47b99d15ce0a43f95bf4a tjhunt committed Jun 12, 2007
Showing with 7 additions and 4 deletions.
  1. +7 −4 lib/accesslib.php
View
11 lib/accesslib.php
@@ -1792,8 +1792,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) {
@@ -1854,8 +1856,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) {

0 comments on commit 19798dc

Please sign in to comment.
Something went wrong with that request. Please try again.