MDL-35127 Assignment - declare the variables in the outer scope (for readability)
authorDamyon Wiese <damyon@moodle.com>
Wed, 27 Feb 2013 01:27:04 +0000 (09:27 +0800)
committerDamyon Wiese <damyon@moodle.com>
Wed, 27 Feb 2013 01:27:55 +0000 (09:27 +0800)
mod/assign/lib.php

index ee7de46..aad2a58 100644 (file)
@@ -337,6 +337,9 @@ function assign_print_overview($courses, &$htmlarray) {
     // We do all possible database work here *outside* of the loop to ensure this scales.
     list($sqlassignmentids, $assignmentidparams) = $DB->get_in_or_equal($assignmentids);
 
+    $mysubmissions = null;
+    $unmarkedsubmissions = null;
+
     foreach ($assignments as $assignment) {
         // Do not show assignments that are not open.
         if (!in_array($assignment->id, $assignmentids)) {