Skip to content

Commit

Permalink
Merge pull request #3 from Lesterhuis-Training-en-Consultancy/86by67h…
Browse files Browse the repository at this point in the history
…5c-increase-size-grouplist

86by67h5c increase size grouplist
  • Loading branch information
luukverhoeven committed Apr 5, 2024
2 parents c7ec4c1 + 681a263 commit 5e449aa
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y5DQB9F8AJB
- 1.1.2 : stable version working as admin tool plugin for Moodle 3.x
- 3.9.0 : Moodle 3.9 & PHP7.2 version | Moodle 4.0 & PHP 7.4 version | Moodle 4.1 & PHP 8.0 version
- 4.2.0 : Moodle 4.2 & PHP 8.0 version
- 4.2.1 : Fix (https://github.com/Lesterhuis-Training-en-Consultancy/moodle-tool_groupautoenrol/issues/2) Increase size of groupslist col #2
10 changes: 4 additions & 6 deletions db/install.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="admin/tool/groupautoenrol/db" VERSION="20140307" COMMENT="XMLDB file for Moodle admin/tool/groupautoenrol"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
<XMLDB PATH="admin/tool/groupautoenrol/db" VERSION="20240404" COMMENT="XMLDB file for Moodle admin/tool/groupautoenrol"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="tool_groupautoenrol" COMMENT="tool_groupautoenrol table.">
Expand All @@ -13,14 +13,12 @@
<FIELD NAME="enrol_method" TYPE="int" LENGTH="3" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="enrolment method"/>
<FIELD NAME="profile_field" TYPE="int" LENGTH="3" NOTNULL="false" DEFAULT="0" SEQUENCE="false" COMMENT="profil field"/>
<FIELD NAME="use_groupslist" TYPE="int" LENGTH="1" NOTNULL="false" DEFAULT="0" SEQUENCE="false" COMMENT="use specific(s) group(s) only"/>
<FIELD NAME="groupslist" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="Groups to use"/>
<FIELD NAME="groupslist" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="Groups to use"/>
<FIELD NAME="balises" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="Balises for letters"/>

</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
</KEYS>
</TABLE>
</TABLES>
</XMLDB>

51 changes: 51 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Upgrade steps.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*
* @package moodle-tool_groupautoenrol
* @copyright 04/04/2024 Mfreak.nl | LdesignMedia.nl - Luuk Verhoeven
* @author Luuk Verhoeven
**/

/**
* xmldb_tool_groupautoenrol_upgrade
*
* @param $oldversion
* @return true
*/
function xmldb_tool_groupautoenrol_upgrade($oldversion) {

global $DB;
$dbman = $DB->get_manager();

if ($oldversion < 2024040400) {

// Changing type of field groupslist on table tool_groupautoenrol to text.
$table = new xmldb_table('tool_groupautoenrol');
$field = new xmldb_field('groupslist', XMLDB_TYPE_TEXT, null, null, null, null, null, 'use_groupslist');

// Launch change of type for field groupslist.
$dbman->change_field_type($table, $field);

// Groupautoenrol savepoint reached.
upgrade_plugin_savepoint(true, 2024040400, 'tool', 'groupautoenrol');
}
return true;
}
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2024030400; // The (date) version of this module + 2 extra digital for daily versions.
$plugin->version = 2024040400; // The (date) version of this module + 2 extra digital for daily versions.
$plugin->requires = 2020061500; // Requires this Moodle version - at least 3.9.
$plugin->supported = [39, 402];
$plugin->cron = 0;
$plugin->component = 'tool_groupautoenrol';
$plugin->release = '4.2.0';
$plugin->release = '4.2.1';
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 5e449aa

Please sign in to comment.