|
@@ -64,6 +64,11 @@ foreach ($feedbacks as $feedback) {
|
|
// Delete submission
|
|
// Delete submission
|
|
$DB->delete_records('gradeimporter_submission', array('id' => $submission->id));
|
|
$DB->delete_records('gradeimporter_submission', array('id' => $submission->id));
|
|
|
|
|
|
|
|
+// If there are no more submission that go to the gradebook, reset it for this gradeimporter instance
|
|
|
|
+if (!$DB->get_records('gradeimporter_submission', array('gradebook' => 1))) {
|
|
|
|
+ gradeimporter_grade_item_update($submission, 'reset');
|
|
|
|
+}
|
|
|
|
+
|
|
// Print page and redirects to submission page after 5 seconds
|
|
// Print page and redirects to submission page after 5 seconds
|
|
$PAGE->set_title($submission->name);
|
|
$PAGE->set_title($submission->name);
|
|
$PAGE->set_heading($course->fullname);
|
|
$PAGE->set_heading($course->fullname);
|
|
@@ -75,6 +80,6 @@ echo $OUTPUT->header("refresh:5;url=$viewlink");
|
|
|
|
|
|
echo "<p>".get_string('deletesubmissiondata', 'gradeimporter', $submission->name)."</p>";
|
|
echo "<p>".get_string('deletesubmissiondata', 'gradeimporter', $submission->name)."</p>";
|
|
echo "<p>".get_string('deletefeedbacksdata', 'gradeimporter', count($feedbacks))."</p>";
|
|
echo "<p>".get_string('deletefeedbacksdata', 'gradeimporter', count($feedbacks))."</p>";
|
|
-echo "<p>".get_string('redirect5s', 'gradeimporter')."<a href=\"$viewlink\">".get_string('here', 'gradeimporter')."</p>";
|
|
|
|
|
|
+echo "<p>".get_string('redirect5s', 'gradeimporter')."<a href=\"$viewlink\"> ".get_string('here', 'gradeimporter')."</p>";
|
|
|
|
|
|
echo $OUTPUT->footer();
|
|
echo $OUTPUT->footer();
|