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

It should not be posible to issue a non active badge using the API

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6
    • Fix Version/s: None
    • Component/s: Badges
    • Labels:
    • Affected Branches:
      MOODLE_36_STABLE

      Description

      Right now is posible to issue a badge that is not active and has no criteria selected using the badge API.

      If we click on 'Add new badge' on the 'Manage badges' section, fill the form and click on 'Create badge' then we have a non active badge with no criteria (yet) selected. If then we instantiate this badge with:

      $badge = new badge($badgeid);

      and we do:

      $badge->issue($userid);

      it issues the badge to the user without checking status of this badge.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                davidmatamoros David Matamoros
                Participants:
                Component watchers:
                Yuliya Bozhko, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: