Commit Graph

219 Commits

Author SHA1 Message Date
Jun Pataleta 22eb4c9fe1 Merge branch 'MDL-79003-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-02-21 10:35:53 +08:00
Ilya Tregubov ac77568bc3 Merge branch 'MDL-79433-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2024-02-07 10:13:18 +08:00
Ruslan Kabalin 1e242956cc MDL-79003 eslint: Address issues reported by eslint
This commit is a backport of MDL-74301 which should have been backported
at the time.
2024-01-30 13:32:00 +08:00
Sara Arjona 14a63c9988 Merge branch 'MDL-79152-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2024-01-24 16:03:02 +01:00
Paul Holden dc2e3d8eec MDL-79433 tiny_autosave: allow non-logged in user calls to webservice.
Accounts for the editor being added to pages for non-logged in users,
such as the "New account" page.
2024-01-18 10:49:22 +00:00
Andrew Nicols 9e6cdc07c6 MDL-79152 editor_tiny: Enable browser-based spell-checking 2024-01-18 12:55:59 +08:00
Sara Arjona 9a91e0fae4 Merge branch 'MDL-80058-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2024-01-17 18:46:54 +01:00
Sara Arjona c28aa03f2b Merge branch 'MDL-80081-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2024-01-17 18:18:15 +01:00
meirzamoodle b9cc529140 MDL-80081 editor_tiny: Allow empty content in the i tag 2024-01-12 14:11:14 +07:00
meirzamoodle 55d828df88 MDL-80058 editor_tiny: add preformatted format to the blocks 2024-01-10 09:40:22 +07:00
Mihail Geshoski c85976dcfc MDL-80246 tiny_equation: Escape elementid in the data-target attribute
Tabs use the value of the data-target attribute of the active tab link
to find and display the appropriate tab content. In some situations the
elementid value that is used to generate the data-target may contain
certain characters that have a special meaning in the selector context
(e.g. ".", ",", "#") and because of that the target element cannot be
correctly identified. To fix this problem the elementid value needs to
be escaped prior to generating the data-target attribute.
2023-12-08 09:51:20 +08:00
Sara Arjona 17571e2f05 Merge branch 'MDL-79827-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-11-08 18:10:49 +01:00
Meirza 90408b2e64 MDL-78903 tiny_h5p: show repositories if editor filepicker type set 2023-10-31 08:04:35 +07:00
Meirza ae3fac6ddd MDL-78903 tiny_media: show repositories if editor filepicker type set 2023-10-31 08:04:21 +07:00
Paul Holden 926fe4f429 MDL-79827 tiny_link: show repositories only if editor filepicker set. 2023-10-23 22:07:01 +01:00
Huong Nguyen b93fa5e412 MDL-79566 tiny_autosave: Add Javascript submission handler 2023-10-16 09:29:22 +07:00
Ilya Tregubov 914fadcd2c Merge branch 'MDL-79501-MOODLE_402_STABLE' of https://github.com/geichelberger/moodle into MOODLE_402_STABLE 2023-10-10 15:07:01 +08:00
David Woloszyn 61f082c4aa 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:03:22 +02:00
Gregor Eichelberger 3e05ff74bc 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 13:06:06 +02:00
Huong Nguyen d635ec350c MDL-78239 editor_tiny: Calculate correct height for non-visible editors 2023-09-26 14:57:15 +07:00
Andrew Nicols c84971519f MDL-79264 tiny_equation: Correct debounce method
The debounced method was being called immediately instead of being
debounced.
2023-09-08 22:20:54 +08:00
Andrew Nicols abafa13fb9 Merge branch 'MDL-79264-MOODLE_402_STABLE' of https://github.com/geichelberger/moodle into MOODLE_402_STABLE 2023-09-08 22:20:54 +08:00
Gregor Eichelberger 4818a44e89 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:26:33 +02:00
Andrew Nicols 96ded0055b Merge branch 'MDL-79230-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-05 10:56:41 +08:00
Andrew Nicols b6f72452e2 Merge branch 'MDL-79236-402' of https://github.com/paulholden/moodle into MOODLE_402_STABLE 2023-09-05 10:43:58 +08:00
Paul Holden d562154bee MDL-79236 editor_tiny: define subplugin type language strings. 2023-09-01 19:22:38 +01:00
Paul Holden 3d9000cba0 MDL-79230 editor_tiny: fix plugin info manage URL.
Co-authored-by: Meirza <meirza.arson@moodle.com>
2023-09-01 15:19:44 +01:00
Ilya Tregubov 2145f755fc Merge branch 'MDL-78745-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-09-01 10:54:33 +08:00
Ilya Tregubov 13f6f56c48 Merge branch 'MDL-79107-402-2' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-09-01 09:26:49 +08:00
Andrew Nicols c746849316 MDL-79107 editor_tiny: Target correct element on editor removal 2023-09-01 09:07:59 +08:00
Jun Pataleta 245850be56 Merge branch 'MDL-79107-402' of https://github.com/junpataleta/moodle into MOODLE_402_STABLE 2023-08-31 21:09:44 +08:00
Jun Pataleta a9e5225a76 MDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay 2023-08-31 21:06:21 +08:00
Andrew Nicols c174c64a04 MDL-79107 editor_tiny: Inform Behat of field type 2023-08-31 21:06:18 +08:00
meirzamoodle 38c63776fc 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:19:14 +07:00
Julien Boulen bc64c7515e MDL-78241 tiny_recordrtc: fix availability conditions 2023-08-25 18:16:57 +02:00
Jun Pataleta 922cc4d23e Merge branch 'MDL-77817-402' of https://github.com/meirzamoodle/moodle into MOODLE_402_STABLE 2023-08-10 18:43:18 +07:00
Ilya Tregubov a14e8aaae7 Merge branch 'MDL-78714-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-08-09 12:05:05 +08:00
Andrew Nicols 9de452c011 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 09:07:04 +08:00
Andrew Nicols ff9d561d82 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 09:05:25 +08:00
Andrew Nicols 5acae49336 MDL-78714 editor_tiny: Move TinyMCE import instructions to correct path 2023-08-09 09:05:23 +08:00
meirzamoodle ab0a36e796 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:17 +07:00
Jun Pataleta 1d12df6e12 MDL-78770 tiny_recordrtc: Use proper window.console.warn() function 2023-07-20 14:32:46 +08:00
Huong Nguyen 395f8c49d8 MDL-78391 tiny_recordrtc: Fix recording issue with Chrome 2023-07-06 15:47:44 +07:00
Jun Pataleta c17ed92914 Merge branch 'MDL-78391-402' of https://github.com/andrewnicols/moodle into MOODLE_402_STABLE 2023-07-06 11:59:15 +08:00
Ilya Tregubov 0db5c697d7 Merge branch 'MDL-78485-402' of https://github.com/stevandoMoodle/moodle into MOODLE_402_STABLE 2023-07-05 11:51:48 +08:00
Stevani Andolo c270d87fec MDL-78485 editor_tiny: Allowed script tag to be added in tinyMCE editor 2023-07-04 13:36:34 +08:00
Andrew Nicols b31b0f7479 MDL-78391 tiny_recordrtc: Set filename according to container 2023-07-03 16:52:26 +08:00
Andrew Nicols 0f07221c64 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 cf681dc724 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:13 +08:00
Andrew Nicols be8a7442e7 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