drachels / moodle-mod_mootyper

4 stars 18 forks source link

Module only update completion progress when the instance is updated. #120

Closed davidherney closed 7 months ago

davidherney commented 9 months ago

Hi...

The module is not calculating completion when the student finishes an attempt. The completion calculation is only done by calling the update_completion_date_event function when the instance is updated.

I did not find in the code an individual completion calculation. I think it is necessary to validate the state of completion when a student finishes an exercise. Another way is to do it through cron, but it may take longer to process.

Saludos

drachels commented 9 months ago

When I was developing completion status for MooTyper, I had the code to do this in the lib.php file. I was also working on another problem, and wound up resetting the lib.php file to an earlier state and just did not realize that it removed the function, mootyper_get_completion_state, that handles this. I have added it back and will push the changes after just a bit more testing.

drachels commented 7 months ago

Completion status updates immediately when the student meets the conditions set in the activity settings in MooTyper v4.2.7.