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 6662dee commit efa9f19281968ae430875085b848695eb1b73fd0 Gerard (Gerry) Caulfield committed with stronk7 Dec 13, 2011
@@ -1068,8 +1068,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 efa9f19

Please sign in to comment.