Skip to content
Browse files

Added new grading functions to work with course/grades.php

  • Loading branch information...
1 parent 3486b7b commit d0ac6bc236771ec6b5dae55eeacaa39783ec5a2b moodler committed Oct 17, 2002
Showing with 11 additions and 0 deletions.
  1. +6 −0 mod/assignment/lib.php
  2. +5 −0 mod/quiz/lib.php
View
6 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) {
View
5 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

0 comments on commit d0ac6bc

Please sign in to comment.
Something went wrong with that request. Please try again.