Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ce2448
)
MDL-41945 mod_assign: Add empty submission check
author
Cameron Ball
<cameron@moodle.com>
Wed, 6 Jul 2016 08:59:18 +0000
(16:59 +0800)
committer
Dan Poltawski
<dan@moodle.com>
Wed, 6 Jul 2016 09:07:04 +0000
(10:07 +0100)
mod/assign/locallib.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/assign/locallib.php
b/mod/assign/locallib.php
index
4da2bdc
..
2aa605d
100644
(file)
--- a/
mod/assign/locallib.php
+++ b/
mod/assign/locallib.php
@@
-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.