MDL-29400 Update the upload and uploadsingle assignment classes to so
that they only display the assignment submitted status when it has actually been submitted.
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
df752e6a1d
commit
65f3793fd8
@@ -1051,8 +1051,8 @@ class assignment_upload extends assignment_base {
|
||||
$editable = false;
|
||||
}
|
||||
|
||||
// If the user has submitted something add a bit more stuff
|
||||
if ($submission) {
|
||||
// If the user has submitted something add some related links and data
|
||||
if ($submission->data2 == 'submitted') {
|
||||
// Add a view link to the settings nav
|
||||
$link = new moodle_url('/mod/assignment/view.php', array('id'=>$this->cm->id));
|
||||
$node->add(get_string('viewmysubmission', 'assignment'), $link, navigation_node::TYPE_SETTING);
|
||||
|
||||
@@ -318,8 +318,8 @@ class assignment_uploadsingle extends assignment_base {
|
||||
$editable = false;
|
||||
}
|
||||
|
||||
// If the user has submitted something add a bit more stuff
|
||||
if ($submission) {
|
||||
// If the user has submitted something add some related links and data
|
||||
if ($submission->numfiles) {
|
||||
// Add a view link to the settings nav
|
||||
$link = new moodle_url('/mod/assignment/view.php', array('id'=>$this->cm->id));
|
||||
$node->add(get_string('viewmysubmission', 'assignment'), $link, navigation_node::TYPE_SETTING);
|
||||
|
||||
Reference in New Issue
Block a user