Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the plugin lacks the completion class required by moodle 4 for custom completions #37

Open
attilioariadne1985 opened this issue Sep 26, 2024 · 0 comments

Comments

@attilioariadne1985
Copy link

when a reservation mod instance is modified the activity is automatically completed for all students in the course.
This happens because the required object class in the lib/completionlib.php file is missing from the internal_get_state function.

The snippet of code in question is the following:

$cmcompletionclass = activity_custom_completion::get_cm_completion_class($cminfo->modname);
if ($cmcompletionclass) {
/** @var activity_custom_completion $cmcompletion */
$cmcompletion = new $cmcompletionclass($cminfo, $userid, $completionstate);
$response = $cmcompletion->get_overall_completion_state() != COMPLETION_INCOMPLETE;
}

The missing class must contain methods including get_overall_completion_state() which replaces the old reservation_get_completion_state method which is now in the plugin lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant