mirror of
https://github.com/moodle/moodle.git
synced 2025-04-12 12:05:14 +02:00
When an activity has manual completion tracking, pressing the manual completion checkbox reloads the page after toggling the completion state when the activity is linked to availability conditions. The "Mark as done" button needs to mimic this behaviour as well. The approach being taken here is to add a core_course/view JS module for the course homepage which listens for the manualCompletionToggled event and reloads the page when the activity module has availability conditions tied to it. Perhaps for future development, instead of reloading the page, the container of the restricted course sections/activities can reloaded via AJAX as well.