get_manager(); // Loads ddl manager and xmldb classes. // Moodle v2.8.0 release upgrade line. // Put any upgrade step following this. // Moodle v2.9.0 release upgrade line. // Put any upgrade step following this. // Moodle v3.0.0 release upgrade line. // Put any upgrade step following this. // Moodle v3.1.0 release upgrade line. // Put any upgrade step following this. if ($oldversion < 2016061400) { // Define field completionsubmit to be added to survey. $table = new xmldb_table('survey'); $field = new xmldb_field('completionsubmit', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'questions'); // Conditionally launch add field completionsubmit. if (!$dbman->field_exists($table, $field)) { $dbman->add_field($table, $field); } // Survey savepoint reached. upgrade_mod_savepoint(true, 2016061400, 'survey'); } return true; }