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

Use cohort as a badge criteria

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Automated testing:
      1. Run behat for @core_badges
      2. Run phpunit for core_badges_badgeslib_testcase

      Manual testing:
      0. This requires 2 cohorts with 1 or more users. It assumes "user1" is in cohort 1, and "user2" is in cohort 2
      1. Log in as admin
      2. Navigate to Site Administration -> Badges ->Add a new badge
      3. Create a badge named "Cohort 1"
      4. Add a criteria of "Cohort Membership"
      5. Select "Cohort 1" and press save.
      6. Enable access to the badge
      7. Verify that the badge was awarded to user1 and that user2 did not receive the badge

      Show
      Automated testing: 1. Run behat for @core_badges 2. Run phpunit for core_badges_badgeslib_testcase Manual testing: 0. This requires 2 cohorts with 1 or more users. It assumes "user1" is in cohort 1, and "user2" is in cohort 2 1. Log in as admin 2. Navigate to Site Administration -> Badges ->Add a new badge 3. Create a badge named "Cohort 1" 4. Add a criteria of "Cohort Membership" 5. Select "Cohort 1" and press save. 6. Enable access to the badge 7. Verify that the badge was awarded to user1 and that user2 did not receive the badge
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55491-master

      Description

      We developed a patch for one of our clients using Totara 2.6 a while ago that added cohort as a criteria - I've just dug that patch out and rebased it for Moodle 3.0 to see how much work is needed to get it into core.

      It will need the get_completed_criteria_sql() function completed, some general testing and some behat tests before it can be submitted - we may be able to find the time internally to do this but here's our progress so far if someone wants to help finish it off:
      https://github.com/catalyst/moodle/commit/6f9543d7e7651f8573ea4d7070216910cb215c15

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sbourget Stephen Bourget
                Reporter:
                danmarsden Dan Marsden
                Peer reviewer:
                Dan Marsden
                Integrator:
                David Monllaó
                Tester:
                David Monllaó
                Participants:
                Component watchers:
                Yuliya Bozhko, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  17/May/18