Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/grade/querylib.php File Reference

Go to the source code of this file.

Functions

 grade_get_course_grades ($courseid, $userid_or_ids=null)
 grade_get_course_grade ($userid, $courseid_or_ids=null)
 grade_get_grade_items_for_activity ($cm, $only_main_item=false)
 grade_is_user_graded_in_activity ($cm, $userid)
 grade_get_gradable_activities ($courseid, $modulename='')

Function Documentation

grade_get_course_grade ( userid,
courseid_or_ids = null 
)

Returns the aggregated or calculated course grade for the given user(s).

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

Definition at line 127 of file querylib.php.

Here is the call graph for this function:

grade_get_course_grades ( courseid,
userid_or_ids = null 
)

Returns the aggregated or calculated course grade(s) in given course.

Parameters:
int$courseidid of course
int$userid_or_idsoptional id of the graded user or array of ids; if userid not used, returns only information about grade_item
Returns:
information about course grade item scaleid, name, grade and locked status, etc. + user grades

Definition at line 25 of file querylib.php.

Here is the call graph for this function:

grade_get_gradable_activities ( courseid,
modulename = '' 
)

Returns an array of activities (defined as $cm objects) which are gradeable from gradebook, outcomes are ignored.

Parameters:
int$courseidIf provided then restrict to one course.
string$modulenameIf defined (could be 'forum', 'assignment' etc) then only that type are returned.
Returns:
array $cm objects

Definition at line 306 of file querylib.php.

grade_get_grade_items_for_activity ( cm,
only_main_item = false 
)

Returns all grade items (including outcomes) or main item for a given activity identified by $cm object.

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

Definition at line 239 of file querylib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

grade_is_user_graded_in_activity ( cm,
userid 
)

Returns whether or not user received grades in main grade item for given activity.

Parameters:
object$cm
int$userid
Returns:
bool True if graded false if user not graded yet

Definition at line 270 of file querylib.php.

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations