Merge branch 'MDL-83985-main' of https://github.com/HuongNV13/moodle
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="admin/tool/recyclebin/db" VERSION="20241115" COMMENT="XMLDB file for Moodle tool/recyclebin"
|
||||
<XMLDB PATH="admin/tool/recyclebin/db" VERSION="20250414" COMMENT="XMLDB file for Moodle tool/recyclebin"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -10,7 +10,7 @@
|
||||
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="section" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="module" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
@@ -25,7 +25,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="categoryid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="shortname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="shortname" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="fullname" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
|
||||
@@ -45,21 +45,36 @@ function xmldb_tool_recyclebin_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v4.5.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2024111500) {
|
||||
|
||||
// Changing precision of field fullname on table tool_recyclebin_category to (255).
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field shortname on table tool_recyclebin_category to (1333).
|
||||
$table = new xmldb_table('tool_recyclebin_category');
|
||||
$field = new xmldb_field('shortname', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'categoryid');
|
||||
|
||||
// Launch change of precision for field shortname.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Changing precision of field fullname on table tool_recyclebin_category to (1333).
|
||||
$table = new xmldb_table('tool_recyclebin_category');
|
||||
$field = new xmldb_field('fullname', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'shortname');
|
||||
|
||||
// Launch change of precision for field fullname.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Recyclebin savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2024111500, 'tool', 'recyclebin');
|
||||
}
|
||||
// Changing precision of field name on table tool_recyclebin_course to (1333).
|
||||
$table = new xmldb_table('tool_recyclebin_course');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, null, null, null, 'module');
|
||||
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Recyclebin savepoint reached.
|
||||
upgrade_plugin_savepoint(true, 2025041401, 'tool', 'recyclebin');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_recyclebin'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
@@ -58,7 +58,7 @@ class badge extends moodleform {
|
||||
// When downloading badge, it will be necessary to clean the name as PARAM_FILE.
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
$mform->addRule('name', null, 'required');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$mform->addElement('text', 'version', get_string('version', 'badges'), ['size' => '70']);
|
||||
$mform->setType('version', PARAM_TEXT);
|
||||
@@ -97,6 +97,7 @@ class badge extends moodleform {
|
||||
$mform->addElement('text', 'issuername', get_string('issuername', 'badges'), ['size' => '70']);
|
||||
$mform->setType('issuername', PARAM_NOTAGS);
|
||||
$mform->addRule('issuername', null, 'required');
|
||||
$mform->addRule('issuername', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$site = get_site();
|
||||
$issuername = $CFG->badges_defaultissuername ?: $site->fullname;
|
||||
$mform->setDefault('issuername', $issuername);
|
||||
|
||||
@@ -37,7 +37,7 @@ class editsection_form extends moodleform {
|
||||
);
|
||||
$mform->setType('name', PARAM_RAW);
|
||||
$mform->setDefault('name', $sectioninfo->name);
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
/// Prepare course and the editor
|
||||
|
||||
|
||||
@@ -353,8 +353,8 @@ class sectionactions extends baseactions {
|
||||
|
||||
// Some fields can not be updated using this method.
|
||||
$fields = array_diff_key((array) $fields, array_flip(['id', 'course', 'section', 'sequence']));
|
||||
if (array_key_exists('name', $fields) && \core_text::strlen($fields['name']) > 255) {
|
||||
throw new \moodle_exception('maximumchars', 'moodle', '', 255);
|
||||
if (array_key_exists('name', $fields) && \core_text::strlen($fields['name']) > 1333) {
|
||||
throw new \moodle_exception('maximumchars', 'moodle', '', 1333);
|
||||
}
|
||||
|
||||
// If the section is delegated to a component, it may control some section values.
|
||||
|
||||
@@ -646,7 +646,7 @@ final class sectionactions_test extends \advanced_testcase {
|
||||
],
|
||||
'Long names throws and exception' => [
|
||||
'fieldname' => 'name',
|
||||
'value' => str_repeat('a', 256),
|
||||
'value' => str_repeat('a', 1334),
|
||||
'expected' => '=',
|
||||
'expectexception' => true,
|
||||
],
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="lib/db" VERSION="20250312" COMMENT="XMLDB file for core Moodle tables"
|
||||
<XMLDB PATH="lib/db" VERSION="20250414" COMMENT="XMLDB file for core Moodle tables"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -380,7 +380,7 @@
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="section" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="summary" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="summaryformat" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="sequence" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
@@ -1991,7 +1991,7 @@
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="The course this item is part of"/>
|
||||
<FIELD NAME="categoryid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="(optional) the category group this item belongs to"/>
|
||||
<FIELD NAME="itemname" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="The name of this item (pushed in by the module)"/>
|
||||
<FIELD NAME="itemname" TYPE="char" LENGTH="1333" NOTNULL="false" SEQUENCE="false" COMMENT="The name of this item (pushed in by the module)"/>
|
||||
<FIELD NAME="itemtype" TYPE="char" LENGTH="30" NOTNULL="true" SEQUENCE="false" COMMENT="'mod', 'blocks', 'import', 'calculated' etc"/>
|
||||
<FIELD NAME="itemmodule" TYPE="char" LENGTH="30" NOTNULL="false" SEQUENCE="false" COMMENT="'forum', 'quiz', 'csv', etc"/>
|
||||
<FIELD NAME="iteminstance" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="id of the item module"/>
|
||||
@@ -3173,13 +3173,13 @@
|
||||
<TABLE NAME="badge" COMMENT="Defines badge">
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="description" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="usercreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="usermodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="issuername" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="issuername" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="issuerurl" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="issuercontact" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="expiredate" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
|
||||
|
||||
@@ -1684,5 +1684,43 @@ function xmldb_main_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025051600.01) {
|
||||
|
||||
// Changing precision of field name on table badge to (1333).
|
||||
|
||||
$table = new xmldb_table('badge');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'id');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Changing precision of field issuername on table badge to (1333).
|
||||
|
||||
$table = new xmldb_table('badge');
|
||||
$field = new xmldb_field('issuername', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'usermodified');
|
||||
|
||||
// Launch change of precision for field issuername.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Changing precision of field name on table course_sections to (1333).
|
||||
|
||||
$table = new xmldb_table('course_sections');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, null, null, null, 'section');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Changing precision of field itemname on table grade_items to (1333).
|
||||
|
||||
$table = new xmldb_table('grade_items');
|
||||
$field = new xmldb_field('itemname', XMLDB_TYPE_CHAR, '1333', null, null, null, null, 'categoryid');
|
||||
|
||||
// Launch change of precision for field itemname.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2025051600.01);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/assign/db" VERSION="20240809" COMMENT="XMLDB file for Moodle mod/assign"
|
||||
<XMLDB PATH="mod/assign/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/assign"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the instance of the assignment. Displayed at the top of each page."/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the instance of the assignment. Displayed at the top of each page."/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false" COMMENT="The description of the assignment. This field is used by feature MOD_INTRO."/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="The format of the description field of the assignment. This field is used by feature MOD_INTRO."/>
|
||||
<FIELD NAME="alwaysshowdescription" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="If false the assignment intro will only be displayed after the allowsubmissionsfrom date. If true it will always be displayed."/>
|
||||
|
||||
@@ -144,5 +144,18 @@ function xmldb_assign_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table assign to (1333).
|
||||
$table = new xmldb_table('assign');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Assign savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'assign');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class mod_assign_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$this->standard_intro_elements(get_string('description', 'assign'));
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'mod_assign'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/bigbluebuttonbn/db" VERSION="20250110" COMMENT="XMLDB file for Moodle mod/bigbluebuttonbn"
|
||||
<XMLDB PATH="mod/bigbluebuttonbn/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/bigbluebuttonbn"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -9,7 +9,7 @@
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="type" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
|
||||
<FIELD NAME="meetingid" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
|
||||
@@ -83,6 +83,20 @@ function xmldb_bigbluebuttonbn_upgrade($oldversion = 0) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table bigbluebuttonbn to (1333).
|
||||
|
||||
$table = new xmldb_table('bigbluebuttonbn');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Bigbluebuttonbn savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'bigbluebuttonbn');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,6 @@
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
|
||||
$plugin->version = 2025041400;
|
||||
$plugin->version = 2025041401;
|
||||
$plugin->requires = 2025040800;
|
||||
$plugin->component = 'mod_bigbluebuttonbn';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/book/db" VERSION="20220530" COMMENT="XMLDB file for Moodle mod_book"
|
||||
<XMLDB PATH="mod/book/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod_book"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="numbering" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
<FIELD NAME="bookid" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="pagenum" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="subchapter" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="title" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="title" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="content" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="contentformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="hidden" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
* @return bool always true
|
||||
*/
|
||||
function xmldb_book_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -43,5 +46,25 @@ function xmldb_book_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table book to (1333).
|
||||
$table = new xmldb_table('book');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Changing precision of field title on table book_chapters to (1333).
|
||||
$table = new xmldb_table('book_chapters');
|
||||
$field = new xmldb_field('title', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'subchapter');
|
||||
|
||||
// Launch change of precision for field title.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Book savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'book');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -56,10 +56,10 @@ class book_chapter_edit_form extends moodleform {
|
||||
}
|
||||
|
||||
$mform->addElement('text', 'title', get_string('chaptertitle', 'mod_book'),
|
||||
['size' => '30', 'maxlength' => '255']);
|
||||
['size' => '30', 'maxlength' => '1333']);
|
||||
$mform->setType('title', PARAM_RAW);
|
||||
$mform->addRule('title', null, 'required', null, 'client');
|
||||
$mform->addRule('title', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('title', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$mform->addElement('advcheckbox', 'subchapter', get_string('subchapter', 'mod_book'), $disabledmsg);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class mod_book_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$this->standard_intro_elements(get_string('moduleintro'));
|
||||
|
||||
// Appearance.
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->component = 'mod_book'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->cron = 0; // Period for cron to check this module (secs)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/choice/db" VERSION="20200616" COMMENT="XMLDB file for Moodle mod/choice"
|
||||
<XMLDB PATH="mod/choice/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/choice"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="publish" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_choice_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -55,5 +58,18 @@ function xmldb_choice_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table choice to (1333).
|
||||
$table = new xmldb_table('choice');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Choice savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'choice');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class mod_choice_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$this->standard_intro_elements(get_string('description', 'choice'));
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_choice'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/data/db" VERSION="20220530" COMMENT="XMLDB file for Moodle mod/data"
|
||||
<XMLDB PATH="mod/data/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/data"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="comments" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
function xmldb_data_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
@@ -73,5 +74,18 @@ function xmldb_data_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table data to (1333).
|
||||
$table = new xmldb_table('data');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Data savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'data');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class mod_data_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$this->standard_intro_elements(get_string('intro', 'data'));
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_data'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/feedback/db" VERSION="20220530" COMMENT="XMLDB file for Moodle mod/feedback"
|
||||
<XMLDB PATH="mod/feedback/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/feedback"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="anonymous" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="1" SEQUENCE="false"/>
|
||||
@@ -50,7 +50,7 @@
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="feedback" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="template" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="label" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="presentation" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="typ" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_feedback_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -55,5 +58,25 @@ function xmldb_feedback_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table feedback to (1333).
|
||||
$table = new xmldb_table('feedback');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Changing precision of field name on table feedback_item to (1333).
|
||||
$table = new xmldb_table('feedback_item');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'template');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Feedback savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'feedback');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class feedback_captcha_form extends feedback_item_form {
|
||||
$mform->addElement('text',
|
||||
'name',
|
||||
get_string('item_name', 'feedback'),
|
||||
array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
|
||||
['size' => FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength' => 1333]);
|
||||
$mform->addElement('text',
|
||||
'label',
|
||||
get_string('item_label', 'feedback'),
|
||||
|
||||
@@ -39,7 +39,7 @@ class feedback_info_form extends feedback_item_form {
|
||||
$mform->addElement('text',
|
||||
'name',
|
||||
get_string('item_name', 'feedback'),
|
||||
array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
|
||||
['size' => FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength' => 1333]);
|
||||
$mform->addElement('text',
|
||||
'label',
|
||||
get_string('item_label', 'feedback'),
|
||||
|
||||
@@ -34,7 +34,7 @@ class feedback_numeric_form extends feedback_item_form {
|
||||
$mform->addElement('text',
|
||||
'name',
|
||||
get_string('item_name', 'feedback'),
|
||||
array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
|
||||
['size' => FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength' => 1333]);
|
||||
$mform->addElement('text',
|
||||
'label',
|
||||
get_string('item_label', 'feedback'),
|
||||
|
||||
@@ -33,7 +33,7 @@ class feedback_textarea_form extends feedback_item_form {
|
||||
$mform->addElement('text',
|
||||
'name',
|
||||
get_string('item_name', 'feedback'),
|
||||
array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
|
||||
['size' => FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength' => 1333]);
|
||||
$mform->addElement('text',
|
||||
'label',
|
||||
get_string('item_label', 'feedback'),
|
||||
|
||||
@@ -33,7 +33,7 @@ class feedback_textfield_form extends feedback_item_form {
|
||||
$mform->addElement('text',
|
||||
'name',
|
||||
get_string('item_name', 'feedback'),
|
||||
array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
|
||||
['size' => FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength' => 1333]);
|
||||
$mform->addElement('text',
|
||||
'label',
|
||||
get_string('item_label', 'feedback'),
|
||||
|
||||
@@ -44,7 +44,7 @@ class mod_feedback_mod_form extends moodleform_mod {
|
||||
$mform->addElement('text', 'name', get_string('name', 'feedback'), array('size'=>'64'));
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$this->standard_intro_elements(get_string('description', 'feedback'));
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_feedback'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/folder/db" VERSION="20200213" COMMENT="XMLDB file for Folder module"
|
||||
<XMLDB PATH="mod/folder/db" VERSION="20250414" COMMENT="XMLDB file for Folder module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="revision" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="incremented when after each file changes, solves browser caching issues"/>
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_folder_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -58,5 +61,18 @@ function xmldb_folder_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table folder to (1333).
|
||||
$table = new xmldb_table('folder');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Folder savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'folder');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class mod_folder_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$this->standard_intro_elements();
|
||||
|
||||
//-------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_folder'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/forum/db" VERSION="20220729" COMMENT="XMLDB file for Moodle mod/forum"
|
||||
<XMLDB PATH="mod/forum/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/forum"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -9,7 +9,7 @@
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="type" TYPE="char" LENGTH="20" NOTNULL="true" DEFAULT="general" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="text format of intro field"/>
|
||||
<FIELD NAME="duedate" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="A due date to show in the calendar. Not used for grading."/>
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
*/
|
||||
|
||||
function xmldb_forum_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
@@ -57,5 +59,18 @@ function xmldb_forum_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table forum to (1333).
|
||||
$table = new xmldb_table('forum');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'type');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Forum savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'forum');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class mod_forum_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$this->standard_intro_elements(get_string('forumintro', 'forum'));
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_forum'; // Full name of the plugin (used for diagnostics)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/glossary/db" VERSION="20150602" COMMENT="XMLDB file for Moodle mod/glossary"
|
||||
<XMLDB PATH="mod/glossary/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/glossary"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="allowduplicatedentries" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_glossary_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -55,5 +58,18 @@ function xmldb_glossary_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table glossary to (1333).
|
||||
$table = new xmldb_table('glossary');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Glossary savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'glossary');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class mod_glossary_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$this->standard_intro_elements();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_glossary'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/h5pactivity/db" VERSION="20200422" COMMENT="XMLDB file for Moodle mod_h5pactivity"
|
||||
<XMLDB PATH="mod/h5pactivity/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod_h5pactivity"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the course this activity is part of."/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the activity module instance"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the activity module instance"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Timestamp of when the instance was added to the course."/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Timestamp of when the instance was last modified."/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="Activity description."/>
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
*/
|
||||
function xmldb_h5pactivity_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
@@ -76,5 +77,18 @@ function xmldb_h5pactivity_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table h5pactivity to (1333).
|
||||
$table = new xmldb_table('h5pactivity');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// H5pactivity savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'h5pactivity');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class mod_h5pactivity_mod_form extends moodleform_mod {
|
||||
}
|
||||
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
$this->standard_intro_elements();
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'mod_h5pactivity';
|
||||
$plugin->version = 2025041400;
|
||||
$plugin->version = 2025041401;
|
||||
$plugin->requires = 2025040800;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/imscp/db" VERSION="20120122" COMMENT="XMLDB file for IMS Content Package module"
|
||||
<XMLDB PATH="mod/imscp/db" VERSION="20250414" COMMENT="XMLDB file for IMS Content Package module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="revision" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="incremented when after each file changes, solves browser caching issues"/>
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
* @param int $oldversion
|
||||
*/
|
||||
function xmldb_imscp_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -42,5 +45,18 @@ function xmldb_imscp_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table imscp to (1333).
|
||||
$table = new xmldb_table('imscp');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Imscp savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'imscp');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class mod_imscp_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$this->standard_intro_elements();
|
||||
|
||||
// IMS-CP file upload.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_imscp'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/label/db" VERSION="20120122" COMMENT="XMLDB file for Moodle mod/label"
|
||||
<XMLDB PATH="mod/label/db" VERSION="20250514" COMMENT="XMLDB file for Moodle mod/label"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="false" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
// before any action that may take longer time to finish.
|
||||
|
||||
function xmldb_label_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
@@ -66,5 +68,18 @@ function xmldb_label_upgrade($oldversion) {
|
||||
upgrade_mod_savepoint(true, 2025051300, 'label');
|
||||
}
|
||||
|
||||
if ($oldversion < 2025051301) {
|
||||
|
||||
// Changing precision of field name on table label to (1333).
|
||||
$table = new xmldb_table('label');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Label savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025051301, 'label');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,13 +39,13 @@ class mod_label_mod_form extends moodleform_mod {
|
||||
$mform->addElement('header', 'generalhdr', get_string('general'));
|
||||
|
||||
// Add element for name.
|
||||
$mform->addElement('text', 'name', get_string('labelname', 'label'), ['size' => '64', 'maxlength' => 255]);
|
||||
$mform->addElement('text', 'name', get_string('labelname', 'label'), ['size' => '64', 'maxlength' => 1333]);
|
||||
if (!empty($CFG->formatstringstriptags)) {
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
} else {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$mform->addHelpButton('name', 'labelname', 'label');
|
||||
|
||||
$this->standard_intro_elements(get_string('labeltext', 'label'));
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025051300; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025051301; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_label'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/lesson/db" VERSION="20150720" COMMENT="XMLDB file for Moodle mod/lesson"
|
||||
<XMLDB PATH="mod/lesson/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/lesson"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="practice" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
* @return bool
|
||||
*/
|
||||
function xmldb_lesson_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -63,5 +66,18 @@ function xmldb_lesson_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table lesson to (1333).
|
||||
$table = new xmldb_table('lesson');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Lesson savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'lesson');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class mod_lesson_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$this->standard_intro_elements();
|
||||
|
||||
// Appearance.
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_lesson'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/lti/db" VERSION="20230814" COMMENT="XMLDB file for Moodle mod/lti"
|
||||
<XMLDB PATH="mod/lti/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/lti"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Course basiclti activity belongs to"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="name field for moodle instances"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false" COMMENT="name field for moodle instances"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="General introduction of the basiclti activity"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="false" DEFAULT="0" SEQUENCE="false" COMMENT="Format of the intro field (MOODLE, HTML, MARKDOWN...)"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -125,5 +125,18 @@ function xmldb_lti_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table lti to (1333).
|
||||
$table = new xmldb_table('lti');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Lti savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'lti');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ class mod_lti_mod_form extends moodleform_mod {
|
||||
$mform->addElement('text', 'name', get_string('basicltiname', 'lti'), ['size' => '64']);
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
// Adding the optional "intro" and "introformat" pair of fields.
|
||||
$this->standard_intro_elements(get_string('basicltiintro', 'lti'));
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_lti'; // Full name of the plugin (used for diagnostics).
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/page/db" VERSION="20120122" COMMENT="XMLDB file for Page module"
|
||||
<XMLDB PATH="mod/page/db" VERSION="20250414" COMMENT="XMLDB file for Page module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="content" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_page_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -58,5 +61,18 @@ function xmldb_page_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table page to (1333).
|
||||
$table = new xmldb_table('page');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Page savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'page');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class mod_page_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$this->standard_intro_elements();
|
||||
|
||||
//-------------------------------------------------------
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_page'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/qbank/db" VERSION="20210420" COMMENT="XMLDB file for Moodle mod_qbank"
|
||||
<XMLDB PATH="mod/qbank/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod_qbank"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="ID of the course this activity is part of."/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the activity module instance"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false" COMMENT="The name of the activity module instance"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Timestamp of when the instance was added to the course."/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Timestamp of when the instance was last modified."/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="Activity description."/>
|
||||
|
||||
@@ -38,5 +38,18 @@ function xmldb_qbank_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table qbank to (1333).
|
||||
$table = new xmldb_table('qbank');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Qbank savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'qbank');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,5 +26,5 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'mod_qbank';
|
||||
$plugin->version = 2025041400;
|
||||
$plugin->version = 2025041401;
|
||||
$plugin->requires = 2025040800;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/quiz/db" VERSION="20240523" COMMENT="XMLDB file for Moodle mod/quiz"
|
||||
<XMLDB PATH="mod/quiz/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/quiz"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" COMMENT="Standard Moodle primary key."/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Foreign key reference to the course this quiz is part of."/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" COMMENT="Quiz name."/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false" COMMENT="Quiz name."/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false" COMMENT="Quiz introduction text."/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Quiz intro text format."/>
|
||||
<FIELD NAME="timeopen" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="The time when this quiz opens. (0 = no restriction.)"/>
|
||||
|
||||
@@ -136,5 +136,18 @@ function xmldb_quiz_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table quiz to (1333).
|
||||
$table = new xmldb_table('quiz');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Quiz savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'quiz');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
// Introduction.
|
||||
$this->standard_intro_elements(get_string('introduction', 'quiz'));
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400;
|
||||
$plugin->version = 2025041401;
|
||||
$plugin->requires = 2025040800;
|
||||
$plugin->component = 'mod_quiz';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/resource/db" VERSION="20120122" COMMENT="XMLDB file for Resource module"
|
||||
<XMLDB PATH="mod/resource/db" VERSION="20250414" COMMENT="XMLDB file for Resource module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="tobemigrated" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_resource_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -58,5 +61,18 @@ function xmldb_resource_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table resource to (1333).
|
||||
$table = new xmldb_table('resource');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Resource savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'resource');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class mod_resource_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$this->standard_intro_elements();
|
||||
$element = $mform->getElement('introeditor');
|
||||
$attributes = $element->getAttributes();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_resource'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/scorm/db" VERSION="20230406" COMMENT="XMLDB file for Moodle mod/scorm"
|
||||
<XMLDB PATH="mod/scorm/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/scorm"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="scormtype" TYPE="char" LENGTH="50" NOTNULL="true" DEFAULT="local" SEQUENCE="false" COMMENT="local, external or repository"/>
|
||||
<FIELD NAME="reference" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
|
||||
@@ -196,5 +196,18 @@ function xmldb_scorm_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table scorm to (1333).
|
||||
$table = new xmldb_table('scorm');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Scorm savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'scorm');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class mod_scorm_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
// Summary.
|
||||
$this->standard_intro_elements();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_scorm'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/subsection/db" VERSION="20231116" COMMENT="XMLDB file for Moodle mod_subsection"
|
||||
<XMLDB PATH="mod/subsection/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod_subsection"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
|
||||
@@ -45,5 +45,18 @@ function xmldb_subsection_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table subsection to (1333).
|
||||
$table = new xmldb_table('subsection');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Subsection savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'subsection');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class mod_subsection_mod_form extends moodleform_mod {
|
||||
}
|
||||
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
|
||||
// Add standard elements.
|
||||
$this->standard_coursemodule_elements();
|
||||
|
||||
@@ -25,6 +25,6 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'mod_subsection';
|
||||
$plugin->version = 2025041400;
|
||||
$plugin->version = 2025041401;
|
||||
$plugin->requires = 2025040800;
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/url/db" VERSION="20120122" COMMENT="XMLDB file for URL module"
|
||||
<XMLDB PATH="mod/url/db" VERSION="20250414" COMMENT="XMLDB file for URL module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" SEQUENCE="false"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
<FIELD NAME="externalurl" TYPE="text" NOTNULL="true" SEQUENCE="false"/>
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_url_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -68,5 +71,18 @@ function xmldb_url_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table url to (1333).
|
||||
$table = new xmldb_table('url');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, null, 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Url savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'url');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class mod_url_mod_form extends moodleform_mod {
|
||||
$mform->setType('name', PARAM_CLEANHTML);
|
||||
}
|
||||
$mform->addRule('name', null, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
$mform->addElement('url', 'externalurl', get_string('externalurl', 'url'), array('size'=>'60'), array('usefilepicker'=>true));
|
||||
$mform->setType('externalurl', PARAM_RAW_TRIMMED);
|
||||
$mform->addRule('externalurl', null, 'required', null, 'client');
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2025041400; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2025041401; // The current module version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2025040800; // Requires this Moodle version.
|
||||
$plugin->component = 'mod_url'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/wiki/db" VERSION="20120122" COMMENT="XMLDB file for Moodle mod/wiki"
|
||||
<XMLDB PATH="mod/wiki/db" VERSION="20250414" COMMENT="XMLDB file for Moodle mod/wiki"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -8,7 +8,7 @@
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
<FIELD NAME="course" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Course wiki activity belongs to"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" DEFAULT="Wiki" SEQUENCE="false" COMMENT="name field for moodle instances"/>
|
||||
<FIELD NAME="name" TYPE="char" LENGTH="1333" NOTNULL="true" DEFAULT="Wiki" SEQUENCE="false" COMMENT="name field for moodle instances"/>
|
||||
<FIELD NAME="intro" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="General introduction of the wiki activity"/>
|
||||
<FIELD NAME="introformat" TYPE="int" LENGTH="4" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Format of the intro field (MOODLE, HTML, MARKDOWN...)"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
*/
|
||||
|
||||
function xmldb_wiki_upgrade($oldversion) {
|
||||
global $DB;
|
||||
$dbman = $DB->get_manager();
|
||||
|
||||
// Automatically generated Moodle v4.2.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
@@ -51,5 +54,18 @@ function xmldb_wiki_upgrade($oldversion) {
|
||||
// Automatically generated Moodle v5.0.0 release upgrade line.
|
||||
// Put any upgrade step following this.
|
||||
|
||||
if ($oldversion < 2025041401) {
|
||||
|
||||
// Changing precision of field name on table wiki to (1333).
|
||||
$table = new xmldb_table('wiki');
|
||||
$field = new xmldb_field('name', XMLDB_TYPE_CHAR, '1333', null, XMLDB_NOTNULL, null, 'Wiki', 'course');
|
||||
|
||||
// Launch change of precision for field name.
|
||||
$dbman->change_field_precision($table, $field);
|
||||
|
||||
// Wiki savepoint reached.
|
||||
upgrade_mod_savepoint(true, 2025041401, 'wiki');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class mod_wiki_mod_form extends moodleform_mod {
|
||||
$mform->addElement('text', 'name', get_string('wikiname', 'wiki'), array('size' => '64'));
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
$mform->addRule('name', $required, 'required', null, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
|
||||
$mform->addRule('name', get_string('maximumchars', '', 1333), 'maxlength', 1333, 'client');
|
||||
// Adding the optional "intro" and "introformat" pair of fields
|
||||
$this->standard_intro_elements(get_string('wikiintro', 'wiki'));
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user