]> git.mjollnir.org Git - moodle.git/commitdiff
Improve quiz editing screen layout a little bit based on a usability suggestion in...
authortjhunt <tjhunt>
Tue, 27 Feb 2007 14:01:46 +0000 (14:01 +0000)
committertjhunt <tjhunt>
Tue, 27 Feb 2007 14:01:46 +0000 (14:01 +0000)
Also, fix uppercase tag names in the tab row CSS, which did not work at DEVELOPER debug level.

Merged from MOODLE_18_STABLE.

lang/en_utf8/question.php
lang/en_utf8/quiz.php
mod/quiz/edit.php
mod/quiz/editlib.php
question/editlib.php
question/showbank.php
theme/standard/styles_layout.css

index 30c08c4faf63125f166ea577910f2527b580ef1e..b68fa1ac2bbf662aee0afcee582ae6c5ea263426 100644 (file)
@@ -5,6 +5,7 @@ $string['categorydoesnotexist'] = 'This category does not exist';
 $string['editingquestion'] = 'Editing a question';
 $string['missingimportantcode'] = 'This question type is missing important code: $a.';
 $string['notenoughdatatoeditaquestion'] = 'Neither a question id, nor a category id and question type, was specified.';
+$string['questionbank'] = 'Question bank';
 $string['questiondoesnotexist'] = 'This question does not exist';
 $string['unknownquestiontype'] = 'Unknown question type: $a.';
 
index 59b102b7532c1aae40e822c468a14f09c65a71a3..1f8429c05b6b66d84aafb1933bec9d103b15f4e3 100644 (file)
@@ -373,6 +373,7 @@ $string['questionno'] = 'Question $a';
 $string['questions'] = 'Questions';
 $string['questionsinclhidden'] = 'Questions (including hidden)';
 $string['questionsinuse'] = '(* Questions marked by an asterisk are already in use in some quizzes. These question will not be deleted from these quizzes but only from the category list.)';
+$string['questionsinthisquiz'] = 'Questions in this quiz';
 $string['questionsperpage'] = 'Questions per page';
 $string['questiontext'] = 'Question text';
 $string['questiontype'] = 'Question type $a';
index 110aa2eef34f4cd96487fcad1ea60155de34c99c..a170da293232cc818b8e4b716d708b70df56dc5b 100644 (file)
         $quiz = &$modform;
         include('tabs.php');
 
-        print_simple_box_start("center");
+        print_box_start();
 
         $a->attemptnum = count_records('quiz_attempts', 'quiz', $quiz->id, 'preview', 0);
         $a->studentnum = count_records_select('quiz_attempts', "quiz = '$quiz->id' AND preview = '0'", 'COUNT(DISTINCT userid)');
             error('Failed to set sumgrades');
         }
 
-        print_simple_box_end();
+        print_box_end();
         print_footer($course);
         exit;
     }
 
     echo '<table border="0" style="width:100%" cellpadding="2" cellspacing="0">';
     echo '<tr><td style="width:50%" valign="top">';
-    print_simple_box_start();
+    print_box_start('generalbox quizquestions');
+    print_heading(get_string('questionsinthisquiz', 'quiz'), '', 2);
 
     $sumgrades = quiz_print_question_list($modform, true, $SESSION->quiz_showbreaks, $SESSION->quiz_reordertool);
     if (!set_field('quiz', 'sumgrades', $sumgrades, 'id', $modform->instance)) {
         error('Failed to set sumgrades');
     }
 
-    print_simple_box_end();
+    print_box_end();
 
     echo '</td><td style="width:50%" valign="top">';
 
index f301f6b6392cfce8ff0a73c617ddad29415848f0..0b30797076ae10745efe8585ee82848fd8dc4dc3 100644 (file)
@@ -179,7 +179,6 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
     echo '<fieldset class="invisiblefieldset" style="display: block;">';
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
 
-    print_simple_box_start();
     echo "<table style=\"width:100%;\">\n";
     echo "<tr><th colspan=\"3\" style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$strorder</th>";
     echo "<th class=\"header\" scope=\"col\">#</th>";
@@ -317,7 +316,6 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
     echo '<input type="hidden" name="savechanges" value="save" /></div>';
     echo '<input type="hidden" name="savequizid" value="'.$quiz->id.'" />'; // ugly hack to prevent modform session "mistakes"
 
-    print_simple_box_end();
     echo '</fieldset>';
     echo "</form>\n";
 
index dd2d8417de6ff95a34dc3b0f599acd193446f9d6..63128de33970e64cf50102311814d8868e64c4f7 100644 (file)
@@ -317,7 +317,7 @@ function question_list($course, $categoryid, $quizid=0,
     echo '<form method="post" action="edit.php?courseid='.$course->id.'">';
     echo '<fieldset class="invisiblefieldset" style="display: block;">';
     echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
-    print_simple_box_start();
+
     echo '<table id="categoryquestions" style="width: 100%"><tr>';
     echo "<th style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$straction</th>";
     
@@ -391,7 +391,6 @@ function question_list($course, $categoryid, $quizid=0,
         }
     }
     echo "</table>\n";
-    print_simple_box_end();
 
     $paging = print_paging_bar($totalnumber, $page, $perpage,
             "edit.php?courseid={$course->id}&amp;perpage=$perpage&amp;", 'page',
index 57abaeea2dff7ec01130a87f193a80289b5e165c..68c4e0987c95723fc11a857c552540f0e0de9aa7 100644 (file)
     }
 
     // starts with category selection form
-    if (has_capability('moodle/question:managecategory', $context)) {
-        print_simple_box_start();
-        question_category_form($course, $SESSION->questioncat, $SESSION->questionrecurse,
-                $SESSION->questionshowhidden, $SESSION->questionshowquestiontext);
-        print_simple_box_end();
-    }
+    print_box_start('generalbox questionbank');
+    print_heading(get_string('questionbank', 'question'), '', 2);
+    question_category_form($course, $SESSION->questioncat, $SESSION->questionrecurse,
+            $SESSION->questionshowhidden, $SESSION->questionshowquestiontext);
     
     // continues with list of questions
-    print_simple_box_start();
     question_list($course, $SESSION->questioncat, isset($modform->instance) ? $modform->instance : 0,
             $SESSION->questionrecurse, $page, $perpage, $SESSION->questionshowhidden, $sortorder,
             $SESSION->questionshowquestiontext);
-    print_simple_box_end();
+
+    print_box_end();
 
 ?>
index 08d11cb149f5a071a83e5f0770491d1aaf408e1c..649659983c90ecef2702c437aa110af314a33b30 100644 (file)
@@ -1994,6 +1994,9 @@ body#message-messages {
 /***
  *** Question
  ***/
+.questionbank h2 {
+  margin-top: 0;                               
+}
 
 .que {
   width: 90%;
@@ -2142,18 +2145,18 @@ body#message-messages {
        line-height:1.8em;
 }
 
-.tabrow0 LI {
+.tabrow0 li {
     display: inline;
     margin: 0 -4px 0 0;
        padding: 0;
 }
 
-.tabrow0 A span {
+.tabrow0 a span {
        padding: 10px 14px 4px 0;
     background: transparent url(pix/tab/right.gif) no-repeat right top;
 }
 
-.tabrow0 A.here span {
+.tabrow0 a.here span {
     background: transparent url(pix/tab/right_last.gif) no-repeat right top;
 }
 
@@ -2165,7 +2168,7 @@ body#message-messages {
     background: none !important;
 }
 
-.tabrow0 A {
+.tabrow0 a {
        text-decoration: none;
        /* font-weight: bold; */
        background: transparent url(pix/tab/left.gif) no-repeat left top;
@@ -2174,31 +2177,31 @@ body#message-messages {
        padding: 10px 0 4px 14px;
 }
 
-.tabrow0 A:hover, .tabrow0 A:active, .tabrow0 A.here:link, .tabrow0 A.here:visited {
+.tabrow0 a:hover, .tabrow0 a:active, .tabrow0 a.here:link, .tabrow0 a.here:visited {
        /* background:#ddd; */
 }
 
-.tabrow0 A:hover {
+.tabrow0 a:hover {
        background-image: url(pix/tab/left_hover.gif);
 }
 
-.tabrow0 A.here:hover {
+.tabrow0 a.here:hover {
        background-image: url(pix/tab/left.gif);
 }
 
-.tabrow0 A:hover span {
+.tabrow0 a:hover span {
        background-image: url(pix/tab/right_hover.gif);
 }
 
-.tabrow0 A.here:hover span {
+.tabrow0 a.here:hover span {
        background-image: url(pix/tab/right_last.gif);
 }
 
-.tabrow0 A.here {
+.tabrow0 a.here {
     color:#444;
 }
 
-.tabrow0 A.here:link, .tabrow0 A.here:visited {
+.tabrow0 a.here:link, .tabrow0 a.here:visited {
        position:relative;
        z-index:102;
 }
@@ -2210,7 +2213,7 @@ body#message-messages {
     padding: 0;
 }
 
-.tabrow0 UL {
+.tabrow0 ul {
        position:absolute;
        left:0;
        top:1.8em;
@@ -2224,13 +2227,13 @@ body#message-messages {
     font-size: 95%;
 }
 
-.tabrow0 UL LI {
+.tabrow0 ul li {
        display:inline;
        margin-top:1px;
     background-image: none;
 }
 
-.tabrow0 UL A {
+.tabrow0 ul a {
     background-image: none;
        color:#00c;
        margin:0;
@@ -2238,18 +2241,18 @@ body#message-messages {
        border:0
 }
 
-.tabrow0 UL A span {
+.tabrow0 ul a span {
        padding: 0;
     background-image: none;
 }
 
-.tabrow0 UL .last span,
-.tabrow0 UL A:hover, .tabrow0 UL A:hover span,
-.tabrow0 UL A.here:hover, .tabrow0 UL A.here:hover span {
+.tabrow0 ul .last span,
+.tabrow0 ul a:hover, .tabrow0 ul a:hover span,
+.tabrow0 ul a.here:hover, .tabrow0 ul a.here:hover span {
     background-image: none;
 }
 
-.tabrow0 UL A:hover, .tabrow0 UL A:active, .tabrow0 UL A.here:link, .tabrow0 UL A.here:visited {
+.tabrow0 ul a:hover, .tabrow0 ul a:active, .tabrow0 ul a.here:link, .tabrow0 ul a.here:visited {
        color:#444;
 }
 
@@ -2867,6 +2870,12 @@ body#mod-forum-search .introcontent {
 {
   text-align: center;
 }
+#mod-quiz-edit .quizquestions h2 {
+  margin-top: 0;
+}
+#mod-quiz-edit #showbreaks {
+  margin-top: 0.7em;
+}
 body#question-preview .quemodname,
 body#question-preview .controls
 {