From 4c07690efc310bebb08f8edeec9e8511c84a961c Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 22 Aug 2008 02:13:00 +0000 Subject: [PATCH] MDL-6353 Quiz questions per page setting is confusing. People expect that changing this setting will repaginate the quiz, which is not the case, so change the wording of this setting and its choices. --- lang/en_utf8/help/quiz/questionsperpage.html | 9 ++++++--- lang/en_utf8/quiz.php | 3 +++ mod/quiz/config.html | 13 +++++++------ mod/quiz/mod_form.php | 11 ++++++----- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/lang/en_utf8/help/quiz/questionsperpage.html b/lang/en_utf8/help/quiz/questionsperpage.html index 16f36ba976..406f39cc2f 100644 --- a/lang/en_utf8/help/quiz/questionsperpage.html +++ b/lang/en_utf8/help/quiz/questionsperpage.html @@ -1,4 +1,7 @@ -

Questions per page

+

Automatically start a new page

-

For longer quizzes it makes sense to stretch the quiz over several pages by limiting the number of questions per page. When adding questions to the quiz page breaks will automatically be inserted according to the setting you choose here. However you will also be able to move page breaks around by hand later on the editing page. -

+

For longer quizzes it makes sense to stretch the quiz over several pages by +limiting the number of questions per page. When adding questions to the quiz +page breaks will automatically be inserted according to the setting you choose +here. However you will also be able to move page breaks around by hand later on +the editing page.

diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php index 66f7bea64a..9f6b647e0b 100644 --- a/lang/en_utf8/quiz.php +++ b/lang/en_utf8/quiz.php @@ -32,6 +32,8 @@ $string['addrandom2'] = 'random questions'; $string['addselectedtoquiz'] = 'Add selected to quiz'; $string['addtoquiz'] = 'Add to quiz'; $string['affectedstudents'] = 'Affected $a'; +$string['aftereachquestion'] = 'After adding each question'; +$string['afternquestions'] = 'After adding $a questions'; $string['aiken'] = 'Aiken format'; $string['allattempts'] = 'All attempts'; $string['allinone'] = 'Unlimited'; @@ -368,6 +370,7 @@ $string['multipleanswers'] = 'Choose at least one answer.'; $string['multiplier'] = 'Multiplier'; $string['name'] = 'Name'; $string['newattemptfail'] = 'Error: Could not start a new attempt at the quiz'; +$string['newpageevery'] = 'Automatically start a new page'; $string['noanswers'] = 'No answers were selected!'; $string['noattempts'] = 'No attempts have been made on this quiz'; $string['noattemptstoshow'] = 'There are no attempts to show'; diff --git a/mod/quiz/config.html b/mod/quiz/config.html index e7b882ba9d..5df78765d9 100644 --- a/mod/quiz/config.html +++ b/mod/quiz/config.html @@ -139,17 +139,18 @@ - : + : questionsperpage, ''); - helpbutton('questionsperpage', get_string('questionsperpage', 'quiz'), 'quiz'); + helpbutton('questionsperpage', get_string('newpageevery', 'quiz'), 'quiz'); ?> diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index 1075c0ae22..993e9c5e99 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -77,12 +77,13 @@ class mod_quiz_mod_form extends moodleform_mod { //------------------------------------------------------------------------------- $mform->addElement('header', 'displayhdr', get_string('display', 'form')); $perpage = array(); - for ($i = 0; $i <= 50; ++$i) { - $perpage[$i] = $i; + $perpage[0] = get_string('never'); + $perpage[1] = get_string('aftereachquestion', 'quiz'); + for ($i = 2; $i <= 50; ++$i) { + $perpage[$i] = get_string('afternquestions', 'quiz', $i); } - $perpage[0] = get_string('allinone', 'quiz'); - $mform->addElement('select', 'questionsperpage', get_string('questionsperpage', 'quiz'), $perpage); - $mform->setHelpButton('questionsperpage', array('questionsperpage', get_string('questionsperpage', 'quiz'), 'quiz')); + $mform->addElement('select', 'questionsperpage', get_string('newpageevery', 'quiz'), $perpage); + $mform->setHelpButton('questionsperpage', array('questionsperpage', get_string('newpageevery', 'quiz'), 'quiz')); $mform->setAdvanced('questionsperpage', $CFG->quiz_fix_questionsperpage); $mform->setDefault('questionsperpage', $CFG->quiz_questionsperpage); -- 2.39.5