From ad041fad59b49085cd03b40b5da112433ca11d8c Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 11 Feb 2009 08:12:19 +0000 Subject: [PATCH] quiz editing: MDL-17296 final attempt to get the display of the open/closed state here to Olli's satisfaction ;-) --- mod/quiz/editlib.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index f5f936f38f..01e037b13b 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -1204,7 +1204,7 @@ function quiz_print_status_bar($quiz){ timeopen > 0) { @@ -1212,28 +1212,23 @@ function quiz_print_status_bar($quiz){ $dates[] = get_string('quizopenedon', 'quiz', userdate($quiz->timeopen)); } else { $dates[] = get_string('quizwillopen', 'quiz', userdate($quiz->timeopen)); - $available = false; + print_string('quizisclosed', 'quiz'); } } if ($quiz->timeclose > 0) { if ($timenow > $quiz->timeclose) { $dates[] = get_string('quizclosed', 'quiz', userdate($quiz->timeclose)); - $available = false; + print_string('quizisclosed', 'quiz'); } else { $dates[] = get_string('quizcloseson', 'quiz', userdate($quiz->timeclose)); + $currentstatus = get_string('quizisopenwillclose', 'quiz', userdate($quiz->timeclose, get_string('strftimedatetimeshort', 'langconfig'))); } } if (empty($dates)) { $dates[] = get_string('alwaysavailable', 'quiz'); } - $dates = implode('. ', $dates); - echo ' | '; - if ($available) { - print_string('quizisopen', 'quiz'); - } else { - print_string('quizisclosed', 'quiz'); - } - echo ''; + $dates = implode(', ', $dates); + echo ' | ' . $currentstatus . ''; // If questions are shuffled, notify the user about the // question order not making much sense -- 2.39.5