MDL-54864 core_question: Enforce context,stamp uniqueness for category
authorJake Dallimore <jake@moodle.com>
Mon, 8 Aug 2016 09:52:45 +0000 (17:52 +0800)
committerJake Dallimore <jake@moodle.com>
Mon, 22 Aug 2016 01:44:52 +0000 (09:44 +0800)
commitd7d4a0970756a292050d87caf73171608f00db33
tree1da1f6d86ae138e903b427b53762d07af0dcb298
parent3ca3cc77a27aa838a24a33eb461b8be3e5ba8fa3
MDL-54864 core_question: Enforce context,stamp uniqueness for category

Added an upgrade step to remove duplicate stamps, added a unique index
on (contextid, stamp) and modified the question_category edit code such
that stamp duplication in the same context is not permitted.
lib/db/install.xml
lib/db/upgrade.php
question/category_class.php
question/tests/generator/lib.php
version.php