mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-79440-master' of https://github.com/snake/moodle
This commit is contained in:
commit
b27f6b0eca
@ -437,7 +437,9 @@ class mod_lti_edit_types_form extends moodleform {
|
||||
// change to the existing value. Add the option as a disabled to make this clear. Once changed, it cannot be set again.
|
||||
// This isn't supported from 4.3 onward in the creation of new tool types.
|
||||
foreach (['lti_sendname', 'lti_sendemailaddr'] as $elementname) {
|
||||
if ($this->_form->_defaultValues[$elementname] == LTI_SETTING_DELEGATE) {
|
||||
if (!empty($this->_form->_defaultValues[$elementname])
|
||||
&& $this->_form->_defaultValues[$elementname] == LTI_SETTING_DELEGATE) {
|
||||
|
||||
$elementarr = array_filter($this->_form->_elements, function ($element) use($elementname) {
|
||||
return !empty($element->_attributes['name']) && $element->_attributes['name'] == $elementname;
|
||||
});
|
||||
|
@ -473,7 +473,7 @@ class mod_lti_mod_form extends moodleform_mod {
|
||||
$mform->setType('secureicon', PARAM_URL);
|
||||
|
||||
// Add standard course module grading elements, and show them if the tool type + instance config permits it.
|
||||
if (in_array($config['acceptgrades'], [LTI_SETTING_ALWAYS, LTI_SETTING_DELEGATE])) {
|
||||
if (!empty($config['acceptgrades']) && in_array($config['acceptgrades'], [LTI_SETTING_ALWAYS, LTI_SETTING_DELEGATE])) {
|
||||
$elementnamesbeforegrading = $this->_form->_elementIndex;
|
||||
$this->standard_grading_coursemodule_elements();
|
||||
$elementnamesaftergrading = $this->_form->_elementIndex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user