About "criteriatype" field in mdl_course_completion_criteria table?

About "criteriatype" field in mdl_course_completion_criteria table?

by Judy Hsu -
Number of replies: 1

Hi, thanks for trying to help...

Just a quick question. I think for Moodle 2.5 to 2.7, for the "criteriatype" field in the mdl_course_completion_criteria table, all the possible values are 1,4,6,7,8.

What does each value mean? Thanks!

Average of ratings: -
In reply to Judy Hsu

Re: About "criteriatype" field in mdl_course_completion_criteria table?

by Denis Brat -
Found in the [webroot]/completion/criteria/completion_criteria.php:

/**
* Self completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_SELF', 1);

/**
* Date completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_DATE', 2);

/**
* Unenrol completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_UNENROL', 3);

/**
* Activity completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_ACTIVITY', 4);

/**
* Duration completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_DURATION', 5);

/**
* Grade completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_GRADE', 6);

/**
* Role completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_ROLE', 7);

/**
* Course completion criteria type
* Criteria type constant, primarily for storing criteria type in the database.
*/
define('COMPLETION_CRITERIA_TYPE_COURSE', 8);