Merge branch 'MDL-86749_500' of https://github.com/santoshndev/moodle into MOODLE_500_STABLE

This commit is contained in:
Mihail Geshoski
2025-12-03 11:06:23 +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="20250520" 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"
>
@@ -1668,6 +1668,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>
@@ -1686,6 +1689,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
@@ -1872,5 +1872,27 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2025041403.05);
}
if ($oldversion < 2025041403.11) {
// 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, 2025041403.11);
}
return true;
}
+4 -1
View File
@@ -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>
+16
View File
@@ -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.
@@ -41,5 +43,19 @@ function xmldb_quiz_statistics_upgrade($oldversion) {
// Automatically generated Moodle v5.0.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2025041401) {
// 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, 2025041401, 'quiz', 'statistics');
}
return true;
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2025041400;
$plugin->version = 2025041401;
$plugin->requires = 2025040800;
$plugin->component = 'quiz_statistics';
+1 -1
View File
@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2025041403.10; // 20250414 = branching date YYYYMMDD - do not modify!
$version = 2025041403.11; // 20250414 = branching date YYYYMMDD - do not modify!
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '5.0.3+ (Build: 20251127)'; // Human-friendly version name