mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
help strings MDL-21695 changed _hlp to _help and fixed help.php to format those strings properly
This commit is contained in:
parent
0f4ab67d84
commit
5435c9dcc4
@ -114,7 +114,7 @@
|
||||
} else if ($action == 'edit') {
|
||||
$title = get_string('editingrolex', 'role', $rolenames[$roleid]->localname);
|
||||
}
|
||||
echo $OUTPUT->heading_with_help($title, 'roles');
|
||||
echo $OUTPUT->heading_with_help($title, 'roles', 'role');
|
||||
|
||||
/// Work out some button labels.
|
||||
if ($action == 'add' || $action == 'duplicate') {
|
||||
|
@ -587,7 +587,7 @@ if ($mform->is_cancelled()) {
|
||||
require($CFG->dirroot.'/'.$CFG->admin.'/roles/tabs.php');
|
||||
}
|
||||
|
||||
if (get_string_manager()->string_exists('modulename_hlp', $module->name)) {
|
||||
if (get_string_manager()->string_exists('modulename_help', $module->name)) {
|
||||
echo $OUTPUT->heading_with_help($pageheading, 'modulename', $module->name, 'icon');
|
||||
} else {
|
||||
echo $OUTPUT->heading_with_help($pageheading, '', '', 'icon');
|
||||
@ -596,4 +596,4 @@ if ($mform->is_cancelled()) {
|
||||
$mform->display();
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
}
|
||||
}
|
||||
|
27
help.php
27
help.php
@ -28,10 +28,9 @@ $SESSION->lang = $lang; // does not actually modify session because we do not us
|
||||
|
||||
$sm = get_string_manager();
|
||||
|
||||
//TODO: this is a minimalistic help page, needs a lot more love
|
||||
|
||||
$PAGE->set_url('/help.php');
|
||||
$PAGE->set_pagelayout('popup'); // not really a popup because this page gets dispalyed directly only when JS disabled
|
||||
$PAGE->set_pagelayout('popup');
|
||||
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
|
||||
|
||||
if ($ajax) {
|
||||
@header('Content-Type: text/plain; charset=utf-8');
|
||||
@ -39,10 +38,26 @@ if ($ajax) {
|
||||
echo $OUTPUT->header();
|
||||
}
|
||||
|
||||
if ($sm->string_exists($identifier.'_hlp', $component)) {
|
||||
echo get_string($identifier.'_hlp', $component);
|
||||
if ($sm->string_exists($identifier.'_help', $component)) {
|
||||
$options = new object;
|
||||
$options->trusted = false;
|
||||
$options->noclean = false;
|
||||
$options->smiley = false;
|
||||
$options->filter = false;
|
||||
$options->para = true;
|
||||
$options->newlines = false;
|
||||
|
||||
// Should be simple wiki only MDL-21695
|
||||
echo format_text(get_string($identifier.'_help', $component), FORMAT_MOODLE, $options);
|
||||
|
||||
if ($sm->string_exists($identifier.'_link', $component)) { // Link to further info in Moodle docs
|
||||
$link = get_string($identifier.'_link', $component);
|
||||
$linktext = get_string('morehelp');
|
||||
echo '<div class="helpdoclink">'.$OUTPUT->doc_link($link, $linktext).'</div>';
|
||||
}
|
||||
|
||||
} else {
|
||||
echo "<p><strong>TODO</strong>: fix help for [{$identifier}_hlp, $component]</p>";
|
||||
echo "<p><strong>TODO</strong>: fix help for [{$identifier}_help, $component]</p>";
|
||||
}
|
||||
|
||||
if (!$ajax) {
|
||||
|
@ -29,7 +29,7 @@ $string['actions'] = 'Actions';
|
||||
$string['active'] = 'Active';
|
||||
$string['activeusers'] = 'Active users';
|
||||
$string['activities'] = 'Activities';
|
||||
$string['activities_hlp'] = 'Moodle contains a wide range of activity modules that can be used to build up any type of course.';
|
||||
$string['activities_help'] = 'Moodle contains a wide range of activity modules that can be used to build up any type of course.';
|
||||
$string['activity'] = 'Activity';
|
||||
$string['activityclipboard'] = 'Moving this activity: <b>{$a}</b>';
|
||||
$string['activityiscurrentlyhidden'] = 'Sorry, this activity is currently hidden';
|
||||
@ -736,7 +736,7 @@ $string['frontpagetopiconly'] = 'Topic section';
|
||||
$string['fulllistofcourses'] = 'All courses';
|
||||
$string['fullname'] = 'Full name';
|
||||
$string['fullnamecourse'] = 'Course full name';
|
||||
$string['fullnamecourse_hlp'] = 'The full name of the course is displayed at the top of the screen and in the course listings.';
|
||||
$string['fullnamecourse_help'] = 'The full name of the course is displayed at the top of the screen and in the course listings.';
|
||||
$string['fullnamedisplay'] = '{$a->firstname} {$a->lastname}';
|
||||
$string['fullnameuser'] = 'User full name';
|
||||
$string['fullprofile'] = 'Full profile';
|
||||
@ -1076,6 +1076,7 @@ $string['moodledocs'] = 'Moodle Docs';
|
||||
$string['moodledocslink'] = 'Moodle Docs for this page';
|
||||
$string['moodleversion'] = 'Moodle Version';
|
||||
$string['more'] = 'more';
|
||||
$string['morehelp'] = 'More help';
|
||||
$string['moreinformation'] = 'More information about this error';
|
||||
$string['moreprofileinfoneeded'] = 'Please tell us more about yourself';
|
||||
$string['mostrecently'] = 'most recently';
|
||||
@ -1398,7 +1399,7 @@ $string['resettodefaults'] = 'Reset to defaults';
|
||||
$string['resortcoursesbyname'] = 'Re-sort courses by name';
|
||||
$string['resource'] = 'Resource';
|
||||
$string['resources'] = 'Resources';
|
||||
$string['resources_hlp'] = 'Resources are reading materials.';
|
||||
$string['resources_help'] = 'Resources are reading materials.';
|
||||
$string['restore'] = 'Restore';
|
||||
$string['restorecancelled'] = 'Restore cancelled';
|
||||
$string['restorecannotassignroles'] = 'Restore needs to assign roles and you do not have permission to do so';
|
||||
|
@ -269,6 +269,8 @@ $string['role:review'] = 'Review permissions for others';
|
||||
$string['roleprohibitheader'] = 'Prohibit role';
|
||||
$string['roleprohibitinfo'] = 'Select a role to be added to the list of prohibited roles in context {$a->context}, capability {$a->cap}:';
|
||||
$string['roles'] = 'Roles';
|
||||
$string['roles_help'] = 'A role is a collection of permissions defined for the whole system that you can assign to specific users in specific contexts.';
|
||||
$string['roles_link'] = 'roles';
|
||||
$string['role:safeoverride'] = 'Override safe permissions for others';
|
||||
$string['roleselect'] = 'Select role';
|
||||
$string['role:switchroles'] = 'Switch to other roles';
|
||||
|
@ -1364,7 +1364,7 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless {
|
||||
*
|
||||
* There has to be two strings defined:
|
||||
* 1/ get_string($identifier, $component) - the title of the help page
|
||||
* 2/ get_string($identifier.'_hlp', $component) - the actual help page text
|
||||
* 2/ get_string($identifier.'_help', $component) - the actual help page text
|
||||
*
|
||||
* @param string $elementname name of the element to add the item to
|
||||
* @param string $identifier
|
||||
|
@ -200,8 +200,8 @@ class old_help_icon implements renderable {
|
||||
*/
|
||||
class help_icon implements renderable {
|
||||
/**
|
||||
* @var string $identifier lang pack identifier (without the "_hlp" suffix),
|
||||
* both get_string($identifier, $component) and get_string($identifier.'_hlp', $component)
|
||||
* @var string $identifier lang pack identifier (without the "_help" suffix),
|
||||
* both get_string($identifier, $component) and get_string($identifier.'_help', $component)
|
||||
* must exist.
|
||||
*/
|
||||
public $identifier;
|
||||
@ -217,7 +217,8 @@ class help_icon implements renderable {
|
||||
/**
|
||||
* Constructor
|
||||
* @param string $identifier string for help page title,
|
||||
* string with _hlp suffix is used for the actual help text.
|
||||
* string with _help suffix is used for the actual help text.
|
||||
* string with _link suffix is used to create a link to further info (if it exists)
|
||||
* @param string $component
|
||||
*/
|
||||
public function __construct($identifier, $component) {
|
||||
@ -233,8 +234,8 @@ class help_icon implements renderable {
|
||||
if (!$sm->string_exists($this->identifier, $this->component)) {
|
||||
debugging("Help title string does not exist: [$this->identifier, $this->component]");
|
||||
}
|
||||
if (!$sm->string_exists($this->identifier.'_hlp', $this->component)) {
|
||||
debugging("Help title string does not exist: [{$this->identifier}_hlp, $this->component]");
|
||||
if (!$sm->string_exists($this->identifier.'_help', $this->component)) {
|
||||
debugging("Help title string does not exist: [{$this->identifier}_help, $this->component]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ $string['anonymous_entries'] = 'Anonymous entries';
|
||||
$string['anonymous_user'] = 'Anonymous user';
|
||||
$string['append_new_items'] = 'Append new items';
|
||||
$string['autonumbering'] = 'automated numbers';
|
||||
$string['autonumbering_hlp'] = 'enables or disables automated numbers for each question';
|
||||
$string['autonumbering_help'] = 'enables or disables automated numbers for each question';
|
||||
$string['average'] = 'Average';
|
||||
$string['bold'] = 'Bold';
|
||||
$string['cancel_moving'] = 'Cancel moving';
|
||||
@ -72,7 +72,7 @@ $string['edit_item'] = 'Edit question';
|
||||
$string['edit_items'] = 'Edit questions';
|
||||
$string['email_notification'] = 'Send e-mail notifications';
|
||||
$string['emailnotification'] = 'emailnotifications';
|
||||
$string['emailnotification_hlp'] = 'On the submission of a Feedback response, Administrators will receive email notification';
|
||||
$string['emailnotification_help'] = 'On the submission of a Feedback response, Administrators will receive email notification';
|
||||
$string['emailteachermail'] = '{$a->username} has completed feedback activity : \'{$a->feedback}\'
|
||||
|
||||
You can view it here:
|
||||
@ -126,14 +126,14 @@ $string['mapcourse'] = 'Map course';
|
||||
$string['mapcourseinfo'] = 'This is a sitewide feedback that is available to all courses using the feedback block. You can however limit the courses to which it will appear by mapping them. Search the course and map it to this feedback.';
|
||||
$string['mapcoursenone'] = 'No courses mapped. Feedback available to all courses';
|
||||
$string['mapcourse'] = 'Map feedback to courses';
|
||||
$string['mapcourse_hlp'] = 'By default Feedback forms created on your Moodle main page are available site wide
|
||||
$string['mapcourse_help'] = 'By default Feedback forms created on your Moodle main page are available site wide
|
||||
and will appear in all courses using the Feedback block. You can also force the Feedback
|
||||
to appear by making it a Sticky Block.<br />
|
||||
You can however limit the courses in which a Feedback form will appear by Mapping it
|
||||
to specific courses.
|
||||
';
|
||||
$string['mapcourses'] = 'Map feedback to courses';
|
||||
$string['mapcourses_hlp'] = 'Once you have selected the relevant Course(s) and/or Programme(s) from your Search,
|
||||
$string['mapcourses_help'] = 'Once you have selected the relevant Course(s) and/or Programme(s) from your Search,
|
||||
you can associate them with this Feedback using Map Course(s). You can Ctrl select
|
||||
multiple Courses or Shift select a series of Courses.<br />
|
||||
You can disassociated a Course or Programme from a Feedback at any time.';
|
||||
@ -153,7 +153,7 @@ $string['multichoicetype'] = 'Multiple choice type';
|
||||
$string['multichoice_values'] = 'Multiple choice values';
|
||||
$string['multiple_submit'] = 'Multiple submit';
|
||||
$string['multiplesubmit'] = 'Multiple submit';
|
||||
$string['multiplesubmit_hlp'] = 'For Anonymous polls Multiple Submit will allow unlimited answers for every user. Where a User\'s name is collected, Multiple Submit will allow them allow to resubmit their Feedback answers.';
|
||||
$string['multiplesubmit_help'] = 'For Anonymous polls Multiple Submit will allow unlimited answers for every user. Where a User\'s name is collected, Multiple Submit will allow them allow to resubmit their Feedback answers.';
|
||||
$string['name'] = 'Name';
|
||||
$string['name_required'] = 'Name required';
|
||||
$string['next_page'] = 'Next page';
|
||||
@ -183,7 +183,7 @@ $string['picture_file_list'] = 'List of pictures';
|
||||
$string['picture_values'] = 'Choose one or more<br />picture files from the list:';
|
||||
$string['position'] = 'Position';
|
||||
$string['preview'] = 'Preview';
|
||||
$string['preview_hlp'] = 'In the preview you can change the position order of questions.';
|
||||
$string['preview_help'] = 'In the preview you can change the position order of questions.';
|
||||
$string['previous_page'] = 'Previous page';
|
||||
$string['public'] = 'Public';
|
||||
$string['question'] = 'Question';
|
||||
@ -208,7 +208,7 @@ $string['saving_failed'] = 'Saving failed';
|
||||
$string['saving_failed_because_missing_or_false_values'] = 'Saving failed because missing or false values';
|
||||
$string['search_course'] = 'Search course';
|
||||
$string['searchcourses'] = 'Search courses';
|
||||
$string['searchcourses_hlp'] = 'Search for the Code or Name of the Course(s) that you wish to associate with this Feedback.';
|
||||
$string['searchcourses_help'] = 'Search for the Code or Name of the Course(s) that you wish to associate with this Feedback.';
|
||||
$string['selected_dump'] = 'Selected indexes of $SESSION variable are dumped below:';
|
||||
$string['separator_decimal'] = '.';
|
||||
$string['separator_thousand'] = ',';
|
||||
@ -234,17 +234,17 @@ $string['textfield_maxlength'] = 'Maximum characters accepted';
|
||||
$string['textfield_size'] = 'Textfield width';
|
||||
$string['this_feedback_is_already_submitted'] = 'You\'ve already completed this activity.';
|
||||
$string['timeclose'] = 'time to close';
|
||||
$string['timeclose_hlp'] = 'You can specify times when the feedback is accessible for people to answer the questions.<br />
|
||||
$string['timeclose_help'] = 'You can specify times when the feedback is accessible for people to answer the questions.<br />
|
||||
At a time after this time here defined, the feedback will be unavailable.<br />
|
||||
If the checkbox is not selected so there is no limit defined.';
|
||||
$string['timeopen'] = 'time to open';
|
||||
$string['timeopen_hlp'] = 'You can specify times when the feedback is accessible for people to answer the questions.<br />
|
||||
$string['timeopen_help'] = 'You can specify times when the feedback is accessible for people to answer the questions.<br />
|
||||
At a time before this time here defined, the feedback will be unavailable.<br />
|
||||
If the checkbox is not selected so there is no limit defined.';
|
||||
$string['typemissing'] = 'missing value "type"';
|
||||
$string['update_item'] = 'Save changes to question';
|
||||
$string['url_for_continue'] = 'URL for continue-button';
|
||||
$string['url_for_continue_hlp'] = 'By default after a feedback is submitted the target of the
|
||||
$string['url_for_continue_help'] = 'By default after a feedback is submitted the target of the
|
||||
continue button is the course page.<br />
|
||||
You can define here another target url for this continue-button.';
|
||||
$string['url_for_continue_button'] = 'URL for continue-button';
|
||||
@ -253,5 +253,5 @@ $string['use_this_template'] = 'Use this template';
|
||||
$string['using_templates'] = 'Use a template';
|
||||
$string['vertical'] = 'vertical';
|
||||
$string['viewcompleted'] = 'completed feedbacks';
|
||||
$string['viewcompleted_hlp'] = 'You may view completed Feedback forms, searchable by Course and/or by Question.
|
||||
$string['viewcompleted_help'] = 'You may view completed Feedback forms, searchable by Course and/or by Question.
|
||||
Feedback responses may be exported to Excel.';
|
||||
|
@ -35,7 +35,7 @@ $string['legacyfiles'] = 'Migration of old course file';
|
||||
$string['legacyfilesactive'] = 'Active';
|
||||
$string['legacyfilesdone'] = 'Finished';
|
||||
$string['modulename'] = 'Page';
|
||||
$string['modulename_hlp'] = 'Page module allows teachers to edit a page directly in a course.';
|
||||
$string['modulename_help'] = 'Page module allows teachers to edit a page directly in a course.';
|
||||
$string['modulenameplural'] = 'Pages';
|
||||
$string['optionsheader'] = 'Options';
|
||||
$string['pageadministration'] = 'Page administration';
|
||||
|
Loading…
x
Reference in New Issue
Block a user