mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-55841 mod_lti: Improve interface usability & consistency
* Always say "Tool URL" * Add help strings to cartridge interface
This commit is contained in:
parent
51478048cd
commit
3a5e14a5d0
@ -99,7 +99,7 @@ if ($action) {
|
||||
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('toolsprovided', 'enrol_lti'));
|
||||
echo get_string('toolsprovided_help', 'enrol_lti');
|
||||
echo "<p>" . get_string('toolsprovided_help', 'enrol_lti') . "</p>";
|
||||
|
||||
if (\enrol_lti\helper::count_lti_tools(array('courseid' => $courseid)) > 0) {
|
||||
$table = new \enrol_lti\manage_table($courseid);
|
||||
|
@ -1,3 +0,0 @@
|
||||
.copy_box {
|
||||
width: 100%;
|
||||
}
|
@ -45,7 +45,8 @@
|
||||
}
|
||||
}}
|
||||
{{#rows}}
|
||||
<label style="display: inline-block; width: 5em" {{#id}}for={{#quote}}{{{id}}}-{{{uniqid}}}{{/quote}}{{/id}}>{{label}}</label>
|
||||
<div style="display: inline-block">{{> core/copy_box }}</div>
|
||||
<br/>
|
||||
<div>
|
||||
<label style="display: inline-block; width: 5em" {{#id}}for={{#quote}}{{{id}}}-{{{uniqid}}}{{/quote}}{{/id}}>{{label}}</label>
|
||||
<div style="display: inline-block">{{> core/copy_box }}</div>
|
||||
</div>
|
||||
{{/rows}}
|
||||
|
@ -1 +1 @@
|
||||
define(["jquery","core/ajax","core/notification","core/templates","mod_lti/events","mod_lti/keys","mod_lti/tool_type","mod_lti/tool_proxy","core/str"],function(a,b,c,d,e,f,g,h,i){var j={EXTERNAL_REGISTRATION_CONTAINER:"#external-registration-container",EXTERNAL_REGISTRATION_PAGE_CONTAINER:"#external-registration-page-container",CARTRIDGE_REGISTRATION_CONTAINER:"#cartridge-registration-container",CARTRIDGE_REGISTRATION_FORM:"#cartridge-registration-form",ADD_TOOL_FORM:"#add-tool-form",TOOL_LIST_CONTAINER:"#tool-list-container",TOOL_CREATE_BUTTON:"#tool-create-button",REGISTRATION_CHOICE_CONTAINER:"#registration-choice-container",TOOL_URL:"#tool-url"},k=function(){return a(j.TOOL_CREATE_BUTTON)},l=function(){return a(j.TOOL_LIST_CONTAINER)},m=function(){return a(j.EXTERNAL_REGISTRATION_CONTAINER)},n=function(){return a(j.CARTRIDGE_REGISTRATION_CONTAINER)},o=function(){return a(j.REGISTRATION_CHOICE_CONTAINER)},p=function(){return a(j.TOOL_URL).val()},q=function(){m().addClass("hidden")},r=function(){n().addClass("hidden")},s=function(){o().addClass("hidden")},t=function(){r(),s(),m().removeClass("hidden"),v(m())},u=function(a){q(),s(),n().removeClass("hidden"),n().find(j.CARTRIDGE_REGISTRATION_FORM).attr("data-cartridge-url",a),v(n())},v=function(a){var b=a.children().clone(!0,!0);a.empty(),a.append(b)},w=function(){q(),r(),o().removeClass("hidden"),v(o())},x=function(){l().addClass("hidden")},y=function(){l().removeClass("hidden")},z=function(a){var b=a.error?"error":"success";c.addNotification({message:a.message,type:b})},A=function(a){a.addClass("loading")},B=function(a){a.removeClass("loading")},C=function(){var b=a.Deferred(),e=l();A(e),a.when(g.query(),h.query({orphanedonly:!0})).done(function(a,c){d.render("mod_lti/tool_list",{tools:a,proxies:c}).done(function(a,c){e.empty(),e.append(a),d.runTemplateJS(c),b.resolve()}).fail(b.reject)}).fail(b.reject),b.fail(c.exception).always(function(){B(e)})},D=function(){var b=a.trim(p());if(""===b)return a.Deferred().resolve();var d=k();A(d);var f=g.isCartridge(b);return f.always(function(){B(d)}),f.done(function(c){c.iscartridge?(a(j.TOOL_URL).val(""),a(document).trigger(e.START_CARTRIDGE_REGISTRATION,b)):a(document).trigger(e.START_EXTERNAL_REGISTRATION,{url:b})}),f.fail(function(){i.get_string("errorbadurl","mod_lti").done(function(b){a(document).trigger(e.REGISTRATION_FEEDBACK,{message:b,error:!0})}).fail(c.exception)}),f},E=function(){a(document).on(e.NEW_TOOL_TYPE,function(){C()}),a(document).on(e.START_EXTERNAL_REGISTRATION,function(){t(),a(j.TOOL_URL).val(""),x()}),a(document).on(e.STOP_EXTERNAL_REGISTRATION,function(){y(),w()}),a(document).on(e.START_CARTRIDGE_REGISTRATION,function(a,b){u(b)}),a(document).on(e.STOP_CARTRIDGE_REGISTRATION,function(){n().find(j.CARTRIDGE_REGISTRATION_FORM).removeAttr("data-cartridge-url"),w()}),a(document).on(e.REGISTRATION_FEEDBACK,function(a,b){z(b)});var b=a(j.ADD_TOOL_FORM);b.submit(function(a){a.preventDefault(),D()})};return{init:function(){E(),C()}}});
|
||||
define(["jquery","core/ajax","core/notification","core/templates","mod_lti/events","mod_lti/keys","mod_lti/tool_type","mod_lti/tool_proxy","core/str"],function(a,b,c,d,e,f,g,h,i){var j={EXTERNAL_REGISTRATION_CONTAINER:"#external-registration-container",EXTERNAL_REGISTRATION_PAGE_CONTAINER:"#external-registration-page-container",CARTRIDGE_REGISTRATION_CONTAINER:"#cartridge-registration-container",CARTRIDGE_REGISTRATION_FORM:"#cartridge-registration-form",ADD_TOOL_FORM:"#add-tool-form",TOOL_LIST_CONTAINER:"#tool-list-container",TOOL_CREATE_BUTTON:"#tool-create-button",REGISTRATION_CHOICE_CONTAINER:"#registration-choice-container",TOOL_URL:"#tool-url"},k=function(){return a(j.TOOL_CREATE_BUTTON)},l=function(){return a(j.TOOL_LIST_CONTAINER)},m=function(){return a(j.EXTERNAL_REGISTRATION_CONTAINER)},n=function(){return a(j.CARTRIDGE_REGISTRATION_CONTAINER)},o=function(){return a(j.REGISTRATION_CHOICE_CONTAINER)},p=function(){return a(j.TOOL_URL).val()},q=function(){m().addClass("hidden")},r=function(){n().addClass("hidden")},s=function(){o().addClass("hidden")},t=function(){r(),s(),m().removeClass("hidden"),w(m())},u=function(a){q(),s(),n().removeClass("hidden"),n().find(j.CARTRIDGE_REGISTRATION_FORM).attr("data-cartridge-url",a),w(n())},v=function(){q(),r(),o().removeClass("hidden"),w(o())},w=function(b){var c=b.children().detach();c.appendTo(b),a('[data-toggle="popover"]').popover()},x=function(){l().addClass("hidden")},y=function(){l().removeClass("hidden")},z=function(a){var b=a.error?"error":"success";c.addNotification({message:a.message,type:b})},A=function(a){a.addClass("loading")},B=function(a){a.removeClass("loading")},C=function(){var b=a.Deferred(),e=l();A(e),a.when(g.query(),h.query({orphanedonly:!0})).done(function(a,c){d.render("mod_lti/tool_list",{tools:a,proxies:c}).done(function(a,c){e.empty(),e.append(a),d.runTemplateJS(c),b.resolve()}).fail(b.reject)}).fail(b.reject),b.fail(c.exception).always(function(){B(e)})},D=function(){var b=a.trim(p());if(""===b)return a.Deferred().resolve();var d=k();A(d);var f=g.isCartridge(b);return f.always(function(){B(d)}),f.done(function(c){c.iscartridge?(a(j.TOOL_URL).val(""),a(document).trigger(e.START_CARTRIDGE_REGISTRATION,b)):a(document).trigger(e.START_EXTERNAL_REGISTRATION,{url:b})}),f.fail(function(){i.get_string("errorbadurl","mod_lti").done(function(b){a(document).trigger(e.REGISTRATION_FEEDBACK,{message:b,error:!0})}).fail(c.exception)}),f},E=function(){a(document).on(e.NEW_TOOL_TYPE,function(){C()}),a(document).on(e.START_EXTERNAL_REGISTRATION,function(){t(),a(j.TOOL_URL).val(""),x()}),a(document).on(e.STOP_EXTERNAL_REGISTRATION,function(){y(),v()}),a(document).on(e.START_CARTRIDGE_REGISTRATION,function(a,b){u(b)}),a(document).on(e.STOP_CARTRIDGE_REGISTRATION,function(){n().find(j.CARTRIDGE_REGISTRATION_FORM).removeAttr("data-cartridge-url"),v()}),a(document).on(e.REGISTRATION_FEEDBACK,function(a,b){z(b)});var b=a(j.ADD_TOOL_FORM);b.submit(function(a){a.preventDefault(),D()})};return{init:function(){E(),C()}}});
|
@ -167,21 +167,6 @@ define(['jquery', 'core/ajax', 'core/notification', 'core/templates', 'mod_lti/e
|
||||
screenReaderAnnounce(getCartridgeRegistrationContainer());
|
||||
};
|
||||
|
||||
/**
|
||||
* JAWS does not notice visibility changes with aria-live.
|
||||
* Remove and add the content back to force it to read it out.
|
||||
* This function can be removed once JAWS supports visibility.
|
||||
*
|
||||
* @method screenReaderAnnounce
|
||||
* @param {Object} element
|
||||
* @private
|
||||
*/
|
||||
var screenReaderAnnounce = function(element) {
|
||||
var childClones = element.children().clone(true, true);
|
||||
element.empty();
|
||||
element.append(childClones);
|
||||
};
|
||||
|
||||
/**
|
||||
* Display the registration choices panel and hides the other
|
||||
* panels.
|
||||
@ -196,6 +181,21 @@ define(['jquery', 'core/ajax', 'core/notification', 'core/templates', 'mod_lti/e
|
||||
screenReaderAnnounce(getRegistrationChoiceContainer());
|
||||
};
|
||||
|
||||
/**
|
||||
* JAWS does not notice visibility changes with aria-live.
|
||||
* Remove and add the content back to force it to read it out.
|
||||
* This function can be removed once JAWS supports visibility.
|
||||
*
|
||||
* @method screenReaderAnnounce
|
||||
* @param {Object} element
|
||||
* @private
|
||||
*/
|
||||
var screenReaderAnnounce = function(element) {
|
||||
var children = element.children().detach();
|
||||
children.appendTo(element);
|
||||
$('[data-toggle="popover"]').popover();
|
||||
};
|
||||
|
||||
/**
|
||||
* Hides the list of tool types.
|
||||
*
|
||||
|
@ -30,6 +30,7 @@ use renderable;
|
||||
use templatable;
|
||||
use renderer_base;
|
||||
use stdClass;
|
||||
use help_icon;
|
||||
|
||||
/**
|
||||
* Class containing data for tool_configure page
|
||||
@ -47,13 +48,17 @@ class tool_configure_page implements renderable, templatable {
|
||||
public function export_for_template(renderer_base $output) {
|
||||
$data = new stdClass();
|
||||
|
||||
$keyhelp = new help_icon('resourcekey', 'mod_lti');
|
||||
$secrethelp = new help_icon('password', 'mod_lti');
|
||||
|
||||
$url = new moodle_url('/mod/lti/typessettings.php', array('sesskey' => sesskey(), 'returnto' => 'toolconfigure'));
|
||||
$data->configuremanualurl = $url->out();
|
||||
$url = new moodle_url('/admin/settings.php?section=modsettinglti');
|
||||
$data->managetoolsurl = $url->out();
|
||||
$url = new moodle_url('/mod/lti/toolproxies.php');
|
||||
$data->managetoolproxiesurl = $url->out();
|
||||
|
||||
$data->keyhelp = $keyhelp->export_for_template($output);
|
||||
$data->secrethelp = $secrethelp->export_for_template($output);
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
1
mod/lti/lang/en/deprecated.txt
Normal file
1
mod/lti/lang/en/deprecated.txt
Normal file
@ -0,0 +1 @@
|
||||
leaveblank,mod_lti
|
@ -73,7 +73,7 @@ $string['allow'] = 'Allow';
|
||||
$string['allowinstructorcustom'] = 'Allow teachers to add custom parameters';
|
||||
$string['allowsetting'] = 'Allow tool to store 8K of settings in Moodle';
|
||||
$string['always'] = 'Always';
|
||||
$string['automatic'] = 'Automatic, based on launch URL';
|
||||
$string['automatic'] = 'Automatic, based on tool URL';
|
||||
$string['autoaddtype'] = 'Add tool';
|
||||
$string['baseurl'] = 'Base URL/tool registration name';
|
||||
$string['basiclti'] = 'LTI';
|
||||
@ -154,7 +154,7 @@ It is possible that the tool provider may also display the title. This option ca
|
||||
being displayed twice.
|
||||
|
||||
The title is never displayed when the tool\'s launch container is in a new window.';
|
||||
$string['domain_mismatch'] = 'Launch URL\'s domain does not match tool configuration.';
|
||||
$string['domain_mismatch'] = 'Tool URL\'s domain does not match tool configuration.';
|
||||
$string['donot'] = 'Do not send';
|
||||
$string['donotaccept'] = 'Do not accept';
|
||||
$string['donotallow'] = 'Do not allow';
|
||||
@ -166,6 +166,7 @@ $string['embed_no_blocks'] = 'Embed, without blocks';
|
||||
$string['enableemailnotification'] = 'Send notification emails';
|
||||
$string['enableemailnotification_help'] = 'If enabled, students will receive email notification when their tool submissions are graded.';
|
||||
$string['enterkeyandsecret'] = 'Enter your consumer key and shared secret';
|
||||
$string['enterkeyandsecret_help'] = 'If you were given a consumer key and/or shared secret, input them here';
|
||||
$string['errorbadurl'] = 'URL is not a valid tool URL or cartridge.';
|
||||
$string['errorincorrectconsumerkey'] = 'Consumer key is incorrect.';
|
||||
$string['errorinvaliddata'] = 'Invalid data: {$a}';
|
||||
@ -176,25 +177,15 @@ $string['errortooltypenotfound'] = 'LTI tool type not found.';
|
||||
$string['existing_window'] = 'Existing window';
|
||||
$string['extensions'] = 'LTI extension services';
|
||||
$string['external_tool_type'] = 'Preconfigured tool';
|
||||
$string['external_tool_type_help'] = 'The main purpose of a tool configuration is to set up a secure communication channel between Moodle and the tool provider.
|
||||
It also provides an opportunity for configuration defaults and setting up additional services provided by the tool.
|
||||
|
||||
* **Automatic, based on Launch URL** - This setting should be used in almost all cases. Moodle will select the most appropriate tool configuration
|
||||
based on the Launch URL. Tools configured by both an administrator or within this course will be used.
|
||||
When the Launch URL is specified, Moodle will provide feedback on whether it recognizes it or not. If Moodle does not recognize the Launch URL,
|
||||
you may need to enter the tool configuration details manually.
|
||||
* **A specific preconfigured tool** - By selecting a preconfigured tool, you can force Moodle to use that tool configuration when communicating with the
|
||||
external tool provider. If the Launch URL does not appear to belong to the tool provider, a warning will appear. In some cases, it is not necessary
|
||||
to enter a Launch URL when providing a specific preconfigured tool (if not launching to a particular resource within the tool provider).
|
||||
* **Custom configuration** - To setup custom tool configuration on just this instance, show Advanced options, and enter the consumer key and
|
||||
shared secret yourself. If you do not have a consumer key and shared secret, you may be able to request them from the tool provider.
|
||||
Not all tools require a consumer key and shared secret, in which case the fields may be left blank.
|
||||
$string['external_tool_type_help'] = '* **Automatic, based on tool URL** - The best tool configuration is selected automatically. If the tool URL is not recognised, the tool configuration details may need to be entered manually.
|
||||
* **A specific preconfigured tool** - The tool configuration for the specified tool will be used when communicating with the external tool provider. If the tool URL does not appear to belong to the tool provider, a warning will be shown. It is not always necessary to enter a tool URL.
|
||||
* **Custom configuration** - A consumer key and shared secret may need to be entered manually. The consumer key and shared secret may be obtained from the tool provider. However, not all tools require a consumer key and shared secret, in which case the fields may be left blank.
|
||||
|
||||
### Preconfigured tool editing
|
||||
|
||||
Three icons are available after the preconfigured tool dropdown list:
|
||||
|
||||
* **Add** - Create a course level tool configuration. All External Tool instances in this course may use the tool configuration.
|
||||
* **Add** - Create a course level tool configuration. All External tool instances in this course may use the tool configuration.
|
||||
* **Edit** - Select a course level tool from the dropdown, then click this icon. The details of the tool configuration may be edited.
|
||||
* **Delete** - Remove the selected course level tool.';
|
||||
$string['external_tool_types'] = 'Preconfigured tools';
|
||||
@ -226,13 +217,13 @@ $string['id'] = 'id';
|
||||
$string['invalidid'] = 'LTI ID was incorrect';
|
||||
$string['launch_in_moodle'] = 'Launch tool in moodle';
|
||||
$string['launch_in_popup'] = 'Launch tool in a pop-up';
|
||||
$string['launch_url'] = 'Launch/cartridge URL';
|
||||
$string['launch_url_help'] = 'The Launch URL indicates the web address of the External Tool, and may contain additional information, such as the resource to show.
|
||||
If you are unsure what to enter for the Launch URL, please check with the tool provider for more information.
|
||||
$string['launch_url'] = 'Tool URL';
|
||||
$string['launch_url_help'] = 'The tool URL indicates the web address of the External Tool, and may contain additional information, such as the resource to show.
|
||||
If you are unsure what to enter for the tool URL, please check with the tool provider for more information.
|
||||
|
||||
You can also enter a cartridge URL if you have one, and the rest of the form details will fill automatically.
|
||||
You can enter a cartridge URL if you have one, and the rest of the form details will fill automatically.
|
||||
|
||||
If you have selected a preconfigured tool, you may not need to enter a Launch URL. If the tool link is used to just launch
|
||||
If you have selected a preconfigured tool, you may not need to enter a tool URL. If the tool link is used to just launch
|
||||
into the tool provider\'s system, and not go to a specific resource, this will likely be the case.';
|
||||
$string['launchinpopup'] = 'Launch container';
|
||||
$string['launchinpopup_help'] = 'The launch container affects the display of the tool when launched from the course. Some launch containers provide more screen
|
||||
@ -406,10 +397,10 @@ $string['search:activity'] = 'External tool - activity information';
|
||||
$string['secure_icon_url'] = 'Secure icon URL';
|
||||
$string['secure_icon_url_help'] = 'Similar to the icon URL, but used if the user accessing Moodle securely through SSL. The main purpose for this field is to prevent
|
||||
the browser from warning the user if the underlying page was accessed over SSL, but requesting to show an unsecure image.';
|
||||
$string['secure_launch_url'] = 'Secure launch URL';
|
||||
$string['secure_launch_url_help'] = 'Similar to the launch URL, but used instead of the launch URL if high security is required. Moodle will use the secure launch URL instead of the launch URL if the Moodle site is accessed through SSL, or if the tool configuration is set to always launch through SSL.
|
||||
$string['secure_launch_url'] = 'Secure tool URL';
|
||||
$string['secure_launch_url_help'] = 'Similar to the tool URL, but used instead of the tool URL if high security is required. Moodle will use the secure tool URL instead of the tool URL if the Moodle site is accessed through SSL, or if the tool configuration is set to always launch through SSL.
|
||||
|
||||
The launch URL may also be set to an https address to force launching through SSL, and this field may be left blank.';
|
||||
The tool URL may also be set to an https address to force launching through SSL, and this field may be left blank.';
|
||||
$string['selectcontent'] = 'Select content';
|
||||
$string['send'] = 'Send';
|
||||
$string['services'] = 'Services';
|
||||
@ -442,10 +433,10 @@ $string['share_roster_help'] = 'Specify whether the tool can access the list of
|
||||
Note that this setting may be overridden in the tool configuration.';
|
||||
$string['show_in_course_activity_chooser'] = 'Show in activity chooser and as a preconfigured tool';
|
||||
$string['show_in_course_lti1'] = 'Tool configuration usage';
|
||||
$string['show_in_course_lti1_help'] = 'This tool may be shown in the activity chooser for a teacher to select to add to a course. Alternatively, it may be shown in the preconfigured tool dropdown menu when adding an external tool to a course. A further option is for the tool configuration to only be used if the exact launch URL is entered when adding an external tool to a course.';
|
||||
$string['show_in_course_lti1_help'] = 'This tool may be shown in the activity chooser for a teacher to select to add to a course. Alternatively, it may be shown in the preconfigured tool dropdown menu when adding an external tool to a course. A further option is for the tool configuration to only be used if the exact tool URL is entered when adding an external tool to a course.';
|
||||
$string['show_in_course_lti2'] = 'Tool configuration usage';
|
||||
$string['show_in_course_lti2_help'] = 'This tool can be shown in the activity chooser for a teacher to select to add to a course or in the preconfigured tool dropdown menu when adding an external tool to a course.';
|
||||
$string['show_in_course_no'] = 'Do not show; use only when a matching launch URL is entered';
|
||||
$string['show_in_course_no'] = 'Do not show; use only when a matching tool URL is entered';
|
||||
$string['show_in_course_preconfigured'] = 'Show as preconfigured tool when adding an external tool';
|
||||
$string['size'] = 'Size parameters';
|
||||
$string['submission'] = 'Submission';
|
||||
@ -488,11 +479,11 @@ $string['tooltypeadded'] = 'Preconfigured tool added';
|
||||
$string['tooltypedeleted'] = 'Preconfigured tool deleted';
|
||||
$string['tooltypenotdeleted'] = 'Could not delete preconfigured tool';
|
||||
$string['tooltypeupdated'] = 'Preconfigured tool updated';
|
||||
$string['toolurl'] = 'Tool base URL/cartridge URL';
|
||||
$string['toolurl'] = 'Tool URL';
|
||||
$string['toolurlplaceholder'] = 'Tool URL...';
|
||||
$string['toolurl_help'] = 'The tool base URL is used to match tool launch URLs to the correct tool configuration. Prefixing the URL with http(s) is optional.
|
||||
$string['toolurl_help'] = 'The tool URL is used to match tool URLs to the correct tool configuration. Prefixing the URL with http(s) is optional.
|
||||
|
||||
Additionally, the base URL is used as the launch URL if a launch URL is not specified in the external tool instance.
|
||||
Additionally, the base URL is used as the tool URL if a tool URL is not specified in the external tool instance.
|
||||
|
||||
For example, a base URL of *tool.com* would match the following:
|
||||
|
||||
|
@ -154,7 +154,7 @@ class mod_lti_mod_form extends moodleform_mod {
|
||||
} else {
|
||||
// Disable select content button if the selected tool doesn't support content item or it's set to Automatic.
|
||||
$allnoncontentitemtypes = $noncontentitemtypes;
|
||||
$allnoncontentitemtypes[] = '0'; // Add option value for "Automatic, based on launch URL".
|
||||
$allnoncontentitemtypes[] = '0'; // Add option value for "Automatic, based on tool URL".
|
||||
$mform->disabledIf('selectcontent', 'typeid', 'in', $allnoncontentitemtypes);
|
||||
}
|
||||
|
||||
|
@ -31,16 +31,25 @@
|
||||
* none
|
||||
|
||||
Context variables required for this template:
|
||||
*
|
||||
* none
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
}
|
||||
|
||||
}}
|
||||
<div class="centered-menu">
|
||||
<div class="well">
|
||||
<form id="cartridge-registration-form" class="form-horizontal">
|
||||
<p class="lead text-center">{{#str}} enterkeyandsecret, mod_lti {{/str}}</p>
|
||||
<p class="text-center">{{#str}} leaveblank, mod_lti {{/str}}</p>
|
||||
<p class="text-center">{{#str}} enterkeyandsecret_help, mod_lti {{/str}}</p>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="registration-key">{{#str}} resourcekey_admin, mod_lti {{/str}}</label>
|
||||
<div class="control-label">
|
||||
<label for="registration-key" style="display: inline-block">{{#str}} resourcekey_admin, mod_lti {{/str}}</label>
|
||||
{{#keyhelp}}
|
||||
{{>core/help_icon}}
|
||||
{{/keyhelp}}
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input name="tool-key"
|
||||
class="input-block-level"
|
||||
@ -49,7 +58,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="registration-secret">{{#str}} password_admin, mod_lti {{/str}}</label>
|
||||
<div class ="control-label">
|
||||
<label for="registration-secret" style="display: inline-block">{{#str}} password_admin, mod_lti {{/str}}</label>
|
||||
{{#secrethelp}}
|
||||
{{>core/help_icon}}
|
||||
{{/secrethelp}}
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input name="tool-secret"
|
||||
class="input-block-level"
|
||||
|
@ -21,7 +21,7 @@ Feature: Add tools
|
||||
And I set the following fields to these values:
|
||||
| Tool name | Teaching Tool 1 |
|
||||
| Tool configuration usage | Show in activity chooser and as a preconfigured tool |
|
||||
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
|
||||
|
@ -24,13 +24,13 @@ Feature: Add preconfigured tools via teacher interface
|
||||
| Activity name | Test tool activity 1 |
|
||||
And I open "Test tool activity 1" actions menu
|
||||
And I choose "Edit settings" in the open action menu
|
||||
And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
|
||||
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
|
||||
And I press "Save and return to course"
|
||||
And I open "Test tool activity 1" actions menu
|
||||
And I choose "Edit settings" in the open action menu
|
||||
And I expand all fieldsets
|
||||
Then the field "Launch/cartridge URL" matches value "http://www.example.com/lti/provider.php"
|
||||
And the field "Secure launch URL" matches value "https://www.example.com/lti/provider.php"
|
||||
Then the field "Tool URL" matches value "http://www.example.com/lti/provider.php"
|
||||
And the field "Secure tool URL" matches value "https://www.example.com/lti/provider.php"
|
||||
And the field "Icon URL" matches value "http://download.moodle.org/unittest/test.jpg"
|
||||
And the field "Secure icon URL" matches value "https://download.moodle.org/unittest/test.jpg"
|
||||
|
||||
@ -46,13 +46,13 @@ Feature: Add preconfigured tools via teacher interface
|
||||
And I follow "Add preconfigured tool"
|
||||
And I switch to "add_tool" window
|
||||
And I set the field "Tool name" to "Placeholder"
|
||||
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
|
||||
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml"
|
||||
And I press "Save changes"
|
||||
And I switch to the main window
|
||||
And I wait "2" seconds
|
||||
And I follow "Edit preconfigured tool"
|
||||
And I switch to "edit_tool" window
|
||||
Then the field "Tool base URL/cartridge URL" matches value "http://www.example.com/lti/provider.php"
|
||||
Then the field "Tool URL" matches value "http://www.example.com/lti/provider.php"
|
||||
And the field "Icon URL" matches value "http://download.moodle.org/unittest/test.jpg"
|
||||
And the field "Secure icon URL" matches value "https://download.moodle.org/unittest/test.jpg"
|
||||
And I press "Cancel"
|
||||
@ -67,7 +67,7 @@ Feature: Add preconfigured tools via teacher interface
|
||||
| Activity name | Test tool activity 1 |
|
||||
And I open "Test tool activity 1" actions menu
|
||||
And I choose "Edit settings" in the open action menu
|
||||
And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I press "Save and return to course"
|
||||
And I follow "Test tool activity 1"
|
||||
And I switch to "contentframe" iframe
|
||||
|
@ -19,7 +19,7 @@ Feature: Content-Item support
|
||||
# Create tool type that supports content-item.
|
||||
And I follow "configure a tool manually"
|
||||
And I set the field "Tool name" to "Teaching Tool 1"
|
||||
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
|
||||
And I expand all fieldsets
|
||||
And I set the field "Content-Item Message" to "1"
|
||||
@ -57,7 +57,7 @@ Feature: Content-Item support
|
||||
And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool"
|
||||
And I follow "configure a tool manually"
|
||||
And I set the field "Tool name" to "Teaching Tool 2"
|
||||
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
|
||||
And I expand all fieldsets
|
||||
And I press "Save changes"
|
||||
@ -66,23 +66,23 @@ Feature: Content-Item support
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add a "External tool" to section "1"
|
||||
# On load with no preconfigured tool selected: Select content button - disabled, Launch/cartridge URL - enabled.
|
||||
And the field "Preconfigured tool" matches value "Automatic, based on launch URL"
|
||||
# On load with no preconfigured tool selected: Select content button - disabled, Tool URL - enabled.
|
||||
And the field "Preconfigured tool" matches value "Automatic, based on tool URL"
|
||||
And I set the field "Activity name" to "Test tool activity 1"
|
||||
And the "Select content" "button" should be disabled
|
||||
And the "Launch/cartridge URL" "field" should be enabled
|
||||
# Selecting a tool that supports content-item: Select content button - enabled, Launch/cartridge URL - enabled.
|
||||
And the "Tool URL" "field" should be enabled
|
||||
# Selecting a tool that supports content-item: Select content button - enabled, Tool URL - enabled.
|
||||
And I set the field "Preconfigured tool" to "Teaching Tool 1"
|
||||
And I set the field "Activity name" to "Test tool activity 1"
|
||||
Then the "Select content" "button" should be enabled
|
||||
And the "Launch/cartridge URL" "field" should be enabled
|
||||
# Selecting a tool that does not support content-item: Select content button - disabled, Launch/cartridge URL - disabled.
|
||||
And the "Tool URL" "field" should be enabled
|
||||
# Selecting a tool that does not support content-item: Select content button - disabled, Tool URL - disabled.
|
||||
And I set the field "Preconfigured tool" to "Teaching Tool 2"
|
||||
And I set the field "Activity name" to "Test tool activity 1"
|
||||
And the "Select content" "button" should be disabled
|
||||
And the "Launch/cartridge URL" "field" should be disabled
|
||||
# Not selecting any tool: Select content button - disabled, Launch/cartridge URL - enabled.
|
||||
And I set the field "Preconfigured tool" to "Automatic, based on launch URL"
|
||||
And the "Tool URL" "field" should be disabled
|
||||
# Not selecting any tool: Select content button - disabled, Tool URL - enabled.
|
||||
And I set the field "Preconfigured tool" to "Automatic, based on tool URL"
|
||||
And I set the field "Activity name" to "Test tool activity 1"
|
||||
And the "Select content" "button" should be disabled
|
||||
And the "Launch/cartridge URL" "field" should be enabled
|
||||
And the "Tool URL" "field" should be enabled
|
||||
|
@ -17,7 +17,7 @@ Feature: Content-Item support
|
||||
Scenario: Creating and editing tool configuration that has Content-Item support
|
||||
When I follow "configure a tool manually"
|
||||
And I set the field "Tool name" to "Test tool"
|
||||
And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php"
|
||||
And I set the field "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
|
||||
And I expand all fieldsets
|
||||
And I set the field "Content-Item Message" to "1"
|
||||
|
Loading…
x
Reference in New Issue
Block a user