At risk of a monumental thread necro, does anyone have any information about what the other possible values for completionstate in this table represent? I can't seem to make it record anything other than 0 or 1 in basic testing but my system has values of 2 and 3 in there as well.
Here you have some help Martin:
/** | |
* The user has not completed this activity. | |
* This is a completion state value (course_modules_completion/completionstate) | |
*/ | |
define('COMPLETION_INCOMPLETE', 0); | |
/** | |
* The user has completed this activity. It is not specified whether they have | |
* passed or failed it. | |
* This is a completion state value (course_modules_completion/completionstate) | |
*/ | |
define('COMPLETION_COMPLETE', 1); | |
/** | |
* The user has completed this activity with a grade above the pass mark. | |
* This is a completion state value (course_modules_completion/completionstate) | |
*/ | |
define('COMPLETION_COMPLETE_PASS', 2); | |
/** | |
* The user has completed this activity but their grade is less than the pass mark | |
* This is a completion state value (course_modules_completion/completionstate) | |
*/ | |
define('COMPLETION_COMPLETE_FAIL', 3); |
From: https://github.com/moodle/moodle/blob/master/lib/completionlib.php
That's the answer.
I have an example of this type of report somewhere in one of the reports in the ad-hoc reports https://docs.moodle.org/32/en/ad-hoc_contributed_reports.
I have only seen values 2 and 3 appear with SCORM activities, where they make sense.
Thanks both, particularly Mikel for the specifics.
Oh, one other time I have seen 2 and 3, and that is with Quizzes.
If you have a quiz completion set to 'Student must receive a grade to complete this activity' and set a passing grade for it, but do not set 'Require passing grade' for completion, then the user can complete the activity even though they failed the quiz, since that is any grade at all. In that case they get a 2.
So, similarly, a 3 means they completed with the require a passing grade set and they passed.