mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'MDL-57980-master_grade_items_index' of https://github.com/agrowe/moodle
This commit is contained in:
commit
da8b658229
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="lib/db" VERSION="20211001" COMMENT="XMLDB file for core Moodle tables"
|
||||
<XMLDB PATH="lib/db" VERSION="20211005" COMMENT="XMLDB file for core Moodle tables"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@ -1918,6 +1918,7 @@
|
||||
<INDEX NAME="itemtype-needsupdate" UNIQUE="false" FIELDS="itemtype, needsupdate" COMMENT="used in grading cron"/>
|
||||
<INDEX NAME="gradetype" UNIQUE="false" FIELDS="gradetype" COMMENT="index for gradetype"/>
|
||||
<INDEX NAME="idnumber-courseid" UNIQUE="false" FIELDS="idnumber, courseid" COMMENT="non unique index (although programatically we are guarantying some sort of uniqueness both under this table and the course_modules one). TODO: We need a central store of module idnumbers in the future."/>
|
||||
<INDEX NAME="itemtype-mod-inst-course" UNIQUE="false" FIELDS="itemtype, itemmodule, iteminstance, courseid" COMMENT="used in grading and course views"/>
|
||||
</INDEXES>
|
||||
</TABLE>
|
||||
<TABLE NAME="grade_grades" COMMENT="grade_grades This table keeps individual grades for each user and each item, exactly as imported or submitted by modules. The rawgrademax/min and rawscaleid are stored here to record the values at the time the grade was stored, because teachers might change this for an activity! All the results are normalised/resampled for the final grade value.">
|
||||
|
@ -2921,5 +2921,20 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2021100600.03);
|
||||
}
|
||||
|
||||
if ($oldversion < 2021100600.04) {
|
||||
// Define index itemtype-mod-inst-course (not unique) to be added to grade_items.
|
||||
$table = new xmldb_table('grade_items');
|
||||
$index = new xmldb_index('itemtype-mod-inst-course', XMLDB_INDEX_NOTUNIQUE,
|
||||
['itemtype', 'itemmodule', 'iteminstance', 'courseid']);
|
||||
|
||||
// Conditionally launch add index itemtype-mod-inst-course.
|
||||
if (!$dbman->index_exists($table, $index)) {
|
||||
$dbman->add_index($table, $index);
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2021100600.04);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2021100600.03; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2021100600.04; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
$release = '4.0dev+ (Build: 20211006)'; // Human-friendly version name
|
||||
|
Loading…
x
Reference in New Issue
Block a user