24205 Commits

Author SHA1 Message Date
Angelia Dela Cruz
e7d32b89ac MDL-75961 behat: IMSCP behat generators use UI
Replace steps that manually add IMSCP instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-05-24 10:41:41 +08:00
Simey Lameze
1936b30c88 MDL-76065 behat: Review and enhance mod_lti Behat tests
In this commit, the following improvements were made to the mod_lti Behat tests:

* Replaced manual steps with data generators to set completion.
* Eliminated unnecessary user and course enrolments data generation as some tests can be performed as an admin.
* Removed the @javascript tag from non-JS tests.
* Updated the LTI data generator to generate an internal Moodle URL in the toolurl field, enabling the use of XML files.
2023-05-23 12:23:26 +08:00
Angelia Dela Cruz
f19f31736a MDL-76065 behat: LTI behat generators use UI
Replace steps that manually add LTI instances via the UI and use
Behat generators. This improves the speed of the Behat test runs.
2023-05-23 12:15:25 +08:00
Andrew Nicols
1450dade43
MDL-76733 mod_assign: Tidy up availability behat tests
This feature had lots of small issues and it made sense to fix it whilst
investigating a query:

* most of the steps do not require JavaScript
* it uses the UI to set an admin setting, for every scenario:
** only 3-4 of the scenarios actually test that setting
** it is very slow to do it his way when we have a generator step we can use
* we create two assignments in the Background, but each test only uses one of them
* we create the assignments in the Background with a generator, but
  update them to modify various settings in each Scenario using the UI
  when we should just create one assignment for each test and set it up
  correctly for that Scenario
2023-05-23 10:58:07 +08:00
Luca Bösch
6bb4351e8b MDL-78229 quiz: quiz editing page less narrow.
This is a backport of MDL-77872.
2023-05-19 18:13:07 +02:00
Mark Johnson
5620e0059a MDL-75696 quiz: Fix restoring pre-4.0 quizzes with random questions
Restoring multiple quizzes from a pre-4.0 backup was broken when
the quizzes shared a random question. This is because after the
first quiz created a set reference in place of the random question,
it deleted the question record so it was not there for the second
quiz to use. This change tracks the IDs of random questions so
they can be deleted at the end.
2023-05-18 15:59:53 +01:00
Mark Johnson
85b1e992e9 MDL-75696 quiz: Set default value for includingsubcategories on restore 2023-05-18 15:56:02 +01:00
Andrew Nicols
b28a28ef0f
Merge branch 'MDL-78260_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-05-18 11:51:47 +08:00
Tim Hunt
3d023db5b0 MDL-78260 quiz stats: fix View details for random questions 2023-05-17 09:04:49 +01:00
Ilya Tregubov
87223abc7a
Merge branch 'MDL-78152-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-17 15:07:38 +08:00
Jun Pataleta
4818dae2fc Merge branch 'MDL-75576_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-05-16 09:59:01 +08:00
Ilya Tregubov
dc38a92ec6
Merge branch 'MDL-77840-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2023-05-16 09:47:48 +08:00
Andrew Nicols
946405d44b
Merge branch 'MDL-77432-401' of https://github.com/lucaboesch/moodle into MOODLE_401_STABLE 2023-05-15 22:12:44 +08:00
Andrew Nicols
bdeda3ea9b
Merge branch 'MDL-78149-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-15 22:07:13 +08:00
Tim Hunt
efe895f1bb MDL-75576 quiz/question statistics: don't expire by time
Previously, a set of calculated quiz statistics would only 'last' for
15 minutes. Then they would be considered invalid and not used.

Now, computed statistics are kept indefinitely. Instead, when a new
batch of values are computed for a particular set of settings, older numbers
for the same settings are deleted first. Therefore,
question_stats_cleanup_task is no more.
2023-05-15 10:04:34 +01:00
Tim Hunt
a532f407bb MDL-75576 quiz statistics: don't time-limit the use of cached values
This should have been done as part of  MDL-74762, but was missed.
2023-05-15 10:04:33 +01:00
Tim Hunt
86932a330b MDL-75576 quiz statistics: don't compute when a user views the qbank
Previously, when users viewed the question bank, if the quiz statistics
had not already been calculated, we would try to compute them there an then.
This could be very, very slow, leading to session lock problems.

Now, we never try to compute the statistics on the fly. Instead, we rely
on the existing \quiz_statistics\task\recalculate scheduled task to do it.
2023-05-15 10:04:33 +01:00
Jun Pataleta
28026b923a Merge branch 'MDL-76903-401' of https://github.com/laurentdavid/moodle into MOODLE_401_STABLE 2023-05-15 12:06:02 +08:00
Luca Bösch
f1dd604fce MDL-77432 mod_assign: Confirm submission page standard and not incourse 2023-05-12 09:44:22 +02:00
Cameron Ball
77eb2ed79b MDL-75898 assignfeedback_editpdf: Add randomness to PDF annotations
The behat step "I draw on the pdf" creates the exact same line every
time it is called. This can cause issues in a situation like the following:

- Student uploads PDF
- Teacher annotates page 1
- Student edits submission, adding another PDF
- Teacher annotates page 1 again
- When the student looks at their annotated PDF it appears the same as
  before they added the second PDF (i.e., they don't see extra pages for
  the second PDF)

Exactly why this happens isn't clear, and in practice this probably never
happens because the chances of drawing the exact same line twice are almost
0. However, when testing the functionality added in MDL-45580 it was causing
issues.
2023-05-12 09:14:03 +10:00
Cameron Ball
90350915c2 MDL-75898 assignfeedback_editpdf: Don't poll readonly pages
When requesting the readonly version of pages (which contain
teacher annotations), they should always be available - the
PHP side even throws an exception when they're not. This
means we don't need to worry about polling document converters
from the JS side and can just return the pages immediately.
2023-05-12 09:14:03 +10:00
Cameron Ball
825609ae08 MDL-75898 assignfeedback_editpdf: Improve page count mismatch logic
MDL-45580 introduced the readonlypages filearea, and when loading
page images for an attempt, the code would check if the pages existed
, creating them if not. The code inside this block also contained
a guard clause for the case where no readonly pages existed - which
is a situation that should not happen. Whenever readonly pages are
requested, they should exist.

MDL-66626 introduced a situation where page counts not matching would
also retrigger page generation. However this led to a situation where
the guard clause could be entered when requesting readonly pages.

This patch refactors the guard clause, and improves the logic to
regenerate pages.
2023-05-12 09:14:03 +10:00
Laurent David
20b4efad5c MDL-76903 mod_book: Fix activity completion
* Check only visibles pages to set completion status.
* Make sure we have consistent completion value in API and on the view page.
2023-05-11 12:09:24 +02:00
Andrew Nicols
5ceb711355
Merge branch 'MDL-78034-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-10 13:00:30 +08:00
Paul Holden
d7ba3f656d
MDL-78149 mod_data: ensure group selector is always present. 2023-05-09 12:20:35 +01:00
Paul Holden
48963bb7a7
MDL-78152 mod_book: set permissions required for page editing. 2023-05-09 12:11:32 +01:00
Jun Pataleta
d1c24b02ab Merge branch 'MDL-77398-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-03 20:36:18 +08:00
Jun Pataleta
f8fdd198a9 Merge branch 'MDL-77394-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-03 10:31:00 +08:00
Jun Pataleta
394d592fab Merge branch 'MDL-78038-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-05-03 10:25:30 +08:00
Sara Arjona
aa63dca768 Merge branch 'MDL-77791_401' of https://github.com/dvdcastro/moodle into MOODLE_401_STABLE 2023-05-02 12:03:59 +02:00
David Woloszyn
5ab74afad4 MDL-77840 lti: Avoid passing nulls to base64_encode 2023-05-02 13:52:12 +10:00
Ilya Tregubov
d28386a29d Merge branch 'MDL-78025_401' of https://github.com/timhunt/moodle into MOODLE_401_STABLE 2023-05-02 11:43:30 +08:00
Paul Holden
4f7dd1a54b
MDL-78038 mod_bigbluebuttonbn: observe course format section config. 2023-04-26 16:10:52 +01:00
Tim Hunt
384ab12c55 MDL-78025 quiz: fix the quiz_questions_in_use logic 2023-04-26 15:44:54 +01:00
Paul Holden
eca7a9ce2b
MDL-78034 mod_bigbluebuttonbn: format instance group names. 2023-04-26 15:31:44 +01:00
David Castro
e5c89630af MDL-77791 data: Fix file attachment to search doc 2023-04-25 19:49:33 -05:00
Paul Holden
bb433919cc
MDL-77394 mod_forum: de-couple discussion pinned/starred options. 2023-04-24 10:38:01 +01:00
Paul Holden
1e16260ba7
MDL-77398 mod_assign: disable form submit protection for batch options. 2023-04-24 10:35:15 +01:00
Huong Nguyen
4ec5aac734 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:59:32 +07:00
Ilya Tregubov
b142840de1 MDL-77229 mod_lesson: Black list detailed statistics in classic Behat.
The nav element to go to detailed stats page is missing in classic
2023-04-21 15:07:36 +08:00
Ilya Tregubov
8fb9177b74 Merge branch 'MDL-77229-401' of https://github.com/ilyatregubov/moodle into MOODLE_401_STABLE 2023-04-21 12:11:40 +08:00
Ilya Tregubov
6e15a26dce MDL-77229 lesson: Add Behat test 2023-04-21 12:04:17 +08:00
Juan Leyva
39084a098b MDL-77229 lesson: Fix error for empty responses (numerical pagetype) 2023-04-20 12:46:42 +02:00
Paul Holden
4d4635228d MDL-77187 mod_wiki: validate external method sort parameters. 2023-04-19 13:20:25 +00:00
Víctor Déniz
1265b0ad84 MDL-77878 lang: Use fixed strings in tests 2023-04-17 09:26:52 +01:00
Helen Foster
2db1ddd290 MDL-77878 lang: Import fixed English strings (en_fix) 2023-04-16 20:54:48 +01:00
Sara Arjona
bc34e3fef3 Merge branch 'MDL-76859-401' of https://github.com/sarjona/moodle into MOODLE_401_STABLE 2023-04-13 16:24:28 +02:00
Sara Arjona
4ed6c8fbce Merge branch 'MDL-77788-401' of https://github.com/rmady/moodle into MOODLE_401_STABLE 2023-04-13 13:17:28 +02:00
Petr Skoda
f336875b1a MDL-76859 h5p: Fix behat failures
- Only resize if the H5P EmbedCommunicator is defined (otherwise, it was causing a
JS error)
- An unnecessary image has been removed from the greeting-card.h5p fixture package.
That way, the text will always be displayed (even if the iframe is still not
resized). Instead of replacing the original greeting-card-887.h5p file, I've
renamed it to greeting-card.h5p, to remove these ugly and unnecessary numbers
at the end of the file name).
2023-04-12 12:27:06 +02:00
Laurent David
b631966a70 MDL-77612 mod_label: Label name fix
* The @@PLUGINFILE@@ placeholder or URLs should not be displayed in the
course index for labels
2023-04-11 05:24:39 +02:00