83 Commits

Author SHA1 Message Date
Jun Pataleta
bdd3e5efb1 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-01 11:39:53 +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
David Mudrák
005b00dd9b MDL-68645 output: Do not apply filters when creating calendar events
Applying filters on an activity module description when using it as a
new calendar event's description is bad m'kay? We need to store the raw
text and apply the filters only when we actually display the text. That
way, filters (such as multi-language content) may actually fully work
and we do not initialise the theme and output machinery.

Additionally, we need to explicitly set the format of the description
text to HTML (because we have converted it to it already). Otherwise it
defaults to the current user's preferred editor format.

This is still a pragmatic hot-fix solution. The proper solution would be
to pass the raw text, format and embedded files.
2020-05-13 10:03:01 +02:00
Shamim Rezaie
a5f7de8777 MDL-64782 core_completion: Performance improvement 2019-04-23 17:01:48 +10:00
Dmitrii Metelkin
34945fa35f MDL-64898 core_completion: no progress for untracked users 2019-03-15 14:32:50 +11:00
Mark Johnson
272c7948d2 MDL-64889 completion: Fix performance of get_course_progress_percentage 2019-02-18 14:03:52 +00:00
Jun Pataleta
c18f59e155 Merge branch 'MDL-64644_master' of git://github.com/markn86/moodle 2019-02-11 15:29:04 +08:00
Eloy Lafuente (stronk7)
6ada5b713b Merge branch 'MDL-64528-master' of https://github.com/mackensen/moodle 2019-01-30 21:21:26 +01:00
Mark Nelson
6ff8d31434 MDL-64644 completion: set status correctly in provider 2019-01-23 17:11:49 +08:00
Mark Nelson
aaf7228fb4 MDL-64644 completion: ensure we return array for provider 2019-01-23 13:41:20 +08:00
Charles Fulton
7868aab181 MDL-64528 core_completion: prevent toggling completion in frozen context 2019-01-12 07:37:21 -08:00
Mark Johnson
7672471236 MDL-64123 webservices: Add valueused to completion data 2018-12-19 16:26:35 +00:00
Andrew Nicols
c96cd71102 MDL-63924 privacy: Add shared user providers to subsytsems 2018-11-08 21:26:18 +08:00
Andrew Nicols
5c77966881 MDL-63657 completion: Coding style fix 2018-10-23 11:32:43 +08:00
Michael Hawkins
543c465579 MDL-63668 core_completion: Add get and delete by approved userlist.
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:06:26 +08:00
Neill Magill
2363b99e69 MDL-62944 completion: Calendar capabilities should not be required
The completion API should not require a user to have the capability to
add calendar events for it to function correctly.
2018-08-31 10:15:36 +01:00
Adrian Greeve
d8eec7ee38 MDL-62384 core_completion: Update to sql to improve performance. 2018-05-11 09:15:27 +08:00
Adrian Greeve
ebab932f71 MDL-62137 core_completion: Privacy files for core_completion. 2018-05-07 14:28:16 +08:00
Juan Leyva
0e8b3d929d MDL-61312 completion: Return completion for teachers via WS
core_completion_get_activities_completion_status was not returning
completion information for users with the teacher role only (when it
wasn’t a role allowed to track completion).
2018-01-30 12:19:52 +01:00
Stephen Bourget
dccd9540d0 MDL-61205 completion: allow expected completion to support time 2018-01-11 21:30:13 -05:00
Neill Magill
3acb294828 MDL-60945 Web services: Too many progress records retrieved
The core_completion_get_activities_completion_status was getting the
progress for all users on the course called, and then discarding all
the records but one.

This change ensures that only progress for the user we are interested in
is retrieved from the database.

This has a side benefit of removing a full table scan from the query
finding the users inside the get_progress_all() method.
2017-12-11 08:41:16 +00:00
Pau Ferrer Ocaña
15ead7a176 MDL-60835 completion: Add overrideby field to completion status WS 2017-11-16 16:35:43 +01:00
Damyon Wiese
a66de3ca70 MDL-59909 calendar: Try hard not to fail the adhoc task.
Triggering a fatal error in an adhoc task is bad. It will be retried indefinitely.
Even though we are not sure how to get a module instance without a course module record,
it is possible and should not kill the Moodle site.
2017-10-25 15:42:14 +08:00
Jake Dallimore
b08337c35e MDL-37361 completion: Consolidate icon logic and clarify web service
- Icon generation logic moved to the course renderer.
- Web service should return the completion info only, not HTML.
- JS modified to handle icon rendering in relevant cases.
2017-10-10 17:12:22 +08:00
Jake Dallimore
8fbc41d8d5 MDL-37361 completion: minor code fixes. 2017-10-10 17:12:09 +08:00
Jake Dallimore
77165c9c83 MDL-37361 behat: added a test covering the activity completion report 2017-10-10 17:11:32 +08:00
Jake Dallimore
6f4adc6be4 MDL-37361 completion: make completion overrides visible to students
- Set icons in the course/renderer
- Use 'set' in lang strings for simplicity
- Code style fixes
2017-10-10 17:11:13 +08:00
Eiz Eddin Al Katrib
a39918daae MDL-37361 completion: Enabled overriding activity completion status 2017-10-10 17:10:15 +08:00