From: moodler Date: Thu, 17 Oct 2002 07:23:51 +0000 (+0000) Subject: Added new grading functions to work with course/grades.php X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d0ac6bc236771ec6b5dae55eeacaa39783ec5a2b;p=moodle.git Added new grading functions to work with course/grades.php --- diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index e549d6577b..f067aabfa7 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -217,6 +217,12 @@ function assignment_print_recent_activity(&$logs, $isteacher=false) { return $content; } +function assignment_grades($assignmentid) { +/// Must return an array of grades, indexed by user. The grade is called "grade". + + return get_records("assignment_submissions", "assignment", $assignmentid, "user ASC", "user,grade"); +} + ////////////////////////////////////////////////////////////////////////////////////// function assignment_file_area_name($assignment, $user) { diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index 86eebf16d7..454389939f 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -185,6 +185,11 @@ function quiz_cron () { return true; } +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"); +} + ////////////////////////////////////////////////////////////////////////////////////// /// Any other quiz functions go here. Each of them must have a name that