1732 Commits

Author SHA1 Message Date
Huong Nguyen
0d45970bd3 MDL-79566 tiny_autosave: Add Javascript submission handler 2023-10-16 09:29:28 +07:00
Ilya Tregubov
11fe89c08e
Merge branch 'MDL-79501-MOODLE_401_STABLE' of https://github.com/geichelberger/moodle into MOODLE_401_STABLE 2023-10-10 15:07:24 +08:00
David Woloszyn
6f2fa6011e MDL-77846 core: Make endpoint revision number checks stricter
In some places we prevented cache poisoning, in others we did not. We
also did not place any restriction on the minimum value for a revision.

This change introduces a new set of functions for configonly endpoints
which validates the revision numbers passed in. If the revision is
either too old, or too new, it is rejected and the file content is not
cached. The content is still served, but caching headers are not sent,
and any local storage caching is prevented.

The current time is used as the maximum version, with 60 seconds added
to allow for any clock skew between cluster nodes. Previously some
locations used one hour, but there should never be such a large clock
skew on a correctly configured system.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-10-04 02:10:16 +02:00
Gregor Eichelberger
0b28c6a254
MDL-79501 tiny: Fix editing multiple videos
The selection gets lost while opening the modal dialogue to update an
embedded media. Caching the current selection allows us to update the
previously selected node instead of updating the first embedded media.

Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
2023-09-29 14:11:43 +02:00
Huong Nguyen
e8d14cde9a
MDL-78239 editor_tiny: Calculate correct height for non-visible editors 2023-09-26 14:57:24 +07:00
Andrew Nicols
426e4043a4
MDL-79264 tiny_equation: Correct debounce method
The debounced method was being called immediately instead of being
debounced.
2023-09-08 22:22:59 +08:00
Andrew Nicols
c28639acd9
Merge branch 'MDL-79264-MOODLE_401_STABLE' of https://github.com/geichelberger/moodle into MOODLE_401_STABLE 2023-09-08 22:22:59 +08:00
Gregor Eichelberger
dadf19ad3f
MDL-79264 tiny: Replace hardcoded contextid
The `contextid` argument of the `tiny_equation_filter` AJAX call is
hardcoded to 1, which causes trouble if the context table does not start
with id 1.

Signed-off-by: Gregor Eichelberger <gregor.eichelberger@tuwien.ac.at>
2023-09-05 13:27:20 +02:00
Andrew Nicols
0e857d3710
Merge branch 'MDL-79230-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-05 10:56:55 +08:00
Andrew Nicols
a898eb1964
Merge branch 'MDL-79236-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-05 10:44:32 +08:00
Paul Holden
2cfc22350b
MDL-79236 editor_tiny: define subplugin type language strings. 2023-09-01 19:25:03 +01:00
Paul Holden
5c93b9fa6d
MDL-79230 editor_tiny: fix plugin info manage URL.
Co-authored-by: Meirza <meirza.arson@moodle.com>
2023-09-01 15:19:52 +01:00
Ilya Tregubov
c526971857
Merge branch 'MDL-78745-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-09-01 10:55:41 +08:00
Ilya Tregubov
23f56c13a6
Merge branch 'MDL-79107-401-2' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-09-01 09:27:21 +08:00
Andrew Nicols
3053acf475
MDL-79107 editor_tiny: Target correct element on editor removal 2023-09-01 09:07:59 +08:00
Jun Pataleta
183901ec6d
Merge branch 'MDL-79107-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-08-31 21:09:37 +08:00
Jun Pataleta
e6e6c7e7b3
MDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay 2023-08-31 21:07:07 +08:00
Andrew Nicols
4ce427c2ac
MDL-79107 editor_tiny: Inform Behat of field type 2023-08-31 21:07:07 +08:00
meirzamoodle
c2bdabd63c MDL-78745 editor_tiny: Stored text in non-entity form
TinyMCE has a default entity_encoding 'named',
which causes text with diacritic symbols to be converted to HTML entities,
e.g. pâté will be convert to p&acirc;t&eacute;
That will be a problem with the Glossary auto-linking filter if a course has a text concept like pâté,
then the filter will likely fail to get the text concept.
Changing the TinyMCE entity_encoding to 'raw' will resolve the problem.
2023-08-30 09:18:31 +07:00
Julien Boulen
c79c417ea0 MDL-78241 tiny_recordrtc: fix availability conditions 2023-08-25 18:17:11 +02:00
Jun Pataleta
53b33f7b0e
Merge branch 'MDL-77817-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-08-10 18:44:27 +07:00
Ilya Tregubov
4732fa0b13
Merge branch 'MDL-78714-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-08-09 12:05:24 +08:00
Andrew Nicols
d8c911ccb4
MDL-78714 editor_tiny: Disable HTML Sanitisation in TinyMCE
This is in keeping with other Editors such as Atto and resolves an issue
where DOM Purification incorrectly identifies HTML-like string content
as an HTML tag with a JS variable.

Moodle already performs XSS sanitisation using HTML Purifier in PHP.
2023-08-09 10:21:39 +08:00
Andrew Nicols
e8eb8943e1
MDL-78714 editor_tiny: Add xss_sanitize option to TinyMCE
To address a potential data loss issue, a feature introduced in TinyMCE
6.4.0 to disable client-side XSS sanitisation must be backported.
2023-08-09 10:21:39 +08:00
Andrew Nicols
737f657bad
MDL-78714 editor_tiny: Move TinyMCE import instructions to correct path 2023-08-09 09:05:23 +08:00
meirzamoodle
f8691f2e28 MDL-77817 editor_tiny: Fix menu and dialogue window position
The boost theme makes the TinyMCE editor rendered in a scrollable container,
scrolling the editor’s container will cause TinyMCE UI elements to be detached from the anchor.
Therefore, to keep the tinyMCE menu in the correct position,
adjustments must be made on the page drawers style.

When using TinyMCE editor in Safari browsers, a problem may occur where the dialogue
windows (such as modal dialogs) overlap with page drawers due to a specific behavior
in Safari's rendering. This function addresses the issue by adjusting the CSS overflow
property of the page drawers, ensuring they do not obscure the dialogue windows.
2023-08-03 11:40:12 +07:00
Jun Pataleta
61d3f1345a
MDL-78770 tiny_recordrtc: Use proper window.console.warn() function 2023-07-20 14:32:52 +08:00
Jun Pataleta
9cb8b3fa50
MDL-78770 atto_recordrtc: Use proper window.console.warn() function 2023-07-20 14:23:01 +08:00
Huong Nguyen
7a582cf628
MDL-78391 atto_recordrtc: Fix recording issue with Chrome 2023-07-06 15:49:56 +07:00
Huong Nguyen
0f7151e2ba
MDL-78391 tiny_recordrtc: Fix recording issue with Chrome 2023-07-06 15:49:55 +07:00
Jun Pataleta
6509d6d944
Merge branch 'MDL-78391-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-07-06 11:59:46 +08:00
Ilya Tregubov
a9fe9bbb0c
Merge branch 'MDL-78485-401' of https://github.com/stevandoMoodle/moodle into MOODLE_401_STABLE 2023-07-05 11:52:11 +08:00
Stevani Andolo
419db61006 MDL-78485 editor_tiny: Allowed script tag to be added in tinyMCE editor 2023-07-04 13:36:47 +08:00
Andrew Nicols
0830ca48f9
MDL-78391 atto_recordrtc: Improve MacOS codec compatability 2023-07-03 16:52:28 +08:00
Andrew Nicols
ed6054fdf8
MDL-78391 tiny_recordrtc: Set filename according to container 2023-07-03 16:52:26 +08:00
Andrew Nicols
3faf81d578
MDL-78391 tiny_recordrtc: Switch to mp4 container for h264
Theh WebM container does not support H.264 / AVC.

For more information see:
https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers#webm

General purpose video, preferably in an open format
WebM (ideally with MP4 fallback)
2023-07-03 16:52:07 +08:00
Andrew Nicols
756d9fa18d
MDL-78391 tiny_recordrtc: Improve codec selection
From my experimentation I have discovered that Safari does not properly
respect the standard MediaRecorder mimetype. Instead of using `codecs=`
it uses `codecs:`.

This change copies the codec array to have the list of possible codecs
include both codecs= and codecs: whilst remaining in order.
2023-07-03 16:50:12 +08:00
Andrew Nicols
d73ad3b532
MDL-78391 tiny_recordrtc: Respect codec options
The audio and video plugins were overriding the wrong method, and thus
preventing selection of a relevant codec and breaking playback on some
devices.
2023-07-03 16:50:11 +08:00
Andrew Nicols
9c97536a9f
MDL-76853 editor_tiny: Refactor behat helpers into trait 2023-07-03 09:38:24 +08:00
Sara Arjona
9137b58fca
Merge branch 'MDL-78554-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-06-29 17:39:05 +08:00
Huong Nguyen
d53b1b1cfe
MDL-78554 tiny_link: Fix cannot create link for selection text
Backport of MDL-78065
2023-06-26 15:47:33 +08:00
Paul Holden
32f9d1eeb5
MDL-78554 tiny_link: define help link text language string.
Backport of MDL-77874
2023-06-26 15:47:14 +08:00
Huong Nguyen
684889be8f
MDL-78554 tiny_link: Add a TinyMCE link plugin
Backport of MDL-76520

Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2023-06-26 15:45:56 +08:00
Andrew Nicols
d9745d9852
Merge branch 'MDL-78237-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-06-24 23:21:58 +08:00
Andrew Nicols
378eae6144
Merge branch 'MDL-76673-401' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2023-06-24 22:47:10 +08:00
David Woloszyn
94b98082a3 MDL-75913 behat: Switch to TinyMCE editor iframe 2023-06-19 16:38:18 +10:00
David Woloszyn
0596ff2d2b MDL-78237 editor_tiny: Prevent navbar obscuring modal content 2023-06-08 17:15:13 +10:00
Meirza
e076d036c2 MDL-76673 atto: Check color contrast only on elements that have text
If the content in Atto is wrapped by an element with only a background color, without text color,
the accessibility checker will use the parent text-color as the foreground color, which is owned by form-control,
it becomes a problem if the wrapped element background using #34274f and the parent text-color is #495057 then
the low contrast as a result.

To avoid such a situation, the patch will only calculate color contrast if only the element has text,
so it will give results per element if the accessibility checker is unsatisfied.
2023-05-27 13:56:50 +07:00
Meirza
c6b52f6822 MDL-76673 tiny: Check color contrast only on elements that have text
If the content in Tiny is wrapped by an element with only a background color, without text color,
the accessibility checker will use the parent text-color as the foreground color, which is owned by form-control,
it becomes a problem if the wrapped element background using #34274f and the parent text-color is #495057 then
the low contrast as a result.

To avoid such a situation, the patch will only calculate color contrast if only the element has text,
so it will give results per element if the accessibility checker is unsatisfied.

The patch also changes the selected element from 'body > *' to 'body *',
so it will return all elements (parents and children) in the content instead of parents only.

And minor modifications on the warning_content.mustache to fix the numbering format.
2023-05-27 13:56:50 +07:00
Jun Pataleta
ff402c26e5 Merge branch 'MDL-78005-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-05-24 12:06:17 +08:00