Skip to content

Commit

Permalink
MDL-80725 lang: Fix Help and documentation regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
mudrd8mz committed Feb 1, 2024
1 parent d8ca8be commit dfc47df
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Expand Up @@ -22,12 +22,12 @@ Feature: Within a moodle instance, an administrator should be able to modify lan
Scenario: Edit an string but don't save it to lang pack.
When I press "Apply changes and continue editing"
Then I should not see "moodle documents" in the "page-footer" "region"
And I should see "Help and documentation" in the "page-footer" "region"
And I should see "Documentation for this page" in the "page-footer" "region"

@javascript
Scenario: Customize an string as admin and save it to lang pack.
Given I press "Save changes to the language pack"
And I should see "There are 1 modified strings."
When I click on "Continue" "button"
Then I should not see "Help and documentation" in the "page-footer" "region"
Then I should not see "Documentation for this page" in the "page-footer" "region"
And I should see "moodle documents" in the "page-footer" "region"
2 changes: 1 addition & 1 deletion lang/en/admin.php
Expand Up @@ -242,7 +242,7 @@
$string['configdisplayloginfailures'] = 'This will display information to users about previous failed logins.';
$string['configdndallowtextandlinks'] = 'Enable or disable the dragging and dropping of text and links onto a course page, alongside the dragging and dropping of files. Note that the dragging of text into Firefox or between different browsers is unreliable and may result in no data being uploaded, or corrupted text being uploaded.';
$string['configdoclang'] = 'This language will be used in links for the documentation pages.';
$string['configdocroot'] = 'Defines the path to Moodle Docs for providing context-specific documentation via \'Help and documentation\' links in the footer of each page. If the field is left blank, links will not be displayed.';
$string['configdocroot'] = 'Defines the path to Moodle Docs for providing context-specific documentation via \'Documentation for this page\' links in the footer of each page. If the field is left blank, links will not be displayed.';
$string['configdoctonewwindow'] = 'If enabled, then links to Moodle Docs will be shown in a new window.';
$string['configduration_low'] = 'This value is too low. The minimum value is {$a}.';
$string['configduration_high'] = 'This value is too high. The maximum value is {$a}.';
Expand Down
8 changes: 4 additions & 4 deletions lib/pagelib.php
Expand Up @@ -78,7 +78,7 @@
* course table. (Also available as $COURSE global.) If we are not inside
* an actual course, this will be the site course.
* @property-read string $devicetypeinuse The name of the device type in use
* @property-read string $docspath The path to the Help and documentation.
* @property-read string $docspath The path to the Documentation for this page.
* @property-read string $focuscontrol The id of the HTML element to be focused when the page has loaded.
* @property-read bool $headerprinted True if the page header has already been printed.
* @property-read string $heading The main heading that should be displayed at the top of the <body>.
Expand Down Expand Up @@ -214,7 +214,7 @@ class moodle_page {
protected $_subpage = '';

/**
* @var string Set a different path to use for the 'Help and documentation' link.
* @var string Set a different path to use for the 'Documentation for this page' link.
* By default, it uses the path of the file for instance mod/quiz/attempt.
*/
protected $_docspath = null;
Expand Down Expand Up @@ -658,7 +658,7 @@ protected function magic_get_headingmenu() {

/**
* Please do not call this method directly, use the ->docspath syntax. {@link moodle_page::__get()}.
* @return string the path to the Help and documentation.
* @return string the path to the Documentation for this page.
*/
protected function magic_get_docspath() {
if (is_string($this->_docspath)) {
Expand Down Expand Up @@ -1462,7 +1462,7 @@ public function set_category_by_id($categoryid) {
}

/**
* Set a different path to use for the 'Help and documentation' link.
* Set a different path to use for the 'Documentation for this page' link.
*
* By default, it uses the pagetype, which is normally the same as the
* script name. So, for example, for mod/quiz/attempt.php, pagetype is
Expand Down
2 changes: 1 addition & 1 deletion theme/boost/templates/footer.mustache
Expand Up @@ -22,7 +22,7 @@
Example context (json):
{
"output": {
"page_doc_link": "Help and documentation",
"page_doc_link": "Documentation for this page",
"supportemail": "<a href=\"#\">Contact site support</a>",
"has_popover_links": true,
"services_support": "Services and support",
Expand Down
2 changes: 1 addition & 1 deletion theme/classic/templates/footer.mustache
Expand Up @@ -23,7 +23,7 @@
{
"output": {
"course_footer": "More information about this course",
"page_doc_link": "<a href='https://docs.moodle.org/'>Help and documentation</a>",
"page_doc_link": "<a href='https://docs.moodle.org/'>Documentation for this page</a>",
"login_info": "You are logged in as cute kitten",
"supportemail": "<a href=\"#\">Contact site support</a>",
"services_support_link": "Services and support"
Expand Down

0 comments on commit dfc47df

Please sign in to comment.