MDL-74064 mod_assign: Notify submission removal does not reset timelimit

This commit is contained in:
Shamim Rezaie
2022-04-14 10:48:45 +07:00
committed by Huong Nguyen
parent 6ac1477e98
commit 7252fef24b
2 changed files with 14 additions and 5 deletions
+4 -2
View File
@@ -476,8 +476,10 @@ $string['requireallteammemberssubmit_help'] = 'If enabled, all members of the st
$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';
+10 -3
View File
@@ -4474,10 +4474,17 @@ class assign {
$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,