]> git.mjollnir.org Git - moodle.git/commitdiff
Added new grading functions to work with course/grades.php
authormoodler <moodler>
Thu, 17 Oct 2002 07:23:51 +0000 (07:23 +0000)
committermoodler <moodler>
Thu, 17 Oct 2002 07:23:51 +0000 (07:23 +0000)
mod/assignment/lib.php
mod/quiz/lib.php

index e549d6577bca6eeb74b534a76df8fbe9ac783849..f067aabfa757d7cbc1e766f5f8c19d053121e386 100644 (file)
@@ -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) {
index 86eebf16d7f848025cbd1e0be2003db9056fa8c7..454389939f6d0480eaaa9a0d99ff65f63fb680eb 100644 (file)
@@ -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