-
Bug
-
Resolution: Deferred
-
Minor
-
None
-
3.5.3
-
MOODLE_35_STABLE
Steps to reproduce
===============
1. Create an Activity with HTML entities in the name, such as:
A "Test" Activity & Perhaps More & Then Some
|
2. Enable course's Completion Tracking and an activity's manual Activity Completion.
3. Hover over the activity's completion checkbox to see the title text with HTML entities.
Actual result
==========
For example, when hovering over its checkbox, an incomplete activity having the name from above will show with HTML entities. Note the single "&" is converted to &
Not complete: A "Test" Activity & Perhaps More & Then Some. Select to mark as complete.
|
If you then toggle the checkbox to Incomplete, it will still show with HTML entities as:
Completed: A "Test" Activity & Perhaps More & Then Some. Select to mark as not complete."
|
But notice that only the explicitly specified & stays encoded, while the last ampersand now displays correctly as a single "&", as it was originally in the activity name.
Expected result
============
All strings with the activity name should always show with decoded HTML entities. In the example above, it should show as it does on the activity page itself:
A "Test" Activity & Perhaps More & Then Some
|
Other points
==========
- The text for the initial page load is handled by course_section_cm_completion() in /course/renderer.php. I imagine the fix might be to just add $imgalt = html_entity_decode($imgalt).
- However, subsequent clicks to toggle the completion checkbox on and off will go through /course/completion.js. The JS code will also need to decode the HTML entities, since it is pulling the activity name (module name) from the hidden <input name="modulename"> element.
- Similar issue: https://tracker.moodle.org/browse/MDL-59797
- will be (partly) resolved by
-
MDL-64198 Multilang Activity Name Not Handled for Manual Completion Checkbox
-
- Closed
-