Browse Source

issue#395 - change preventsharedip default value to 1 (#396)

* issue#395 - make sure preventsharedip default value to is set 0

* pump up version
MOODLE_36_STABLE
tuanngocnguyen 6 years ago
committed by Dan Marsden
parent
commit
dabfe65fa4
  1. 2
      db/install.xml
  2. 15
      db/upgrade.php
  3. 2
      version.php

2
db/install.xml

@ -45,7 +45,7 @@
<FIELD NAME="automarkcompleted" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="statusset" TYPE="int" LENGTH="5" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Which set of statuses to use"/>
<FIELD NAME="absenteereport" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="preventsharedip" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
<FIELD NAME="preventsharedip" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="preventsharediptime" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="caleventid" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="calendarevent" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>

15
db/upgrade.php

@ -550,5 +550,20 @@ function xmldb_attendance_upgrade($oldversion=0) {
upgrade_mod_savepoint(true, 2019012500, 'attendance');
}
if ($oldversion < 2019061800) {
// Make sure default value to '0'.
$table = new xmldb_table('attendance_sessions');
$field = new xmldb_field('preventsharedip', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED,
XMLDB_NOTNULL, null, '0', 'absenteereport');
if ($dbman->field_exists($table, $field)) {
$dbman->change_field_default($table, $field);
}
// Attendance savepoint reached.
upgrade_mod_savepoint(true, 2019061800, 'attendance');
}
return $result;
}

2
version.php

@ -23,7 +23,7 @@
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2019052801;
$plugin->version = 2019061800;
$plugin->requires = 2018102700; // Requires 3.6.
$plugin->release = '3.6.7';
$plugin->maturity = MATURITY_STABLE;

Loading…
Cancel
Save