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.
This commit is contained in:
@@ -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.';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
+5
-4
@@ -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 '<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">';
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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}&perpage=$perpage&", 'page',
|
||||
|
||||
@@ -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();
|
||||
|
||||
?>
|
||||
|
||||
@@ -2003,6 +2003,9 @@ body#message-messages {
|
||||
/***
|
||||
*** Question
|
||||
***/
|
||||
.questionbank h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.que {
|
||||
width: 90%;
|
||||
@@ -2151,18 +2154,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;
|
||||
}
|
||||
|
||||
@@ -2174,7 +2177,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;
|
||||
@@ -2183,31 +2186,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;
|
||||
}
|
||||
@@ -2219,7 +2222,7 @@ body#message-messages {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tabrow0 UL {
|
||||
.tabrow0 ul {
|
||||
position:absolute;
|
||||
left:0;
|
||||
top:1.8em;
|
||||
@@ -2233,13 +2236,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;
|
||||
@@ -2247,18 +2250,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;
|
||||
}
|
||||
|
||||
@@ -2874,6 +2877,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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user