Commit Graph

109 Commits

Author SHA1 Message Date
Amaia Anabitarte fcbe53778d MDL-80302 completion: Improve default completion error tracking
Co-authored-by: Sara Arjona <sara@moodle.com>
2024-03-27 16:12:12 +01:00
Juan Leyva b9c148dbde MDL-80392 completion: Temporary fix for completion state via exporters 2024-02-06 11:05:06 +01:00
Amaia Anabitarte 4b0a34f08a MDL-80233 completion: Use default for empty values 2023-12-12 16:34:11 +01:00
Sara Arjona 85c70539df Merge branch 'MDL-79862-403' of https://github.com/aanabit/moodle into MOODLE_403_STABLE 2023-12-05 16:35:25 +01:00
Sara Arjona d29433ddc6 MDL-79726 completion: Overall should consider pass/fail states too
In MDL-78744, when the overallcompletion state was added to be displayed
in the activity card, only COMPLETE/INCOMPLETE status were considered.
However, depending on the activity completion settings, there are a
couple of states more that should also be included (COMPLETE_FAIL and
COMPLETE_PASS).

A new method has been added to the cm_completion_details class 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.
2023-12-01 09:19:11 +01:00
Amaia Anabitarte 1ed0cb2562 MDL-79862 completion: Improve error handling for default completion 2023-11-20 09:52:22 +01:00
Huong Nguyen 7ac9c99c74 Merge branch 'MDL-79351-master' of https://github.com/ferranrecio/moodle 2023-09-18 16:10:17 +07:00
Ferran Recio f652b769fe MDL-79351 completion: fix form_trait code smells 2023-09-14 12:24:41 +02:00
Amaia Anabitarte 85d07564cb MDL-78527 core_completion: Improving core completion styling 2023-09-12 15:43:48 +02:00
Amaia Anabitarte f367759123 MDL-78527 core_completion: Fixing a bug found in master
Changing from 'Must receive a PASSING grade' to 'Not grade required'
keeps the 'completionpassgrade' = 1 and we should reset setting to 0.
2023-09-12 09:59:36 +02:00
Sara Arjona 3c831861ec Merge branch 'MDL-78530-master' of https://github.com/aanabit/moodle 2023-08-31 11:10:17 +02:00
Amaia Anabitarte 4c4e2224e1 MDL-78530 core_completion: Remove $CFG->completiondefault setting 2023-08-31 08:40:24 +02:00
Amaia Anabitarte 1f68fe635f MDL-78530 core_completion: Use site default completion or none
When creating a new activity we should use course level default completion
and site level completion if there is no course level default completion.

For non defined default completion values use COMPLETION_TRACKING_NONE
instead of COMPLETION_TRACKING_MANUAL.
2023-08-31 08:40:24 +02:00
Amaia Anabitarte e37e0c39e8 MDL-78530 core_completion: New site default activity completion page 2023-08-30 17:46:56 +02:00
Sara Arjona 63886769dd MDL-79093 completion: Default activity completion order
Default completion settings page should order activities alphabetically by
display name (instead of internal name).
2023-08-23 07:36:55 +02:00
Andrew Nicols 339820fad1 Merge branch 'MDL-71196' of https://github.com/paulholden/moodle 2023-08-17 09:12:34 +02:00
Amaia Anabitarte 040a27fb76 MDL-78746 core_completion: Improve completion reminder information 2023-08-11 11:16:35 +02:00
Sara Arjona 2e41286ad3 MDL-78528 course: Display all forms in default activity completion page
This commit displays all the module forms together in the default
activity completion page:

- The checkboxes have been removed. Now the activity names are
displayed as accordions.
- Module names have been changed from plural to singular.
- The activity completion form is displayed below each module name,
when the chevron icon is expanded. The cancel button is not displayed.
- The CSS has been updated to meet the prototype styling.
2023-08-09 09:12:44 +02:00
Sara Arjona 274db7f747 MDL-78528 completion: Add suffix support to avoid duplicated ids 2023-08-09 09:12:43 +02:00
Sara Arjona d4d0483cb1 MDL-78528 completion: Add customdata to hide Cancel button
A new customdata setting has been added to edit_base_form to let
hide the Cancel button (and only display the "Save changes" button).
2023-08-04 16:33:02 +02:00
Paul Holden 334b6c75a4 MDL-71196 completion: final removal of get_completion_state support. 2023-07-31 09:04:03 +01:00
Andrew Nicols 0eaafc713c Merge branch 'MDL-78280-master' of https://github.com/roland04/moodle 2023-07-21 11:59:05 +08:00
Mikel Martín 96d6b3675f MDL-78280 completion: Add is_manual() method to cm_completion_details 2023-07-19 16:44:54 +02:00
Sara Arjona 47ba5d207c MDL-78517 completion: Homogenize the module settings
Reuse the code between default course completion settings and
activity completion form to avoid duplicating efforts and missing
features, as happened with the grading forum.
2023-07-14 07:09:04 +02:00
Amaia Anabitarte b14669a34a MDL-78633 core_course: Improve tertiary navigation in course completion 2023-07-10 15:07:50 +02:00
Jun Pataleta a85c424204 MDL-75085 external: Fix external_multiple_structure parameter passing
Some calls to the external_multiple_structure's constructor incorrectly
pass parameters where the value for the $description parameter is not
being passed. This results to invalid values being passed for the
$required parameter.
2023-02-02 09:08:29 +08:00
Andrew Nicols a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Sara Arjona d66a4ffeb9 Merge branch 'MDL-75173-master' of https://github.com/ilyatregubov/moodle 2022-10-17 15:17:45 +02:00
Ilya Tregubov effd848744 MDL-75173 core_completion: Fixes after review.
Unit tests added. Used new steps in Behat. Code style fix for long line.
2022-10-14 11:49:29 +03:00
Ilya Tregubov 43f98f6336 MDL-75173 core_completion: Fix completion for different settings. 2022-10-14 11:49:29 +03:00
Ilya Tregubov def5d29730 MDL-75173 core_completion: Fix course completion criteria marking.
SQL was fetching activities where completion state was 'completed,
but not passed reqyured grade'. For course completion such states
must be ignored.

Also fixed progress bar on my courses page. Same reasoning as above.
2022-10-14 11:49:28 +03:00
hieuvu c6e018e04e MDL-58266 core_completion: Add new view table. 2022-10-14 00:30:28 +07:00
Sujith Haridasan 73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Andrew Nicols 4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Mihail Geshoski 135e1a2dce MDL-73863 course: Deprecate unused methods 2022-03-10 12:28:39 +08:00
Mihail Geshoski 36fe5695fe MDL-73863 course: Add tertiary navigation in completion pages 2022-03-10 12:28:39 +08:00
Peter Burnett cab836cf8d MDL-72375 completion: Remove id from custom rules
The id stored in the default custom rules was the courseid, and would
incorrectly be applied to new activities as the activity id.
2021-12-13 11:52:03 +10:00
Peter Dias 2c7893cf9f MDL-52206 core: Update new activity_custom_completion
Update the custom_completion classes to accept the new completion
criteria
2021-10-04 19:45:47 +08:00
Peter 90acd8d381 MDL-52206 core: Add completion criteria to course_modules 2021-10-04 19:44:02 +08:00
Peter 663137748e MDL-52206 core: Add completion based on pass grade
Add new completion based on pass grade to the completion criteria.
2021-10-04 19:42:34 +08:00
Huong Nguyen 3150612163 MDL-71899 performance: Improve activity completion data caching
- Modified SQL in get_data() to get the activity completion of all course modules without calling get_fast_modinfo() to reduce the DB queries.
 - Building activity completion cache for the whole course in one time instead of building the cache for each course module by passing $wholecourse = true to get_data()
2021-09-09 10:03:21 +07:00
Ilya Tregubov 4819625349 MDL-32103 completion: Allow instant completion updates.
For activity based course completion criteria allow instant
course completion updates if the activity completion state was changed
for a single user.
2021-07-13 12:07:53 +02:00
Michael Hawkins f105612d7f MDL-71189 core_completion: Implementing custom completion sort ordering
This adds the requirement for activities supporting custom completion to
specify the order all completion conditions should be displayed for that
activity. It also implements the sorting that takes place.
2021-05-03 13:36:11 +08:00
Michael Hawkins c997fc7784 MDL-71189 core_completion: Updates to meet current coding standards 2021-05-03 13:36:11 +08:00
Dongsheng Cai 36bc7b07db MDL-71235 webservices: add activity completion data to web services 2021-04-29 13:52:32 +10:00
Huong Nguyen 3f9035b989 MDL-71252 completion: Avoid showing the 'Mark as done' button
The following activites will be applied:
 - Label
 - File (Force download/Open/In pop-up)
 - URL (Open/In pop-up)
2021-04-26 14:24:41 +07:00
Simey Lameze f518f61757 MDL-71288 completion: add fallback for plugins
This commits adds a fallback for plugins which does not have
custom_completion implementation.

For those cases, it will search for {modulename}_get_completion_state
callback in the plugin and call get_overall_completion() method in
cm_completion_details class to get the overall completion state for
a course module and user.
2021-04-22 09:45:11 +08:00
Jun Pataleta c81441f5c9 MDL-70817 core_completion: Course module completion details
* Class cm_completion_details builds the custom completion details
for an activity module.
2021-04-02 21:53:20 +08:00
Jun Pataleta fc238f329d MDL-70815 completion: Cast custom data to array
Since cm_info::customdata can be of any type, we need to cast it to an
array first before checking for custom completion rules. Otherwise,
an exception can be thrown (e.g. customdata has been set as an stdClass)
2021-03-10 19:22:15 +01:00
Jun Pataleta beb0dd74f2 MDL-70815 core_completion: Activity custom completion details base class
* Base class for defining an activity module's custom completion details
2021-03-09 19:27:41 +08:00