-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
2.4.3
Discovered while working on issue MDL-38682
Page /course/completion.php (pagetype = "course-completion") does not have a string defined in lang/en/pagetypes.php ('page-course-completion'). In such cases it gets impossible to configure block added to this page so it stays only on this page.
To replicate:
- Enable course completion globally and for particular course
- Inside course navigate to Course administration->Completion tracking
- Add any block (i.e. html)
- Make sure block does not appear on other pages in course (for example course view page)
- Return to the completion page, click block configuration (in editing mode)
- Change title of the block and save it
- Now magically the block is displayed on ANY course page
This happens because the dropdown "Where block appears"->"Display on page types" does not have the option for the particular page (it is only added if the string is defined) and when form is displayed the default value becomes the first in the list, which is "any course page". Especially now when this section is collapsed user would not even notice.
We can add all missing pagetype strings but it will happen again when somebody adds new page to /course/.
admin_page_type_list() solves it by adding:
$pagetype => get_string('page-admin-current', 'pagetype')
course_page_type_list() misses something like that
- has a non-specific relationship to
-
MDL-38682 Warning when configuring Navigation block from non-course and non-frontpage page
-
- Closed
-