Permalink
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...
1 parent df752e6 commit 65f3793fd87f1e43dc5f95b7b78914d7a5d49de3 Gerard (Gerry) Caulfield committed with stronk7 Dec 13, 2011
View
4 mod/assignment/type/upload/assignment.class.php
@@ -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);
View
4 mod/assignment/type/uploadsingle/assignment.class.php
@@ -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);

0 comments on commit 65f3793

Please sign in to comment.