114 Commits

Author SHA1 Message Date
Paul Holden
ec57300048
MDL-82090 completion: account for alternate gradepass form fields.
Some modules (e.g. Workshop) have "*gradepass" fields for each grade
item, which should be accounted for when trying to freeze them.
2024-07-04 10:00:32 +01:00
Amaia Anabitarte
f185fdca52 MDL-81749 core_completion: Let custom rules to return failed state 2024-06-05 15:55:04 +02:00
Ilya Tregubov
9e55042be1 Merge branch 'MDL-80302-main' of https://github.com/aanabit/moodle 2024-03-28 08:58:35 +08:00
Amaia Anabitarte
4a3a32b675 MDL-80302 completion: Improve default completion error tracking
Co-authored-by: Sara Arjona <sara@moodle.com>
2024-03-27 16:11:50 +01:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Juan Leyva
408d7c0c9c MDL-80392 completion: Fix exporter for Web Services 2024-02-06 11:01:42 +01:00
Paul Holden
7298d0762a
MDL-74238 completion: final removal of deprecated navigation methods. 2023-12-21 15:32:05 +00:00
Amaia Anabitarte
3f3dc5a035 MDL-80233 completion: Use default for empty values 2023-12-12 16:31:00 +01:00
Sara Arjona
51a70cf44e
Merge branch 'MDL-79862-master' of https://github.com/aanabit/moodle 2023-12-05 16:35:20 +01:00
Sara Arjona
032f39aeef
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:18:36 +01:00
Amaia Anabitarte
b4816367b7 MDL-79862 completion: Improve error handling for default completion 2023-11-20 09:51:21 +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