31162 Commits

Author SHA1 Message Date
Jake Dallimore
3abb8c4a28 Merge branch 'MDL-78002' of https://github.com/stronk7/moodle 2023-05-04 10:07:07 +08:00
Laurent David
4a91802a44 MDL-77781 core_completion: Completion view must be deleted too
When resetting a course, completion view entries should also be
deleted

Co-authored-by: Georg Moser <georg@moser.link>
2023-05-03 14:27:54 +02:00
Jake Dallimore
4bcb6a19bf Merge branch 'MDL-77384' of https://github.com/paulholden/moodle 2023-05-03 16:51:58 +08:00
Sara Arjona
60143dff4f Merge branch 'MDL-77312' of https://github.com/paulholden/moodle 2023-05-03 09:59:12 +02:00
Sara Arjona
29301517d4 Merge branch 'MDL-78049-master' of https://github.com/PhMemmel/moodle 2023-05-03 09:45:12 +02:00
Jake Dallimore
d2b655cbf2 Merge branch 'MDL-78052-master' of https://github.com/sarjona/moodle 2023-05-03 12:06:33 +08:00
Sara Arjona
29102c91b9 Merge branch 'MDL-77858' of https://github.com/paulholden/moodle 2023-05-02 16:49:43 +02:00
Ilya Tregubov
a7c42e69f4 Merge branch 'MDL-78025' of https://github.com/timhunt/moodle 2023-05-02 11:42:45 +08:00
Eloy Lafuente (stronk7)
e4eb21e0ea MDL-78002 phpunit: Ensure that all uses of psr streams are closed
While the uses here were not causing too much problem with PHPUnit
execution in any OS, better have them explicitly closed to better
serve as reference for other, future uses anywhere in codebase.

Always that a stream is used, better we close it as soon as possible,
not relying on destructors, gc and friends.
2023-04-29 23:05:06 +02:00
Eloy Lafuente (stronk7)
2b61e95a69 MDL-78002 moodlenet: Always close the request stream explicitly
And do it as soon as it's not needed any more. Else, only
_destruct() / shutdown / gc will, and that can be problematic
if many streams are open, or, under some environments like
Windows that consider the stream underlying files still busy,
because they have not been closed.
2023-04-29 20:33:57 +02:00
Sara Arjona
46190f1b05 MDL-78052 theme: Update FontAwesome to 6.4.0
This version also fixes a regression in 6.3.0 where a number of
icons weren't centered properly in their viewboxes.
2023-04-27 12:52:01 +02:00
Philipp Memmel
31bad4ffcd MDL-78049 core_external: Run test_all_external_info in separate process 2023-04-27 08:27:07 +02:00
Tim Hunt
35695831ff MDL-78025 questions: improve the comment on question_references.version 2023-04-26 15:29:39 +01:00
Tim Hunt
6a4341549d MDL-78025 questions: fix PHPdoc on question_require_capability_on 2023-04-26 15:29:39 +01:00
Tim Hunt
25596a50e5 MDL-78025 questions: questions_in_use should check question_references
This avoids the needs for plugins to do separate queries, which is
easier for them, and better performing.
2023-04-26 15:29:38 +01:00
Tim Hunt
37e8115d68 MDL-78025 question: move hiding logic into question_delete_question
This logic belongs in the API, so it is applied consistently.

Also this avoids calling the expensive function questions_in_use
twice per question.
2023-04-26 10:49:32 +01:00
Ilya Tregubov
dd4a990fe0 Merge branch 'master_MDL-76929' of https://github.com/mattporritt/moodle 2023-04-26 09:27:58 +08:00
Sara Arjona
49d013efd6 Merge branch 'MDL-77313' of https://github.com/paulholden/moodle 2023-04-25 15:18:26 +02:00
Paul Holden
b495ba0cec
Merge branch 'MDL-78007-master' of https://github.com/HuongNV13/moodle 2023-04-25 12:36:07 +01:00
Paul Holden
de3d17ea93
MDL-77384 check: clarify statistics check name. 2023-04-25 09:04:29 +01:00
Paul Holden
c5c9185801
MDL-77312 files: exclude drafts when determining license usage. 2023-04-24 11:07:32 +01:00
Paul Holden
1dbeca84f6
MDL-77313 restore: re-add field to indicate course/category search.
When the two restore forms for searching courses and categories were
converted to core templates in eb9935c9 they lost the named submit
button, which broke searching.
2023-04-24 11:04:20 +01:00
Paul Holden
8a6065f5fc
MDL-77858 javascript: correct core/notification exception imports. 2023-04-24 10:44:07 +01:00
Huong Nguyen
1d4c1d9c65 MDL-78007 tiny_media: Fix wrong condition for the Tiny Media
Including in this commit:
 - Switched to Tiny editor in manually_mark_question.feature
2023-04-24 15:53:41 +07:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Jun Pataleta
8dd488cb5b Merge branch 'MDL-77989-master' of https://github.com/andrewnicols/moodle 2023-04-21 13:44:51 +08:00
Andrew Nicols
1a53cbbae4 MDL-77989 testing: Add test file isolation helper
When we deprecate the use of a file, we often include tests which ensure
that the legacy behaviour is maintained. There are also legacy uses
in the community where people would like to use the deprecated API for a
period.

The issue that we face is that, if the deprecated file is included once,
then it will be included for all other, unrelated, tests. This means
that other tests may not detect cases where the deprecated file was
included.

We can solve these cases by running the test that performs the inclusion
in a deprecated process. This means that the inclusion is only performed
in that isolated process, and other unrelated tests do not include the
file.

However, we also then need to detect which files which are including the
file and which we do not know about.

This change introduces:
- an override to the TestCase::setInIsolation method to define a
  constant when the test is running in isolation
- a new function that a file can call when it is included, to make sure
  that the test process was isolated, where there is any test.
2023-04-21 13:33:56 +08:00
Ilya Tregubov
04bf346ca3 Merge branch 'MDL-77903' of https://github.com/Chocolate-lightning/moodle 2023-04-21 13:18:14 +08:00
Jun Pataleta
19022cd940 Merge branch 'MDL-77927-master' of https://github.com/stevandoMoodle/moodle 2023-04-21 13:11:43 +08:00
Mathew May
f9c6548189 MDL-77903 gradereport_grader: Keyboard accessibility 2023-04-21 13:09:25 +08:00
Jun Pataleta
4bf6bb37c2 MDL-77927 core: Delete other mod_assignment subplugins
Non-core mod_assignment subplugin data may still be present on the
database. We need to make sure to remove these too during upgrade.
2023-04-21 12:32:10 +08:00
Jun Pataleta
0720524804 MDL-77927 core: mod_assignment subplugins environment check 2023-04-21 12:32:06 +08:00
Jun Pataleta
dddc9a08cd MDL-77927 core: Move assignment removal upgrade code
Move the fixed assignment removal upgrade code to the end of the upgrade
script as a new upgrade step. Already upgraded sites with mod_assignment
removed should just be able to rerun this without any issues.
2023-04-21 12:31:11 +08:00
Stevani Andolo
d023b5356c MDL-77927 grade: Delete mod_assignment orphaned data before its removal 2023-04-21 12:31:07 +08:00
Jun Pataleta
e07f28e276 Merge branch 'MDL-77896' of https://github.com/paulholden/moodle 2023-04-21 11:21:40 +08:00
Andrew Nicols
f7d7ad7fed MDL-77989 core_external: Isolate testing of deprecated file
The inclusion of this deprecated file leads to tests passing which may
fail when run in a different order, or for just a single testsuite.
2023-04-21 09:33:53 +08:00
Paul Holden
571292b6eb
MDL-77896 editor_tiny: approximate height for non-visible editors.
When an editor is renderer initially invisible to the browser, e.g.
the forum "Add discussion" form, it has a `clientHeight` value of
zero. We can approximate an alternative value based on the number
of rows in the textarea.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-04-20 15:24:23 +01:00
Jake Dallimore
fffc7ebf7c MDL-77973 core: fix broken navigation when moodlenet misconfigured
Instead of failing with an exception, throw a debugging notice.
2023-04-20 11:47:54 +08:00
Andrew Nicols
59d42e1ed2 MDL-77718 editor_tiny: Restrict the revision to int for loaders
The revision should always be an int. I suspect this was missed during
debugging and not corrected.
2023-04-19 16:44:19 +00:00
Paul Holden
a8da761f8b
MDL-77959 moodlenet: void return type style fixes in test. 2023-04-19 17:35:12 +01:00
Paul Holden
5338fc591e
Merge branch 'MDL-77959-master' of https://github.com/HuongNV13/moodle 2023-04-19 17:25:14 +01:00
Jun Pataleta
ad37980aeb Merge branch 'MDL-77955' of https://github.com/paulholden/moodle 2023-04-19 23:45:25 +08:00
Paul Holden
c81bfc4f45
Merge branch 'MDL-77897-master' of https://github.com/andrewnicols/moodle 2023-04-19 14:13:03 +01:00
Paul Holden
b952c16086
Merge branch 'MDL-77944-master' of https://github.com/andrewnicols/moodle 2023-04-19 13:06:40 +01:00
Huong Nguyen
5548b91e3e MDL-77959 core_moodlenet: Convert activity intro to plaintext 2023-04-19 17:40:21 +07:00
Jun Pataleta
02ba4ceefa Merge branch 'MDL-77940' of https://github.com/stronk7/moodle 2023-04-19 17:43:23 +08:00
Jake Dallimore
555ad338bf Merge branch 'MDL-77958-master' of https://github.com/andrewnicols/moodle 2023-04-19 17:08:14 +08:00
Andrew Nicols
3ac1acacca MDL-77958 moodlenet: Various style fixes
This change contains various style fixes which I encountered and fixed
whilst addressing the other issues identified in this issue.
2023-04-19 16:12:50 +08:00
Andrew Nicols
581ccb9a47 MDL-77958 moodlenet: Pass stored_file to improve memory usage
Previously the content of the stored file was extracted and stored in a
variable, passed around, and then submitted to MoodleNet. This results
in very high memory consumption when dealing with MoodleNet.

The stored_file should be passed around as a first-level param to
discourage this, and the content should _never_ be loaded into memory.
Instead file streams and resources should be used to allow Guzzle/Curl
to buffer the file from disk/other storage straight to MoodleNet.
2023-04-19 16:12:50 +08:00
Andrew Nicols
489a53ceb2 MDL-77897 editor_tiny: Save editor content on editor blur 2023-04-19 14:57:10 +08:00