-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from hrimhari/release/1.4.3
Fixes for release 1.4.3
- Loading branch information
Showing
7 changed files
with
94 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
defined('MOODLE_INTERNAL') || die(); | ||
/** | ||
* @param int $oldversion the version we are upgrading from | ||
* @return bool result | ||
*/ | ||
function xmldb_auth_emailadmin_upgrade($oldversion) { | ||
global $CFG, $DB; | ||
|
||
if ($oldversion < 2019070800) { | ||
upgrade_fix_config_auth_plugin_names('emailadmin'); | ||
upgrade_fix_config_auth_plugin_defaults('emailadmin'); | ||
upgrade_plugin_savepoint(true, 2019070800, 'auth', 'emailadmin'); | ||
} | ||
|
||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?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/>. | ||
|
||
/** | ||
* Admin settings and defaults. Heavily based on auth/email/settings.php. | ||
* | ||
* @package auth_emailadmin | ||
* @copyright 2019 Felipe Carasso | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
defined('MOODLE_INTERNAL') || die; | ||
|
||
if ($ADMIN->fulltree) { | ||
|
||
// Introductory explanation. | ||
$settings->add(new admin_setting_heading('auth_emailadmin/pluginname', '', | ||
new lang_string('auth_emailadmindescription', 'auth_emailadmin'))); | ||
|
||
$options = array( | ||
new lang_string('no'), | ||
new lang_string('yes'), | ||
); | ||
|
||
$settings->add(new admin_setting_configselect('auth_emailadmin/recaptcha', | ||
new lang_string('auth_emailadminrecaptcha_key', 'auth_emailadmin'), | ||
new lang_string('auth_emailadminrecaptcha', 'auth_emailadmin'), 0, $options)); | ||
$options = array('-1' => get_string("auth_emailadminnotif_strategy_first", "auth_emailadmin"), | ||
'-2' => get_string("auth_emailadminnotif_strategy_all", "auth_emailadmin"), | ||
'-3' => get_string("auth_emailadminnotif_strategy_allupdate", "auth_emailadmin") | ||
); | ||
$admins = array_merge(get_admins(), get_users_by_capability(context_system::instance(), 'moodle/user:update')); | ||
foreach ($admins as $admin) { | ||
$options[$admin->id] = $admin->username; | ||
} | ||
|
||
$settings->add(new admin_setting_configselect('auth_emailadmin/notif_strategy', | ||
new lang_string('auth_emailadminnotif_strategy_key', 'auth_emailadmin'), | ||
new lang_string('auth_emailadminnotif_strategy', 'auth_emailadmin'), -1, $options)); | ||
|
||
// Display locking / mapping of profile fields. | ||
$authplugin = get_auth_plugin('emailadmin'); | ||
display_auth_lock_options($settings, $authplugin->authtype, $authplugin->userfields, | ||
get_string('auth_fieldlocks_help', 'auth'), false, false); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters