23996 Commits

Author SHA1 Message Date
Jun Pataleta
71b3f9c39f MDL-76649 mod_quiz: Use correct quizid attribute from attempt 2023-01-12 15:17:35 +08:00
Jun Pataleta
e0d857f39f Merge branch 'MDL-76649' of https://github.com/timhunt/moodle 2023-01-12 12:06:35 +08:00
Andrew Nicols
f516200459 Merge branch 'MDL-76839' of https://github.com/paulholden/moodle 2023-01-12 10:56:33 +08:00
Jun Pataleta
5166c729b4 MDL-76739 behat: Replace occurrences of "surname" in Behat tests
Replace occurrences of "surname" in Behat tests with "last name"
2023-01-12 09:53:41 +08:00
David Mudrák
50ba9dc72c MDL-76739 lang: Use the fixed strings in the tests, too 2023-01-12 09:17:27 +08:00
Helen Foster
975a127325 MDL-76739 lang: Import fixed English strings (en_fix) 2023-01-12 09:17:27 +08:00
Andrew Nicols
c81fbbfec9 Merge branch '66924-view-own-private-reply-master' of https://github.com/DSI-Universite-Rennes2/moodle 2023-01-11 15:52:41 +08:00
Tim Hunt
3b23ff6fec MDL-76810 redirect handling: ensure return URLs are properly sanitised 2023-01-11 11:42:28 +08:00
Andrew Nicols
6f1c9d3b53 Merge branch 'MDL-76614' of https://github.com/timhunt/moodle 2023-01-11 10:32:42 +08:00
Andrew Nicols
9e21e8a807 Merge branch 'MDL-76356' of https://github.com/stronk7/moodle 2023-01-11 10:26:20 +08:00
Jake Dallimore
98a23389b6 Merge branch 'MDL-76597-master-2' of https://github.com/junpataleta/moodle 2023-01-11 10:12:20 +08:00
Paul Holden
362818ff36 Merge branch 'MDL-76811-master' of https://github.com/andrewnicols/moodle 2023-01-10 16:40:05 +00:00
Paul Holden
37f68b7522 Merge branch 'MDL-76653-master' of https://github.com/lameze/moodle 2023-01-10 15:29:15 +00:00
Marina Glancy
b1c97381b4 MDL-76356 various: avoid implicit conversion to int
PHP before version 8.1 automatically converted to int if the function
parameter (or array key) is expected to be int. PHP 8.1 shows notice in
this case
2023-01-10 15:27:11 +01:00
Paul Holden
1bf87e87a4 MDL-76839 mod_data: correct external test class coverage notation. 2023-01-10 12:59:06 +00:00
Andrew Nicols
35eb66d9dc MDL-76811 mod_data: Remove duplicate tests 2023-01-10 11:39:40 +08:00
Andrew Nicols
cec147f428 MDL-76811 mod_data: Stop testing template creation on field creation
The default template is no longer created when creating the fields with
the generator, so we should stop testing that it is.
2023-01-10 11:39:40 +08:00
Andrew Nicols
103b17c761 MDL-76811 mod_data: Generator test cleanup 2023-01-10 11:39:39 +08:00
Simey Lameze
4d2b1f26a7 MDL-76653 behat: add coverage for SCORM availability 2023-01-10 10:26:20 +08:00
Tim Hunt
7e4972a4a8 fixup! MDL-76614 quiz: deprecate class moodle_quiz_exception 2023-01-09 17:48:26 +00:00
Julien Boulen
b87ead3384 MDL-66924 mod_forum: Allow users to see their own private messages
Allow users to see their own private messages even if they don't have
mod/forum:readprivatereplies capability

Add behat test to avoid MDL-67109 issue.

Co-authored-by: Martin Putzlocher <mputzi@users.noreply.github.com>
2023-01-09 14:41:01 +01:00
Tim Hunt
192f993906 MDL-76649 quiz statistics task: output more useful trace info
At the moment, quiz_statistics\task\recalculate gives no useful
information about what it is doing, which makes it hard to investigate
if the task fails. This commit makes it more usefully verbose.

Also, following this change, one instance of this task will not
run for more than one hour at a time.

As part of this commit, I have added a new helper mtrace_exception.
to consistently log exceptions in scheduled tasks. It is sad to
add a new function to moodlelib.php, but that seemed the logical place.
Looking at other tasks, this method is badly needed. Many are just
logging the ->getMessage() which is normaly insufficient for proper
debugging. However, swiching all existing tasks to use the new function
will need to wait for a future MDL.
2023-01-09 13:26:41 +00:00
Jun Pataleta
7927374af9 MDL-76597 mod_quiz: Add a default heading name for Behat tests 2023-01-09 15:41:27 +08:00
Jun Pataleta
08a2781607 MDL-76597 mod_quiz: Set presentation role for the question list
Since the <ul> and <li> elements for listing the quiz questions and
elements are mainly used for layout purposes, it is better to set the
role of these elements to presentation only.
The aria-label for the <li> element is inappropriate and can also cause
confusion to screen reader users. Better to remove this. Though this is
being used in the confirmation modal so better to just change it to a
data attribute.
2023-01-06 22:37:54 +08:00
Jun Pataleta
317dd19f02 MDL-76597 mod_quiz: Set presentation role for the question list
Since the <ul> and <li> elements for listing the quiz questions and
elements are mainly used for layout purposes, it is better to set the
role of these elements to presentation only.
2023-01-06 22:37:54 +08:00
Jun Pataleta
f7bcd8304f MDL-76597 mod_quiz: Add label for question checkboxes 2023-01-06 22:37:54 +08:00
Jun Pataleta
beac221ac4 MDL-76597 mod_quiz: Darken section heading on quiz questions page 2023-01-06 22:37:54 +08:00
Jun Pataleta
384e40a750 MDL-76597 mod_quiz: Add label for version selector 2023-01-06 22:37:54 +08:00
Jun Pataleta
e4f1f254c9 MDL-76597 mod_quiz: Add a default sr-only section heading
Add a default sr-only section heading in order to prevent having an
empty heading for the quiz section which is not good for accessibility.

Plus:
- There's also an existing issue where filters are never applied to
section headings on load. This has been fixed in this commit as well.
- Button role added for the edit section button which enables it to
take advantage of the theme highlighting when it receives focus.
2023-01-06 22:37:54 +08:00
Tim Hunt
a02497f942 MDL-76614 quiz: clean up view.php script 2023-01-06 14:35:55 +00:00
Tim Hunt
ca7fb1eb02 MDL-76614 quizaccess_seb: rename access_manager & quiz_settings classes
This is to avoid confusion between the main mod_quiz classes and SEB's own.
2023-01-06 14:35:55 +00:00
Tim Hunt
58e4bc9a3e MDL-76614 quiz: clean up the quiz_settings class 2023-01-06 14:35:54 +00:00
Tim Hunt
a9f8547599 MDL-76614 quiz: rename quiz => mod_quiz\quiz_settings 2023-01-06 14:35:54 +00:00
Tim Hunt
ae6a1c0391 MDL-76614 quiz: clean up the quiz_attempt class 2023-01-06 14:35:52 +00:00
Tim Hunt
5682c8c70e MDL-76614 quiz: move class quiz_attempt => mod_quiz\quiz_attempt
I thought about renaming the class to just plain attempt, but I
acutally think quiz_attempt makes it clearer what this is. Also
not changing the name massively reduces the pain for everyone
updating their code (including me right now!)
2023-01-06 14:35:51 +00:00
Tim Hunt
79a29d243c MDL-76614 quiz: remove unneeded MOODLE_INTERNAL 2023-01-06 14:35:51 +00:00
Tim Hunt
03116995d5 MDL-76614 quiz: move quiz_review_nav_panel to classes 2023-01-06 14:35:51 +00:00
Tim Hunt
ccbb5da784 MDL-76614 quiz: move quiz_attempt_nav_panel to classes 2023-01-06 14:35:51 +00:00
Tim Hunt
adbd0daddb MDL-76614 quiz: clean up navigation_panel_base class 2023-01-06 14:35:50 +00:00
Tim Hunt
74c6823bac MDL-76614 quiz: move quiz_nav_panel_base to classes folder 2023-01-06 14:35:50 +00:00
Tim Hunt
600b17db21 MDL-76614 quiz: move quiz_nav_section_heading to classes folder 2023-01-06 14:35:50 +00:00
Tim Hunt
6833a902df MDL-76614 quiz: move quiz_nav_question_button to classes folder 2023-01-06 14:35:50 +00:00
Tim Hunt
89f97a7e2a MDL-76614 quiz: code cleanup in mod_quiz\output\renderer 2023-01-06 14:35:50 +00:00
Tim Hunt
5ef8b6978e MDL-76614 quiz: mod_quiz_renderer => mod_quiz\output\renderer 2023-01-06 14:35:49 +00:00
Tim Hunt
6c989eb24c MDL-76614 quiz: Final deprecation of view_page::$startattemptwarning
This waas deprecated in Moodle 3.1 MDL-46091
2023-01-06 14:35:49 +00:00
Tim Hunt
abeeaef10a MDL-76614 quiz: mod_quiz_view_object => mod_quiz\output\view_page 2023-01-06 14:35:49 +00:00
Tim Hunt
aceae3a4fa MDL-76614 quiz: move mod_quiz_links_to_other_attempts => classes\output 2023-01-06 14:35:49 +00:00
Tim Hunt
581a3bc7e9 MDL-76614 quiz: quiz_add_random_form => mod_quiz\form\add_random_form 2023-01-06 14:35:49 +00:00
Tim Hunt
dd41b972c0 MDL-76614 quiz: clean up edit_override_form class 2023-01-06 14:35:49 +00:00
Tim Hunt
8af8ef3b9f MDL-76614 quiz: clean up access_rule_base class 2023-01-06 14:35:48 +00:00