Browse Source

Fix issues with version mis-match and studentscanmark field.

MOODLE_26_STABLE
Dan Marsden 10 years ago
parent
commit
b5fdee1bcb
  1. 24
      db/upgrade.php
  2. 2
      version.php

24
db/upgrade.php

@ -34,18 +34,6 @@ function xmldb_attendance_upgrade($oldversion=0) {
$result = true;
if ($oldversion < 2013082901) {
$table = new xmldb_table('attendance_sessions');
$field = new xmldb_field('studentscanmark');
$field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
upgrade_mod_savepoint($result, 2013082901, 'attendance');
}
if ($oldversion < 2013082902) {
// Replace values that reference old module "attforblock" to "attendance".
$sql = "UPDATE {grade_items}
@ -85,5 +73,17 @@ function xmldb_attendance_upgrade($oldversion=0) {
upgrade_plugin_savepoint($result, 2013082902, 'mod', 'attendance');
}
if ($oldversion < 2014022803) {
$table = new xmldb_table('attendance_sessions');
$field = new xmldb_field('studentscanmark');
$field->set_attributes(XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}
upgrade_mod_savepoint($result, 2014022803, 'attendance');
}
return $result;
}

2
version.php

@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$plugin->version = 2014022802;
$plugin->version = 2014022803;
$plugin->requires = 2013111800;
$plugin->release = '2.6.2';
$plugin->maturity = MATURITY_STABLE;

Loading…
Cancel
Save