Skip to content

Commit

Permalink
MDL-54177 enrol_lti: improved lang strings
Browse files Browse the repository at this point in the history
Also removed unused strings.
  • Loading branch information
mdjnelson committed May 16, 2016
1 parent 17fa366 commit 3f3e7da
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 41 deletions.
57 changes: 27 additions & 30 deletions enrol/lti/lang/en/enrol_lti.php
Expand Up @@ -22,51 +22,48 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['allowframembedding'] = 'In order to avoid problems embedding this site, please enable the \'Allow frame embedding\' setting in Admin > Security > HTTP security.';
$string['allowframeembedding'] = 'Note: It is recommended that the site administration setting \'Allow frame embedding\' is enabled, so that tools are displayed within a frame rather than in a new window.';
$string['authltimustbeenabled'] = 'Note: This plugin requires the LTI authentication plugin to be enabled too.';
$string['enrolenddate'] = 'End date';
$string['enrolenddate_help'] = 'If enabled, users can access until this date only.';
$string['enrolenddateerror'] = 'Enrolment end date cannot be earlier than start date';
$string['enrolisdisabled'] = 'The LTI enrolment plugin is disabled.';
$string['enrolisdisabled'] = 'The \'Publish as LTI tool\' plugin is disabled.';
$string['enrolperiod'] = 'Enrolment duration';
$string['enrolperiod_help'] = 'Length of time that the enrolment is valid, starting with the moment the user enrols themselves from the remote system. If disabled, the enrolment duration will be unlimited.';
$string['enrolmentfinished'] = 'Enrolment finished.';
$string['enrolmentnotstarted'] = 'Enrolment has not started.';
$string['enrolstartdate'] = 'Start date';
$string['enrolstartdate_help'] = 'If enabled, users can access from this date onward only.';
$string['framembeddingnotenabled'] = 'The site you are connecting to does not have frame embedding enabled. To access the resource please click on the link below.';
$string['globalsharedsecret'] = 'Global shared secret';
$string['frameembeddingnotenabled'] = 'To access the tool, please follow the link below.';
$string['gradesync'] = 'Grade synchronisation';
$string['gradesync_help'] = 'This determines if we want grade synchronisation to occur.';
$string['maxenrolled'] = 'Maximum enrolled';
$string['maxenrolled_help'] = 'Specifies the maximum number of users that can access from the remote system. The value \'0\' means there is no limit.';
$string['maxenrolledreached'] = 'Maximum number of users allowed to access was already reached.';
$string['membersync'] = 'Member synchronisation';
$string['membersync_help'] = 'This determines if we want member synchronisation to occur.';
$string['membersyncmode'] = 'Members synchronisation mode';
$string['membersyncmode_help'] = 'This setting determines what we should do when synchronising members.';
$string['membersyncmodeenrolandunenrol'] = 'Enrol new and unenrol missing members';
$string['membersyncmodeenrolnew'] = 'Enrol new members';
$string['membersyncmodeunenrolmissing'] = 'Unenrol missing members';
$string['gradesync_help'] = 'Whether grades from the tool are sent to the remote system (LTI consumer).';
$string['maxenrolled'] = 'Maximum enrolled users';
$string['maxenrolled_help'] = 'The maximum number of remote users who can access the tool. If set to zero, the number of enrolled users is unlimited.';
$string['maxenrolledreached'] = 'The maximum number of remote users allowed to access the tool has been reached.';
$string['membersync'] = 'User synchronisation';
$string['membersync_help'] = 'Whether an account is created for each remote user and the user is enrolled in this course.';
$string['membersyncmode'] = 'User synchronisation mode';
$string['membersyncmode_help'] = 'Whether remote users should be enrolled and/or unenrolled from this course.';
$string['membersyncmodeenrolandunenrol'] = 'Enrol new and unenrol missing users';
$string['membersyncmodeenrolnew'] = 'Enrol new users';
$string['membersyncmodeunenrolmissing'] = 'Unenrol missing users';
$string['notoolsprovided'] = 'No tools provided';
$string['lti:config'] = 'Configure LTI enrol instances';
$string['lti:config'] = 'Configure \'Publish as LTI tool\' instances';
$string['lti:unenrol'] = 'Unenrol users from the course';
$string['opentool'] = 'Open tool';
$string['pluginname'] = 'Shared external tool';
$string['pluginname'] = 'Publish as LTI tool';
$string['pluginname_desc'] = 'The \'Publish as LTI tool\' plugin, together with the LTI authentication plugin, allows remote users to access selected courses and activities. In other words, Moodle functions as an LTI tool provider.';
$string['remotesystem'] = 'Remote system';
$string['requirecompletion'] = 'Require the course or activity to be completed before sending the grades';
$string['roleinstructor'] = 'Role for instructor';
$string['roleinstructor_help'] = 'This is the role that will be assigned at the context of the tool specificed to LTI consumer instructor.';
$string['rolelearner'] = 'Role for learner';
$string['rolelearner_help'] = 'This is the role that will be assigned at the context of the tool specificed to the LTI consumer student.';
$string['requirecompletion'] = 'Require course or activity completion prior to grade synchronisation';
$string['roleinstructor'] = 'Role for teacher';
$string['roleinstructor_help'] = 'The role assigned in the tool to the remote teacher.';
$string['rolelearner'] = 'Role for student';
$string['rolelearner_help'] = 'The role assigned in the tool to the remote student.';
$string['secret'] = 'Secret';
$string['secret_help'] = 'This is the secret that is shared with the LTI consumer in order for them to access this tool';
$string['sharedexternaltools'] = 'Shared external tools';
$string['syncsettings'] = 'Synchronisation settings';
$string['tooldoesnotexist'] = 'The requested tool does not exist.';
$string['tasksyncgrades'] = 'Handles syncing grades with the consumer';
$string['tasksyncmembers'] = 'Handles syncing members with the consumer';
$string['toolsprovided'] = 'Tools provided';
$string['tooltobeprovided'] = 'Tool to be provided';
$string['secret_help'] = 'A string of characters which is shared with the remote system (LTI consumer) to provide access to the tool.';
$string['sharedexternaltools'] = 'Published as LTI tools';
$string['tasksyncgrades'] = 'Publish as LTI tool grade sync';
$string['tasksyncmembers'] = 'Publish as LTI tool users sync';
$string['toolsprovided'] = 'Published tools';
$string['tooltobeprovided'] = 'Tool to be published';
$string['userdefaultvalues'] = 'User default values';
2 changes: 1 addition & 1 deletion enrol/lti/settings.php
Expand Up @@ -35,7 +35,7 @@
}

if (empty($CFG->allowframembedding)) {
$notify = new \core\output\notification(get_string('allowframembedding', 'enrol_lti'),
$notify = new \core\output\notification(get_string('allowframeembedding', 'enrol_lti'),
\core\output\notification::NOTIFY_WARNING);
$settings->add(new admin_setting_heading('enrol_lti_enable_embedding', '', $OUTPUT->render($notify)));
}
Expand Down
8 changes: 4 additions & 4 deletions enrol/lti/tests/behat/basic_settings.feature
Expand Up @@ -17,8 +17,8 @@ Feature: Check that settings are adhered to when creating an enrolment plugin
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments"
And I click on "Enable" "link" in the "Shared external tool" "table_row"
And I navigate to "Shared external tool" node in "Site administration > Plugins > Enrolments"
And I click on "Enable" "link" in the "Publish as LTI tool" "table_row"
And I navigate to "Publish as LTI tool" node in "Site administration > Plugins > Enrolments"
And I set the following fields to these values:
| Email display | Allow everyone to see my email address |
| City/town | Perth |
Expand All @@ -32,7 +32,7 @@ Feature: Check that settings are adhered to when creating an enrolment plugin
Given I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Enrolment methods" node in "Course administration > Users"
And I select "Shared external tool" from the "Add method" singleselect
And I select "Publish as LTI tool" from the "Add method" singleselect
When I expand all fieldsets
Then the field "Email display" matches value "Allow everyone to see my email address"
And the field "City/town" matches value "Perth"
Expand All @@ -46,7 +46,7 @@ Feature: Check that settings are adhered to when creating an enrolment plugin
| Timezone | America/Vancouver |
| Institution | Moodle Pty Ltd - remote |
And I press "Add method"
And I click on "Edit" "link" in the "Shared external tool" "table_row"
And I click on "Edit" "link" in the "Publish as LTI tool" "table_row"
And the field "Email display" matches value "Hide my email address from everyone"
And the field "City/town" matches value "Whistler"
And the field "Select a country" matches value "Canada"
Expand Down
10 changes: 5 additions & 5 deletions enrol/lti/tests/behat/index_page.feature
Expand Up @@ -16,7 +16,7 @@ Feature: Check that the page listing the shared external tools is functioning as
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments"
And I click on "Enable" "link" in the "Shared external tool" "table_row"
And I click on "Enable" "link" in the "Publish as LTI tool" "table_row"
And I log out

Scenario: I want to edit an external tool
Expand All @@ -27,12 +27,12 @@ Feature: Check that the page listing the shared external tools is functioning as
| Assignment name | Test assignment name |
| Description | Submit your online text |
And I navigate to "Enrolment methods" node in "Course administration > Users"
And I select "Shared external tool" from the "Add method" singleselect
And I select "Publish as LTI tool" from the "Add method" singleselect
And I set the following fields to these values:
| Custom instance name | Assignment - LTI |
| Tool to be provided | Test assignment name |
| Tool to be published | Test assignment name |
And I press "Add method"
And I navigate to "Shared external tools" node in "Course administration"
And I navigate to "Published as LTI tools" node in "Course administration"
And I should see "Assignment - LTI" in the ".generaltable" "css_element"
When I click on "Disable" "link" in the "Assignment - LTI" "table_row"
Then ".dimmed_text" "css_element" should exist in the "Assignment - LTI" "table_row"
Expand All @@ -41,7 +41,7 @@ Feature: Check that the page listing the shared external tools is functioning as
And I click on "Edit" "link" in the "Assignment - LTI" "table_row"
And I set the following fields to these values:
| Custom instance name | Course - LTI |
| Tool to be provided | Course |
| Tool to be published | Course |
And I press "Save changes"
And I should see "Course - LTI" in the ".generaltable" "css_element"
And I click on "Delete" "link" in the "Course - LTI" "table_row"
Expand Down
2 changes: 1 addition & 1 deletion enrol/lti/tool.php
Expand Up @@ -207,7 +207,7 @@
if (empty($CFG->allowframembedding)) {
// Provide an alternative link.
$stropentool = get_string('opentool', 'enrol_lti');
echo html_writer::tag('p', get_string('framembeddingnotenabled', 'enrol_lti'));
echo html_writer::tag('p', get_string('frameembeddingnotenabled', 'enrol_lti'));
echo html_writer::link($urltogo, $stropentool, array('target' => '_blank'));
} else {
// All done, redirect the user to where they want to go.
Expand Down

0 comments on commit 3f3e7da

Please sign in to comment.