MDL-37894 Show the quiz close date even if the quiz is not open yet.

People care a lot about deadlines!
This commit is contained in:
Tim Hunt
2013-02-18 10:29:11 +00:00
parent bbcf8dab4f
commit a2eeb58422
@@ -47,6 +47,9 @@ class quizaccess_openclosedate extends quiz_access_rule_base {
if ($this->timenow < $this->quiz->timeopen) {
$result[] = get_string('quiznotavailable', 'quizaccess_openclosedate',
userdate($this->quiz->timeopen));
if ($this->quiz->timeclose) {
$result[] = get_string('quizcloseson', 'quiz', userdate($this->quiz->timeclose));
}
} else if ($this->quiz->timeclose && $this->timenow > $this->quiz->timeclose) {
$result[] = get_string('quizclosed', 'quiz', userdate($this->quiz->timeclose));