Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 65f3793fd87f1e43dc5f95b7b78914d7a5d49de3 1 parent df752e6
Gerard (Gerry) Caulfield authored stronk7 committed
4 mod/assignment/type/upload/assignment.class.php
View
@@ -1051,8 +1051,8 @@ function extend_settings_navigation($node) {
$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);
4 mod/assignment/type/uploadsingle/assignment.class.php
View
@@ -318,8 +318,8 @@ function extend_settings_navigation($node) {
$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);
Please sign in to comment.
Something went wrong with that request. Please try again.