$mform->setType('resourcekey', PARAM_TEXT);
$mform->setAdvanced('resourcekey');
$mform->addHelpButton('resourcekey', 'resourcekey', 'lti');
+ $mform->disabledIf('resourcekey', 'typeid', 'neq', '0');
+ if ($update) {
+ $mform->disabledIf('resourcekey', 'typeid', 'neq', 0);
+ } else {
+ $mform->disabledIf('resourcekey', 'typeid', 'in', $noncontentitemtypes);
+ }
+ $mform->setForceLtr('resourcekey');
$mform->addElement('passwordunmask', 'password', get_string('password', 'lti'));
$mform->setType('password', PARAM_TEXT);
When I log in as "teacher1"
And I follow "Course 1"
And I turn editing mode on
- And I add a "Teaching Tool 1" to section "1" and I fill the form with:
- | Activity name | Test tool activity 1 |
- | Launch container | Embed |
+ And I add a "Teaching Tool 1" to section "1"
+ # For tool that does not support Content-Item message type, the Select content button must be disabled.
+ And the "Select content" "button" should be disabled
+ And I set the field "Activity name" to "Test tool activity 1"
+ And I click on "Show more..." "link"
+ And I set the field "Launch container" to "Embed"
+ And I press "Save and return to course"
And I open "Test tool activity 1" actions menu
- And I follow "Edit settings" in the open menu
+ And I choose "Edit settings" in the open action menu
Then the field "Preconfigured tool" matches value "Teaching Tool 1"
+ # When editing settings, the Select content button should be disabled.
+ And the "Select content" "button" should be disabled