MDL-71696 core_question: Changes for versioning

This commit adds the changes in questiontype base
to work with new question tables and the new structure in the
databse. Also needed for versioning.
This implementation will also introduct the question status
which allows a question to be in draft and ready status.
I also introduces changes to the base view where it shows
the latest version of the questions. The view of versions
for a question is not implemented in this commit.
This implementation will also introduce changes in the core
qtype plugins to support versioning and the changed
db schema.
This commit is contained in:
Guillermo Gomez
2022-02-03 22:22:44 +11:00
committed by Safat Shahin
parent 7547f3e9f0
commit c6cfca2a08
118 changed files with 2946 additions and 1397 deletions
+12 -6
View File
@@ -100,12 +100,6 @@ abstract class question_definition {
/** @var string unique identifier of this question. */
public $stamp;
/** @var string unique identifier of this version of this question. */
public $version;
/** @var boolean whethre this question has been deleted/hidden in the question bank. */
public $hidden = 0;
/** @var string question idnumber. */
public $idnumber;
@@ -124,6 +118,18 @@ abstract class question_definition {
/** @var array of question_hints. */
public $hints = array();
/** @var boolean question status hidden/ready/draft in the question bank. */
public $status = \core_question\local\bank\constants::QUESTION_STATUS_READY;
/** @var int Version id of the question in a question bank */
public $versionid;
/** @var int Version number of the question in a question bank */
public $version;
/** @var int Bank entry id for the question */
public $questionbankentryid;
/**
* @var array of array of \core_customfield\data_controller objects indexed by fieldid for the questions custom fields.
*/