Compare commits

...

396 Commits

Author SHA1 Message Date
Jun Pataleta f810374a0e Moodle release 4.3.2 2023-12-22 10:00:26 +08:00
Sara Arjona 6c73be6e8e weekly release 4.3.1+ 2023-12-21 13:34:17 +01:00
Huong Nguyen 5a7599385f Merge branch 'MDL-80151-403' of https://github.com/lameze/moodle into MOODLE_403_STABLE 2023-12-20 15:39:54 +07:00
Huong Nguyen eae457d10d MDL-80151 behat: Improve viewing site calendar step 2023-12-20 16:32:38 +08:00
Angelia Dela Cruz 56eb910aed MDL-80151 mod_chat: Behat for chat repeat times and past session view 2023-12-20 16:32:38 +08:00
Simey Lameze 11dcef291d MDL-80151 behat: add calendar step to navigate to specific view 2023-12-20 16:32:38 +08:00
Jun Pataleta 42cbafd610 Merge branch 'MDL-68124-403' of https://github.com/sarjona/moodle into MOODLE_403_STABLE 2023-12-20 15:01:05 +08:00
Jun Pataleta fb1752711e Merge branch 'MDL-80393-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-12-19 17:25:10 +08:00
Paul Holden 99eb359503 MDL-80393 lang: expose current page language to JS modules.
Since 4be39296 the root HTML element contains the iso6391 language
code of the current language pack. However various JS modules need
access to the original Moodle language pack code, so expose that
in the `M.cfg` structure.
2023-12-19 07:47:22 +00:00
Sara Arjona 6f344ff877 MDL-68124 lesson: Fix random behat error with Oracle
This random error was caused because when reviewing an attempt,
the first pageid to display is calculated based on the timeseen
field in the lesson_attempst table.
In Oracle, sometimes it returned the second pageid (because both
had the same timeseen), so which led to these random failures.

Apart from adding 1-second wait when the attempt is created (to
guarantee the first page is returned properly), a few more
improvements have been also made, like removing manual steps for
setting the lesson activity or adding some extra checks to
confirm the information displayed is expected.
2023-12-18 09:48:48 +01:00
Huong Nguyen 68c20d41fe Merge branch 'MDL-80410-403' of https://github.com/lucaboesch/moodle into MOODLE_403_STABLE 2023-12-18 14:09:47 +07:00
Luca Bösch 4272fc3f28 MDL-80410 resource: File icon without 'nofilter' 2023-12-15 07:01:47 +01:00
Huong Nguyen 1bd5dfe090 weekly release 4.3.1+ 2023-12-15 08:44:19 +07:00
Huong Nguyen f8d0e86350 Merge branch 'install_403_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_403_STABLE 2023-12-15 08:44:13 +07:00
Huong Nguyen e092c75d15 Merge branch 'MDL-79828-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-12-14 10:14:43 +07:00
Huong Nguyen 90b3f5fc26 Merge branch 'MDL-79050-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-12-14 09:56:47 +07:00
Huong Nguyen c77bef3ad7 Merge branch 'MDL-80394-403' of https://github.com/ilyatregubov/moodle into MOODLE_403_STABLE 2023-12-14 09:22:42 +07:00
Ilya Tregubov 260eef0a72 Merge branch 'MDL-79938-m403' of https://github.com/sammarshallou/moodle into MOODLE_403_STABLE 2023-12-14 08:50:54 +08:00
AMOS bot af0fe95d84 Automatically generated installer lang files 2023-12-14 00:11:12 +00:00
Sara Arjona ee0c928f10 Merge branch 'MDL-80233-403' of https://github.com/aanabit/moodle into MOODLE_403_STABLE 2023-12-13 10:22:10 +01:00
Angelia Dela Cruz d1796d1f0e MDL-79050 Behat: Add behat coverage to retake lesson activity 2023-12-13 16:25:13 +08:00
Huong Nguyen ac2acd0072 Merge branch 'MDL-74466-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-12-13 09:28:57 +07:00
Ilya Tregubov 155abc6945 MDL-80394 core_grades: Revert changes to graded_users_iterator
Third party plugins are using it and change was breaking it
2023-12-13 09:38:14 +08:00
Ilya Tregubov cf0b182dee Merge branch 'MDL-80003_403' of https://github.com/PhilippImhof/moodle into MOODLE_403_STABLE 2023-12-13 09:22:16 +08:00
Sara Arjona f863084cc9 Merge branch 'MDL-77572_403' of https://github.com/santoshndev/moodle into MOODLE_403_STABLE 2023-12-12 17:55:57 +01:00
sam marshall 2ddad8ce7a MDL-79938 Behat: Add steps to support multiple tabs 2023-12-12 16:43:08 +00:00
Santosh Nagargoje 8d45a9f2a2 MDL-77572 Course: Added fix for section,activity visibility capabilities
added fix
2023-12-12 21:38:45 +05:30
Amaia Anabitarte 4b0a34f08a MDL-80233 completion: Use default for empty values 2023-12-12 16:34:11 +01:00
Sara Arjona 3a7f291d38 Merge branch 'MDL-80315-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-12-12 14:19:52 +01:00
Sara Arjona bbfc6312a8 Merge branch 'MDL-79835_403' of https://github.com/timhunt/moodle into MOODLE_403_STABLE 2023-12-12 14:11:41 +01:00
Huong Nguyen fe8d759b17 Moodle release 4.3.1 2023-12-08 09:21:43 +07:00
Philipp Imhof 983921ecff MDL-80003 mod_quiz: watch all instances of tinyMCE 2023-12-07 17:29:58 +01:00
Sara Arjona f72244a8c2 weekly release 4.3+ 2023-12-07 16:22:04 +01:00
Paul Holden d09f737c7d MDL-79980 mod_survey: remove responses link if user cannot access.
Update Behat scenario to match.
2023-12-07 12:08:47 +01:00
Brendan Heywood b654282b18 MDL-80309 tasks: Clean up mtrace logs 2023-12-07 12:08:05 +08:00
Andrew Nicols bdb5a4ba40 Merge branch 'MDL-80257-403' of https://github.com/meirzamoodle/moodle into MOODLE_403_STABLE 2023-12-07 11:43:05 +08:00
Huong Nguyen 419d7f40c3 Merge branch 'MDL-80341_403' of https://github.com/timhunt/moodle into MOODLE_403_STABLE 2023-12-07 10:27:58 +07:00
Paul Holden 7be05aae41 MDL-79839 tool_task: clean task classname parameter prior to use. 2023-12-07 10:54:01 +08:00
Huong Nguyen 04261e8722 Merge branch 'MDL-79061-403-2' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-12-07 09:52:28 +07:00
Jun Pataleta a53121b74a MDL-79061 course: Create a sr-only mutations logger
* Create SRLogger that extends from the default Logger class. This
logger outputs the feedback to a sr-only ARIA live region to allow
screen readers to announce the feedback from mutations.
* Update the course editor to use the SRLogger.
2023-12-07 10:43:13 +08:00
Ferran Recio 6814c42260 MDL-79061 core: Mechanism for logging mutation feedbacks
* Create a mechanism for logging mutation feedbacks.
* The mutation feedbacks are displayed as a toast by default.
* Apply this logging mechanism on the course homepage to provide
feedback for the results of actions performed on course modules and
course sections.
2023-12-07 10:43:13 +08:00
Huong Nguyen 658953e34f Merge branch 'MDL-68652-403-1' of https://github.com/ilyatregubov/moodle into MOODLE_403_STABLE 2023-12-07 09:31:46 +07:00
Jun Pataleta c2c03f203f Merge branch 'MDL-80281_403_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_403_STABLE 2023-12-07 10:16:52 +08:00
Huong Nguyen 9a1a58e593 Merge branch 'MDL-77136-403' of https://github.com/lucaboesch/moodle into MOODLE_403_STABLE 2023-12-07 08:36:35 +07:00
Paul Holden 0f63155d58 MDL-79980 mod_survey: respect activity group mode getting report. 2023-12-07 09:32:11 +08:00
Ilya Tregubov 25e00b5e1f MDL-68652 core_grades: Only return allowed fields.
Grade iterator should check user permissions.
2023-12-07 09:12:39 +08:00
Ilya Tregubov b2bc3b9e7e Merge branch 'MOODLE_403_MDL-73378' of https://github.com/danielneis/moodle into MOODLE_403_STABLE 2023-12-07 09:01:58 +08:00
Jun Pataleta 38ed732727 Merge branch 'MDL-79761-403' of https://github.com/marinaglancy/moodle into MOODLE_403_STABLE 2023-12-07 08:54:00 +08:00
Paul Holden 463f16617e MDL-80239 grade: escape matched data in user search results. 2023-12-07 08:42:38 +08:00
Paul Holden 260924aeb8 MDL-80287 grade: escape current value in search templates. 2023-12-07 08:36:32 +08:00
Tim Hunt d7a1ef5dfa MDL-79835 behat_core_generator: remove misleading error obfuscation 2023-12-06 18:12:20 +00:00
Jun Pataleta b38413afe4 Merge branch 'MDL-80127_403' of https://github.com/timhunt/moodle into MOODLE_403_STABLE 2023-12-06 22:12:17 +08:00
Jun Pataleta 05ab53734b Merge branch 'MDL-80079-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-12-06 21:59:11 +08:00
Luca Bösch 708732ed72 MDL-77136 qtype_randomsamatch: Newest versions for shortanswer questions 2023-12-06 14:14:14 +01:00
Luca Bösch 121d6fb20a MDL-77136 core_question: Newest versions get_questions_from_categories 2023-12-06 14:14:14 +01:00
Tim Hunt e4acb387bb MDL-80127 question engine: prevent fatal errors from old bad data 2023-12-06 11:38:58 +00:00
Tim Hunt ff74bb2682 MDL-80127 question engine: don't convert null to '' before storing 2023-12-06 11:38:58 +00:00
Tim Hunt 17fb4afaab MDL-80341 quiz: unseen descriptions are not unanswered questonis
This was causing confusing in the 'are you sure you want to submit' confirmation pop-up.
2023-12-06 11:13:27 +00:00
Angelia Dela Cruz 0cb2fd1a7f MDL-80315 block_comments: Removed duplicate Behat test
Deleted the duplicated course comments block behat test. The file
blocks/comments/tests/behat/add_comment.feature is deleted as a
result.
2023-12-06 18:18:53 +08:00
Ilya Tregubov 60541d90e5 Merge branch 'MDL-76109-403' of https://github.com/meirzamoodle/moodle into MOODLE_403_STABLE 2023-12-06 15:42:55 +08:00
Huong Nguyen 4b26df011f Merge branch 'MDL-50650-403' of https://github.com/ilyatregubov/moodle into MOODLE_403_STABLE 2023-12-06 14:06:13 +07:00
Stephan Robotta fbecc7132d MDL-41465 reports: In separate group mode, limit to same 2023-12-06 13:52:58 +07:00
Ilya Tregubov bbea6e1d31 MDL-68652 mod_forum: Only include gradable users in grading 2023-12-06 12:45:09 +08:00
David Woloszyn 9e3ca2a866 MDL-79759 repository_url: Limit css imports and remove fragments
There are checks to urls that attempt to limit recurrsion when
parse_file is called. This is problematic for css import urls that
can call an indefinite amount of nested import urls. An import limit
has been introduced to address this. Fragments have also been removed.
2023-12-06 03:54:20 +01:00
Stevani Andolo 40ee4ab3fa MDL-80174 tool_log: ensure "other" data is safely unserialized. 2023-12-06 03:54:20 +01:00
Paul Holden d40fc8708a MDL-80268 badges: require capability to view awarded badges. 2023-12-06 03:54:20 +01:00
Paul Holden 2a60bc604f MDL-79797 backup: ensure block config is safely unserialized. 2023-12-06 03:54:20 +01:00
Ilya Tregubov e8237560d3 Merge branch 'MDL-79692-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-12-06 10:50:13 +08:00
Huong Nguyen 258783a754 Merge branch 'MDL-80180-403' of https://github.com/jbs1/moodle into MOODLE_403_STABLE 2023-12-06 09:16:28 +07:00
Ilya Tregubov 81de0469c1 Merge branch 'MDL-74248-MOODLE_403_STABLE-fix_mp3_mod_folder' of https://github.com/praxisdigital/moodle into MOODLE_403_STABLE 2023-12-06 10:01:00 +08:00
Sara Arjona 638cbfac93 Merge branch 'MDL-80286-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-12-05 16:42:14 +01:00
Sara Arjona 85c70539df Merge branch 'MDL-79862-403' of https://github.com/aanabit/moodle into MOODLE_403_STABLE 2023-12-05 16:35:25 +01:00
Sara Arjona 5b442418ad Merge branch 'MDL-79979-403' of https://github.com/aanabit/moodle into MOODLE_403_STABLE 2023-12-05 16:16:47 +01:00
Jun Pataleta 9c641bf38e Merge branch 'MDL-73974-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-12-05 23:09:37 +08:00
Karen Holland f9797aca63 MDL-73974 tool_brickfield: Processing alpha fontsizes 2023-12-05 23:07:57 +08:00
Sara Arjona d4b1ecbed4 Merge branch 'MDL-55640-m403' of https://github.com/sammarshallou/moodle into MOODLE_403_STABLE 2023-12-05 16:01:54 +01:00
Sara Arjona d140771110 Merge branch 'MDL-80015-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-12-05 15:51:28 +01:00
Sara Arjona 762df4050c Merge branch 'MDL-80254-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-12-05 15:45:38 +01:00
Jun Pataleta bee2d552b7 Merge branch 'MDL-79806_403_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_403_STABLE 2023-12-05 12:48:31 +08:00
Huong Nguyen f172248f20 Merge branch 'MDL-71336-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-12-05 11:19:41 +07:00
Jun Pataleta db71e79e05 Merge branch 'm43-mdl64431' of https://github.com/danmarsden/moodle into MOODLE_403_STABLE 2023-12-05 12:13:40 +08:00
Huong Nguyen 05c9ce4bd8 Merge branch 'MOODLE_403_STABLE' of https://github.com/dragos5436/moodle into MOODLE_403_STABLE 2023-12-05 10:40:29 +07:00
Ilya Tregubov ade9f7177a MDL-68652 core_grades: Refactor grades functions.
get_gradable_users now has extra param to retrieve only active
users. Grade reports hase their own grade_report::get_gradable_users
since they decided whether to inlcude active users from report preferences
2023-12-05 10:52:12 +08:00
Ilya Tregubov 05846ae405 MDL-68652 core_grades: Add a webservice to retrive only gradable users. 2023-12-05 10:52:12 +08:00
Ilya Tregubov e186ad572d Merge branch 'MDL-80043-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-12-05 09:11:08 +08:00
Ilya Tregubov 9f636a3de3 Merge branch 'MDL-80131-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-12-05 09:00:43 +08:00
Marina Glancy d79ad5de6a MDL-79761 navigation: fix default setting during web installation 2023-12-04 13:06:06 +00:00
Sara Arjona b7c8f7f723 Merge branch 'MDL-80185-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-12-04 11:00:44 +01:00
Paul Holden 46192ca77e MDL-80254 reportbuilder: better handling of deleted users in schedules.
We should verify that schedule and audience users are active accounts,
and that we don't try to send report schedules either from/to them if
they aren't.
2023-12-04 09:48:42 +00:00
meirzamoodle d68ea95f26 MDL-80257 editory_tiny: Implement ui_mode: split
Since version 6.4 and later, TinyMCE had a feature `ui_mode: split`.

It enables support for editors in scrollable containers,
and Moodle has some pages, especially the course pages, that are using the scrollable containers.
Therefore, all workaround that is addressed should be replaced by the feature to avoid future problems
regarding the overflow and the z-index issues.
2023-12-04 16:28:44 +07:00
meirzamoodle 85af2e6a7c MDL-80257 editory_tiny: Remove tox-tinymce-aux z-index
Remove .tox-tinymce-aux from style.css because z-index is already defined in TinyMCE skin.css
2023-12-04 16:28:44 +07:00
Paul Holden 4ac4b93064 MDL-74466 repository: avoid passing around sesskey when not required. 2023-12-04 09:22:32 +00:00
Jun Pataleta 136aef1fe6 Merge branch 'MDL-80221-403-enfix' of https://github.com/mudrd8mz/moodle into MOODLE_403_STABLE 2023-12-04 16:11:30 +08:00
Ilya Tregubov 79ea6a2d22 MDL-50650 core_grades: Validate minimum grade when importing grades
Also add behat test for max and min grade validation.
2023-12-04 16:03:21 +08:00
Kyle Matter e2f5104676 MDL-50650 core_grades: allow grade imports larger than 100 points 2023-12-04 12:53:21 +08:00
Jun Pataleta bc133f6fc3 Merge branch 'MDL-79726-403' of https://github.com/sarjona/moodle into MOODLE_403_STABLE 2023-12-04 12:09:17 +08:00
Huong Nguyen bea6119692 Merge branch 'MDL-79784-403' of https://github.com/jleyva/moodle into MOODLE_403_STABLE 2023-12-04 09:25:35 +07:00
Jun Pataleta b04fcb4527 MDL-80131 mod_data: Make page titles unique 2023-12-02 07:20:35 +08:00
dragos5436 b4278ca6b0 MDL-60632 mod_quiz: Fix chart rendering fail in quiz report
If a quiz activity has negative grading enabled for incorrect answers,
students can achieve overall negative grades in this quiz. If at least
one student achieves a negative grade, the chart at the bottom of the
quiz 'Results' tab will fail to display. This patch add a search for
negative results, removes them from the band below 0 and adds them to
the 0 band. This will make the chart render correctly again.

Co-authored-by: Susana Leitão <sleitao@uporto.pt>
Co-authored-by: Matthias Opitz <m.opitz@ucl.ac.uk>

Removed whitespace at end of lines
2023-12-01 15:28:24 +00:00
Sara Arjona d20c47f89c Merge branch 'MDL-80209-403' of https://github.com/aanabit/moodle into MOODLE_403_STABLE 2023-12-01 10:56:09 +01:00
Sara Arjona d29433ddc6 MDL-79726 completion: Overall should consider pass/fail states too
In MDL-78744, when the overallcompletion state was added to be displayed
in the activity card, only COMPLETE/INCOMPLETE status were considered.
However, depending on the activity completion settings, there are a
couple of states more that should also be included (COMPLETE_FAIL and
COMPLETE_PASS).

A new method has been added to the cm_completion_details class to
calculate whether a module should be considered or not completed,
based on their completion options and the current value for the
overall complete state.
2023-12-01 09:19:11 +01:00
David Mudrák 0a494aa9f6 MDL-80221 lang: Use fixed strings in the tests, too 2023-12-01 06:28:07 +01:00
Ilya Tregubov a418e9e53a weekly release 4.3+ 2023-12-01 13:12:23 +08:00
Jun Pataleta 3f10ec31b5 MDL-80043 grade: Add upgrade.txt notes 2023-12-01 09:10:53 +08:00
Jun Pataleta 488a653e50 MDL-80043 gradereport_grader: Define editingmode_title lang string 2023-12-01 09:10:53 +08:00
Jun Pataleta 7fa08a0b35 MDL-80043 grade: editingmode_title support for grade report plugins
* Add support for grade report plugins that define an
`editingmode_title` lang string. If the grade report plugin defines this
 language string, it will be used for the page title's unique
 identifying information when editing mode is turned on.
2023-12-01 09:10:53 +08:00
Jun Pataleta 6a89731462 MDL-80043 gradereport_singleview: Improve heading wordings
* Make the headings for the single view easier to read and understand
* When on editing mode, update the heading for the grade and user
screens to convey to the user that the page is currently on editing
mode. This is helpful for screen reader users as they can immediately
know the current display mode of the single view report page when this
gets read via the page title.
2023-12-01 09:10:53 +08:00
Jun Pataleta fd8b7fc730 MDL-80043 grade: Use heading parameter for the page title if provided 2023-12-01 09:10:52 +08:00
sam marshall 006eaeef08 MDL-55640 setuplib: test_localcachedir fails sporadically 2023-11-30 13:57:48 +00:00
Paul Holden 2862cce2a9 MDL-80286 datafield_date: cast field content to real when sorting.
This ensures we don't under/overflow the size of an integer in DB.
2023-11-30 10:05:01 +00:00
Amaia Anabitarte e3d76202cd MDL-80209 mod_scorm: Save minimum score completion 2023-11-30 10:40:17 +01:00
Mark Johnson 6441cca4d1 MDL-79806 quiz_statistics: Queue recalculation on attempt_deleted 2023-11-30 08:53:16 +00:00
Juan Leyva 04892e4707 MDL-79784 tool_mobile: Add missing external::format_text 2023-11-30 09:47:46 +01:00
Huong Nguyen 17282deeea Merge branch 'MDL-79816-403' of https://github.com/rmady/moodle into MOODLE_403_STABLE 2023-11-30 10:40:37 +07:00
Meirza c2e8975523 MDL-76109 core: Don't check password policy for guest user
Besides adding the is_guest() check in the check_password_policy() condition,
I also changed the temporary user ID because the temporary user and
the guest must not share the same ID. Otherwise, it will raise an error.

Co-authored-by: Andrei Bautu <abautu@gmail.com>
2023-11-30 10:35:38 +07:00
Huong Nguyen c5e3ce289e Merge branch 'MDL-74378_403' of https://github.com/PhilippImhof/moodle into MOODLE_403_STABLE 2023-11-30 10:11:45 +07:00
Ilya Tregubov 83e442cc69 Merge branch 'MDL-79890-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-11-30 10:45:01 +08:00
Ilya Tregubov b8f0f87b5f Merge branch 'MDL-78849-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-30 10:38:09 +08:00
Ilya Tregubov 539e5db429 Merge branch 'MDL-79325-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-30 09:34:46 +08:00
Sara Arjona 4c3523d987 Merge branch 'MDL-80205-403' of https://github.com/aanabit/moodle into MOODLE_403_STABLE 2023-11-29 18:42:09 +01:00
Jun Pataleta a0951e25b3 Merge branch 'MDL-79841-403' of https://github.com/laurentdavid/moodle into MOODLE_403_STABLE 2023-11-29 23:48:44 +08:00
Sara Arjona 70a95b8eae Merge branch 'MDL-79610-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-11-29 16:37:08 +01:00
Sara Arjona 5705496179 Merge branch 'MDL-80150-403' of https://github.com/lucaboesch/moodle into MOODLE_403_STABLE 2023-11-29 13:34:40 +01:00
Mikel Martín e77912a7c5 MDL-79610 courseformat: Fix availability restrictions rendering
When duplicating a course module, availability restrictions was not rendering
properly. That happened because 'editing' was not being exported for template
for a single course module. This patch adds 'editing' to the cm exported data.
2023-11-29 13:11:05 +01:00
Paul Holden fb13f6dd01 Merge branch 'MDL-79967-403-fix' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-11-29 12:03:05 +00:00
Jun Pataleta fbeef47a58 MDL-79967 mod_scorm: Use only the required field for the query 2023-11-29 18:32:07 +08:00
Sara Arjona 8fa5a3008d MDL-80150 resource: Reintroduce file icon
The new activity card design, planned for Moodle 4.3, reintroduces
the resource MIME icon that was removed in Moodle 4.0.
This is a backport of MDL-78285.
2023-11-29 09:58:14 +01:00
Jun Pataleta 2c94380acf Merge branch 'MDL-79148-403' of https://github.com/ssj365/moodle into MOODLE_403_STABLE 2023-11-29 15:20:32 +08:00
Jun Pataleta 8cd66034e4 Merge branch 'm43-mdl79967' of https://github.com/danmarsden/moodle into MOODLE_403_STABLE 2023-11-29 12:25:05 +08:00
Huong Nguyen 0bb3a2f20a Merge branch 'v_4_3_0' of https://github.com/dominicchinkh/moodle into MOODLE_403_STABLE 2023-11-29 10:33:21 +07:00
Huong Nguyen 96f06326f8 Merge branch 'm43-mdl80004' of https://github.com/danmarsden/moodle into MOODLE_403_STABLE 2023-11-29 09:52:51 +07:00
Huong Nguyen 8b6d43705e Merge branch 'MDL-80002-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-11-29 09:36:06 +07:00
Huong Nguyen eb0575859b Merge branch 'MDL-79267-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-29 09:17:38 +07:00
Huong Nguyen a6ce3c0758 Merge branch 'MDL-79512-403' of https://github.com/laurentdavid/moodle into MOODLE_403_STABLE 2023-11-29 09:08:38 +07:00
Huong Nguyen a9bfc2075b Merge branch 'MDL-76694-403' of https://github.com/snake/moodle into MOODLE_403_STABLE 2023-11-29 09:01:12 +07:00
Jun Pataleta 6a1644abff Merge branch 'MDL-80181-403' of https://github.com/srobotta/moodle into MOODLE_403_STABLE 2023-11-29 09:37:46 +08:00
Jeremy Schulz 1bbc0425e3 MDL-80180 admin: added readonly support for multicheckbox 2023-11-28 14:34:37 -05:00
Mark Johnson cb18237b5c MDL-80281 session: Don't report long session locks for readonly sessions
Previously, $CFG->sessionlockdebug was reporting long session locks for
all requests, even if they defined READ_ONLY_SESSION. This change
ensures that only sessions with locks are reported.
2023-11-28 16:21:17 +00:00
Shamiso.Jaravaza c898074fd8 MDL-79148 mod_bigbluebuttonbn: fix recording link 2023-11-27 23:54:56 -07:00
Ilya Tregubov 14b5d0694f Merge branch 'MDL-79603-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-11-28 13:53:20 +08:00
Laurent David 54d0894ec3 MDL-79841 theme_boost: Do not remove card borders
* When we are in small screensize we had removed the
left and right borders for cards. This is now restored
2023-11-28 06:37:37 +01:00
Jun Pataleta 0b326e9e72 Merge branch 'MDL-80210_403' of https://github.com/timhunt/moodle into MOODLE_403_STABLE 2023-11-28 10:35:14 +08:00
Amaia Anabitarte eae154a081 MDL-80205 mod_scorm: Remove all Pass grade options from completion 2023-11-27 18:04:30 +01:00
Helen Foster 42022a1d26 MDL-80221 lang: Import fixed English strings (en_fix) 2023-11-24 18:30:16 +01:00
Stephan Robotta c59c0f906b MDL-80181 wiki: fix width of left column in comments 2023-11-24 11:18:07 +01:00
Philipp Imhof e82f1d43c8 MDL-74378 mod_quiz: make sure timer is initialized 2023-11-24 08:52:05 +01:00
Huong Nguyen 6ff6327a6b weekly release 4.3+ 2023-11-24 12:23:15 +07:00
Huong Nguyen 4b34028221 Merge branch 'install_403_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_403_STABLE 2023-11-24 12:23:12 +07:00
Eloy Lafuente (stronk7) edbbe29706 Merge branch 'MDL-79966-m403' of https://github.com/sammarshallou/moodle into MOODLE_403_STABLE 2023-11-23 23:40:50 +01:00
sam marshall fc35bc5876 MDL-79966 core_task: NEVER_RUN_TIME did not fit in 10 digits 2023-11-23 16:23:39 +00:00
Rodrigo Mady 6c5f358ca2 MDL-79816 block_recentlyaccesseditems: Fix modname type in WS 2023-11-23 11:57:22 -03:00
Paul Holden 895189107f MDL-71336 forms: ensure grouped date elements have unique IDs.
Previously they were each taking the ID of their parent group element.
2023-11-23 12:01:28 +00:00
Tim Hunt d8c4a57ce8 MDL-80210 quiz: fix default for reviewmaxmarks when upgrading
It is correct that the database default should be 0, to match
other similar columns, but when sites are upgraded, we need
to set the settings for all existing quizzes to match the previous
behaviour.
2023-11-23 11:03:46 +00:00
Andrew Nicols 3d5c60ad26 Merge branch 'MDL-79966-m403' of https://github.com/sammarshallou/moodle into MOODLE_403_STABLE 2023-11-23 10:30:40 +08:00
Huong Nguyen a2cfa93011 Merge branch 'MDL-78496-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-11-23 09:23:00 +07:00
Ilya Tregubov e40f4e4d83 Merge branch 'MDL-80157_storedfileproblem-403' of https://github.com/leonstr/moodle into MOODLE_403_STABLE 2023-11-23 09:47:03 +08:00
Ilya Tregubov 1f0f185176 Merge branch 'MDL-79185-MOODLE_403_STABLE' of https://github.com/dmitriim/moodle into MOODLE_403_STABLE 2023-11-22 11:48:09 +08:00
Dmitrii Metelkin d5d2c59161 MDL-79185 cache: don't throw exception if cache data is corrupted 2023-11-22 12:49:18 +11:00
Ilya Tregubov c2c357dfb2 Merge branch 'MDL-78670-403' of https://github.com/rmady/moodle into MOODLE_403_STABLE 2023-11-22 09:10:54 +08:00
Paul Holden fccf80c3a3 MDL-80185 lang: use iso6391 language code for HTML lang attributes.
This resolves accessibility issues where Moodle language pack codes
didn't always map to correspondingly named iso6391 codes.

Where this value is defined in the language configuration, it will
now be used.
2023-11-21 22:55:21 +00:00
Mikel Martín ee26c16e90 MDL-80015 course: Fix category 'More' dropdown alignment
Co-authored-by: Stephen Sharpe <stephen.sharpe@synergy-learning.com>
2023-11-21 14:15:39 +01:00
Angelia Dela Cruz 26c5ffd356 MDL-79828 core_badges: Delete already awarded course badges 2023-11-21 16:30:12 +08:00
Amaia Anabitarte d38211efc6 MDL-79979 tool_generator: Use auto-enrol admin in new courses setting 2023-11-21 08:41:57 +01:00
sam marshall dd844035ac MDL-79966 core_task: Scheduled task timing (crontab fields) is wrong 2023-11-20 17:12:27 +00:00
Amaia Anabitarte 778b8f51b1 MDL-79979 tool_generator: Use auto-enrol admin in new courses setting 2023-11-20 17:13:59 +01:00
Juan Olivares 4d28563eeb MDL-74248 mod_folder: Fix mp3 files being unaccessible in chrome
Platform users that host mp3 files within a folder are not able to access them using Chrome. This fix allows them to do so.
2023-11-20 11:30:28 +01:00
Dan Marsden 89f3fced22 MDL-79967 scorm: Fix scorm_insert_track grading calls. 2023-11-20 22:03:10 +13:00
Amaia Anabitarte 1ed0cb2562 MDL-79862 completion: Improve error handling for default completion 2023-11-20 09:52:22 +01:00
Huong Nguyen 7e1589b2ee Merge branch 'MDL-80037-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-11-20 14:48:38 +07:00
Huong Nguyen bc5d145dfb Merge branch 'MDL-79783-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-20 14:05:10 +07:00
Huong Nguyen 5aaba2850f Merge branch 'MDL-79604-403' of https://github.com/srobotta/moodle into MOODLE_403_STABLE 2023-11-20 14:01:22 +07:00
Laurent David 3116b46192 MDL-79512 mod_feedback: Add toast dialog when saved
* Add notification to notify the user once the changes have been
successfully saved
2023-11-20 06:55:14 +01:00
Laurent David 3a1aed3578 MDL-79512 mod_feedback: Fix issue with drag and drop
* A teacher can not change the order of the questions in feedback
as the order is not saved.
2023-11-20 06:55:14 +01:00
AMOS bot a2544fd5ca Automatically generated installer lang files 2023-11-20 00:10:44 +00:00
Rodrigo Mady ebab82c9f3 MDL-78670 mod_quiz: Add offline atempt rule for sequential navigation 2023-11-17 20:30:50 -03:00
Mark Johnson 40e56b3adc MDL-79806 mod_quiz: Implement new quiz_attempt_deleted callback 2023-11-17 16:06:58 +00:00
Leon Stringer 0a360e1eb2 MDL-80157 file: Exception message spelling 2023-11-17 14:35:38 +00:00
Paul Holden 59aa25852c MDL-79325 group: consistent name formatting in overview page/export. 2023-11-17 09:48:06 +00:00
Jun Pataleta ba60319c94 MDL-80037 theme: Indicate when $CFG->theme is defined in config.php
* And prevent selection of theme if $CFG->theme is defined in config.php
2023-11-17 09:24:32 +08:00
Dominic Chin ad836b6d4c MDL-80035 theme_boost: Fix fourth argument of single_button constructor 2023-11-17 09:17:27 +11:00
Sara Arjona 72d7395c96 weekly release 4.3+ 2023-11-16 16:22:34 +01:00
Sara Arjona d376741b93 Merge branch 'install_403_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_403_STABLE 2023-11-16 16:22:30 +01:00
Paul Holden ca991dbe29 MDL-78849 user: correct logical operator behaviour for guest button.
Apart from being banned per MDL-74990, it causes a subtle bug here
due to operator precedence.

Co-authored-by: Tom Mayfield <tmayfield@costrack.com>
2023-11-16 11:31:49 +00:00
Huong Nguyen 3a7594c71a Merge branch 'MDL-76457-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-11-16 10:58:12 +07:00
Huong Nguyen 9f88fb2125 Merge branch 'MDL-80066-403' of https://github.com/elza3ym/moodle into MOODLE_403_STABLE 2023-11-16 10:53:03 +07:00
Ilya Tregubov f29c4e36a4 Merge branch 'MDL-80121-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-11-16 10:01:03 +08:00
Ilya Tregubov a87db5a60d Merge branch 'MDL-75616-403' of https://github.com/davewoloszyn/moodle into MOODLE_403_STABLE 2023-11-16 09:23:06 +08:00
Mohamed Shehata 07bbe2fa5e MDL-80066 form: fix date picker on small screens 2023-11-15 23:44:09 +02:00
Sara Arjona 1c11297195 Merge branch 'MDL-79981-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-11-15 17:10:10 +01:00
Sara Arjona 5f59e2a61e Merge branch 'MDL-79962-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-15 16:47:39 +01:00
Sara Arjona 7e4119de7e Merge branch 'MDL-79697-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-11-15 16:15:49 +01:00
Andrew Nicols c30c1ca9cd MDL-79697 core: PSR-4 NS can be spread across multiple dirs
The PSR-4 specification does not preclude a single namespaces from
having multiple sources. This is the case for several PSR standards
including standard packagist packages distributed by PSR:

- PSR-7 - HTTP Message Interfaces: \Psr\Http\Message
- PSR-17 - HTTP Factories: \Psr\Http\Message
- PSR-15 - http-server-handler: \Psr\Http\Server
- PSR-15 - http-server-middleware: \Psr\Http\Server
2023-11-15 21:24:52 +08:00
Sara Arjona f50c83ac37 Merge branch 'MDL-80045-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-11-15 13:47:10 +01:00
Sara Arjona c54b573bd0 Merge branch 'MDL-79956-403' of https://github.com/ssj365/moodle into MOODLE_403_STABLE 2023-11-15 13:31:44 +01:00
Jun Pataleta 1f5e140ae9 MDL-80121 gradereport_singleview: Increase zero-state heading level
With the h2 heading not being rendered on the zero-state pages of the
Single view report, we need to increase the heading level of the
"Search for a user to view all their grades" and
"Select a grade item above" headings from h3 to h2.
2023-11-15 19:24:04 +08:00
Jun Pataleta f65d067dec MDL-80121 grade: Trim heading
In order to prevent rendering an empty heading <h2>, we need to make
sure that the $heading parameter passed to print_grade_page_head() is
not an empty string.
2023-11-15 19:24:04 +08:00
Stephan Robotta dbe914883c MDL-79604 mod_data: exception if mandatory checkox list is missing 2023-11-15 12:22:49 +01:00
Ilya Tregubov 783dc4cdb2 Merge branch 'MDL-79996-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-15 15:24:26 +08:00
Dan Marsden 26e91219e8 MDL-64431 assignfeedback_editpdf: Flatten PDF files 2023-11-15 19:28:21 +13:00
Huong Nguyen 15526541b3 Merge branch 'MDL-79648-403' of https://github.com/SergioComeron/moodle into MOODLE_403_STABLE 2023-11-15 09:13:35 +07:00
Huong Nguyen c78364eb73 Merge branch 'MDL-79601-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-11-15 09:09:25 +07:00
Angelia Dela Cruz 0c9bc880c1 MDL-79603 mod_scorm: Behat coverage for Scorm package display options 2023-11-15 09:41:38 +08:00
Andrew Nicols 93f282a345 MDL-78496 phpcs: Moodle 4.3.x supports up to php82 only
At this point, and per our PHP policy, Moodle 4.3 is not expected to
support PHP 8.3.
2023-11-15 09:23:31 +08:00
Andrew Nicols 7d4ba18a65 MDL-79890 core: Stop using get_class() without args
PHP 8.3 deprecates the use of `get_class()` without arguments. The
following alternatives should instead be used as appropriate:

- `get_class($this)` - The equivalent for instance methods
- `self::class` - The current class

Note that the behaviour of `get_class()` in a static method was
equivalent to `self::class` and _not_ `static::class`. That is to say
that the previous behaviour did not respect late static binding.
2023-11-15 09:14:08 +08:00
Andrew Nicols e78cbaa6c4 MDL-79890 core: ReflectionProperties::setValue() should take 2 args
Since PHP 8.3 setValue() must be called with null as the first arg if
called statically.
2023-11-15 09:13:08 +08:00
Mikel Martín 9b401dfc29 MDL-76457 tool_usertours: Fix tour popovers in RTL 2023-11-14 21:27:38 +01:00
Mikel Martín 3e179325e9 MDL-76457 theme_boost: Fix bootstrap popovers in RTL
- Fix the arrow placement for bootstrap popovers in RTL mode.
- Remove unneded css parser workaround for popover arrows.
  After MDL-67386 was integrated those changes were not needed anymore.
2023-11-14 21:27:38 +01:00
Sara Arjona 60727a7cdf MDL-77581 lesson: Fix behat random failures 2023-11-14 16:24:43 +01:00
Andrew Nicols 4d59c788ee MDL-78496 environment: Moodle 4.4 requirements
The only changes to requirements since Moodle 4.3 are increases to:

* the minimum PHP version required; and
* the minimum required Moodle version.
2023-11-14 22:47:55 +08:00
Andrew Nicols d5993fffd4 MDL-80079 core: Correct incorrect arg to format_text::$options 2023-11-14 22:28:55 +08:00
Andrew Nicols 136bd2c4c4 MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:28:55 +08:00
Mikel Martín b2d8615725 MDL-80045 block_starredcourses: Fix cards alignment in small screens 2023-11-14 14:36:23 +01:00
Sara Arjona 4e880779f9 Merge branch 'MDL-77581-403' of https://github.com/dpalou/moodle into MOODLE_403_STABLE 2023-11-14 11:52:51 +01:00
Dani Palou e5efe8b6d1 MDL-77581 lesson: Fix generator unit tests in oracle 2023-11-14 11:11:25 +01:00
SergioComeron da4a2d6191 MDL-79648 core_course: 29 October repeating day 2023-11-13 18:37:23 +01:00
Sara Arjona 84ec153634 Merge branch 'MDL-77581-403' of https://github.com/dpalou/moodle into MOODLE_403_STABLE 2023-11-13 17:19:41 +01:00
Paul Holden b69c42db5d MDL-79692 enrol_meta: check for group validity when adding members. 2023-11-13 10:23:14 +00:00
Huong Nguyen 55d5f7756d Merge branch 'MDL-74129-403' of https://github.com/sarjona/moodle into MOODLE_403_STABLE 2023-11-13 10:43:18 +07:00
David Saylor b262a67c89 MDL-75616 backup: Use standard temp directory for extraction 2023-11-13 11:08:17 +11:00
AMOS bot 05492ddbb3 Automatically generated installer lang files 2023-11-12 00:10:15 +00:00
Sara Arjona 185856927d MDL-74129 h5p: Preserve metadata information
The metadata information was not restored when an H5P file was uploaded
(it was saved when it was edited directly from the Content bank, but the
original information in the H5P file was lost).
This patch includes all the metadata fields and its values in the original
H5P file to preserve this information too.
2023-11-10 10:33:47 +01:00
Ilya Tregubov 935c2509f1 weekly release 4.3+ 2023-11-10 09:17:15 +08:00
Paul Holden a502fbcd1e MDL-79962 roles: consistent sorting of role entity name column.
The "name" field is typically omitted for default/pre-defined roles,
which should be accounted for when sorting.
2023-11-09 17:04:03 +00:00
Dani Palou 061186c215 MDL-77581 behat: Test create lesson pages using UI 2023-11-09 11:32:00 +01:00
Dani Palou eac49ffa4c MDL-77581 behat: Apply new lesson cluster generators to existing tests 2023-11-09 11:32:00 +01:00
Dani Palou db82329f6c MDL-77581 behat: Create generators for lesson clusters 2023-11-09 11:32:00 +01:00
Dani Palou 875ad48c9d MDL-77581 lesson: Fix wrong PHPDoc in some generator functions
While creating the new perform_create_page function I noticed that the PHPDoc return type of the existing functions was wrong
2023-11-09 11:01:51 +01:00
Dani Palou c627e1a4de MDL-77581 behat: Remove lesson_student_dashboard test file
After f7c476bac5 was integrated, these tests didn't assert anything specific and similar steps are already tested in lesson_navigation
2023-11-09 11:01:51 +01:00
Dani Palou 3b0165ec67 MDL-77581 behat: Apply new lesson generators to existing tests 2023-11-09 11:01:51 +01:00
Dani Palou 96bfaf67fd MDL-77581 behat: Create generators for lesson pages and answers 2023-11-09 11:01:51 +01:00
Dani Palou fc4354c7e3 MDL-77581 behat: Support finish_generate_ in generators 2023-11-09 11:01:51 +01:00
Shamiso.Jaravaza b5c49b8ac9 MDL-79956 mod_bigbluebuttonbn: fix import links 2023-11-08 21:48:03 -07:00
Michael Aherne 2721a7cdc3 MDL-80030 filelib: Fix info type. 2023-11-09 11:13:52 +08:00
Ilya Tregubov ab79a0e972 Merge branch 'MDL-79992-403' of https://github.com/sarjona/moodle into MOODLE_403_STABLE 2023-11-09 09:57:09 +08:00
Sara Arjona 275af6c114 Merge branch 'MDL-79827-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-08 18:10:44 +01:00
Sara Arjona dcc8300ef4 Merge branch 'MDL-79975-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-08 18:03:03 +01:00
Sara Arjona af62e9773c Merge branch 'MDL-79781-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-08 17:19:51 +01:00
Sara Arjona 0ac35f9248 Merge branch 'MDL-76555-403' of https://github.com/pmaneggia/moodle into MOODLE_403_STABLE 2023-11-08 17:06:18 +01:00
Mikel Martín a028969791 MDL-79601 report_completion: Fix RTL First/Last name alignment 2023-11-08 16:23:29 +01:00
Mikel Martín 7bc41babf8 MDL-79601 report_progress: Fix RTL First/Last name alignment 2023-11-08 16:23:29 +01:00
Andrew Nicols 4e08cbd42e MDL-79981 core: Add ability to manually run and filter phpunit on GHA 2023-11-08 12:53:43 +08:00
Ilya Tregubov d3427d45fa Merge branch 'MDL-79615_403_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_403_STABLE 2023-11-08 10:43:00 +08:00
Huong Nguyen 67a690d176 Merge branch 'MDL-79739-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-11-08 09:23:50 +07:00
Huong Nguyen 81d72254b5 Merge branch 'MDL-79840-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-08 09:23:09 +07:00
Ilya Tregubov b2e58aed7b Merge branch 'MDL-79858-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-08 09:49:29 +08:00
Paul Holden 5ca36b0731 MDL-79267 mod_forum: define report subplugin type language strings. 2023-11-07 09:49:56 +00:00
Huong Nguyen b105ec5188 Merge branch 'MDL-78953-403' of https://github.com/pedrojordao/moodle into MOODLE_403_STABLE 2023-11-07 15:33:52 +07:00
Jun Pataleta a85f7c200b MDL-80019 mod_bigbluebuttonbn: Use updated completion field names
Field names for the completion conditions have been updated since 4.3.
So the fields names should also be updated in the test.
2023-11-07 13:13:18 +08:00
Jun Pataleta f09f15e0be Merge branch 'MDL-80019-403' of https://github.com/call-learning/moodle into MOODLE_403_STABLE 2023-11-07 13:11:51 +08:00
Laurent David e35be12fb7 MDL-80019 mod_bigbluebuttonbn: Completion form freeze fix
* When the completion is locked, we should not be able to edit the completion elements
2023-11-06 22:11:02 +01:00
Sara Arjona 2f1a67685f Merge branch 'mdl-78650-403-stable' of https://github.com/Fragonite/moodle into MOODLE_403_STABLE 2023-11-06 09:51:00 +01:00
Huong Nguyen d3bc17fe56 Merge branch 'MDL-79062-403-2' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-11-06 10:52:04 +07:00
Dan Marsden adfd93a303 MDL-80004 scorm: add missing require locallib during course reset. 2023-11-06 12:05:12 +13:00
Paola Maneggia 82f9838f28 MDL-76555 mod_resource: Fix PHP8.0 type error (legacy resources) 2023-11-05 13:46:39 +01:00
Mikel Martín a18057fd06 MDL-80002 forumreport_summary: Fix summary report date filtering 2023-11-03 15:47:30 +01:00
Paul Holden dbc285e49e MDL-79996 communication: valid instance checks during user deletion. 2023-11-03 12:55:55 +00:00
Sara Arjona 31b409d920 MDL-79992 backup: Display course backups from activity restore
The Course backup area was not displaying the course backups when
accessing to the Restore page for an activity because the context
was not updated properly for this area.
2023-11-03 12:23:18 +01:00
Jake Dallimore 501c58729f MDL-76694 core_comment: exit the js init if the element cannot be found
In pages which result in the theme_boost/embedded template being used,
blocks may be rendered and the resulting HTML ignored, leaving any JS
they may have added to run without a corresponding DOM element to act
on. This fixes that case for comments, making sure we exit gracefully
during the init if the element can't be found.
2023-11-03 10:13:14 +08:00
pedrojordao 3cc283a25e MDL-78953 autocomplete: Add only one empty option when deselecting item.
Each option that was deselected was prepending an empty option in the select.
2023-11-02 18:47:59 -03:00
Paul Holden 188b5021fb MDL-79975 tool_task: correct class attribute table cell property. 2023-11-02 13:19:50 +00:00
Sara Arjona be7a698223 weekly release 4.3+ 2023-11-02 13:40:53 +01:00
Jun Pataleta 60a1c97289 MDL-79062 grade: Behat test fixes
* Feature: We can use a minimum grade different than zero
  - Use correct minimum input values.
  - Use data generators for faster test execution.
* Scenario: Disable category overriding
  - Use the field name to ensure that the correct field is being tested.
2023-11-02 17:34:29 +08:00
Jun Pataleta 92afaa484f MDL-79062 grades: Sort-by-name menu item accessibility fixes
* <h6> tags cannot be in table cells. Replace them with <div> tags.
* Group the ascending/descending sort menu items to better indicate
where they belong to.
2023-11-02 17:34:28 +08:00
Jun Pataleta 9fdb460330 MDL-79062 gradereport_grader: Set numeric type for grade value inputs
* Set grade inputs for grade items with type set to GRADE_VALUE to
number and add min and max input attributes, where necessary.
2023-11-02 17:34:28 +08:00
Jun Pataleta ccfc156b43 MDL-79062 gradereport_grader: Remove setting of tabindex >= 1
Tab indices that are greater than or equal to 1 break the natural
tab order of the document and may cause problems for keyboard users.
2023-11-02 17:34:27 +08:00
Huong Nguyen 10f10ee269 Merge branch 'MDL-78903-403' of https://github.com/meirzamoodle/moodle into MOODLE_403_STABLE 2023-11-02 10:18:20 +07:00
Huong Nguyen 47bf3467a2 Merge branch 'MDL-79801-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-11-02 10:14:46 +07:00
Huong Nguyen 04d7b13fc4 Merge branch 'MDL-79617_403_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_403_STABLE 2023-11-02 09:05:36 +07:00
Alexander Van der Bellen a3e7f7fd14 MDL-78650 mod_assign: Improve group submission action event handling
Don't return an event action when a group submission has already been submitted
by another student.
2023-11-01 20:38:30 +08:00
Alexander Van der Bellen 745b504426 MDL-78650 mod_assign: Add Behat test 2023-11-01 20:38:24 +08:00
Alexander Van der Bellen 89913c7eeb MDL-78650 mod_assign: Add unit test 2023-11-01 20:38:20 +08:00
Daniel Neis Araujo eb658e33c3 MDL-73378 gradebook: Category grade null when all subgrades are null 2023-10-31 13:58:16 -03:00
Sara Arjona 03e68d81b4 Merge branch 'MDL-79856-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-31 13:26:32 +01:00
Sara Arjona ae80f632bf Merge branch 'MDL-79849-403' of https://github.com/jleyva/moodle into MOODLE_403_STABLE 2023-10-31 13:08:20 +01:00
Jun Pataleta e2079313e2 Merge branch 'MDL-79853-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-10-31 16:46:06 +08:00
Huong Nguyen b4bade5ca9 Merge branch 'MDL-79807_403_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_403_STABLE 2023-10-31 12:49:48 +08:00
Huong Nguyen 10883ef268 Merge branch 'MDL-79460-403' of https://github.com/HuongNV13/moodle into MOODLE_403_STABLE 2023-10-31 12:49:48 +08:00
David Woloszyn 19e1e834a7 MDL-79460 communication_matrix: Re-enabled tests that use new sync route 2023-10-31 09:34:06 +07:00
Meirza f30b0eee9b MDL-78903 tiny_h5p: show repositories if editor filepicker type set 2023-10-31 08:00:28 +07:00
Meirza 0ad939f062 MDL-78903 tiny_media: show repositories if editor filepicker type set 2023-10-31 08:00:27 +07:00
Jun Pataleta e8f534c4f4 Merge branch 'MDL-77274-403' of https://github.com/laurentdavid/moodle into MOODLE_403_STABLE 2023-10-30 17:14:27 +08:00
Jun Pataleta 7e22a9c2c7 Merge branch 'MDL-79800-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-10-30 16:40:12 +08:00
Mikel Martín c542a77f11 MDL-79800 courseformat: Fix activity cards right elements margins
- Fix margins in elements displayed in the right side of activity cards.
Replace right margins with left margins to avoid extra space when editing
mode is off and action menu is not displayed.
- Fix groupmode icon spacing when displayed in small resolutions with edit
mode disabled
2023-10-30 07:52:38 +01:00
Laurent David db52a8bc31 MDL-77274 core_renderer: Respect full name format in letter avatars
* Make sure that we respect the fullnamedisplay and alternativefullnameformat
parameters to decide on the initials for a given user
* Add further tests

Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
2023-10-30 06:16:09 +01:00
Huong Nguyen 4800afbc3e Merge branch 'MDL-79639_403_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_403_STABLE 2023-10-30 11:22:59 +07:00
Jun Pataleta 990b740ec1 Merge branch 'MDL-79194-403' of https://github.com/laurentdavid/moodle into MOODLE_403_STABLE 2023-10-27 23:33:20 +08:00
Mark Johnson b1d436a281 MDL-79615 course: Improve efficency of cache rebuilds
When bulk-updating course module visibility, set_coursemodule_visibily
was triggering a partial cache purge and rebuild for each course module.
This potentially led to 2 cache sets each requiring a lock to be
acquired and released per course module, plus any other cache updates
for other changes to the course in the same request.

This adds a new $rebuildcache paramter to the
set_coursemodule_visibilty, which is true by default to retain the
existing behaviour. If set false, it will skip doing the partial purge
and rebuild for that course module, and it is up to the calling code to
ensure the cache is updated as requried.

To assist with this, there is a new
course_modinfo::purge_course_module_cache_multiple() method, which
allows multiple course modules to be purged from the cache in a single
cache set.
2023-10-27 10:51:29 +01:00
Ilya Tregubov 8bf31f2277 Merge branch 'MDL-79693-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-27 16:45:37 +08:00
Jun Pataleta 97fc41ebcb Merge branch 'MDL-77364-403' of https://github.com/sarjona/moodle into MOODLE_403_STABLE 2023-10-27 16:34:00 +08:00
Sara Arjona bac3ffbe79 MDL-77364 myoverview: Display course name tooltip
Based on the feedback given by the UX team:
- The text has been increased to display more (50 vs 55).
- A tooltip has been added to display the full course name on hover,
following the accessibility guidelines.
2023-10-27 07:26:24 +02:00
Jun Pataleta dc7dd96189 weekly release 4.3+ 2023-10-27 09:43:04 +08:00
Jun Pataleta 67c567062e NOBUG: Fixed SVG browser compatibility 2023-10-27 09:43:03 +08:00
Jun Pataleta b7ee271c8b Merge branch 'MDL-79768-403-fix' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-10-26 23:05:58 +08:00
Ferran Recio 81cdd8db81 MDL-79194 core_courseformat: optimize section reload
* When reloading a section, we also forced the reloading of
course modules, resulting in doing the same work twice (once for
the section reload and once for the course module reload)
* Debounce the reloading process so prevent unwanted duplicate
reloads
2023-10-26 14:53:07 +02:00
Paul Holden 90d7b45f5f MDL-79858 block_myoverview: correctly export request course button. 2023-10-26 13:40:31 +01:00
Mark Johnson 632d4faeec MDL-79807 quiz_statistics: Clear stats cache when question added/removed 2023-10-26 13:38:31 +01:00
Paul Holden aac3b19bff MDL-79781 course: detect invalid creator role for pending courses. 2023-10-26 13:18:34 +01:00
Paul Holden a65a8fc40a MDL-79856 roles: use role localname when confirming deletion. 2023-10-26 12:00:54 +01:00
Angelia Dela Cruz c0bedfd833 MDL-79768 fix: Fixed random failing Behat due to time difference 2023-10-26 18:05:04 +08:00
Laurent David b72551c475 MDL-79194 core_course: Refresh modules menus with section changes
* Whenever a section is hidden, we need to refresh all contextual (hamburger)
menus of each course modules.
2023-10-26 11:04:40 +02:00
Andrew Nicols 437967f78e MDL-79853 core: Add phpunit options to manual runs 2023-10-26 14:48:51 +08:00
Jun Pataleta e05747e353 Merge branch 'MDL-79768-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-10-26 10:48:18 +08:00
Jun Pataleta 4865c40790 Merge branch 'MDL-42189-403' of https://github.com/davewoloszyn/moodle into MOODLE_403_STABLE 2023-10-26 10:32:13 +08:00
Paul Holden d63fd0365a Merge branch 'MDL-79762-43' of https://github.com/kabalin/moodle into MOODLE_403_STABLE 2023-10-25 23:55:54 +01:00
Juan Leyva f054958593 MDL-79849 tool_mobile: Add search disabled features 2023-10-25 17:32:26 +02:00
Ruslan Kabalin 7ee0ee6206 MDL-79762 core: Add possibility to define modal type for modalform
If `moduleName` param is passed in config object for modalform, it will be
used to instantiate modal class, otherwise 'core/modal_save_cancel' is
used.

Co-authored-by: Marina Glancy <marina@moodle.com>
2023-10-25 15:57:11 +01:00
Paul Holden cf715c550a MDL-79840 contentbank: fix references to invalid icon images. 2023-10-25 08:45:51 +01:00
Jun Pataleta 440a27c5de Merge branch 'MDL-75572-403' of https://github.com/sarjona/moodle into MOODLE_403_STABLE 2023-10-25 13:44:40 +08:00
Sara Arjona 2130e4ff8b MDL-75572 criteria: Only award badges to sucessfull completions
The UX team confirmed a badge shouldn't be awarded when the criteria
use a passing grade and the user gets a failing grade.
So the COMPLETION_COMPLETE_FAIL status won't be considered
completed for activities with completion that require a passing
grade.
2023-10-25 07:08:26 +02:00
Jun Pataleta 676626064c Merge branch 'MDL-79782-403' of https://github.com/roland04/moodle into MOODLE_403_STABLE 2023-10-24 22:47:47 +08:00
Jun Pataleta 655ac0b6a6 Merge branch 'MDL-79767-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-24 16:23:12 +08:00
Jun Pataleta 28233e5b3d Merge branch 'MDL-79637-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-10-24 10:48:55 +08:00
Paul Holden e001508f68 MDL-79827 tiny_link: show repositories only if editor filepicker set. 2023-10-23 22:01:01 +01:00
Mark Johnson 9b96653fc5 MDL-79617 repository_upload: Close session early in upload process 2023-10-23 15:32:15 +01:00
Angelia Dela Cruz 920ddcb70f MDL-79768 mod_data: Test for student can see upcoming data activity 2023-10-23 08:50:51 +08:00
David Woloszyn 82d1033f43 MDL-42189 gradereport_overview: Report hidden from suspended enrolments 2023-10-23 09:46:58 +11:00
Paul Holden 6856da7f09 MDL-79801 tag: fix report entity flagged column/filter query.
The "flag" field isn't a boolean state (1/0), it's a cumulative
count of how many times the tag has been flagged by users. This
should be accounted for to ensure that column aggregation and
filtering performs correctly.
2023-10-20 14:22:17 +01:00
Sara Arjona 150d134fa2 weekly release 4.3+ 2023-10-20 12:16:13 +02:00
Sara Arjona d30fa9918f Merge branch 'install_403_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_403_STABLE 2023-10-20 12:16:09 +02:00
Mikel Martín 343ad024c0 MDL-79782 pix: Replace angles- SVGs with Free versions 2023-10-20 08:50:10 +02:00
Huong Nguyen 4f8778cfc7 Merge branch 'MDL-78775-403' of https://github.com/ilyatregubov/moodle into MOODLE_403_STABLE 2023-10-20 09:29:47 +07:00
Ilya Tregubov b770c56b6d MDL-78775 gradereport_grade: Fix Behat.
Sort by lastname before doing any assertions.
2023-10-20 09:56:26 +08:00
Paul Holden 156953f115 MDL-79783 theme_boost: remove form-check padding inside table cells. 2023-10-19 14:13:46 +01:00
Mark Johnson 07a6698d01 MDL-79639 quiz_statistics: Prevent database deadlocks
This changes the cache purge code to select IDs for deletion
first, rather than using a subquery in a DELETE, since this
risks causing a deadlock in MySQL.
2023-10-19 08:57:34 +01:00
Huong Nguyen 1ec619db69 Merge branch 'MDL-79689-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-10-19 10:03:37 +07:00
Paul Holden 9f5f8d4a0a MDL-79767 communication: correct arguments when loading instance. 2023-10-18 22:38:50 +01:00
Sara Arjona 810f134cdc Merge branch 'MDL-79635-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-18 19:55:48 +02:00
Sara Arjona 7b1a0a0e65 Merge branch 'MDL-77651-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE 2023-10-18 15:47:11 +02:00
Sara Arjona 447530591d Merge branch 'MDL-79747_403' of https://github.com/timhunt/moodle into MOODLE_403_STABLE 2023-10-18 10:28:57 +02:00
Huong Nguyen 34223e32ef Merge branch 'MDL-78775-403' of https://github.com/ilyatregubov/moodle into MOODLE_403_STABLE 2023-10-18 12:56:24 +07:00
Ilya Tregubov ac3cda51f0 MDL-78775 core_grades: Fix Behat 2023-10-18 12:53:53 +08:00
Angelia Dela Cruz f25ac24adf MDL-79689 mod_assign: Behat for enabling anonymous submissions 2023-10-18 10:46:30 +08:00
Huong Nguyen c3ba14a052 Merge branch 'MDL-79705-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-18 09:36:17 +07:00
Huong Nguyen bd844a184c Merge branch 'MDL-78979-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-18 09:23:31 +07:00
AMOS bot c968b1236f Automatically generated installer lang files 2023-10-18 00:11:10 +00:00
Jun Pataleta ff2d542295 MDL-77651 calendar: Hide left/right arrow characters
* Hide the arrow characters for the calendar templates so they won't be
read out by screen readers and avoid confusion for screen reader users.
2023-10-17 23:51:52 +08:00
Jun Pataleta bf68987951 MDL-77651 core: Hide left/right arrow characters for link_arrow_xx()
* The arrow characters in link_arrow_right() and link_arrow_left()
functions get announced by screen readers. This causes confusion
and is unnecessary.
2023-10-17 23:51:52 +08:00
Paul Holden e2049d770c MDL-79705 reportbuilder: remove checkbox field callback handling.
We no longer need special handling of this field type, because it
now returns language strings rather than HTML markup for a checkbox
element on display.
2023-10-17 16:51:29 +01:00
Paul Holden 021bdd0e4b MDL-79705 profilefield_checkbox: display data as simple Yes/No. 2023-10-17 16:51:29 +01:00
Tim Hunt 9bb59ad004 MDL-79747 quiz stats: task should run as admin the right way
The correct way to get an ad-hoc task to run as the main admin account
is to leave userid as null.

Setting it causes fatal errors if the main admin account is set to
auth: nologin.
2023-10-17 16:50:32 +01:00
Iñaki Arenaza fd1035ecf0 MDL-78481 mod_lesson: matching pagetype applying filters fix 2023-10-17 17:15:39 +02:00
Paul Holden 0602fdc0cb MDL-79693 output: remove embedded toast region from clipboard modal.
This was causing the toast notification upon the clipboard action
result to immediately disappear as the modal was closed. The toast
module can happily handle this for us itself, so remove from the
template.
2023-10-17 08:20:57 +01:00
Andrew Nicols 1294e309dc MDL-79739 core: Only run some tests in separate processes 2023-10-17 12:21:12 +08:00
Huong Nguyen 596bc2c2bf Merge branch 'MDL-78775-403' of https://github.com/ilyatregubov/moodle into MOODLE_403_STABLE 2023-10-17 10:47:02 +07:00
Ilya Tregubov 09568062fd Merge branch 'MDL-79691-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-10-17 10:28:27 +08:00
Huong Nguyen b205b758e8 Merge branch 'MDL-79367-403' of https://github.com/sarjona/moodle into MOODLE_403_STABLE 2023-10-17 09:17:46 +07:00
Paul Holden 55077e45bb MDL-78979 mod_data: correct restore decode rule for data view page. 2023-10-16 20:53:52 +01:00
Angelia Dela Cruz 9c4f0d31f2 MDL-79691 mod_h5pactivity: Behat coverage for H5P activity grades reset 2023-10-16 16:18:43 +08:00
Sara Arjona c220ad62dd Merge branch 'MDL-79566-403' of https://github.com/HuongNV13/moodle into MOODLE_403_STABLE 2023-10-16 09:53:48 +02:00
Ilya Tregubov ffc8c116fd Merge branch 'MDL-79365-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-16 14:07:55 +08:00
Sara Arjona 8679a15604 MDL-79367 availability: Fail grade does not mark activities as completed
The UX team confirmed that an activity shouldn't be considered completed
when the criteria use a passing grade and the user gets a failing grade.
So the COMPLETION_COMPLETE_FAIL status won't be considered
completed from now on.
2023-10-16 07:52:40 +02:00
Huong Nguyen 9995038273 Merge branch 'MDL-79698-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-10-16 11:39:53 +07:00
Huong Nguyen 70ee7b1beb Merge branch 'MDL-79653-403' of https://github.com/andelacruz/moodle into MOODLE_403_STABLE 2023-10-16 10:54:38 +07:00
Huong Nguyen 5cc2ab26eb Merge branch 'MDL-79352-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-16 10:42:06 +07:00
Huong Nguyen cf0446155b MDL-79566 tiny_autosave: Add Javascript submission handler 2023-10-16 09:29:16 +07:00
Paul Holden 87c42699d9 MDL-79365 customfield_textarea: ensure field uniqueness is correct. 2023-10-13 14:30:34 +01:00
Andrew Nicols 97bcb22dba MDL-79693 core: Move toast regions to document on modal close 2023-10-13 14:22:48 +01:00
Andrew Nicols ecd82700a7 MDL-79698 core: Correct duplicate array key in test provider 2023-10-13 15:44:17 +08:00
Ilya Tregubov daa598b1b4 MDL-78775 core_grades: Fix saving on grader report page
When we have a pagination on grader page and search for user
that is not on first page, saving was throwing an error
since page didn't have enough data
2023-10-13 14:09:25 +08:00
Ilya Tregubov 13eb20d8d1 weekly release 4.3+ 2023-10-13 13:39:23 +08:00
Angelia Dela Cruz d0a9c57c0b MDL-79653 gradingform_guide: Behat coverage for deleting marking guide 2023-10-13 10:46:23 +08:00
Huong Nguyen 21b11cdb3d Merge branch 'MDL-79638-403' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-10-12 11:07:19 +07:00
Ilya Tregubov d4b2c50163 Merge branch 'MDL-79160-master' of https://github.com/danghieu1407/moodle into MOODLE_403_STABLE 2023-10-12 09:43:41 +08:00
Ilya Tregubov bd50ac1876 Merge branch 'MDL-79422-master' of https://github.com/andrewnicols/moodle into MOODLE_403_STABLE 2023-10-12 09:09:27 +08:00
Ilya Tregubov da4204c491 Merge branch 'MDL-79562-403' of https://github.com/lameze/moodle into MOODLE_403_STABLE 2023-10-12 09:06:32 +08:00
Simey Lameze 780b99229c MDL-79562 behat: make verification step more specific 2023-10-12 08:16:22 +08:00
Jun Pataleta bebde352fe Merge branch 'MDL-79611-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-11 18:15:46 +08:00
Jun Pataleta 1adf99597e Merge branch 'MDL-79633-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-11 13:41:12 +08:00
Huong Nguyen 70c1b02809 Merge branch 'MDL-78103-403' of https://github.com/HuongNV13/moodle into MOODLE_403_STABLE 2023-10-11 11:25:04 +07:00
chen levy 335c9c920d MDL-78103 theme: Fixed dropdown menu size by the content 2023-10-11 11:10:26 +07:00
Safat b1ad4fb830 MDL-79614 communication_matrix: Add missing call for sync flag 2023-10-11 11:04:44 +08:00
Jun Pataleta 2b5073a222 MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-11 09:40:13 +08:00
Andrew Nicols 731b150241 MDL-79637 phpunit: Do not reset DB during init of isolated tests
During the bootstrap of PHPUnit we ensure that the database has been
reset to its initial state.

We do this by checking the internally-stored DB write count between
runs. If the count is not yet set (null), or it has been increased, we
force a reset.

When running an isolated test the test runner resets the database, it
then sets up a new isolated test environment by writing a new PHPUnit
test case and passing it to a new PHP Process using standard in. As part
of this, the bootstrap is run for that process.

Because we are in a new process, the db write count is fresh and not yet
set. This has been leading to an additional db reset before the isolated
test.

To handle this we want to _not_ perform a reset during the
initialisation for isolated runs. We know that the DB is in a fresh
state before we start the run.

To support this we need to know whether the test is an isolated test
during the bootstrap, which means we cannot use the previous approach to
calculating this.

Instead we look at the PHP_SELF value. PHP sets this to "Standard input
code" when run from stdin, instead of running a file.

There should not be any other legitimate reason to run a PHPUnit
bootstrap via this stdin approach.

Unfortunately this approach is a little bit risky as it depends on the
presence of a specific string, however this string has been in place
since 2016, and there is no legitimate way of calculating this.

I did consider looking at whether the called script included `/vendor/`
and `/phpunit`, but this is also likely a risky approach if someone
calls PHPUnit in an unexpected way.

This approach is itself unit tested so any change to PHP's stdin string
before we deprecate this approach entirely in 12 months time will be
caught.
2023-10-11 09:29:26 +08:00
Paul Holden 228ee621e6 Merge branch 'MDL-79642-q_tags_off-403' of https://github.com/leonstr/moodle into MOODLE_403_STABLE 2023-10-10 21:18:55 +01:00
Andrew Nicols 16f65ba275 MDL-79638 phpunit: Add unit test for increment resets 2023-10-11 00:10:33 +08:00
Andrew Nicols 165918258d MDL-79638 phpunit: Remove mysql/mariadb hack
This hack was introduced to work around a bug in MySQL 5.6.14 and
MariaDB at the time.

https://bugs.mysql.com/bug.php?id=69882

It was addressed a few months later in 5.6.16, and 5.7.4.
MariaDB merged version 5.6.16 of MySQL's InnoDB engine in MariaDB
10.0.11 and got hte patch from there.

Moodle has required MySQL 8.0, and MariaDB 10.6.7 since Moodle 4.2 and
it is therefore safe to remove these hacks.
2023-10-10 23:35:45 +08:00
Sara Arjona 3392a198d7 Merge branch 'MDL-79623-MOODLE_403_STABLE' of https://github.com/PhMemmel/moodle into MOODLE_403_STABLE 2023-10-10 16:19:19 +02:00
Leon Stringer 7cba44007c MDL-79642 qbank_tagquestion: Fix Return type err
Previously if $CFG->usetags was not enabled the course question bank
page would show:

  Exception - qbank_tagquestion\plugin_feature::get_question_filters():
  Return value must be of type array, none returned

This is now fixed.
2023-10-10 12:13:56 +01:00
Paul Holden 0004f31e2e MDL-79635 group: ensure unique params used to determine visibility.
Or we'll trigger DML "Incorrect number of query parameters" exception.
2023-10-10 10:08:53 +01:00
Sara Arjona 83865c7979 Merge branch 'MDL-77816-403' of https://github.com/paulholden/moodle into MOODLE_403_STABLE 2023-10-10 09:21:27 +02:00
Ilya Tregubov b43222dc67 Merge branch 'MDL-79501-master' of https://github.com/geichelberger/moodle into MOODLE_403_STABLE 2023-10-10 15:06:11 +08:00
Ilya Tregubov e857efcf28 Merge branch 'MDL-79279' of https://github.com/timhunt/moodle into MOODLE_403_STABLE 2023-10-10 11:20:58 +08:00
Ilya Tregubov e7ab69fa26 Merge branch 'MDL-71414-403' of https://github.com/laurentdavid/moodle into MOODLE_403_STABLE 2023-10-10 10:19:00 +08:00
Paul Holden f4743bbb8d MDL-79633 mod_data: correct timemodified tag replacement attribute. 2023-10-09 19:41:02 +01:00
Paul Holden d1b63c5e18 MDL-79352 admin: fix links to tool plugin management page. 2023-10-09 15:11:52 +01:00
Paul Holden cf5065ed71 MDL-79611 group: early exit getting members of non-existing group. 2023-10-09 15:00:33 +01:00
Paul Holden bf380e2d46 MDL-77816 mod_bigbluebuttonbn: feedback when validating completion. 2023-10-09 14:58:49 +01:00
Yannick Schillinger 4b40f8273d MDL-77816 mod_bigbluebuttonbn: Fix completionValidate argument format 2023-10-09 14:58:38 +01:00
Laurent David c0f2ff773f MDL-71414 mod_h5pactivity: Add a new "None" message
* In matching types of questions, sometimes the user does not answer all
questions. We now display "None" in the result report. The answer can
be either correct or incorrect.
* Fix "unknown" answer constant name.
2023-10-09 11:57:34 +02:00
Laurent David 2ef18bce0d MDL-71414 mod_h5pactivity: Fix issue with drop down report
* Drag and Drop report were missing answers when target could be dropped on multiple
drop zones.
2023-10-09 11:57:34 +02:00
Philipp Memmel 536780ce38 MDL-79623 tool_componentlibrary: Fix correct modal content attribute 2023-10-09 09:05:41 +00:00
danghieu1407 5174e4e36d MDL-79160 Question: Answer field overflows parent width with large size 2023-10-05 10:57:51 +07:00
Gregor Eichelberger 91135c5305 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:07:44 +02:00
Andrew Nicols 3720532cb2 MDL-79422 ajax: Update service.php for coding style 2023-09-20 16:03:12 +08:00
Andrew Nicols 7f569fc1f1 MDL-79422 ajax: Allow no-login WS calls to fetch after a failure 2023-09-20 16:02:31 +08:00
Tim Hunt 1437ed51ef MDL-79279 qformat_xml: multianswer import should support idnumber
Fix suggested by Georg Maißer.
2023-09-07 11:40:48 +01:00
621 changed files with 9175 additions and 3721 deletions
+7 -1
View File
@@ -7,6 +7,12 @@ on:
- MOODLE_[0-9]+_STABLE
tags-ignore:
- v[0-9]+.[0-9]+.[0-9]+*
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.2
@@ -115,4 +121,4 @@ jobs:
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
+7 -2
View File
@@ -1,7 +1,12 @@
name: Windows Testing
on:
workflow_dispatch
workflow_dispatch:
inputs:
phpunit_extra_options:
description: Additional options to apply to PHPUnit
required: false
default: ''
env:
php: 8.2
@@ -141,4 +146,4 @@ jobs:
env:
dbtype: ${{ matrix.db }}
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options
run: vendor/bin/phpunit $phpunit_options ${{ inputs.phpunit_extra_options }}
@@ -19,7 +19,7 @@ namespace core_admin\table;
use moodle_url;
/**
* Tiny admin settings.
* Admin tool settings.
*
* @package core_admin
* @copyright 2023 Andrew Lyons <andrew@nicols.co.uk>
@@ -30,12 +30,6 @@ class tool_plugin_management_table extends \core_admin\table\plugin_management_t
return 'tool';
}
public function guess_base_url(): void {
$this->define_baseurl(
new moodle_url('/admin/tools.php')
);
}
protected function get_column_list(): array {
$columns = parent::get_column_list();
@@ -45,6 +39,6 @@ class tool_plugin_management_table extends \core_admin\table\plugin_management_t
}
protected function get_action_url(array $params = []): moodle_url {
return new moodle_url('/admin/tool.php', $params);
return new moodle_url('/admin/settings.php', array_merge(['section' => 'toolsmanagement'], $params));
}
}
+2 -2
View File
@@ -80,8 +80,8 @@ if (!$category = $DB->get_record('course_categories', ['id' => $options['categor
throw new \moodle_exception('invalidcategoryid');
}
$backupdir = "restore_" . uniqid();
$path = $CFG->tempdir . DIRECTORY_SEPARATOR . "backup" . DIRECTORY_SEPARATOR . $backupdir;
$backupdir = restore_controller::get_tempdir_name(SITEID, $USER->id);
$path = make_backup_temp_directory($backupdir);
cli_heading(get_string('extractingbackupfileto', 'backup', $path));
$fp = get_file_packer('application/vnd.moodle.backup');
+191
View File
@@ -4305,4 +4305,195 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="4.4" requires="4.1.2">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="10.6.7" />
<VENDOR name="mysql" version="8.0" />
<VENDOR name="postgres" version="13" />
<VENDOR name="mssql" version="14.0" />
<VENDOR name="oracle" version="19" />
</DATABASE>
<PHP version="8.1.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="required">
<FEEDBACK>
<ON_ERROR message="mbstringrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
<PHP_EXTENSION name="sodium" level="required"/>
<PHP_EXTENSION name="exif" level="optional"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="required">
<FEEDBACK>
<ON_ERROR message="sixtyfourbitsrequired" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_admin_dir_usage" level="optional">
<FEEDBACK>
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+32 -43
View File
@@ -49,26 +49,11 @@ if ($action == 'newon') {
admin_externalpage_setup($pagename);
$sesskeyurl = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php?sesskey=' . sesskey();
$baseurl = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php';
$configstr = get_string('manage', 'repository');
// The URL used for redirection, and that all edit related URLs will be based off.
$baseurl = new moodle_url('/admin/repository.php');
$return = true;
if (!empty($action)) {
require_sesskey();
}
/**
* Helper function that generates a moodle_url object
* relevant to the repository
*/
function repository_action_url($repository) {
global $baseurl;
return new moodle_url($baseurl, array('sesskey'=>sesskey(), 'repos'=>$repository));
}
if (($action == 'edit') || ($action == 'new')) {
$pluginname = '';
if ($action == 'edit') {
@@ -182,16 +167,12 @@ if (($action == 'edit') || ($action == 'new')) {
}
}
} else if ($action == 'show') {
if (!confirm_sesskey()) {
throw new \moodle_exception('confirmsesskeybad', '', $baseurl);
}
require_sesskey();
$class = \core_plugin_manager::resolve_plugininfo_class('repository');
$class::enable_plugin($repository, 1);
$return = true;
} else if ($action == 'hide') {
if (!confirm_sesskey()) {
throw new \moodle_exception('confirmsesskeybad', '', $baseurl);
}
require_sesskey();
$class = \core_plugin_manager::resolve_plugininfo_class('repository');
$class::enable_plugin($repository, 0);
$return = true;
@@ -199,9 +180,7 @@ if (($action == 'edit') || ($action == 'new')) {
$repositorytype = repository::get_type_by_typename($repository);
if ($sure) {
$PAGE->set_pagetype('admin-repository-' . $repository);
if (!confirm_sesskey()) {
throw new \moodle_exception('confirmsesskeybad', '', $baseurl);
}
require_sesskey();
if ($repositorytype->delete($downloadcontents)) {
// Include this information into config changes table.
@@ -220,20 +199,15 @@ if (($action == 'edit') || ($action == 'new')) {
$output = $OUTPUT->box_start('generalbox', 'notice');
$output .= html_writer::tag('p', $message);
$removeurl = new moodle_url($sesskeyurl);
$removeurl->params(array(
$removeurl = new moodle_url($baseurl, [
'action' =>'delete',
'repos' => $repository,
'sure' => 'yes',
));
]);
$removeanddownloadurl = new moodle_url($sesskeyurl);
$removeanddownloadurl->params(array(
'action' =>'delete',
'repos'=> $repository,
'sure' => 'yes',
$removeanddownloadurl = new moodle_url($removeurl, [
'downloadcontents' => 1,
));
]);
$output .= $OUTPUT->single_button($removeurl, get_string('continueuninstall', 'repository'));
$output .= $OUTPUT->single_button($removeanddownloadurl, get_string('continueuninstallanddownload', 'repository'));
@@ -245,9 +219,11 @@ if (($action == 'edit') || ($action == 'new')) {
$return = false;
}
} else if ($action == 'moveup') {
require_sesskey();
$repositorytype = repository::get_type_by_typename($repository);
$repositorytype->move_order('up');
} else if ($action == 'movedown') {
require_sesskey();
$repositorytype = repository::get_type_by_typename($repository);
$repositorytype->move_order('down');
} else {
@@ -339,8 +315,7 @@ if (($action == 'edit') || ($action == 'new')) {
$userinstancenumbertext = "";
}
$settings .= '<a href="' . $sesskeyurl . '&amp;action=edit&amp;repos=' . $typename . '">' . $settingsstr .'</a>';
$settings = html_writer::link(new moodle_url($baseurl, ['action' => 'edit', 'repos' => $typename]), $settingsstr);
$settings .= $OUTPUT->container_start('mdl-left');
$settings .= '<br/>';
$settings .= $admininstancenumbertext;
@@ -357,22 +332,34 @@ if (($action == 'edit') || ($action == 'new')) {
$currentaction = 'hide';
}
$select = new single_select(repository_action_url($typename, 'repos'), 'action', $actionchoicesforexisting, $currentaction, null, 'applyto' . basename($typename));
// Active toggle.
$selectaction = new moodle_url($baseurl, ['sesskey' => sesskey(), 'repos' => $typename]);
$select = new single_select($selectaction, 'action', $actionchoicesforexisting, $currentaction, null,
'applyto' . basename($typename));
$select->set_label(get_string('action'), array('class' => 'accesshide'));
// Display up/down link
$updown = '';
$spacer = $OUTPUT->spacer(array('height'=>15, 'width'=>15)); // should be done with CSS instead
if ($updowncount > 1) {
$updown .= "<a href=\"$sesskeyurl&amp;action=moveup&amp;repos=".$typename."\">";
$updown .= $OUTPUT->pix_icon('t/up', get_string('moveup')) . "</a>&nbsp;";
$moveupaction = new moodle_url($baseurl, [
'sesskey' => sesskey(),
'action' => 'moveup',
'repos' => $typename,
]);
$updown .= html_writer::link($moveupaction, $OUTPUT->pix_icon('t/up', get_string('moveup'))) . '&nbsp;';
}
else {
$updown .= $spacer;
}
if ($updowncount < $totalrepositorytypes) {
$updown .= "<a href=\"$sesskeyurl&amp;action=movedown&amp;repos=".$typename."\">";
$updown .= $OUTPUT->pix_icon('t/down', get_string('movedown')) . "</a>&nbsp;";
$movedownaction = new moodle_url($baseurl, [
'sesskey' => sesskey(),
'action' => 'movedown',
'repos' => $typename,
]);
$updown .= html_writer::link($movedownaction, $OUTPUT->pix_icon('t/down', get_string('movedown'))) . '&nbsp;';
}
else {
$updown .= $spacer;
@@ -400,7 +387,9 @@ if (($action == 'edit') || ($action == 'new')) {
foreach ($plugins as $plugin => $dir) {
// Check that it has not already been listed
if (!in_array($plugin, $alreadyplugins)) {
$select = new single_select(repository_action_url($plugin, 'repos'), 'action', $actionchoicesfornew, 'delete', null, 'applyto' . basename($plugin));
$selectaction = new moodle_url($baseurl, ['sesskey' => sesskey(), 'repos' => $plugin]);
$select = new single_select($selectaction, 'action', $actionchoicesfornew, 'delete', null,
'applyto' . basename($plugin));
$select->set_label(get_string('action'), array('class' => 'accesshide'));
$uninstall = '';
if ($uninstallurl = core_plugin_manager::instance()->get_uninstall_url('repository_' . $plugin, 'manage')) {
+9 -10
View File
@@ -18,8 +18,6 @@ require_once(__DIR__ . '/../config.php');
require_once($CFG->dirroot . '/repository/lib.php');
require_once($CFG->libdir . '/adminlib.php');
require_sesskey();
// id of repository
$edit = optional_param('edit', 0, PARAM_INT);
$new = optional_param('new', '', PARAM_PLUGIN);
@@ -43,12 +41,8 @@ if ($edit){
admin_externalpage_setup($pagename, '', null, new moodle_url('/admin/repositoryinstance.php'));
$baseurl = new moodle_url("/$CFG->admin/repositoryinstance.php", array('sesskey'=>sesskey()));
$parenturl = new moodle_url("/$CFG->admin/repository.php", array(
'sesskey'=>sesskey(),
'action'=>'edit',
));
// The URL used for redirection, and that all edit related URLs will be based off.
$parenturl = new moodle_url('/admin/repository.php', ['action' => 'edit']);
if ($new) {
$parenturl->param('repos', $new);
@@ -116,6 +110,7 @@ if (!empty($edit) || !empty($new)) {
$return = false;
}
} else if (!empty($hide)) {
require_sesskey();
$instance = repository::get_type_by_typename($hide);
$instance->hide();
core_plugin_manager::reset_caches();
@@ -129,6 +124,7 @@ if (!empty($edit) || !empty($new)) {
throw new repository_exception('nopermissiontoaccess', 'repository');
}
if ($sure) {
require_sesskey();
if ($instance->delete($downloadcontents)) {
$deletedstr = get_string('instancedeleted', 'repository');
core_plugin_manager::reset_caches();
@@ -141,14 +137,17 @@ if (!empty($edit) || !empty($new)) {
echo $OUTPUT->header();
echo $OUTPUT->box_start('generalbox', 'notice');
$continueurl = new moodle_url($baseurl, array(
$continueurl = new moodle_url($PAGE->url, [
'type' => $type,
'delete' => $delete,
'sure' => 'yes',
));
]);
$continueanddownloadurl = new moodle_url($continueurl, array(
'downloadcontents' => 1
));
$message = get_string('confirmdelete', 'repository', $instance->name);
echo html_writer::tag('p', $message);
@@ -97,7 +97,7 @@ class role extends base {
->set_type(column::TYPE_TEXT)
->add_fields("{$rolealias}.name, {$rolealias}.shortname, {$rolealias}.id, {$contextalias}.id AS contextid")
->add_fields(context_helper::get_preload_record_columns_sql($contextalias))
->set_is_sortable(true)
->set_is_sortable(true, ["CASE WHEN {$rolealias}.name = '' THEN {$rolealias}.shortname ELSE {$rolealias}.name END"])
->set_callback(static function($name, stdClass $role): string {
if ($name === null) {
return '';
+1 -1
View File
@@ -76,7 +76,7 @@ switch ($action) {
$optionsyes = array('action'=>'delete', 'roleid'=>$roleid, 'sesskey'=>sesskey(), 'confirm'=>1);
$a = new stdClass();
$a->id = $roleid;
$a->name = $roles[$roleid]->name;
$a->name = $roles[$roleid]->localname;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records_select('role_assignments',
'roleid = ?', array($roleid), 'COUNT(DISTINCT userid)');
+2 -2
View File
@@ -200,14 +200,14 @@ reports,core_reportbuilder|/reportbuilder/index.php',
));
$choices = [HOMEPAGE_SITE => new lang_string('home')];
if (!empty($CFG->enabledashboard)) {
if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
$choices[HOMEPAGE_MY] = new lang_string('mymoodle', 'admin');
}
$choices[HOMEPAGE_MYCOURSES] = new lang_string('mycourses', 'admin');
$choices[HOMEPAGE_USER] = new lang_string('userpreference', 'admin');
$temp->add(new admin_setting_configselect('defaulthomepage', new lang_string('defaulthomepage', 'admin'),
new lang_string('configdefaulthomepage', 'admin'), get_default_home_page(), $choices));
if (!empty($CFG->enabledashboard)) {
if (!isset($CFG->enabledashboard) || $CFG->enabledashboard) {
$temp->add(new admin_setting_configcheckbox(
'allowguestmymoodle',
new lang_string('allowguestmymoodle', 'admin'),
@@ -23,12 +23,15 @@
* name - form element name
* hasoptions - there are some options
* options - list of options containing name, key, id, checked, label
* readonly - bool
Example context (json):
{
"name": "test",
"hasoptions": true,
"options": [ { "name": "Option", "key": "k1", "id": "id0", "checked": true, "label": "Option label"} ]
"options": [ { "name": "Option", "key": "k1", "id": "id0", "checked": true, "label": "Option label"} ],
"readonly": false
}
}}
<div class="form-multicheckbox">
@@ -37,7 +40,7 @@
<ul>
{{#options}}
<li>
<input type="checkbox" name="{{name}}[{{key}}]" value="1" id="{{id}}_{{key}}" {{#checked}}checked{{/checked}}>
<input type="checkbox" name="{{name}}[{{key}}]" value="1" id="{{id}}_{{key}}" {{#readonly}}disabled{{/readonly}} {{#checked}}checked{{/checked}}>
<label for="{{id}}_{{key}}">{{{label}}}</label>
</li>
{{/options}}
+34
View File
@@ -0,0 +1,34 @@
@tool_behat
Feature: Confirm that we can open multiple browser tabs
In order to use multiple browser tabs
As a test writer
I need the relevant Behat steps to work
@javascript @_switch_window
Scenario: Open multiple browser tabs
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
| Course 3 | C3 |
And I am on the "C1" "Course" page logged in as "admin"
# Open a new tab on the same page.
When I open a tab named "CourseViewer1" on the current page
And I should see "Course 1" in the "h1" "css_element"
And I am on the "C2" "Course" page
# Open new tab for specified page with identifier.
And I open a tab named "CourseViewer2" on the "C3" "Course" page
# And for a specified page without identifier.
And I open a tab named "CourseViewer4" on the "My courses" page
# Switch between all the tabs and confirm their different contents.
Then I should see "You're not enrolled in any course"
And I switch to "CourseViewer2" tab
And I should see "Course 3" in the "h1" "css_element"
And I switch to "CourseViewer1" tab
And I should see "Course 2" in the "h1" "css_element"
And I switch to the main tab
And I should see "Course 1" in the "h1" "css_element"
@@ -170,6 +170,19 @@ class brickfield_accessibility_color_test extends brickfield_accessibility_test
'yellowgreen' => '9acd32'
];
/** @var string[] Define estimated relative font-size codes to pt values. */
public $fontsizenames = [
'xx-small' => 9,
'x-small' => 10,
'small' => 11,
'smaller' => 11,
'medium' => 12,
'large' => 14,
'larger' => 14,
'x-large' => 18,
'xx-large' => 24,
];
/**
* Helper method that finds the luminosity between the provided
* foreground and background parameters.
@@ -227,7 +240,8 @@ class brickfield_accessibility_color_test extends brickfield_accessibility_test
$l2 = (.2126 * $r4 + 0.7152 * $g4 + 0.0722 * $b4);
}
$luminosity = round(($l1 + 0.05) / ($l2 + 0.05), 2);
// Increase round to 4 to avoid a 4.49 contrast being round up to a false pass of 4.5.
$luminosity = round(($l1 + 0.05) / ($l2 + 0.05), 4);
return $luminosity;
}
@@ -362,4 +376,35 @@ class brickfield_accessibility_color_test extends brickfield_accessibility_test
: $backrgb['b'] - $forergb['b'];
return ['red' => $reddiff, 'green' => $greendiff, 'blue' => $bluediff];
}
/**
* Helper method that finds the estimated font-size for the provided
* string font-size parameter.
* @param string $fontsize The css font-size, in various formats
* @return int The estimated font-size
*/
public function get_fontsize(string $fontsize): int {
$newfontsize = 12; // Default value, in pt, equivalent to 16px.
// Search for rem, em, and px initially, typical font-size values.
$pos1 = stripos($fontsize, 'rem');
$pos2 = stripos($fontsize, 'em');
$pos3 = stripos($fontsize, 'px');
if ($pos1 !== false) {
$rem = substr($fontsize, 0, -3);
$newfontsize = $newfontsize * $rem;
} else if ($pos2 !== false) {
$em = substr($fontsize, 0, -2);
$newfontsize = $newfontsize * $em;
} else if ($pos3 !== false) {
$px = substr($fontsize, 0, -2);
$newfontsize = 0.75 * $px;
} else if (in_array($fontsize, array_keys($this->fontsizenames))) {
$newfontsize = $this->fontsizenames[$fontsize];
} else {
preg_match_all('!\d+!', $fontsize, $matches);
$newfontsize = $matches[0][0] ?? $newfontsize;
}
return (int) $newfontsize;
}
}
@@ -92,8 +92,7 @@ class css_text_has_contrast extends brickfield_accessibility_color_test {
$italic = false;
if (isset($style['font-size'])) {
preg_match_all('!\d+!', $style['font-size'], $matches);
$fontsize = $matches[0][0];
$fontsize = $this->get_fontsize($style['font-size']);
}
if (isset($style['font-weight'])) {
@@ -178,6 +178,54 @@ EOD;
</html>
EOD;
/** @var string HTML with px18 fail colour values. */
private $px18 = <<<EOD
<body><p style="color:#EF0000; background-color:white; font-size: 18px">
This is not contrasty enough.</p></body>
EOD;
/** @var string HTML with px19bold pass colour values. */
private $px19bold = <<<EOD
<body><p style="color:#EF0000; background-color:white; font-size: 19px; font-weight: bold;">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 pass colour values. */
private $px18pass = <<<EOD
<body><p style="color:#E60000; background-color:white; font-size: 18px">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with medium size colour values. */
private $mediumfail = <<<EOD
<body><p style="color:#EF0000; background-color:white; font-size: medium">
This is not contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 colour values. */
private $mediumpass = <<<EOD
<body><p style="color:#E60000; background-color:white; font-size: medium">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with larger fail colour values. */
private $largerfail = <<<EOD
<body><p style="color:#FF6161; background-color:white; font-size: larger">
This is not contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 colour values. */
private $largerpass = <<<EOD
<body><p style="color:#FF5C5C; background-color:white; font-size: larger;">
This is contrasty enough.</p></body>
EOD;
/** @var string HTML with px18 colour values. */
private $largerboldpass = <<<EOD
<body><p style="color:#FF5C5C; background-color:white; font-size: larger; font-weight: bold;">
This is contrasty enough.</p></body>
EOD;
/**
* Test for the area assign intro
*/
@@ -235,4 +283,68 @@ EOD;
$results = $this->get_checker_results($this->emptyvalue);
$this->assertEmpty($results);
}
/**
* Test for text px18 with insufficient contrast of 4.49.
*/
public function test_check_for_px18_fail() {
$results = $this->get_checker_results($this->px18);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for text px19 bold with sufficient contrast of 4.49.
*/
public function test_check_for_px19bold_pass() {
$results = $this->get_checker_results($this->px19bold);
$this->assertEmpty($results);
}
/**
* Test for text px18 with sufficient contrast of 4.81.
*/
public function test_check_for_px18_pass() {
$results = $this->get_checker_results($this->px18pass);
$this->assertEmpty($results);
}
/**
* Test for medium (12pt) text with insufficient contrast of 4.49.
*/
public function test_check_for_medium_fail() {
$results = $this->get_checker_results($this->mediumfail);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for medium (12pt) text with sufficient contrast of 4.81.
*/
public function test_check_for_medium_pass() {
$results = $this->get_checker_results($this->mediumpass);
$this->assertEmpty($results);
}
/**
* Test for larger (14pt) text with insufficient contrast of 2.94.
*/
public function test_check_for_larger_fail() {
$results = $this->get_checker_results($this->largerfail);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for larger (14pt) text with insufficient contrast of 3.02.
*/
public function test_check_for_larger_pass() {
$results = $this->get_checker_results($this->largerpass);
$this->assertTrue($results[0]->element->tagName == 'p');
}
/**
* Test for larger (14pt) bold text with sufficient contrast of 3.02.
*/
public function test_check_for_largerbold_pass() {
$results = $this->get_checker_results($this->largerboldpass);
$this->assertEmpty($results);
}
}
+3
View File
@@ -61,5 +61,8 @@ function xmldb_tool_cohortroles_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2023042401, 'tool', 'cohortroles');
}
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -24,7 +24,7 @@ The confirmation AMD module is loaded automatically, so the only thing you need
to the target element:
{{< highlight html >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["delete", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show confirmation modal</button>
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show confirmation modal</button>
{{< /highlight >}}
You can also use it on PHP, you just need to set the attributes parameter to any moodle output component that takes attributes:
@@ -32,7 +32,7 @@ You can also use it on PHP, you just need to set the attributes parameter to any
echo $OUTPUT->single_button('#', get_string('delete'), 'get', [
'data-confirmation' => 'modal',
'data-confirmation-title-str' => json_encode(['delete', 'core']),
'data-confirmation-question-str' => json_encode(['areyousure']),
'data-confirmation-content-str' => json_encode(['areyousure']),
'data-confirmation-yes-button-str' => json_encode(['delete', 'core'])
]);
{{< / php >}}
@@ -56,8 +56,8 @@ echo $OUTPUT->single_button('#', get_string('delete'), 'get', [
<td>The modal title language string identifier, must be provided in JSON encoded format.</td>
</tr>
<tr>
<td>data-confirmation-question-str</td>
<td>The confirmation question language string identifier, must be provided in JSON encoded format.</td>
<td>data-confirmation-content-str</td>
<td>The modal main content language string identifier, must be provided in JSON encoded format.</td>
</tr>
<tr>
<td>data-confirmation-yes-button-str</td>
@@ -86,14 +86,14 @@ echo $OUTPUT->single_button('#', get_string('delete'), 'get', [
{{< example >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["ok", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["ok", "core"]'>Show confirmation modal</button>
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["ok", "core"]'>Show confirmation modal</button>
{{< /example >}}
#### Delete Modal
{{< example >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-type="delete" data-confirmation-title-str='["delete", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show delete modal</button>
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["delete", "core"]'>Show delete modal</button>
{{< /example >}}
@@ -101,7 +101,7 @@ data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str
{{< example >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["save", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["save", "core"]' data-confirmation-toast="true"
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["save", "core"]' data-confirmation-toast="true"
data-confirmation-toast-confirmation-str='["saved", "core_question", "My question"]'>Show confirmation modal</button>
{{< /example >}}
@@ -109,6 +109,6 @@ data-confirmation-toast-confirmation-str='["saved", "core_question", "My questio
{{< example >}}
<button type="button" class="btn btn-primary" data-confirmation="modal" data-confirmation-title-str='["save", "core"]'
data-confirmation-question-str='["areyousure"]' data-confirmation-yes-button-str='["save", "core"]'
data-confirmation-content-str='["areyousure"]' data-confirmation-yes-button-str='["save", "core"]'
data-confirmation-destination="http://moodle.com">Show confirmation modal</button>
{{< /example >}}
+3
View File
@@ -41,5 +41,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -152,5 +152,8 @@ function xmldb_tool_dataprivacy_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2023062700, 'tool', 'dataprivacy');
}
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -216,7 +216,7 @@ class tool_generator_course_backend extends tool_generator_backend {
* @return int Course id
*/
public function make() {
global $DB, $CFG;
global $DB, $CFG, $USER;
require_once($CFG->dirroot . '/lib/phpunit/classes/util.php');
raise_memory_limit(MEMORY_EXTRA);
@@ -252,6 +252,12 @@ class tool_generator_course_backend extends tool_generator_backend {
}
}
// We are checking 'enroladminnewcourse' setting to decide to enrol admins or not.
if (!empty($CFG->creatornewroleid) && !empty($CFG->enroladminnewcourse) && is_siteadmin($USER->id)) {
// Deal with course creators - enrol them internally with default role.
enrol_try_internal_enrol($this->course->id, $USER->id, $CFG->creatornewroleid);
}
// Log total time.
$this->log('coursecompleted', round(microtime(true) - $entirestart, 1));
@@ -0,0 +1,33 @@
@core @core_course @tool_generator
Feature: Admins can create test courses
In order to create testing information
As an admin
I need to create testing courses quickly
@javascript
Scenario: 'Auto-enrol admin in new courses' setting when creating a test course as admin
Given I log in as "admin"
And the following config values are set as admin:
| enroladminnewcourse | 0 |
And I navigate to "Development > Make test course" in site administration
And I set the following fields to these values:
| Size of course | XS |
| Course full name | Fake course for testing |
| Course short name | fake |
And I press "Create course"
And I click on "Continue" "link"
And I navigate to course participants
Then I should not see "Teacher"
And I should not see "Nothing to display"
And the following config values are set as admin:
| enroladminnewcourse | 1 |
And I navigate to "Courses > Add a new course" in site administration
And I navigate to "Development > Make test course" in site administration
And I set the following fields to these values:
| Size of course | XS |
| Course full name | New fake course for testing |
| Course short name | newfake |
And I press "Create course"
And I click on "Continue" "link"
And I navigate to course participants
And I should see "Teacher"
@@ -68,9 +68,14 @@ class maketestcourse_test extends \advanced_testcase {
$this->assertEquals(2, count($modinfo->get_section_info_all()));
// Check user is enrolled.
// enroladminnewcourse is enabled by default, so admin is also enrolled as teacher.
$users = get_enrolled_users($context);
$this->assertEquals(1, count($users));
$this->assertEquals('tool_generator_000001', reset($users)->username);
$this->assertEquals(2, count($users));
$usernames = array_map(function($user) {
return $user->username;
}, $users);
$this->assertTrue(in_array('admin', $usernames));
$this->assertTrue(in_array('tool_generator_000001', $usernames));
// Check there's a page on the course.
$pages = $modinfo->get_instances_of('page');
+1 -1
View File
@@ -82,7 +82,7 @@ trait reader {
*/
public static function decode_other(?string $other) {
if ($other === 'N;' || preg_match('~^.:~', $other ?? '')) {
return unserialize($other);
return unserialize($other, ['allowed_classes' => [stdClass::class]]);
} else {
return json_decode($other ?? '', true);
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -39,5 +39,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -66,5 +66,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -46,5 +46,8 @@ function xmldb_factor_auth_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2021020500, 'factor', 'auth');
}
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -34,7 +34,7 @@ $string['error:futurecode'] = 'This code is invalid. Please verify the time on y
Current system time is {$a}.';
$string['error:oldcode'] = 'This code is too old. Please verify the time on your authenticator device is correct and try again.
Current system time is {$a}.';
$string['error:wrongverification'] = 'Incorrect verification code';
$string['error:wrongverification'] = 'Incorrect verification code.';
$string['factorsetup'] = 'App setup';
$string['info'] = '<p>Use any time-based one-time password (TOTP) authenticator app on your device to generate a verification code, even when it is offline.</p>
+4 -1
View File
@@ -384,7 +384,8 @@ class api {
$settings->searchhideallcategory = $CFG->searchhideallcategory;
$settings->searchmaxtopresults = $CFG->searchmaxtopresults;
$settings->searchbannerenable = $CFG->searchbannerenable;
$settings->searchbanner = $CFG->searchbanner;
$settings->searchbanner = \core_external\util::format_text(
$CFG->searchbanner, FORMAT_HTML, $context)[0];
}
return $settings;
@@ -515,6 +516,7 @@ class api {
'comments' => 'CoreBlockDelegate_AddonBlockComments',
'completionstatus' => 'CoreBlockDelegate_AddonBlockCompletionStatus',
'feedback' => 'CoreBlockDelegate_AddonBlockFeedback',
'globalsearch' => 'CoreBlockDelegate_AddonBlockGlobalSearch',
'glossary_random' => 'CoreBlockDelegate_AddonBlockGlossaryRandom',
'html' => 'CoreBlockDelegate_AddonBlockHtml',
'lp' => 'CoreBlockDelegate_AddonBlockLp',
@@ -523,6 +525,7 @@ class api {
'private_files' => 'CoreBlockDelegate_AddonBlockPrivateFiles',
'recent_activity' => 'CoreBlockDelegate_AddonBlockRecentActivity',
'rss_client' => 'CoreBlockDelegate_AddonBlockRssClient',
'search_forums' => 'CoreBlockDelegate_AddonBlockSearchForums',
'selfcompletion' => 'CoreBlockDelegate_AddonBlockSelfCompletion',
'tags' => 'CoreBlockDelegate_AddonBlockTags',
);
+3
View File
@@ -47,5 +47,8 @@ function xmldb_tool_mobile_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -75,5 +75,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -155,5 +155,8 @@ function xmldb_tool_moodlenet_upgrade(int $oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -46,5 +46,8 @@ function xmldb_tool_policy_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -35,7 +35,7 @@ $renderer = $PAGE->get_renderer('tool_task');
if ($classname) {
$pageurl = new moodle_url('/admin/tool/task/adhoctasks.php');
$PAGE->navbar->add(get_string('adhoctasks', 'tool_task'), $pageurl);
$PAGE->navbar->add($classname, $PAGE->url);
$PAGE->navbar->add(s($classname), $PAGE->url);
$tasks = core\task\manager::get_adhoc_tasks($classname, $failedonly);
+2 -1
View File
@@ -45,5 +45,6 @@ function tool_task_status_checks() : array {
* @param string $eol End of line character
*/
function tool_task_mtrace_wrapper(string $message, string $eol): void {
echo s($message . $eol);
$message = s($message);
echo $message . $eol;
}
+2 -2
View File
@@ -82,7 +82,7 @@ class tool_task_renderer extends plugin_renderer_base {
);
$classcell = new html_table_cell($classcontent);
$classcell->header = true;
$classcell->class = "task-class-summary text-ltr";
$classcell->attributes['class'] = "task-class-summary text-ltr";
$duecontent = $stats['due'];
if ($canruntasks && ($stats['due'] > 0 || $stats['failed'] > 0)) {
@@ -166,7 +166,7 @@ class tool_task_renderer extends plugin_renderer_base {
// Main tasks table.
$table = $this->generate_adhoc_tasks_simple_table($tasks, $canruntasks);
$table->caption = "$classname "
$table->caption = s($classname) . " "
. get_string($failedonly ? 'adhoctasksfailed' : 'adhoctasks', 'tool_task');
$table->head[3] .= " $failedorall"; // Spice up faildelay heading.
+2 -1
View File
@@ -60,7 +60,7 @@ if ($taskid) {
if (!$classname) {
throw new \moodle_exception('noclassname', 'tool_task');
}
$heading = "Run $classname " . ($failedonly ? "failed" : "all")." tasks";
$heading = "Run " . s($classname) . " " . ($failedonly ? "failed" : "all")." tasks";
$now = time();
$tasks = array_filter(
core\task\manager::get_adhoc_tasks($classname, $failedonly, true),
@@ -111,6 +111,7 @@ require_sesskey();
\core\session\manager::write_close();
// Prepare to handle output via mtrace.
require('lib.php');
$CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper';
// Run the specified tasks.
+1
View File
@@ -89,6 +89,7 @@ echo $OUTPUT->select_element_for_append();
// Prepare to handle output via mtrace.
echo html_writer::start_tag('pre', ['style' => 'color: #fff; background: #333; padding: 1em; min-height: 24lh']);
require('lib.php');
$CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper';
// Run the specified task (this will output an error if it doesn't exist).
+5 -1
View File
@@ -236,6 +236,8 @@ class form_test extends \advanced_testcase {
$checker->set_day_of_week('6');
$this->assertTrue($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('7');
$this->assertTrue($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('8');
$this->assertFalse($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('20');
$this->assertFalse($checker->is_valid($checker::FIELD_DAYOFWEEK));
@@ -247,7 +249,7 @@ class form_test extends \advanced_testcase {
$checker->set_day_of_week('*/6');
$this->assertTrue($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('*/7');
$this->assertFalse($checker->is_valid($checker::FIELD_DAYOFWEEK));
$this->assertTrue($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('*/13');
$this->assertFalse($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('*/35');
@@ -271,6 +273,8 @@ class form_test extends \advanced_testcase {
$checker->set_day_of_week('65-2');
$this->assertFalse($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('3-7');
$this->assertTrue($checker->is_valid($checker::FIELD_DAYOFWEEK));
$checker->set_day_of_week('3-8');
$this->assertFalse($checker->is_valid($checker::FIELD_DAYOFWEEK));
}
}
@@ -102,7 +102,7 @@ class block extends base {
*/
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
$mform->hideIf('targetvalue_block', 'targettype', 'noteq',
\tool_usertours\target::get_target_constant_for_class(get_class()));
\tool_usertours\target::get_target_constant_for_class(self::class));
}
/**
@@ -92,7 +92,7 @@ class selector extends base {
*/
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
$mform->hideIf('targetvalue_selector', 'targettype', 'noteq',
\tool_usertours\target::get_target_constant_for_class(get_class()));
\tool_usertours\target::get_target_constant_for_class(self::class));
}
/**
@@ -81,7 +81,7 @@ class unattached extends base {
* @param MoodleQuickForm $mform The form to add configuration to.
*/
public static function add_disabled_constraints_to_form(\MoodleQuickForm $mform) {
$myvalue = \tool_usertours\target::get_target_constant_for_class(get_class());
$myvalue = \tool_usertours\target::get_target_constant_for_class(self::class);
foreach (array_keys(self::$forcedsettings) as $settingname) {
$mform->hideIf($settingname, 'targettype', 'eq', $myvalue);
+3
View File
@@ -146,5 +146,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2023053000, 'tool', 'usertours');
}
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -52,5 +52,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -90,7 +90,7 @@ class login implements renderable, templatable {
$languagedata = new \core\output\language_menu($PAGE);
$this->languagemenu = $languagedata->export_for_action_menu($OUTPUT);
$this->canloginasguest = $CFG->guestloginbutton and !isguestuser();
$this->canloginasguest = $CFG->guestloginbutton && !isguestuser();
$this->canloginbyemail = !empty($CFG->authloginviaemail);
$this->cansignup = $CFG->registerauth == 'email' || !empty($CFG->registerauth);
if ($CFG->rememberusername == 0) {
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_db_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_email_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -52,5 +52,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -94,5 +94,8 @@ function xmldb_auth_lti_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -44,5 +44,8 @@ function xmldb_auth_none_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -66,5 +66,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -149,15 +149,23 @@ class condition extends \core_availability\condition {
$allow = true;
if ($this->expectedcompletion == COMPLETION_COMPLETE) {
// Complete also allows the pass, fail states.
// Complete also allows the pass state.
switch ($completiondata->completionstate) {
case COMPLETION_COMPLETE:
case COMPLETION_COMPLETE_FAIL:
case COMPLETION_COMPLETE_PASS:
break;
default:
$allow = false;
}
} else if ($this->expectedcompletion == COMPLETION_INCOMPLETE) {
// Incomplete also allows the fail state.
switch ($completiondata->completionstate) {
case COMPLETION_INCOMPLETE:
case COMPLETION_COMPLETE_FAIL:
break;
default:
$allow = false;
}
} else {
// Other values require exact match.
if ($completiondata->completionstate != $this->expectedcompletion) {
@@ -74,3 +74,48 @@ Feature: availability_completion
And I click on "forum 1" "link" in the "region-main" "region"
And I am on "Course 1" course homepage
And I should see "Page 2" in the "region-main" "region"
@javascript
Scenario Outline: Restrict access for activity completion should display correctly
Given the following "question categories" exist:
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist:
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | First question | Answer the first question |
And the following "activities" exist:
| activity | name | course | idnumber | gradepass | completion | completionpassgrade | completionusegrade |
| quiz | Test quiz name | C1 | quiz1 | 5.00 | 2 | 1 | 1 |
And quiz "Test quiz name" contains the following questions:
| question | page |
| First question | 1 |
And I am on the "Page 2" "page activity editing" page logged in as "teacher1"
And I expand all fieldsets
And I press "Add restriction..."
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue"
And I click on ".availability-item .availability-eye img" "css_element"
And I set the following fields to these values:
| Required completion status | <condition> |
| cm | quiz |
And I press "Save and return to course"
And I am on the "Course 1" "course" page logged in as "student1"
And I <shouldornot> see "Page 2" in the "region-main" "region"
# Failed grade for quiz.
When user "student1" has attempted "Test quiz name" with responses:
| slot | response |
| 1 | <answer1> |
And I reload the page
And I <shouldornotanswer1> see "Page 2" in the "region-main" "region"
# Passing grade for quiz.
But user "student1" has attempted "Test quiz name" with responses:
| slot | response |
| 1 | <answer2> |
And I reload the page
And I <shouldornotanswer2> see "Page 2" in the "region-main" "region"
Examples:
| condition | answer1 | answer2 | shouldornot | shouldornotanswer1 | shouldornotanswer2 |
| must be marked complete | False | True | should not | should not | should |
| must not be marked complete | False | True | should | should | should not |
| must be complete with pass grade | False | True | should not | should not | should |
| must be complete with fail grade | False | True | should not | should | should not |
@@ -301,14 +301,14 @@ class condition_test extends \advanced_testcase {
$cond = new condition((object)[
'cm' => (int)$assigncm->id, 'e' => COMPLETION_INCOMPLETE
]);
$this->assertFalse($cond->is_available(false, $info, true, $user->id));
$this->assertTrue($cond->is_available(true, $info, true, $user->id));
$this->assertTrue($cond->is_available(false, $info, true, $user->id));
$this->assertFalse($cond->is_available(true, $info, true, $user->id));
$cond = new condition((object)[
'cm' => (int)$assigncm->id, 'e' => COMPLETION_COMPLETE
]);
$this->assertTrue($cond->is_available(false, $info, true, $user->id));
$this->assertFalse($cond->is_available(true, $info, true, $user->id));
$this->assertFalse($cond->is_available(false, $info, true, $user->id));
$this->assertTrue($cond->is_available(true, $info, true, $user->id));
$cond = new condition((object)[
'cm' => (int)$assigncm->id, 'e' => COMPLETION_COMPLETE_PASS
@@ -531,10 +531,10 @@ class condition_test extends \advanced_testcase {
],
// Depending on assign with grade.
'Previous complete condition with previous fail grade' => [
40, COMPLETION_COMPLETE, '', 'page3', true, false, '~Assign!.*is marked complete~'
40, COMPLETION_COMPLETE, '', 'page3', false, true, '~Assign!.*is marked complete~',
],
'Previous incomplete condition with previous fail grade' => [
40, COMPLETION_INCOMPLETE, '', 'page3', false, true, '~Assign!.*is incomplete~'
40, COMPLETION_INCOMPLETE, '', 'page3', true, false, '~Assign!.*is incomplete~',
],
'Previous complete pass condition with previous fail grade' => [
40, COMPLETION_COMPLETE_PASS, '', 'page3', false, true, '~Assign!.*is complete and passed~'
@@ -239,7 +239,7 @@ Feature: edit_availability
And "Edit restrictions" "link" should exist in the "section-1" "core_availability > Section availability"
When I click on "Edit restrictions" "link" in the "section-1" "core_availability > Section availability"
Then I should see "Restrict access"
And I should not see "General"
And I should not see "Summary of General"
And I should see "Collapse all"
And I should not see "Expand all"
And I click on "Cancel" "button"
@@ -264,3 +264,16 @@ Feature: edit_availability
And I should not see "Content"
And I should see "Collapse all"
And I should not see "Expand all"
@javascript
Scenario: Edit activity availability button is shown after duplicating an activity
# Setting a restriction up
Given I am on the "MyForum" "forum activity editing" page logged in as teacher1
And I expand all fieldsets
And I press "Add restriction..."
And I click on "Date" "button" in the "Add restriction..." "dialogue"
When I press "Save and return to course"
And I turn editing mode on
And I duplicate "MyForum" activity
# Testing edit restrictions link
Then "Edit restrictions" "link" should exist in the "MyForum (copy)" "core_availability > Activity availability"
+7 -1
View File
@@ -1663,7 +1663,13 @@ class backup_block_instance_structure_step extends backup_structure_step {
// Transform configdata information if needed (process links and friends)
$blockrec = $DB->get_record('block_instances', array('id' => $this->task->get_blockid()));
if ($attrstotransform = $this->task->get_configdata_encoded_attributes()) {
$configdata = (array)unserialize(base64_decode($blockrec->configdata));
$configdata = array_filter(
(array) unserialize_object(base64_decode($blockrec->configdata)),
static function($value): bool {
return !($value instanceof __PHP_Incomplete_Class);
}
);
foreach ($configdata as $attribute => $value) {
if (in_array($attribute, $attrstotransform)) {
$configdata[$attribute] = $this->contenttransformer->process($value);
+7 -1
View File
@@ -4442,7 +4442,13 @@ class restore_block_instance_structure_step extends restore_structure_step {
// Let's look for anything within configdata neededing processing
// (nulls and uses of legacy file.php)
if ($attrstotransform = $this->task->get_configdata_encoded_attributes()) {
$configdata = (array) unserialize_object(base64_decode($data->configdata));
$configdata = array_filter(
(array) unserialize_object(base64_decode($data->configdata)),
static function($value): bool {
return !($value instanceof __PHP_Incomplete_Class);
}
);
foreach ($configdata as $attribute => $value) {
if (in_array($attribute, $attrstotransform)) {
$configdata[$attribute] = $this->contentprocessor->process_cdata($value);
+5 -1
View File
@@ -160,12 +160,16 @@ if ($context->contextlevel == CONTEXT_MODULE) {
$renderer = $PAGE->get_renderer('core', 'backup');
echo $renderer->backup_files_viewer($treeview_options);
echo $OUTPUT->container_end();
// Update the course context with the proper value, because $context contains the module context.
$coursecontext = \context_course::instance($course->id);
} else {
$coursecontext = $context;
}
echo $OUTPUT->heading_with_help(get_string('choosefilefromcoursebackup', 'backup'), 'choosefilefromcoursebackup', 'backup');
echo $OUTPUT->container_start();
$treeview_options = array();
$treeview_options['filecontext'] = $context;
$treeview_options['filecontext'] = $coursecontext;
$treeview_options['currentcontext'] = $context;
$treeview_options['component'] = 'backup';
$treeview_options['context'] = $context;
+5 -8
View File
@@ -14,20 +14,17 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();
use \core_badges\badge;
/**
* Local stuff for category enrolment plugin.
* Event observer for badges.
*
* @package core_badges
* @copyright 2013 Rajesh Taneja <rajesh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
use \core_badges\badge;
/**
* Event observer for badges.
*/
class core_badges_observer {
/**
* Triggered when 'course_module_completion_updated' event is triggered.
+9 -2
View File
@@ -188,8 +188,6 @@ class award_criteria_activity extends award_criteria {
* @return bool Whether criteria is complete
*/
public function review($userid, $filtered = false) {
$completionstates = array(COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS, COMPLETION_COMPLETE_FAIL);
if ($this->course->startdate > time()) {
return false;
}
@@ -209,6 +207,15 @@ class award_criteria_activity extends award_criteria {
$check_date = ($date <= $param['bydate']);
}
// Successfull completion states depend on the completion settings.
if (isset($data->passgrade)) {
// Passing grade is required. Don't issue a badge when state is COMPLETION_COMPLETE_FAIL.
$completionstates = [COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS];
} else {
// Any grade is required. Issue a badge even when state is COMPLETION_COMPLETE_FAIL.
$completionstates = [COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS, COMPLETION_COMPLETE_FAIL];
}
if ($this->method == BADGE_CRITERIA_AGGREGATION_ALL) {
if (in_array($data->completionstate, $completionstates) && $check_date) {
$overall = true;
+2
View File
@@ -54,6 +54,8 @@ $badge = new badge($badgeid);
$context = $badge->get_context();
$navurl = new moodle_url('/badges/index.php', array('type' => $badge->type));
require_capability('moodle/badges:viewawarded', $context);
if ($badge->type == BADGE_TYPE_COURSE) {
if (empty($CFG->badges_allowcoursebadges)) {
throw new \moodle_exception('coursebadgesdisabled', 'badges');
+78 -71
View File
@@ -1,14 +1,14 @@
@mod @mod_quiz @core @core_badges @javascript
@mod @mod_quiz @core @core_badges @core_completion @javascript
Feature: Award badges based on activity completion
In order to ensure a student has learned the material before being marked complete
As a teacher
I need to set a quiz to award a badge when upon completion when the student receives a passing grade, or completed_fail if they use all attempts without passing
I need to configure an activity to grant a badge only when the student achieves a passing grade upon completion.
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 1 | student2@example.com |
| student2 | Student | 2 | student2@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category | enablecompletion |
@@ -27,96 +27,103 @@ Feature: Award badges based on activity completion
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | First question | Answer the first question |
And the following "activities" exist:
| activity | name | course | idnumber | attempts | gradepass | completion | completionattemptsexhausted | completionpassgrade | completionusegrade |
| quiz | Test quiz name | C1 | quiz1 | 2 | 5.00 | 2 | 1 | 1 | 1 |
And quiz "Test quiz name" contains the following questions:
| activity | name | course | idnumber | attempts | gradepass | completion | completionpassgrade | completionusegrade |
| quiz | Test quiz name 1 | C1 | quiz1 | 2 | 5.00 | 2 | 1 | 1 |
| quiz | Test quiz name 2 | C1 | quiz2 | 2 | 5.00 | 2 | 0 | 1 |
And quiz "Test quiz name 1" contains the following questions:
| question | page |
| First question | 1 |
And quiz "Test quiz name 2" contains the following questions:
| question | page |
| First question | 1 |
And user "student1" has attempted "Test quiz name" with responses:
| slot | response |
| 1 | False |
And user "student2" has attempted "Test quiz name" with responses:
| slot | response |
| 1 | False |
And the following "core_badges > Badge" exists:
| name | Course Badge |
| name | Course Badge 1 |
| status | 0 |
| type | 2 |
| course | C1 |
| description | Course badge description |
| description | Course badge 1 description |
| image | badges/tests/behat/badge.png |
And the following "core_badges > Badge" exists:
| name | Course Badge 2 |
| status | 0 |
| type | 2 |
| course | C1 |
| description | Course badge 2 description |
| image | badges/tests/behat/badge.png |
And I am on the "Course 1" course page logged in as teacher1
Scenario: Student earns a badge using activity completion, but does not get passing grade
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Badges" in current page administration
Scenario: Student does not earn a badge using activity completion when does not get passing grade
Given I navigate to "Badges" in current page administration
And I press "Manage badges"
And I follow "Course Badge"
And I follow "Course Badge 1"
And I select "Criteria" from the "jump" singleselect
And I set the field "type" to "Activity completion"
And I set the field "Quiz - Test quiz name" to "1"
And I set the field "Quiz - Test quiz name 1" to "1"
And I press "Save"
And I press "Enable access"
And I press "Continue"
And I should see "Recipients (0)"
And I log out
And I am on the "Course 1" course page logged in as student1
And the "Receive a grade" completion condition of "Test quiz name" is displayed as "done"
And the "Receive a passing grade" completion condition of "Test quiz name" is displayed as "failed"
And the "Receive a pass grade or complete all available attempts" completion condition of "Test quiz name" is displayed as "todo"
When I am on the "Test quiz name" "quiz activity" page
And I press "Re-attempt quiz"
And I set the field "False" to "1"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I click on "Submit" "button" in the "Submit all your answers and finish?" "dialogue"
And I log out
And I am on the "Course 1" course page logged in as teacher1
# Pass grade for student1. Activity is considered complete because student1 got a passing grade.
And user "student1" has attempted "Test quiz name 1" with responses:
| slot | response |
| 1 | True |
# Fail grade for student2. Activity is considered incomplete because student2 got a failing grade.
And user "student2" has attempted "Test quiz name 1" with responses:
| slot | response |
| 1 | False |
And I navigate to "Badges > Manage badges" in current page administration
And I follow "Course Badge"
And I follow "Course Badge 1"
Then I should see "Recipients (1)"
And I select "Recipients (1)" from the "jump" singleselect
And I should see "Student 1"
And I should not see "Student 2"
Scenario Outline: Previously graded pass/fail students should earn a badge after enabling a badge
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Badges" in current page administration
Scenario: Students with any grades in an activity will receive a badge if the completion condition is set to receive any grade
Given I navigate to "Badges" in current page administration
And I press "Manage badges"
And I follow "Course Badge"
And I follow "Course Badge 2"
And I select "Criteria" from the "jump" singleselect
And I set the field "type" to "Activity completion"
And I click on "Expand all" "link" in the "region-main" "region"
And I set the field "Quiz - Test quiz name" to "1"
And I set the field "<aggregationcriteria>" to "1"
And I set the field "Quiz - Test quiz name 2" to "1"
And I press "Save"
# Fail grade with student2
And I am on the "Course 1" course page logged in as student2
And I am on the "Test quiz name" "quiz activity" page
And I press "Re-attempt quiz"
And I set the field "False" to "1"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I click on "Submit" "button" in the "Submit all your answers and finish?" "dialogue"
And I log out
# Pass grade with student1
And I am on the "Course 1" course page logged in as student1
And I am on the "Test quiz name" "quiz activity" page
And I press "Re-attempt quiz"
And I set the field "False" to "0"
And I press "Finish attempt ..."
And I press "Submit all and finish"
And I click on "Submit" "button" in the "Submit all your answers and finish?" "dialogue"
And I log out
# Enable badge access once all students have completed an activity.
And I am on the "Course 1" course page logged in as teacher1
And I press "Enable access"
And I press "Continue"
# Pass grade for student1.
And user "student1" has attempted "Test quiz name 2" with responses:
| slot | response |
| 1 | True |
# Fail grade for student2. Activity is considered complete even if student2 got a failing grade.
And user "student2" has attempted "Test quiz name 2" with responses:
| slot | response |
| 1 | False |
And I navigate to "Badges > Manage badges" in current page administration
And I follow "Course Badge"
And I follow "Course Badge 2"
Then I should see "Recipients (2)"
And I select "Recipients (2)" from the "jump" singleselect
And I should see "Student 1"
And I should see "Student 2"
Scenario: Previously graded pass/fail students should earn a badge after enabling a badge
# Pass grade for student1.
Given user "student1" has attempted "Test quiz name 1" with responses:
| slot | response |
| 1 | True |
# Fail grade for student2.
And user "student2" has attempted "Test quiz name 1" with responses:
| slot | response |
| 1 | False |
And I navigate to "Badges" in current page administration
And I press "Manage badges"
And I follow "Course Badge 1"
And I select "Criteria" from the "jump" singleselect
And I set the field "type" to "Activity completion"
And I set the field "Quiz - Test quiz name 1" to "1"
And I press "Save"
# Enable badge access once students have completed the activity.
When I press "Enable access"
And I press "Continue"
Then I should see "Recipients (2)"
Examples:
| aggregationcriteria |
| Any of the selected activities is complete |
| All of the selected activities are complete |
# Only student1 should earn the badge because student2 did not pass the quiz.
Then I should see "Recipients (1)"
And I select "Recipients (1)" from the "jump" singleselect
And I should see "Student 1"
And I should not see "Student 2"
@@ -0,0 +1,53 @@
@core @core_badges
Feature: Delete course badge already awarded
As a teacher
I can delete awarded course badge
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario Outline: Delete course badge already awarded to student
Given the following "core_badges > Badges" exist:
| name | course | description | image | status | type |
| <badgename> | C1 | <badgename> description | badges/tests/behat/badge.png | active | 2 |
And the following "core_badges > Criterias" exist:
| badge | role |
| <badgename> | editingteacher |
And the following "core_badges > Issued badges" exist:
| badge | user |
| <badgename> | student1 |
When I am on the "Course 1" "enrolled users" page logged in as "teacher1"
And I click on "Student 1" "link"
Then I should see "<badgename>"
And I am on the "Course 1" course page
# Navigate to Manage Badges page in order to delete the badge
And I navigate to "Badges > Manage badges" in current page administration
# Delete the badge
And I open the action menu in "<badgename>" "table_row"
And I choose "Delete" in the open action menu
And I press "<deleteoption>"
And I am on the "Course 1" "enrolled users" page
And I click on "Student 1" "link"
# Confirm that Badge 1 is retained as awarded badge but Badge 2 is not
And I <visibility> see "<badgename>"
And I am on the "Course 1" course page
# Navigate to Badges page to confirm that no badges exist, hence, Manage badges would not exist
And I navigate to "Badges" in current page administration
# Confirm that badges are sucessfully deleted
And I should see "There are currently no badges available for users to earn."
Examples:
| badgename | deleteoption | visibility |
| Badge 1 | Delete and keep existing issued badges | should |
| Badge 2 | Delete and remove existing issued badges | should not |
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -72,5 +72,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -57,5 +57,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -25,11 +25,16 @@ Feature: Add a comment to the comments block
Scenario: Add a comment with Javascript enabled
When I add "I'm a comment from student1" comment to comments block
Then I should see "I'm a comment from student1"
And I am on the "Course 1" course page logged in as teacher1
And I should see "I'm a comment from student1"
Scenario: Add a comment with Javascript disabled
When I follow "Show comments"
And I add "I'm a comment from student1" comment to comments block
Then I should see "I'm a comment from student1"
And I am on the "Course 1" course page logged in as teacher1
And I follow "Show comments"
And I should see "I'm a comment from student1"
@javascript
Scenario: Test comment block pagination
@@ -1,27 +0,0 @@
@block @block_comments
Feature: Enable Block comments on a course page and view comments
In order to enable the comments block on a course page
As a teacher
I can add the comments block to the course page
Scenario: Add the comments block on the course page and add comments
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| comments | Course | C1 | course-view-* | side-pre |
And I am on the "Course 1" course page logged in as teacher1
And I follow "Show comments"
And I add "I'm a comment from the teacher" comment to comments block
When I am on the "Course 1" course page logged in as student1
And I follow "Show comments"
Then I should see "I'm a comment from the teacher"
+3
View File
@@ -60,5 +60,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -17,117 +17,69 @@ Feature: Enable Block Completion in a course using activity completion
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
| assign | C1 | assign1 | Test assign name | Test page description |
| activity | course | idnumber | name | gradepass | completion | completionview | completionusegrade | completionpassgrade |
| page | C1 | page1 | Test page name | | 2 | 1 | 0 | 0 |
| assign | C1 | assign1 | Test assign name | 50 | 2 | 0 | 1 | 1 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| completionstatus | Course | C1 | course-view-* | side-pre |
Scenario: Add the block to a the course and add course completion items
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test page name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Add requirements | 1 |
| View the activity | 1 |
And I press "Save and return to course"
And I add the "Course completion status" block
Scenario: Completion status block when student has not started any activities
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test page name | 1 |
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
When I am on the "Course 1" course page logged in as student1
Then I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
Scenario: Add the block to a the course and add course completion items
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I follow "Test page name"
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Add requirements | 1 |
| View the activity | 1 |
And I press "Save and return to course"
And I add the "Course completion status" block
Scenario: Completion status block when student has completed a page
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test page name | 1 |
And I press "Save changes"
And I log out
When I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test page name"
When I am on the "Test page name" "page activity" page logged in as student1
And I am on "Course 1" course homepage
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "1 of 1" in the "Activity completion" "table_row"
And I follow "More details"
And I should see "Yes" in the "Activity completion" "table_row"
@javascript
Scenario: Add the block to a the course and add course completion items with passing grade
Given I am on the "Test assign name" "assign activity" page logged in as teacher1
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Add requirements | 1 |
| Receive a grade | 1 |
| Passing grade | 1 |
| gradepass | 50 |
And I press "Save and return to course"
And I am on the "Test assign name" "assign activity" page
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student" "table_row"
And I set the field "Grade out of 100" to "53"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
Scenario: Completion status block with items with passing grade
Given I am on the "Course 1" course page logged in as teacher1
And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test assign name | 1 |
And I press "Save changes"
And I log out
When I am on the "Test assign name" "assign activity" page logged in as student1
And I am on "Course 1" course homepage
Then I should see "Status: Pending" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
And the following "grade grades" exist:
| gradeitem | user | grade |
| Test assign name | student1 | 53 |
When I am on the "Course 1" course page logged in as student1
Then I should see "Status: Complete" in the "Course completion status" "block"
And I should see "1 of 1" in the "Activity completion" "table_row"
And I trigger cron
And I am on "Course 1" course homepage
And I follow "More details"
And I should see "Achieving grade, Achieving passing grade" in the "Activity completion" "table_row"
And I should see "Yes" in the "Activity completion" "table_row"
@javascript
Scenario: Add the block to a the course and add course completion items with failing grade.
Given I am on the "Test assign name" "assign activity" page logged in as teacher1
And I navigate to "Settings" in current page administration
And I set the following fields to these values:
| Add requirements | 1 |
| Receive a grade | 1 |
| Passing grade | 1 |
| gradepass | 50 |
And I press "Save and return to course"
And I am on the "Test assign name" "assign activity" page
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student" "table_row"
And I set the field "Grade out of 100" to "49"
And I set the field "Notify student" to "0"
And I press "Save changes"
And I am on "Course 1" course homepage with editing mode on
And I add the "Course completion status" block
Scenario: Completion status block with items with failing grade
Given I am on the "Course 1" course page logged in as teacher1
And the following "grade grades" exist:
| gradeitem | user | grade |
| Test assign name | student1 | 49 |
And I navigate to "Course completion" in current page administration
And I expand all fieldsets
And I set the following fields to these values:
| Test assign name | 1 |
And I press "Save changes"
And I log out
When I am on the "Test assign name" "assign activity" page logged in as student1
And I am on "Course 1" course homepage
Then I should see "Status: Pending" in the "Course completion status" "block"
When I am on the "Course 1" course page logged in as student1
Then I should see "Status: Not yet started" in the "Course completion status" "block"
And I should see "0 of 1" in the "Activity completion" "table_row"
And I trigger cron
And I am on "Course 1" course homepage
+3
View File
@@ -71,5 +71,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -67,5 +67,8 @@ function xmldb_block_feedback_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -45,5 +45,8 @@ function xmldb_block_html_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -509,7 +509,7 @@ class main implements renderable, templatable {
);
return $this->generate_zero_state_data(
$nocoursesimg,
[$button],
[$button->export_for_template($output)],
['title' => 'zero_request_title', 'intro' => 'zero_request_intro']
);
}
@@ -580,7 +580,7 @@ class main implements renderable, templatable {
* Generate the state zero data.
*
* @param \moodle_url $imageurl The URL to the image to show
* @param \single_button[] $buttons
* @param string[] $buttons Exported {@see \single_button} instances
* @param array $strings Title and intro strings for the zero state if needed.
* @return array Context variables for the template
*/
+3
View File
@@ -84,5 +84,8 @@ function xmldb_block_myoverview_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -30,7 +30,7 @@ $string['aria:allcoursesincludinghidden'] = 'Show all courses';
$string['aria:allcourses'] = 'Show all courses except courses removed from view';
$string['aria:card'] = 'Switch to card view';
$string['aria:controls'] = 'Course overview controls';
$string['aria:courseactions'] = 'Actions for current course';
$string['aria:courseactions'] = 'Actions for course';
$string['aria:coursesummary'] = 'Course summary text:';
$string['aria:courseprogress'] = 'Course progress:';
$string['aria:customfield'] = 'Show {$a} courses';
@@ -26,7 +26,7 @@
"name": "Assignment due 1",
"viewurl": "https://moodlesite/course/view.php?id=2",
"courseimage": "https://moodlesite/pluginfile/123/course/overviewfiles/123.jpg",
"fullname": "course 3",
"fullname": "Course 3 for \"Statistical and Computational Tools\" ",
"hasprogress": true,
"progress": 10,
"coursecategory": "Category 1",
@@ -50,8 +50,11 @@
{{/hasprogress}}
{{/progress}}
{{$coursename}}
<span class="multiline">
{{#shortentext}}50, {{{fullname}}} {{/shortentext}}
<span class="multiline" title="{{fullname}}">
<span class="sr-only">{{{fullname}}}</span>
<span aria-hidden="true">
{{#shortentext}}55, {{{fullname}}} {{/shortentext}}
</span>
</span>
{{/coursename}}
{{$coursecategory}}
+3
View File
@@ -67,5 +67,8 @@ function xmldb_block_navigation_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -59,5 +59,8 @@ function xmldb_block_recent_activity_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -86,7 +86,7 @@ class recentlyaccesseditems_item_exporter extends \core\external\exporter {
'type' => PARAM_INT,
),
'modname' => array(
'type' => PARAM_TEXT,
'type' => PARAM_PLUGIN,
),
'name' => array(
'type' => PARAM_TEXT,
@@ -108,7 +108,7 @@ class recentlyaccesseditems_item_exporter extends \core\external\exporter {
public static function define_other_properties() {
return array(
'viewurl' => array(
'type' => PARAM_TEXT,
'type' => PARAM_RAW,
),
'courseviewurl' => array(
'type' => PARAM_URL,
@@ -117,7 +117,7 @@ class recentlyaccesseditems_item_exporter extends \core\external\exporter {
'type' => PARAM_RAW,
),
'purpose' => array(
'type' => PARAM_TEXT,
'type' => PARAM_ALPHA,
)
);
}
@@ -72,5 +72,8 @@ function xmldb_block_recentlyaccesseditems_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -56,5 +56,8 @@ function xmldb_block_rss_client_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -61,5 +61,8 @@ function xmldb_block_section_links_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -71,5 +71,8 @@ function xmldb_block_selfcompletion_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -67,5 +67,8 @@ function xmldb_block_settings_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -141,5 +141,8 @@ function xmldb_block_tag_youtube_upgrade($oldversion) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -71,5 +71,8 @@ function xmldb_block_timeline_upgrade($oldversion, $block) {
// Automatically generated Moodle v4.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+14 -4
View File
@@ -441,8 +441,17 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i
} while (!feof($handle));
$this->lastiobytes = strlen($data);
if ($this->lastiobytes == 0) {
// Potentially statcache is stale. File can be deleted, let's clear cache and recheck.
clearstatcache(true, $file);
if (!file_exists($file)) {
// It's a completely normal condition. Just ignore and keep going.
return false;
}
}
// Return it unserialised.
return $this->prep_data_after_read($data);
return $this->prep_data_after_read($data, $file);
}
/**
@@ -548,13 +557,14 @@ class cachestore_file extends cache_store implements cache_is_key_aware, cache_i
* Prepares the data it has been read from the cache. Undoing what was done in prep_data_before_save.
*
* @param string $data
* @param string $path
* @return mixed
* @throws coding_exception
*/
protected function prep_data_after_read($data) {
protected function prep_data_after_read($data, $path) {
$result = @unserialize($data);
if ($result === false && $data != serialize(false)) {
throw new coding_exception('Failed to unserialise data from file. Either failed to read, or failed to write.');
debugging('Failed to unserialise data from cache file: ' . $path . '. Data: ' . $data, DEBUG_DEVELOPER);
return false;
}
return $result;
}
+2 -2
View File
@@ -41,7 +41,7 @@
}} data-month="{{previousperiod.mon}}"{{!
}} data-day="{{previousperiod.mday}}"{{!
}}>
<span class="arrow">{{{larrow}}}</span>
<span class="arrow" aria-hidden="true">{{{larrow}}}</span>
&nbsp;
<span class="arrow_text">{{previousperiodname}}</span>
</a>
@@ -58,7 +58,7 @@
}}>
<span class="arrow_text">{{nextperiodname}}</span>
&nbsp;
<span class="arrow">{{{rarrow}}}</span>
<span class="arrow" aria-hidden="true">{{{rarrow}}}</span>
</a>
</div>
</div>
+2 -2
View File
@@ -41,7 +41,7 @@
}} data-month="{{previousperiod.mon}}"{{!
}} data-drop-zone="nav-link" {{!
}}>
<span class="arrow">{{{larrow}}}</span>
<span class="arrow" aria-hidden="true">{{{larrow}}}</span>
&nbsp;
<span class="arrow_text">{{previousperiodname}}</span>
</a>
@@ -63,7 +63,7 @@
}}>
<span class="arrow_text">{{nextperiodname}}</span>
&nbsp;
<span class="arrow">{{{rarrow}}}</span>
<span class="arrow" aria-hidden="true">{{{rarrow}}}</span>
</a>
</div>
</div>
+17 -1
View File
@@ -176,7 +176,23 @@ class behat_calendar extends behat_base {
* @return void
*/
public function i_am_viewing_site_calendar() {
$url = new moodle_url('/calendar/view.php', ['view' => 'month']);
$this->i_am_viewing_calendar_in_view('month');
}
/**
* Navigate to a specific view in the calendar.
*
* @Given /^I am viewing calendar in "([^"]+)" view$/
* @param string $view The calendar view ('month', 'day' and 'upcoming') to navigate to.
* @return void
*/
public function i_am_viewing_calendar_in_view(string $view): void {
if (!in_array($view, ['month', 'day', 'upcoming'])) {
throw new Exception("Invalid calendar view. Allowed values are: 'month', 'day' and 'upcoming'");
}
$url = new moodle_url('/calendar/view.php', ['view' => $view]);
$this->execute('behat_general::i_visit', [$url]);
}
}
+5
View File
@@ -41,6 +41,11 @@ M.core_comment = {
this.courseid = args.courseid;
this.contextid = args.contextid;
this.autostart = (args.autostart);
// Fail fast if the comments element cannot be found, such as in embedded-type views where blocks may be loaded
// then discarded.
if (!Y.one('#comment-ctrl-'+this.client_id)) {
return;
}
// expand comments?
if (this.autostart) {
this.view(args.page);
@@ -191,6 +191,8 @@ class communication_feature implements
public function update_room_membership(array $userids): void {
$this->set_matrix_power_levels();
// Mark the users as synced for the updated members.
$this->processor->mark_users_as_synced($userids);
}
/**
@@ -51,5 +51,8 @@ function xmldb_communication_matrix_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2023071900, 'communication', 'matrix');
}
// Automatically generated Moodle v4.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -29,7 +29,7 @@ $string['matrixhomeserverurl_desc'] = 'The URL of the Synapse homeserver to conn
$string['matrixaccesstoken'] = 'Access token';
$string['matrixaccesstoken_desc'] = 'Access token for the account which will perform actions on the homeserver.';
$string['matrixrefreshtoken'] = 'Refresh token';
$string['matrixrefreshtoken_desc'] = 'Admin refresh token to associated with the access token.';
$string['matrixrefreshtoken_desc'] = 'Admin refresh token to be associated with the access token.';
$string['matrixelementurl'] = 'Element web URL';
$string['matrixroomtopic'] = 'Room topic';
$string['matrixroomtopic_help'] = 'A short description of what this room is for.';
@@ -28,22 +28,21 @@ Feature: Communication matrix form field
And I navigate to "Communication" in current page administration
Then the field "id_communicationroomname" matches value "Sampleroomname"
# Skipping while we update the Mock Server with the new route.
# Scenario: I can add room topic for matrix room
# Given a Matrix mock server is configured
# And I log in as "teacher1"
# And I am on "Test course" course homepage
# When I navigate to "Communication" in current page administration
# And I set the field "id_selectedcommunication" to "Matrix"
# And I wait to be redirected
# And I should see "Room name"
# And I should see "Room topic"
# And I set the field "id_communicationroomname" to "Sampleroomname"
# And I set the field "id_matrixroomtopic" to "Sampleroomtopic"
# And I press "Save changes"
# And I navigate to "Communication" in current page administration
# Then the field "id_communicationroomname" matches value "Sampleroomname"
# And I press "Cancel"
# And I run all adhoc tasks
# And I navigate to "Communication" in current page administration
# And the field "id_matrixroomtopic" matches value "Sampleroomtopic"
Scenario: I can add room topic for matrix room
Given a Matrix mock server is configured
And I log in as "teacher1"
And I am on "Test course" course homepage
When I navigate to "Communication" in current page administration
And I set the field "id_selectedcommunication" to "Matrix"
And I wait to be redirected
And I should see "Room name"
And I should see "Room topic"
And I set the field "id_communicationroomname" to "Sampleroomname"
And I set the field "id_matrixroomtopic" to "Sampleroomtopic"
And I press "Save changes"
And I navigate to "Communication" in current page administration
Then the field "id_communicationroomname" matches value "Sampleroomname"
And I press "Cancel"
And I run all adhoc tasks
And I navigate to "Communication" in current page administration
And the field "id_matrixroomtopic" matches value "Sampleroomtopic"
@@ -24,17 +24,16 @@ Feature: Display communication room status banner
# Not for students to see.
Then I should not see "Your Matrix room will be ready soon." in the "page-content" "region"
# Skipping while we update the Mock Server with the new route.
# Scenario: I can see the room has been created and ready to access
# When I run all adhoc tasks
# And I am on the "Test course" "Course" page logged in as "teacher1"
# Then I should see "Your Matrix room is ready!" in the "page-content" "region"
# # This is a one time message per user.
# When I reload the page
# Then I should not see "Your Matrix room is ready." in the "page-content" "region"
# # Not for students to see.
# When I am on the "Test course" "Course" page logged in as "student1"
# Then I should not see "Your Matrix room is ready." in the "page-content" "region"
Scenario: I can see the room has been created and ready to access
When I run all adhoc tasks
And I am on the "Test course" "Course" page logged in as "teacher1"
Then I should see "Your Matrix room is ready." in the "page-content" "region"
# This is a one time message per user.
When I reload the page
Then I should not see "Your Matrix room is ready." in the "page-content" "region"
# Not for students to see.
When I am on the "Test course" "Course" page logged in as "student1"
Then I should not see "Your Matrix room is ready." in the "page-content" "region"
Scenario: Enabling or disabling the matrix plugin hides the banner accordingly
Given I am on the "Test course" "Course" page logged in as "teacher1"

Some files were not shown because too many files have changed in this diff Show More