=== 4.5 Onwards ===

This file has been replaced by UPGRADING.md. See MDL-81125 for further information.

===
This file describes API changes in /completion/* - completion,
information provided here is intended especially for developers.

=== 4.4 ===
* A new method, cm_completion_details::is_overall_complete() has been added to calculate whether a module should be considered or
  not completed, based on their completion options and the current value for the overall complete state.
* The following previously deprecated methods have been removed and can no longer be used:
  - `core_course_bulk_activity_completion_renderer::navigation`
  - `core_completion\manager::get_available_completion_tabs`
* The following previously deprecated methods have been removed and can no longer be used:
  - `completion_info::display_help_icon`
  - `completion_info::print_help_icon`
* The \core_completion\completion_info_exporter class has been updated to return a new field "isverallcomplete" to return the result of the
  new cm_completion_details::is_overall_complete() method.

=== 4.3 ===
* A trait class, core_completion/form/form_trait has been added to reuse code for adding and validation completion settings to any
  form.
* New method is_manual() has been added to `core_completion/cm_completion_details`
* The method manager::get_activities_and_resources() now has the optional $includedefaults parameter to define whether the default
  values should be included or not.
* The methods manager::apply_default_completion() and manager::get_default_completion() now have the optional $suffix parameter
  to be added to the name of the completion rules.
* The method manager::defaultcompletion() now has the $modules and $form parameters, to specify the modules that have been set
  through the form and the current form that has been sent.
* Support for deprecated `[modname]_get_completion_state` callbacks has been removed, custom completion rules must be implemented
  by appropriate `mod_[modname]\completion\custom_completion` class instead
* $CFG->completiondefault setting has been removed.

=== 4.0 ===
* New method mark_course_completions_activity_criteria() has been added to mark course completions instantly. It is
  based on cron for completion_criteria_activity.php which is refactored to use it as well.
* Core now passes an additional parameter to '_get_completion_state'. This is an array representation of the completion results that have already been
  tested. Currently contains - viewed, usegrade, passgrade. Any plugin that are dependent on these criteria can now check this array instead of retesting it.
* The method \completion_criteria_completion::mark_complete() now has the optional $timecompleted parameter to specify when the
  criteria was completed.
* New method get_available_completion_options() has been added in the core_completion\manager class. This method can be used
  to obtain an array with the available completion options ([url => name]) for the current course and user.
* The method get_available_completion_tabs() in the core_completion\manager class has been deprecated because the tabs navigation
  structure is no longer used in the completion pages. Please use core_completion\manager::get_available_completion_options()
  instead.

=== 3.11 ===
* New Behat steps for activity completion in the behat_completion class:
  - activity_completion_condition_displayed_as()
    - Given the "<Completion condition>" completion condition of "<Activity name>" is displayed as "<Status>"
  - activity_should_have_the_completion_condition()
    - Given "<Activity name>" should have the "<Condition name>" completion condition
  - manual_completion_button_displayed_as()
    - Given the manual completion button of "<Activity name>" is displayed as "<Status>"
  - the_manual_completion_button_for_activity_should_be_disabled()
    - Given the manual completion button for "<Activity name>" should be disabled
  - there_should_be_no_completion_for_activity()
    - Given there should be no completion information shown for "<Activity name>"
  - toggle_the_manual_completion_state()
    - Given I toggle the manual completion state of "<Activity name>"
  - overridden_manual_completion_button_displayed_as
    - Given the manual completion button of "<Activity name>" overridden by "<User>" is displayed as "<Status>"
  - overridden_activity_completion_condition_displayed_as
    - Given the "<Completion condition>" completion condition of "<Activity name>" overridden by "<User>" is displayed as "<Status>"
* *_get_completion_state() callback functions have been deprecated and should no longer be used. Plugins that define custom
  completion rules must implement the mod_[modname]\completion\custom_completion class that extends the
  \core_completion\activity_custom_completion base class.

=== 3.7 ===
 * External function core_completion_external::get_activities_completion_status new returns the following additional field:
   - valueused (indicates whether the completion state affects the availability of other content)
 * On the course page, only users with the capability 'moodle/course:isincompletionreports' (students, by default) can now tick the
   completion checkboxes. Teachers no longer get working checkboxes; tey see slightly different icons that indicate whether
   completion is enabled for the activity. These are the same icons which have always been shown to teachers before when the
   enabled the course editing mode.

=== 2.9 ===

* A completed and failed activity counts as a completed activity for
  course completion.
