|
@ -34,7 +34,7 @@ function xmldb_attendance_upgrade($oldversion=0) { |
|
|
|
|
|
|
|
|
$result = true; |
|
|
$result = true; |
|
|
|
|
|
|
|
|
if ($oldversion < 2014072101) { |
|
|
if ($oldversion < 2014112000) { |
|
|
$table = new xmldb_table('attendance_sessions'); |
|
|
$table = new xmldb_table('attendance_sessions'); |
|
|
|
|
|
|
|
|
$field = new xmldb_field('studentscanmark'); |
|
|
$field = new xmldb_field('studentscanmark'); |
|
@ -43,10 +43,10 @@ function xmldb_attendance_upgrade($oldversion=0) { |
|
|
$dbman->add_field($table, $field); |
|
|
$dbman->add_field($table, $field); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
upgrade_mod_savepoint($result, 2014072101, 'attendance'); |
|
|
upgrade_mod_savepoint($result, 2014112000, 'attendance'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ($oldversion < 2014072102) { |
|
|
if ($oldversion < 2014112001) { |
|
|
// Replace values that reference old module "attforblock" to "attendance". |
|
|
// Replace values that reference old module "attforblock" to "attendance". |
|
|
$sql = "UPDATE {grade_items} |
|
|
$sql = "UPDATE {grade_items} |
|
|
SET itemmodule = 'attendance' |
|
|
SET itemmodule = 'attendance' |
|
@ -82,7 +82,7 @@ function xmldb_attendance_upgrade($oldversion=0) { |
|
|
// Delete old capabilities. |
|
|
// Delete old capabilities. |
|
|
$DB->delete_records_select('capabilities', 'component = ?', array('mod_attforblock')); |
|
|
$DB->delete_records_select('capabilities', 'component = ?', array('mod_attforblock')); |
|
|
|
|
|
|
|
|
upgrade_plugin_savepoint($result, 2014072102, 'mod', 'attendance'); |
|
|
upgrade_plugin_savepoint($result, 2014112001, 'mod', 'attendance'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return $result; |
|
|
return $result; |
|
|