Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-33850: Assignment: Change text to "Add submission" before anythin…

…g has been submitted

AMOS BEGIN
 CPY [addsubmission,mod_assignment],[addsubmission,mod_assign]
AMOS END
  • Loading branch information...
commit caff10a0b0b9eea7785a59b6ad445802c45e3f0f 1 parent 088511d
Damyon Wiese authored danpoltawski committed
Showing with 8 additions and 2 deletions.
  1. +1 −0  mod/assign/lang/en/assign.php
  2. +7 −2 mod/assign/renderer.php
View
1  mod/assign/lang/en/assign.php
@@ -22,6 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+$string['addsubmission'] = 'Add submission';
$string['allowsubmissions'] = 'Allow the user to continue making submissions to this assignment.';
$string['allowsubmissionsshort'] = 'Allow submission changes';
$string['allowsubmissionsfromdate'] = 'Allow submissions from';
View
9 mod/assign/renderer.php
@@ -467,8 +467,13 @@ public function render_assign_submission_status(assign_submission_status $status
// links
if ($status->canedit) {
- $o .= $this->output->single_button(new moodle_url('/mod/assign/view.php',
- array('id' => $status->coursemoduleid, 'action' => 'editsubmission')), get_string('editsubmission', 'assign'), 'get');
+ if (!$status->submission) {
+ $o .= $this->output->single_button(new moodle_url('/mod/assign/view.php',
+ array('id' => $status->coursemoduleid, 'action' => 'editsubmission')), get_string('addsubmission', 'assign'), 'get');
+ } else {
+ $o .= $this->output->single_button(new moodle_url('/mod/assign/view.php',
+ array('id' => $status->coursemoduleid, 'action' => 'editsubmission')), get_string('editsubmission', 'assign'), 'get');
+ }
}
if ($status->cansubmit) {
Please sign in to comment.
Something went wrong with that request. Please try again.