diff --git a/mod/assign/lang/en/assign.php b/mod/assign/lang/en/assign.php index 465d99ce3c076..814a1aee60cb7 100644 --- a/mod/assign/lang/en/assign.php +++ b/mod/assign/lang/en/assign.php @@ -476,8 +476,10 @@ $string['recordid'] = 'Identifier'; $string['removesubmission'] = 'Remove submission'; $string['removesubmissionforstudent'] = 'Remove submission for student: (id={$a->id}, fullname={$a->fullname}).'; -$string['removesubmissionconfirm'] = 'Are you sure you want to remove the submission data?'; -$string['removesubmissionconfirmforstudent'] = 'Are you sure you want to remove the submission data for student {$a}?'; +$string['removesubmissionconfirm'] = 'Are you sure you want to remove your submission?'; +$string['removesubmissionconfirmforstudent'] = 'Are you sure you want to remove the submission for {$a}?'; +$string['removesubmissionconfirmforstudentwithtimelimit'] = 'Are you sure you want to remove the submission for {$a}? Please note that this will not reset the student\'s time limit. You can give more time by adding a time limit user override.'; +$string['removesubmissionconfirmwithtimelimit'] = 'Are you sure you want to remove your submission? Please note that this will not reset your time limit.'; $string['revealidentities'] = 'Reveal student identities'; $string['revealidentitiesconfirm'] = 'Are you sure you want to reveal student identities for this assignment? This operation cannot be undone. Once the student identities have been revealed, the marks will be released to the gradebook.'; $string['reverttodefaults'] = 'Revert to assignment defaults'; diff --git a/mod/assign/locallib.php b/mod/assign/locallib.php index 05c53f2a5f035..5c0d9a85c1856 100644 --- a/mod/assign/locallib.php +++ b/mod/assign/locallib.php @@ -4474,10 +4474,17 @@ protected function view_remove_submission_confirm() { $cancelurl = new moodle_url('/mod/assign/view.php', $urlparams); if ($userid == $USER->id) { - $confirmstr = get_string('removesubmissionconfirm', 'assign'); + if ($this->is_time_limit_enabled($userid)) { + $confirmstr = get_string('removesubmissionconfirmwithtimelimit', 'assign'); + } else { + $confirmstr = get_string('removesubmissionconfirm', 'assign'); + } } else { - $name = $this->fullname($user); - $confirmstr = get_string('removesubmissionconfirmforstudent', 'assign', $name); + if ($this->is_time_limit_enabled($userid)) { + $confirmstr = get_string('removesubmissionconfirmforstudentwithtimelimit', 'assign', $this->fullname($user)); + } else { + $confirmstr = get_string('removesubmissionconfirmforstudent', 'assign', $this->fullname($user)); + } } $o .= $this->get_renderer()->confirm($confirmstr, $confirmurl,