mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-54129 mod_lti: Show in course checkbox works properly.
The show in course setting for LTI would always be set to true regardless of what was set.
This commit is contained in:
parent
65cbefc403
commit
692b53480d
2 changed files with 2 additions and 3 deletions
|
@ -103,7 +103,7 @@ class mod_lti_edit_types_form extends moodleform{
|
||||||
$mform->addHelpButton('lti_customparameters', 'custom', 'lti');
|
$mform->addHelpButton('lti_customparameters', 'custom', 'lti');
|
||||||
|
|
||||||
if (!$istool && !empty($this->_customdata->isadmin)) {
|
if (!$istool && !empty($this->_customdata->isadmin)) {
|
||||||
$mform->addElement('checkbox', 'lti_coursevisible', ' ', ' ' . get_string('show_in_course', 'lti'));
|
$mform->addElement('advcheckbox', 'lti_coursevisible', ' ', ' ' . get_string('show_in_course', 'lti'));
|
||||||
$mform->addHelpButton('lti_coursevisible', 'show_in_course', 'lti');
|
$mform->addHelpButton('lti_coursevisible', 'show_in_course', 'lti');
|
||||||
$mform->setDefault('lti_coursevisible', '1');
|
$mform->setDefault('lti_coursevisible', '1');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1458,8 +1458,7 @@ function lti_prepare_type_for_save($type, $config) {
|
||||||
$type->name = $config->lti_typename;
|
$type->name = $config->lti_typename;
|
||||||
}
|
}
|
||||||
if (isset($config->lti_coursevisible)) {
|
if (isset($config->lti_coursevisible)) {
|
||||||
$type->coursevisible = !empty($config->lti_coursevisible) ? $config->lti_coursevisible : 0;
|
$type->coursevisible = $config->lti_coursevisible;
|
||||||
$config->lti_coursevisible = $type->coursevisible;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($config->lti_icon)) {
|
if (isset($config->lti_icon)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue