mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Now includes maximum grades
This commit is contained in:
parent
d0ac6bc236
commit
858deff0b4
3 changed files with 22 additions and 8 deletions
|
@ -186,8 +186,11 @@ function quiz_cron () {
|
|||
}
|
||||
|
||||
function quiz_grades($quizid) {
|
||||
/// Must return an array of grades, indexed by user. The grade is called "grade".
|
||||
return get_records("quiz_grades", "quiz", $quizid, "user ASC", "user,grade");
|
||||
/// Must return an array of grades, indexed by user, and a max grade.
|
||||
|
||||
$return->grades = get_records_sql_menu("SELECT user,grade FROM quiz_grades WHERE quiz = '$quizid'");
|
||||
$return->maxgrade = get_field("quiz", "grade", "id", "$quizid");
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue