MDL-35255 mod_assign plagiarism api shift update_status call to after header has...
authorDan Marsden <dan@danmarsden.com>
Wed, 5 Sep 2012 00:44:18 +0000 (12:44 +1200)
committerDan Marsden <dan@danmarsden.com>
Wed, 5 Sep 2012 00:45:52 +0000 (12:45 +1200)
mod/assign/locallib.php

index a933ab5..e1e5104 100644 (file)
@@ -1762,6 +1762,11 @@ class assign {
         $gradingoptionsdata->filter = $filter;
         $gradingoptionsform->set_data($gradingoptionsdata);
 
         $gradingoptionsdata->filter = $filter;
         $gradingoptionsform->set_data($gradingoptionsdata);
 
+        $actionformtext = $this->output->render($gradingactions);
+        $o .= $this->output->render(new assign_header($this->get_instance(),
+                                                      $this->get_context(), false, $this->get_course_module()->id, get_string('grading', 'assign'), $actionformtext));
+        $o .= groups_print_activity_menu($this->get_course_module(), $CFG->wwwroot . '/mod/assign/view.php?id=' . $this->get_course_module()->id.'&action=grading', true);
+
         // plagiarism update status apearring in the grading book
         if (!empty($CFG->enableplagiarism)) {
             /** Include plagiarismlib.php */
         // plagiarism update status apearring in the grading book
         if (!empty($CFG->enableplagiarism)) {
             /** Include plagiarismlib.php */
@@ -1769,12 +1774,6 @@ class assign {
             $o .= plagiarism_update_status($this->get_course(), $this->get_course_module());
         }
 
             $o .= plagiarism_update_status($this->get_course(), $this->get_course_module());
         }
 
-        $actionformtext = $this->output->render($gradingactions);
-        $o .= $this->output->render(new assign_header($this->get_instance(),
-                                                      $this->get_context(), false, $this->get_course_module()->id, get_string('grading', 'assign'), $actionformtext));
-        $o .= groups_print_activity_menu($this->get_course_module(), $CFG->wwwroot . '/mod/assign/view.php?id=' . $this->get_course_module()->id.'&action=grading', true);
-
-
         // load and print the table of submissions
         if ($showquickgrading && $quickgrading) {
             $table = $this->output->render(new assign_grading_table($this, $perpage, $filter, 0, true));
         // load and print the table of submissions
         if ($showquickgrading && $quickgrading) {
             $table = $this->output->render(new assign_grading_table($this, $perpage, $filter, 0, true));