Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Help strings: Difference between revisions

From MoodleDocs
m (Page content moved)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Infobox Project
#REDIRECT [[String API#Help strings]]
|name = 2.0 help strings
|state = Fixed
|tracker = MDL-21695
|discussion = [http://moodle.org/mod/forum/discuss.php?d=149220 Help file integration in php lang files]
|assignee = [[User:Helen Foster|Helen Foster]]
}}
{{Moodle 2.0}}In Moodle 2.0, help files will be converted to strings. All essential help will remain available in Moodle via help popups, with supplementary help available in Moodle Docs. Many help popups remain the same in 2.0 as in 1.9, with only extra long help popups (often from the time before Moodle Docs) greatly reduced.
 
==String names==
 
[[Image:Roles help popup.png|thumb|Help popup containing "More help" link]] Help strings names will start with the string name of the setting to which they apply, so that they are kept together in the language file.
 
* ''stringname''
* ''stringname_help''
* ''stringname_link'' - an optional string naming a path in Moodle Docs, only if required, calculated just like the link in the footer to go to the right language etc, and shown after the help text in the popup as a link with an icon to "More help..."
* ''stringname_desc''  - an admin setting description replacing the legacy ''configstringname''
 
For example:
 
$string['submissionsize'] = 'Submission size';
$string['submissionsize_help'] = 'Blah blah blah some useful text, optionally using Markdown syntax';
$string['submissionsize_link'] = 'mod/workshop/submission';
$string['submissionsize_desc'] = 'Default value for submission size. This value will be pre-filled and can be blah blah ...';
 
Note: The ''stringname_link'' strings don't need to be in the translator interface.
 
==Help string formatting==
 
Help string text should be short and simple - two small paragraphs maximum (150 words?) with no headings, no links, no bold, no tables etc.
 
[[:en:Markdown|Markdown]] can be used for some formatting. It is recommended to stick on paragraphs and lists only.
 
* paragraph: new line
* bullet point: *
 
The help popup will have the same title as the setting it applies to.
 
For example:
 
$string['newsitemsnumber'] = 'News items to show';
$string['newsitemsnumber_help'] = 'This setting determines how many recent items appear in the latest news block on the course page. If set to "0 news items" then the latest news block will not be displayed.';
 
will result in a help popup as follows:
 
[[Image:Help popup.png]]
 
==Words for roles==
 
The following words should be used in the en help strings whenever it is necessary to refer to people with particular roles in a generic sense.
 
* Participants - all people with a role
* Teachers - people with some sort of a facilitation/editing role
* Students - people primarily there to learn
* Users - people across the site
 
([[User:Martin Dougiamas|Martin Dougiamas]] 16:13, 20 April 2010 (UTC): I'm not entirely comfortable with this choice even though I just re-confirmed it, as I'd prefer to be using words like facilitator/moderator to subtly and continually promote a less transmissionist pedgagogy and I know many Moodle users would agree.  However, I think these terms are far more commonly used in the community and in discussion, and from the point of view that we need to build a consistent system for usability they are less distracting and better for documentation.)
 
[[Category:Language]]

Latest revision as of 15:02, 6 September 2017