Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-28051 Question numbers on the question edit page shoud be the sam…

…e as during the quiz attempt.
  • Loading branch information...
commit 235a394e04e21a1ee4c47684f47dd9c59ca1dea7 1 parent f664cb7
Wale Olujide authored timhunt committed
Showing with 11 additions and 13 deletions.
  1. +10 −13 mod/quiz/editlib.php
  2. +1 −0  mod/quiz/styles.css
View
23 mod/quiz/editlib.php
@@ -534,23 +534,20 @@ function quiz_print_question_list($quiz, $pageurl, $allowdelete, $reordertool,
$reordercheckboxlabel = '<label for="s' . $question->id . '">';
$reordercheckboxlabelclose = '</label>';
}
- if (!$quiz->shufflequestions) {
- // Print and increment question number
- $questioncountstring = '';
- if ($questioncount>999 || ($reordertool && $questioncount>99)) {
- $questioncountstring =
- "$reordercheckboxlabel<small>$questioncount</small>" .
- $reordercheckboxlabelclose . $reordercheckbox;
+ if ($question->length == 0) {
+ $qnodisplay = get_string('infoshort', 'quiz');
+ } else if ($quiz->shufflequestions) {
+ $qnodisplay = '?';
+ } else {
+ if ($qno > 999 || ($reordertool && $qno > 99)) {
+ $qnodisplay = html_writer::tag('small', $qno);
} else {
- $questioncountstring = $reordercheckboxlabel . $questioncount .
- $reordercheckboxlabelclose . $reordercheckbox;
+ $qnodisplay = $qno;
}
- echo $questioncountstring;
$qno += $question->length;
- } else {
- echo "$reordercheckboxlabel ? $reordercheckboxlabelclose" .
- " $reordercheckbox";
}
+ echo $reordercheckboxlabel . $qnodisplay . $reordercheckboxlabelclose .
+ $reordercheckbox;
?>
</div>
View
1  mod/quiz/styles.css
@@ -374,6 +374,7 @@ bank window's title is prominent enough*/
.ie6#page-mod-quiz-edit div.question div.content .questionname {width:20%;}
.ie6#page-mod-quiz-edit .editq div.question div.content .randomquestioncategory a{width:40%;}
.ie6#page-mod-quiz-edit .reorder .questioncontentcontainer .randomquestioncategory label{width: 35%;}
+.qnum label {padding-right: 0.25em;}
/** settings.php */
#adminquizreviewoptions {margin-bottom: 0.5em;}
Please sign in to comment.
Something went wrong with that request. Please try again.