diff --git a/mod/lti/edit_form.php b/mod/lti/edit_form.php
index cf28c1b1dc0..9fa2d86c5c4 100644
--- a/mod/lti/edit_form.php
+++ b/mod/lti/edit_form.php
@@ -61,25 +61,31 @@ class mod_lti_edit_types_form extends moodleform{
$mform->addElement('text', 'lti_typename', get_string('typename', 'lti'));
$mform->setType('lti_typename', PARAM_INT);
-// $mform->addHelpButton('lti_typename', 'typename','lti');
+ $mform->addHelpButton('lti_typename', 'typename','lti');
+
$mform->addRule('lti_typename', null, 'required', null, 'client');
$mform->addElement('text', 'lti_toolurl', get_string('toolurl', 'lti'), array('size'=>'64'));
$mform->setType('lti_toolurl', PARAM_TEXT);
-// $mform->addHelpButton('lti_toolurl', 'toolurl', 'lti');
+ $mform->addHelpButton('lti_toolurl', 'toolurl', 'lti');
+
$mform->addRule('lti_toolurl', null, 'required', null, 'client');
- $mform->addElement('text', 'lti_resourcekey', get_string('resourcekey', 'lti'));
+ $mform->addElement('text', 'lti_resourcekey', get_string('resourcekey_admin', 'lti'));
$mform->setType('lti_resourcekey', PARAM_TEXT);
-
- $mform->addElement('passwordunmask', 'lti_password', get_string('password', 'lti'));
+ $mform->addHelpButton('lti_resourcekey', 'resourcekey_admin', 'lti');
+
+ $mform->addElement('passwordunmask', 'lti_password', get_string('password_admin', 'lti'));
$mform->setType('lti_password', PARAM_TEXT);
-
+ $mform->addHelpButton('lti_password', 'password_admin', 'lti');
+
$mform->addElement('textarea', 'lti_customparameters', get_string('custom', 'lti'), array('rows'=>4, 'cols'=>60));
$mform->setType('lti_customparameters', PARAM_TEXT);
+ $mform->addHelpButton('lti_customparameters', 'custom', 'lti');
if(!empty($this->_customdata->isadmin)){
$mform->addElement('checkbox', 'lti_coursevisible', ' ', ' ' . get_string('show_in_course', 'lti'));
+ $mform->addHelpButton('lti_coursevisible', 'show_in_course', 'lti');
} else {
$mform->addElement('hidden', 'lti_coursevisible', '1');
}
@@ -93,7 +99,7 @@ class mod_lti_edit_types_form extends moodleform{
$mform->addElement('select', 'lti_launchcontainer', get_string('default_launch_container', 'lti'), $launchoptions);
$mform->setDefault('lti_launchcontainer', LTI_LAUNCH_CONTAINER_EMBED_NO_BLOCKS);
-// $mform->addHelpButton('lti_launchinpopup', 'launchinpopup', 'lti');
+ $mform->addHelpButton('lti_launchcontainer', 'default_launch_container', 'lti');
// Add privacy preferences fieldset where users choose whether to send their data
$mform->addElement('header', 'privacy', get_string('privacy', 'lti'));
@@ -103,26 +109,26 @@ class mod_lti_edit_types_form extends moodleform{
$options[1] = get_string('always', 'lti');
$options[2] = get_string('delegate', 'lti');
- $mform->addElement('select', 'lti_sendname', get_string('sendname', 'lti'), $options);
+ $mform->addElement('select', 'lti_sendname', get_string('share_name_admin', 'lti'), $options);
$mform->setDefault('lti_sendname', '2');
-// $mform->addHelpButton('lti_sendname', 'sendname', 'lti');
+ $mform->addHelpButton('lti_sendname', 'share_name_admin', 'lti');
- $mform->addElement('select', 'lti_sendemailaddr', get_string('sendemailaddr', 'lti'), $options);
+ $mform->addElement('select', 'lti_sendemailaddr', get_string('share_email_admin', 'lti'), $options);
$mform->setDefault('lti_sendemailaddr', '2');
-// $mform->addHelpButton('lti_sendemailaddr', 'sendemailaddr', 'lti');
+ $mform->addHelpButton('lti_sendemailaddr', 'share_email_admin', 'lti');
//-------------------------------------------------------------------------------
// LTI Extensions
// Add grading preferences fieldset where the tool is allowed to return grades
- $mform->addElement('select', 'lti_acceptgrades', get_string('acceptgrades', 'lti'), $options);
+ $mform->addElement('select', 'lti_acceptgrades', get_string('accept_grades_admin', 'lti'), $options);
$mform->setDefault('lti_acceptgrades', '2');
-// $mform->addHelpButton('lti_acceptgrades', 'acceptgrades', 'lti');
+ $mform->addHelpButton('lti_acceptgrades', 'accept_grades_admin', 'lti');
// Add grading preferences fieldset where the tool is allowed to retrieve rosters
- $mform->addElement('select', 'lti_allowroster', get_string('allowroster', 'lti'), $options);
+ $mform->addElement('select', 'lti_allowroster', get_string('share_roster_admin', 'lti'), $options);
$mform->setDefault('lti_allowroster', '2');
-// $mform->addHelpButton('lti_allowroster', 'allowroster', 'lti');
+ $mform->addHelpButton('lti_allowroster', 'share_roster_admin', 'lti');
if(!empty($this->_customdata->isadmin)){
diff --git a/mod/lti/lang/en/lti.php b/mod/lti/lang/en/lti.php
index 67950ff15c7..092b2bfaab0 100644
--- a/mod/lti/lang/en/lti.php
+++ b/mod/lti/lang/en/lti.php
@@ -46,14 +46,13 @@
*/
$string['accept'] = 'Accept';
-$string['acceptgrades'] = 'Accept grades from tool';
$string['activity'] = 'Activity';
$string['addnewapp'] = 'Enable External Application';
$string['addserver'] = 'Add new trusted server';
$string['addtype'] = 'Add external tool configuration';
$string['allow'] = 'Allow';
$string['allowinstructorcustom'] = 'Allow instructors to add custom parameters';
-$string['allowroster'] = 'Tool may access course roster';
+$string['share_roster_admin'] = 'Tool may access course roster';
$string['allowsetting'] = 'Allow tool to store 8K of settings in Moodle';
$string['always'] = 'Always';
$string['lti'] = 'Basic LTI';
@@ -128,6 +127,7 @@ $string['organizationid'] ='Organization ID';
$string['organizationurl'] ='Organization URL';
$string['pagesize'] = 'Submissions shown per page';
$string['password'] = 'Shared Secret';
+$string['password_admin'] = 'Shared Secret';
$string['pluginadministration'] = 'Basic LTI administration';
$string['pluginname'] = 'LTI';
$string['preferheight'] = 'Preferred Height';
@@ -140,11 +140,12 @@ $string['quickgrade_help'] = 'If enabled, multiple tools can be graded on one pa
$string['redirect'] = 'You will be redirected in few seconds. If you are not, press the button.';
$string['resource'] = 'Resource';
$string['resourcekey'] = 'Consumer Key';
+$string['resourcekey_admin'] = 'Consumer Key';
$string['resourceurl'] = 'Resource URL';
$string['saveallfeedback'] = 'Save all my feedback';
$string['send'] = 'Send';
-$string['sendemailaddr'] = 'Share launcher\'s email with tool';
-$string['sendname'] = 'Share launcher\'s name with tool';
+$string['share_email_admin'] = 'Share launcher\'s email with tool';
+$string['share_name_admin'] = 'Share launcher\'s name with tool';
$string['setdefault'] = 'Set a default value for the professor if delegating';
$string['setupbox'] = 'Basic LTI Tool Setup Box';
$string['setupoptions'] = 'Setup Options';
@@ -182,6 +183,7 @@ $string['external_tool_types'] = 'External Tool Types';
$string['no_lti_configured'] = 'There are no active External Tools configured.';
$string['no_lti_pending'] = 'There are no pending External Tools.';
$string['no_lti_rejected'] = 'There are no rejected External Tools.';
+$string['accept_grades_admin'] = 'Accept grades from the tool';
//New instructor strings
$string['display_name'] = 'Display activity name when launched';
@@ -206,4 +208,341 @@ $string['course_tool_types'] = 'Course tool types';
$string['using_tool_configuration'] = 'Using tool configuration: ';
$string['domain_mismatch'] = 'Launch URL\'s domain does not match tool configuration.';
$string['custom_config'] = 'Using custom tool configuration.';
-$string['tool_config_not_found'] = 'Tool configuration not found for this URL.';
\ No newline at end of file
+$string['tool_config_not_found'] = 'Tool configuration not found for this URL.';
+
+//Instance help
+
+$string['external_tool_type_help'] = <<
+
+ 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 tool type - By selecting a specific tool type, 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 tool type (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.
+
+
+
+Tool type editing:
+
+Three icons are available after the External tool type dropdown list:
+
+
+ -
+ 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 type from the dropdown, then click this icon. The details of the tool configuration may be edited.
+
+ -
+ Delete - Remove the selected course level tool type.
+
+
+HTML;
+
+$string['launch_url_help'] = <<
+
+ Default - Use the launch container specified by the tool configuration.
+
+
+ Embed - The tool is displayed within the existing Moodle window, in a manner similar to most other Activity types.
+
+
+ Embed, without blocks - The tool is displayed within the existing Moodle window, with just the neavigation controls
+ at the top of the page.
+
+
+ New window - The tool opens in a new window, occupying all the available space.
+ Depending on the browser, it will open in a new tab or a popup window.
+ It is possible that browsers will prevent the new window from opening.
+
+
+HTML;
+
+$string['resourcekey_help'] = <<
+
+
+
+ Base URL
+ |
+
+ Matches
+ |
+
+
+
+
+
+ tool.com
+ |
+
+ tool.com, tool.com/quizzes, tool.com/quizzes/quiz.php?id=10, www.tool.com/quizzes
+ |
+
+
+
+ www.tool.com/quizzes
+ |
+
+ tool.com/quizzes, tool.com/quizzes/take.php?id=10, www.tool.com/quizzes
+ |
+
+
+
+ quiz.tool.com
+ |
+
+ quiz.tool.com, quiz.tool.com/take.php?id=10
+ |
+
+
+
+
+If two different tool configurations are for the same domain, the most specific match will be used.
+HTML;
+
+$string['resourcekey_admin_help'] = <<
+
+ Default - Use the launch container specified by the tool configuration.
+
+
+ Embed - The tool is displayed within the existing Moodle window, in a manner similar to most other Activity types.
+
+
+ Embed, without blocks - The tool is displayed within the existing Moodle window, with just the neavigation controls
+ at the top of the page.
+
+
+ New window - The tool opens in a new window, occupying all the available space.
+ Depending on the browser, it will open in a new tab or a popup window.
+ It is possible that browsers will prevent the new window from opening.
+
+
+HTML;
+
+$string['share_name_admin_help'] = <<
+
+ Active - These tool providers have been approved and configured by an administrator. They can be used from within any
+ course on this Moodle instance. If a consumer key and shared secret are entered, a trust relationship is established
+ between this Moodle instance and the remote tool, providing a secure communication channel.
+
+
+ Pending - These tool providers came in through a package import, but have not been configured by an administrator.
+ Instructors may still use tools from these providers if they have a consumer key and shared secret, or if none is required.
+
+
+ Rejected - These tools providers are flagged as ones which an administrator has no intention of making available to the entire
+ Moodle instance. Instructors may still use tools from these providers if they have a consumer key and shared secret, or if none is required.
+
+
+HTML;
+
+$string['modulename_help'] = <<
+
+ Context aware - External tools have access to information about the user who launched the tool, such as
+ insitution, course, name, and other information.
+
+
+ Deep integration - External tools support reading, updating, and deleting grades associated with the activity instance. More integration points
+ are planned for future releases.
+
+
+ Security - External tool configurations create a trust relationship between Moodle and the tool provider, allowing secure communication
+ between them.
+
+
+HTML;
diff --git a/mod/lti/mod_form.php b/mod/lti/mod_form.php
index 7f2a0edf867..96ac935bb06 100644
--- a/mod/lti/mod_form.php
+++ b/mod/lti/mod_form.php
@@ -71,12 +71,15 @@ class mod_lti_mod_form extends moodleform_mod {
$mform->addElement('checkbox', 'showtitle', ' ', ' ' . get_string('display_name', 'lti'));
$mform->setAdvanced('showtitle');
+ $mform->addHelpButton('showtitle', 'display_name', 'lti');
$mform->addElement('checkbox', 'showdescription', ' ', ' ' . get_string('display_description', 'lti'));
$mform->setAdvanced('showdescription');
+ $mform->addHelpButton('showdescription', 'display_description', 'lti');
//Tool settings
$tooltypes = $mform->addElement('select', 'typeid', get_string('external_tool_type', 'lti'), array());
+ $mform->addHelpButton('typeid', 'external_tool_type', 'lti');
foreach(lti_get_types_for_add_instance() as $id => $type){
if($type->course == $COURSE->id) {
@@ -92,6 +95,7 @@ class mod_lti_mod_form extends moodleform_mod {
$mform->addElement('text', 'toolurl', get_string('launch_url', 'lti'), array('size'=>'64'));
$mform->setType('toolurl', PARAM_TEXT);
+ $mform->addHelpButton('toolurl', 'launch_url', 'lti');
$launchoptions=array();
$launchoptions[LTI_LAUNCH_CONTAINER_DEFAULT] = get_string('default', 'lti');
@@ -101,40 +105,43 @@ class mod_lti_mod_form extends moodleform_mod {
$mform->addElement('select', 'launchcontainer', get_string('launchinpopup', 'lti'), $launchoptions);
$mform->setDefault('launchcontainer', LTI_LAUNCH_CONTAINER_DEFAULT);
+ $mform->addHelpButton('launchcontainer', 'launchinpopup', 'lti');
$mform->addElement('text', 'resourcekey', get_string('resourcekey', 'lti'));
$mform->setType('resourcekey', PARAM_TEXT);
$mform->setAdvanced('resourcekey');
-
+ $mform->addHelpButton('resourcekey', 'resourcekey', 'lti');
+
$mform->addElement('passwordunmask', 'password', get_string('password', 'lti'));
$mform->setType('password', PARAM_TEXT);
$mform->setAdvanced('password');
+ $mform->addHelpButton('password', 'password', 'lti');
$mform->addElement('textarea', 'instructorcustomparameters', get_string('custom', 'lti'), array('rows'=>4, 'cols'=>60));
$mform->setType('instructorcustomparameters', PARAM_TEXT);
$mform->setAdvanced('instructorcustomparameters');
+ $mform->addHelpButton('instructorcustomparameters', 'custom', 'lti');
-//-------------------------------------------------------------------------------
- //$mform->addElement('hidden', 'typeid', $this->typeid);
- //$mform->addElement('hidden', 'toolurl', $this->typeconfig['toolurl']);
- //$mform->addElement('hidden', 'type', $typename);
-
//-------------------------------------------------------------------------------
// Add privacy preferences fieldset where users choose whether to send their data
$mform->addElement('header', 'privacy', get_string('privacy', 'lti'));
$mform->addElement('checkbox', 'instructorchoicesendname', ' ', ' ' . get_string('share_name', 'lti'));
$mform->setDefault('instructorchoicesendname', '1');
+ $mform->addHelpButton('instructorchoicesendname', 'share_name', 'lti');
$mform->addElement('checkbox', 'instructorchoicesendemailaddr', ' ', ' ' . get_string('share_email', 'lti'));
$mform->setDefault('instructorchoicesendemailaddr', '1');
+ $mform->addHelpButton('instructorchoicesendemailaddr', 'share_email', 'lti');
$mform->addElement('checkbox', 'instructorchoiceacceptgrades', ' ', ' ' . get_string('accept_grades', 'lti'));
$mform->setDefault('instructorchoiceacceptgrades', '1');
+ $mform->addHelpButton('instructorchoiceacceptgrades', 'accept_grades', 'lti');
$mform->addElement('checkbox', 'instructorchoiceallowroster', ' ', ' ' . get_string('share_roster', 'lti'));
$mform->setDefault('instructorchoiceallowroster', '1');
-
+ $mform->addHelpButton('instructorchoiceallowroster', 'share_roster', 'lti');
+
//-------------------------------------------------------------------------------
/* $debugoptions=array();
diff --git a/mod/lti/settings.php b/mod/lti/settings.php
index 81940c369d6..c0c739535d9 100644
--- a/mod/lti/settings.php
+++ b/mod/lti/settings.php
@@ -183,5 +183,5 @@ HTML;
$PAGE->requires->yui2_lib('tabview');
$PAGE->requires->yui2_lib('datatable');
- $settings->add(new admin_setting_heading('lti_types', get_string('external_tool_types', 'lti'), $template));
+ $settings->add(new admin_setting_heading('lti_types', get_string('external_tool_types', 'lti') . $OUTPUT->help_icon('main_admin', 'lti'), $template));
}
diff --git a/mod/lti/styles.css b/mod/lti/styles.css
index 5f74f7e770a..4485ae0db95 100644
--- a/mod/lti/styles.css
+++ b/mod/lti/styles.css
@@ -29,4 +29,4 @@
#page-mod-lti-submissions .qgprefs #optiontable {text-align:right;margin-left:auto;}
/* Styles for admin */
-.path-admin-mod-lti .mform .fitem .fitemtitle { min-width:15em;padding-right:1em } /* Prevent setting titles from wrapping */
+.path-admin-mod-lti .mform .fitem .fitemtitle { min-width:18em;padding-right:1em } /* Prevent setting titles from wrapping */