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

Archived badges are restored during course restore

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a course and add two badges (badge does not need criteria).
      2. Do not add activities to the course.
      3. Ensure no student has earned any of the badges.
      4. Delete at one badge.
      5. Make a manual backup of the course with below checkboxes checked and all others unchecked:
        1. Include enrolled users
        2. Include user role assignments
        3. Include activities
        4. Include blocks
        5. Include filters
        6. Include comments
        7. Include badges
        8. Include calendar events
        9. Include user completion details
        10. Include course logs
      6. Click restore link for Backup file.
      7. Restore the course into a new course, accepting default restore options.
      8. In the restored course, go to Course Administration > Badges > Manage Badges.

      Result:

      The restored course should contain 1 badged. (Since the deleted badge is not restored) 
       

      Show
      Create a course and add two badges (badge does not need criteria). Do not add activities to the course. Ensure no student has earned any of the badges. Delete at one badge. Make a manual backup of the course with below checkboxes checked and all others unchecked: Include enrolled users Include user role assignments Include activities Include blocks Include filters Include comments Include badges Include calendar events Include user completion details Include course logs Click restore link for Backup file. Restore the course into a new course, accepting default restore options. In the restored course, go to Course Administration > Badges > Manage Badges. Result: The restored course should contain 1 badged. (Since the deleted badge is not restored)   
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_34_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-43697-310
    • Pull 3.11 Branch:
      MDL-43697-311
    • Pull Master Branch:
      MDL-43697-master

      Description

      Restoring a backup of a course that had badges deleted restores the deleted badges in the new course.

      We have reproduced this in a pure Moodle (no plugins whatsoever) site running 2.5.4.

      Steps to reproduce:

      1. Create a course and add at least one badge (badge does not need criteria).
      2. Do not add activities to the course.
      3. Ensure no student has earned any of the badges.
      4. Delete at least one badge.
      5. Make a manual backup of the course with below checkboxes checked and all others unchecked:
        1. Include enrolled users
        2. Include user role assignments
        3. Include activities
        4. Include blocks
        5. Include filters
        6. Include comments
        7. Include badges
        8. Include calendar events
        9. Include user completion details
        10. Include course logs
      6. Click restore link for Backup file.
      7. Restore the course into a new course, accepting default restore options.
      8. In the restored course, go to Course Administration > Badges > Manage Badges.

      Expected results - Badges deleted prior to backup do not display in restored course.

      Actual results - Badges deleted prior to backup appear in restored course.

        Attachments

          Activity

            People

            Assignee:
            dst Daniel Kristian Steffensen
            Reporter:
            cfollin Chris Follin
            Peer reviewer:
            Ilya Tregubov Ilya Tregubov
            Integrator:
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Tester:
            Anna Carissa Sadia Anna Carissa Sadia
            Participants:
            Component watchers:
            Yuliya Bozhko, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Mar/21

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 15 minutes
                2h 15m