]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10284 - wrong language string used on the quiz view page to inform students of...
authortjhunt <tjhunt>
Wed, 31 Oct 2007 17:08:47 +0000 (17:08 +0000)
committertjhunt <tjhunt>
Wed, 31 Oct 2007 17:08:47 +0000 (17:08 +0000)
mod/quiz/locallib.php
mod/quiz/mod_form.php
mod/quiz/view.php

index 0ec0677999cea62f936dac7713d35ba56d16972a..a55b720b2c6b885e179959d78da75d08f0a9c9d0 100644 (file)
@@ -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 '<table>';
-    if ($quiz->timeopen) {
-        echo '<tr><td class="c0">'.get_string("quizopen", "quiz").':</td>';
-        echo '    <td class="c1">'.userdate($quiz->timeopen).'</td></tr>';
-    }
-    if ($quiz->timeclose) {
-        echo '<tr><td class="c0">'.get_string("quizclose", "quiz").':</td>';
-        echo '    <td class="c1">'.userdate($quiz->timeclose).'</td></tr>';
-    }
-    echo '</table>';
-    print_simple_box_end();
-}
-
 /**
  * Parse field names used for the replace options on question edit forms
  */
index fdccacd21831ec9045c664b49f59351b8d7c361c..4b5c0fc7151bf589760ef26be2d0d5a961252bd0 100644 (file)
@@ -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();
index e77ad5552b739c41d549d4b16ca70da05a709faf..2f4e098436063879697ae31fcd6a5a3d0a165044 100644 (file)
             if ($quiz->timelimit) {
                 echo "<p>".get_string("quiztimelimit","quiz", format_time($quiz->timelimit * 60))."</p>";
             }
-            quiz_view_dates($quiz);
+            if ($quiz->timeopen) {
+                echo '<p>', get_string('quizopens', 'quiz'), ': ', userdate($quiz->timeopen), '</p>';
+            }
+            if ($quiz->timeclose) {
+                echo '<p>', get_string('quizcloses', 'quiz'), ': ', userdate($quiz->timeclose), '</p>';
+            }
         } else if ($timenow < $quiz->timeopen) {
             echo "<p>".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen))."</p>";
         } else {