Skip to content

Commit

Permalink
Merge branch 'MDL-69055-master' of git://github.com/sarjona/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
abgreeve committed Aug 20, 2020
2 parents d726fc8 + 6a10b78 commit ea1437d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions badges/classes/form/external_backpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ public function definition() {
$issuercontact = $CFG->badges_defaultissuercontact;
$mform->addElement('static', 'issuerinfo', get_string('defaultissuercontact', 'core_badges'), $issuercontact);

if ($backpack && $backpack->apiversion != OPEN_BADGES_V2P1) {
$mform->addElement('passwordunmask', 'password', get_string('defaultissuerpassword', 'core_badges'));
$mform->setType('password', PARAM_RAW);
$mform->addHelpButton('password', 'defaultissuerpassword', 'badges');
$mform->hideIf('password', 'apiversion', 'eq', 1);
} else {
$oauth2options = badges_get_oauth2_service_options();
$mform->addElement('select', 'oauth2_issuerid', get_string('oauth2issuer', 'core_badges'), $oauth2options);
$mform->setType('oauth2_issuerid', PARAM_INT);
}
$mform->addElement('passwordunmask', 'password', get_string('defaultissuerpassword', 'core_badges'));
$mform->setType('password', PARAM_RAW);
$mform->addHelpButton('password', 'defaultissuerpassword', 'badges');
$mform->hideIf('password', 'apiversion', 'neq', 2);

$oauth2options = badges_get_oauth2_service_options();
$mform->addElement('select', 'oauth2_issuerid', get_string('oauth2issuer', 'core_badges'), $oauth2options);
$mform->setType('oauth2_issuerid', PARAM_INT);
$mform->hideIf('oauth2_issuerid', 'apiversion', 'neq', '2.1');

if ($backpack) {
$this->set_data($backpack);
}
Expand Down

0 comments on commit ea1437d

Please sign in to comment.