MDL-58697: Only get group submission if enabled
authorAnn Adamcik <adamann2@isu.edu>
Fri, 1 Dec 2017 19:56:15 +0000 (12:56 -0700)
committerAnn Adamcik <adamann2@isu.edu>
Fri, 1 Dec 2017 19:56:15 +0000 (12:56 -0700)
mod/assign/gradingtable.php

index 0277e6d..ad5ba63 100644 (file)
@@ -1042,7 +1042,10 @@ class assign_grading_table extends table_sql implements renderable {
 
         $group = false;
         $submission = false;
-        $this->get_group_and_submission($row->id, $group, $submission, -1);
+
+        if ($instance->teamsubmission) {
+            $this->get_group_and_submission($row->id, $group, $submission, -1);
+        }
 
         if ($instance->teamsubmission && !$group && !$instance->preventsubmissionnotingroup) {
             $group = true;