Commit graph

101784 commits

Author SHA1 Message Date
Jun Pataleta
cc049c74c3 Merge branch 'MDL-72925_311_v2' of https://github.com/TomoTsuyuki/moodle into MOODLE_311_STABLE 2021-11-17 16:05:56 +08:00
Ilya Tregubov
7664fd2dc6 Merge branch 'MDL-69496_311' of https://github.com/1JackBlack1/moodle into MOODLE_311_STABLE 2021-11-17 09:02:23 +02:00
Andrew Nicols
5aedafd786 MDL-71882 grunt: Replace module names
When a third-party AMD module is provided with an included name we must
replace it with a name that we are able to use.

The structure of an AMD module define function is:

    [name], [dependencies], [callback]
    String, Array,          Function

Each of these is (strangely) optional.

We know that the name is the only String and will always be the first,
and we can use AST to remove a provided name before adding the
Moodle-specific name.

This should be a safe change and not lead to any changes in built code,
but will make it easier to include third-party code.

An additional logging line is also included to inform developers that a
change was made.
2021-11-17 09:20:41 +08:00
AMOS bot
317c441994 Automatically generated installer lang files 2021-11-17 00:07:28 +00:00
PraiseSatan
4124e8b4bb MDL-69496 quiz: Only validate completion if unlocked
Quiz completion settings are only validated if they are unlocked.
Undefined behaviour in the forms API results in the completion
settings 'require passing grade' and 'completion attempts exhausted'
not being sent to the process options function if completion
settings are locked. This resulted in the completion attempts
exhausted setting being disabled whenever the quiz was saved
as it did not detect the require passing grade setting.
This changes the behaviour so that validation is only performed
if the completion settings are unlocked.
A behat test is included to ensure the setting does not change.
2021-11-17 09:02:51 +11:00
Eloy Lafuente (stronk7)
ba28c8f782 weekly release 3.11.4+ 2021-11-16 13:59:57 +01:00
Eloy Lafuente (stronk7)
dd78b8f983 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2021-11-16 13:59:52 +01:00
Tomo Tsuyuki
ff274fa59d MDL-72925 mod_forum: Filter discussion when grading 2021-11-16 15:24:50 +11:00
Jun Pataleta
4203758fa8 Merge branch 'MDL-72966-311' of https://github.com/NashTechOpenUniversity/moodle into MOODLE_311_STABLE 2021-11-16 11:38:55 +08:00
Faisal Kaleem
d0c0a787dd MDL-72967 lib: fix typo in excellib insert_bitmap() method 2021-11-16 10:33:31 +08:00
AMOS bot
b884ed5941 Automatically generated installer lang files 2021-11-16 00:07:24 +00:00
Shamim Rezaie
bb1be809d1 MDL-70721 output: Remove redundant title
The format_string() function does half html escaping. It escapes < and >
characters, but does not escape ". Therefore, it put us in a situation
where neither {{}}, nor {{{}}} are suitable in templates. If we use {{}}
for an attribute (like title or aria-label), then < and > characters
will be double escaped. On the other hand, if we use {{{}}} there, a
double quote character will break HTML when it is used in an attribute.
Therefore, neither {{}}, nore {{{}}} are usable in html attributes.

Moreover, The title attribute here was redundant because it had the same
value as the link's text.
2021-11-16 10:09:11 +11:00
Shamim Rezaie
c587c353c5 MDL-70721 output: remove {{#quote}} wherever it was misused
Also use the new {{#cleanstr}} helper where it was more appropriate
than the {{#str} helper.
2021-11-16 10:09:10 +11:00
Eloy Lafuente (stronk7)
4e66f86add Merge branch 'MDL-72096-311' of https://github.com/mickhawkins/moodle into MOODLE_311_STABLE 2021-11-15 19:13:09 +01:00
Eloy Lafuente (stronk7)
c107be7b61 Merge branch 'MDL-72908-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-11-15 18:58:59 +01:00
Paul Holden
23b87ccdd7 MDL-72908 admin: correctly distinguish purging all/selected caches. 2021-11-15 12:20:03 +00:00
Michael Hawkins
d5038f41fe MDL-72096 core: Add safe ORDER BY helpers for db sorting from user input
The new get_safe_orderby() and get_safe_orderby_multiple() methods
provide a centralised safe way for user submitted sorting values to be
incorporated into SQL ORDER BY. They do this by removing the need for
user submitted data to pass in any SQL and not allowing arbitrary
column values, instead using string keys which map to a predefined
list of allowed sortable columns.
2021-11-15 19:47:49 +08:00
Shamim Rezaie
3c9e9efc97 MDL-70721 core: a new mustache helper to clean string after get_string 2021-11-15 22:16:05 +11:00
Thong Bui
6eb4b2d437 MDL-72966 File upload: Uncaught Error from JS when uploading the file 2021-11-15 07:33:28 +07:00
PraiseSatan
8bfe7b0759 MDL-69496 form: Check if element has attributes
Checks if a form element has attributes before
trying to get the default value. This fixes
an error when trying to get the default value
for a frozen group which does not have the
attributes array.
2021-11-15 09:41:54 +11:00
Paul Holden
ec0558f5ba MDL-72791 customfield: correct access checks for course search data. 2021-11-12 15:08:49 +00:00
Paul Holden
0efdee5e6e MDL-72443 files: support svg preview as with other image types. 2021-11-12 15:07:09 +00:00
Eloy Lafuente (stronk7)
5d7fa92613 weekly release 3.11.4+ 2021-11-12 13:40:33 +01:00
Eloy Lafuente (stronk7)
fc47a37c54 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2021-11-12 13:40:29 +01:00
Jun Pataleta
4d15d33bee Merge branch 'MDL-61671-311' of git://github.com/jleyva/moodle into MOODLE_311_STABLE 2021-11-12 10:49:08 +08:00
Shamim Rezaie
8f22de6a46 Merge branch 'MDL-60850-311' of https://github.com/junpataleta/moodle into MOODLE_311_STABLE 2021-11-12 13:00:27 +11:00
Jun Pataleta
a33234adf2 MDL-60850 mod_lti: Centre-align tool configure form elements 2021-11-12 09:41:49 +08:00
Jun Pataleta
5186a0bef8 Merge branch 'MDL-72982-311' of https://github.com/junpataleta/moodle into MOODLE_311_STABLE 2021-11-11 23:01:23 +08:00
Luuk Verhoeven
c8a93bcabe MDL-72982 tool_dataprivacy: add class name to email table 2021-11-11 22:59:05 +08:00
Sara Arjona
2a31eb2aba Merge branch 'MDL-71751-311' of https://github.com/nguyenphuctien/moodle into MOODLE_311_STABLE 2021-11-11 12:44:33 +01:00
Andrew Nicols
0b18f96813 MDL-71751 js: Do not stop propagation on drop, and handle it properly 2021-11-11 15:57:26 +07:00
Jun Pataleta
41624e65d6 Merge branch 'MDL-72552-311' of https://github.com/spvickers/moodle into MOODLE_311_STABLE 2021-11-11 11:42:21 +08:00
Andrew Nicols
34e1739a71 Merge branch 'MDL-73026-311' of https://github.com/junpataleta/moodle into MOODLE_311_STABLE 2021-11-11 11:01:51 +08:00
Eloy Lafuente (stronk7)
8aab9fc84e Merge branch 'MDL-72696-311' of https://github.com/paulholden/moodle into MOODLE_311_STABLE 2021-11-10 19:21:06 +01:00
Jun Pataleta
b68667b9c2 Merge branch 'MDL-72992-311' of git://github.com/cameron1729/moodle into MOODLE_311_STABLE 2021-11-10 18:38:11 +08:00
Juan Leyva
b8c4c7694b MDL-61671 tool_mobile: Improve certificate checks
Support different curl implementations and skip last certificate checks in some cases.
2021-11-09 17:06:20 +01:00
AMOS bot
793359862b Automatically generated installer lang files 2021-11-09 00:07:27 +00:00
Sara Arjona
55aa143507 Merge branch 'MDL-72994-311' of https://github.com/lucaboesch/moodle into MOODLE_311_STABLE 2021-11-08 16:38:06 +01:00
Sara Arjona
5cb47da3f1 Merge branch 'MDL-72950_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-11-08 15:33:53 +01:00
Jun Pataleta
528f17d06e MDL-73026 theme: Override Bootstrap modal styles for close button
* Adjust the margins to accommodate the button outline so that it
doesn't look clipped.
* Inherit the opacity when the button receives focus to improve the
focus outline's contrast.
2021-11-08 21:44:35 +08:00
Paul Holden
7b22dff89a MDL-72696 behat: support inplace editable fields of type select.
If an inplace editable field is using the "select" type, we should
treat it as a select field when setting it's value during scenarios.
2021-11-08 13:12:25 +00:00
Eloy Lafuente (stronk7)
da0f55caa1 MDL-72950 phpunit: Remove skipped tests now that the issue is fixed.
The problem (coincidence of contexts) was detected when running
oracle phpunit tests, so we skipped the tests as part of MDL-72743.

Now, with the problem fixed (previous commit), we can bring back
that test.
2021-11-06 11:06:36 +01:00
Eloy Lafuente (stronk7)
0de172734c MDL-72950 restore: Avoid qcat conflicts with matching contexts
Though it's really rare for this to happen (it only was discovered
when running unit tests with Oracle), it's possible to get
problems restoring courses when context ids in the backup file
do match existing contexts in the restore target site in certain
ways (see the issue for more information).

This change just ensures that every call to the method (that
happens 4 times, for sys, coursecat, course and module levels):

prechek_precheck_qbanks_by_level()

Is processed always for that level. Before the patch it was
possible (hardly but possible) to return question categories
belonging to another level when some qcats contexts were matching
between the backup file and the target site.
2021-11-06 11:06:35 +01:00
Eloy Lafuente (stronk7)
e1ad263f90 Moodle release 3.11.4 2021-11-06 10:34:18 +01:00
Luca Bösch
708c3d4b90 MDL-72994 themes: Align Roles column in additional roles. 2021-11-05 23:59:21 +01:00
Ilya Tregubov
107dc9be23 weekly release 3.11.3+ 2021-11-05 19:18:33 +02:00
Ilya Tregubov
59f7f1c961 Merge branch 'install_311_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_311_STABLE 2021-11-05 19:18:30 +02:00
Huong Nguyen
7293a38647 MDL-71918 Calendar: Improve capability checks when fetching events 2021-11-05 13:15:41 +08:00
Jun Pataleta
91a51bbf24 Merge branch 'MDL-72667-311-fix' of https://github.com/lameze/moodle into MOODLE_311_STABLE 2021-11-05 12:44:47 +08:00
Simey Lameze
05f4ac39fa MDL-72667 assign: change overdue message to darker red 2021-11-05 12:42:11 +08:00