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

In report/participation/ role names are not passing format_string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.6, 3.2.3
    • 3.2.2
    • Reports
    • MOODLE_32_STABLE
    • MOODLE_31_STABLE, MOODLE_32_STABLE
    • MDL-58171-report-role-format_text
    • Hide

      I added a 3.1 branch.

      Show
      I added a 3.1 branch.
    • 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.

      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}".

            lucaboesch Luca Bösch
            lucaboesch Luca Bösch
            Ankit Agarwal Ankit Agarwal
            David Monllaó David Monllaó
            Marcus Green Marcus Green
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.