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

Course deletion doesn't delete content bank content.

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Prerequisites

      • Access to database
      • Create 'Cat1' and 'Cat2' course categories at top level, and 2 courses ('First' and 'Second') in 'Cat1' category.
      • Run tests in order.

      Creating content

      1. In database, run this query (where 'mdl_' is your database prefix): 

        select * from mdl_contentbank_content

      2. Confirm the result set is empty
      3. Log in as admin.
      4. Go to dashboard.
      5. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme).
      6. Click on the Upload button.
      7. Upload "findthewords.h5p" file and 'Save changes'.
      8. Click on "findthewords.h5p" element.
      9. Confirm the H5P content is rendered with no errors.
      10. Go to 'Cat1' course category page.
      11. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme).
      12. Click on the Upload button.
      13. Upload "findthewords.h5p" file and 'Save changes'.
      14. Click on "findthewords.h5p" element.
      15. Confirm the H5P content is rendered with no errors.
      16. Go to 'First' course homepage.
      17. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme).
      18. Note the 'contextid' parameter in the URL.
      19. Click on the Upload button.
      20. Upload "filltheblanks.h5p" file and 'Save changes'.
      21. Click on "filltheblanks.h5p" element.
      22. Confirm the H5P content is rendered with no errors.
      23. Log out and log in as admin
      24. In database, run this query (where 'mdl_' is your database prefix): 

        select * from mdl_contentbank_content

      25. Confirm there are 3 records in the result: two with name = 'findthewords.h5p' and one with name = 'filltheblanks.h5p'

      Test: Delete a course

      1. Go to Site administration > Courses > Manage courses and categories
      2. Delete 'First' course with the content bank content.
      3. Click on 'Confirm' button and delete course completely.
      4. In database, run this query (where 'mdl_' is your database prefix and :value the contextid parameter noted in step 18): 

        select * from mdl_contentbank_content where contextid = :value

      5. Confirm the result set is empty
      6. In database, run this query (where 'mdl_' is your database prefix): 

        select * from mdl_contentbank_content

      7. Confirm there are 2 records in the result both with name = 'findthewords.h5p'

      Test: Move a course category

      1. Go to 'Second' course homepage.
      2. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme).
      3. Click on the Upload button.
      4. Upload "filltheblanks.h5p" file and 'Save changes'.
      5. Click on "filltheblanks.h5p" element.
      6. Confirm the H5P content is rendered with no errors.
      7. Go to Side administration > Courses > Manage courses and categories
      8. Open cog menu for 'Cat1' course category an click on 'Delete'.
      9. Select 'What to do: Move contents to another category' and 'Move into: Cat2' and Delete.
      10. Go to 'Cat2' course category page.
      11. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme).
      12. Confirm "findthewords.h5p" element is there.
      13. Click on "findthewords.h5p" element.
      14. Confirm the H5P content is rendered with no errors.
      15. Go to 'Second' course home page.
      16. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme).
      17. Confirm "filltheblanks.h5p" element is there.
      18. Click on "filltheblanks.h5p" element.
      19. Confirm the H5P content is rendered with no errors.

      Test: Delete a course category

      1. Go to Side administration > Courses > Manage courses and categories
      2. Open cog menu for 'Cat2' course category an click on 'Delete'.
      3. Select 'What to do: Delete all - cannot be undone' and Delete.
      4. In database, run this query (where 'mdl_' is your database prefix): 

        select * from mdl_contentbank_content

      5. Confirm there are 1 record in the result with name = 'findthewords.h5p'
      Show
      Prerequisites Access to database Create 'Cat1' and 'Cat2' course categories at top level, and 2 courses ('First' and 'Second') in 'Cat1' category. Run tests in order. Creating content In database, run this query (where 'mdl_' is your database prefix):  select * from mdl_contentbank_content Confirm the result set is empty Log in as admin. Go to dashboard. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme). Click on the Upload button. Upload "findthewords.h5p" file and 'Save changes'. Click on "findthewords.h5p" element. Confirm  the H5P content is rendered with no errors. Go to 'Cat1' course category page. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme). Click on the Upload button. Upload "findthewords.h5p" file and 'Save changes'. Click on "findthewords.h5p" element. Confirm  the H5P content is rendered with no errors. Go to 'First' course homepage. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme). Note the 'contextid' parameter in the URL . Click on the Upload button. Upload "filltheblanks.h5p" file and 'Save changes'. Click on "filltheblanks.h5p" element. Confirm  the H5P content is rendered with no errors. Log out and log in as admin In database, run this query (where 'mdl_' is your database prefix):  select * from mdl_contentbank_content Confirm there are 3 records in the result: two with name = 'findthewords.h5p' and one with name = 'filltheblanks.h5p' Test: Delete a course Go to Site administration > Courses > Manage courses and categories Delete 'First' course with the content bank content. Click on 'Confirm' button and delete course completely. In database, run this query (where 'mdl_' is your database prefix and : value the contextid parameter noted in step 18 ):  select * from mdl_contentbank_content where contextid = :value Confirm the result set is empty In database, run this query (where 'mdl_' is your database prefix):  select * from mdl_contentbank_content Confirm there are 2 records in the result both with  name = 'findthewords.h5p' Test: Move a course category Go to 'Second' course homepage. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme). Click on the Upload button. Upload "filltheblanks.h5p" file and 'Save changes'. Click on "filltheblanks.h5p" element. Confirm  the H5P content is rendered with no errors. Go to Side administration > Courses > Manage courses and categories Open cog menu for 'Cat1' course category an click on 'Delete' . Select 'What to do: Move contents to another category' and 'Move into: Cat2' and Delete . Go to 'Cat2' course category page. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme). Confirm "findthewords.h5p" element is there. Click on "findthewords.h5p" element. Confirm  the H5P content is rendered with no errors. Go to 'Second' course home page. Go to "Content bank" in the navigation block (for classic theme) or drawer (for boost theme). Confirm "filltheblanks.h5p" element is there. Click on "filltheblanks.h5p" element. Confirm  the H5P content is rendered with no errors. Test: Delete a course category Go to Side administration > Courses > Manage courses and categories Open cog menu for 'Cat2' course category an click on 'Delete' . Select 'What to do: Delete all - cannot be undone'  and Delete . In database, run this query (where 'mdl_' is your database prefix):  select * from mdl_contentbank_content Confirm there are 1 record in the result with  name = 'findthewords.h5p'
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-68526-master

      Description

      When a course with content bank content is deleted the data on contentbank_content table is not removed.

        Attachments

        1. Creating content.png
          Creating content.png
          190 kB
        2. Delete a course.PNG
          Delete a course.PNG
          43 kB
        3. Delete a course category.PNG
          Delete a course category.PNG
          15 kB
        4. filltheblanks.h5p
          699 kB
        5. findthewords.h5p
          617 kB
        6. Move a course category.png
          Move a course category.png
          177 kB

          Activity

            People

            Assignee:
            amaia Amaia Anabitarte
            Reporter:
            amaia Amaia Anabitarte
            Peer reviewer:
            Carlos Escobedo
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Gladys Basiana
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jun/20

                Time Tracking

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