220 Commits

Author SHA1 Message Date
Ilya Tregubov
b26608d1d4 MDL-32103 completion: Fix CiBoT errors.
Old code still uses underscores in variable names, so CiBoT is
not happy. Making it constistant with Moodle code style.
2021-07-13 12:07:53 +02: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
Tomo Tsuyuki
745d4c2a4f MDL-70245 core_grade: Fix grade_get_setting unit test failures
To fix the phpunit issue, change from static variable to use cache
2020-12-10 16:46:09 +11:00
Marcus Boon
f1f5ba36ad MDL-68388 core_grades: Use MUC for grade letters
In the get_grade_letters there is a static variable that is used
to cache grade letters, we should use MUC for this so that it is
reset properly between unit tests.
2020-05-26 09:06:50 +10:00
Andrew Nicols
f8da1b9353 MDL-66722 forum: Add gradeitem storage handler
Part of MDL-66074
2019-10-30 10:23:40 +08:00
Peter
0320040469 MDL-66971 core: Update the convenience date grade getter to allow nulls 2019-10-22 10:30:17 +08:00
Andrew Nicols
4bb39eabc7 MDL-66733 grade: Add helper to get correct user date for grade 2019-09-20 09:50:17 +08:00
Simey Lameze
a5f691e43c MDL-65044 core: remove legacy grade_cron() function 2019-03-27 11:21:50 +08:00
Eric Merrill
d64e545a36 MDL-64609 gradebook: Prevent infinite loop in regrading 2019-01-22 21:40:12 -05:00
Damyon Wiese
091365330a MDL-63761 grade: Performance fix for regrading
Don't use a separate variable to count the number of items in finalids.
2019-01-02 10:23:20 +08: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
Damyon Wiese
c98e9fbae1 MDL-27520 core: Rewrite pluginfile URLs 2018-10-17 15:57:26 +08:00
Mark Nelson
5d7a9ea6f9 MDL-27520 core_grades: accept feedback files via grade_update() 2018-10-16 12:32:44 +08:00
Mark Nelson
8bfe908209 MDL-63002 core: fixed incorrect calls to non-existent delete_record() 2018-07-30 20:59:42 +08:00
Stephen Bourget
b4993d29f7 MDL-45837 Grades: Minor fixes to grade_letter events 2018-02-14 17:31:57 +01:00
John Okely
ea1d9f7c86 MDL-37168 grade: Debugging if gradebook callbacks are not both present 2017-03-20 16:02:11 +08:00
Juan Leyva
1896b8009a MDL-56307 course: API changes to support retrieve by time 2016-10-25 10:10:52 +01:00
David Mudrák
d676f6bd19 MDL-55987 gradebook: Claim extra memory when updating final grades
As we experienced in a bigger moodle.org course (7500 users, 70 grade
items), the standard memory limit 256M may not be enough here. We were
not able to find any obvious memory leak in the processing. Requiring
extra memory helped in this particular case and it seems reasonable to
have it in the core.
2016-09-16 12:39:47 +02:00
Adrian Greeve
93d3f310b0 MDL-55707 grades: Stop infinite loop when regrading. 2016-09-01 10:25:13 +08:00
Adrian Greeve
41abbbbde5 MDL-45390 gradebook: sql tidy up and version alignment. 2016-05-18 10:41:30 +08:00
Adrian Greeve
405b90bcd2 MDL-45390 gradebook: Grade boundary fix.
Code to upgrade, fix, and freeze the gradebook for
courses with letter boundary problems.
2016-05-18 09:56:00 +08:00
Adrian Greeve
5cb5d459c9 MDL-53279 grades: Additional comments
In the hopes that other people will understand this code.
2016-03-15 12:18:31 +08:00
David Monllao
f32e6ffc00 MDL-53279 grades: Recalculate only required items
Skip grade categories and calculated grade items that do not depend
on .
2016-03-15 12:18:23 +08:00
Andrew Nicols
87d71ecf69 MDL-49324 grade: Ensure weights adjusted message is displayed
The grade settings page displays a message to inform users that weights
have been adjusted if they did not previously add up to the required 100%.

With the change to sometimes displaying a progress bar, whether the message
is displayed must be calculated immediately after the regrade took place,
and before the page redirects.

I have added a callback with arguments to the regrade_if_required function
which is called immediately after regrade has taken place (regardless of
whether the progress bar is required).

This callback modifies the PAGE URL such that the redirect message will be
displayed after the redirect. This does not use the session as the message
should only be displayed immediately after a change. If the user does not
click on the continue button after the progress bar has been displayed, and
comes back to the page later, this may be confusing.
2016-02-24 14:39:09 +08:00
Andrew Nicols
0a802c9c4e MDL-49324 grades: Create helper function for regrading on report view 2016-02-24 14:39:08 +08:00
Damyon Wiese
30be6c846a MDL-49324 Grades: Use a progress bar when recalculating gradebook grades 2016-02-23 08:35:10 +08:00
Eric Merrill
17e56698ec MDL-49332 gradebook: Raise time limit if we get into regrade
Because all regrading should (and does) start from this point, it
is safe and best to call it just once, from this point.
2015-03-05 10:09:40 -05:00
Juan Leyva
a7888487f0 MDL-46527 grades: grade_get_grades external function rewritten 2014-10-21 12:10:01 +02:00
Frederic Massart
ef1b3e56f7 MDL-47345 core_grades: Pre-regrade method is executed from children to parent
Part of: MDL-46576
2014-10-03 13:53:02 +08:00
Frederic Massart
fcf6e01517 MDL-47056 core_grades: Prevent items being displayed as 'Error'
Before this patch we would be marking some items as 'needsupdate'
during an update. Leaving them aside and not effectively updating
them.

Part of: MDL-46576
2014-10-03 13:51:30 +08:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Juan Leyva
198e802f9d MDL-30085 core_grades functions moved to correct location 2014-03-31 15:15:17 +02:00
Andrew Davis
d35499312d MDL-30085 core_grade: added a grade web service 2014-03-31 15:15:17 +02:00
Petr Škoda
2f1e464a88 MDL-40438 migrate all collatorlib:: and textlib:: uses 2013-08-06 21:04:35 +02:00
Petr Škoda
bd3b3bba9f MDL-40220 use new core_component::get_plugin_list() 2013-07-16 22:36:11 +02:00
Frederic Massart
8e8891b76b MDL-40403 libraries: Deprecate get_parent_contexts() 2013-07-09 13:34:44 +08:00
Andrew Davis
459843d495 MDL-32913 core_grade:made it more obvious when the gradebook is broken due to a broken calculation 2013-05-02 09:03:02 +08:00
Andrew Davis
69bcca5e9c MDL-36061 core_grade: added some unit tests related to refresh_grades() 2012-11-15 11:14:21 +08:00
Adrian Greeve
b0c6dc1cac MDL-34465 - lib - Replacing get_context_instance with context_XXXX::instance (group 8) 2012-07-27 10:10:46 +08:00
Andrew Davis
ca540697f1 MDL-31362 grade: removed GRADE_UPDATE_ITEM_DELETED as it is not genuinely being used anywhere 2012-03-03 10:00:01 +07:00
Eloy Lafuente (stronk7)
a4d7604977 MDL-30999 grade phpdocs - change some inline @see by correct @link 2012-02-20 12:09:50 +01:00
Andrew Davis
a153c9f2fe MDL-30999 grade: updated Grade API phpdocs 2012-02-14 14:04:19 +07:00
Petr Skoda
16ef46e7b6 MDL-29450 improve and cleanup course content removal
New keep roles/enrolments and groups/groupings options, notification CSS fixed, standardised notification texts, added missing delete of module blocks, fixed file deleting and some other minor issues.
2011-11-23 18:37:36 +01:00
Sam Hemelryk
d609d96261 MDL-28599 textlib Separated collator to collatorlib with static methods, and added support for locale aware sorting of objects 2011-09-06 15:39:00 +12:00
Petr Skoda
cf717dc26b MDL-27148 use new get_in_or_equal() param prefix instead of start 2011-04-14 15:15:01 +02:00
Petr Skoda
2293a504eb MDL-25718 fix incorrect 'no grade' test and improve coding style 2011-04-12 10:06:13 +02:00
Andrew Davis (andyjdavis)
13ba903634 enrol MDL-25718 added ability to recover user grades from grade history 2011-04-08 15:06:27 +08:00
Eloy Lafuente (stronk7)
b967c54185 MDL-25708 recordsets - fix events/grade/group/moodle libs 2011-01-25 19:58:59 +01:00
Petr Skoda
365a594107 MDL-24321 switching to stdClass in /lib/ 2010-09-21 08:07:44 +00:00
Petr Skoda
d9504e4446 improved phpdocs 2010-09-18 11:57:26 +00:00