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

Epic: Create forum export functionality

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Fixed
    • Icon: Major Major
    • 3.8
    • 3.8
    • Forum
    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • Forum export
    • MDL-66075-master
    • Hide

      Setup

      • For this testing we will need a course with few enrolled users (student, teacher).
      • You'll also need a forum activity with few discussions and posts.

      Basic testing

      1. Log in as admin.
      2. Go to a course and then to the forum
      3. In the discussions list, click on the cog.
        • Make sure a new option Export is now available in the forum menu.
      4. Click on Export link.
      5. Make sure the Export page is rendered without any errors.
      6. Make sure there are three fields available: Users, Discussions and Format.
      7. Click on the Export button.
      8. Make sure the forum gets exported in CSV format.
      9. Open that file.
      10. Make sure the whole forum got exported and the content makes sense.

      Visibility and capability testing

      1. Log in as s1 and go to that forum.
      2. Click on the cog to see the options.
        • Make sure the Export option is not available.
      3. Try to access the export directly, by changing the URL in the browser to:

        http://localhost/stable_master/mod/forum/export.php?id=X
        

        Where X is the Forum ID, that can be found in the discussion list page URL (id=X)

      Make sure you get an error: You cannot export this forum

      1. Now, open a new incognito window and log in as admin.
      2. Go to Site administration > Users > Permissions > Capability overview
      3. Search for exportforum and click Get the overview button.
        • Make sure that capability is only allowed to Manager, Teacher and Non-editing teacher.
      4. Please note Student role is marked as Not set, click on the Student role link to edit that role.
      5. In the role edit page, click Edit button.
      6. Again, search for mod/forum:exportforum and check the Allow checkbox and click Save changes
      7. On window 1 (as student), refresh the discussion page.
      8. Click on the cog.
      9. Make sure the Export option is now available for the student.
      10. Click on the Export link.
      11. Make sure the Export page was rendered.
      12. Click on Export button.
      13. Make sure the forum content gets exported.
      14. On window 2 as admin, edit student role again.
      15. Unassign that capability mod/forum:exportforum from student role and save.
      16. On window 1, refresh the page.
      17. Make sure you get an error: You cannot export this forum

      Filters testing

      1. As admin or teacher, go to the forum export page.
      2. On Users field, click down arrow.
      3. Make sure it displays all enrolled users in this course.
      4. Select a user and click Export.
      5. Make sure only the data of the user you've chose has been exported.
      6. Now, on Discussions field, click down arrow.
      7. Make sure all discussions of this forum are displayed.
      8. Select one discussion and click Export.
      9. Make sure only the data of the discussion you've chose has been exported.
      10. Choose an user and a discussion in the filter.
      11. Make sure just the data of the combination you've choose has been exported.
      12. Clear all fields and click Export again.
      13. Make sure all discussions and posts data from that forum has been exported.

      Formats

      1. As admin or teacher, go to the forum export page.
      2. Expand the Format field, note all possible export format options:
        • Comma separated values (.csv)
        • Microsoft Excel (.xlsx)
        • HTML table
        • Javascript Object Notation (.json)
        • OpenDocument (.ods)
        • Portable Document Forumat (.pdf)
      3. Go through each available format and export.
      4. Each exported file should have following fields:
        • id, discussion, parent, userid, created, modified, mailed, subject, message, messageformat, messagetrust, attachment, totalscore, mailnow, deleted, privatereplyto
      5. Compare each field in the exported data file against the mdl_forum_posts table, make sure exported content is equal to the data in the table. In particular:
        • The 'parent' column must have an integer value and must not be empty.
        • The 'mailed' column must have an integer value and must not be empty.
        • The 'messageformat' column must have an integer value and must not be empty.
        • The 'messagetrust' column must have an integer value and must not be empty.
        • The 'attachment' column must have an integer value and must not be empty.
        • The 'totalscore' column must have an integer value and must not be empty.
        • The 'mailnow' column must have an integer value and must not be empty.
        • The 'deleted' column must have an integer value and must not be empty.
        • The 'privatereplyto' column must have an integer value and must not be empty.
      Show
      Setup For this testing we will need a course with few enrolled users (student, teacher). You'll also need a forum activity with few discussions and posts. Basic testing Log in as admin. Go to a course and then to the forum In the discussions list, click on the cog. Make sure a new option Export is now available in the forum menu. Click on Export link. Make sure the Export page is rendered without any errors. Make sure there are three fields available: Users, Discussions and Format. Click on the Export button. Make sure the forum gets exported in CSV format. Open that file. Make sure the whole forum got exported and the content makes sense. Visibility and capability testing Log in as s1 and go to that forum. Click on the cog to see the options. Make sure the Export option is not available. Try to access the export directly, by changing the URL in the browser to: http://localhost/stable_master/mod/forum/export.php?id=X Where X is the Forum ID, that can be found in the discussion list page URL (id=X) – Make sure you get an error: You cannot export this forum Now, open a new incognito window and log in as admin . Go to Site administration > Users > Permissions > Capability overview Search for exportforum and click Get the overview button. Make sure that capability is only allowed to Manager , Teacher and Non-editing teacher . Please note Student role is marked as Not set , click on the Student role link to edit that role. In the role edit page, click Edit button. Again, search for mod/forum:exportforum and check the Allow checkbox and click Save changes On window 1 (as student), refresh the discussion page. Click on the cog . Make sure the Export option is now available for the student. Click on the Export link. Make sure the Export page was rendered. Click on Export button. Make sure the forum content gets exported. On window 2 as admin, edit student role again. Unassign that capability mod/forum:exportforum from student role and save. On window 1 , refresh the page. Make sure you get an error: You cannot export this forum Filters testing As admin or teacher, go to the forum export page. On Users field, click down arrow. Make sure it displays all enrolled users in this course. Select a user and click Export . Make sure only the data of the user you've chose has been exported. Now, on Discussions field, click down arrow. Make sure all discussions of this forum are displayed. Select one discussion and click Export . Make sure only the data of the discussion you've chose has been exported. Choose an user and a discussion in the filter. Make sure just the data of the combination you've choose has been exported. Clear all fields and click Export again. Make sure all discussions and posts data from that forum has been exported. Formats As admin or teacher, go to the forum export page. Expand the Format field, note all possible export format options: Comma separated values (.csv) Microsoft Excel (.xlsx) HTML table Javascript Object Notation (.json) OpenDocument (.ods) Portable Document Forumat (.pdf) Go through each available format and export. Each exported file should have following fields: id, discussion, parent, userid, created, modified, mailed, subject, message, messageformat, messagetrust, attachment, totalscore, mailnow, deleted, privatereplyto Compare each field in the exported data file against the mdl_forum_posts table, make sure exported content is equal to the data in the table. In particular: The 'parent' column must have an integer value and must not be empty. The 'mailed' column must have an integer value and must not be empty. The 'messageformat' column must have an integer value and must not be empty. The 'messagetrust' column must have an integer value and must not be empty. The 'attachment' column must have an integer value and must not be empty. The 'totalscore' column must have an integer value and must not be empty. The 'mailnow' column must have an integer value and must not be empty. The 'deleted' column must have an integer value and must not be empty. The 'privatereplyto' column must have an integer value and must not be empty.

      This is an epic to capture all of the relevant changes to support export of forum content.

      This issue duplicates a number of other issues but serves as a clean place for the purposes of project development.

        1. MDL-66075_01.png
          MDL-66075_01.png
          390 kB
        2. MDL-66075_02.png
          MDL-66075_02.png
          119 kB
        3. MDL-66075_03.png
          MDL-66075_03.png
          335 kB
        4. MDL-66075_04.png
          MDL-66075_04.png
          331 kB
        5. MDL-66075_05.png
          MDL-66075_05.png
          477 kB
        6. MDL-66075_06.png
          MDL-66075_06.png
          205 kB

            lameze Simey Lameze
            dobedobedoh Andrew Lyons
            Jake Dallimore Jake Dallimore
            Gladys Basiana Gladys Basiana
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 33 minutes
                4d 33m

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