From: tjhunt Date: Thu, 20 Nov 2008 06:59:11 +0000 (+0000) Subject: quiz editing: MDL-17285 This is Olli Savolainen's new interface for editing quizzes. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fa583f5f6eb3b4c9f624e77df0cfb9f9e705e6c3;p=moodle.git quiz editing: MDL-17285 This is Olli Savolainen's new interface for editing quizzes. This was started and usability tested as a Finnish Summer of Code project, and then Olli did further work on it in his own time to get it in shape for inclusion in Moodle 2.0. I reviewed all the code. There are a number of minor outstanding issues that will be fixed soon. See the subtasks of MDL-17284 for a list. The goal of these changes is to: * help teachers new to Moodle, so when they first see the quiz editing page, they don't go "Huh! What on earth am I supposed to do here?" * help novice Moodle users understand and learn to use some of the more advanced quiz feature; * but, without slowing down more experienced quiz users. Naturally, with ambitous goals like that, we won't have managed to satisy everybody, but I think this change is a big step in the right direction. There is extensive documentation on this project at http://docs.moodle.org/en/Development:Quiz_UI_redesign. --- diff --git a/lang/en_utf8/help/quiz/editconcepts.html b/lang/en_utf8/help/quiz/editconcepts.html new file mode 100644 index 0000000000..e48d378738 --- /dev/null +++ b/lang/en_utf8/help/quiz/editconcepts.html @@ -0,0 +1,25 @@ +

Basic ideas of making quizzes

+

The main concepts while managing quiz content (questions) are:

+ +

You can think of a quiz, in essence, to be like a +traditional pen&paper quiz (or an exam/test). It contains questions. +You can divide the questions in a quiz on several pages +or you can keep them all on one page. +With Moodle Quiz, you can also give the grading beforehand for the +questions in a quiz (as well as the total for the entire quiz).

+

When you create questions, they are stored in the Question +Bank. In the Question Bank you can create categories, which are similar +to folders. You can use them to create a hierarchy for organizing +questions, for example, by topic. When you create a question into +an exam, a copy of it is stored in the Question Bank. If you decide to +remove your question from an exam, it will still be intact in the +question bank until you delete it from there, too.

+

You can use Random Questions, if you want a question to +vary between different attempts students make at the quiz (for example, +to avoid cheating by means of students copying questions to each other). +Just create a random question in the quiz and add questions in the +category of the random question.

diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php index de2b29fb84..41748e573c 100644 --- a/lang/en_utf8/quiz.php +++ b/lang/en_utf8/quiz.php @@ -678,5 +678,44 @@ $string['youcannotwait'] = 'This quiz closes before you will be allowed to start $string['youneedtoenrol'] = 'You need to enrol in this course before you can attempt this quiz'; $string['yourfinalgradeis'] = 'Your final grade for this quiz is $a.'; $string['zerosignificantfiguresnotallowed'] = 'The correct answer cannot have zero significant figures!'; - +$string['totalquestionsinrandomqcategory'] = 'Total of $a questions in category.'; +$string['selectquestiontype'] = ' -- Select question type -- '; +$string['adddescriptionlabel'] = 'Add description/label'; +$string['addrandomquestion'] = 'Add random question'; +$string['addrandomquestiontoquiz'] = 'Add random question to quiz $a'; +$string['parentcategory'] = 'Parent category'; +$string['selectcategory'] = 'Select category'; +$string['createcategoryfornewrandomquestion'] = 'Create a question category for the new random question'; +$string['qname'] = 'name'; +$string['qtypename'] = 'type, name'; +$string['age'] = 'age'; +$string['sortquestionsbyx'] = 'Sort questions by: $a'; +$string['addpagehere'] = 'Add page here'; +$string['questionbankmanagement'] = 'Question Bank management'; +$string['totalpoints'] = 'Total of grades'; +$string['quizwillopen'] = 'This quiz will open $a'; +$string['quizopenwillclose'] = 'This quiz is open, will close on $a at '; +$string['basicideasofquiz'] = 'Basic ideas of making quizzes'; +$string['noquestionsinquiz'] = 'There are no questions in this quiz.'; +$string['addquestion'] = 'Add question'; +$string['questiontextisempty'] = '[Empty question text]'; +$string['addrandomfromcategory'] = 'Add random questions from category'; +$string['fromcategory'] = 'from category'; +$string['questionbankcontents'] = 'Question Bank contents'; +$string['quizorderrandom'] = '* Order of quiz is shuffled'; +$string['quizordernotrandom'] = 'Order of quiz not shuffled'; +$string['repaginatecommand'] = 'Repaginate'; +$string['orderandpaging'] = 'Order and paging'; +$string['noquestionsonpage'] = 'Empty page'; +$string['orderingquiz'] = 'Order and paging'; +$string['moveselectedonpage'] = 'Move selected questions to page'; +$string['addnewpagesafterselected'] = 'Add new pages after selected questions'; +$string['reorderquestions'] = 'Reorder questions'; +$string['noquestionsnotinuse'] = 'This random question is not in use, since its category is empty.'; +$string['addnewquestionsqbank'] = 'Add questions to the category $a in the \'Question bank contents\' tool >>'; +$string['empty'] = 'Empty'; +$string['quizopened'] = 'This quiz is open.'; +$string['areyousuredeleteselected'] = 'Are you sure you want to delete the selected questions?'; +$string['questionsperpageselected'] = 'Questions per page has been set so the paging is currently fixed. As a result, the paging controls have been disabled. You can change this in '; +$string['shufflequestionsselected'] = '* Shuffle questions has been set so question order is random. As a result, the button Reorder questions has been disabled. You can change this in '; ?> diff --git a/lib/weblib.php b/lib/weblib.php index 050e79c0ca..d0f99e07b1 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -717,7 +717,7 @@ function close_window($delay=0) { * @param mixed $listbox if false, display as a dropdown menu. If true, display as a list box. * By default, the list box will have a number of rows equal to min(10, count($options)), but if * $listbox is an integer, that number is used for size instead. - * @param + * @param */ function choose_from_menu ($options, $name, $selected='', $nothing='choose', $script='', $nothingvalue='0', $return=false, $disabled=false, $tabindex=0, @@ -990,26 +990,30 @@ function print_textfield ($name, $value, $alt = '',$size=50,$maxlength=0, $retur /** - * Implements a complete little popup form + * Implements a complete little form with a dropdown menu. When JavaScript is on + * selecting an option from the dropdown automatically submits the form (while + * avoiding the usual acessibility problems with this appoach). With JavaScript + * off, a 'Go' button is printed. * - * @uses $CFG - * @param string $common The URL up to the point of the variable that changes - * @param array $options Alist of value-label pairs for the popup list - * @param string $formid Id must be unique on the page (originaly $formname) - * @param string $selected The option that is already selected + * @param string $baseurl The target URL up to the point of the variable that changes + * @param array $options A list of value-label pairs for the popup list + * @param string $formid id for the control. Must be unique on the page. Used in the HTML. + * @param string $selected The option that is initially selected * @param string $nothing The label for the "no choice" option * @param string $help The name of a help page if help is required * @param string $helptext The name of the label for the help button - * @param boolean $return Indicates whether the function should return the text + * @param boolean $return Indicates whether the function should return the HTML * as a string or echo it directly to the page being rendered * @param string $targetwindow The name of the target page to open the linked page in. * @param string $selectlabel Text to place in a [label] element - preferred for accessibility. - * @param array $optionsextra TODO, an array? + * @param array $optionsextra an array with the same keys as $options. The values are added within the corresponding