From 59d14f31bd10c0001d945e1a86d99433b12c802c Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 30 Apr 2012 13:46:02 +0100 Subject: [PATCH] Improve the wording of overdue messages. Thanks Phil. --- mod/quiz/lang/en/quiz.php | 9 +++++---- mod/quiz/locallib.php | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php index 340e678612a..0a0a7ac67fd 100644 --- a/mod/quiz/lang/en/quiz.php +++ b/mod/quiz/lang/en/quiz.php @@ -275,12 +275,13 @@ $string['emailnotifysubject'] = '{$a->studentname} has completed {$a->quizname}' $string['emailoverduebody'] = 'Dear {$a->studentname}, You started an attempt at \'{$a->quizname}\' -in course \'{$a->coursename}\', but you never submitted it. +in course \'{$a->coursename}\', but you never submitted it. It should have been +submitted by {$a->attemptduedate}. -If you would would still like to submit this attempt, please go to +If you would still like to submit this attempt, please go to {$a->attemptsummaryurl} and click the submit button. You must do this before {$a->attemptgraceend} -otherwise you attempt will not be counted.'; +otherwise your attempt will not be counted.'; $string['emailoverduesmall'] = 'You did not submit your attempt at {$a->quizname}. Please go to {$a->attemptsummaryurl} before {$a->attemptgraceend} if you would still like to submit.'; $string['emailoverduesubject'] = 'Attempt now overdue: {$a->quizname}'; $string['empty'] = 'Empty'; @@ -508,7 +509,7 @@ $string['overduehandling_desc'] = 'What should happen by default if a student do $string['overduehandlingautosubmit'] = 'the attempt is submitted automatically'; $string['overduehandlinggraceperiod'] = 'there is a grace period in which to submit the attempt, but not answer more questions'; $string['overduehandlingautoabandon'] = 'that is it. The attempt must be submitted before time expires, or it is not counted'; -$string['overduemustbesubmittedby'] = 'This attempt is now overdue. It should already have been submitted. If you would like this quiz to be graded, you must submit it by {$a}. If you not submit it by then, no marks from this attempt will be counted.'; +$string['overduemustbesubmittedby'] = 'This attempt is now overdue. It should already have been submitted. If you would like this quiz to be graded, you must submit it by {$a}. If you do not submit it by then, no marks from this attempt will be counted.'; $string['override'] = 'Override'; $string['overridedeletegroupsure'] = 'Are you sure you want to delete the override for group {$a}?'; $string['overridedeleteusersure'] = 'Are you sure you want to delete the override for user {$a}?'; diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index 92d62c8a417..29457b03548 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -1347,7 +1347,8 @@ function quiz_send_overdue_message($course, $quiz, $attempt, $context, $cm) { if ($quiz->timeclose) { $deadlines[] = $quiz->timeclose; } - $duedate = min($deadlines) + $quiz->graceperiod; + $duedate = min($deadlines); + $graceend = $duedate + $quiz->graceperiod; $a = new stdClass(); // Course info. @@ -1358,7 +1359,8 @@ function quiz_send_overdue_message($course, $quiz, $attempt, $context, $cm) { $a->quizurl = $CFG->wwwroot . '/mod/quiz/view.php?id=' . $cm->id; $a->quizlink = '' . $quizname . ''; // Attempt info. - $a->attemptgraceend = format_time($duedate); + $a->attemptduedate = userdate($duedate); + $a->attemptgraceend = userdate($graceend); $a->attemptsummaryurl = $CFG->wwwroot . '/mod/quiz/summary.php?attempt=' . $attempt->id; $a->attemptsummarylink = '' . $quizname . ' review'; // Student's info.