MDL-41945 mod_assign: Add empty submission check

This commit is contained in:
Cameron Ball
2016-07-06 10:07:04 +01:00
committed by Dan Poltawski
parent 9ce2448091
commit c30bfed180
+5
View File
@@ -6420,6 +6420,11 @@ class assign {
$submission = $this->get_user_submission($userid, true);
}
if ($this->new_submission_empty($data)) {
$notices[] = get_string('submissionempty', 'mod_assign');
return false;
}
// Check that no one has modified the submission since we started looking at it.
if (isset($data->lastmodified) && ($submission->timemodified > $data->lastmodified)) {
// Another user has submitted something. Notify the current user.