572 Commits

Author SHA1 Message Date
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
Luca Bösch
aee27d0a9b MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:46:09 +02:00
Mark Nelson
1b7236cbd5 MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:23:51 +08:00
Sujith Haridasan
7b3f43db95 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:07:53 +05:30
John Yao
11886d37ed MDL-67636 gradebook: Prevent exposing hidden grade in locked category 2020-11-19 14:29:55 +11:00
Eloy Lafuente (stronk7)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Nathan Nguyen
293760a4b5 MDL-68680 core_grades: check grade item before trigger delete event 2020-08-28 08:58:20 +10:00
Tom Dickman
68049ac848 MDL-65923 core grades: Add a new event for when a grade item is deleted 2020-07-30 08:18:59 +10:00
Matt Davidson
887679e510 MDL-68163 gradebook: add grade item duplication 2020-06-02 09:28:29 -04:00
Martin Gauk
966556074c MDL-51694 core_grades: use transactions when deleting 2020-05-04 12:48:41 +00:00
Claude Vervoort
ae46b7442c MDL-67132 mod_lti: document new param 2020-02-25 21:22:45 -05:00
Claude Vervoort
4da02a6824 MDL-67132 mod_lti: call grade api to trigger course total computation 2020-02-13 15:20:04 -05:00
Eloy Lafuente (stronk7)
f4feabb83f MDL-66968 php74: array_key_exists() for objects is deprecated
Replace it for correct property_exists() when the element
being inspected is a property of object/class.

Amended and squased changes:
- keep mongo unmodified. The information is array, hence correct.
- fix a couple of messaging phpdocs that were incorrect.

Amended take#2:
- As far as mongo resturns BSONDocument that is ArrayObject, aka
implements ArrayAccess, we have decided to explicitly cast results
to array so existing array_key_exists() and other accesses will
continue working the same.
2019-10-25 00:49:04 +02:00
Nathan Nguyen
2aaac3f670 MDL-46978 core_grades: preserve category total visibility 2019-09-19 14:05:01 +10:00
Dmitrii Metelkin
f82931c169 MDL-65922 core: add grade_item_updated event 2019-06-21 08:54:37 +10:00
Dmitrii Metelkin
657cc33be9 MDL-65622 core: add grade_item_created event 2019-06-07 07:38:41 +10:00
Damyon Wiese
031cf251c1 MDL-64878 grades: Rebuild cache on import
When the course module cache is out of date during a gradebook re-calculcation it throws
throws exceptions because the module cannot be found. This prevents access to gradebook or
any type of grading functions until the cache is rebuilt.

When the cache still has no module record we log an error and return the course context.
2019-02-27 10:37:31 +08:00
Mark Nelson
ac81c98648 MDL-63591 core_grades: delete files when grade object is deleted 2018-11-21 16:15:12 +08:00
Mark Nelson
ec8471c966 MDL-27520 core_grades: add methods to grade_object for feedback files 2018-10-17 15:57:27 +08:00
Mark Nelson
80b6fb7a79 MDL-27520 core_grades: make constant names clearer
Also using them in more locations.
2018-10-17 15:57:27 +08:00
Damyon Wiese
c98e9fbae1 MDL-27520 core: Rewrite pluginfile URLs 2018-10-17 15:57:26 +08:00
Mark Nelson
95ed603361 MDL-27520 core_grades: create grade history filearea and copy files 2018-10-17 13:15:49 +08:00
Mark Nelson
5d7a9ea6f9 MDL-27520 core_grades: accept feedback files via grade_update() 2018-10-16 12:32:44 +08:00
Jake Dallimore
7e93539cf6 MDL-36255 core_grade: fix to ensure correct context used for filters
Some grade object (outcomes,scales) can be created at site or course
context, so this patch just makes sure we use the respective context
when applying format_string to the name in the get_name() function.
2018-08-22 17:55:50 +08:00
Luca Bösch
8ad225b431 MDL-36255 grades: allow multilang filters in grades 2018-08-20 08:29:36 +02:00
Stephen Bourget
b4993d29f7 MDL-45837 Grades: Minor fixes to grade_letter events 2018-02-14 17:31:57 +01:00
Stephen Bourget
2f3b709859 MDL-45837 Grades: Add events for scales 2018-02-09 11:41:38 +08:00
Marina Glancy
20060b3b2e MDL-59055 grades: provide backward-compatibility of changes 2017-08-07 09:56:14 +08:00
Marina Glancy
be85f0cf88 MDL-59055 grades: fix bug displaying item id instead of grade
Thanks to Marcelo Santos for initial patch
2017-08-07 09:56:14 +08:00
Marina Glancy
212c6861b4 MDL-41809 course: do not rely on page context
page context may not be set, use the correct course context when calling format_string
2017-03-23 14:44:33 +08:00
Ankit Agarwal
cb9abded42 MDL-50729 gradelib: Regrade event should be assigned to system 2017-02-14 10:15:52 +05:30
Jake Dallimore
a9ac13885c MDL-54751 core_grade: Fix missing require_once in grade_item get_name 2016-11-07 14:35:16 +08:00
David Monllao
c9af13123d MDL-54751 course_modules: New major upgrade point
Also trailing whitespace cleaned.
2016-11-07 08:59:04 +08:00
Jake Dallimore
45bd824e59 MDL-54751 core_grades: Gradebook highlights modules pending deletion
Added warning to all gradebook pages if any modules are pending
deletion. Modified the return values for get_name, and is_locked for
affected grade items to indicate their pending deletion.
2016-11-07 07:41:59 +08:00
Russell Smith
82905c097c MDL-51584 gradebook: use direct $CFG access for freeze.
get_config() is called a lot of times on freeze and is expensive,
using $CFG is much lower overhead.
2016-10-10 15:42:04 +11:00
Adrian Greeve
93d3f310b0 MDL-55707 grades: Stop infinite loop when regrading. 2016-09-01 10:25:13 +08:00
Michael Aherne
0c0f01aa4c MDL-54613 unit tests: Add iteminstance to test grade_item 2016-05-17 13:06:32 +01:00
Damyon Wiese
d03602c86b MDL-52253 scales: Prevent deletion of the last global scale 2016-05-13 18:12:31 +08:00
Dan Poltawski
913dcb1b81 Merge branch 'MDL-53451-master-fixup' of https://github.com/FMCorz/moodle 2016-04-20 11:28:55 +01:00
Dan Poltawski
ad2382730e Merge branch 'MDL-53309_master-second-attempt' of git://github.com/dmonllao/moodle 2016-04-20 10:27:57 +01:00
Frederic Massart
4fd183d3c3 MDL-53451 competency: Hook for scale_used used undefined variable 2016-04-20 15:44:01 +08:00
Frederic Massart
8d0c57ed08 MDL-53700 competency: Migrating scale_used hook to core 2016-04-18 11:06:00 +08:00
David Monllao
1076e02f29 MDL-53309 grades: Only update when required 2016-04-15 15:15:32 +08:00
Dan Poltawski
b9280927d6 Merge branch 'MDL-53543_master' of git://github.com/dmonllao/moodle 2016-03-29 16:45:37 +08:00
Dan Poltawski
4a166bfd16 Merge branch 'wip-MDL-51867-master2' of https://github.com/marinaglancy/moodle 2016-03-22 13:13:57 +08:00
David Monllao
8f8517ec1f MDL-53543 cache: Invalidate grade_categories by event
We can switch the cache to session level if we are able to purge
different users caches, not only the one that belongs to the user
updating a grade category.
2016-03-18 10:02:05 +08:00
Marina Glancy
322f314155 MDL-51867 scales: any plugin type can declare a scale as used 2016-03-16 13:15:36 +08:00
Andrew Nicols
37f9c6a2d6 Merge branch 'MDL-53301_master' of git://github.com/dmonllao/moodle 2016-03-15 15:50:15 +08:00
Andrew Nicols
97a3b6d23d Merge branch 'MDL-48838_master' of git://github.com/dmonllao/moodle 2016-03-15 12:06:48 +08:00