Skip to content

Commit

Permalink
Merge branch 'MDL-69492' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 8, 2020
2 parents afb05bf + ca742a2 commit 7447075
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
8 changes: 8 additions & 0 deletions auth/cas/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,13 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.

if ($oldversion < 2021052501) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_cas', 'memberattribute_isdn')), 'auth_cas');

upgrade_plugin_savepoint(true, 2021052501, 'auth', 'cas');
}

return true;
}
4 changes: 2 additions & 2 deletions auth/cas/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));

// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_cas/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_cas/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));

// Object class.
$settings->add(new admin_setting_configtext('auth_cas/objectclass',
Expand Down
2 changes: 1 addition & 1 deletion auth/cas/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

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

$plugin->version = 2021052500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2021052501; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2021052500; // Requires this Moodle version
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)

Expand Down
8 changes: 8 additions & 0 deletions auth/ldap/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,13 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v3.9.0 release upgrade line.
// Put any upgrade step following this.

if ($oldversion < 2021052501) {
// Normalize the memberattribute_isdn plugin config.
set_config('memberattribute_isdn',
!empty(get_config('auth_ldap', 'memberattribute_isdn')), 'auth_ldap');

upgrade_plugin_savepoint(true, 2021052501, 'auth', 'ldap');
}

return true;
}
2 changes: 1 addition & 1 deletion auth/ldap/lang/en/auth_ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
$string['auth_ldap_ldap_encoding_key'] = 'LDAP encoding';
$string['auth_ldap_login_settings'] = 'Login settings';
$string['auth_ldap_memberattribute'] = 'Optional: Overrides user member attribute, when users belongs to a group. Usually \'member\'';
$string['auth_ldap_memberattribute_isdn'] = 'Optional: Overrides handling of member attribute values, either 0 or 1';
$string['auth_ldap_memberattribute_isdn'] = 'Overrides handling of member attribute values';
$string['auth_ldap_memberattribute_isdn_key'] = 'Member attribute uses dn';
$string['auth_ldap_memberattribute_key'] = 'Member attribute';
$string['auth_ldap_noconnect'] = 'LDAP-module cannot connect to server: {$a}';
Expand Down
4 changes: 2 additions & 2 deletions auth/ldap/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@
get_string('auth_ldap_memberattribute', 'auth_ldap'), '', PARAM_RAW));

// Member attribute uses dn.
$settings->add(new admin_setting_configtext('auth_ldap/memberattribute_isdn',
$settings->add(new admin_setting_configselect('auth_ldap/memberattribute_isdn',
get_string('auth_ldap_memberattribute_isdn_key', 'auth_ldap'),
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), '', PARAM_RAW));
get_string('auth_ldap_memberattribute_isdn', 'auth_ldap'), 0, $yesno));

// Object class.
$settings->add(new admin_setting_configtext('auth_ldap/objectclass',
Expand Down
2 changes: 1 addition & 1 deletion auth/ldap/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

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

$plugin->version = 2021052500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->version = 2021052501; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2021052500; // Requires this Moodle version
$plugin->component = 'auth_ldap'; // Full name of the plugin (used for diagnostics)

0 comments on commit 7447075

Please sign in to comment.