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

In report/participation/ role names are not passing format_string

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.1.6, 3.2.3
    • Component/s: Reports
    • Labels:
    • Testing Instructions:
      Hide

      Set up Moodle with at least another language pack.
      Install a filter plugin which allows language dependent display like multilang or multilang2, have the filter activated.
      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.
      As a user, do some activity in a course.
      As trainer, open the participation report (Reports > Course participation), choose to show the activity of the student role and click "Go".
      Make sure the title doesn't show any of the raw language tags but was interpreted.

      Show
      Set up Moodle with at least another language pack. Install a filter plugin which allows language dependent display like multilang or multilang2, have the filter activated. 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. As a user, do some activity in a course. As trainer, open the participation report (Reports > Course participation), choose to show the activity of the student role and click "Go". Make sure the title doesn't show any of the raw language tags but was interpreted.
    • Workaround:
      Hide

      I added a 3.1 branch.

      Show
      I added a 3.1 branch.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58171-report-role-format_text

      Description

      In report/participation/ role names are not passing format_string and therefore are not localized.

      FULL STEPS

      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/participation/ in a course.

      WHAT YOU EXPECTED

      In the title you get to see "43 Teilnehmer/in" when page language is set to de.

      WHAT ACTUALLY HAPPENS

      You get to see "43 {mlang de}Teilnehmer/in{mlang}{mlang fr}Participant/e{mlang}{mlang en}Student{mlang}{mlang it}Studente{mlang}{mlang es}Estudiante{mlang}".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lucaboesch Luca Bösch
                Reporter:
                lucaboesch Luca Bösch
                Peer reviewer:
                Ankit Agarwal
                Integrator:
                David Monllaó
                Tester:
                Marcus Green
                Participants:
                Component watchers:
                Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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