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

Non ASCII chars in string 'labelsep' are printed litteraly in export files

XMLWordPrintable

    • MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • git@github.com:StudiUM/moodle.git
    • MDL-36093-master
    • Hide
      1. Go to "Site administration > Language > Language customisation", open language pack and update string 'labelsep' in 'langconfig.php' to value ': '
      2. Create a course and add some students and activities (assignment, forums, quiz etc).
      3. Go to the course administration "Grade administration > Export > Excel spreadsheet" and assert that there's no ' ' printed literally for each 'labelsep' in the column name of each grade item, both in the preview and in the exported file (ex: Assignment: Assignment 1).
      4. Do the same for "OpenDocument spreadsheet" and "Plain text file" exports (column names are not outputted in "XML file").
      Show
      Go to "Site administration > Language > Language customisation", open language pack and update string 'labelsep' in 'langconfig.php' to value ': ' Create a course and add some students and activities (assignment, forums, quiz etc). Go to the course administration "Grade administration > Export > Excel spreadsheet" and assert that there's no ' ' printed literally for each 'labelsep' in the column name of each grade item, both in the preview and in the exported file (ex: Assignment: Assignment 1). Do the same for "OpenDocument spreadsheet" and "Plain text file" exports (column names are not outputted in "XML file").

      When exporting grades, the string 'labelsep' (defined in 'langconfig') is used for columns labelling, which leads to weird columns labels, depending on the value of the string in the lang pack.

      E.g. in french, 'labelsep' is defined with a non-breaking space followed by a column. This results in following column label in CSV grades export file: "Devoir Nom du devoir" (entity is printed litteraly, not interpreted).

      Possible solutions:

      1. Remove 'labelsep' from functions exporting files and educate developers not to re-introduce it (workaround), or
      2. Define a new string 'labelsepfile' (or whatever) to be used in exporting functions (another workaround), or
      3. Find a way so that 'labelsep' non ASCII chars are correctly output in the export files (better).

      AFAIK, the only occurence of this problem as of today is in file grade/export/lib.php, in the function 'format_column_name', line 183.

            gaudreaj Jean-Philippe Gaudreau
            mina Nicolas Martignoni
            Frédéric Massart Frédéric Massart
            Dan Poltawski Dan Poltawski
            Petr Skoda Petr Skoda (Inactive)
            Votes:
            16 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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