108299 Commits

Author SHA1 Message Date
Andrew Nicols
bdeda3ea9b
Merge branch 'MDL-78149-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-15 22:07:13 +08:00
Andrew Nicols
01c04f4cf8
Merge branch 'MDL-78140-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-15 22:03:30 +08:00
Paul Holden
9ef8025e4c
MDL-78242 roles: consistently check course contact config. 2023-05-15 13:04:48 +01:00
Tim Hunt
efe895f1bb MDL-75576 quiz/question statistics: don't expire by time
Previously, a set of calculated quiz statistics would only 'last' for
15 minutes. Then they would be considered invalid and not used.

Now, computed statistics are kept indefinitely. Instead, when a new
batch of values are computed for a particular set of settings, older numbers
for the same settings are deleted first. Therefore,
question_stats_cleanup_task is no more.
2023-05-15 10:04:34 +01:00
Tim Hunt
a532f407bb MDL-75576 quiz statistics: don't time-limit the use of cached values
This should have been done as part of  MDL-74762, but was missed.
2023-05-15 10:04:33 +01:00
Tim Hunt
86932a330b MDL-75576 quiz statistics: don't compute when a user views the qbank
Previously, when users viewed the question bank, if the quiz statistics
had not already been calculated, we would try to compute them there an then.
This could be very, very slow, leading to session lock problems.

Now, we never try to compute the statistics on the fly. Instead, we rely
on the existing \quiz_statistics\task\recalculate scheduled task to do it.
2023-05-15 10:04:33 +01:00
Tim Hunt
db9a0e296a MDL-75576 question bank: bulk-load statistics for all questions at once
There is a new method on the column class, for the column to declare any
statistics it requires. The question then efficiently loads all those
statistics in one go, and makes them available as the columns are
rendererd, or do any subsequent processing.
2023-05-15 10:04:33 +01:00
Tim Hunt
9ff59e99ff MDL-75576 qbank_statistics: remove copy-pasted PHPdoc comments
These methods are already correctly documented on the base class.
2023-05-15 10:04:32 +01:00
Luca Bösch
997990f94f MDL-78120 login: handle empty wantsurl on login with alternateloginurl. 2023-05-15 10:19:00 +02:00
Paul Holden
e5132eff2f
MDL-77995 javascript: more precise path matching building JS. 2023-05-15 09:05:51 +01:00
Paul Holden
7093578baf
MDL-77723 user: ensure identity refers to a valid custom profile field. 2023-05-15 09:03:40 +01:00
Jun Pataleta
28026b923a Merge branch 'MDL-76903-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-05-15 12:06:02 +08:00
Andrew Nicols
0e4426818a
Merge branch 'MDL-78125-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-05-15 11:58:59 +08:00
Jun Pataleta
e9f6b9c2d6 MDL-78125 qtype_multianswer: Convert popover trigger to link
According to Boostrap Popovers documentation for popovers triggered
on focus:
"For proper cross-browser and cross-platform behavior, you must use the
<a> tag, not the <button> tag, and you also must include a tabindex
attribute."
2023-05-12 22:47:11 +08:00
Luca Bösch
f1dd604fce MDL-77432 mod_assign: Confirm submission page standard and not incourse 2023-05-12 09:44:22 +02:00
Ilya Tregubov
017a3274fe
weekly release 4.1.3+ 2023-05-12 08:56:50 +08:00
Ilya Tregubov
3b9bfc1d79
Merge branch 'install_401_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_401_STABLE 2023-05-12 08:56:48 +08:00
Cameron Ball
77eb2ed79b MDL-75898 assignfeedback_editpdf: Add randomness to PDF annotations
The behat step "I draw on the pdf" creates the exact same line every
time it is called. This can cause issues in a situation like the following:

- Student uploads PDF
- Teacher annotates page 1
- Student edits submission, adding another PDF
- Teacher annotates page 1 again
- When the student looks at their annotated PDF it appears the same as
  before they added the second PDF (i.e., they don't see extra pages for
  the second PDF)

Exactly why this happens isn't clear, and in practice this probably never
happens because the chances of drawing the exact same line twice are almost
0. However, when testing the functionality added in MDL-45580 it was causing
issues.
2023-05-12 09:14:03 +10:00
Cameron Ball
90350915c2 MDL-75898 assignfeedback_editpdf: Don't poll readonly pages
When requesting the readonly version of pages (which contain
teacher annotations), they should always be available - the
PHP side even throws an exception when they're not. This
means we don't need to worry about polling document converters
from the JS side and can just return the pages immediately.
2023-05-12 09:14:03 +10:00
Cameron Ball
825609ae08 MDL-75898 assignfeedback_editpdf: Improve page count mismatch logic
MDL-45580 introduced the readonlypages filearea, and when loading
page images for an attempt, the code would check if the pages existed
, creating them if not. The code inside this block also contained
a guard clause for the case where no readonly pages existed - which
is a situation that should not happen. Whenever readonly pages are
requested, they should exist.

MDL-66626 introduced a situation where page counts not matching would
also retrigger page generation. However this led to a situation where
the guard clause could be entered when requesting readonly pages.

This patch refactors the guard clause, and improves the logic to
regenerate pages.
2023-05-12 09:14:03 +10:00
Paul Holden
5b3d55def7
MDL-78226 contentbank: verify presence of bank heading element. 2023-05-11 23:16:33 +01:00
Paul Holden
67effa603e
MDL-78225 output: add sesskey for post requests only in renderables. 2023-05-11 22:48:54 +01:00
Laurent David
20b4efad5c MDL-76903 mod_book: Fix activity completion
* Check only visibles pages to set completion status.
* Make sure we have consistent completion value in API and on the view page.
2023-05-11 12:09:24 +02:00
Paul Holden
11af0c5388
MDL-78140 analytics: improve context restrictions manager test.
This test apparently fails sporadically on Oracle, without obvious
causes. The failure however was hard to interpret, and the test
itself made a lot of assumptions about the system re. naming of
categories/courses. This could be prone to errors, so improve that.
2023-05-11 09:38:01 +01:00
Paul Holden
683840999d
MDL-77946 access: fix category sort order of capability contexts. 2023-05-11 08:33:32 +01:00
Jun Pataleta
f8537a9536 Merge branch 'MDL-76344-401-fix' of https://github.com/stevandoMoodle/moodle into MOODLE_401_STABLE 2023-05-11 14:35:30 +08:00
Stevani Andolo
7b1e0a6980 MDL-76344 course: Fixed course image 'non image file' layout 2023-05-11 14:11:16 +08:00
Jake Dallimore
838047106d
Merge branch 'MDL-75552-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-05-11 11:23:49 +08:00
Sara Arjona
84175f399f Merge branch 'MDL-78040-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-10 19:45:18 +02:00
Paul Holden
9e0f8fc7bf
MDL-78211 contentbank: fix context option when formatting categories. 2023-05-10 17:42:29 +01:00
Paul Holden
c228866a46
MDL-78151 core: account for timezone differences in intl extension.
Recent additions to timezones from the IANA TZDB are not necessarily
reflected in those used by the intl extension and/or ICU zones:

 * America/Ciudad_Juarez
 * America/Nuuk
 * Europe/Kyiv
 * Pacific/Kanton

Create mapping to allow these zones to be used without errors.
2023-05-10 17:12:33 +01:00
Juan Leyva
d82f68742b MDL-78196 user: Fix files used space check 2023-05-10 17:17:48 +02:00
Andrew Nicols
da78523b15
Merge branch 'MDL-77592-401' of https://github.com/golenkovm/moodle into MOODLE_401_STABLE 2023-05-10 13:03:57 +08:00
Andrew Nicols
5ceb711355
Merge branch 'MDL-78034-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-10 13:00:30 +08:00
Ilya Tregubov
1d5ef6aa9a
Merge branch 'MDL-75623-MOODLE_401_STABLE' of https://github.com/sh-csg/moodle into MOODLE_401_STABLE 2023-05-10 11:46:40 +08:00
Paul Holden
d3b4e4a9a5
MDL-78170 rating: consistently calculate average rating aggregation.
Ensure it's always cast by the database as a float, to avoid loss of
precision.
2023-05-09 15:57:43 +01:00
Paul Holden
d7ba3f656d
MDL-78149 mod_data: ensure group selector is always present. 2023-05-09 12:20:35 +01:00
Paul Holden
48963bb7a7
MDL-78152 mod_book: set permissions required for page editing. 2023-05-09 12:11:32 +01:00
Shamim Rezaie
f36c96411d MDL-77451 gradereport: stress handling for multiple clicks 2023-05-09 19:15:37 +10:00
Andrew Nicols
50d1e69df6 MDL-75552 badges: move apiBase consumption to backpack
The apiBase in .well-known/badgeconnect.json was ignored and it was
causing some failures when connecting or sending badges to an
external backpack.
For OBv2.1, it has been changed to always use the apiBase defined
in the badgeconnect.json backpack provider.
2023-05-09 08:51:30 +02:00
Rajneel Totaram
f6c5fa3bfc MDL-77930 accesslib: php81 deprecation warnings on missing plugins 2023-05-09 17:37:00 +12:00
Juan Leyva
d838917d28
MDL-78072 airnotifier: Apply payload size optimisation to all push
Backport of MDL-77893.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>
2023-05-09 13:07:10 +08:00
Juan Leyva
1af4ace4d6
MDL-78072 airnotifier: Allow configuring how to process encrypted notifs
Backport of MDL-77893.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>
2023-05-09 13:07:09 +08:00
Juan Leyva
5c85fb975d
MDL-78072 airnotifier: Leave only message data processed by: Airnotifier
Backport of MDL-77893.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>
2023-05-09 13:07:09 +08:00
Juan Leyva
2ad6fecca5
MDL-78072 airnotifier: Allow to set publickey when creating new device
Backport of MDL-77893.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>
2023-05-09 13:07:09 +08:00
Sara Arjona
1201526dbc
MDL-78072 core: Fix upgrade failures with MariaDB
Backport of MDL-76722.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>

The 'enable' field doesn't exist, and this is causing some failures
with MariaDB (and probably with MySQL too).
2023-05-09 12:26:00 +08:00
Alex Morris
6ccb50ea9d
MDL-78072 message_airnotifier: Add encrypted notifications
Backport of MDL-76722.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>
2023-05-09 12:25:47 +08:00
Alex Morris
25498b6b62
MDL-78072 user: Add new update_user_device_public_key webservice
Backport of MDL-76722.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>
2023-05-09 12:25:29 +08:00
Alex Morris
a2179f028c
MDL-78072 lib/db: Add new publickey field to user_devices table
Backport of MDL-76722.

Co-authored by: Andrew Lyons <andrew@nicols.co.uk>
2023-05-09 12:25:16 +08:00
Petr Skoda
a7920b3860 MDL-76688 filter_text: prevent LaTeX3 syntax 2023-05-08 10:12:46 +02:00