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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            andyjdavis Andrew Davis added a comment -

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

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

            Looks good to me thanks Andrew

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

            Integrated, thanks!

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

            test passed
            Thanks

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

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

            Ciao

            Show
            stronk7 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:
                  Fix Release Date:
                  10/Oct/11