Moodle
  1. Moodle
  2. MDL-29126

Cannot export tab delimited plaintext files, always exports as comma delimited

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Gradebook
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Go to 'Gradebook -> Export -> Plain text file'
      Select 'tab' as the separator type
      Export your grades
      Check that the exported file uses tabs as separators

      Show
      Go to 'Gradebook -> Export -> Plain text file' Select 'tab' as the separator type Export your grades Check that the exported file uses tabs as separators
    • Workaround:
      Hide

      Looks like the problem comes from the separator type not being set after the submission of the first export page.

      This is fixed by changing 'moodle/grade/export/txt/index.php' at line 54:
      from...


      $export = new grade_export_txt($course, $currentgroup, '', false, false, $data->display, $data->decimals);


      to


      $export = new grade_export_txt($course, $currentgroup, '', false, false, $data->display, $data->decimals, $data->separator);


      Show
      Looks like the problem comes from the separator type not being set after the submission of the first export page. This is fixed by changing 'moodle/grade/export/txt/index.php' at line 54: from... $export = new grade_export_txt($course, $currentgroup, '', false, false, $data->display, $data->decimals); to $export = new grade_export_txt($course, $currentgroup, '', false, false, $data->display, $data->decimals, $data->separator);
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      MDL-29126_export_separator
    • Rank:
      18666

      Description

      If you attempt to export the grade book as a tab delimited plain text file it will instead export as a comma delimited file.

        Activity

        Hide
        Andrew Davis added a comment -

        I've created versions of this fix for the various branches

        Show
        Andrew Davis added a comment - I've created versions of this fix for the various branches
        Hide
        Sam Hemelryk added a comment -

        Looks good to me thanks Andrew

        Show
        Sam Hemelryk added a comment - Looks good to me thanks Andrew
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
        Hide
        Ankit Agarwal added a comment -

        test passed
        Thanks

        Show
        Ankit Agarwal added a comment - test passed Thanks
        Hide
        Eloy Lafuente (stronk7) added a comment -

        And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing.

        Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - And this code has been spread to all Moodle git and cvs repositories. Many thanks! Closing. Ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: