1687 Commits

Author SHA1 Message Date
Jun Pataleta
d4ba0359cf MDL-72885 core: Use get_html_lang_attribute_value()
Use get_html_lang_attribute_value() for formatting language codes
for the HTML lang attribute.
2022-05-27 19:38:54 +08:00
Jun Pataleta
92e080465e MDL-72885 core: New weblib function get_html_lang_attribute_value()
Converts a language code to hyphen-separated format in accordance to the
BCP47 syntax appropriate for the HTML lang attribute.

See
https://datatracker.ietf.org/doc/html/rfc5646#section-2.1
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang
2022-05-27 19:38:54 +08:00
Andrew Nicols
4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Frederic Massart
3aed37ee4d MDL-48269 group: Remove the option to hide the picture of a group
Plus additional amendments to Fred's original commit:
1. Updating the version numbers
2. Merging the original two-step upgrade below into one for simplicity:
   1. Deleting the pictures for groups with hidepicture set to 1; and
   2. Dropping the hidepicture field itself.
3. Converted array() usages to the short syntax [].
2021-02-16 12:46:58 +08:00
sangnguyen2601
39652702f0 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 18:03:08 +07:00
Brendan Heywood
16c209cbc0 MDL-69779 core: Improved the X-Redirect-By header when debugging is on 2020-10-11 09:48:12 +11:00
Peter Burnett
b4623c8975 MDL-68820 web: Added referrer policy header setting 2020-06-03 15:18:19 +10:00
Brendan Heywood
b07fdd1d6c MDL-67403 weblib: Add support for X-Redirect-By header 2019-12-18 15:02:32 +10:00
Paul Holden
eb9f830604 MDL-66762 user: stricter email validation. 2019-11-07 09:00:19 +08:00
Eloy Lafuente (stronk7)
88d29a1bb8 MDL-66965 core: php74 curly 2 square braces changes
Note this only modified core files, still there are a lot
of curly brace uses but all them are within 3rd part
libraries and will be handled apart.
2019-10-25 17:41:10 +02:00
Jun Pataleta
a7faa3f1c5 Merge branch 'MDL-66104' of git://github.com/stronk7/moodle 2019-08-12 14:51:59 +08:00
Brendan Heywood
32f805e079 MDL-66278 core: Add callback to show other password checks on signup 2019-08-07 14:12:04 +08:00
[Peter Burnett]
e40ea418f4 MDL-66280 core: Added checks for empty password minimum length 2019-08-02 11:34:23 +10:00
Eloy Lafuente (stronk7)
764167136f MDL-66104 output: HTMLPurifier to allow <nolink> tags everywhere
Before the patch, HTMLPurifier was instructed to handle <nolink>
tags in block mode. That implies that any block tag enclosing it
had to be closed for HTML compliance.

But <noscript> tags are not part of the final output (they are
removed) but just internally used to skip filtering certain areas.

So they can be virtually everywhere, HTMLPurifier just should allow
them without any change, both to parent or children tags.
2019-08-01 17:52:33 +02:00
Juan Leyva
26e778d1b7 MDL-60680 file: Support any user id when creating tokens for files.
$includetoken parameter type has been changed. Now supports:
   boolean: False indicates to not include the token, true indicates to generate a token for the current user ($USER).
   integer: Indicates to generate a token for the user whose id is the integer value.
2019-04-23 13:16:15 +02:00
Eloy Lafuente (stronk7)
99774ce0c3 Merge branch 'MDL-64281-master' of git://github.com/jleyva/moodle 2019-03-21 00:27:27 +01:00
Arjen Lentz
4b71e99564 MDL-21475 weblib: Simplify validate_email() to use existing function. 2019-02-19 10:51:21 +10:00
Juan Leyva
b5d889be10 MDL-64281 core: Always allow frame embedding in the app
The Moodle app must be allowed to embed content always.
2019-02-08 11:14:09 +01:00
Andrew Nicols
883f655552 MDL-36754 output: Support token pluginfiles in group pic 2018-08-14 07:06:09 +08:00
Jun Pataleta
c353ad20c3 MDL-45170 core: Integration review fixes
* Pass $forcehttps parameter to call extract_draft_file_urls_from_text()
 call in \core_weblib_testcase::test_extract_draft_file_urls_from_text()
* Style fixes
2018-08-08 16:17:32 +08:00
Charles Fulton
7d7d3b1731 MDL-45170 files: check other draftfile areas when processing 2018-08-08 16:15:23 +08:00
David Mudrák
4b82c15cdb MDL-60940 weblib: Introduce an ability to force cleaning of all content
The new configuration flag $CFG->forceclean overrides the noclean
option when calling format_text() so that the text is always
and unconditionally cleaned.
2018-04-11 10:23:45 +02:00
Ryan Wyllie
748545858c MDL-60942 filters: include filter in format_string cache key 2017-12-01 06:49:24 +00:00
Damyon Wiese
8aa01fcf61 Merge branch 'MDL-60671-master' of https://github.com/sammarshallou/moodle 2017-11-07 11:05:43 +08:00
sam marshall
11e60032be MDL-60671 core_search: Cron output should use mtrace
The mtrace function is preferable for plain text logging/progress
output because it can be redirected if necessary. By convention it
is normally used in cron and can be used in CLI tasks if required.

This change makes the text_progress_trace class use mtrace instead
of echo and then flush. (Default behaviour of mtrace is to do
exactly that, but it can be redirected too.)

Before this change, if anybody is relying on mtrace behaviour to
redirect logs of cron output, this will fail for some parts of the
search cron output (and some other places like auth plugins).
2017-11-06 11:55:29 +00:00
Adrian Greeve
c550fd0e11 MDL-60515 groups: Update to weblib group function.
Added a new function to get the url for the group picture.
2017-10-30 16:43:19 +08:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00
Andrew Nicols
162f90e59e MDL-59388 core: Add params to link arrows 2017-08-14 09:27:58 +08:00
Daniel Thee Roperto
745212bda0 MDL-58479 documentation: fixed phpdoc for notice(). 2017-04-04 16:20:41 +10:00
Damyon Wiese
3e6adcd69c MDL-40759 icons: Rename activity_icon
image_icon is a better name because there are some valid uses for these other than for activity icons.

E.g. Old JS code that is not worth re-writing.
2017-03-17 15:52:18 +08:00
Damyon Wiese
663640f5b3 MDL-40759 icons: convert uses of pix_url to pix_icon
Also change filepicker to use scaled svgs instead of sets of custom pngs. The svgs are taken from font-awesome.
2017-03-17 15:52:17 +08:00
Matteo Scaramuccia
cdf8238b14 MDL-57379 Files: Improved file argument evaluation.
get_file_argument() is responsible to extract the relative path
of the file to be served by a specific Moodle component
like a theme or a module.
Some modules like scorm and imscp require slasharguments support
and they force it when creating the URLs to serve their files.
It should honor the slasharguments setting but this could break
those instances where existing hard-coded links still make usage of
the "old" format, the one when slasharguments is set to No i.e. '?file='.

Its logic has been improved by looking at when the URL is related to
serving a plug-in file in a "forced" slasharguments way of serving it
i.e. using '/pluginfile.php/' and not '/pluginfile.php?'.
2017-02-19 16:39:04 +01:00
David Mudrák
7620746f67 MDL-57531 mail: Make validate_email return actual boolean as expected
It was discovered by unit tests that the return value is not a real
boolean as was intuitively expected and documented. To avoid potential
issues with the truthyness in the future, we explicitly cast the return
value to boolean now.
2017-01-04 13:16:07 +01:00
Marina Glancy
f31e1e8b25 MDL-56899 filter: suppress dom parsing errors
Domdocument does not know about <video> and <audio> tags, also it's too strict for html style
solution from http://stackoverflow.com/questions/6090667/php-domdocument-errors-warnings-on-html5-tags
2016-11-14 15:16:09 +08:00
Andrew Nicols
ac157b0bbe MDL-53048 forms: Deprecate prevent_form_autofill_password 2016-10-24 08:19:44 +08:00
Adrian Greeve
f34d7af0ae MDL-55087 lib: Update to htmlpurifier lib. 2016-10-17 08:43:41 +08:00
Frédéric Massart
fc72f49da3 MDL-56095 output: Moving progress_bar from weblib to outputcomponents
And revert the change in the order of the require_once in setup.php.
2016-10-10 13:25:37 +02:00
Frédéric Massart
82b945dbbe MDL-56095 output: Make the progress bar templatable
The order of inclusion of weblib and outputlib had to change
as the progress_bar (weblib) uses interfaces defined in outputlib.
2016-10-07 16:40:38 +02:00
Frederic Massart
cd7a164bdf MDL-55564 output: Use template for password autofill hack
Part of MDL-55071
2016-09-23 10:53:55 +01:00
Brendan Heywood
f1c6d647bc MDL-55916 setup: Maintenance mode serves HTTP 503 2016-09-20 11:59:39 +10:00
Eloy Lafuente (stronk7)
5e16bdb25c Merge branch 'MDL-55724-master' of https://github.com/sammarshallou/moodle 2016-09-05 17:33:25 +02:00
sam marshall
3bf0482841 MDL-55724 Glossary: Prevent infinite loop in trusttext_strip 2016-08-30 10:25:38 +01:00
David Monllao
c2df528806 Merge branch 'wip-MDL-55581-master' of git://github.com/marinaglancy/moodle 2016-08-29 16:53:46 +08:00
Marina Glancy
28e27ac837 MDL-55581 htmlpurifier: allow track tag in videos and audios 2016-08-29 13:25:10 +08:00
sam marshall
b16b1f86b1 MDL-55650 Library: s() function - tweak parameters for performance
The s() function includes a comment saying that parameter options
should be modified to improve performance once PHP 5.4 is required.
Since Moodle has required PHP 5.4 for some time, we should probably
make the change and remove the comment.

According to my benchmarking, these changes make s() about 7% faster
and will save a staggering 2ms from a typical course view that calls
it 8,000 times.
2016-08-22 15:38:13 +01:00
Cameron Ball
37c10287be
MDL-54847 MDL-54847 weblib: Support basic HTML media tags 2016-08-02 10:58:48 +08:00
Cameron Ball
6fb1a7177f
MDL-47371 weblib: Add option to disable escaping 2016-07-12 10:31:17 +08:00
Andrew Nicols
2c4e6d6252 MDL-54853 weblib: Specify version and fixed encoding 2016-06-09 09:53:48 +08:00
Cameron Ball
2549f46f7c MDL-54853 weblib: Properly specify encoding for blanktarget 2016-06-08 18:29:19 +08:00
Andrew Nicols
a29e419b2c Merge branch 'MDL-54756' of git://github.com/timhunt/moodle 2016-05-30 15:19:04 +08:00