MDL-78116 core: Run tests against Windows on GHA
[moodle.git] / completion / upgrade.txt
blob52a90662f6df18d24c369bc11f88b19a0a20bcd1
1 This files describes API changes in /completion/* - completion,
2 information provided here is intended especially for developers.
4 === 4.0 ===
5 * New method mark_course_completions_activity_criteria() has been added to mark course completions instantly. It is
6   based on cron for completion_criteria_activity.php which is refactored to use it as well.
7 * Core now passes an additional parameter to '_get_completion_state'. This is an array representation of the completion results that have already been
8   tested. Currently contains - viewed, usegrade, passgrade. Any plugin that are dependent on these criteria can now check this array instead of retesting it.
9 * The method \completion_criteria_completion::mark_complete() now has the optional $timecompleted parameter to specify when the
10   criteria was completed.
11 * New method get_available_completion_options() has been added in the core_completion\manager class. This method can be used
12   to obtain an array with the available completion options ([url => name]) for the current course and user.
13 * The method get_available_completion_tabs() in the core_completion\manager class has been deprecated because the tabs navigation
14   structure is no longer used in the completion pages. Please use core_completion\manager::get_available_completion_options()
15   instead.
17 === 3.11 ===
18 * New Behat steps for activity completion in the behat_completion class:
19   - activity_completion_condition_displayed_as()
20     - Given the "<Completion condition>" completion condition of "<Activity name>" is displayed as "<Status>"
21   - activity_should_have_the_completion_condition()
22     - Given "<Activity name>" should have the "<Condition name>" completion condition
23   - manual_completion_button_displayed_as()
24     - Given the manual completion button of "<Activity name>" is displayed as "<Status>"
25   - the_manual_completion_button_for_activity_should_be_disabled()
26     - Given the manual completion button for "<Activity name>" should be disabled
27   - there_should_be_no_completion_for_activity()
28     - Given there should be no completion information shown for "<Activity name>"
29   - toggle_the_manual_completion_state()
30     - Given I toggle the manual completion state of "<Activity name>"
31   - overridden_manual_completion_button_displayed_as
32     - Given the manual completion button of "<Activity name>" overridden by "<User>" is displayed as "<Status>"
33   - overridden_activity_completion_condition_displayed_as
34     - Given the "<Completion condition>" completion condition of "<Activity name>" overridden by "<User>" is displayed as "<Status>"
35 * *_get_completion_state() callback functions have been deprecated and should no longer be used. Plugins that define custom
36   completion rules must implement the mod_[modname]\completion\custom_completion class that extends the
37   \core_completion\activity_custom_completion base class.
39 === 3.7 ===
40  * External function core_completion_external::get_activities_completion_status new returns the following additional field:
41    - valueused (indicates whether the completion state affects the availability of other content)
42  * On the course page, only users with the capability 'moodle/course:isincompletionreports' (students, by default) can now tick the
43    completion checkboxes. Teachers no longer get working checkboxes; tey see slightly different icons that indicate whether
44    completion is enabled for the activity. These are the same icons which have always been shown to teachers before when the
45    enabled the course editing mode.
47 === 2.9 ===
49 * A completed and failed activity counts as a completed activity for
50   course completion.