I have not converted the rest of the quiz, and I don't intend to. I am hoping Moodle.com will do it.
I hope this does not introduce any bugs, but view.php is so complicate (at least it is less complicated than it was) and the quiz has so many options, that it is hard to be sure. This needs lots of testing before 1.7 is released.
While implementing this, I removed the ~100 lines of very similar code from the top of each question type's editquestion.html template, and moved this to a the function print_question_form_start() in the base class, which uses the template question/type/editquestionstart.html. This is described in more detail here: http://moodle.org/mod/forum/discuss.php?d=51590, and is why this patch makes the codebase 523 lines smaller.
mod/quiz/index changes to only display quiz grades when teacher allows
Changes to index.php to only allow student to view overall quiz scores when
teacher has not set options forbidding this, and it can't give away what
scores were for attempts where results should still be hidden.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
Changes to index.php to only allow student to view overall quiz scores when
teacher has not set options forbidding this, and it can't give away what
scores were for attempts where results should still be hidden.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
Previously get_question_options used options for
after-attempt-while-quiz-open, when called while a attempt was still in
progress. Changed it to use options for immediately-after-attempt instead.
Credit: Peter Bulmer peterbulmer@catalyst.net.nz
1) in all module-indpendent code the variable $quiz has been renamed to $cmoptions (it holds the options set by the course module which does not necessarily have to be a quiz, it could be a lesson for example).
2) quiz_restore_question_sessions() has the simpler name quiz_get_states
Also got rid of the quizfile.php in favour of file.php
Moved all code that is not specific to the quiz module out of locallib.php into questionlib.php.
The default questiontype class is now defined in quiz/questiontypes/questiontype.php.
See http://mantis.york.ac.uk/moodle/mod/forum/discuss.php?d=852
I was using the $excluded parameter to avoid
loops between categories. A->B->A. Think we can
assume such loops won't exist, so I've deleted
the $excluded use.
Merged from MOODLE_15_STABLE
returns an ordered array of categories following
the parent-child relationships. It doesn't forget
any category and returns all the categories passed
although their parent were incorrect. Try to build
as much tree structure as possible.
Merged from MOODLE_15_STABLE
quizzes that are using questions from one category.
It relies in the quizzes_question_used() function. Will
be use in the 'orphan_categories' bug (#2459)
(http://moodle.org/bugs/bug.php?op=show&bugid=2459)
Merged from MOODLE_15_STABLE
With some previously unmerged changes added too!! Please check them
Gustav!!