MDL-43749 normalise quiz database structure.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 22 Jan 2014 18:19:31 +0000 (18:19 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Sun, 2 Mar 2014 09:00:40 +0000 (10:00 +0100)
commitccba5b88056aa75659662ada364d7aa7acadff6a
treec96ce1caec53ce0efff5b31a83e8cefbe033dca8
parent9eec598ca9a8ac56974067dc616df625e18ca355
MDL-43749 normalise quiz database structure.

The sequence of questions that made up a quiz used to be stored as a
comma-separated list in quiz.questions. Now the same information is
stored in the rows in the quiz_slots table. This is not just 'better' in
a database design sense, but it allows for the future changes we will
need as we enhance the quiz in the MDL-40987 epic.

Having changed the database structure, all the rest of the code needs to
be changed to account for it, and that is done here.

Note that there are not many unit tests for the changed bit. That is
because as part of MDL-40987 we will be changing the code further, and
we will add unit tests then.
48 files changed:
backup/moodle2/restore_stepslib.php
lib/questionlib.php
mod/quiz/accessrule/delaybetweenattempts/tests/rule_test.php
mod/quiz/accessrule/ipaddress/tests/rule_test.php
mod/quiz/accessrule/numattempts/tests/rule_test.php
mod/quiz/accessrule/openclosedate/tests/rule_test.php
mod/quiz/accessrule/password/tests/rule_test.php
mod/quiz/accessrule/safebrowser/tests/rule_test.php
mod/quiz/accessrule/securewindow/tests/rule_test.php
mod/quiz/accessrule/timelimit/tests/rule_test.php
mod/quiz/attemptlib.php
mod/quiz/backup/moodle2/backup_quiz_stepslib.php
mod/quiz/backup/moodle2/restore_quiz_stepslib.php
mod/quiz/db/install.xml
mod/quiz/db/upgrade.php
mod/quiz/edit.php
mod/quiz/editlib.php
mod/quiz/lib.php
mod/quiz/locallib.php
mod/quiz/report/grading/report.php
mod/quiz/report/overview/report.php
mod/quiz/report/reportlib.php
mod/quiz/report/responses/report.php
mod/quiz/report/statistics/report.php
mod/quiz/tests/attempt_walkthrough_from_csv_test.php
mod/quiz/tests/attempt_walkthrough_test.php
mod/quiz/tests/editlib_test.php
mod/quiz/tests/generator/lib.php
mod/quiz/tests/locallib_test.php
mod/quiz/tests/quizobj_test.php
mod/quiz/upgrade.txt
mod/quiz/version.php
mod/quiz/view.php
question/engine/upgrade/upgradelib.php
question/type/calculated/questiontype.php
question/type/calculated/tests/upgradelibnewqe_test.php
question/type/calculatedmulti/tests/upgradelibnewqe_test.php
question/type/calculatedsimple/tests/upgradelibnewqe_test.php
question/type/description/tests/upgradelibnewqe_test.php
question/type/essay/tests/upgradelibnewqe_test.php
question/type/match/tests/upgradelibnewqe_test.php
question/type/multianswer/edit_multianswer_form.php
question/type/multianswer/tests/upgradelibnewqe_test.php
question/type/multichoice/tests/upgradelibnewqe_test.php
question/type/numerical/tests/upgradelibnewqe_test.php
question/type/random/tests/upgradelibnewqe_test.php
question/type/shortanswer/tests/upgradelibnewqe_test.php
question/type/truefalse/tests/upgradelibnewqe_test.php