| Línea 32... |
Línea 32... |
| 32 |
*
|
32 |
*
|
| 33 |
* @param int $oldversion The version we are upgrading from.
|
33 |
* @param int $oldversion The version we are upgrading from.
|
| 34 |
* @return bool Result.
|
34 |
* @return bool Result.
|
| 35 |
*/
|
35 |
*/
|
| 36 |
function xmldb_quizaccess_seb_upgrade($oldversion) {
|
36 |
function xmldb_quizaccess_seb_upgrade($oldversion) {
|
| 37 |
// Automatically generated Moodle v4.1.0 release upgrade line.
|
37 |
global $DB;
|
| 38 |
// Put any upgrade step following this.
|
38 |
$dbman = $DB->get_manager();
|
| Línea 39... |
Línea 39... |
| 39 |
|
39 |
|
| 40 |
// Automatically generated Moodle v4.2.0 release upgrade line.
|
40 |
// Automatically generated Moodle v4.2.0 release upgrade line.
|
| Línea 41... |
Línea 41... |
| 41 |
// Put any upgrade step following this.
|
41 |
// Put any upgrade step following this.
|
| 42 |
|
42 |
|
| Línea 43... |
Línea 43... |
| 43 |
// Automatically generated Moodle v4.3.0 release upgrade line.
|
43 |
// Automatically generated Moodle v4.3.0 release upgrade line.
|
| 44 |
// Put any upgrade step following this.
|
44 |
// Put any upgrade step following this.
|
| Línea -... |
Línea 45... |
| - |
|
45 |
|
| - |
|
46 |
// Automatically generated Moodle v4.4.0 release upgrade line.
|
| - |
|
47 |
// Put any upgrade step following this.
|
| - |
|
48 |
|
| - |
|
49 |
// Automatically generated Moodle v4.5.0 release upgrade line.
|
| - |
|
50 |
// Put any upgrade step following this.
|
| - |
|
51 |
|
| - |
|
52 |
if ($oldversion < 2024121801) {
|
| - |
|
53 |
|
| - |
|
54 |
// Define field allowcapturecamera to be added to quizaccess_seb_quizsettings.
|
| - |
|
55 |
$table = new xmldb_table('quizaccess_seb_quizsettings');
|
| - |
|
56 |
$field = new xmldb_field('allowcapturecamera', XMLDB_TYPE_INTEGER, '1', null, null, null, null, 'muteonstartup');
|
| - |
|
57 |
|
| - |
|
58 |
// Conditionally launch add field allowcapturecamera.
|
| - |
|
59 |
if (!$dbman->field_exists($table, $field)) {
|
| - |
|
60 |
$dbman->add_field($table, $field);
|
| - |
|
61 |
}
|
| - |
|
62 |
|
| - |
|
63 |
// Define field allowcapturemicrophone to be added to quizaccess_seb_quizsettings.
|
| - |
|
64 |
$field = new xmldb_field('allowcapturemicrophone', XMLDB_TYPE_INTEGER, '1', null, null, null, null, 'allowcapturecamera');
|
| - |
|
65 |
|
| - |
|
66 |
// Conditionally launch add field allowcapturemicrophone.
|
| - |
|
67 |
if (!$dbman->field_exists($table, $field)) {
|
| - |
|
68 |
$dbman->add_field($table, $field);
|
| - |
|
69 |
}
|
| - |
|
70 |
|
| - |
|
71 |
// Seb savepoint reached.
|
| - |
|
72 |
upgrade_plugin_savepoint(true, 2024121801, 'quizaccess', 'seb');
|
| - |
|
73 |
}
|
| 45 |
|
74 |
|
| 46 |
// Automatically generated Moodle v4.4.0 release upgrade line.
|
75 |
// Automatically generated Moodle v5.0.0 release upgrade line.
|