Merge branch 'MDL-86749_master' of https://github.com/santoshndev/moodle

This commit is contained in:
Mihail Geshoski
2025-12-03 10:58:53 +08:00
6 changed files with 51 additions and 4 deletions
+7 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20250922" COMMENT="XMLDB file for core Moodle tables"
<XMLDB PATH="lib/db" VERSION="20251118" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
@@ -1671,6 +1671,9 @@
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
<KEY NAME="questionid" TYPE="foreign" FIELDS="questionid" REFTABLE="question" REFFIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="hashcode" UNIQUE="false" FIELDS="hashcode"/>
</INDEXES>
</TABLE>
<TABLE NAME="question_response_analysis" COMMENT="Analysis of student responses given to questions.">
<FIELDS>
@@ -1689,6 +1692,9 @@
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
<KEY NAME="questionid" TYPE="foreign" FIELDS="questionid" REFTABLE="question" REFFIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="hashcode" UNIQUE="false" FIELDS="hashcode"/>
</INDEXES>
</TABLE>
<TABLE NAME="question_response_count" COMMENT="Count for each responses for each try at a question.">
<FIELDS>
+22
View File
@@ -2314,5 +2314,27 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2025103000.01);
}
if ($oldversion < 2025112700.02) {
// Define index hashcode (not unique) to be added to question_response_analysis.
$table = new xmldb_table('question_response_analysis');
$index = new xmldb_index('hashcode', XMLDB_INDEX_NOTUNIQUE, ['hashcode']);
// Conditionally launch add index hashcode.
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Define index hashcode (not unique) to be added to question_statistics.
$table = new xmldb_table('question_statistics');
$index = new xmldb_index('hashcode', XMLDB_INDEX_NOTUNIQUE, ['hashcode']);
// Conditionally launch add index hashcode.
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2025112700.02);
}
return true;
}
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="mod/quiz/report/statistics/db" VERSION="20130920" COMMENT="XMLDB file for Moodle mod/quiz/report/statistics"
<XMLDB PATH="mod/quiz/report/statistics/db" VERSION="20251118" COMMENT="XMLDB file for Moodle mod/quiz/report/statistics"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../lib/xmldb/xmldb.xsd"
>
@@ -29,6 +29,9 @@
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
<INDEXES>
<INDEX NAME="hashcode" UNIQUE="false" FIELDS="hashcode"/>
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
@@ -26,6 +26,8 @@
* Quiz statistics report upgrade code.
*/
function xmldb_quiz_statistics_upgrade($oldversion) {
global $CFG, $DB;
$dbman = $DB->get_manager();
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
@@ -44,5 +46,19 @@ function xmldb_quiz_statistics_upgrade($oldversion) {
// Automatically generated Moodle v5.1.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2025100601) {
// Define index hashcode (not unique) to be added to quiz_statistics.
$table = new xmldb_table('quiz_statistics');
$index = new xmldb_index('hashcode', XMLDB_INDEX_NOTUNIQUE, ['hashcode']);
// Conditionally launch add index hashcode.
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Statistics savepoint reached.
upgrade_plugin_savepoint(true, 2025100601, 'quiz', 'statistics');
}
return true;
}
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2025100600;
$plugin->version = 2025100601;
$plugin->requires = 2025092600;
$plugin->component = 'quiz_statistics';
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2025112700.01; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2025112700.02; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '5.2dev (Build: 20251127)'; // Human-friendly version name