-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.3, 3.6.1
-
MOODLE_35_STABLE, MOODLE_36_STABLE
-
MOODLE_35_STABLE, MOODLE_36_STABLE
-
MDL-64198-master -
Steps to reproduce
===============
- Enable Site Admin > Plugins > Filters > Multi-Language Content, and also turn on Apply to: Content and headings.
- Create an activity with a multilingual name, such as: "<span class="multilang" lang="en">hello there</span><span class="multilang" lang="es">hola ahí</span>".
- Enable Completion Tracking and the activity's Activity Completion (manual).
- Turn off course editing.
- Hover over the completion checkbox to see a properly formatted string, based on the currently selected language (i.e. Completed: hello there. Select to mark as not complete.).
- Now click the toggle, and hover over the checkbox again to see the unformatted name being used (i.e. "Not completed: <span class="multilang" lang="en">hello there</span><span class="multilang" lang="es">hola ahí</span> Select to mark as complete)..
Actual result
==========
After clicking the completion checkbox at least once, the form.togglecompletion's button title (and img alt text) will contain the unformatted activity name with all of the multilang spans showing.
Expected result
============
The button title (and img alt text) should not show any content from multilang spans other than the one for the currently selected language, as is shown on the initial page load.
Other points
==========
The name initially loads fine on first page load because in course_section_cm_completion() of /course/renderer.php, $mod->get_formatted_name() is called.
But there is no call to a similar or equivalent function in /course/completion.js, so once the user clicks to toggle the completion through JS, the name doesn't display correctly.
- will help resolve
-
MDL-64199 HTML Entities Not Decoded in Activity Name for Manual Completion Checkbox
-
- Closed
-