Badges database fields

Badges database fields

by Floyd Saner -
Number of replies: 2

Can someone point me to up-to-date documentation on what the values for the following fields mean?

mdl_badge.type (values seem to be 1=system, 2=course, but are there other values?)

mdl_badge.status (I've seen values range from 1-5, but don't know what they mean)

mdl_badge_criteria.criteriatype

mdl_badge_criteria.method

Thanks,

Floyd

Average of ratings: -
In reply to Floyd Saner

Re: Badges database fields

by Floyd Saner -

After digging through a a number of Moodle PHP files, I may have answered my own question. I still don't know where any of this is documented in a single document.  Please post any corrections to what I have below.

Moodle Badges database field information

table mdl_badge

   .type   (information found in moodle/lib/badgeslib.php)

1 = site badge

2 = course badge

   .status  (information found in moodle/lib/badgeslib.php)

0 = BADGE_STATUS_INACTIVE,  cannot be earned and has not been awarded

1 = BADGE_STATUS_ACTIVE,    can be earned, but as not been awarded

2 = BADGE_STATUS_INACTIVE_LOCKED, can no longer be earned, but has been awarded in past

3 = BADGE_STATUS_ACTIVE_LOCKED,   can be earned and has been awarded - no more changes possible

4 = BADGE_STATUS_ARCHIVED,      considered deleted; is not displayed in list of badges

table mdl_badge_criteria

   .criteriatype (information found in moodle/badges/criteria/award_criteria.php)

0 = overall - this seems to be a type created before any criteria have been added

1 = activity - course badge based on the completion of certain course activities

2 = manual - site or course badge configured to be awarded manually by roles

3 = social - I'm not certain what this is; I see nothing in the settings for this

4 = course  - course badge for completing a course

5 = courseset  - site badge for completing a set of courses

6 = profile  - site badge for completing selected profile fields

   .method (information found in moodle/badges/criteria/award_criteria.php)

0 = BADGE_CRITERIA_AGGREGATION_ANY

1 = BADGE_CRITERIA_AGGREGATION_ALL