Skip to content

Commit

Permalink
Fix section error in auth_oidc confirmation page for new installations
Browse files Browse the repository at this point in the history
  • Loading branch information
weilai-irl committed Oct 12, 2022
1 parent f1b8d55 commit 762733a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion classes/form/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ protected function definition() {
$authmethodoptions = [
AUTH_OIDC_AUTH_METHOD_SECRET => get_string('auth_method_secret', 'auth_oidc'),
];
if ($this->_customdata['oidcconfig']->idptype == AUTH_OIDC_IDP_TYPE_MICROSOFT) {
if (isset($this->_customdata['oidcconfig']->idptype) &&
$this->_customdata['oidcconfig']->idptype == AUTH_OIDC_IDP_TYPE_MICROSOFT) {
$authmethodoptions[AUTH_OIDC_AUTH_METHOD_CERTIFICATE] = get_string('auth_method_certificate', 'auth_oidc');
}
$mform->addElement('select', 'clientauthmethod', auth_oidc_config_name_in_form('clientauthmethod'), $authmethodoptions);
Expand Down
1 change: 0 additions & 1 deletion lang/en/auth_oidc.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@
<li>If Azure AD is used as the IdP, additional profile data can be made available by installing and configuring the <a href="https://moodle.org/plugins/local_o365">Microsoft 365 integration plugin (local_o365)</a>.</li>
<li>If SDS profile sync feature is enabled in the local_o365 plugin, certain profile fields can be synchronised from SDS to Moodle. when running the "Sync with SDS" scheduled task, and will not happen when running the "Sync users with Azure AD" scheduled task, nor when user logs in.</li>
</ul>';
$string['error_incomplete_basic_settings'] = 'Missing basic settings.';
$string['settings_section_basic'] = 'Basic settings';
$string['settings_section_authentication'] = 'Authentication';
$string['settings_section_endpoints'] = 'Endpoints';
Expand Down
6 changes: 0 additions & 6 deletions manageapplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@

$oidcconfig = get_config('auth_oidc');

// If "idptype" or "clientid" is not set, we are not ready to configure application authentication.
if (!isset($oidcconfig->idptype) || empty($oidcconfig->idptype) || !isset($oidcconfig->clientid) || empty($oidcconfig->clientid)) {
redirect(new moodle_url('/admin/settings.php', ['section' => 'auth_oidc_basic_settings']),
get_string('error_incomplete_basic_settings', 'auth_oidc'));
}

$form = new application(null, ['oidcconfig' => $oidcconfig]);

$formdata = [];
Expand Down

0 comments on commit 762733a

Please # to comment.