[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/grade/ -> querylib.php (summary)

(no description)

File Size: 324 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions

  grade_get_course_grades()
  grade_get_course_grade()
  grade_get_grade_items_for_activity()
  grade_is_user_graded_in_activity()
  grade_get_gradable_activities()

Functions
Functions that are not part of a class:

grade_get_course_grades($courseid, $userid_or_ids=null)   X-Ref
Returns the aggregated or calculated course grade(s) in given course.

param: int $courseid id of course
param: int $userid_or_ids optional id of the graded user or array of ids; if userid not used, returns only information about grade_item
return: information about course grade item scaleid, name, grade and locked status, etc. + user grades

grade_get_course_grade($userid, $courseid_or_ids=null)   X-Ref
Returns the aggregated or calculated course grade for the given user(s).

param: int $userid
param: int $courseid optional id of course or array of ids, empty means all uses courses (returns array if not present)
return: mixed grade info or grades array including item info, false if error

grade_get_grade_items_for_activity($cm, $only_main_item=false)   X-Ref
Returns all grade items (including outcomes) or main item for a given activity identified by $cm object.

param: object $cm A course module object (preferably with modname property)
return: mixed - array of grade item instances (one if $only_main_item true), false if error or not found

grade_is_user_graded_in_activity($cm, $userid)   X-Ref
Returns whether or not user received grades in main grade item for given activity.

param: object $cm
param: int $userid
return: bool True if graded false if user not graded yet

grade_get_gradable_activities($courseid, $modulename='')   X-Ref
Returns an array of activities (defined as $cm objects) which are gradeable from gradebook, outcomes are ignored.

param: int $courseid If provided then restrict to one course.
param: string $modulename If defined (could be 'forum', 'assignment' etc) then only that type are returned.
return: array $cm objects



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7