96 Commits

Author SHA1 Message Date
Damyon Wiese
afd5c94dbf MDL-64283 competency: Correct numbering in tests 2018-11-30 09:30:50 +08:00
David Monllao
0422a13c90 Merge branch 'MDL-63764-master' of git://github.com/mickhawkins/moodle 2018-11-05 12:46:12 +01:00
Eloy Lafuente (stronk7)
bd5fdcfccd MDL-63422 general: review core loop / switch / case / continue
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:

- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.

The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
  change to continue 2
- When it was not clear, keep old behavior switching to break, no
  matter how weird the behavior may be.
2018-10-31 00:17:59 +01:00
Michael Hawkins
cabea2fc04 MDL-63764 core_competency: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-29 12:59:55 +08:00
Michael Hawkins
b03e9322bf MDL-63764 core_competency: Support bulk user delete course competencies
This issue is a part of the MDL-62560 Epic.
Also made user IDs optional, so user course competencies can be deleted by course ID only.
2018-10-29 12:59:55 +08:00
Adrian Greeve
3714fe7e6e MDL-57244 general: Remove old class renames. 2018-07-23 15:54:13 +08:00
Eloy Lafuente (stronk7)
4f510bea17 Merge branch 'MDL-62384-master' of git://github.com/andrewnicols/moodle 2018-05-11 18:12:45 +02:00
Adrian Greeve
5a329d81f9 MDL-62384 core_competency: Update to sql to increase performance. 2018-05-11 09:15:27 +08:00
Marina Glancy
468c8d39c3 MDL-62351 privacy: check that subsystem/plugintype exist 2018-05-09 17:37:31 +08:00
Frédéric Massart
9967731256 MDL-61877 core_competency: False negative due to random ordering 2018-05-04 11:18:42 +02:00
Frédéric Massart
739b59610a MDL-61877 core_competency: Handle comments in privacy API 2018-04-27 11:29:30 +08:00
Frédéric Massart
f8a6a533c2 MDL-61877 core_competency: Implement privacy API 2018-04-27 11:29:29 +08:00
Eloy Lafuente (stronk7)
a4e7e6f345 Merge branch 'MDL-60567-master' of git://github.com/damyon/moodle 2017-12-19 11:30:08 +01:00
Jun Pataleta
24131d08c0 Merge branch 'MDL-59970-master' of git://github.com/damyon/moodle 2017-12-12 18:52:49 +13:00
Simey Lameze
f9bb74c037 MDL-58058 competency: replace other sortorder usages 2017-12-08 15:58:52 +08:00
Frederic Massart
f250cdbb34 MDL-58058 competency: Allow unspecified sortorder for new competencies 2017-12-08 15:58:52 +08:00
Damyon Wiese
9a7671da80 MDL-59970 competencies: performance
Remove useless get_records call in get_least_proficient_competencies_for_course function.
On big sites this would cause huge memory usage.
2017-11-22 15:35:20 +08:00
Damyon Wiese
1518ce952f MDL-60567 competencies: test list_competencies 2017-10-27 11:50:11 +08:00
Damyon Wiese
f09f01fcad MDL-60567 competencies: list_competencies wrong type
"validate_params" returns arrays in external functions.
2017-10-27 11:49:13 +08:00
Jake Dallimore
54ec93885c MDL-60243 competencies: fix ordering bug in api_test unit test
list_user_competencies_to_review() orders by shortname, but the test
creates 2 user competencies with the same short name, resulting in
unpredictable results. This patch fixes that.
2017-09-27 09:19:32 +08:00
Simey Lameze
2fc95ecf80 MDL-59994 competency: improve user competency unit test 2017-09-18 08:32:12 +08:00
Simey Lameze
8c13028c9d MDL-59994 competency: dont list competencies from deleted users 2017-09-18 08:32:12 +08:00
Tony Levi
95c0b810bf
MDL-49398 accesslib: Change competency to use new accesslib function 2017-06-02 10:04:09 +01:00
Simey Lameze
b991325da2 MDL-58884 core_competency: add exporter required course fields 2017-05-17 13:02:48 +08:00
Issam Taboubi
013982e3c4 MDL-58884 competency: Inaccurate stats proficient competencies in course 2017-05-10 15:08:21 -04:00
Andrew Nicols
458e5f66c2 MDL-58754 competency: Change query for DISTINCT COUNT 2017-05-02 14:48:35 +08:00
Ankit Agarwal
f939ae13f9 MDL-58624 persistent: Use correct namespace for exception 2017-04-18 13:54:45 +05:30
Damyon Wiese
ac40d8b589 MDL-57596 forms: CLEANHTML in persistent forms
Add special handling for text fields with the CLEANHTML type. This should
be used when students and teachers can edit the same field (you can't trust those students).

Applies cleaning on submitted data, and on data stored in the DB before it is put back in an editing form.
2017-03-10 18:04:48 +00:00
David Mudrák
6f88c26864 MDL-57597 competency: Fix serving of prior learning evidence files
For security reasons, all files submitted by students must be disposed
as attachments, not inline contents.
2017-03-10 18:03:51 +00:00
Damyon Wiese
6b206c5309 MDL-57273 persistent: Dont allow set and get for helpers
Helper methods (ie custom methods on a persistent) should not be callable via set() or get() even
if they start with set_ or get_. They are not the same as custom getters and setters for real persistent
properties.
2017-01-24 15:39:53 +08:00
Damyon Wiese
0ce135f65d MDL-57273 persistent: Some more magic __call conversions
I missed all the entry pages when converting from set_abc() and get_abc() to set('abc', ) and get('abc').

Also fixed a wrong namespace for core_competency\external\performance_helper
2017-01-24 15:20:07 +08:00
Damyon Wiese
d5818626c0 MDL-57273 persistent: Improved style
Use \blah::class instead of '\\blah' in define_class functions.
Allow chaining of setters by returning $this.
2017-01-23 11:58:59 +08:00
Damyon Wiese
599acbe776 MDL-57273 persistent: protected custom getters
(and setters).
2017-01-20 12:56:19 +08:00
Damyon Wiese
9c91a9593d MDL-57273 core: Remove magic setters and getters
Remove the magic getters and setters from persistent. They are deprecated only in the persistent
class for competencies.
2017-01-20 12:56:19 +08:00
Frederic Massart
32896dcbab MDL-57273 core: Using $renamedclasses for deprecated classes 2017-01-20 12:56:19 +08:00
Frederic Massart
c59e531301 MDL-57273 exporter: Clarify why contextname needs to be PARAM_RAW 2017-01-20 12:56:19 +08:00
Frederic Massart
4bc68a416e MDL-57273 core: Exporters support custom formatting parameters 2017-01-20 12:56:19 +08:00
Frederic Massart
268beda8e9 MDL-57273 core_competency: Fatal error in external update_plan 2017-01-20 12:56:18 +08:00
Frederic Massart
f5f02ac0d3 MDL-57273 core: Migrating some exporters from tool_lp & core_competency 2017-01-20 12:56:18 +08:00
Frederic Massart
476bf96f4d MDL-57273 core: Added a performance helper to use with exporters 2017-01-20 12:56:18 +08:00
Frederic Massart
6e28143599 MDL-57273 core: Migrating core_competency exporters into core 2017-01-20 12:56:18 +08:00
Frederic Massart
2198e0e94a MDL-57273 core: Migrating persistent from core_competency into core 2017-01-20 12:56:18 +08:00
Frederic Massart
0eda810d17
MDL-56459 competency: Invalid use of indirect property key
This change ensures that PHP7 and earlier work the same way. Before
the patch PHP < 7 would not expand the property as we expected it.

More information here:
http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.variable-handling.indirect
2016-11-16 13:53:31 +08:00
Michael Aherne
fc60769302 MDL-56668 competencies: Correct namespacing of coding_exception 2016-11-03 13:59:13 +00:00
Amanda Doughty
cc350fd9c8 MDL-47162 core_message: Add course id to message eventdata 2016-10-27 18:11:27 +02:00
Issam Taboubi
fd8043b2de MDL-56285 competency: fix move competencies capabilities
In learning plan templates, cannot move competencies
around even if capability templatemanage is given
to the role because of bad context check
2016-10-06 10:33:32 -04:00
Andrew Nicols
dbab30b127 MDL-55767 competency: Deprecate langstring and replace 2016-10-03 12:59:32 +08:00
Damyon Wiese
9e14057444 MDL-55767 competencies: Better exceptions for persistent
The persistent exceptions "squash" all the details and only display
them to developers. This leads to generic "Invalid persistent" messages
with no explanation. Instead lets include the message detail always.
2016-10-03 12:01:56 +08:00
Rajesh Taneja
52f3e060e4
MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
Andrew Nicols
aa49ee0f29 Merge branch 'wip-mdl-55043' of https://github.com/rajeshtaneja/moodle 2016-07-07 11:27:58 +08:00