MDL-58697: Only get group submission if enabled
[moodle.git] / 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;