Merge branch 'MDL-38973-master' of https://github.com/damyon/moodle
[moodle.git] / mod / assign / locallib.php
index 646c6ce..5ba28a6 100644 (file)
@@ -3407,22 +3407,22 @@ class assign {
                                                       $this->get_return_params());
 
                 $o .= $this->get_renderer()->render($feedbackstatus);
+            }
 
-                $allsubmissions = $this->get_all_submissions($user->id);
+            $allsubmissions = $this->get_all_submissions($user->id);
 
-                if (count($allsubmissions) > 1) {
-                    $allgrades = $this->get_all_grades($user->id);
-                    $history = new assign_attempt_history($allsubmissions,
-                                                          $allgrades,
-                                                          $this->get_submission_plugins(),
-                                                          $this->get_feedback_plugins(),
-                                                          $this->get_course_module()->id,
-                                                          $this->get_return_action(),
-                                                          $this->get_return_params(),
-                                                          false);
+            if (count($allsubmissions) > 1) {
+                $allgrades = $this->get_all_grades($user->id);
+                $history = new assign_attempt_history($allsubmissions,
+                                                      $allgrades,
+                                                      $this->get_submission_plugins(),
+                                                      $this->get_feedback_plugins(),
+                                                      $this->get_course_module()->id,
+                                                      $this->get_return_action(),
+                                                      $this->get_return_params(),
+                                                      false);
 
-                    $o .= $this->get_renderer()->render($history);
-                }
+                $o .= $this->get_renderer()->render($history);
             }
 
         }