Commit graph

100 commits

Author SHA1 Message Date
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
5a7c629f7c Merge branch 'MDL-45242-master' of https://github.com/sammarshallou/moodle 2021-03-10 23:39:30 +08:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Jun Pataleta
32721b3511 MDL-70815 core_completion: Update completion_info
* Update completion_info::get_data() to add other completion
information from a new method called get_other_cm_completion_data().
This allows the storage of the completion statuses of the following
completion rules to completion_info objects:
  - 'Students must receive a grade' completion rule.
  - Any custom completion rule defined by an activity.
This allows detailed completion information to be fetched for course
modules.
It also allows custom completion statuses to be cached which will help
reduce DB queries when fetching completion statuses.
* Update update_state() to fetch overall completion state from the
module's activity_custom_completion implementation. Falls back to the
*_get_completion_state() callback function.
* Update internal_set_data() to include the other cm completion data
in the updated cache data for the module instance.
2021-03-09 20:15:28 +08:00
Jun Pataleta
18ef213da5 MDL-70815 core_completion: completion_info::get_grade_completion()
Move the current logic for determining the completion status for the
"Student must receive grade" completion rule to a function so it cann
be reused.
Unit test included.
2021-03-09 20:15:28 +08:00
Paul Holden
abde761cb6 MDL-40081 completion: clean up criteria records for deleted courses. 2020-04-06 12:22:51 +01:00
Jake Dallimore
26a94308ee Merge branch 'MDL-65276-master' of git://github.com/lameze/moodle 2019-04-30 20:47:26 +02:00
Alexander Bias
d6cea5ccd9 MDL-65056 completion: Hide checkboxes on course page for teachers 2019-04-19 11:40:00 +02:00
Simey Lameze
846c585910 MDL-65276 core: fix CiBoT complains 2019-04-08 10:30:09 +08:00
Simey Lameze
fe4f55ee40 MDL-65276 core: move completion_cron_aggregate() to completionlib 2019-04-05 13:38:30 +08:00
Mark Nelson
5211efb99b MDL-37933 core_complete: fixed criteria/criterion naming confusion 2017-11-27 15:26:43 +08:00
Jake Dallimore
8fbc41d8d5 MDL-37361 completion: minor code fixes. 2017-10-10 17:12:09 +08:00
Jake Dallimore
86f359bf68 MDL-37361 completion: automatic completion disabled when overridden
Changes:
- Activities with auto completion and a completion status overridden to
COMPLETION_COMPLETE are no longer processed by normal completion
triggers.
- All activities can still be completed by students when their
completion status has been overridden to COMPLETION_INCOMPLETE, via
either auto or manual triggers.
- Completion unit tests updated
2017-10-10 17:10:49 +08:00
Eiz Eddin Al Katrib
a39918daae MDL-37361 completion: Enabled overriding activity completion status 2017-10-10 17:10:15 +08:00
Dan Poltawski
4469ae96b6 Merge branch 'wip-MDL-51917-master' of git://github.com/marinaglancy/moodle 2017-06-19 12:21:45 +01:00
Marina Glancy
fe81ef397c MDL-51917 course completion: order activities in reports
Thanks to Nick Phillips for initial patch
2017-06-13 14:46:25 +08:00
Damyon Wiese
ddce4f4ba9 MDL-58136 cache: Add a course completion cache
The last change added 1 db read per course per page which is not OK. Add a cache to compensate.
2017-06-13 10:03:00 +08:00
Jake Dallimore
f939a6d452 MDL-54751 core_completion: Exclude activities pending deletion 2016-11-07 07:41:59 +08:00
sam marshall
5c2ef08fa3 MDL-55628 Completion: Use simpledata for completion cache
The completion cache is currently not marked as simpledata. On the
course page it is frequently retrieved hundreds of times which results
in many calls to the slow unserialize function. By making a slight
change to the data format (using arrays instead of objects) we can
mark it as simpledata, which will avoid using unserialize.
2016-08-22 17:13:36 +01:00
Dan Poltawski
194a02e409 MDL-52471 completion: fix deprecated use of 'object'
And add a unit test covering completion_can_view_data() without
full course object passed.
2015-12-10 15:47:11 +00:00
Ankit Agarwal
28ac49c899 MDL-46294 completion: Final deprecation of get_incomplete_criteria 2015-06-03 07:36:40 +05:30
Marina Glancy
f79747171d MDL-46960 completion: trigger event after clearing cache 2015-04-02 11:08:22 +02:00
Marina Glancy
0cc9d709ab MDL-46960 completionlib: adjustments to caching 2015-03-31 11:06:53 +08:00
Michael Wheeler
3871db0ac2 MDL-46960 completionlib: Move completion cache to MUC. 2015-03-31 09:31:30 +08:00
Ray Morris
3120e06440 MDL-46290 Completion: Remove unused function get_incomplete_criteria(), it doesn't work 2014-07-10 15:42:01 -05:00
Mark Nelson
02a5a4b2ff MDL-43557 events: fixed minor issues in existing events 2014-04-29 19:16:11 -07:00
Marina Glancy
cd5be9a504 MDL-44321 events: make sure the full object is passed to add_record_snapshot() 2014-02-28 16:37:36 +08:00
Eloy Lafuente (stronk7)
e16b1bb124 Merge branch 'MDL-41446-master' of git://github.com/sammarshallou/moodle 2013-12-03 23:55:42 +01:00
Adrian Greeve
e5d53a1c2f MDL-40844 - Activity completion: Update of the sql to include additional name fields.
The activity completion report wasn't showing the additional name fields.
2013-10-02 16:29:17 +08:00
Marina Glancy
88715ba2c0 MDL-41192 course: Can not write to the read-only properties of cm_info 2013-09-10 14:11:30 +10:00
sam marshall
1f8662f6fb MDL-41446 Completion: Incorrectly marks complete when grade data present with no actual grade 2013-09-06 13:01:50 +01:00
Rajesh Taneja
137d94f335 MDL-39955 completion: Added course_module_completion_updated event
Conflicts:

	lib/tests/completionlib_advanced_test.php
2013-08-09 17:04:34 +08:00
Frederic Massart
8ca0c12370 MDL-39536 completion: Prevent DB call when fetching activities 2013-06-04 12:57:10 +08:00
Yuliya Bozhko
278065528a MDL-35073 badges: Open badges integration
The badges feature allows to integrate Mozilla "Open Badges" to issue, assign,
manage and display digital badges in Moodle. This feature supports:
-- badge creation and issuing based on criteria
-- badge baking and verification service
-- direct pushing of internal badges to external backpack
-- interanl and external badge display in Moodle
-- Moodle block to display latest badges
2013-04-02 15:49:02 +08:00
Dan Poltawski
68a6d87684 Merge branch 'MDL-37473' of git://github.com/srynot4sale/moodle 2013-01-22 11:14:19 +08:00
Dan Poltawski
8b16bbfc68 Merge branch 'MDL-35556d' of git://github.com/srynot4sale/moodle 2013-01-15 13:15:31 +08:00
Aaron Barnes
3b461a0801 MDL-37473 completion: Add missing cap checks to tracked users functions
Namely get_num_tracked_users and is_tracked_user()
2013-01-11 14:41:05 +13:00
Frederic Massart
e40bd74620 MDL-36550 usability: CSS updates on course page 2012-11-26 17:00:29 +08:00
Aaron Barnes
5bb05a469a MDL-35556 completion: Improve user completion data permission checking 2012-11-12 00:13:36 +13:00
Dan Poltawski
cd1a9d05e8 Revert "MDL-35556 completion: Improve user completion data permission checking"
This reverts commit f493d528c2.
2012-11-09 16:50:09 +08:00
Aaron Barnes
f493d528c2 MDL-35556 completion: Improve user completion data permission checking 2012-11-05 19:03:18 +13:00
Dan Poltawski
99da334454 Merge branch 'MDL-34228-master' of git://github.com/sammarshallou/moodle 2012-10-16 16:19:25 +08:00
Marina Glancy
b46be6adf4 MDL-35339 Better cache reset for get_fast_modinfo(), allow exec get_fast_modinfo($courseid) 2012-10-15 14:08:15 +08:00
sam marshall
b61924d482 MDL-34228 Completion: Add capability that controls if a user is shown in reports 2012-10-04 10:50:10 +01:00
Aaron Barnes
1caeb4b450 MDL-32386 completion: Fix incorrect method parameters 2012-08-27 10:57:52 +12:00
Eloy Lafuente (stronk7)
7f4de36ddb MDL-31957 Course reset: Add missing global 2012-08-23 02:04:13 +02:00
sam marshall
5ae17b09a8 MDL-31957 Course reset: Does not erase activity completion data 2012-08-17 10:35:44 +01:00
Sam Hemelryk
395b805f97 Merge branch 'MDL-34225' of git://github.com/nebgor/moodle 2012-07-23 14:04:09 +12:00
Petr Škoda
c8b3346cfd MDL-33180 delete the last traces of SimpleTest - ciao and thanks 2012-07-21 10:11:50 +02:00
Aparup Banerjee
60829d8094 MDL-34225 course completion : moved criteria classes into criteria subdir 2012-07-12 12:04:36 +08:00