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

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

    XMLWordPrintable

Details

    • 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").

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              gaudreaj Jean-Philippe Gaudreau
              mina Nicolas Martignoni
              Frédéric Massart Frédéric Massart
              Dan Poltawski Dan Poltawski
              Petr Skoda Petr Skoda
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan, Aya Saad, David Mudrák (@mudrd8mz), Helen Foster, Víctor Déniz Falcón, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              16 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Sep/13