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

In function stats_get_report_options role names are not passing format_string

    Details

    • Testing Instructions:
      Hide
      1. Have the Statistics switched to enabled (Administration > Site administration > Advanced features) and make sure data has been generated data to look up.
      2. Install at least another language pack.
      3. Enable filter_multilang and apply to both Content and Headings
      4. As admin, in admin/roles/manage.php (Users > Permissions > Define roles) modify the student role's custom full name with a string containing those language tags, for example <span class="multilang" lang="en">Learner</span><span class="multilang" lang="ru">Ученик</span>
      5. As trainer, open the course statistic page (Administration > Course administration > Reports > Statistics)
      6. Make sure in the "Report type" pulldown menu the roles don't show any of the raw language tags but were interpreted.
      Show
      Have the Statistics switched to enabled (Administration > Site administration > Advanced features) and make sure data has been generated data to look up. Install at least another language pack. Enable filter_multilang and apply to both Content and Headings As admin, in admin/roles/manage.php (Users > Permissions > Define roles) modify the student role's custom full name with a string containing those language tags, for example <span class="multilang" lang="en">Learner</span><span class="multilang" lang="ru">Ученик</span> As trainer, open the course statistic page (Administration > Course administration > Reports > Statistics) Make sure in the "Report type" pulldown menu the roles don't show any of the raw language tags but were interpreted.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull 3.1 Branch:
      wip-MDL-58180-31
    • Pull Master Branch:
      wip-MDL-58180-master

      Description

      In report/stats/ role names displayed in the pulldown menu are not passing format_text and therefore are not localized. This is because of the role names not being processed by format_text in stats_get_report_options.

      FULL STEPS

      Make sure Statistics have be enabled (Administration > Site administration > Advanced features) and generated data to look up.
      You got to have at least two of this language packs installed, the Multilang 2 plugin (https://moodle.org/plugins/filter_multilang2) installed and set Multi-Language Content (v2) filter to "on" for content and headings.
      Have a role having a custom full name with language tags (i.e. "{mlang de}Teilnehmer/in{mlang}{mlang fr}Participant/e{mlang}{mlang en}Student{mlang}{mlang it}Studente{mlang}{mlang es}Estudiante{mlang}") and call report/stats/ in a course.

      WHAT YOU EXPECTED

      In the pulldown menu you get to see the options

      Alle Aktivitäten (Trainer/innen und Teilnehmer/innen)
      Alle Aktivitäten (Zugriffe und Beiträge) Trainer/in
      Alle Aktivitäten (Zugriffe und Beiträge) Teilnehmer/in
      Zugriffe (alle Rollen)
      Beiträge (alle Rollen)

      when page language is set to de.

      WHAT ACTUALLY HAPPENS

      You get to see the options

      Alle Aktivitäten (Trainer/innen und Teilnehmer/innen)
      Alle Aktivitäten (Zugriffe und Beiträge) Trainer/in
      Alle Aktivitäten (Zugriffe und Beiträge) {mlang de}Teilnehmer/in{mlang}{mlang fr}Participant/e{mlang}{mlang en}Student{mlang}{mlang it}Studente{mlang}{mlang es}Estudiante{mlang}
      Zugriffe (alle Rollen)
      Beiträge (alle Rollen)

      in the pulldown menu.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/May/17