Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-42310

Feedback checkboxes, radio buttons and dropdown input controls are not processed through text filter

    Details

    • Testing Instructions:
      Hide

      Prerequisites:

      • Ensure that multilang filter is enabled.
      • The following assumes that your Moodle installation is setup to handle English and French language. You may need to change the languages in the strings to be inserted in order to accommodate the languages you have enabled on your test site.

      As an administrator:

      1. Enable the feedback module going to the admin tree -> plugins -> activity modules -> Manage activities
      2. Go to a course and add a Feedback activity
      3. View the activity
      4. Add a "Multiple choice - single answer" question.
      5. Insert the following text in the label and the value fields: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      6. Add a "Multiple choice - multiple answers" question.
      7. Insert the following text in the label and the value fields: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      8. Add a "Multiple choice - single answer allowed (dropdownlist)" question.
      9. Insert the following text in the label and the value fields: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      10. Add a "Multiple choice (rated) - single answer" question.
      11. Insert the following text in the label field: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      12. Insert the following text in the value field: 10/<span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      13. Add a "Multiple choice (rated) - multiple answers" question.
      14. Insert the following text in the label field: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      15. Insert the following text in the value field: 10/<span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      16. Add a "Multiple choice (rated) - single answer allowed (dropdownlist)" question.
      17. Insert the following text in the label field: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>
      18. Insert the following text in the value field: 10/<span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span>

      With Editing Mode ON

      Feedback Form Preview - Before the fix, both English and French appear in the control labels (e.g. the text next to a checkbox or radio button or in a dropdown list). After the fix, only the current language strings appear.

      With Editing Mode OFF

      While viewing the Feedback form, Before the fix, notice that both English and French appear in the control labels (e.g. the text next to a checkbox or radio button or in a dropdown list). After the fix, only the current language strings appear.

      In order to make Feedback forms WCAG 2.0 compliant and consistent with language and other filter support, each of the fields must go through the format_string() or format_text() filter function. The fix applies the format_string() function to accomplish this thereby making the filtering of the text consistent.

      The built-in Feedback controls other than those mentioned above were tested and do not have this issue.

      Show
      Prerequisites: Ensure that multilang filter is enabled. The following assumes that your Moodle installation is setup to handle English and French language. You may need to change the languages in the strings to be inserted in order to accommodate the languages you have enabled on your test site. As an administrator: Enable the feedback module going to the admin tree -> plugins -> activity modules -> Manage activities Go to a course and add a Feedback activity View the activity Add a "Multiple choice - single answer" question. Insert the following text in the label and the value fields: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Add a "Multiple choice - multiple answers" question. Insert the following text in the label and the value fields: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Add a "Multiple choice - single answer allowed (dropdownlist)" question. Insert the following text in the label and the value fields: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Add a "Multiple choice (rated) - single answer" question. Insert the following text in the label field: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Insert the following text in the value field: 10/<span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Add a "Multiple choice (rated) - multiple answers" question. Insert the following text in the label field: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Insert the following text in the value field: 10/<span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Add a "Multiple choice (rated) - single answer allowed (dropdownlist)" question. Insert the following text in the label field: <span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> Insert the following text in the value field: 10/<span lang="en" class="multilang">English</span><span lang="fr" class="multilang">French</span> With Editing Mode ON Feedback Form Preview - Before the fix, both English and French appear in the control labels (e.g. the text next to a checkbox or radio button or in a dropdown list). After the fix, only the current language strings appear. With Editing Mode OFF While viewing the Feedback form, Before the fix, notice that both English and French appear in the control labels (e.g. the text next to a checkbox or radio button or in a dropdown list). After the fix, only the current language strings appear. In order to make Feedback forms WCAG 2.0 compliant and consistent with language and other filter support, each of the fields must go through the format_string() or format_text() filter function. The fix applies the format_string() function to accomplish this thereby making the filtering of the text consistent. The built-in Feedback controls other than those mentioned above were tested and do not have this issue.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-42310-master

      Description

      The contents of the checkboxes, radio buttons and dropdown input controls are not processed through Moodles format_text() or format_string() filters. As a result, things like multilang filtering is not applied to these fields. This is inconsistent with the field captions and other text displayed by this plugin which appear to all be processed by the format_string() function.

      This issue appears in the multichoice and multichoicerated type of controls.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Jan/14