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

Badges with criteria that depend on other badges are not restored correctly when backed up


    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.6.3
    • Backup, Badges
    • None

      To reproduce:

      1. Create a course with any type of badge (activity completion for example) and enable it.
      2. Create another badge with the criteria that you are awarded the first badge, this badge can be enabled or left disabled
      3. Back up the course with user data and badges selected
      4. Restore the course as a new course
      5. Check the restored course's badges. 

      Expected result: The new 2nd badge is created with criteria that it is awarded when you are awarded the new 1st badge.

      Actual result: The 2nd badge says under criteria "Complete: Badge with id {$a} does not exist."

      It appears when the course is restored the record created in the badge_criteria_param table is bad, it has a critid (and a proper record in the corresponding badge_criteria table)  but the name column is an empty string and the value column is null.

            Unassigned Unassigned
            dbarnett@wiley Daniel Barnett
            0 Vote for this issue
            5 Start watching this issue


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