
| Key: |
MDL-13673
|
| Type: |
Bug
|
| Status: |
Resolved
|
| Resolution: |
Duplicate
|
| Priority: |
Minor
|
| Assignee: |
Tim Hunt
|
| Reporter: |
Igor Plisco
|
| Votes: |
0
|
| Watchers: |
0
|
|
|
|
Issue Links:
|
Duplicate
|
|
This issue duplicates:
|
|
MDL-6353
The interface for putting page breaks into quizzes is confusing
|
|
|
|
|
|
|
|
| Participants: |
Igor Plisco and Tim Hunt
|
| Security Level: |
None
|
| Resolved date: |
26/Feb/08
|
| Affected Branches: |
MOODLE_19_STABLE
|
|
If you set "Shuffle questions" to "No", all questions are displayed on one page regardles of value of "Questions per page".
It's because in the mod/quiz/locallib.php the pagination is called only when 'shufflequestions' flag is on. I see no reason to not call the pagination for non-shuffles quizes too.
Fix:
$ diff -U2 locallib.php.old locallib.php
--- locallib.php.old 2008-02-26 16:58:24.000000000 +0300
+++ locallib.php 2008-02-26 16:57:43.000000000 +0300
@@ -65,9 +65,5 @@
$attempt->userid = $USER->id;
$attempt->preview = 0;
- if ($quiz->shufflequestions) {
- $attempt->layout = quiz_repaginate($quiz->questions, $quiz->questionsperpage, true);
- } else {
- $attempt->layout = $quiz->questions;
- }
+ $attempt->layout = quiz_repaginate($quiz->questions, $quiz->questionsperpage, $quiz->shufflequestions);
}
|
|
Description
|
If you set "Shuffle questions" to "No", all questions are displayed on one page regardles of value of "Questions per page".
It's because in the mod/quiz/locallib.php the pagination is called only when 'shufflequestions' flag is on. I see no reason to not call the pagination for non-shuffles quizes too.
Fix:
$ diff -U2 locallib.php.old locallib.php
--- locallib.php.old 2008-02-26 16:58:24.000000000 +0300
+++ locallib.php 2008-02-26 16:57:43.000000000 +0300
@@ -65,9 +65,5 @@
$attempt->userid = $USER->id;
$attempt->preview = 0;
- if ($quiz->shufflequestions) {
- $attempt->layout = quiz_repaginate($quiz->questions, $quiz->questionsperpage, true);
- } else {
- $attempt->layout = $quiz->questions;
- }
+ $attempt->layout = quiz_repaginate($quiz->questions, $quiz->questionsperpage, $quiz->shufflequestions);
}
|
Show » |
|
Please try to find exiting bug reports before adding a new one.