From: tjhunt Date: Tue, 27 Feb 2007 14:01:46 +0000 (+0000) Subject: Improve quiz editing screen layout a little bit based on a usability suggestion in... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5eb266d8aa0da1f984f2bc043148ed8fe48579f6;p=moodle.git Improve quiz editing screen layout a little bit based on a usability suggestion in the forums. Also, fix uppercase tag names in the tab row CSS, which did not work at DEVELOPER debug level. Merged from MOODLE_18_STABLE. --- diff --git a/lang/en_utf8/question.php b/lang/en_utf8/question.php index 30c08c4faf..b68fa1ac2b 100644 --- a/lang/en_utf8/question.php +++ b/lang/en_utf8/question.php @@ -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.'; diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php index 59b102b753..1f8429c05b 100644 --- a/lang/en_utf8/quiz.php +++ b/lang/en_utf8/quiz.php @@ -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'; diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 110aa2eef3..a170da2932 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -307,7 +307,7 @@ $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)'); @@ -324,7 +324,7 @@ error('Failed to set sumgrades'); } - print_simple_box_end(); + print_box_end(); print_footer($course); exit; } @@ -346,14 +346,15 @@ echo ''; echo '
'; - 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 ''; diff --git a/mod/quiz/editlib.php b/mod/quiz/editlib.php index f301f6b639..0b30797076 100644 --- a/mod/quiz/editlib.php +++ b/mod/quiz/editlib.php @@ -179,7 +179,6 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r echo '
'; echo "sesskey\" />"; - print_simple_box_start(); echo "\n"; echo ""; echo ""; @@ -317,7 +316,6 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r echo ''; echo ''; // ugly hack to prevent modform session "mistakes" - print_simple_box_end(); echo ''; echo "\n"; diff --git a/question/editlib.php b/question/editlib.php index dd2d8417de..63128de339 100644 --- a/question/editlib.php +++ b/question/editlib.php @@ -317,7 +317,7 @@ function question_list($course, $categoryid, $quizid=0, echo ''; echo '
'; echo ''; - print_simple_box_start(); + echo '
$strorder#
'; echo ""; @@ -391,7 +391,6 @@ function question_list($course, $categoryid, $quizid=0, } } echo "
$straction
\n"; - print_simple_box_end(); $paging = print_paging_bar($totalnumber, $page, $perpage, "edit.php?courseid={$course->id}&perpage=$perpage&", 'page', diff --git a/question/showbank.php b/question/showbank.php index 57abaeea2d..68c4e0987c 100644 --- a/question/showbank.php +++ b/question/showbank.php @@ -174,18 +174,16 @@ } // 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(); ?> diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 08d11cb149..649659983c 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -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 {