• MOODLE_23_STABLE
    • MOODLE_24_STABLE
    • wip-MDL-34074-master
    • Hide

      Multiple areas of moodle export csv files and need to be tested.

      data module

      1. Create a database module.
      2. Add a few fields, make sure that one is text and the other is a textarea.
      3. Add multiple lines to the entries and include quote marks(") and commas(,).
      4. Click on the export tab.
      5. Make sure that the CSV radio button is selected.
      6. Export the entries.

      [Test]

      • Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes.
      • Any word that has double quotes has another set of double quotes e.g. ""This"".

      Grade export

      1. Create or go to a course that has assessments that have been completed by students.
      2. Go to [Settings->Grades].
      3. From the drop down list in the top left corner select "Export Plain text file".
      4. check "include feedback in export" and then submit.

      [Test]

      • Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes.
      • Any word that has double quotes has another set of double quotes e.g. ""This"".

      Bulk user export

      To really test this out, create a user profile field:

      1. Go to [Settings->Site administration->Users->Accounts->User profile fields]
      2. Select a text area
      3. Fill in the form to create a custom field for the user.
      4. Edit your profile settings and fill in the new field that you have created, make sure to add multiple lines and put something in double quotes.
      5. Go to [Settings->Site administration->Users->Accounts->Bulk user actions]
      6. Select a group of users including the one that you added the information to.
      7. Choose "Download" from the "With selected users..." section.
      8. Click the "Download in text format" link.

      [Test]

      • Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes.
      • Any word that has double quotes has another set of double quotes e.g. ""This"".

      Quiz results export

      1. Create a quiz and have multiple students complete it.
      2. Browse back to the quiz and view the attempts made.
      3. Click "Download table data as" and Make sure that the box next to it reads "a comma separated values text file".

      [Test]

      • Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes.
      • Any word that has double quotes has another set of double quotes e.g. ""This"".
      Show
      Multiple areas of moodle export csv files and need to be tested. data module Create a database module. Add a few fields, make sure that one is text and the other is a textarea. Add multiple lines to the entries and include quote marks(") and commas(,). Click on the export tab. Make sure that the CSV radio button is selected. Export the entries. [Test] Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes. Any word that has double quotes has another set of double quotes e.g. ""This"". Grade export Create or go to a course that has assessments that have been completed by students. Go to [Settings->Grades] . From the drop down list in the top left corner select " Export Plain text file". check "include feedback in export" and then submit. [Test] Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes. Any word that has double quotes has another set of double quotes e.g. ""This"". Bulk user export To really test this out, create a user profile field: Go to [Settings->Site administration->Users->Accounts->User profile fields] Select a text area Fill in the form to create a custom field for the user. Edit your profile settings and fill in the new field that you have created, make sure to add multiple lines and put something in double quotes. Go to [Settings->Site administration->Users->Accounts->Bulk user actions] Select a group of users including the one that you added the information to. Choose "Download" from the "With selected users..." section. Click the "Download in text format" link. [Test] Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes. Any word that has double quotes has another set of double quotes e.g. ""This"". Quiz results export Create a quiz and have multiple students complete it. Browse back to the quiz and view the attempts made. Click "Download table data as" and Make sure that the box next to it reads "a comma separated values text file". [Test] Open with a text editor and check that any field that has spaces or line breaks, or double quotes is encapsulated in double quotes. Any word that has double quotes has another set of double quotes e.g. ""This"".

      At the moment moodle csv file don't follow any particular standards which makes exporting into other applications difficult.

      For example:
      When exporting a database activity in either CSV or Excel format, the text and textarea fields with are not being quoted. Upon opening the CSV or Excel export in Excel, the results span multiple lines when there are line breaks in the data.

      The solution to this is to wrap these fields in quotes.

      Standards to check:

      • DOS-style lines that end with (CRLF) characters
      • An optional header record (there is no sure way to detect whether it is present, so care is required when importing).
      • Each record "should" contain the same number of comma-separated fields.
      • Any field may be quoted (with double quotes).
      • Fields containing a line-break, double-quote, and/or commas should be quoted. (If they are not, the file will likely be impossible to process correctly, so this should is better taken as must).
      • A (double) quote character in a field must be represented by two double quote characters.

      for full details of the RFC 4180 standards:
      http://tools.ietf.org/html/rfc4180

            abgreeve Adrian Greeve
            abgreeve Adrian Greeve
            Ankit Agarwal Ankit Agarwal
            Sam Hemelryk Sam Hemelryk
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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