diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php
index 0ec0677999c..a55b720b2c6 100644
--- a/mod/quiz/locallib.php
+++ b/mod/quiz/locallib.php
@@ -571,30 +571,6 @@ function quiz_get_grading_option_name($option) {
/// Other quiz functions ////////////////////////////////////////////////////
-/**
- * Print a box with quiz start and due dates
- *
- * @param object $quiz
- */
-function quiz_view_dates($quiz) {
- if (!$quiz->timeopen && !$quiz->timeclose) {
- return;
- }
-
- print_simple_box_start('center', '', '', '', 'generalbox', 'dates');
- echo '
';
- if ($quiz->timeopen) {
- echo '| '.get_string("quizopen", "quiz").': | ';
- echo ' '.userdate($quiz->timeopen).' |
';
- }
- if ($quiz->timeclose) {
- echo '| '.get_string("quizclose", "quiz").': | ';
- echo ' '.userdate($quiz->timeclose).' |
';
- }
- echo '
';
- print_simple_box_end();
-}
-
/**
* Parse field names used for the replace options on question edit forms
*/
diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php
index fdccacd2183..4b5c0fc7151 100644
--- a/mod/quiz/mod_form.php
+++ b/mod/quiz/mod_form.php
@@ -24,11 +24,11 @@ class mod_quiz_mod_form extends moodleform_mod {
//-------------------------------------------------------------------------------
$mform->addElement('header', 'timinghdr', get_string('timing', 'form'));
- $mform->addElement('date_time_selector', 'timeopen', get_string("quizopen", "quiz"), array('optional'=>true));
- $mform->setHelpButton('timeopen', array('timeopen', get_string('quizopens', 'quiz'), 'quiz'));
+ $mform->addElement('date_time_selector', 'timeopen', get_string('quizopen', 'quiz'), array('optional'=>true));
+ $mform->setHelpButton('timeopen', array('timeopen', get_string('quizopen', 'quiz'), 'quiz'));
- $mform->addElement('date_time_selector', 'timeclose', get_string("quizcloses", "quiz"), array('optional'=>true));
- $mform->setHelpButton('timeclose', array('timeopen', get_string('quizcloses', 'quiz'), 'quiz'));
+ $mform->addElement('date_time_selector', 'timeclose', get_string('quizclose', 'quiz'), array('optional'=>true));
+ $mform->setHelpButton('timeclose', array('timeopen', get_string('quizclose', 'quiz'), 'quiz'));
$timelimitgrp=array();
diff --git a/mod/quiz/view.php b/mod/quiz/view.php
index e77ad5552b7..2f4e0984360 100644
--- a/mod/quiz/view.php
+++ b/mod/quiz/view.php
@@ -112,7 +112,12 @@
if ($quiz->timelimit) {
echo "".get_string("quiztimelimit","quiz", format_time($quiz->timelimit * 60))."
";
}
- quiz_view_dates($quiz);
+ if ($quiz->timeopen) {
+ echo '', get_string('quizopens', 'quiz'), ': ', userdate($quiz->timeopen), '
';
+ }
+ if ($quiz->timeclose) {
+ echo '', get_string('quizcloses', 'quiz'), ': ', userdate($quiz->timeclose), '
';
+ }
} else if ($timenow < $quiz->timeopen) {
echo "".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen))."
";
} else {