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

Use cohort as a badge criteria

    XMLWordPrintable

Details

    • MOODLE_31_STABLE, MOODLE_34_STABLE
    • MOODLE_35_STABLE
    • MDL-55491-master
    • Moderate
    • 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

    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

              sbourget Stephen Bourget
              danmarsden Dan Marsden
              Dan Marsden Dan Marsden
              David Monllaó David Monllaó
              David Monllaó David Monllaó
              Yuliya Bozhko, Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona), David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                17/May/18