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

Error when enabling a badge with invalid course module ids

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.5
    • Badges
    • MOODLE_402_STABLE

      While reviewing and testing MDL-79091, I faced this issue. The patch in MDL-79091 only fixes the problem with the cron.

      Steps to reproduce

      1. Login as admin.
      2. Create a course.
      3. Add 2 quizzes with Activity completion set to "View the activity"
      4. Add a Badge and set Criteria to "Activity completion", ticking both quizzes and changing This criterion is complete when ALL the activities.
      5. Enable the badge.
      6. Remove the 2 quizzes from the course.
      7. Completely remove the quizzes from the site, running the "course_delete_modules" ad-hoc task in "Site Administration > Server > Ad hoc tasks".
      8. Go to the course page and access "More > Badges > Manage badges".
      9. Check the Criteria displays some "Warning: This activity is no longer available" messages.
      10. Disable the badge.
      11. Enable the badge.
      12. Click the Continue button.

      Expected result

      As the criteria are not valid, the badge should remain disabled.

       

      Current result

      The following exception is displayed: "Invalid course module ID: xxxx". When you're back to the Manage badges page, it has been enabled:

      UX Proposal (Figma designs link)

            Unassigned Unassigned
            sarjona Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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