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 f89a83b commit d6d8c49432e969875ae6d8f49e0e5af1dfff8f98 Gerard (Gerry) Caulfield committed Dec 13, 2011
@@ -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);
@@ -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 d6d8c49

Please sign in to comment.