Compare commits

..

6446 Commits

Author SHA1 Message Date
Jun Pataleta 8b359ad7a6 Moodle release 4.0 2022-04-17 14:59:54 +08:00
Jun Pataleta 68445c923e NOBUG: Change travis.yml to MOODLE_400_STABLE 2022-04-17 14:59:54 +08:00
Eloy Lafuente (stronk7) f801189795 Moodle release 4.0rc4 2022-04-16 16:31:59 +02:00
Jun Pataleta e25d806abc Merge branch 'MDL-74506-master' of https://github.com/andrewnicols/moodle 2022-04-16 19:14:01 +08:00
Andrew Nicols fb0b57f4ab MDL-74506 block: Correct parentcontextid for blocks in dashboard 2022-04-16 17:49:18 +08:00
Andrew Nicols ed56f9a976 MDL-74506 block: Fix block upgrade to use correct parentcontextid 2022-04-15 20:39:55 +08:00
Ilya Tregubov 4ca5665aa0 Moodle release 4.0rc3 2022-04-15 16:03:34 +06:00
Ilya Tregubov edede57172 Merge branch 'MDL-74407-master' of https://github.com/peterRd/moodle 2022-04-15 07:24:08 +06:00
Sara Arjona d54fa7abd8 Merge branch 'MDL-74447' of https://github.com/Chocolate-lightning/moodle 2022-04-14 12:10:31 +02:00
Ilya Tregubov 5c3563e3a2 Merge branch 'MDL-74064-master' of https://github.com/HuongNV13/moodle 2022-04-14 13:35:11 +06:00
Huong Nguyen 3956dd856b MDL-74064 mod_assign: Behat test for Assignment with time limit 2022-04-14 12:49:55 +07:00
Andrew Nicols e9335eb448 MDL-74447 core: Restrict block drag/drop to container 2022-04-14 17:22:29 +12:00
Peter Dias 40ad488405 MDL-74407 navigation: Perform a strict array_search for node keys
Perform strict array_search due to conflicting results in versions <php8.0
2022-04-14 12:25:15 +08:00
Jun Pataleta 80709ba72d Merge branch 'MDL-74493-master' of https://github.com/snake/moodle 2022-04-14 12:02:10 +08:00
Shamim Rezaie 7252fef24b MDL-74064 mod_assign: Notify submission removal does not reset timelimit 2022-04-14 10:48:45 +07:00
Shamim Rezaie 6ac1477e98 MDL-74064 mod_assign: Use core_user::get_user instead of querying DB 2022-04-14 10:48:37 +07:00
Shamim Rezaie 76c0d3d6bc MDL-74064 mod_assign: Late submission recognition depends on timestarted 2022-04-14 10:48:29 +07:00
Jun Pataleta 821ec66490 Merge branch 'MDL-74498-master' of https://github.com/justusdieckmann/moodle 2022-04-14 10:31:05 +08:00
Jake Dallimore 19a296dfa0 MDL-74493 admin: add check for mbstring extension to prevent errors 2022-04-14 10:13:06 +08:00
Justus Dieckmann bf68b2bc64 MDL-74498 output: Resolve correct icon for modules
Fixes the resolve_image_location function, which previously returned
the 'icon' or 'monologo' icon for modules, no matter the requested
image name.

Also fixes an incorrect pix_icon() call for the context header, which
was hidden by the faulty resolve function.
2022-04-14 01:54:28 +02:00
Sara Arjona 8b7fdc993d Merge branch 'MDL-74486-master' of https://github.com/HuongNV13/moodle 2022-04-13 16:58:52 +02:00
Ilya Tregubov e39a1fff2c Merge branch 'MDL-74471-master' of https://github.com/junpataleta/moodle 2022-04-13 14:59:21 +06:00
Jun Pataleta 0385178826 Merge branch 'MDL-74489' of https://github.com/paulholden/moodle 2022-04-13 16:35:19 +08:00
Jun Pataleta cd3e7bf7eb MDL-74471 versions: main version bump 2022-04-13 10:37:57 +08:00
Jun Pataleta 70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Huong Nguyen 156f4fe6ce MDL-74486 tool_usertours: Prevent step to inherit theme background image 2022-04-13 09:33:13 +07:00
Ilya Tregubov 65224aa30d Merge branch 'MDL-74470' of https://github.com/timhunt/moodle 2022-04-13 08:21:18 +06:00
Paul Holden a3a473d644 MDL-74489 admin: consider salt configuration as sensitive to site.
The admin preset tool shouldn't export badge/calendar salt configuration
unless explicitely asked for as changing these values on another site
can be potentially destructive.
2022-04-12 16:19:40 +01:00
Sara Arjona 5423e5f443 Moodle release 4.0rc2 2022-04-12 13:15:22 +02:00
Sara Arjona 1e728ad31d Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-04-12 13:15:19 +02:00
Andrew Nicols 01b8e81e7d Merge branch 'MDL-74084' of https://github.com/paulholden/moodle 2022-04-12 09:46:48 +08:00
Shamim Rezaie 5e957e5ed1 Merge branch 'MDL-74459' of https://github.com/paulholden/moodle 2022-04-12 11:29:44 +10:00
AMOS bot b98eff24f2 Automatically generated installer lang files 2022-04-12 00:07:39 +00:00
Tim Hunt 2e1a632302 MDL-74470 quiz: put back random Q description on the Question page
This got lost in the 4.0 question bank work.

We are trying to phase out qtype_random, that is where the old
code and lang strings for describing random questions is, so
OK to add back a call to it. When we get better qbank filtering
we can replace this again.

Note, the asserts in the Behat were copied from my 3.11, checkout,
to really verify we are restoring the previous behaviour.
2022-04-11 19:01:00 +01:00
Paul Holden 27adde9b83 MDL-74084 tool_usertours: ensure presense of tour config in response.
If it's not, then don't try to start the tour. This fix is effectively
the same as that previously made in 3bd9e1e8.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2022-04-11 14:15:09 +01:00
Tim Hunt 95b0f86ed3 MDL-74470 quiz: fix typos & small bug from MDL-74255.
I think that, because how PHP works, the MDL-74255 bug (lack
of explode) generally does not break anything, which is why
no tests failed. Still. Good to fix.
2022-04-11 12:21:50 +01:00
Shamim Rezaie b5236ed40f Merge branch 'MDL-74456' of https://github.com/paulholden/moodle 2022-04-11 13:11:17 +10:00
Jake Dallimore 944566fa12 Merge branch 'MDL-74350-master' of https://github.com/HuongNV13/moodle 2022-04-11 10:28:16 +08:00
Jake Dallimore 39be17d918 Merge branch 'MDL-74386-integration-master' of https://github.com/mihailges/moodle 2022-04-11 10:01:00 +08:00
Shamim Rezaie a9a9d8e5c2 Merge branch 'MDL-74463-master' of https://github.com/snake/moodle 2022-04-11 11:55:18 +10:00
Jun Pataleta 217fb9ec66 Merge branch 'MDL-74255' of https://github.com/timhunt/moodle 2022-04-08 20:12:17 +08:00
Tim Hunt 5be2fc1ddc MDL-74255 quiz/question versions: update SQL to work in Oracle 2022-04-08 12:19:53 +01:00
Tim Hunt a43f56836a MDL-74255 quiz: fix redo and regrade question version handling 2022-04-08 12:19:53 +01:00
Tim Hunt 839cccead4 MDL-74255 quiz: handle draft question status correctly
The main issue to fix is that questions vesions which should not have
been used (that is, hidden or draft versions) were getting offered
as an option and acutally being used.

As part of this I was able to substantially un-tangle
mod_quiz\question\bank\qbank_helper, which previously was
a mass of functions calling other functions in a complicated way.
Hopefully, it is now a bit easer to understand, and perhaps
less buggy.
2022-04-08 12:19:53 +01:00
Tim Hunt 5fff990e25 MDL-74255 quiz: clean up lots of stuff mainly in the tests
This fixes lots of stuff like outdated or incomplete PHPdoc comments
or test heler functions where the arguments don't have their types
declared.

A few more significant fixes, like places were a silly method
was used to get a context which was readily available.
2022-04-08 12:19:52 +01:00
Tim Hunt 37e8faf0ed MDL-74255 quiz: Remove un-needed method question_array_sort 2022-04-08 12:19:52 +01:00
Ilya Tregubov f62cd4484e Moodle release 4.0rc1 2022-04-08 16:40:14 +06:00
Ilya Tregubov 50e9313a01 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-04-08 16:40:12 +06:00
Mihail Geshoski 8d0ca00e95 MDL-74386 navigation: Remove redundant set_secondary_navigation() calls
Removes $PAGE->set_secondary_navigation(false) calls which certain pages
were using to prevent displaying secondary navigation menu in the system
context. This logic is now generally handled within the secondary
navigation class.
2022-04-08 15:11:31 +08:00
Mihail Geshoski d08c351701 MDL-74386 contentbank: Set the page context to frontpage
Sets the page context to frontpage when viewing or editing site
contenbank files. This logic was already applied in
contentbank/index.php, so this change will bring consistency in
the contenbanks pages when it comes to setting the page context.
2022-04-08 15:04:58 +08:00
Mihail Geshoski 93aa5ab03e MDL-74386 navigation: Do not load course navigation in system context 2022-04-08 15:02:01 +08:00
Jake Dallimore 75328ec1a8 MDL-74463 enrol_lti: fix location of scopes in registration json 2022-04-08 14:45:30 +08:00
Ilya Tregubov 49eb6ed755 Merge branch 'MDL-74339' of https://github.com/call-learning/moodle 2022-04-08 09:57:41 +06:00
Huong Nguyen d506386d32 MDL-74350 usertours: Prevent adding unnecessary breaktags to the content 2022-04-08 10:56:45 +07:00
Ilya Tregubov bc170bba61 Merge branch 'MDL-73555_master_toolbrickfieldsummaryprocessing' of https://github.com/brickfield/moodle 2022-04-08 09:24:11 +06:00
Andrew Nicols 0098da8239 Merge branch 'MDL-74438-master' of https://github.com/cameron1729/moodle 2022-04-08 11:03:43 +08:00
Shamim Rezaie af77f81522 Merge branch 'MDL-73874-master' of https://github.com/BruceGoodGuy/moodle 2022-04-08 12:38:55 +10:00
Paul Holden 6e85e01d3b MDL-74459 forms: replace import of jqueryui with native code.
We used the import for ensuring collapsible section elements
contained an ID attribute (efbe1530). This conflicted with use
of Bootstrap tooltips.
2022-04-07 22:38:46 +01:00
Sara Arjona d32bb45e43 Merge branch 'MDL-74398' of https://github.com/call-learning/moodle 2022-04-07 22:45:05 +02:00
Víctor Déniz 384f6712bb Merge branch 'MDL-74419-master' of https://github.com/sarjona/moodle 2022-04-07 20:20:54 +01:00
Laurent David 978bdb5b4d MDL-74398 mod_bigbluebuttonbn: Fix issue with Visible groups
* In visible group user should see all recordings. This fixes an issue while integrating
MDL-74052 with this issue.
2022-04-07 19:25:50 +02:00
Sara Arjona 2ce8437d8e Merge branch 'MDL-74297-master' of https://github.com/peterRd/moodle 2022-04-07 17:32:56 +02:00
Eloy Lafuente (stronk7) bdf12da661 Merge branch 'MDL-74434-master' of https://github.com/mihailges/moodle 2022-04-07 17:12:08 +02:00
Jun Pataleta ac3e77b1b1 Merge branch 'MDL-74271-master-squashed' of https://github.com/andrewnicols/moodle 2022-04-07 20:52:10 +08:00
Jun Pataleta d848bc7ece Merge branch 'MDL-74329' of https://github.com/odeialba/moodle 2022-04-07 20:14:14 +08:00
Paul Holden 509bdf4bc5 MDL-74456 reportbuilder: format report/schedule names in actions.
Ensure audience names are also formatted in scheduling form.
2022-04-07 13:10:24 +01:00
Laurent David 8d3f6e7133 MDL-74339 mod_bigbluebuttonbn: Fix upgrade recording from 2.4
* Only delete "Create" or "Update" logs when a recording has been effectively created
* Reschedule task if fail or logs are left over
* One task per meetingid
2022-04-07 13:02:12 +02:00
Odei Alba 9446af726d MDL-74329 mod_quiz: scroll to top and to question container
When reviewing the answers:
1- When there are all the questions in one page and you click in the first question,
it will scroll to the first question.
2- When there is one question per page and you click in the question number,
it will go to that question page and scroll to the top.
If you click again the question number, it will scroll to the question container.
2022-04-07 12:49:42 +02:00
Khoa Nguyen Dang c0e53d297f MDL-73874 Questions: Add new validation for Drag and drop into text 2022-04-07 17:27:23 +07:00
Ilya Tregubov fa1d1ea378 Merge branch 'MDL-74235-patch' of https://github.com/ilyatregubov/moodle 2022-04-07 13:53:44 +06:00
Andrew Nicols 9dc2ee548d MDL-74235 mod_lti: Update use of logo to monologo 2022-04-07 13:43:55 +06:00
Andrew Nicols 3291ee416c Merge branch 'MDL-74202' of https://github.com/paulholden/moodle 2022-04-07 15:28:57 +08:00
Andrew Nicols f40abbdf1d MDL-74235 core: Revert theme changes
These changes were accidentally included from a previous iteration of
the patch.
2022-04-07 13:27:27 +06:00
Andrew Nicols e4aa381679 MDL-74235 mod: Update mod icon to use monologo 2022-04-07 13:27:18 +06:00
Andrew Nicols f57461cfb7 Merge branch 'MDL-74398' of https://github.com/call-learning/moodle 2022-04-07 15:25:36 +08:00
Sara Arjona 08c4173fc9 Merge branch 'MDL-58044_master' of https://github.com/Chocolate-lightning/moodle 2022-04-07 09:15:08 +02:00
Laurent David d8f3c831c9 MDL-74398 mod_bigbluebuttonbn: Remove (All participants) meeting title
* When course groups are disable the meeting title should not display (All participants)
2022-04-07 08:15:12 +02:00
Shamim Rezaie 43e37471f1 MDL-74404 mod_bigbluebuttonbn: Delete the unnecessary $datagenerator var 2022-04-07 16:13:11 +10:00
Shamim Rezaie db75461893 Merge branch 'MDL-74404' of https://github.com/call-learning/moodle 2022-04-07 16:09:34 +10:00
Ilya Tregubov 29da0c7f2a Merge branch 'MDL-74235-master-2' of https://github.com/andrewnicols/moodle 2022-04-07 12:06:38 +06:00
Mihail Geshoski 32754bdf2a MDL-74434 block_tag_youtube: Update instances only if category is set
Modifies the existing upgrade step to only take into consideration
block instances that have a specific category set prior to determening
if a legacy category is being used and updating them. Instances that do
not have any category set should be ignored.
2022-04-07 13:24:08 +08:00
Jake Dallimore 73107117db Merge branch 'MDL-74341' of https://github.com/paulholden/moodle 2022-04-07 13:06:49 +08:00
Andrew Nicols 4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Andrew Nicols eb0a95956f MDL-74235 mod: Rename activity icons to new monologo naming 2022-04-07 12:56:14 +08:00
Andrew Nicols ffc227c9d5 MDL-74235 output: Fall back to icon and support monologo 2022-04-07 12:56:13 +08:00
Andrew Nicols 748608b318 Merge branch 'MDL-74331' of https://github.com/timhunt/moodle 2022-04-07 11:47:30 +08:00
Andrew Nicols 9de93892b7 Merge branch 'MDL-74421-master' of https://github.com/sammarshallou/moodle 2022-04-07 11:43:58 +08:00
Peter Dias d693e93969 MDL-74297 core: Scroll and sticky heading/footer updates 2022-04-07 08:34:37 +08:00
AMOS bot 58fb8c7c5c Automatically generated installer lang files 2022-04-07 00:07:35 +00:00
Víctor Déniz 21aa01c0bc Merge branch 'MDL-74189-master' of https://github.com/mihailges/moodle 2022-04-06 22:55:44 +01:00
Jun Pataleta 55fb55f7dc Merge branch 'MDL-74332-master' of https://github.com/sharidas/moodle 2022-04-07 00:35:20 +08:00
Sara Arjona aa96ef42ca Merge branch 'MDL-74052' of https://github.com/call-learning/moodle 2022-04-06 17:47:11 +02:00
Andrew Nicols 00efa6aecf MDL-74271 context: Improve performance of block context creation 2022-04-06 23:40:15 +08:00
Andrew Nicols 14dca23e1f MDL-74271 core: Replace upgrade steps for blocks to be more performant
The previous upgrade step was both duplicating a lot of code, and also
very non-performant as each record was fetched from the DB into PHP and
updated there.

Most of the operations can be performed straight into the database
without requiring any fetch to PHP at all.

This change includes unit tests for the new upgrade steps to ensure that
only the relevant data is created, updated, or deleted.
2022-04-06 23:40:15 +08:00
Mihail Geshoski 2ca9f4354e MDL-74189 tool_moodlenet: Add upgrade step to remove irrelevant data
Upgrade step to identify all existing cases where users have linked
their MoodleNet profile on the site and remove the related data from
the database. Due to some recent changes on the MoodleNet platform,
this data is now irrelevant and can no longer be used to authenticate
on the MoodleNet platform.
2022-04-06 23:30:11 +08:00
Sara Arjona f2d666e8c6 Merge branch 'MDL-74325' of https://github.com/ssj365/moodle 2022-04-06 16:29:11 +02:00
Mihail Geshoski c3b14552f9 MDL-74189 tool_moodlenet: Update language strings
Updates the existing language strings in order to provide more accurate
instructions on how users can link existing their MoodleNet profile on
the site.
2022-04-06 22:24:20 +08:00
Sara Arjona 2496a8910c Merge branch 'MDL-74412-master' of https://github.com/lucaboesch/moodle 2022-04-06 15:59:55 +02:00
Tim Hunt 4144d09b4d MDL-74331 question bank: prevent any one column getting too wide 2022-04-06 14:56:24 +01:00
Sara Arjona b04f010a95 Merge branch 'wip_MDL-59545_master' of https://github.com/gjb2048/moodle 2022-04-06 12:42:07 +02:00
Ilya Tregubov 5975e3d203 Merge branch 'MDL-74348-master' of https://github.com/bmbrands/moodle 2022-04-06 16:23:37 +06:00
Ilya Tregubov e2a8a3cbf9 Merge branch 'MDL-74381-master' of https://github.com/aanabit/moodle 2022-04-06 15:37:42 +06:00
Sara Arjona f2ff93b3bc MDL-74419 search_simpledb: Search with quotes not working on Oracle
Global search with quotes is not working on DB engines without
full-text search support (i.e. Oracle).
2022-04-06 11:32:50 +02:00
Amaia Anabitarte 915b90b1ad MDL-74381 tool_componentlibrary: Resize icons to 24px in component library 2022-04-06 11:28:13 +02:00
Amaia Anabitarte 8d8b8d9066 MDL-74381 core_themes: Resizing svg mod icons to 24px 2022-04-06 11:19:10 +02:00
Cameron Ball 8937de6f40 MDL-74438 cache: Check if cached value is boolean false 2022-04-06 17:14:52 +08:00
Shamim Rezaie 7bc978482a Merge branch 'MDL-74420-master' of https://github.com/aanabit/moodle 2022-04-06 18:40:00 +10:00
Shamim Rezaie c62042d528 Merge branch 'MDL-74208-master-1' of https://github.com/mihailges/moodle 2022-04-06 15:57:16 +10:00
Ilya Tregubov e20d28bffb Merge branch 'MDL-74363' of https://github.com/Chocolate-lightning/moodle 2022-04-06 11:08:24 +06:00
Jake Dallimore 1f16a2cd69 Merge branch 'MDL-74371-master' of https://github.com/sharidas/moodle 2022-04-06 12:25:55 +08:00
Jake Dallimore 5d7a2019dd Merge branch 'MDL-74424-master' of https://github.com/mihailges/moodle 2022-04-06 12:15:32 +08:00
Sujith Haridasan cc24705880 MDL-74371 mod_survey: Indent the file as per coding style
Indent the file as per the coding style.
Adjust the comments so that they start with Caps and have a full
stop at the end.
Added file-level phpdoc.
2022-04-06 09:37:02 +05:30
Sujith Haridasan 33923a7969 MDL-74371 mod_survey: Wordrap long questions in response reports
Word wrap long questions in Response reports so that the users dont
see broken questions in the questions page.
2022-04-06 09:37:02 +05:30
AMOS bot ba08fa7361 Automatically generated installer lang files 2022-04-06 00:07:37 +00:00
Mihail Geshoski 540a9e35f2 MDL-74424 repository_googledocs: Update phpunit tests 2022-04-06 01:42:09 +08:00
Mihail Geshoski 63be4ed49f MDL-74424 repository_googledocs: Respect default import formats
Makes sure that the correct file extension is attributed when importing
a file using the Google Drive repository based on the set configuration
values for the default import format settings.
2022-04-06 01:23:51 +08:00
Eloy Lafuente (stronk7) 70e29b77f0 Merge branch 'MDL-74330-master-enfix' of https://github.com/vmdef/moodle 2022-04-05 18:39:23 +02:00
Luca Bösch ac2e962f61 MDL-74412 question: Not every column needs pr-3 in question bank. 2022-04-05 16:16:23 +02:00
Sara Arjona ad6dc71c56 on-demand release 4.0beta+ 2022-04-05 13:25:54 +02:00
Sara Arjona 97310ea55e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-04-05 13:25:51 +02:00
Bas Brands ea5638c354 MDL-74348 tool_lp: fix dialogue height and add scroll 2022-04-05 11:08:14 +02:00
Mathew May 96304ae607 MDL-74363 navigation: Add breadcrumbs in course use sub pages 2022-04-05 19:50:50 +12:00
Jun Pataleta f949a28d1d Merge branch 'MDL-74302-master' of https://github.com/rezaies/moodle 2022-04-05 12:05:55 +08:00
Shamim Rezaie 96644c0514 Merge branch 'MDL-74285-master' of https://github.com/sammarshallou/moodle 2022-04-05 14:00:38 +10:00
Jake Dallimore bd331da961 Merge branch 'MDL-74362-master' of https://github.com/sharidas/moodle 2022-04-05 11:50:25 +08:00
Sujith Haridasan 245610fc8f MDL-74362 admin: Add header text to the notifications page 2022-04-05 07:27:30 +05:30
Víctor Déniz bcb7b5b838 Merge branch 'MDL-74113-master' of https://github.com/HuongNV13/moodle 2022-04-04 19:20:44 +01:00
Sara Arjona fea804b5dc Merge branch 'MDL-74383-master' of https://github.com/mihailges/moodle 2022-04-04 15:46:19 +02:00
Sara Arjona 4388caf0af Merge branch 'MDL-74222' of https://github.com/paulholden/moodle 2022-04-04 15:22:26 +02:00
sam marshall 8c926d5cca MDL-74421 core_admin: Task log classname filter should be clearer
Change filter title from 'Name' to 'Class name' to indicate that
it only filters the classname, not the display name of the task.
2022-04-04 14:18:51 +01:00
Sara Arjona e9883614ab Merge branch 'MDL-74078-master' of https://github.com/mickhawkins/moodle 2022-04-04 15:09:34 +02:00
Amaia Anabitarte 23b751d131 MDL-74420 core_tags: Remove secondary navigation from tags page 2022-04-04 14:24:42 +02:00
Shamim Rezaie abbb55eadf MDL-74302 mod_quiz: Users with preview cap should see prevent messages 2022-04-04 19:03:20 +10:00
Shamim Rezaie 2b5be06b68 MDL-74302 mod_quiz: use notification renderable to display quiz notices 2022-04-04 19:03:20 +10:00
Shamim Rezaie 3a25a52375 MDL-74302 mod_quiz: preview cap has higher priority than the attempt cap 2022-04-04 19:03:20 +10:00
Jake Dallimore bd58b70e66 Merge branch 'MDL-74276-master-linkfarm' of https://github.com/peterRd/moodle 2022-04-04 15:59:19 +08:00
Jun Pataleta 9d5020ad10 Merge branch 'MDL-74303-master' of https://github.com/snake/moodle 2022-04-04 15:51:57 +08:00
Mihail Geshoski d5a48c941e MDL-74208 navigation: Avoid showing empty menu in single activity course
The following change prevents showing the 'Course' item (dropdown) in
the secondary navigation if this dropdown does not contain any items
when using the single activity course format.
2022-04-04 15:46:18 +08:00
Jake Dallimore 0dcb53ec19 MDL-74303 lib: pull upstream lib/lti1p3 changes to support JWKS parsing
This pulls in the latest changes from the moodle-fixes branch of
snake/lti-1-3-php-library. This specific change is required so JWKS
key parsing works when launching from platforms which omit the 'alg'
property in their JWKs.
2022-04-04 14:43:22 +08:00
Michael Hawkins a640f43181 MDL-74078 core_my: Lock all blocks on the my courses page 2022-04-04 14:24:56 +08:00
Sujith Haridasan 6edb78c86b MDL-74332 mod_survey: Indent the file properly
Correct the indentation of the file.
Replaced print_error with moodle_exception.
Updated the comments to start with capital and end with fullstop.
2022-04-04 11:29:15 +05:30
Jun Pataleta 8db56aeb31 Merge branch 'MDL-70014' of https://github.com/stronk7/moodle 2022-04-04 13:56:40 +08:00
Jun Pataleta 37f37a42d4 Merge branch 'MDL-74096-master' of https://github.com/ilyatregubov/moodle 2022-04-04 13:06:06 +08:00
Ilya Tregubov b470097bdb Merge branch 'MDL-74026' of https://github.com/paulholden/moodle 2022-04-04 10:47:10 +06:00
Ilya Tregubov 39ff636316 Merge branch 'master_MDL-74361-course-restore' of https://github.com/catalyst/moodle-MDL-70329 2022-04-04 10:28:32 +06:00
Sujith Haridasan bfb4c2797a MDL-74332 mod_survey: Critical incidents dont require summary and scales
Do not show summary and scales for the survey with critical
incidents. So critical incidents survey would have questions
and participants only under response reports.
Also corrected the heading for the Questions page.
2022-04-04 09:56:15 +05:30
Mihail Geshoski c1ab472180 MDL-74383 assignfeedback_editpdf: Fix comment issues in the pdf editor 2022-04-04 10:55:46 +08:00
Mihail Geshoski 2202c71a76 MDL-74383 assignfeedback_editpdf: 'Annotated PDF' link style update 2022-04-04 10:55:46 +08:00
AMOS bot fda33f6838 Automatically generated installer lang files 2022-04-04 00:07:31 +00:00
Gareth Barnard 8af8eeef69 MDL-59545 navigation: Missing editing icons on activity pages 2022-04-03 21:54:51 +01:00
Safat Shahin 294c77d8f7 MDL-74361 quiz: pre4.0 course restore bug fix for random question tags 2022-04-03 23:20:44 +10:00
Eloy Lafuente (stronk7) fa47604c20 MDL-70014 tool_customlang: Workaround to make behat happier
This is a BEHAT_RUNNING only hack, so it doesn't affect normal
operations at all. What it achieves is to reduce the number of
strings loaded when customising a lang pack from current 31K ones
to the just needed ones for Behat testing purposes.

That way we avoid the random failures that are happening more and
more (while the "en" lang pack grows) and also save some precious
minutes in every behat run.

Also, unrelated, a couple of tiny changes:
- Modified constant (that was really outdated) to current number
  of lang strings (so the progress bar behaves better).
- Remove an elseif occurrence because it was hurting my eyes.
2022-04-01 23:56:58 +02:00
Shamiso.Jaravaza 4483261625 MDL-74325 mod_bigbluebuttonbn: Fix presentation setting 2022-04-01 17:12:49 -02:30
Laurent David 8ab0990345 MDL-74404 mod_bigbluebuttonbn: Delete logs when course reset
* When Delete custom logs is selected we should delete all logs in
bigbluebuttonbn_logs table related to this course (join, add events...)
2022-04-01 20:07:08 +02:00
Paul Holden 4150685592 MDL-74222 course: add aria-controls attribute to expand/collapse all. 2022-04-01 18:44:24 +01:00
Paul Holden efbe15306a MDL-74222 forms: add aria-controls attribute to expand/collapse all. 2022-04-01 18:44:24 +01:00
Paul Holden b7417f2adf MDL-74026 admin: consistently show search element on admin pages. 2022-04-01 18:41:16 +01:00
Paul Holden c00a97c527 MDL-74341 reportbuilder: re-factor audience form permission checks. 2022-04-01 18:13:19 +01:00
sam marshall 896d0c225a MDL-74285 cachestore_redis: Unable to delete a Redis cache instance
When deleting a cache instance, it tried to purge it, even though
purge only makes sense for an individual definition (not the whole
instance). As a result, it errored.
2022-04-01 17:40:41 +01:00
Sara Arjona ec19f9f8cd Merge branch 'MDL-74298-master' of https://github.com/peterRd/moodle 2022-04-01 17:38:26 +02:00
Sara Arjona e2d435ca93 Merge branch 'MDL-74286-master' of https://github.com/ferranrecio/moodle 2022-04-01 17:34:30 +02:00
Sara Arjona b5f51883f0 on-demand release 4.0beta+ 2022-04-01 16:41:07 +02:00
Sara Arjona 2a50ee4464 NOBUG: Fixed SVG browser compatibility 2022-04-01 16:41:04 +02:00
Sara Arjona c9c372567f Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-04-01 16:41:03 +02:00
Víctor Déniz a51d24c8a8 MDL-74330 lang: Replace modified strings in tests 2022-04-01 13:17:18 +01:00
Helen Foster 3719878cbf MDL-74330 lang: Import fixed English strings (en_fix) 2022-04-01 13:17:08 +01:00
Sara Arjona 7f6439674e Merge branch 'MDL-74221-master-form-buttons-revert' of https://github.com/snake/moodle 2022-04-01 12:31:58 +02:00
Ilya Tregubov 1d4c22a64a MDL-74096 mlbackend_python: Update mlbackend version. 2022-04-01 16:27:01 +06:00
Laurent David 96050a58ec MDL-74052 mod_bigbluebuttonbn: Wait for moderator not working with app
* On the server the poll was not started when we load the page
resulting in the status not being updated on moodle / browser side.
2022-04-01 11:43:43 +02:00
Jake Dallimore 706d7885b4 MDL-74221 enrol_lti: revert order change for action buttons 2022-04-01 17:33:54 +08:00
Jun Pataleta 20f8914f1e Merge branch 'MDL-74390' of https://github.com/timhunt/moodle 2022-04-01 17:00:21 +08:00
Michael Hawkins a0c6b4a174 MDL-74078 core: Add the ability to lock all blocks on a page 2022-04-01 15:12:56 +08:00
Bas Brands 1ed689080a MDL-74078 theme: Add missing block regions to mycourses 2022-04-01 15:12:56 +08:00
Peter Dias 2c27a33213 MDL-74276 report: Update behat tests to account for new page. 2022-04-01 12:44:04 +08:00
Peter Dias 6b25d957bf MDL-74298 core: Render complete links when searching for a setting. 2022-04-01 11:22:05 +08:00
Huong Nguyen 2fa497df65 MDL-74113 atto_media: Listen to play/pause events 2022-04-01 10:03:17 +07:00
Andrew Nicols 6d586191aa Merge branch 'MDL-69552-master' of https://github.com/HuongNV13/moodle 2022-04-01 10:57:33 +08:00
Andrew Nicols 54edee7468 Merge branch 'MDL-70731-master' of https://github.com/junpataleta/moodle 2022-04-01 10:19:56 +08:00
Jun Pataleta fc1f7014c1 Merge branch 'MDL-74221-master' of https://github.com/andrewnicols/moodle 2022-04-01 10:13:46 +08:00
Andrew Nicols 11d63a54a6 Merge branch 'MDL-74313-master' of https://github.com/peterRd/moodle 2022-04-01 10:13:46 +08:00
Andrew Nicols 46bdfc9b93 Merge branch 'MDL-72446' of https://github.com/stronk7/moodle 2022-04-01 10:13:46 +08:00
Andrew Nicols 80ec9a1c92 Merge branch 'MDL-74367-master' of https://github.com/vmdef/moodle 2022-04-01 10:13:44 +08:00
Jun Pataleta a3958a297e Merge branch 'MDL-74221-master' of https://github.com/andrewnicols/moodle 2022-04-01 10:12:58 +08:00
Eloy Lafuente (stronk7) b83e35d0ee Merge branch 'MDL-74221-master-fix' of https://github.com/snake/moodle 2022-04-01 10:12:58 +08:00
Ilya Tregubov d8208e6366 Merge branch 'MDL-73948-master-v4' of https://github.com/golenkovm/moodle 2022-04-01 10:12:58 +08:00
Jake Dallimore f739a10700 MDL-74221 enrol_lti: fix upgrade code to set correct status default 2022-04-01 10:12:57 +08:00
Ilya Tregubov 6dee96e420 Merge branch 'MDL-73197' of https://github.com/call-learning/moodle 2022-04-01 10:12:57 +08:00
Ilya Tregubov 14dcfbaf75 Merge branch 'MDL-74353' of https://github.com/paulholden/moodle 2022-04-01 10:12:56 +08:00
Andrew Nicols 3ba580e3f2 Merge branch 'MDL-74221-master' of https://github.com/snake/moodle 2022-04-01 10:12:56 +08:00
Jun Pataleta e4eb3b489f Merge branch 'MDL-74324-master' of https://github.com/ferranrecio/moodle 2022-04-01 10:12:56 +08:00
Jun Pataleta b5b9067828 Merge branch 'MDL-74294-master' of https://github.com/sarjona/moodle 2022-04-01 10:12:56 +08:00
Andrew Nicols b2ea2f87d8 Merge branch 'MDL-73900-master-fix' of https://github.com/junpataleta/moodle 2022-04-01 10:12:56 +08:00
Peter Dias 3eb80e7386 MDL-74276 report: Render a new 'Reports Overview' page 2022-04-01 08:56:00 +08:00
Tim Hunt 409b94cf09 MDL-74390 filter admin: log filter order changes in config_log 2022-03-31 16:49:03 +01:00
Andrew Nicols fa6920327e MDL-74221 enrol_lti: Update tests to match new icon and strings 2022-03-31 23:29:02 +08:00
Jun Pataleta 1c9448bfff MDL-70731 mod_forum: Fix moodle_exception error messages 2022-03-31 22:49:35 +08:00
Tim Hunt fbbd3d585e MDL-74390 filter admin: modernise coding style in admin/filters.php 2022-03-31 15:48:54 +01:00
Andrew Nicols 73ffa2e067 MDL-74221 enrol_lti: Fix misuse of moodle_url constructor 2022-03-31 21:37:51 +08:00
Eloy Lafuente (stronk7) c21a82df58 MDL-72446 behat: Ensure that the day reset happens on enabled element
Before this change we were setting the month day to 1 unconditionally
and that was working ok for enabled by default elements.

But in a number or cases we were doing that against disabled elements
so the day reset was not happening. Now we wait for the element to
be enabled and only then proceed with the day reset.

Backed with tests using disabled form elements, so we have now
both enabled and disabled fields covered.
2022-03-31 11:29:22 +02:00
Mikhail Golenkov e7f8064679 MDL-73948 report_loglive: Fix missing records 2022-03-31 18:34:53 +11:00
Huong Nguyen b307f3df02 MDL-69552 Quiz: Fix tag filter does not work when adding random question 2022-03-31 11:55:21 +07:00
Jake Dallimore 662c659324 MDL-74221 enrol_lti: change registration workflow to support drafts
This changes the admin pages such that to see the endpoints required
by the platform, an admin user must first create a draft registration.
This allows the registration uniqueid to be generated and included in
the initiate login and dynamic registration URLs.
2022-03-31 12:15:46 +08:00
Jun Pataleta cd1cec7529 MDL-73900 block_recentlyaccesseditems: Behat fix for "Show more items" 2022-03-31 10:08:17 +08:00
Andrew Nicols 465a300e47 Merge branch 'MDL-74370' of https://github.com/paulholden/moodle 2022-03-31 09:30:28 +08:00
AMOS bot 50f5cf64cf Automatically generated installer lang files 2022-03-31 00:07:35 +00:00
Paul Holden e5434fac25 MDL-74353 reportbuilder: improvements to report sidebar searching.
* Filter on item textContent instead of dataset, which isn't always
  present;
* Fix hiding of cards when they have no matching items
2022-03-30 21:17:45 +01:00
Paul Holden 7ca314023a MDL-74370 reportbuilder: fix permission check to edit own reports. 2022-03-30 16:26:33 +01:00
Sara Arjona 920946808d MDL-74294 theme: Update boost and classic screenshots
This patch updates the screenshots for boost and classic
themes, displayed in the theme selector.
These images have been created by Mary Cooch.

Co-authored by: Mary Cooch <mary@moodle.com>
2022-03-30 16:59:49 +02:00
Jun Pataleta 23b625340e Merge branch 'MDL-74295' of https://github.com/timhunt/moodle 2022-03-30 19:48:26 +08:00
Laurent David 52fdeaf112 MDL-73197 mod_bigbluebuttonbn: Fix activity join message
* When schedule is assigned to an activity, the Room still shows as ready to be joined, even if the room is still not open.
2022-03-30 13:41:34 +02:00
Ferran Recio 4d5395d27b MDL-74324 contentbank: fix RTL dropdown menu 2022-03-30 12:40:00 +02:00
Víctor Déniz c32c3e89ef MDL-74367 recentlyaccesseditems: full name in item card tooltip 2022-03-30 11:28:21 +01:00
Ilya Tregubov 67ac38811e Merge branch 'MDL-74245-master' of https://github.com/bmbrands/moodle 2022-03-30 15:10:24 +06:00
Víctor Déniz c6c99abe7a Merge branch 'MDL-74205-master' of https://github.com/ilyatregubov/moodle 2022-03-30 09:51:50 +01:00
Jun Pataleta a4d0770b87 Merge branch 'MDL-71801-master' of https://github.com/snake/moodle 2022-03-30 16:14:11 +08:00
Ilya Tregubov 337f727d39 Merge branch 'MDL-74342' of https://github.com/paulholden/moodle 2022-03-30 12:31:23 +06:00
Jun Pataleta 3ec0b7848d Merge branch 'MDL-74231' of https://github.com/stronk7/moodle 2022-03-30 14:28:28 +08:00
Jake Dallimore 6b071a03db Merge branch 'MDL-73105' of https://github.com/paulholden/moodle 2022-03-30 13:54:11 +08:00
Ilya Tregubov 053785ff5f MDL-74205 navigation: Don't show participants link to user if he has no permission. 2022-03-30 10:42:11 +06:00
Jun Pataleta bf13032bf7 Merge branch 'MDL-73900-master' of https://github.com/vmdef/moodle 2022-03-30 11:08:05 +08:00
Peter Dias 62c086ee72 MDL-74313 badge: Disable secondary navigation in badges 2022-03-30 09:17:53 +08:00
Eloy Lafuente (stronk7) 4e2b4a138d MDL-74231 grader report: Fix case where old settings are empty / null
There is an edge case in the conversion from old collapse/expand
settings (stored as user preference) to the new ones that can lead
to notices / warnings / errors.

Before PHP 8, they weren't being detected, but now they are.

Basically, if some of the expected components of the preferences
are missing, then some array (array_diff(), array_intersect()..)
operations now are failing, because now those parameter functions
do require to be arrays (so empty strings or nulls aren't allowed).

Also, there were some cases where the old preference was not being
removed ever, so its removal has been moved to a common place at
the end of the function, where it's always evaluated in case
the preference still exists but is empty of contents.

I've tried to cover all the cases I've been able to imagine with
unit tests (empty information, some component not set, all components
not set...), have moved it to a new unit test because the one
already performing some tests with those old preferences was
already too long to add more cases.
2022-03-29 23:46:45 +02:00
Eloy Lafuente (stronk7) 7ce003b666 on-demand release 4.0beta+ 2022-03-29 17:54:11 +02:00
Eloy Lafuente (stronk7) 37026d69bd Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-03-29 17:54:07 +02:00
Paul Holden 949212ffda MDL-73105 qbank_managecategories: correct category edit URL. 2022-03-29 16:52:26 +01:00
Víctor Déniz e5d207a518 MDL-73900 recentlyaccesseditems: vertical display in blocks drawer 2022-03-29 11:50:17 +01:00
Paul Holden dcda9c08e2 MDL-74342 reportbuilder: remove unnecessary template/dataset values. 2022-03-29 09:46:55 +01:00
Jake Dallimore a1e763e670 MDL-71801 mod_lti: set default keytype value when upgrading tool types
MDL-66920 added this field but didn't set defaults for upgrading tool
types. This patch fixes that for any 1.3 tools which don't yet have a
value for this field.
2022-03-29 14:10:55 +08:00
Jun Pataleta 32f44c3534 Merge branch 'MDL-74291-master' of https://github.com/andrewnicols/moodle 2022-03-29 11:57:06 +08:00
Jun Pataleta a646e7999e Merge branch 'MDL-74243-master' of https://github.com/dravek/moodle 2022-03-29 11:33:28 +08:00
Andrew Nicols d3ba4dfb2b Merge branch 'MDL-74117-master' of https://github.com/rezaies/moodle 2022-03-29 11:24:48 +08:00
Jun Pataleta 4aad8fe6a4 Merge branch 'MDL-74110' of https://github.com/paulholden/moodle 2022-03-29 10:51:30 +08:00
Víctor Déniz ec0e5ee734 Merge branch 'MDL-74321-master' of https://github.com/junpataleta/moodle 2022-03-28 22:37:32 +01:00
Paul Holden a896ea6473 MDL-74342 reportbuilder: allow audiences to be immediately renamed.
Return rendered editable component in response to form submission
so that the audience card can be updated straight away.
2022-03-28 22:28:03 +01:00
Víctor Déniz 07d4b60341 Merge branch 'MDL-74300-master' of https://github.com/sharidas/moodle 2022-03-28 22:23:37 +01:00
Jun Pataleta a1e2933590 Merge branch 'MDL-74279' of https://github.com/stronk7/moodle 2022-03-28 23:28:54 +08:00
Jun Pataleta 328bba2743 Merge branch 'MDL-74266-master' of https://github.com/mihailges/moodle 2022-03-28 22:27:41 +08:00
Tim Hunt d3ef035706 MDL-74295 question bank: add help icons to columns that need it 2022-03-28 09:33:02 +01:00
Andrew Nicols d5e0a57333 Merge branch 'MDL-74299-master' of https://github.com/ericmerrill/moodle 2022-03-28 15:52:25 +08:00
Shamim Rezaie 8248badec7 MDL-74117 theme_boost: Remove handling of Space and Enter in dropdowns
The custom handling of Space and Enter for dropdowns that was added to
aria.js were not needed in the latests Bootstrap versions. So removed
them. Vanilla Bootstrap emulates click when Space or Enter keys are
pressed on a tab.
2022-03-28 18:19:47 +11:00
Shamim Rezaie ad19422833 MDL-74117 theme_boost: Only focus the trigger if nothing else is focused 2022-03-28 18:19:47 +11:00
Jun Pataleta 53fc54cce5 Merge branch 'MDL-74257-master' of https://github.com/ferranrecio/moodle 2022-03-28 14:45:14 +08:00
Jun Pataleta 1a6bf2e5ff MDL-74321 mod_forum: Add forum_check_throttling unit tests 2022-03-28 14:39:21 +08:00
Andrew Nicols 4bb0feb176 MDL-73952 course: Revert iscurrent => highlighted rename 2022-03-28 14:37:55 +08:00
Ilya Tregubov 305a25ae53 Merge branch 'MDL-59681-recursive-file' of https://github.com/brendanheywood/moodle 2022-03-28 11:53:50 +06:00
Sujith Haridasan f2c7f35f78 MDL-74300 core_grades: Fix errors in bulk to gradebook
This change prevents the printing of header when the
moodles page's state is STATE_IN_BODY. Due to the absence
of this check when user entered graded in bulk was causing
errors.
2022-03-28 11:12:40 +05:30
Andrew Nicols 495da02824 MDL-73952 core_course: Rename iscurrent to highlighted
The term 'iscurrent' suggests that something is current, when this may
not be technically true. The term highlight is more appropriate as we
are highlighting content. Whether that content is for the current week
may also be true, but it may be that some course formats allow multiple
sections to be highlighted.
2022-03-28 13:15:12 +08:00
Andrew Nicols a313795354 Merge branch 'MDL-73952-master' of https://github.com/bmbrands/moodle 2022-03-28 13:09:55 +08:00
Jun Pataleta 86f97c625e MDL-74321 mod_forum: Forum_check_throttling improvements and fixes
* Fetch only the fields required by the function.
* Quick validation of the passed forum parameter. If the forum parameter
is an object, it should have the forum ID and the course ID.
* Default return when there's no need to show a warning yet.
2022-03-28 13:08:47 +08:00
Jun Pataleta 0a77eb4ace MDL-74321 mod_forum: Pass course module to forum_check_throttling() 2022-03-28 10:04:05 +08:00
Jun Pataleta 996534fbea MDL-74321 mod_forum: forum_check_throttling performance improvements
* Return early if the forum's blockafter or blockperiod attributes
are empty.
* If $cm is not passed in forum_check_throttling(), try to fetch it
using get_fast_modinfo() which avoids DB reads. Fetch it via
get_coursemodule_from_instance() as a last resort (though it's unlikely
to happen).
2022-03-28 10:03:57 +08:00
Eloy Lafuente (stronk7) b7dc12b160 Merge branch 'MDL-72634' of https://github.com/paulholden/moodle 2022-03-27 16:50:29 +02:00
Eloy Lafuente (stronk7) 1c2fd1cfb9 Merge branch 'MDL-74309' of https://github.com/timhunt/moodle 2022-03-27 16:47:08 +02:00
Eloy Lafuente (stronk7) 4344d4b55b Merge branch 'MDL-72958' of https://github.com/timhunt/moodle 2022-03-27 16:43:15 +02:00
Eloy Lafuente (stronk7) ad2d361db1 Merge branch 'MDL-74306' of https://github.com/paulholden/moodle 2022-03-27 16:04:14 +02:00
Eloy Lafuente (stronk7) c3f1c89a00 Merge branch 'master_MDL-73808-question-bank-upgrade-bkp' of https://github.com/catalyst/moodle-MDL-70329 2022-03-27 16:01:49 +02:00
Nadav Kavalerchik ba98dcfa9c MDL-58044 report/progress: Fix table headers labels display in RTL mode. 2022-03-26 23:31:14 +03:00
Eloy Lafuente (stronk7) 8f414e42a9 MDL-74279 phpunit: Tests using sqlsrv AdoDB must reset settings
AdoDB SQL*Server drivers use to modify some error and
logging preferences. As far as the connection is shared
with the main one, that implies that those settings
remain for the whole remaining execution.

We don't want his in tests, because can affect to other
tests at distance.

We are fixing this here, only for tests, because it
doesn't affect normal requests and because, once we
remove AdoDB this won't be needed anymore.
2022-03-26 18:40:11 +01:00
AMOS bot c0ce09040c Automatically generated installer lang files 2022-03-26 00:07:34 +00:00
Víctor Déniz efda17d3b0 on-demand release 4.0beta+ 2022-03-25 15:01:23 +00:00
Víctor Déniz 1aa213d761 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-03-25 15:01:16 +00:00
Jun Pataleta 935a18f7b0 Merge branch 'MDL-73848-master' of https://github.com/junpataleta/moodle 2022-03-25 17:58:18 +08:00
Jun Pataleta 616fe3ac3a Merge branch 'MDL-74138-master' of https://github.com/snake/moodle 2022-03-25 17:56:11 +08:00
Jun Pataleta 097d14c3f2 Merge branch 'MDL-74143' of https://github.com/stronk7/moodle 2022-03-25 17:56:10 +08:00
Shamim Rezaie 6c93bd7e21 Merge branch 'MDL-74103-master' of https://github.com/HuongNV13/moodle 2022-03-25 17:56:10 +08:00
Tim Hunt de8472df88 MDL-74309 quiz: removed obsolete code related to random tags 2022-03-25 09:53:46 +00:00
Paul Holden 17dd5bbae0 MDL-74202 webservice: fix protocol type in exception message. 2022-03-25 09:53:23 +00:00
Sujith Haridasan 49dabbbf32 MDL-73848 administration: Fix the Site home settings breadcrumbs 2022-03-25 17:45:04 +08:00
Sujith Haridasan 1bb972ae0a MDL-73848 administration: Add tests for breadcrumbs and nav highlights
This change includes addition of tests for verifying the secondary
and tertiary nav highlights.
It also includes the tests to verify the breadcrumbs for the pages.
2022-03-25 17:44:58 +08:00
Sujith Haridasan aa1c2e2382 MDL-73848 administration: Fix the breadcrumbs and nav highlights
Create or update the breadcrumbs in the site administration
pages where it is required.
Highlight the corresponding site adminstration tab.
Highlight the primary nav to Site administration when user
is navigating to any of the site administration pages.

Also changed the boostnavbar so that the nodes in the secondary
navigation are not shown in the breadcrumbs when user is in site
administration page.
2022-03-25 17:44:47 +08:00
Mihail Geshoski eac7fa895e MDL-74266 navigation: Perform strict check whether key exists in array 2022-03-25 16:06:24 +08:00
Mihail Geshoski 9e602435a7 MDL-74266 mod_chat: Add identifier to the 'Past sessions' nav node 2022-03-25 15:14:40 +08:00
Huong Nguyen ab659db113 MDL-74103 usertours: Make step position calculation based on contenttype 2022-03-25 11:10:17 +07:00
Víctor Déniz 06eded2a8b Merge branch 'MDL-74224-master' of https://github.com/HuongNV13/moodle 2022-03-24 16:30:15 +00:00
Víctor Déniz c21f2a73b1 Merge branch 'MDL-73393-master' of https://github.com/peterRd/moodle 2022-03-24 15:59:50 +00:00
Víctor Déniz c5a510cd09 Merge branch 'MDL-73914-master' of https://github.com/lameze/moodle 2022-03-24 15:54:56 +00:00
Jun Pataleta c1c52cfddd Merge branch 'MDL-73556-master' of https://github.com/ferranrecio/moodle 2022-03-24 23:50:07 +08:00
Ferran Recio fb3fb34b09 MDL-74286 gradereport_grader: fix overlap scale selector 2022-03-24 14:07:54 +01:00
Peter Dias 0a7b8dbc46 MDL-73393 navigation: Reintroduce nav-drawer and add a button
- Reintroduce nav components to have backwards compatibility with existing themes
- Mark for deprecation flat_navigation and flat_navigation_node
2022-03-24 19:59:48 +08:00
David Matamoros d3bc3ec0c9 MDL-74243 reportbuilder: Fixed double encoding in report/filter name 2022-03-24 11:46:55 +01:00
Safat Shahin 6045e6b67b MDL-73808 core_question: Add efficiency in question migration
This commit will add some efficiency around the question
migration.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Andrew Lyons <andrew@nicols.co.uk>
2022-03-24 20:34:14 +11:00
Víctor Déniz 0366908f12 Merge branch 'MDL-74307-master' of https://github.com/sharidas/moodle 2022-03-24 09:20:40 +00:00
Jun Pataleta 9f951edbff Merge branch 'MDL-72007-master' of https://github.com/peterRd/moodle 2022-03-24 16:37:46 +08:00
Peter Dias e3921e1c74 MDL-72007 navigation: Update upgrade.txt files 2022-03-24 16:36:22 +08:00
Jun Pataleta 2bce5d8be5 Merge branch 'MDL-74274-master' of https://github.com/peterRd/moodle 2022-03-24 16:33:39 +08:00
Sara Arjona 8c502259f3 Merge branch 'MDL-74280' of https://github.com/paulholden/moodle 2022-03-24 08:33:49 +01:00
Ilya Tregubov 7bedf54f5b Merge branch 'master_MDL-73763_index-fix' of https://github.com/catalyst/moodle-MDL-70329 2022-03-24 13:14:03 +06:00
Ilya Tregubov 84fbc7b31b Merge branch 'MDL-74193' of https://github.com/paulholden/moodle 2022-03-24 13:08:13 +06:00
Marc-Alexandre Ghaly c3ac868bf7 MDL-73763 core : Index fixes for reference tables
This commit will add the index for the question_reference
and the question_set_reference table if its not already
added. This commit will also implement the logic of adding
the question area and component in the joins of the question
reference table in order to make sure any other plugin using
the qbank api does not conflict with each other.
2022-03-24 18:04:47 +11:00
Jake Dallimore 86f08a393f MDL-74221 enrol_lti: db changes supporting draft registrations
Summary:
- Allows nulls for a number of fields meaning largely empty drafts can
be stored.
- Adds 'uniqueid', an id unique to each issuer which is intended
to be used as a parameter in both the initiate login and dynamic
registration urls provided to platforms, as a means to identify specific
registrations for the issuer, in the absense of client_id (optional in
the 1.3 spec).
- Add 'status', used to denote draft or active registrations.
2022-03-24 14:12:24 +08:00
Huong Nguyen 9f9e940a19 MDL-74224 atto_managefiles: Remove unnecessary scrollbar 2022-03-24 09:37:12 +07:00
Jun Pataleta efe227d1bf Merge branch 'MDL-73713-readonly-txn-latency' of https://github.com/catalyst/moodle 2022-03-24 10:17:30 +08:00
Srdjan d8baf29573 MDL-73713 dml: moodle_read_slave_trait default latency to 1 second
In practice it is as if the feature was turned off most of the time.
However, some long processes may benefit from this very safe value
in case admins missed to configure it.
2022-03-24 09:32:24 +10:00
Srdjan 343384d921 MDL-73713 dml: test namespaces fix - a noop 2022-03-24 09:30:10 +10:00
Eric Merrill 29f83023a6 MDL-74299 question: Don't use a strict comparison for DB objects 2022-03-23 19:20:22 -04:00
Srdjan 8a386d68f6 MDL-73713 dml: moodle_read_slave_trait table written time adjustment
moodle_database::commit_delegated_transaction() calls
core\event\manager::database_transaction_commited() which may invoke
events that do database reads.
This change adjusts tables last written time in moodle_read_slave_trait *before*
calling moodle_database::commit_delegated_transaction().
2022-03-24 09:19:56 +10:00
Eloy Lafuente (stronk7) 848ec32df0 MDL-74143 database: Make get_indexes() to return original column names
Sometimes, in order to provide a cross-db behaviour of unique indexes
mixing null and not null columns, we create, under the hood, some
function based indexes.

When that happens get_indexes() is returning the name of the
expression objects used to calculate that function index. But we need
the original column names to be able to compare indexes and get
column dependencies properly.

So, this patch just looks, when the index is unique and function based,
to the expressions (pretty standard CASE statements) and gets the
original column name from it.

Covered with tests.
2022-03-23 23:16:53 +01:00
Paul Holden e420fbe303 MDL-74306 mod_assign: fix undefined property in override cache key. 2022-03-23 18:55:03 +00:00
Ferran Recio b4f62d2426 MDL-74257 core_courseforrmat: fix make available badge 2022-03-23 17:31:22 +01:00
Víctor Déniz 7a65b2a3c7 Merge branch 'MDL-74288-master' of https://github.com/snake/moodle 2022-03-23 15:25:38 +00:00
Sara Arjona 733419daa9 Merge branch 'master-MDL-48633' of https://github.com/golenkovm/moodle 2022-03-23 15:14:27 +01:00
Sara Arjona d084f08db3 Merge branch 'MDL-74283' of https://github.com/paulholden/moodle 2022-03-23 13:53:16 +01:00
Sara Arjona b46c643276 Merge branch 'MDL-57383' of https://github.com/paulholden/moodle 2022-03-23 13:51:08 +01:00
Ilya Tregubov 56c82a85e8 Merge branch 'MDL-74121-master' of https://github.com/sharidas/moodle 2022-03-23 17:22:15 +06:00
Sujith Haridasan 6c7324856d MDL-74307 core_search: Use PARAM_ALPHANUMEXT for $areaid
Use PARAM_ALPHANUMEXT for $areaid as areaid can also be
say mod_h5pactivity. When PARAM_ALPHAEXT is used it would
become mod_hpactivity and would cause exception in code flow.
2022-03-23 14:47:34 +05:30
Sujith Haridasan ff5381ad95 MDL-74121 mod_forum: Fix the posting threshold issue
When a student post exceeds the posting threshold
block then 'Add discussion topic' button should not be shown.
Also the student cannot reply to a topic if this is exceeded.
2022-03-23 14:23:29 +05:30
Shamim Rezaie b66925ce26 Merge branch 'MDL-73792-master' of https://github.com/HuongNV13/moodle 2022-03-23 19:07:28 +11:00
Bas Brands 8ccc266f4d MDL-73792 theme_boost: drawer layout spacing for mobile 2022-03-23 11:31:09 +07:00
Ilya Tregubov a824011103 Merge branch 'MDL-74091-master' of https://github.com/lucaboesch/moodle 2022-03-23 09:11:30 +06:00
Peter Dias 3c51d8a87b MDL-74274 lesson: Set maxattempts reached when retries allowed 2022-03-23 10:26:23 +08:00
AMOS bot 85022e2172 Automatically generated installer lang files 2022-03-23 00:07:32 +00:00
Paul Holden 4102ae35a4 MDL-74283 dml: replace hardcoded concat SQL with appropriate API. 2022-03-22 17:33:03 +00:00
Paul Holden b6d8939959 MDL-72634 user: populate default city/country during user creation. 2022-03-22 17:28:09 +00:00
Sara Arjona 838704aa85 MDL-74184 behat: Unrelated, remove the @skip_interim tag
This commit is UNRELATED to the MDL-74184, but we need the
@skip_interim tag removed to a couple of scenarios that were
causing lots of noise and failures @ci infrastructure.
MDL-74265 was created to deal with this issue but these jobs
are now passing, and nothing has been changed...

So we are using MDL-74184 (this extra commit) to remove that
tag (sorry for the noise).
2022-03-22 17:22:58 +01:00
Sara Arjona a3de1eff1b Merge branch 'MDL-74160-master' of https://github.com/ferranrecio/moodle 2022-03-22 16:51:05 +01:00
Sara Arjona d5ade9c68c Merge branch 'MDL-74049' of https://github.com/Chocolate-lightning/moodle 2022-03-22 16:47:49 +01:00
Sara Arjona f4730df85e Merge branch 'MDL-74184' of https://github.com/timhunt/moodle 2022-03-22 16:42:03 +01:00
Tim Hunt ee80bc47b7 MDL-72958 questions: tidy up all question-related upgrade.txt files 2022-03-22 14:53:43 +00:00
Luca Bösch 96581087a9 MDL-74091 core_question: 'table-responsive' qtable avoids overlap. 2022-03-22 14:19:42 +01:00
Mikhail Golenkov 4c3932dbca MDL-48633 mod_lesson: Fix lesson grade handling when scales in use 2022-03-22 23:02:20 +11:00
Sara Arjona 34ce1463cc on-demand release 4.0beta+ 2022-03-22 12:55:08 +01:00
Sara Arjona aca06f668c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-03-22 12:55:03 +01:00
Tim Hunt 439ecc57fd MDL-74184 quiz: prevent repagination of quizzes with attepts
There was a loophole to this rule on the settings form, which is now fixed.
2022-03-22 10:32:24 +00:00
Ferran Recio ce7edab8a8 MDL-74160 core_coureformat: fix legacy renderer methods
To ensure legacy course formats works on Moodle 4.0 some method are
reintroduced (but marked as deprecated) like start_section_list and
end_section_list. Furthermore, the course_section_cm_availability
returns a string again as expected.
2022-03-22 10:59:14 +01:00
Andrew Nicols 6212b71318 MDL-74291 mod_bigbluebuttonbn: Allow students to join moderated meetings 2022-03-22 16:09:45 +08:00
Jake Dallimore afbf15cd97 MDL-74288 enrol_lti: fix cross-origin postMessage call in registration
This isn't using the targetOrigin, which should be passed as 2nd param.
2022-03-22 11:06:23 +08:00
Ilya Tregubov debe19b49b Merge branch 'MDL-74161' of https://github.com/Chocolate-lightning/moodle 2022-03-22 08:56:04 +06:00
Ilya Tregubov 719cc6024e Merge branch 'MDL-74169-master' of https://github.com/FMCorz/moodle 2022-03-22 08:46:46 +06:00
Jun Pataleta ad1660721c Merge branch 'MDL-73795-master' of https://github.com/bmbrands/moodle 2022-03-22 10:22:45 +08:00
Jun Pataleta 5fffb343cb Merge branch 'MDL-72698' of https://github.com/stronk7/moodle 2022-03-22 10:19:37 +08:00
Simey Lameze 37bf03b2f4 MDL-73914 course: move both options to more menu
This commit moves the 'Download course content' and 'Unenrol me from course'
options to more menu.
2022-03-22 10:03:29 +08:00
Simey Lameze b74b47065a MDL-73914 course: remove download course content button 2022-03-22 10:03:29 +08:00
Mathew May 4eb7094908 MDL-74049 navigation: Set active secondary node in course reuse areas 2022-03-22 09:53:01 +08:00
Eloy Lafuente (stronk7) b3a7c45930 MDL-72698 behat: fix problem with FF, not able to auto-scroll iframes
The "Save changes" button in the SCORM package falls out from the
viewport and that seems to be a problem for Firefox, not being able
to auto-scroll to it before clicking.

So we are just making the window 200 points taller and that
makes the button to be visible (within the viewport) and clickable.

Also, change the way we "wait" at the end of the scenario and,
instead of reloading, we re-visit one of the contents to allow
completion to be ready for final assertions.
2022-03-22 01:36:40 +01:00
AMOS bot e77c71110c Automatically generated installer lang files 2022-03-22 00:07:32 +00:00
Sara Arjona 5ca12a21a6 Merge branch 'MDL-74253-master' of https://github.com/aanabit/moodle 2022-03-21 15:51:10 +01:00
Jun Pataleta 8c68977785 Merge branch 'MDL-74254-master' of https://github.com/marinaglancy/moodle 2022-03-21 22:46:01 +08:00
Sara Arjona 375cdaa6a5 Merge branch 'MDL-73950-master' of https://github.com/snake/moodle 2022-03-21 15:38:21 +01:00
Andrew Nicols 459c37755b Merge branch 'MDL-74072_master' of https://github.com/TomoTsuyuki/moodle 2022-03-21 22:30:32 +08:00
Sara Arjona 24ab8bba41 Merge branch 'MDL-74062-master' of https://github.com/bmbrands/moodle 2022-03-21 15:21:55 +01:00
Marina Glancy 09446a2934 MDL-74254 course: User may not have capability to browse courses 2022-03-21 14:44:14 +01:00
Sara Arjona 0babca4344 Merge branch 'MDL-74225' of https://github.com/paulholden/moodle 2022-03-21 12:59:30 +01:00
Sara Arjona f013b9c339 Merge branch 'MDL-74228-master' of https://github.com/dravek/moodle 2022-03-21 12:49:51 +01:00
Sara Arjona a221c171f0 Merge branch 'MDL-74183-master' of https://github.com/ericmerrill/moodle 2022-03-21 12:41:10 +01:00
Víctor Déniz bc02234cee Merge branch 'MDL-74109-master' of https://github.com/lameze/moodle 2022-03-21 10:56:32 +00:00
Frédéric Massart bee1bb317e MDL-74169 core_message: Hide preferences link when permissions lacking 2022-03-21 18:37:45 +08:00
Paul Holden 652242f618 MDL-74280 reportbuilder: ensure calendar panel zIndex calculated.
Since 29c00fc1 it is calculated dynamically. Ensure all elements
that would otherwise overlap the panel add appropriate class so
they are accounted for during this calculation.
2022-03-21 09:51:59 +00:00
Jun Pataleta 76edf78668 Merge branch 'MDL-74031-master' of https://github.com/bmbrands/moodle 2022-03-21 17:38:54 +08:00
Ilya Tregubov d7e5e22117 Merge branch 'MDL-73607-master' of https://github.com/rezaies/moodle 2022-03-21 15:35:03 +06:00
Jun Pataleta 4a5a25cbc4 Merge branch 'MDL-72698' of https://github.com/stronk7/moodle 2022-03-21 17:13:55 +08:00
Brendan Heywood 34efb9a19e MDL-59681 file: Stop recursive file serving 2022-03-21 17:50:20 +11:00
Ilya Tregubov bbb3f3edcd Merge branch 'MDL-74088-master' of https://github.com/lameze/moodle 2022-03-21 12:48:31 +06:00
Andrew Nicols 424143b2e6 Merge branch 'MDL-74229-master' of https://github.com/bmbrands/moodle 2022-03-21 13:07:48 +08:00
Andrew Nicols 6d8bb892ec Merge branch 'MDL-74269-master' of https://github.com/ericmerrill/moodle 2022-03-21 12:51:24 +08:00
Ilya Tregubov 8a8001fcae Merge branch 'MDL-74134-master' of https://github.com/lucaboesch/moodle 2022-03-21 10:22:13 +06:00
Ilya Tregubov 8b871d98b4 Merge branch 'MDL-73891-master' of https://github.com/sarjona/moodle 2022-03-21 10:12:27 +06:00
Eloy Lafuente (stronk7) 9392313b88 MDL-72698 behat: Reduce random lesson behat failures on slow envs
In very slow environments viewing the lesson page for a student takes
more than 1 second and, because of this, the "Spend at least 1 sec"
completion condition is considered done.

So, in order to alleviate this problem, that leads to random failures
in CIs with slow databases, we have changed the condition to be 3
seconds instead.

That seems to do the work in super-slow environments, with 100
executions passing ok (when previously the scenario was failing 33%
of times).

The only cost is that now the behat run will be 2 seconds slower (there
is a wait changed from 2 to 4 seconds), but that's an acceptable
price to pay to get the scenarios consistent passing.

See the issue for more details.
2022-03-19 18:10:01 +01:00
Eloy Lafuente (stronk7) 2663e21be3 MDL-72698 behat: Reduce random scorm behat failures on slow envs
This just applies two "tricks" to make the test to behave better:
- Ensuring that the "wait until the page is loaded" happens in the scorm frame.
- Ensuring that the last item in the package gets some extra time
  by reloading the page completely at the end.

With them, a testing environment with a 100% of failures has become 100%
passing (25 repetitions). That should be good enough to reduce the
impact of that failure everywhere.

See the issue for more details.
2022-03-19 18:09:45 +01:00
Paul Holden ec89abc5bf MDL-74110 forms: disable calendar link when date selector disabled. 2022-03-19 14:24:23 +00:00
Andrew Nicols 322395f29c Merge branch 'MDL-74199-master' of https://github.com/aanabit/moodle 2022-03-19 22:00:16 +08:00
Andrew Nicols 18f79ec838 Merge branch 'MDL-74258-master' of https://github.com/cescobedo/moodle 2022-03-19 21:48:14 +08:00
Andrew Nicols ca4fd43f48 Merge branch 'MDL-74270' of https://github.com/timhunt/moodle 2022-03-19 21:40:31 +08:00
Tim Hunt d76a072636 MDL-74270 format_float: fix bug with $decimalpoints=0, $stripzeros=true 2022-03-18 22:12:38 +00:00
Eric Merrill dd5406527a MDL-74269 course: Make sure category exists before updating 2022-03-18 15:30:19 -04:00
Amaia Anabitarte 13e66c48f8 MDL-74253 core_course: get_nearest_editable_subcategory for hidden cat 2022-03-18 18:15:59 +01:00
Luca Bösch f10e19c41c MDL-74134 graphics: Adding SVG log icon. 2022-03-18 17:55:20 +01:00
cescobedo 8581555f9d MDL-74258 mod_h5pactivity: Add global search to h5pactivity 2022-03-18 17:06:11 +01:00
Sara Arjona 0d0f09bc7f on-demand release 4.0beta+ 2022-03-18 16:28:33 +01:00
Ferran Recio bf642fb6fc MDL-73556 core_courseformat: fix course index click toggle
When the user clicks on a course index chevron the section is toggled.
However, when clicks on the section name the section is expanded but
never collapsed.
2022-03-18 14:39:32 +01:00
Sara Arjona 5584c7b6a6 MDL-74116 behat: Unrelated, add the @skip_interim tag
This commit is UNRELATED to the MDL-74116, but we need the
@skip_interim tag added to a couple of scenarios that are
causing lots of noise and failures  @CI infrastructure.
MDL-74265 has been created to deal with this issue.

So we are using MDL-74116 (this extra commit) to add that tag
(sorry for the noise).
2022-03-18 13:45:42 +01:00
Jun Pataleta a96cec3ed3 Merge branch 'MDL-73233-fix' of https://github.com/sarjona/moodle 2022-03-18 16:15:19 +08:00
Sara Arjona 30b75b7190 MDL-73233 navigation: Breadcrumbs removed from user preferences
In MDL-74087 breadcrumbs were removed from the User preferences page.
This patch re-introduces a piece of code that was removed originally
in MDL-73233 while reviewing all the places where the Dashboard was
displayed by default (to avoid inconsistencies). New item in primary
navigation has been changed to "Home" but we still need the code
re-added to hide breadcrumbs when its content matches the primary
navigation.
2022-03-18 07:44:55 +01:00
Jun Pataleta cd2225a71b Merge branch 'MDL-73383-master' of https://github.com/rezaies/moodle 2022-03-18 12:00:23 +08:00
Jun Pataleta 9a9244dcf9 Merge branch 'MDL-73793-master' of https://github.com/bmbrands/moodle 2022-03-18 11:51:20 +08:00
Shamim Rezaie bdccf3eb3b Merge branch 'MDL-73593-master' of https://github.com/bmbrands/moodle 2022-03-18 11:30:27 +11:00
Víctor Déniz d60d936c0e Merge branch 'MDL-74153-master' of https://github.com/ferranrecio/moodle 2022-03-17 23:02:24 +00:00
Eloy Lafuente (stronk7) 337dea4afa Merge branch 'MDL-69078-better-error-message-for-wrong-encoding' of https://github.com/ziegenberg/moodle 2022-03-17 22:22:03 +01:00
Daniel Ziegenberg f942a5cedd MDL-69078 questions: check for UTF-8 encoding of the import file
Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-17 20:53:50 +01:00
Eloy Lafuente (stronk7) 05c07f2656 Merge branch 'MDL-74159-master' of https://github.com/sarjona/moodle 2022-03-17 18:08:25 +01:00
Eloy Lafuente (stronk7) 3a2b094973 Merge branch 'MDL-74240-master' of https://github.com/bmbrands/moodle 2022-03-17 18:06:05 +01:00
Jun Pataleta 1e533995dd Merge branch 'MDL-73233-master' of https://github.com/sarjona/moodle 2022-03-18 00:35:11 +08:00
Sara Arjona 47550abe6b Merge branch 'MDL-74080-master' of https://github.com/aanabit/moodle 2022-03-17 17:21:23 +01:00
Sara Arjona d51c17a2ca Merge branch 'MDL-74076' of https://github.com/paulholden/moodle 2022-03-17 16:58:00 +01:00
Sara Arjona 12252ebec0 Merge branch 'MDL-74172-master' of https://github.com/bmbrands/moodle 2022-03-17 15:48:14 +01:00
Sara Arjona 1ccea2c9ff Merge branch 'MDL-74132' of https://github.com/roland04/moodle 2022-03-17 15:42:34 +01:00
Andrew Nicols 27bed0b928 Merge branch 'MDL-72991-master-4' of https://github.com/HuongNV13/moodle 2022-03-17 22:25:10 +08:00
Bas Brands 0ee53f2dcd MDL-74240 mod_forum: tertiary nav button wrapper 2022-03-17 13:56:29 +01:00
Sara Arjona 08bae4cce8 Merge branch 'MDL-74214' of https://github.com/paulholden/moodle 2022-03-17 13:11:47 +01:00
Jun Pataleta cb9480841c Merge branch 'MDL-74216-master' of https://github.com/mihailges/moodle 2022-03-17 19:47:46 +08:00
Bas Brands 012ba2d823 MDL-74245 tool_lp: region-main overflow for dropdowns 2022-03-17 12:27:41 +01:00
Sara Arjona dbb63cfffc Merge branch 'MDL-73863-master' of https://github.com/mihailges/moodle 2022-03-17 11:33:58 +01:00
Bas Brands c546292739 MDL-74062 theme_boost: fix header with for course admin pages 2022-03-17 11:01:17 +01:00
Ilya Tregubov ff0b43830a Merge branch 'MDL-73999' of https://github.com/paulholden/moodle 2022-03-17 15:23:56 +06:00
Bas Brands 40357a1976 MDl-74031 mod_assign: limited pagewidth for view action 2022-03-17 10:23:32 +01:00
Jun Pataleta 23ea7d6b43 Merge branch 'MDL-74112-master' of https://github.com/andrewnicols/moodle 2022-03-17 17:08:47 +08:00
Huong Nguyen bfe14e2312 MDL-72991 Course: Partial course cache rebuild with cache versioning 2022-03-17 15:34:26 +07:00
Huong Nguyen 457d10a49f MDL-72991 Course: Fix move_section_to is not updating correct section
When we change the position of two sections, we just need to update
the position of the affected sections, not all the sections in the course.
This will improve the performance since the system only executes the queries to affected sections.
Also, the system only clears the cache for affected sections, not all the sections in the course.
2022-03-17 15:34:26 +07:00
Huong Nguyen 273fbac739 MDL-72991 Course: Create PHPUnit for course_modinfo and move_section_to
Newly PHPUnit tests were created to verify the below methods
 - course_modinfo::purge_section_cache_by_id()
 - course_modinfo::purge_section_cache_by_number()
 - move_section_to()
2022-03-17 15:34:26 +07:00
Huong Nguyen 4bc2b24a51 MDL-72991 Course: Modify the courseminfo cacheid to force a rebuild
Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2022-03-17 15:34:26 +07:00
Dongsheng Cai f97b86e841 MDL-72991 Course: Partial course cache rebuild
When updating/deleting a section/module, the system now only
invalidate of the element (section/module), not the whole course cache
Also, the system now only recalculate the cache for element (section/module)
if necessary, not the whole course cache

Move module/section purging to course_modinfo:
  + course_modinfo::purge_course_section_cache_by_id was created to purge section by id
  + course_modinfo::purge_course_section_cache_by_number was created to purge section by number
  + course_modinfo::purge_course_module_cache was created to purge module
2022-03-17 15:34:01 +07:00
Sara Arjona 95e3d07435 Merge branch 'MDL-74127-master' of https://github.com/peterRd/moodle 2022-03-17 09:14:58 +01:00
Jun Pataleta e2e048d49a Merge branch 'MDL-73597-master' of https://github.com/HuongNV13/moodle 2022-03-17 15:50:36 +08:00
Simey Lameze 177c5cbd7f MDL-74109 lib: replace deprecated compile call 2022-03-17 12:10:18 +08:00
Andrew Nicols 44a4e78075 MDL-74112 course: Support multiple mforms in format chooser
The format chooser JS assumes that it is the only mform on the page. If
it is not, and another mform appears before it, then the jump will not
work.

This change:
* updates the formatchooser to modern JS
* allows multiple forms to exist on the page
* stops using id fields
* always hide the format selection button
2022-03-17 11:11:53 +08:00
Eloy Lafuente (stronk7) 5b98ad241a Merge branch 'MDL-74116-master' of https://github.com/andrewnicols/moodle 2022-03-16 22:18:40 +01:00
Eloy Lafuente (stronk7) 89e020a872 Merge branch 'MDL-74114-master' of https://github.com/aanabit/moodle 2022-03-16 22:13:57 +01:00
Eloy Lafuente (stronk7) cee098f8bf Merge branch 'MDL-74175' of https://github.com/paulholden/moodle 2022-03-16 22:03:25 +01:00
Eloy Lafuente (stronk7) 06e7273add Merge branch 'MDL-74154-fix' of https://github.com/sarjona/moodle 2022-03-16 16:45:42 +01:00
Eloy Lafuente (stronk7) c885ef8b92 Merge branch 'MDL-74181-fix' of https://github.com/sarjona/moodle 2022-03-16 16:36:49 +01:00
Sara Arjona 19af5abcfa MDL-74181 user: has_secondary_navigation_setter has been renamed
In MDL-72481, method has_secondary_navigation_setter has been renamed
to set_secondary_navigation.
2022-03-16 16:23:33 +01:00
Víctor Déniz 3f1e26b54e Merge branch 'MDL-73489-master' of https://github.com/HuongNV13/moodle 2022-03-16 15:12:30 +00:00
Sara Arjona 8893ba5236 MDL-74154 calendar: has_secondary_navigation_setter has been renamed
In MDL-72481, method has_secondary_navigation_setter has been renamed
to set_secondary_navigation.
2022-03-16 16:10:23 +01:00
Andrew Nicols c3404942e4 MDL-74116 behat: Fix browser instantiation for Selenium 4 2022-03-16 22:29:20 +08:00
Bas Brands f0e32f99b4 MDL-74229 navigation: add data-key to navtabs 2022-03-16 13:30:35 +01:00
Sara Arjona ff402712a3 Merge branch 'MDL-74154-master' of https://github.com/peterRd/moodle 2022-03-16 12:29:07 +01:00
David Matamoros 56b035321a MDL-74228 filters: Fixed typos in core_filters events file 2022-03-16 12:21:26 +01:00
Sara Arjona dd7d03a50e Merge branch 'MDL-74073-master-2' of https://github.com/junpataleta/moodle 2022-03-16 12:17:08 +01:00
Sara Arjona 9261157cc3 MDL-73233 course: Remove make_active() call
When accessing to User grades and then to the grades from a
specific course, this call was causing several behat errors
because the dashboard node was not found.
The code causing this issue can be safely removed because it
isn't used (the current node is calculated a few lines below).
2022-03-16 11:35:09 +01:00
Sara Arjona 07f7da93cc MDL-73233 tool_mobile: Return enabledashboard setting
External function tool_mobile::get_config now returns the
enabledashboard setting.
2022-03-16 11:35:09 +01:00
Sara Arjona 42c96d1708 MDL-73233 navigation: Remove dashboard when it is disabled
- Only add Dashboard to 'home' the root node if the $CFG->enabledashboard
setting is enabled.
- The "More..." link displayed in the "My courses" section from the
navigation block was pointing to the dashboard. However, now that we have
the "My courses" page, it makes more sense to change it and link to it.
- For the User preferences, I've changed breadcrumbs from "Dashboard" to
"Home" because they are more generic (and don't strictly belong to the
dashboard).
2022-03-16 11:35:09 +01:00
Sara Arjona 599cb8bbb1 MDL-73233 shibboleth: Change urltogo only when dashboard is enabled 2022-03-16 11:35:08 +01:00
Sara Arjona 04d8b5999a MDL-73233 moodlenet: Change cancel link to /
The cancel link when content is imported from MoodleNet has
been changed from /my to /, in order to get it working always,
regardless the $CFG->enabledashboard setting is enabled or not.
2022-03-16 11:35:08 +01:00
Sara Arjona 40894d7c31 MDL-73233 frontpage: Display link to My courses
Before MDL-70801, the "My courses" page didn't exist so the "More"
button displayed bellow the "Enrolled courses" in frontpage pointed
to Dashboard.
I think this is a leftover from the issue when the "My courses" page
was added and it makes more sense using the "My courses" page here
always.
2022-03-16 11:35:08 +01:00
Sara Arjona 31ed9a6c2f MDL-73233 my: Disable /my page depending on setting
When $CFG->enabledashboard will be disabled, the /my page
will redirect to a different page or display an error message.
2022-03-16 11:35:08 +01:00
Sara Arjona c612f121a0 MDL-73233 navigation: Hide Dashboard from primary nav
When the $CFG->enabledashboard is disabled, the "Dashboard"
menu option won't be displayed in the primary navigation.
2022-03-16 11:35:07 +01:00
Sara Arjona e3d2fa41d0 MDL-73233 user: Review Start page user preferences
The "Start page" user preferences page has been reviewed to
consider the new $CFG->enabledashboard setting.
The "Dashboard" won't be displayed in the list if it's disabled.
Besides, the default value is now calculated calling the new
get_default_home_page() method.
2022-03-16 11:22:22 +01:00
Sara Arjona 5349861e69 MDL-73233 admin: Add enabledashboard setting
The $CFG->enabledashboard setting has been added to Appearance >
Navigation, to let admins disable the "Dashboard" option from the
primary navigation.

This commit also changes the behaviour of get_home_page(), to take
into account this setting and adds a new method, get_default_home_page(),
to return the expected default home page (that wil be used when current
default page is not defined or valid).
2022-03-16 11:22:22 +01:00
Mihail Geshoski 5f227de8f3 MDL-74216 navigation: Add behat tests 2022-03-16 18:16:58 +08:00
Mihail Geshoski 7066c7618c MDL-74216 navigation: Do not show 'My courses' in primary nav to guests 2022-03-16 18:16:58 +08:00
Ferran Recio e9de12ec51 MDL-74153 portfolio_download: fix download form
The download form usas autosubmit to start downloading the content. This
breaks the JS modules loading because the page loading is cancelled when
the form is submitted. To prevent this from happen the download form now
has a hidden iframe to execute the download action without affecting the
rest of the page.
2022-03-16 11:03:12 +01:00
Paul Holden 9ccaf711d5 MDL-74225 dataformat: load plugin settings into admin tree. 2022-03-16 09:40:11 +00:00
Bas Brands e71f567f28 MDL-74172 theme_boost: printer friendly drawers layout 2022-03-16 10:24:29 +01:00
Mikel Martín 9e329ab152 MDL-74132 reportbuilder: Fix horizontal scrolling regression in editor
MDL-73902 caused a regression in reportbuilder editor horizontal scrolling because of the 'no-overflow' class removal
in the table container wrapper. This patch add styles to allow horizontal scroll in reportbuilder editor table.
2022-03-16 10:21:57 +01:00
Huong Nguyen 0c33dbb2ed MDL-73597 Questions: Form checker integration for D&D question types 2022-03-16 16:09:56 +07:00
Ilya Tregubov a5ef320720 Merge branch 'MDL-74071' of https://github.com/paulholden/moodle 2022-03-16 13:57:59 +06:00
Jun Pataleta b9ff0ff99b MDL-74073 courseformat: Toggle Collapse/Expand all via space key
* Add 'space' keydown event handler on the Collapse/Expand all element
on the course homepage.
* Set aria-expanded attribute of the Expand/Collapse all element
accordingly

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
2022-03-16 14:09:15 +08:00
Jun Pataleta ed55f45754 MDL-74073 theme_boost: Enhanced kb handling for BS Collapse components
* Make sure that Bootstrap Collapse components can also be toggled by
the Space key.

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
2022-03-16 14:09:15 +08:00
Jun Pataleta 7dfb64c7cb MDL-74073 core: Fix collapsesections accessibility
* Fix focus outline
* Set aria-expanded state accordingly
* Set aria-expanded in the template to false by default as the default
mode of the link is to expand all the sections.

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
2022-03-16 14:09:14 +08:00
Ilya Tregubov 6c21d64437 Merge branch 'MDL-74144' of https://github.com/paulholden/moodle 2022-03-16 10:33:22 +06:00
Ilya Tregubov 4e90732ebe Merge branch 'MDL-73344-master' of https://github.com/peterRd/moodle 2022-03-16 10:05:03 +06:00
Jun Pataleta 8c07f33d80 Merge branch 'MDL-72481-master' of https://github.com/rezaies/moodle 2022-03-16 11:45:40 +08:00
Peter Dias 8802254c8e MDL-74154 calendar: Disable secondary nav in calendar 2022-03-16 09:24:07 +08:00
Eloy Lafuente (stronk7) 337e740568 Merge branch 'MDL-74141-master' of https://github.com/sarjona/moodle 2022-03-15 23:38:14 +01:00
Eloy Lafuente (stronk7) 984669aeb2 Merge branch 'MDL-73193' of https://github.com/call-learning/moodle 2022-03-15 23:07:47 +01:00
Laurent David 1587ab4c27 MDL-73193 mod_bigbluebuttonbn: Fix random failures in behat tests
* On selenium chrome this fixes random failure of the "I can delete a recording"
test due to race condition between the popup being closed and the script waiting
for it to be displayed
2022-03-15 19:22:46 +01:00
Paul Holden ac24d90182 MDL-57383 tool_uploaduser: don't overwrite auth during update.
If updating users during upload along with the option to fill in
missing fields from file content, then we should exclude the auth
column because it will always be present for a user.
2022-03-15 17:06:20 +00:00
Amaia Anabitarte c28b5ad8c0 MDL-74199 core_user: Remove breadcrumbs on private files 2022-03-15 18:01:17 +01:00
Sara Arjona 302d147331 Merge branch 'MDL-74180-master' of https://github.com/mihailges/moodle 2022-03-15 17:42:38 +01:00
Víctor Déniz 4da9f3a03a Merge branch 'MDL-74098' of https://github.com/stronk7/moodle 2022-03-15 16:14:17 +00:00
Eloy Lafuente (stronk7) 103365191c Merge branch 'MDL-74131-master' of https://github.com/aanabit/moodle 2022-03-15 16:46:07 +01:00
Eloy Lafuente (stronk7) 3377bf10f7 Merge branch 'MDL-74181' of https://github.com/paulholden/moodle 2022-03-15 16:41:26 +01:00
Paul Holden b73a69b920 MDL-74175 cohort: correct type/callback of entity category column. 2022-03-15 15:28:54 +00:00
Víctor Déniz 7fbd4942a6 Merge branch 'MDL-73865-master' of https://github.com/rezaies/moodle 2022-03-15 15:13:48 +00:00
Eloy Lafuente (stronk7) 040d005dc5 Merge branch 'MDL-74156-master' of https://github.com/junpataleta/moodle 2022-03-15 15:38:01 +01:00
Eloy Lafuente (stronk7) 820cdbc9e1 Merge branch 'MDL-74100' of https://github.com/paulholden/moodle 2022-03-15 15:07:02 +01:00
Paul Holden 29c00fc100 MDL-74214 forms: re-calculate calendar panel zIndex each time.
The previous iteration only calculated it's zIndex value on
initial load. This meant that any nodes added subsequent to this
would not be taken into account (e.g. modal forms).
2022-03-15 13:41:42 +00:00
Sara Arjona 877a882253 Merge branch 'MDL-74173-master' of https://github.com/junpataleta/moodle 2022-03-15 14:27:55 +01:00
Sara Arjona 2d0675e986 Merge branch 'MDL-73979-master' of https://github.com/HuongNV13/moodle 2022-03-15 12:28:56 +01:00
Sara Arjona a26f985cae Merge branch 'MDL-74130' of https://github.com/timhunt/moodle 2022-03-15 12:19:10 +01:00
Sara Arjona 9344149aba on-demand release 4.0beta+ 2022-03-15 11:30:47 +01:00
Sara Arjona 814f91f935 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-03-15 11:30:42 +01:00
Simey Lameze 4fe474fad4 MDL-74088 assign: backup and restore support for time limit fields 2022-03-15 17:39:04 +08:00
Jun Pataleta b8248d3b92 MDL-74030 mod_lesson: Access lesson report via page administration step
* So it will consistently pass between Boost and Classic runs.
2022-03-15 17:08:15 +08:00
Huong Nguyen 2e3c9f10c4 MDL-73489 Quiz: Fix question was added in the wrong place 2022-03-15 12:22:18 +07:00
Huong Nguyen 76360c254e MDL-73489 Quiz: Fix incorrect XPath for custom Behat step 2022-03-15 12:19:30 +07:00
Paul Holden 61e5f6da55 MDL-74194 mod_bigbluebuttonbn: access checks for inplace editables. 2022-03-15 09:57:55 +06:00
Shamim Rezaie 1058a2fbd9 MDL-72481 theme_boost: Do not update tabindex of the "more" tab 2022-03-15 14:36:14 +11:00
Eric Merrill f3ea6862aa MDL-74183 completion: Protect against index conflict in cron 2022-03-14 22:56:20 -04:00
Shamim Rezaie ef84c1607d MDL-72481 core: prevent loosing the tick next to selected dropdown itme
prevent loosing the tick when user clicks on the toggle button
or when they Press Esc to close the dropdown.
2022-03-15 12:48:22 +11:00
Shamim Rezaie 50c8bf68a8 MDL-72481 core: Make more menu tabbable when the active tab moves inside 2022-03-15 12:48:22 +11:00
Sujith Haridasan 1168e5fff1 MDL-72481 core: Fix the keyboard navigation in RTL
Also updated e.keyCode to e.key because keyCode is deprecated.

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:22 +11:00
Shamim Rezaie 4489132505 MDL-72481 core: only move through visible tabs 2022-03-15 12:48:22 +11:00
Sujith Haridasan 044439fc84 MDL-72481 theme_boost: Find the tab if it is inside the more dropdown
keep the selector limited to tablists to prevent infinite redirects

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:22 +11:00
Sujith Haridasan af496f2c85 MDL-72481 admin: Update behat selector
The more menu can be a tablist or a manubar

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:22 +11:00
Jun Pataleta 6937d87ddd MDL-72481 admin: Render the site admin navigation menu as tablist
only render the secondary nav as tablist if it is for the site admin tabs

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:21 +11:00
Jun Pataleta 1f21daf8b3 MDL-72481 core: Fix more menu keyboard navigation
* Allow the more menu to be rendered as a tablist when needed.
* Let menu_navigation handle keyboard navigation only when
menu items are not rendered as dropdowns. Otherwise, leave
the keyboard navigation handling via the default handlers
(e.g. dropdown.js/aria.js/tab.js).
* When the more menu is rendered as a tablist, use aria-selected
for the selected tab. When it's rendered as a menu, use aria-current
for the selected menu item. (The menuitem role supports aria-current and
not aria-selected)
* Make sure that the active tab is tabbable by default.
* Submenu items should always have tabindex=-1
* Update behat to use css_element instead of xpath. Also, improved it
to consider that it is the active element that should be tabbable.

Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2022-03-15 12:48:21 +11:00
Shamim Rezaie bc52715d75 MDL-73865 blocks_timeline: Increase debounce wait to 1 second 2022-03-15 12:46:22 +11:00
Shamim Rezaie 06b64c8284 MDL-73865 blocks_myoverview: Increase debounce wait to 1 second 2022-03-15 12:45:35 +11:00
Paul Holden 4711a73731 MDL-74181 user: remove secondary nav when viewing profile as guest. 2022-03-15 00:50:13 +00:00
Paul Holden ef1be5935f MDL-74193 mod_assign: specify itemid in external attachment filearea. 2022-03-14 22:54:54 +00:00
Tim Hunt 85c0b1d2fa MDL-74130 question behat: Update tests to use the new navigation steps 2022-03-14 22:13:04 +00:00
Tim Hunt d54bef46f1 MDL-74130 question behat: support I am on ... page or key qbank pages 2022-03-14 22:13:04 +00:00
Tim Hunt 9c65fe8b8f MDL-74130 question behat: rename behat_question -> behat_core_question
This is the expected naming for a Behat file for a core component.

Note, there are no acutal references to the deprecated class name
in core, but there might be in plugins, so we added a
backwards compatibility class with the old name. Thanks to
Andrew Lyons for hints about how to do that.
2022-03-14 22:13:04 +00:00
Víctor Déniz e95d99ebf1 Merge branch 'MDL-74030' of https://github.com/roland04/moodle 2022-03-14 21:39:40 +00:00
Sara Arjona 5195ac05f1 Merge branch 'MDL-74179-master' of https://github.com/cescobedo/moodle 2022-03-14 18:48:44 +01:00
Amaia Anabitarte 9bfefc4975 MDL-74114 block_myoverview: Fix set favourite changes 2022-03-14 17:19:49 +01:00
Sara Arjona 6000e3ae6a Merge branch 'MDL-74151-master' of https://github.com/mihailges/moodle 2022-03-14 16:55:24 +01:00
Eloy Lafuente (stronk7) abc57c853a MDL-74098 phpunit: Normalise dir separator to match expectations 2022-03-14 16:46:52 +01:00
Sara Arjona 066b9ac6ed Merge branch 'MDL-74162-master' of https://github.com/mihailges/moodle 2022-03-14 16:41:47 +01:00
Ilya Tregubov eb6e99aafe Merge branch 'MDL-74033-master-2' of https://github.com/rezaies/moodle 2022-03-14 16:56:45 +06:00
cescobedo 22cf291fd9 MDL-74179 mod_chat: Fix warnings header when accessing as a guest
Initialize  before showing the no guest message
when user is accesing as a guest.
2022-03-14 10:56:55 +01:00
Mihail Geshoski b34b626588 MDL-74180 database: Add behat test 2022-03-14 17:10:55 +08:00
Amaia Anabitarte 329586411d MDL-74131 tags: Fix flagged tags color contrast 2022-03-14 09:59:13 +01:00
Ilya Tregubov 5da8aeaa8b Merge branch 'MDL-73704-master' of https://github.com/bmbrands/moodle 2022-03-14 14:53:29 +06:00
Amaia Anabitarte 89849347e5 MDL-74080 block_myoverview: Fix create course link based on permissions 2022-03-14 09:21:22 +01:00
Bas Brands c3f0f59134 MDL-73952 core_course: update section badges using JS 2022-03-14 09:10:07 +01:00
Bas Brands 58fa5da723 MDL-73704 tool_componentlibrary: activity icons 2022-03-14 08:54:33 +01:00
Sara Arjona 42d2954eef Merge branch 'MDL-73629-master_color_errors' of https://github.com/brickfield/moodle 2022-03-14 08:36:34 +01:00
Jun Pataleta def7df4825 Merge branch 'master_MDL-72890_quiz-regrade' of https://github.com/catalyst/moodle-MDL-70329 2022-03-14 14:19:56 +08:00
Peter Dias 07e8f72f72 MDL-74127 lesson: Show remaining attempts on all types of jumps
- Show remaining attempts on all types of jumps
- Highlight the lesson tab when viewing the continue page.
2022-03-14 12:55:26 +08:00
Mihail Geshoski 3bb3cdf369 MDL-74180 database: Perform checks before showing the 'add entry' option 2022-03-14 10:59:02 +08:00
AMOS bot 4256181399 Automatically generated installer lang files 2022-03-12 00:07:37 +00:00
Mike Churchward daffa8b1fc MDL-73629 tool_brickfield: Ensuring colour check causes no errors. 2022-03-11 15:25:21 -05:00
Jun Pataleta 6e528ca463 MDL-74173 reportbuilder: Convert action links to action menu links 2022-03-11 18:35:16 +08:00
Ilya Tregubov 967d9b2546 on-demand release 4.0beta+ 2022-03-11 16:20:26 +06:00
Mathew May 9e78d8de6d MDL-74161 login: Constrain the language selector to force a scroll 2022-03-11 16:14:39 +08:00
Jun Pataleta a06268b67a Merge branch 'MDL-73760-master-fix' of https://github.com/sarjona/moodle 2022-03-11 15:17:50 +08:00
Sara Arjona debbce8745 MDL-73760 quiz: Fix behat failures with classic
Author: Luca Bosch
2022-03-11 07:40:02 +01:00
Jun Pataleta 2431f7bff8 Merge branch 'MDL-71305-master' of git://github.com/rezaies/moodle 2022-03-11 11:51:00 +08:00
Ilya Tregubov cb0278a91f Merge branch 'MDL-74032-master' of https://github.com/sammarshallou/moodle 2022-03-11 09:23:17 +06:00
Jun Pataleta a1b520e38c Merge branch 'MDL-73895' of https://github.com/paulholden/moodle 2022-03-11 11:17:28 +08:00
Huong Nguyen f136ae7149 MDL-73979 timeline: Views should display consistent information
The course view is updated to display the events that match
the filter condition, no matter the course start date is in the future
or the course end date is in the past
2022-03-11 09:30:20 +07:00
Jun Pataleta b364b8437a Merge branch 'MDL-74087-master-1' of git://github.com/mihailges/moodle 2022-03-11 09:28:46 +08:00
Víctor Déniz f4d27bd04c MDL-54724 qtype_multianswer: fix version.php 2022-03-11 00:05:18 +00:00
Víctor Déniz 9a0a05ef39 Merge branch 'MDL-54724-master' of https://github.com/cameron1729/moodle 2022-03-10 23:21:24 +00:00
Sara Arjona d60e802006 MDL-74159 output: Add icon near docs link
An icon has been added near the 'Help and documentation' link in the
site footer When the site admin setting 'Open in new window' (doctonewwindow)
is enabled, for consistency with other similar links like 'Give feedback
about this software'.

Apart from that, now the link will be opened using the standard target
'_blank' instead of using the new window Javascript, to let users decide
whether the new page should be opened in a new tab or a new window.
2022-03-10 17:07:32 +01:00
Mihail Geshoski f6104220d6 MDL-74162 glossary: Fix the returned data type by create_add_button() 2022-03-11 00:03:52 +08:00
Mihail Geshoski 6e85ca08df MDL-74151 core_user: Add behat tests for the private files area 2022-03-10 23:39:20 +08:00
Mihail Geshoski d9ea0ba758 MDL-74151 core_user: Add heading in the private files page 2022-03-10 23:38:00 +08:00
Sara Arjona 730bc8735e MDL-74141 tool_task: Display error when Path to CLI not defined
When "Path to PHP CLI" is not defined, an exception with the message
in cannotfindthepathtothecli should be displayed, and the page should
be redirected to System paths settings page.

Apart from that, this patch also replaced core_task to tool_task,
because this message wasn't traslated properly.
2022-03-10 16:19:07 +01:00
Mikel Martín d2acd08934 MDL-74030 navigation: Add reports link
Add report builder 'Reports' link to the user menu

AMOS BEGIN
 CPY [reports,moodle],[reports,core_reportbuilder]
AMOS END
2022-03-10 15:46:44 +01:00
Mihail Geshoski 748ce930b4 MDL-74087 theme_boost: Add behat tests 2022-03-10 22:30:00 +08:00
Sara Arjona a42f38fe28 Merge branch 'MDL-73760' of https://github.com/mkassaei/moodle 2022-03-10 13:17:25 +01:00
Sara Arjona a27c19b73a Merge branch 'MDL-74142-master' of https://github.com/aanabit/moodle 2022-03-10 11:58:21 +01:00
Jun Pataleta 972b5a2d3f Merge branch 'MDL-73908-master' of https://github.com/bmbrands/moodle 2022-03-10 17:15:34 +08:00
Ilya Tregubov cb8778c2f1 Merge branch 'MDL-73073-master_assign_timing_web_services' of https://github.com/andrewmadden/moodle 2022-03-10 15:01:06 +06:00
Jun Pataleta 4ea491f305 MDL-74156 block: Remove redundant configure block headings 2022-03-10 16:46:03 +08:00
Sara Arjona ae935e8349 Merge branch 'MDL-74123_h5p_duplicate_file' of https://github.com/davosmith/moodle 2022-03-10 08:40:55 +01:00
Jake Dallimore a745a7dfae Merge branch 'MDL-73899-master' of https://github.com/andrewnicols/moodle 2022-03-10 15:34:21 +08:00
Andrew Madden 4ae22703c6 MDL-73073 mod_assign: Add new time limit fields to external functions
* Add activity, activityformat, timelimit and submissionattachments to mod_assign_get_assignments
* Add timestarted to mod_assign_get_submissions and mod_assign_get_submission_status
* Add assignmentdata to mod_assign_get_submission_status
* Move mod_assign external helper methods to an external_api child class to be used with modern external classes
* Add start_submission external function
* Create mod_assign child class of externallib_advanced_testcase for shared helper functions
* Add extra logic to get_assignments on whether to provide intro
attachments.
2022-03-10 18:31:37 +11:00
Mihail Geshoski 3436e1ad22 MDL-73863 core_completion: Update behat tests 2022-03-10 12:28:39 +08:00
Mihail Geshoski 135e1a2dce MDL-73863 course: Deprecate unused methods 2022-03-10 12:28:39 +08:00
Mihail Geshoski 36fe5695fe MDL-73863 course: Add tertiary navigation in completion pages 2022-03-10 12:28:39 +08:00
Jun Pataleta d93739be3f Merge branch 'MDL-73520_replace-deprecated-php_errormsg-with-error_get_last' of https://github.com/ziegenberg/moodle 2022-03-10 12:28:28 +08:00
Ilya Tregubov 3e056f0999 Merge branch 'MDL-74136-master' of https://github.com/junpataleta/moodle 2022-03-10 09:25:11 +06:00
Ilya Tregubov 441ed4c180 Merge branch 'MDL-67428-filter-context' of https://github.com/Peterburnett/moodle 2022-03-10 09:04:05 +06:00
Shamim Rezaie babf9e5770 Merge branch 'master_MDL-67802_2' of https://github.com/mattporritt/moodle 2022-03-10 08:57:16 +11:00
Eloy Lafuente (stronk7) 558f852ff8 Merge branch 'MDL-74007' of https://github.com/timhunt/moodle 2022-03-09 20:59:57 +01:00
Sara Arjona 87da5630ae Merge branch 'MDL-74104-master' of https://github.com/ferranrecio/moodle 2022-03-09 18:23:12 +01:00
Eloy Lafuente (stronk7) 2758101a75 Merge branch 'MDL-73737' of https://github.com/paulholden/moodle 2022-03-09 16:43:20 +01:00
Sara Arjona c67453cff2 Merge branch 'MDL-73586' of https://github.com/stronk7/moodle 2022-03-09 16:26:13 +01:00
Sara Arjona d1eb8aef66 Merge branch 'MDL-71807' of https://github.com/stronk7/moodle 2022-03-09 16:22:02 +01:00
Jun Pataleta 99f0eacda6 Merge branch 'MDL-74085-master' of https://github.com/sharidas/moodle 2022-03-09 22:45:59 +08:00
Sara Arjona 7fe83dfe2c Merge branch 'MDL-73923_tool_task_cronrunning-has-very-tight-limits-on-checking-cron-interval-and-expected-frequency' of https://github.com/ziegenberg/moodle 2022-03-09 13:52:51 +01:00
Sujith Haridasan d67e15a2c4 MDL-74085 data: Add entry button should follow max allowed entries
When max entries is set in the database activity, the students
should not see the 'Add entry' button if they have reached the
maximum allowed entries.
2022-03-09 18:14:24 +05:30
Sara Arjona 9b5da4de17 Merge branch 'MDL-73993-master' of https://github.com/golenkovm/moodle 2022-03-09 13:24:29 +01:00
sam marshall 3776b5542f MDL-74032 core_cache: Coding error before upgrade with versioned cache
In certain cases where it doesn't already redirect to run the upgrade,
users could see an exception 'Unexpectedly found non-versioned cache
entry'. This change ensures the upgrade happens instead.
2022-03-09 12:11:14 +00:00
Sara Arjona 869b0fb1bb Merge branch 'MDL-73779_dynreg_sup_msgs' of https://github.com/cengage/moodle 2022-03-09 13:11:12 +01:00
Ferran Recio 37893f9878 MDL-74104 mod_folder: fix recent activity with forcedownload links
The folder module has a setting to force the download links. However,
the recent activity block ignored this setting until now.
2022-03-09 13:05:55 +01:00
Amaia Anabitarte c36ab09b66 MDL-74075 core_badges: Check accepted criterias 2022-03-09 12:31:29 +01:00
Paul Holden 134773553d MDL-74144 user: add cancel button to user private files form. 2022-03-09 11:31:06 +00:00
Ilya Tregubov bf842246c6 Merge branch 'MDL-73549-master-2' of https://github.com/HuongNV13/moodle 2022-03-09 16:41:02 +06:00
Amaia Anabitarte 6c1adeec74 MDL-74142 mod_assign: Show time limit information to teachers 2022-03-09 11:08:14 +01:00
Jun Pataleta 8ac5e00dd4 Merge branch 'MDL-74097' of https://github.com/stronk7/moodle 2022-03-09 17:59:04 +08:00
Jake Dallimore 3a6aa8ceeb MDL-74138 auth_lti: fix unique key definition in upgrade 2022-03-09 17:36:22 +08:00
Ilya Tregubov aa53d83114 Merge branch 'MDL-72504-master' of https://github.com/aanabit/moodle 2022-03-09 10:05:41 +06:00
Ilya Tregubov cb48ea4f7e Merge branch 'MDL-74118-master' of https://github.com/aanabit/moodle 2022-03-09 09:50:21 +06:00
Jun Pataleta d96e5a9620 MDL-74136 theme_boost: Display blocks drawer icon properly on RTL 2022-03-09 10:07:11 +08:00
Matt Porritt 07d40a91ee MDL-67802 Authentication: Allow disabling email verification for OAuth
Allow email account verification to be disabled for any Oauth2 provider.
Also add clear indications to administrators of the danger of doing do,
this is done by an additional form checkbox.
This patch also reverts MDL-66598
2022-03-09 01:12:38 +00:00
Paul Holden 598698bc10 MDL-74100 course: relax initial parameter types of external methods.
These methods can be called via UI, and would throw confusing exceptions
if a user entered "unsafe" characters in a search input (e.g. "<").

Defer cleaning of supplied text to inside the methods.
2022-03-08 21:13:02 +00:00
Mihail Geshoski bc0cb6be01 MDL-74087 theme_boost: Remove breadcrumb nodes that exist in primary nav
Generally, we want to avoid displaying any breadcrumb nodes which are
already present in the primary navigation menu. Currently, this is done
by manually specifying which breadcrumb node (by its identification key)
should be removed. This change provides more reliable, automatic removal
of these breadcrum nodes by utilizing the exising method
remove_items_that_exist_in_navigation().
2022-03-09 00:02:26 +08:00
Sara Arjona 68a5612ec2 Merge branch 'MDL-73846-master' of https://github.com/golenkovm/moodle 2022-03-08 16:34:40 +01:00
Eloy Lafuente (stronk7) 2e48f924e7 MDL-73586 phpunit: Simply, remove the setting
It's not available since PHP 7.0, so no use at all.
2022-03-08 14:56:59 +01:00
Eloy Lafuente (stronk7) cb95e0b707 MDL-73586 mod_wiki: Removed php init param for php80 and up
For PHP 8 and up, the 'mbstring.func_overload' doesn't exist
anymore, so skip any check/condition based on it.

The patch has been done that way, so it's easier to remove
the whole block of code once PHP 8.0 becomes our min supported
PHP version.

The change is self-coveres (changes the external and its own tests).
2022-03-08 14:56:49 +01:00
Davo Smith 4202104a2e MDL-74123 h5p: delete any existing files when downloading new files 2022-03-08 13:52:26 +00:00
Amaia Anabitarte 7d5190433a MDL-72504 block_myoverview: Show starred course changes 2022-03-08 13:40:43 +01:00
Michael Hawkins c2794752ea MDL-74074 badges: Ensure profile criteria exists before completion check 2022-03-08 11:59:25 +00:00
Eloy Lafuente (stronk7) 254108755a MDL-73586 mustache.php: Removed php init param for php80 and up
The 'mbstring.func_overload' php init setting was removed for
php80 (it was deprecated since php72). So it won't evaluate to
true ever, so the whole block can be put under php version condition.

Note that this is already fixed upsteam, for commit:
https://github.com/bobthecow/mustache.php/commit/e7165a33b282ab4d20b3863825caadb46313d62b

And it has been released with version 2.14.1 of the library, so, once
we upgrade to it, the fix will be incorporated.
2022-03-08 12:35:01 +01:00
Bas Brands 322f13207a MDL-73908 block_calendar_upcoming: new mod icons 2022-03-08 11:07:38 +01:00
Bas Brands 1c3e12e71b MDL-73908 block_recentlyaccassitems: new mod icons 2022-03-08 11:02:46 +01:00
Eloy Lafuente (stronk7) a5c91474ee MDL-71807 cleanup: Replace deprecated codingStandardsIgnore annotations
The PHP_CodeSniffer @codingStandardsIgnore annotations are deprecated
and, since version 3.x, the new // phpcs:ignore comments should be used
instead.

This commits just reviews all the uses in core, replacing them for
the better new candidate, or removing when no longer needed.
2022-03-08 10:48:53 +01:00
Eloy Lafuente (stronk7) 1af724e105 MDL-74097 core_text: Add some tests to cover all the logic 2022-03-08 10:37:47 +01:00
Eloy Lafuente (stronk7) 3255c42bf4 MDL-74097 core_text: Add coverage info to better see what's missing 2022-03-08 10:37:47 +01:00
Eloy Lafuente (stronk7) 2def80568b MDL-74097 core_text: Ensure that transliteration always happens
Before the patch, transliteration was only happening when the
encoding of the string was utf-8. For other encodings only a
simpler conversion (iconv) to ascii was done. For some reason
iconv() own transliteration abilities are not consistent
between systems (depends of libraries installed, locales and
other bits).

So now we always convert the string to utf-8, in order to
transliterate it. And finally, also perform an iconv to
cover some characters that transliterate doesn't handle ok.

Also, remove a block of code that does nothing (previously
it was executing some code, but now it just sets and restores
the error level for nothing).
2022-03-08 10:37:47 +01:00
Paul Holden addd4f894d MDL-72972 tool_uploaduser: observe capability to delete users. 2022-03-08 10:04:20 +01:00
cescobedo 4025695552 MDL-71722 h5plib_v124: Add required changes after lib upgrade 2022-03-08 10:04:20 +01:00
cescobedo 1b5af6aa4f MDL-71722 h5plib_v124: Upgrade ckeditor to 4.17.1 2022-03-08 10:04:20 +01:00
Ilya Tregubov e118f7576b MDL-71703 lib: update phpmailer to 6.5.3 2022-03-08 10:04:20 +01:00
Eloy Lafuente (stronk7) 01eb6d2e9b on-demand release 4.0beta+ 2022-03-08 10:02:22 +01:00
Amaia Anabitarte 34b75603af MDL-74118 themes: Last section style when one section per page 2022-03-08 09:40:31 +01:00
Huong Nguyen 481cfdc3f0 MDL-73549 Course: My course page menu improvement
- Introduce core_course_category::get_nearest_editable_subcategory()
 - This function will return the first creatable/manageable category
for current user
 - With this new function, we can fix the issue that the users with
course management or creation permision at category level cannot see
the manage menu on My courses page
2022-03-08 14:25:19 +07:00
Peter Dias 5bb98d99ec MDL-73344 reports: Include the user/report node based on context
Properly indicate the report node based on context.
2022-03-08 13:59:00 +08:00
Jun Pataleta 37519b3687 Merge branch 'MDL-72646-font-mimetype' of https://github.com/doctorlard/moodle 2022-03-08 12:18:41 +08:00
Ilya Tregubov bdd0356fde Merge branch 'MDL-66940-master' of https://github.com/sarjona/moodle 2022-03-08 05:01:47 +02:00
Shamim Rezaie d237361d4a MDL-71305 core_question: Deprecate notflagged language string 2022-03-08 13:45:18 +11:00
Shamim Rezaie bc8bf406c8 MDL-71305 core_question: Use toggle button for flag question element 2022-03-08 13:45:18 +11:00
Jun Pataleta ecfc31191c Merge branch 'MDL-74106' of https://github.com/paulholden/moodle 2022-03-08 09:46:29 +08:00
Mikhail Golenkov ae80480ebe MDL-73846 assignfeedback_editpdf: Add limit for convert_submissions task 2022-03-08 12:36:13 +11:00
Shamim Rezaie c6a74d4752 MDL-74033 theme_boost: Ability to remove primary nav items in boost 2022-03-08 11:39:38 +11:00
Víctor Déniz 2ac75e55a9 Merge branch 'MDL-74090-master' of https://github.com/junpataleta/moodle 2022-03-08 00:00:19 +00:00
Paul Holden 2916f89d12 MDL-74106 reportbuilder: handle non-recurring schedules properly.
When a schedule is created with "No recurrence", it should only be
sent when both conditions are true: it's start time is after the
current time; and the time it was last sent is before it's start
time (either 0/never sent; or a time it was manually sent).
2022-03-07 15:47:33 +00:00
Shamim Rezaie e016d20e5f MDL-71305 core_question: Remove duplicate strings 2022-03-07 11:28:10 +11:00
Mahmoud Kassaei 1bf0fa4719 MDL-73760 Quiz: Manual grading report does not handle separate groups
when the user is not in any group
2022-03-05 13:24:33 +00:00
Daniel Ziegenberg 13ad25310d MDL-73520 adodb: Remove usage of $php_errormsg from DB2 driver
This applies #791 from upstream libraries: https://github.com/ADOdb/ADOdb/issues/791

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-05 14:19:50 +01:00
Daniel Ziegenberg f60f6dfade MDL-73520 general: replace deprecated php_errormsg with error_get_last()
For a better PHP8 compatibility this commit replaces the deprecated $php_errormsg
with error_get_last().

The PHP 8.0 migration guide (https://www.php.net/manual/de/migration80.incompatible.php) says:
    The track_errors ini directive has been removed.
    This means that php_errormsg is no longer available.
    The error_get_last() function may be used instead.
Also the documentation on $php_errormsg (https://www.php.net/manual/en/reserved.variables.phperrormsg.php) says:
    This feature has been DEPRECATED as of PHP 7.2.0.
    Relying on this feature is highly discouraged.
    Use error_get_last() instead.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-05 14:19:48 +01:00
Jun Pataleta 3314000eaf MDL-74090 core: Proper RTL/LTR display of collapsed icons 2022-03-05 00:45:32 +08:00
Eloy Lafuente (stronk7) 87791a13a4 Merge branch 'MDL-74020' of https://github.com/paulholden/moodle 2022-03-04 16:52:21 +01:00
Paul Holden ad7583cd33 MDL-74076 reportbuilder: deterministic ordering of schedule users.
Now that we have consistent ordering we can also revert 898f3d0a.
2022-03-04 15:25:22 +00:00
Shamim Rezaie a9d8207da9 Merge branch 'MDL-73824' of https://github.com/stronk7/moodle 2022-03-05 00:39:29 +11:00
Eloy Lafuente (stronk7) 93b59411f1 Merge branch 'MDL-73954' of https://github.com/timhunt/moodle 2022-03-04 14:20:27 +01:00
Marc-Alexandre Ghaly 3e09319e7a MDL-72890 core_question : Question regrade for question versions
This commit implements a question regrade for the selected
version in the quiz for a slot.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Tim Hunt <tim.hunt@open.ac.uk>
2022-03-04 23:06:50 +11:00
Tim Hunt 4f99e92a81 MDL-73954 quiz: fix decimal places for the percentage on review page 2022-03-04 11:58:16 +00:00
Eloy Lafuente (stronk7) c111717ffb Merge branch 'MDL-74042-master' of https://github.com/jleyva/moodle 2022-03-04 12:19:22 +01:00
Sara Arjona bc7dec8c2b MDL-66940 badges: Create page to display badges info
The OBv2.0 specification includes a field "Criteria" for
BadgeClass. Until now, this field was filled using the
URL of the badge assertion, but that is causing some issues
in Badgr because it linked to the badge assertion of the
first user sending this badge to the Badgr backpack (so then,
the following users linked to the first user assertion page
too).

This patch adds a new page, badgeclass.php which will be
used from now to display any badge information which is
not related to any assertion (like happens with the criteria
in BadgeClass).
2022-03-04 12:18:59 +01:00
Tim Hunt 61f11f848d MDL-74007 quiz: questions should start as 'Always latest' version
Thanks to Safat Shahin <safatshahin@catalyst-au.net> for help with
the Behat scenarios.
2022-03-04 10:59:13 +00:00
Jun Pataleta 1aa65fbdfe Merge branch 'MDL-73902-master' of https://github.com/bmbrands/moodle 2022-03-04 18:28:18 +08:00
Eloy Lafuente (stronk7) 43b4e6b339 MDL-73824 test: Cover all the changed code with special decsep tests
Various tests have been added to cover the points fixed in the previous
commit, using a localised decimal separator (#). Using the same
numbering, here there are the details:

A. grade/report/singleview/tests/behat/singleview.feature
   grade/tests/behat/grade_category_validation.feature

B. grade/tests/behat/grade_override_letter.feature

C. (done within various scenarios)

D. grade/report/singleview/tests/behat/singleview.feature

E. admin/tool/behat/tests/behat_form_text_test.php

F. grade/tests/behat/grade_to_pass.feature
   mod/lesson/tests/behat/lesson_informations_at_end.feature

G. quiz/tests/behat/preview.feature

H. mod/quiz/tests/behat/info_page.feature

I. question/type/ddimageortext/tests/behat/edit.feature
2022-03-04 10:22:49 +01:00
Eloy Lafuente (stronk7) 3a016e2784 MDL-73824 gradebook: Add support for localised floats where missing
It has been detected, thanks to php80 specially, that there are
various places in core where support for localised floats is
missing. Before php80, some locale-dependent conversions were
performed by PHP, allowing things to work. But with php80 all
those comparisons are now locale-independent. See:

https://wiki.php.net/rfc/locale_independent_float_to_string

That implies that we now need to, always, unformat floats to
be internally the correct (decimal point as separator) in
order to compare it.

While this was visited in the php80 epic (MDL-70745), nothing
was found, all automated tests were passing ok. Problem is that
we run behat tests with en-AU laguage that has the decimal point
separator.

So, in this issue we are fixing all the problems detected by
running those Behat tests using localised (comma) decimal
separator.

Note that there may be other places still causing problems, but
it's really hard to find them programmatically, so we'll have to
wait for real use reports / issues and go fixing them while they
happen.

Back to this commit, this is the list of changes performed (note that
in the next commit, we'll be adding scenarios explicitly using
a localised decimal separator to ensure that they work ok).

A. Changes to various grade forms to ensure that, on their validation
  floats are unformatted properly. Also, changed the corresponding
  form element from current text/PARAM_RAW to proper float ones that
  take care of the conversion in a number of places (but when disabled,
  that's the reason we still have to unformat in validation.
  This includes the following forms:
    - edit_category_form
    - edit_item_form
  (this is the original problem reported that cause all the research
  to be performed against full behat runs)

B. Changes to edit_letter_form, so it uses a proper PARAM_LOCALISEDFLOAT
  (note this is the type of change that surely should be used for all
  the rest of /grade/edit/tree form, including those in the previous
  point).

C. Changes to the grade_item behat generator, so it's able to work with
  localised floats, un-formatting them when needed.
  At lib/behat/classes/behat_core_generator.php

D. Fix problem passing localised floats to scales, not displaying
  properly. At grade/report/singleview/classes/local/ui/finalgrade.php

E. Change the behat text matcher in order to allow comparison of
  localised floats when they are the current ones. Before this change
  the matches was using soft/lazy comparison, so '50' and '50.0000'
  match. Now, when the comma (for example) is used (and only then),
  '50' and '50,000' will also match. This comparison is in use in a
  bunch of tests and makes sense to make it localisation-aware.
  At grade/report/singleview/classes/local/ui/finalgrade.php

F. Fix a couple of number_format() uses in lesson, because they are
  not localised-aware. Switched to format_float(). At mod/lesson/locallib.php

G. Change the quiz_contains_the_following_questions() step to accept
  localised maxmark expectations. At mod/quiz/tests/behat/behat_mod_quiz.php

H. Change the quiz generator so it accepts localised gradepass.
  At mod/quiz/tests/generator/lib.php

I. Change the edit question form to show proper localised penalties,
  previously it was always showing point-decimal ones. Of course,
  leaving the values of the select element unmodified (internal floats).
  Related, also change a couple of tests to, instead of try to match the
  value (always internal floats), match the description (now localised),
  so we can test them with different separators. At:
    - question/type/ddimageortext/tests/behat/backup_and_restore.feature
    - question/type/ddmarker/tests/behat/backup_and_restore.feature
    - question/type/edit_question_form.php
2022-03-04 10:22:49 +01:00
Jake Dallimore 7192744443 Merge branch 'MDL-74048-master' of https://github.com/bmbrands/moodle 2022-03-04 16:18:31 +08:00
Jake Dallimore 8ccf8390c3 Merge branch 'MDL-73796-master' of https://github.com/bmbrands/moodle 2022-03-04 14:56:09 +08:00
Jun Pataleta c9d466cb80 Merge branch 'MDL-73799' of https://github.com/stronk7/moodle 2022-03-04 14:47:39 +08:00
Jun Pataleta e9ee905619 Merge branch 'MDL-73785' of https://github.com/stronk7/moodle 2022-03-04 14:36:47 +08:00
Jun Pataleta 4aa63901c3 Merge branch 'MDL-73906-master' of https://github.com/bmbrands/moodle 2022-03-04 13:06:43 +08:00
Peter Spicer edde68e078 MDL-67428 navigation: Apply navigation text filters at system context
On some larger sites, processing the navigation with format_string will
habitually load all the contexts for navigation which can take 400+ DB
queries. Explicitly tying all those format_string calls to the system
context reduces this overhead to a single DB query that probably has
already been run on the page previously.

Co-authored-by: Peter Burnett <peterburnett@catalyst-au.net>
2022-03-04 14:36:25 +10:00
Jake Dallimore 9be31a19dd Merge branch 'MDL-73457-master-2' of https://github.com/HuongNV13/moodle 2022-03-04 11:59:26 +08:00
Jake Dallimore 84160619c6 Merge branch 'MDL-74002' of https://github.com/Chocolate-lightning/moodle 2022-03-04 10:24:48 +08:00
Shamim Rezaie 29c14e979b Merge branch 'MDL-74045-master' of https://github.com/bmbrands/moodle 2022-03-04 10:13:05 +11:00
Eloy Lafuente (stronk7) 3965067836 Merge branch 'MDL-64770' of https://github.com/paulholden/moodle 2022-03-03 23:20:26 +01:00
Sara Arjona 4495182ac5 Merge branch 'MDL-72915-master' of https://github.com/HuongNV13/moodle 2022-03-03 17:30:54 +01:00
Sara Arjona a9f15ed952 MDL-73891 admin: Display a notification in manage blocks
An info notification has been added to the "Manage blocks"
page to warn admins about the "Unneeded blocks" theme setting.
2022-03-03 16:35:54 +01:00
Sara Arjona 4f95c39ef0 Merge branch 'MDL-73841-master' of https://github.com/bmbrands/moodle 2022-03-03 16:31:15 +01:00
Paul Holden 4471724bab MDL-73737 report_loglive: ensure action link popups work post-AJAX. 2022-03-03 14:02:42 +00:00
Daniel Ziegenberg a4d64bd71b MDL-73923 tool_task: make a more relaxed check on cron run interval
Prior to this change, the tool_task_cronrunning check had very tight
limits for checking the last cron interval and comparing it to the
expected frequency. When a cron job should take 1:00 min and the last
run was 1:02 min it complained that there was 1:02 between the last two
runs of the cron maintenance script and it should run every 1:00.

This change makes the check a bit more relaxed and adds an additional
minute on top of the expectedfrequency to give the cron job some time.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-03 14:27:32 +01:00
Eloy Lafuente (stronk7) b3c4bd6250 MDL-73799 phpunit: Move some test names, as agreed in the issue
- behaviourtype_test => behaviour_type_test (10)
- questiontype_test => question_type_test (16)
- upgradelibnewqe_test => upgrade_old_attempt_data_test (13)
2022-03-03 12:22:36 +01:00
Eloy Lafuente (stronk7) 68b4a13cec MDL-73799 phpunit: various question & quiz testcase names
To all the walkthrough, questiontype, question, upgradelibnewqe,
behaviourtype_test and edit_form testcase classes::

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:
- When belonging to other component and being valid api:
  - form related tests have been moved to tests/form subdir.
2022-03-03 12:22:36 +01:00
Eloy Lafuente (stronk7) 4003e31983 MDL-73785 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
2022-03-03 12:19:30 +01:00
Eloy Lafuente (stronk7) e2821bf1ce MDL-73824 gradebook: Stricter float check to some gradelib functions
It has been detected that, right now, some localised floats are
being passed to those functions (say comma separator, say thousands)
and that's leading to all sort of problems later when comparing,
processing or storing those "wrong-floats" (user entered).

This just makes all those functions to be stricter, so any attempt
of passing to them a wrong float will fail with a clear TypeError.

Any existing case must be converted to a corrrect (X.Y) format, using
unformat_float() or PARAM_LOCALISEDFLOAT before any processing.

Localised floats cannot be used.

Also, fix all the places where those functions are called from
files having strict_types enabled because, with that, now float-like
strings are not accepted any more. Luckily, there is only case,
within the grade/classes/component_gradeitem.php file, and it has
been fixed by casting the float-like string coming from DB to float.
2022-03-03 12:19:02 +01:00
Jun Pataleta 1d99ba19a2 Moodle release 4.0beta 2022-03-03 18:22:28 +08:00
Paul Holden 7f3d270a37 MDL-74071 output: code docs for activity header API to aid IDE hints. 2022-03-03 09:59:57 +00:00
Jun Pataleta a1044ab030 NOBUG: Fixed file access permissions 2022-03-03 17:51:53 +08:00
Jun Pataleta 96e5418134 NOBUG: Fixed SVG browser compatibility 2022-03-03 17:51:51 +08:00
Jun Pataleta 26194eebbf Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-03-03 17:51:50 +08:00
Paul Holden 506229dd95 MDL-73999 quizaccess_seb: use raw getter in pre-validate method.
Changes in 78735a72 made the persistent `get` method return property
values consistently, according to their type and nullability.

The rule `templateid` property is not nullable, but still has code
that treats it as such. Fix that by retrieving the raw value.
2022-03-03 09:34:21 +00:00
Bas Brands 729ae8f096 MDL-73902 theme_boost: prevent dropdowns being cut off 2022-03-03 09:44:33 +01:00
Tomo Tsuyuki 25a6a42477 MDL-74072 cachestore_redis: Add error check for envoy proxy 2022-03-03 17:16:52 +11:00
Jake Dallimore cfdd51a0da Merge branch 'MDL-73996-master-fix' of https://github.com/junpataleta/moodle 2022-03-03 11:30:51 +08:00
Jun Pataleta 898f3d0a82 MDL-73996 reportbuilder: Assert task log contains expected strings
* Ordering issues from \core_reportbuilder\local\helpers\schedule's
get_schedule_report_users() method won't guarantee that the expected
task log output will always be the same as user two can be fetched first
before user one which will cause the message to be sent to user two
first. So just get the task log's output string and make sure it
contains the expected log strings.
2022-03-03 11:09:59 +08:00
Jake Dallimore 350d7b9515 Merge branch 'MDL-73645-integration-master' of https://github.com/mihailges/moodle 2022-03-03 10:24:09 +08:00
Mikhail Golenkov 8c914c8756 MDL-73993 phpdoc: get_module_types_names returns lang_string objects 2022-03-03 10:39:09 +11:00
Eloy Lafuente (stronk7) 8d362e7249 Merge branch 'MDL-73996' of https://github.com/paulholden/moodle 2022-03-02 23:15:11 +01:00
Eloy Lafuente (stronk7) d59b644d37 Merge branch 'master_MDL-71636-test-fix' of https://github.com/catalyst/moodle-MDL-70329 2022-03-02 21:23:51 +01:00
Mihail Geshoski 5de4513f3d MDL-73645 theme_boost: Type identifier when removing breadcrumb nodes
Introduces an additional type identifier argument to the remove() method.
This argument is optional and can be used to further specify the type of
the breadcrumb node we want to remove. This can add additional security
that the correct item is being removed.
2022-03-03 03:38:26 +08:00
Shamim Rezaie 25395ab58c Merge branch 'MDL-73742-master' of https://github.com/ferranrecio/moodle 2022-03-03 06:07:26 +11:00
Sara Arjona ee480f04fb Merge branch 'MDL-73169-integration-master' of git://github.com/mihailges/moodle 2022-03-02 18:23:12 +01:00
Safat Shahin cceabf651f MDL-71636 qbank_columnsortorder: unit and behat test fix 2022-03-02 11:26:36 -05:00
Bas Brands aa134f981b MDL-74048 theme_boost: category manament nav margins 2022-03-02 16:50:24 +01:00
Ferran Recio 1501968e95 MDL-73742 theme_boost: fix double open block drawer title 2022-03-02 16:08:20 +01:00
Eloy Lafuente (stronk7) bdedb3f9c9 Merge branch 'MDL-73953-master' of https://github.com/aanabit/moodle 2022-03-02 14:33:07 +01:00
Shamim Rezaie 96100fc518 Merge branch 'MDL-73880-master-integration' of https://github.com/ferranrecio/moodle 2022-03-03 00:18:59 +11:00
Amaia Anabitarte 7a6d0015e7 MDL-73953 core_adminpresets: Fixing latest created Full preset 2022-03-02 13:45:15 +01:00
Andrew Nicols 9331de13ab MDL-71636 qbank_columnsortorder: Fix issues identified during integration 2022-03-02 20:18:41 +08:00
Andrew Nicols b15051a55f Merge branch 'MDL-71636' of https://github.com/timhunt/moodle 2022-03-02 19:56:24 +08:00
Eloy Lafuente (stronk7) facf5cbcd0 Merge branch 'MDL-73953-master' of https://github.com/aanabit/moodle 2022-03-02 12:54:12 +01:00
Amaia Anabitarte 534cc4dada MDL-73953 core_adminpresets: Apply fullpreset setting changes 2022-03-02 12:49:02 +01:00
Amaia Anabitarte c0196fb096 MDL-73953 core_adminpresets: Marking core presets on DB 2022-03-02 12:49:01 +01:00
Mihail Geshoski 9452555b35 MDL-73169 theme_boost: Add behat tests 2022-03-02 19:34:08 +08:00
Mathew May 030ade06ff MDL-74002 admin: Change conditions for rendering nav tabs 2022-03-02 19:29:47 +08:00
Bas Brands a31cade872 MDL-74045 theme_boost: set the base layout to drawers 2022-03-02 11:07:45 +01:00
Mihail Geshoski c427883cb7 MDL-73169 contentbank: Update the breadcrumb nodes and nav highlighting 2022-03-02 17:34:13 +08:00
Ferran Recio ce887084fe MDL-73880 core_courseformat: fix section availability box 2022-03-02 10:31:59 +01:00
Mihail Geshoski bcec96f952 MDL-73169 theme_boost: Update course category breadcrumb nodes 2022-03-02 17:29:35 +08:00
Mihail Geshoski 1388ce84a2 MDL-73169 tool_lp: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski 5a1e70573d MDL-73169 core_backup: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski e949e1a33b MDL-73169 core_filter: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski 0cbe8704ee MDL-73169 core_cohort: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski 8469f9e724 MDL-73169 core_role: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski 805a9eebf5 MDL-73169 core_course: Update course category breadcrumb nodes 2022-03-02 17:27:38 +08:00
Mihail Geshoski 3a333176d1 MDL-73169 course: Add a general setup method for the category pages 2022-03-02 17:27:35 +08:00
Cameron Ball 53d3843955 MDL-54724 qtype_multianswer: Better handle corrupted questions
When questions are deleted, we now check if the parent is in use before deletion.

Prior to this, it would be possible for multianswer questions to reference
questions that have been deleted. This results in fatal errors when the quiz
is viewed.

This patch uses a dummy 'subquestion_replacement' to handle this case and
display some information to the end user about what has happened so that
they may take action to repair the corrupted question.

As a result of the bug described above, the sequence column of
mdl_question_multianswer can contiain references to questions that no
longer exist, and these IDs can make their way in to backups.

When this happens, the backups cannot be restored. To avoid this,
this patch skips trying to restore those questions that reference
question IDs that no longer exist (as there is no way to recover them).
2022-03-02 17:12:19 +08:00
Marc-Alexandre Ghaly 6dc1084c47 MDL-71636 qbank_columnsortorder: Add a columnsortorder settings page
This implementation will introduce a feature "columnsortorder"
which will add the column sort order feature in an external page.
Having this feature will give users the flexibility of sorting plugin
columns in the question bank view.
2022-03-02 09:08:50 +00:00
Amaia Anabitarte 77ca86bf87 MDL-73953 core_adminpresets: Upgrading presets with different language 2022-03-02 09:42:46 +01:00
Marc-Alexandre Ghaly 7c016b3451 MDL-71636 core_question : API changes for column_base
This commit implements methods visibility changes to column_base class
and its child classes.
2022-03-02 08:14:48 +00:00
Jun Pataleta 7fe8e34f7d Merge branch 'MDL-73939-master' of git://github.com/rezaies/moodle 2022-03-02 14:34:12 +08:00
Jake Dallimore c08caf57c5 Merge branch 'MDL-73645-master-1' of git://github.com/mihailges/moodle 2022-03-02 14:10:19 +08:00
Jun Pataleta 7ac5deaced Merge branch 'MDL-73462-master' of https://github.com/peterRd/moodle 2022-03-02 13:46:10 +08:00
Mihail Geshoski 2a09a3ff76 MDL-73645 theme_boost: Keep section breadcumb item in specific layouts
Avoids removing the section breadcrumb nodes in the course module
context when the course uses the 'One section per page' layout.
Additionaly, it also removes the Courses and Category breadcrumb
nodes in the module contexts to be consistent with the way the
breadcrumbs are displayed in the course context.
2022-03-02 13:01:03 +08:00
Mihail Geshoski 3e24811c00 MDL-73645 course: Update breadcrumb nodes in the course reset page 2022-03-02 13:00:25 +08:00
Mihail Geshoski 1b2c0e6faf MDL-73645 badges: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Mihail Geshoski e7d9be51ab MDL-73645 core_contentbank: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Mihail Geshoski 724578a008 MDL-73645 grades: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Mihail Geshoski 1060ee827c MDL-73645 core_group: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Mihail Geshoski 8968b51c6b MDL-73645 core_enrol: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Mihail Geshoski 2ee1e6053c MDL-73645 theme_boost: Re-implement breadcrumbs in the course context 2022-03-02 13:00:25 +08:00
Peter Dias 4d5a25ffde MDL-73462 navigation: Leverage participants bar for category 2022-03-02 12:27:02 +08:00
Shamim Rezaie 6a1078da7c Merge branch 'MDL-73990-master' of https://github.com/sharidas/moodle 2022-03-02 12:55:34 +11:00
Sujith Haridasan a2b003a917 MDL-73990 mod_assign: Show the activity info and attachments
Show the activity information in the view page and add/edit submission
page.
- Removed the line change to disable activity header. This should help
    - When any additional files are attached to the assignment by the
      teacher/admin they should be displayed in the view and add/edit
      submission page (in the default settings)
- Added more padding to the "Add submission" button.
- Changed the string 'Activity' to 'Activity instructions'.
2022-03-02 07:07:19 +05:30
Eloy Lafuente (stronk7) 1920243b79 Merge branch 'MDL-73756-master' of https://github.com/lameze/moodle 2022-03-01 19:46:21 +01:00
Eloy Lafuente (stronk7) fba1593893 Merge branch 'MDL-73941' of https://github.com/paulholden/moodle 2022-03-01 16:10:37 +01:00
Eloy Lafuente (stronk7) 9dde12dc99 Merge branch 'MDL-72092-master' of https://github.com/Chocolate-lightning/moodle 2022-03-01 14:55:02 +01:00
Bas Brands 62fadb8ddb MDL-73906 core_my: default dashboard page header 2022-03-01 14:12:22 +01:00
Bas Brands 757b8c636e MDL-73796 theme_boost: mobile navcrumb design 2022-03-01 13:55:32 +01:00
Juan Leyva c112780113 MDL-74042 vimeo: Support security hash for restricted videos 2022-03-01 13:32:34 +01:00
Bas Brands fa6e4b2c9e MDL-73593 theme_boost: update boost top margins 2022-03-01 13:09:08 +01:00
Ilya Tregubov 47e880e347 Merge branch 'master_MDL-72448-qank_history' of https://github.com/catalyst/moodle-MDL-70329 2022-03-01 13:49:19 +02:00
Jun Pataleta 0dca278d71 MDL-72737 core: Rebuild JS modules 2022-03-01 19:22:24 +08:00
Mathew May b0532aedd8 MDL-72092 behat: Add private files block where needed 2022-03-01 19:13:20 +08:00
Peter Dias f456c349a0 MDL-72092 recentlyaccesseditems: Change the default block location
Add/Change the default location of the block on /my pages
2022-03-01 19:13:20 +08:00
Peter Dias a190e2defc MDL-72092 timeline: Change the default location for the block
Add/Change the default location of the block on /my pages
2022-03-01 19:13:20 +08:00
Peter Dias b12508c19a MDL-72092 calendar_month: Change the default location for the block
Add/Change the default location of the block on /my pages
2022-03-01 19:13:20 +08:00
Jun Pataleta 0f35a9b7f9 Merge branch 'MDL-72737-master-2' of https://github.com/bmbrands/moodle 2022-03-01 19:06:52 +08:00
Bas Brands 2faf5e8e48 MDL-72737 theme_boost: update for section header styles 2022-03-01 12:01:59 +01:00
Jun Pataleta d8cadf7ecf Merge branch 'MDL-73462-master' of https://github.com/peterRd/moodle 2022-03-01 18:32:05 +08:00
Peter Dias 081b255ab0 MDL-73462 navigation: Behat test update 2022-03-01 17:57:24 +08:00
Peter Dias b9f9aae134 MDL-73462 course: Update visible nodes in a cat context. 2022-03-01 17:57:24 +08:00
Peter Dias f1959af7f6 MDL-73462 course: Introduce course category tertiary navigation
Update the category management page.
2022-03-01 17:57:24 +08:00
Paul Holden 5f810c4724 MDL-74020 course: update how required libraries are loaded in test.
Test data providers are executed before `setUpBeforeClass`, so any
library constants used by the providers must already be present.

Reverts part of the change in 691c5b83.
2022-03-01 09:33:35 +00:00
Jun Pataleta 1569398c56 Merge branch 'wip_MDL-73877_master' of https://github.com/gjb2048/moodle 2022-03-01 10:09:18 +01:00
Shamim Rezaie 54ea9e4f44 Merge branch 'MDL-73679-master-2' of https://github.com/andrewnicols/moodle 2022-03-01 10:05:09 +01:00
Bas Brands 137b2dd638 MDL-73841 block_myoverview: use text for selectors 2022-03-01 09:18:37 +01:00
Andrew Nicols 1c7a3712fd MDL-73679 core_courseformat: Move section content to separate template
Course formats may want to preserve the existing section information,
but either change the wrapper (.section .course-section-header), or
prepend and append additional content to it.

Prior to this change, the only way to do this was by copying the entire
content of the template.

This change moves the content of the .course-section-header to a
separate template.

This means that a course format can replace the .section
.course-section-header wrapper whilst retaining its content by
overriding the content/section template and including the
content/section/content template. For example:

```
<li id="section-{{num}}"{{!
    }} class="section course-section main clearfix{{!
    }}{{#onlysummary}} section-summary{{/onlysummary}}{{!
    }}{{#ishidden}} hidden{{/ishidden}}{{!
    }}{{#iscurrent}} current{{/iscurrent}}{{!
    }}{{#isstealth}} orphaned{{/isstealth}}{{!
    }}"
    data-sectionid="{{num}}"
    data-sectionreturnid="{{sectionreturnid}}"
    data-for="section"
    data-id="{{id}}"
    data-number="{{num}}"{{!
}}>

  <!--
      Add a custom div to the existing wrapper, without replacing the
      entire content of the section/content.
  -->
  <div class="my-custom-content">

    <!--
        The upstream content is here:
    -->
    <div class="course-section-header d-flex"
        data-for="section_title"
        data-id="{{id}}"
        data-number="{{num}}"
    >
        {{$ core_courseformat/local/content/cm/section/content }}
            {{> core_courseformat/local/content/cm/section/content }}
        {{/ core_courseformat/local/content/cm/section/content }}
    </div>

  </div>

</li>
```

It also means that a course format can append additional information to
this wrapper, for example:

```
{{< core_courseformat/local/content/section }}
    {{$ core_courseformat/local/content/cm/section/content }}
        <div class="some-custom-class">
            <!--
                Some custom content appended _before_ the course section
                content but within the wrapper
            -->
        </div>

        {{> core_courseformat/local/content/cm/section/content }}

        <div class="some-custom-class">
            <!--
                Some custom content appended _after_ the course section
                content but within the wrapper
            -->
        </div>
    {{/ core_courseformat/local/content/cm/section/content }}
{{/ core_courseformat/local/content/section }}
```
2022-03-01 12:03:47 +08:00
Andrew Nicols 9771a81a12 MDL-73679 core_courseformat: Move activity content to separate template
Course formats may want to preserve the existing activity information,
but either change the wrapper (.activity-item), or prepend and append
additional content to it.

Prior to this change, the only way to do this was by copying the entire
content of the template.

This change moves the content of the activity-item to a separate
template.

This means that a course format can replace the activity-item wrapper
whilst retaining its content by overriding the cm template and including
the cm/activity template. For example:

```
<div class="my-custom-activity-item {{!
        }}{{#modstealth}}hiddenactivity{{/modstealth}}{{!
        }}{{#modhiddenfromstudents}}hiddenactivity{{/modhiddenfromstudents}}{{!
        }}{{#modinline}}activityinline{{/modinline}}" data-activityname="{{activityname}}">
    {{#moveicon}} {{{moveicon}}} {{/moveicon}}
    {{$ core_courseformat/local/content/cm/activity }}
        {{> core_courseformat/local/content/cm/activity }}
    {{/ core_courseformat/local/content/cm/activity }}
</div>
```

It also means that a course format can append additional information to
this wrapper, for example:

```
{{< core_courseformat/local/content/cm }}
    {{$ core_courseformat/local/content/cm/activity }}
        {{> core_courseformat/local/content/cm/activity }}
    {{#cmmeta}}
    <div class="ct-activity-meta-container">
        {{{cmmeta}}}
    </div>
    {{/cmmeta}}
    {{/ core_courseformat/local/content/cm/activity }}
{{/ core_courseformat/local/content/cm }}
```
2022-03-01 12:03:47 +08:00
Andrew Nicols ccb7d6db62 MDL-73679 courseformat: Wrap template inclusions in blocks 2022-03-01 12:03:47 +08:00
Andrew Nicols d6052154a6 MDL-73679 courseformat: Add support for course format templating 2022-03-01 12:03:46 +08:00
Andrew Nicols b43d729c85 MDL-73679 core: Add a named_templatable interface
This interface allows a templatable to provide a template name via the
'get_template_name(): string' function and have it automatically
rendered via a standard 'render()' call.
2022-03-01 12:03:06 +08:00
Andrew Nicols 68c0b45ca3 MDL-73308 mod_bigbluebuttonbn: Ensure breakout data is in metadata 2022-03-01 12:03:01 +08:00
Safat Shahin 6c923f4bf0 MDL-72448 qbank_history: Add history plugin to core
This implementation will introduce history plugin to
show the versions of a question. This plugin uses the
actual qbank api to implement the feature.
2022-03-01 14:39:51 +11:00
Simey Lameze 047a947879 MDL-73756 availability: remove modinfo parameter from get_data call 2022-03-01 10:21:56 +08:00
Simey Lameze fe4fd6d817 MDL-73756 lib: deprecate modinfo parameter from get_data 2022-03-01 10:20:46 +08:00
Víctor Déniz af0e3bcadc Merge branch 'MDL-73855' of https://github.com/ssj365/moodle 2022-03-01 01:56:11 +00:00
Jun Pataleta 37e6306cda Merge branch 'MDL-73983-master' of https://github.com/dravek/moodle 2022-03-01 09:48:18 +08:00
Andrew Nicols 6544843894 Merge branch 'MDL-73762-master' of https://github.com/ferranrecio/moodle 2022-03-01 09:35:59 +08:00
Andrew Nicols 76cf33d73d Merge branch 'MDL-71714-master' of https://github.com/HuongNV13/moodle 2022-03-01 09:00:02 +08:00
AMOS bot fc405a64c6 Automatically generated installer lang files 2022-03-01 00:07:39 +00:00
Eloy Lafuente (stronk7) ea377d506b Merge branch 'MDL-73935-master' of https://github.com/mickhawkins/moodle 2022-02-28 20:30:37 +01:00
Ilya Tregubov e3306d7833 Merge branch 'MDL-73733' of https://github.com/Chocolate-lightning/moodle 2022-02-28 16:56:12 +02:00
Paul Holden 4f8aeb1cdf MDL-64770 tool_uploaduser: validate unique field values in upload.
If a custom user profile field is set to be unique, then we should
ensure that is respected in the entirety of the uploaded data.
2022-02-28 14:25:52 +00:00
Shamim Rezaie 47819a1408 Merge branch 'MDL-73830-master' of https://github.com/cescobedo/moodle 2022-03-01 01:13:47 +11:00
Shamim Rezaie 625218e0f1 Merge branch 'MDL-73732-master' of https://github.com/sharidas/moodle 2022-03-01 01:04:19 +11:00
Paul Holden 0ead4cefd2 MDL-73983 reportbuilder: fix pre-defined action title attribute.
Since switching to report actions being displayed via action menus
in 48a6e927, pre-defined action titles weren't displayed.
2022-02-28 13:37:43 +01:00
David Matamoros 8cc2a86b1b MDL-73983 reportbuilder: Don't add empty report action links 2022-02-28 13:36:08 +01:00
Jun Pataleta 94e5076ef5 Merge branch 'MDL-73595-master' of https://github.com/bmbrands/moodle 2022-02-28 20:33:31 +08:00
Jun Pataleta 396f90d6ac Merge branch 'MDL-73747-master' of https://github.com/aanabit/moodle 2022-02-28 20:11:06 +08:00
Bas Brands dd95845bf1 MDL-73595 theme_boost: make tertiary nav more distinct 2022-02-28 13:07:52 +01:00
Amaia Anabitarte acca36d2ad MDL-73747 core_messages: Complete default preferences on migration
Co-authored-by: Jun pataleta <jun@moodle.com>
2022-02-28 11:43:21 +01:00
Eloy Lafuente (stronk7) fa2121e333 Merge branch 'MDL-73745' of https://github.com/paulholden/moodle 2022-02-28 11:29:03 +01:00
Jun Pataleta 0d35ffd08d Merge branch 'MDL-73918-master' of https://github.com/bmbrands/moodle 2022-02-28 17:17:28 +08:00
Ilya Tregubov 127655326e Merge branch 'MDL-73978-master' of https://github.com/peterRd/moodle 2022-02-28 09:18:27 +02:00
Huong Nguyen 0d4069918e MDL-73457 Course: Fix drag & drop image prevents moving resources
Including in this commit:
 - Modify the UI to make the section dropzone more visible
 - Prevent the direct image dragging in Chrome, Safari by improving the check
2022-02-28 14:00:57 +07:00
cescobedo 20fd467f35 MDL-73830 h5plib_v124: Add required changes after lib upgrade 2022-02-28 07:29:47 +01:00
cescobedo 20916ff72a MDL-73830 h5plib_v124: Upgrade H5P core library to 1.24.3 2022-02-28 07:23:39 +01:00
Andrew Nicols b3e7bb58b8 Merge branch 'MDL-73833-master' of https://github.com/sarjona/moodle 2022-02-28 14:21:28 +08:00
Andrew Nicols 05ef98134e Merge branch 'MDL-73308' of https://github.com/call-learning/moodle 2022-02-28 14:06:38 +08:00
Sujith Haridasan 8e6f807f9a MDL-73732 navigation: Do not assume output of find_active_node
When handling with the output of find_active_node,
proceed ahead only if the result is an instance of navigation_node.
Else there are chances of exceptions.
2022-02-28 10:42:19 +05:30
Andrew Nicols 20a016c6e3 Merge branch 'MDL-73582-master-nocache' of https://github.com/vmdef/moodle 2022-02-28 12:50:21 +08:00
Michael Hawkins 14889c701f MDL-73935 user: Replace support link/email with site support link
This makes the support behaviour on the error page consistent with that
in the footer, and removes the support email from unauthenticated
access.
2022-02-28 12:42:47 +08:00
Michael Hawkins 533c5ccb86 MDL-73935 core: Update supportemail to accept optional custom attributes
This allows calling code such as the generic error page to define the
styles of the anchor element.
2022-02-28 12:42:47 +08:00
Michael Hawkins a0b3cf4898 MDL-73935 user: Update support form to not require SMTP setting 2022-02-28 12:42:47 +08:00
Huong Nguyen 9ea8fa37cc MDL-71714 Libraries: Upgrade VideoJS to 7.17.0 2022-02-28 09:26:33 +07:00
Eloy Lafuente (stronk7) 0159c9626e Merge branch 'MDL-73962' of https://github.com/call-learning/moodle 2022-02-27 23:36:51 +01:00
Eloy Lafuente (stronk7) dd24a77b01 Merge branch 'MDL-73917-master' of https://github.com/sarjona/moodle 2022-02-27 22:38:32 +01:00
Eloy Lafuente (stronk7) 6e6037dc3a Merge branch 'MDL-73797' of https://github.com/paulholden/moodle 2022-02-27 22:35:41 +01:00
Eloy Lafuente (stronk7) 9f0135f1b6 Merge branch 'MDL-73831-master' of https://github.com/sarjona/moodle 2022-02-27 22:33:53 +01:00
Gareth Barnard 0c7eaf95e0 MDL-73877 themes: current section border not showing on Boost theme. 2022-02-26 11:52:54 +00:00
Gareth Barnard d1a473a3d6 MDL-73877 core_course: current class not applied to highlighted section 2022-02-26 11:52:32 +00:00
Laurent David 5c719062d4 MDL-73962 mod_bigbluebuttonbn: Fix issue with buttons on recording table
* The button labels were not correctly matched with language strings resulting
 in empty buttons
2022-02-26 08:53:57 +01:00
AMOS bot 05ba0f2d45 Automatically generated installer lang files 2022-02-26 00:07:45 +00:00
Ilya Tregubov 9cd77c4130 on-demand release 4.0dev+ 2022-02-25 19:24:12 +02:00
Ilya Tregubov d31649b250 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-02-25 19:24:08 +02:00
Jun Pataleta 266589f13d Merge branch 'MDL-73335-fix' of https://github.com/ilyatregubov/moodle 2022-02-25 22:20:18 +08:00
Ferran Recio 479faca428 MDL-73762 core_courseformat: fix coursedisplay dependency
For legacy reasons, the course renderings uses a format setting to know
if the page is multiple sections per page or a single section per page.
This format specific dependency is not solved using a get_course_display
format method any plugin can extend.
2022-02-25 13:35:23 +01:00
Ferran Recio 23856b1086 MDL-73762 core_courseformat: refactor cm and section outputs 2022-02-25 13:35:23 +01:00
Ilya Tregubov 0291ea4dd0 MDL-73335 Behat: Fix Classic test. 2022-02-25 11:59:36 +02:00
Paul Holden 425f372044 MDL-73996 reportbuilder: sort caught messages prior to assertions. 2022-02-25 09:58:21 +00:00
Mathew May dd392db7a1 MDL-73733 myoverview: Improve upgrade progress reporting and queries 2022-02-25 15:19:48 +08:00
Juan Leyva 3a305dd4d1 MDL-72092 blocks: Force course overview fake block 2022-02-25 15:15:07 +08:00
Mathew May f0cedb93e8 MDL-72092 core: Re-arrange the default dashboard 2022-02-25 15:12:50 +08:00
Andrew Nicols 649705874d Merge branch 'MDL-70792-master-2' of https://github.com/junpataleta/moodle 2022-02-25 11:39:55 +08:00
Andrew Nicols 195321a377 Merge branch 'MDL-73335-integration-master' of https://github.com/mihailges/moodle 2022-02-25 11:27:59 +08:00
Andrew Nicols 641240ce63 Merge branch 'MDL-72837-master' of https://github.com/sammarshallou/moodle 2022-02-25 10:59:54 +08:00
Andrew Nicols faa6c74404 Merge branch 'MDL-73547-master-v03' of https://github.com/ferranrecio/moodle 2022-02-25 10:55:20 +08:00
Shamiso Jaravaza 2aa61b3a06 MDL-73855 mod_bigbluebuttonbn: Recording Icon settings removed 2022-02-24 18:07:05 -03:30
Mihail Geshoski 8f6c052717 MDL-73335 mod_quiz: Fix behat tests 2022-02-25 02:34:34 +08:00
Paul Holden 600cd22b0f MDL-73745 reportbuilder: check for presence of active column headers. 2022-02-24 16:26:56 +00:00
sam marshall 02bb326314 MDL-72837 core_cache: Use versioned cache for modinfo
Uses the new versioned cache feature for modinfo, which should make it
safe as a localisable cache.
2022-02-24 13:51:07 +00:00
Ilya Tregubov b4c322fc80 Merge branch 'MDL-73743-master-1' of https://github.com/peterRd/moodle 2022-02-24 13:56:54 +02:00
Jun Pataleta 13cdef5dc4 MDL-70792 output: Menu items should have -1 tab index
* As per WAI ARIA Authoring Practices 1.1 guidelines for menus,
menu items should have a tab index of -1. Navigation between menu items
is done via arrow keys.

See https://www.w3.org/TR/wai-aria-practices-1.1/#menu
2022-02-24 18:21:12 +08:00
Jun Pataleta 122b0fc91e MDL-70792 aria: Dropdown menu keyboard interaction fixes
* Move the focus to the last menu item when the menu is displayed by
pressing the Up arrow key.
* When the menu is open and Tab/Shift-Tab is pressed, focus on the
next/previous focusable element on the DOM instead of focusing back on
the menu trigger.
* Combine event handling for the dropdown menu trigger.
2022-02-24 18:21:12 +08:00
Jun Pataleta baf360a7ba Merge branch 'MDL-73915-master-terser' of https://github.com/andrewnicols/moodle 2022-02-24 17:29:17 +08:00
Ilya Tregubov be7a576994 Merge branch 'MDL-73335-tim' of https://github.com/ilyatregubov/moodle 2022-02-24 09:43:59 +02:00
Tim Hunt 2f9032a198 MDL-73335 quiz/questions: fix Behat fails from nav changes
The Classic quiz behat override is no longer needed.
The way it is implemented is Boost/core works in all cases.
2022-02-24 09:26:29 +02:00
Sujith Haridasan b610055bbd MDL-73335 question: Add the tertiary nav for question bank
The tertiary navigation has been added to the question bank.
- Url selector has been added for the pages:
  Questions, Categories, Import and Export
- A separate page to "Add category" has been added.
  The "Add category" is available as a tertiary nav button.
- Updated the tests for the changes made.

This commit is mostly Sujith's work, with further changes by
Tim Hunt <T.J.Hunt@open.ac.uk> so we share the blame/credit.

AMOS BEGIN
 CPY [questioncats,mod_quiz],[questioncategories,core_question]
AMOS END
2022-02-24 09:26:29 +02:00
Sujith Haridasan 3458d159e1 MDL-73335 mod_quiz: Add tertiary nav for the quiz module
The tertiary navigation added for quiz module.

- Added tertiary nav buttons for the edit, attempt and view page
- urlselector is added to the overrides page to access user/groups
- The secondary tabs are highlighted when user navigates to
  each page in quiz.
- Updated the behat tests for the changes made.

This commit is mostly Sujith's work, with further changes by
Tim Hunt <T.J.Hunt@open.ac.uk> so we share the blame/credit.
2022-02-24 09:26:00 +02:00
Jake Dallimore f167418fc9 Merge branch 'MDL-73683-master' of https://github.com/ferranrecio/moodle 2022-02-24 14:26:53 +08:00
AMOS bot ddcb531414 Automatically generated installer lang files 2022-02-24 00:07:39 +00:00
sam marshall 8a0f706033 MDL-72837 core_cache: Add versioned cache support
Adds new set_versioned and get_versioned APIs to cache, which means you can
request a specific version from cache and it will not return an outdated
version.

This is important when using multi-layer-caches where a local cache might have
an outdated version of the cache, but the shared cache has a current version.
With this feature, the content of the cache does not have to be rebuilt, as
it will automatically retrieve it from the shared cache if necessary.
2022-02-23 16:58:38 +00:00
Sara Arjona d4ebb3988a MDL-73917 message: Remove labels from notification preferences
In MDL-67853, the "Enabled" label was added to all the toggle switches in the
user notification preferences page. This string is confusing, so this issue
is to remove it (and leave it as it was in 3.11).

Apart from that, following Helen's suggestion, I've renamed "Disallowed" to
"Locked off" and "Locked" to "Locked on", in order to help users to understand
better their meaning.
2022-02-23 17:42:48 +01:00
sam marshall 97778526cc MDL-72837 core_cache: Remove duplicated code in cache_session
I checked using a diff tool and the difference between 'get' in cache
and cache_session is only:

a) cache_session: call to check_tracked_user at the start
b) cache: Includes code to use static acceleration (but this would
   not run anyway in cache_session because use_static_acceleration
   returns false)
c) cache: $setaftervalidation logic is used so that it sets it slightly
   later (I can't see how this would make any difference)
d) cache_session: uses functions eg get_store() instead of variables
   $store; those functions aren't overridden.

This seems like a ridiculous duplication of very complicated code, so
I'm going to remove the duplication before I change it.
2022-02-23 16:40:35 +00:00
sam marshall 416e0bc27f MDL-72837 core_availability: Fix minor problem with test script
The test script did not correctly rebuild course cache after changing a
cached value in database. While this did not cause failures in the past,
it will after upcoming changes.
2022-02-23 16:38:37 +00:00
sam marshall 691c5b8326 MDL-72837 core_cache: Rename unit test classes to new standard
For the three unit tests that are going to be modified in future
commit, I first changed them to use a namespace and class name
matching filename, as per current standard.
2022-02-23 16:36:40 +00:00
Sara Arjona 43dbb87ce3 Merge branch 'MDL-73355-master-3' of git://github.com/mihailges/moodle 2022-02-23 15:58:56 +01:00
Mihail Geshoski cbf74374c4 MDL-73355 mod_book: Update the zero state view
Updates the zero state view (when there is no content yet) in
the book activity and also fixes the highlighting of the active
item in the secondary navigation menu in the 'Add new chapter'
page.
2022-02-23 21:44:08 +08:00
Mihail Geshoski cb802c269d MDL-73355 navigation: Do not always mark selected dropdown item active
Avoids always marking a selected dropdown item as active. When the
dropdown item has attribute data-disableactive="true" the active
classes will not be applied to this element. This is sometimes requred,
especially in the primary/secondary navigation more dropdown menu when
the dropdown item is an action link which opens a new page. Setting
this item as active will falsely indicate that the user is currently on
this page.
2022-02-23 21:44:08 +08:00
Mihail Geshoski 9cf11cdc67 MDL-73355 core: Add support for action links in core/moremenu_children 2022-02-23 21:44:08 +08:00
Mihail Geshoski f0dffddaac MDL-73355 navigation: Add new methods in navigation_node
Adds new methods is_action_link() and action_link_actions() in the
navigation_node class. The is_action_link() method can be used to
check whether the node's action is of type action_link. The
action_link_actions() method returns the formatted data required
for the core/actions template if the navigation node has an action
link.
2022-02-23 21:44:08 +08:00
Mihail Geshoski 57125bd86a MDL-73355 output: Set the id when initializing the action_link object 2022-02-23 21:44:08 +08:00
Shamim Rezaie 101ca4d21b MDL-73939 tool_moodlenet: Send enable notification via an adhoc task 2022-02-23 19:56:28 +11:00
Sara Arjona 67df769b6b Merge branch 'MDL-73415-master' of https://github.com/sharidas/moodle 2022-02-23 08:45:39 +01:00
Peter Dias 109c5f70a1 MDL-73978 navigation: Update the scoping when adding nodes
Make sure to use the rootnode variable that is being passed specifically for single activity course formats
2022-02-23 13:35:52 +08:00
Mathew May 0360bc2ab3 MDL-70792 aria: Only set focus on items when triggered by keypress 2022-02-23 12:01:13 +08:00
Andrew Nicols e1b9d5f3cd MDL-73915 js: Drop support for IE and android
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.

This is the first step taken to actively drop support for IE.

This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).

This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
2022-02-23 08:55:20 +08:00
Andrew Nicols 0a4047ab31 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-23 08:55:09 +08:00
Andrew Nicols aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Andrew Nicols 4ce17e604c MDL-73915 js: Upgrade packages 2022-02-23 08:51:54 +08:00
Andrew Nicols ef74e31086 MDL-73915 js: Switch to nodejs lts/gallium 2022-02-23 08:51:54 +08:00
Andrew Nicols 1d1b3d1842 MDL-73915 js: Upgrade node-sass 2022-02-23 08:51:53 +08:00
Andrew Nicols 39588c2ee1 MDL-73899 behat: Fix coding style issues to change third-party status
This commit removes the moodle-behat-extension from the list of
third-party libraries.

In order to do this properly, all pending coding-style issues are fixed.
In addition the following niceties have also been included:
* convert long form array() syntax to short form
* alphabetically sort class imports (use)
* remove unused class imports
* correct documentation
* Normalise whitespace in concat operators
* Remove unnecessary file docblocks
2022-02-23 08:19:30 +08:00
Peter Dias 3139741a43 MDL-73743 navigation: Update primary set_active_node
Account for the situation where we are in the site course and viewing course type options.
2022-02-23 08:03:22 +08:00
Mathew May 25699339d9 MDL-73743 navigation: Add more nav nodes to site home 2022-02-23 08:03:22 +08:00
Eloy Lafuente (stronk7) 9af1613441 Merge branch 'MDL-73450-MASTER_auroramysql_fix' of https://github.com/Limekiller/moodle 2022-02-22 19:40:20 +01:00
Sujith Haridasan e6a4eb3c36 MDL-73415 mod_forum: Address the followup issues for forum
This issue is a followup for changes made in forum. And hence
addresses the following issues spotted for forum:
1. Bring back the "Forums" header in the search page.
2. Remove the stale function forum_update_subscriptions_button
3. Fix the redirection to activity tab when subscription is
   changed, in the subscription tab.
2022-02-22 21:57:21 +05:30
Eloy Lafuente (stronk7) ea403ad70d Merge branch 'master_MDL-73778-oracle-behat-fix' of https://github.com/catalyst/moodle-MDL-70329 2022-02-22 17:23:27 +01:00
Bas Brands d5db2b18ce MDL-73793 theme_boost: iOS scroll and drawertoggle 2022-02-22 15:37:04 +01:00
Sara Arjona 00699beeed MDL-73833 adminpresets: Use displayname from pluginmanager
In order to guarantee all the plugin type names are displayed properly,
the 'pluginname' string call has been replaced to the proper
$plugininfo->displayname setting. That way, the plugin names will
be always displayed using the proper string translation.
2022-02-22 13:06:45 +01:00
Sara Arjona 49aef9f9bc MDL-73831 adminpresets: Display current/new value for settings
Before applying a preset, the settings are displayed and, in some cases,
the Current/New value columns were empty.
This patch fixes it and guarantees this information is updated properly
every time the set_value() method is called.
2022-02-22 12:58:02 +01:00
Sara Arjona e94167174a on-demand release 4.0dev+ 2022-02-22 11:13:12 +01:00
Sara Arjona 325c6683d2 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-02-22 11:13:08 +01:00
Jun Pataleta f619837c9a Merge branch 'MDL-73613-master' of git://github.com/mickhawkins/moodle 2022-02-22 12:25:28 +08:00
Safat Shahin 83e6b3d8d8 MDL-73778 mod_quiz: Oracle Manual grading scenario
This change will resolve Manual grading settings are
remembered as user preferences - failed behat test in
oracle.
2022-02-22 11:34:37 +11:00
Víctor Déniz 774a0a06b6 Merge branch 'MDL-73192' of https://github.com/call-learning/moodle 2022-02-21 23:53:11 +00:00
Eloy Lafuente (stronk7) 85b955e2a1 Merge branch 'MDL-73882-master' of https://github.com/aanabit/moodle 2022-02-22 00:08:33 +01:00
Eloy Lafuente (stronk7) 0753d96232 Merge branch 'MDL-73910-master' of https://github.com/sarjona/moodle 2022-02-22 00:06:53 +01:00
Sara Arjona 742a739243 Merge branch 'MDL-73905' of https://github.com/stronk7/moodle 2022-02-21 16:40:31 +01:00
Sara Arjona 2a241f9e06 Merge branch 'MDL-73872-master' of https://github.com/lucaboesch/moodle 2022-02-21 16:32:01 +01:00
Sara Arjona 9d1b516807 Merge branch 'MDL-72061-master' of https://github.com/dravek/moodle 2022-02-21 16:00:44 +01:00
Sara Arjona 0df6cad0ea Merge branch 'MDL-73580-master' of git://github.com/mickhawkins/moodle 2022-02-21 15:39:50 +01:00
Sara Arjona 78408e5017 Merge branch 'MDL-73883-master' of https://github.com/andrewnicols/moodle 2022-02-21 15:35:11 +01:00
jfederico 8c9f20e645 MDL-73192 mod_bigbluebuttonbn: Lock settings not working
* The lock settings from the instance were not sent to the BBB API
* The global settings related to lock settings did not show
* lockSettingLockOnJoinConfigurable is not working so removed for now
* Fixed lockSettingsLockOnJoin setting
2022-02-21 15:00:46 +01:00
Ferran Recio 3651b85fbe MDL-73547 core_courseformat: add collapsed section update actions
Now content and course index sections have special mutations to store
the collapsed preferences. This way the backend implementation is
independent of the frontend one and can use caches or other kind of
optimizations of necessary.
2022-02-21 12:33:33 +01:00
Ferran Recio c64bef51a9 MDL-73547 core_courseformat: enable course index cache
Adding caches to the course editor reactive state. The patch improve the
course index loading.
2022-02-21 12:33:33 +01:00
Sara Arjona 65f4b25a79 Merge branch 'MDL-73791-master' of https://github.com/bmbrands/moodle 2022-02-21 12:26:36 +01:00
Amaia Anabitarte bb78acdaef MDL-73882 theme: Improve constrast on course index for dimmed elements 2022-02-21 11:09:52 +01:00
Bas Brands 7d6efea682 MDL-73791 theme_boost: mobile navbar design updates 2022-02-21 10:24:58 +01:00
Ilya Tregubov 4f4bb7303a Merge branch 'MDL-73273-master' of https://github.com/peterRd/moodle 2022-02-21 11:15:33 +02:00
Sara Arjona 995b457dbf MDL-73910 repository: Override get_enabled_plugin() method
The get_enabled_plugin method in repository plugininfo needs to
be overriden from base because current implementation is ignoring
the visible column in the "repository" table.
2022-02-21 09:24:51 +01:00
Eloy Lafuente (stronk7) 460d6eea5d Merge branch 'MDL-73812-master-enfix' of https://github.com/vmdef/moodle 2022-02-21 09:11:51 +01:00
Jake Dallimore ae5aaf9b82 MDL-73950 enrol_lti: fix icon spacing in dynamic registration URL 2022-02-21 16:02:12 +08:00
Michael Hawkins bd1b6b772c MDL-73613 block_timeline: Fix courses view where event due later today
If a course only had events due later in the current day when filtering
by overdue, it was possible we would show a course name with nothing
below it, because we fetched all events to the end of the day. This fix
means we only load courses with events due before the current time and
avoid the issue.
2022-02-21 14:51:41 +08:00
AMOS bot 0e1d0f50fb Automatically generated installer lang files 2022-02-21 00:07:39 +00:00
Paul Holden b95a655a33 MDL-73941 reportbuilder: return localised floats when aggregating.
As the 'average' and 'percentage' aggregation types both return
float values, we should ensure they are output with localised
formatting (e.g. decimal separator).
2022-02-20 07:43:32 +00:00
Luca Bösch 2894aa0964 MDL-73872 admin: align 'Save changes' and 'Cancel' 2022-02-18 18:37:08 +01:00
Víctor Déniz efdd77a157 MDL-73812 lang: Replace modified strings in tests 2022-02-18 16:14:02 +00:00
Helen Foster 7ff6b2daef MDL-73812 lang: Import fixed English strings (en_fix) 2022-02-18 15:50:26 +00:00
Eloy Lafuente (stronk7) 3a352b401f MDL-73905 core: fix coding_exception missing namespace
This was leading to exception:

Class 'core\message\coding_exception' not found

Surely we weren't facing this before MDL-67853, but it seems that
now we are hitting it sometimes (being investigated @ MDL-73747).

So, just ensure the proper \coding_exception is used.
2022-02-18 15:45:11 +01:00
Sara Arjona 0f94f29296 on-demand release 4.0dev+ 2022-02-18 15:03:57 +01:00
Sara Arjona fb19d1cc1f NOBUG: Fixed SVG browser compatibility 2022-02-18 15:03:54 +01:00
Sara Arjona 8e2b6bfc47 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-02-18 15:03:54 +01:00
Ferran Recio d8b8f9bc3b MDL-73683 core_courseformat: match hasRestrictions criteria
Orignally, the lock icon in the course index and the course content
represents different things and it was confusing for users. Now both
section and cm state data calculate the hasRestrictions attribute the
same way as the course content lock icons.
2022-02-18 12:51:15 +01:00
Ilya Tregubov 18fd47d76b Merge branch 'MDL-73532-integration-master' of https://github.com/mihailges/moodle 2022-02-18 12:28:54 +02:00
Mihail Geshoski cc2769ad94 MDL-73532 navigation: Fix the secondary navigation highlighting
Fixes the highlighting of the items the secondary navigation menu
in the single activity course format.
2022-02-18 18:11:14 +08:00
Jun Pataleta 5f19e1e685 Merge branch 'MDL-73608-master' of https://github.com/lameze/moodle 2022-02-18 12:06:13 +08:00
Simey Lameze 8e153111af MDL-73608 user: add contact site support page
AMOS BEGIN
 CPY [subject,mod_forum],[subject,moodle]
 CPY [message,core_message],[message,moodle]
AMOS END
2022-02-18 11:54:44 +08:00
Andrew Nicols f66210dece Merge branch 'MDL-72734' of https://github.com/paulholden/moodle 2022-02-18 10:55:48 +08:00
Andrew Nicols feec9bbb98 Merge branch 'MDL-73748-master-check_for_updates' of https://github.com/mudrd8mz/moodle 2022-02-18 10:49:16 +08:00
Andrew Nicols 7d8c9396e3 Merge branch 'MDL-73636' of https://github.com/paulholden/moodle 2022-02-18 10:46:28 +08:00
Andrew Nicols 2f853cdceb Merge branch 'MDL-73912-master' of https://github.com/junpataleta/moodle 2022-02-18 10:44:49 +08:00
Andrew Nicols e75aac9798 Merge branch 'MDL-73871-master' of https://github.com/aanabit/moodle 2022-02-18 10:43:35 +08:00
Peter Dias 4071bf3fb2 fixup! MDL-73273 navigation: Add checks to enforce action param types 2022-02-18 09:11:57 +08:00
Víctor Déniz 649fb3cc49 Merge branch 'MDL-73724' of https://github.com/call-learning/moodle 2022-02-17 22:33:21 +00:00
Eloy Lafuente (stronk7) 967777ddf5 Merge branch 'MDL-73592-master' of git://github.com/rezaies/moodle 2022-02-17 18:34:12 +01:00
Laurent David 628ee05f98 MDL-73308 mod_bigbluebuttonn: Breakout room
* Fetch recording attached to breakout meetings
* Add tests for breakoutrooms
2022-02-17 18:23:56 +01:00
Laurent David c25c134728 MDL-73724 mod_bigbluebuttonbn: Error when joining meeting
* When pre-uploaded presentation is uploaded, the meeting refuses to start and
and error is thrown.
2022-02-17 17:26:38 +01:00
Sara Arjona 18dc1db304 Merge branch 'master_MDL-73699-questionstatus-reviewchanges' of https://github.com/catalyst/moodle-MDL-70329 2022-02-17 17:08:53 +01:00
Sara Arjona b67b024748 Merge branch 'MDL-73794-master' of https://github.com/bmbrands/moodle 2022-02-17 16:57:58 +01:00
Shamim Rezaie 7015cbf75f MDL-73592 phpunit: Run adhoc tasks after install 2022-02-18 02:09:49 +11:00
Sara Arjona 21e3b175b0 Merge branch 'MDL-73822' of https://github.com/paulholden/moodle 2022-02-17 16:07:58 +01:00
Eloy Lafuente (stronk7) 239832e29e Merge branch 'MDL-73875' of https://github.com/ilyatregubov/moodle 2022-02-17 15:04:38 +01:00
Marc-Alexandre Ghaly a21764842c MDL-73699 qbank_editquestion: Question status UI/UX update
This commit implements a question status UI/UX change in the question bank page
from clickable popup link to dropdown following moodle UI/UX policy.
2022-02-17 08:46:30 -05:00
Ilya Tregubov e1899a86c3 MDL-73875 behat: Increase allowed size for privacy exports
Because of more moodle.css contents, the total size of the privacy
exports has grown over the allowed size. Just raise it a little bit
more.
2022-02-17 15:43:31 +02:00
Ilya Tregubov dfa0681c53 Merge branch 'MDL-69764-master' of https://github.com/jpahullo/moodle 2022-02-17 15:02:01 +02:00
Jordi Pujol Ahulló 21f73b29c1 MDL-69764 tool_task: unify crontab verification
Use scheduled_task crontab field verification in
admin/tool/task to unify how Moodle deals with
crontab definition and its verification.
This helps remove duplicated code and fix
crontab definition not allowed in the web form,
but actually was valid.

Updated crontab fields precision on task_scheduled
table to have enough room for the worst case:
all possible different values separated by comma.
2022-02-17 13:24:31 +01:00
Bas Brands 09aa3ad82a MDL-73794 theme_boost: set footer background white 2022-02-17 13:06:56 +01:00
Juan Leyva f0816126bf MDL-73608 tool_mobile: Return support page for not logged-in users 2022-02-17 19:48:30 +08:00
Bas Brands 6214df4072 MDL-73918 theme_boost: allow customising scss pagewidth variables 2022-02-17 12:43:16 +01:00
Sara Arjona 944bebb35c Merge branch 'MDL-73887' of git://github.com/paulholden/moodle 2022-02-17 10:48:58 +01:00
Sara Arjona 18631ff886 Merge branch 'MDL-73873-master' of https://github.com/aanabit/moodle 2022-02-17 10:44:10 +01:00
Jun Pataleta a7af5f3ae9 Merge branch 'MDL-73592-master' of git://github.com/rezaies/moodle 2022-02-17 16:06:38 +08:00
Sara Arjona af7a0ed1a1 Merge branch 'MDL-73313_master' of https://github.com/tasosb/moodle 2022-02-17 08:38:08 +01:00
Sara Arjona 704553716f Merge branch 'MDL-73875' of https://github.com/roland04/moodle 2022-02-17 08:25:03 +01:00
Shamim Rezaie b36a1f9ee0 MDL-73592 tool_moodlenet: Use adhoc task to set activitychooser footer 2022-02-17 18:18:30 +11:00
Shamim Rezaie 3094b2cf38 MDL-73383 atto_collapse: Do not announce the list of added buttons 2022-02-17 12:46:25 +11:00
AMOS bot 583fd0b46b Automatically generated installer lang files 2022-02-17 00:07:34 +00:00
Víctor Déniz 8c5c7070c0 MDL-73582 registration: Add endpoint to provide version to linkchecker 2022-02-16 20:40:23 +00:00
Anastasios Bithas c3f4123b38 MDL-73313 mod_bigbluebutton: Option to disable default welcome message
General configuration BBB default messages now work properly.
The option to disable BBB default messages for a course is now available.
2022-02-16 18:52:51 +02:00
Eloy Lafuente (stronk7) ebdb05461b Merge branch 'MDL-73373-master-fix' of https://github.com/junpataleta/moodle 2022-02-16 17:30:24 +01:00
Sara Arjona 73a9aa130f Merge branch 'MDL-73854-master' of https://github.com/HuongNV13/moodle 2022-02-16 17:20:03 +01:00
Jun Pataleta 3d6255b749 MDL-73373 output: No Enrolments in tertiary nav in module context
Enrolments should not be displayed on the tertiary navigation
when it is being displayed in the module context.
2022-02-17 00:18:41 +08:00
Ilya Tregubov bc7be5fef4 Merge branch 'MDL-73814-master' of https://github.com/bmbrands/moodle 2022-02-16 16:50:47 +02:00
Jun Pataleta 57ba064022 MDL-73912 templates: Proper type value for back to user menu button 2022-02-16 22:46:47 +08:00
Jun Pataleta 5f8718e35c Merge branch 'MDL-73835' of git://github.com/paulholden/moodle 2022-02-16 22:01:00 +08:00
Sara Arjona 755a9d464c Merge branch 'MDL-73384-master' of git://github.com/rezaies/moodle 2022-02-16 14:48:22 +01:00
Jun Pataleta 6b65550240 Merge branch 'MDL-73373-master' of https://github.com/peterRd/moodle 2022-02-16 21:14:26 +08:00
Jun Pataleta ed3d0904ff Merge branch 'MDL-73248-master' of https://github.com/sarjona/moodle 2022-02-16 21:09:52 +08:00
Ilya Tregubov 249bf250fd Merge branch 'MDL-73837' of git://github.com/paulholden/moodle 2022-02-16 13:52:47 +02:00
Ilya Tregubov 08d2c0fb9f Merge branch 'MDL-73868-master' of https://github.com/sarjona/moodle 2022-02-16 13:04:52 +02:00
Ilya Tregubov bc6416908d Merge branch 'MDL-73370-master' of https://github.com/peterRd/moodle 2022-02-16 12:52:49 +02:00
Sara Arjona 9544b5c4d3 Merge branch 'MDL-72762' of https://github.com/stronk7/moodle 2022-02-16 11:50:03 +01:00
Paul Holden 44ce37902d MDL-73895 message: hide empty component notification categories.
If a component has no available notification types (because they're
disabled), then it (the component) should be hidden entirely from
the user notification preferences page.
2022-02-16 10:31:07 +00:00
Sara Arjona 780fefe6b1 Merge branch 'MDL-73768-master' of https://github.com/bmbrands/moodle 2022-02-16 11:30:58 +01:00
Mikel Martín 705c0527ab MDL-73875 reportbuilder: Fix inplace editable overflows 2022-02-16 11:05:52 +01:00
Peter Dias 240da1b186 MDL-73370 contentbank: Update behat tests 2022-02-16 17:49:00 +08:00
Peter Dias 57f1bd3a01 MDL-73370 contentbank: Move settings cog to tertiary navigation
* Add headings to subpages
* Update context header based on current context
* Tweak layout.
2022-02-16 17:49:00 +08:00
Jun Pataleta 8c609a715a Merge branch 'MDL-73827-master' of https://github.com/sarjona/moodle 2022-02-16 16:52:08 +08:00
Ilya Tregubov 96f3deeb48 Merge branch 'MDL-73816-master' of https://github.com/bmbrands/moodle 2022-02-16 10:26:59 +02:00
Jun Pataleta 111ec16267 Merge branch 'MDL-73592-master' of git://github.com/rezaies/moodle 2022-02-16 16:21:55 +08:00
Jonathan Harker 55fff62fb4 MDL-72646 theme: update font download MIME types, RFC-8081 2022-02-16 19:10:05 +13:00
Shamim Rezaie 2361e4c9c5 MDL-73592 tool_moodlenet: Enable moodlenet by default 2022-02-16 16:09:28 +11:00
Shamim Rezaie 3e88bfd5b6 Merge branch 'MDL-73721-master' of git://github.com/rezaies/moodle 2022-02-16 14:24:01 +11:00
Peter Dias 2bbc664302 MDL-73373 navigation: Fix breadcrumbs when within a course.
Disable the mycourses node from showing up in the breadcrumbs
if it is set as the default homepage
2022-02-16 10:59:43 +08:00
Shamim Rezaie cb3ccf14b2 MDL-73607 theme: hide drawers when they are not visible
This is to prevent browser search find texts that are not visible
on the page.
As part of this change, I deleted $drawer-transition that I had added
ats part of MDL-72910. It was a master only change and I deleted it
because customising it would only create problems (because of the many
other hardcoded values in other files).
2022-02-16 13:30:13 +11:00
Peter Dias 9170025088 fixup! MDL-73373 roles: Enable tertiary navigation in module context 2022-02-16 09:28:04 +08:00
Eloy Lafuente (stronk7) 239f3116d5 Merge branch 'MDL-73859-master' of https://github.com/sarjona/moodle 2022-02-15 23:15:39 +01:00
Paul Holden 4ad5dda50d MDL-73822 user: fix Gravatar integration for missing user images. 2022-02-15 20:52:58 +00:00
Sara Arjona 9096a1e1ac MDL-73859 behat: Fix random error highlighting week
The first week is only highlighted if course starts today or
later. So, the course will be created with startdate on
yesterday to guarantee it always passes.
2022-02-15 17:43:12 +01:00
Sara Arjona c992130786 Merge branch 'MDL-73840-master' of https://github.com/mihailges/moodle 2022-02-15 17:21:42 +01:00
Sara Arjona ee20a7ae7b Merge branch 'MDL-73834' of https://github.com/stronk7/moodle 2022-02-15 17:18:38 +01:00
Sujith Haridasan 299504281e Revert "MDL-71915 mod_quiz: Update the behat tests"
This reverts commit 1149f255fe.
2022-02-15 15:58:36 +00:00
Sujith Haridasan 24950e283c Revert "MDL-71915 mod_quiz: Update the tertiary nav"
This reverts commit 6ba821dc01.
2022-02-15 15:58:35 +00:00
Sujith Haridasan c4e411e48b Revert "MDL-71915 question: Update the behat tests"
This reverts commit f000755ba1.
2022-02-15 15:54:00 +00:00
Sujith Haridasan 73aeabab0b Revert "MDL-71915 question: Update the tertiary nav"
This reverts commit 26eabeccf4.
2022-02-15 15:54:00 +00:00
Sujith Haridasan ae377f6940 Revert "MDL-71915 mod_quiz: Render add question when user can edit the quiz"
This reverts commit 29ebc9f153.
2022-02-15 15:54:00 +00:00
Víctor Déniz a0aeaca013 Merge branch 'MDL-73368' of https://github.com/call-learning/moodle 2022-02-15 15:38:45 +00:00
Amaia Anabitarte 23cb73b771 MDL-73871 core_course: Fix course index active chevron hover color 2022-02-15 13:47:04 +01:00
Sara Arjona a708139457 Merge branch 'MDL-73869-master' of https://github.com/dravek/moodle 2022-02-15 13:18:56 +01:00
Ferran Recio d7d154bd8b MDL-73683 core_courseformat: format section visible logic
Move the section visible logic to the format base class. This way format
plugins can decide whenever a section is visible or not instead of using
format custom settings from core.
2022-02-15 13:15:09 +01:00
Ferran Recio c7a2e19ee0 MDL-73683 core_courseformat: fix state hasavailability
The course index lock icon depends on the state hasrestrictions
attributes on both section and course module. The lock icon
should be consistent with the content availability information
and it was not. With this patch the hasrestrictions attribute
uses a similar logic than the course content.
2022-02-15 13:15:09 +01:00
Ilya Tregubov 256804d2ed Merge branch 'MDL-73532-master-1' of https://github.com/mihailges/moodle 2022-02-15 13:37:24 +02:00
Ilya Tregubov f4b1fd8477 Merge branch 'MDL-73312' of https://github.com/call-learning/moodle 2022-02-15 13:34:25 +02:00
Paul Holden be54872a2c MDL-73887 reportbuilder: make the select filter easier to extend.
Allow custom filters to extend the filter, and override/set the
operators/values fields internally.
2022-02-15 11:21:11 +00:00
Laurent David 749b416473 MDL-73312 mod_bigbluebuttonbn: Fix sort by date for recordings
* Fix sorting for dates in recording table
* Code review and getString usage in JS
2022-02-15 08:07:51 +01:00
Andrew Nicols 0491ccb6c8 MDL-73883 behat: Display actual step during testing
Because of the way in which we check for exceptions, we always show the
following string during behat pretty output:

    behat_hooks::i_look_for_exceptions()

We can easily modify this to only show this value when the
i_look_for_exceptions() test itself fails, but otherwise to show the
actual step that is run.
2022-02-15 14:57:00 +08:00
Huong Nguyen 46bbf6e74b MDL-73854 Calendar: Fix calendar controls cannot be translated
Fix the issue that calendar page and block are showing only English names
of next and previous months despite switching the language
2022-02-15 12:16:32 +07:00
Shamim Rezaie e70a73cd34 MDL-73384 theme: Full-width header and secondary menu on admin pages 2022-02-15 15:55:58 +11:00
Jun Pataleta 5725b0f950 MDL-73721 enrol: Pre-fill enrolled users node
Add the Enrolled users in the tertiary navigation when the user has
the capability to view enrolled users but not review enrolments but has
other user administration capabilities in the course.
2022-02-15 15:22:09 +11:00
Jun Pataleta 2b9cc9d2ee Merge branch 'MDL-73805-master' of https://github.com/bmbrands/moodle 2022-02-15 12:18:36 +08:00
Jun Pataleta b503ab169e Merge branch 'MDL-73826' of https://github.com/stronk7/moodle 2022-02-15 11:51:44 +08:00
Peter Dias bdf4f8a651 MDL-73273 navigation: Add checks to enforce action param types
* Added checks in navigationlib to enforce the data type of the passed in action
* Add nodes with non moodleurls to the end of the secondary nav
2022-02-15 11:30:07 +08:00
Amaia Anabitarte 760747b5dc MDL-73873 enrol_cohort: Fix warning when editing cohort enrolment 2022-02-14 17:59:28 +01:00
Paul Holden d8158c4532 MDL-73835 reportbuilder: ensure same report instance is exported.
The exported system report should be re-created using all properties
of the persistent, as well as any passed parameters.
2022-02-14 11:51:57 +00:00
David Matamoros af84b168b6 MDL-73869 reportbuilder: Fix casting to string in report actions 2022-02-14 12:02:22 +01:00
Shamim Rezaie 33c41bf1d4 Merge branch 'MDL-73609-master' of https://github.com/bmbrands/moodle 2022-02-14 21:50:58 +11:00
Sara Arjona c4e6ac585d MDL-73868 oauth2: Remove multiple slashes in image URL
There is an issue with the current Badgr manifest because the image
URL contains double slash which is causing an error when storing it
in the database (https://api.test.badgr.com/static//images/logo.png).
This issue parses image URL and removes multiple slashes in URL.
2022-02-14 11:30:19 +01:00
Mihail Geshoski 2a920abd5b MDL-73840 mod_feedback: Remove the duplicate navigation selector
The patch removes the duplicate navigation selector which appears in the
'Show non-respondents' page by removing the 'nonrespondents' node from
the module's settings navigation. Additionally, it highlights the
'Responses' item in the secondary navigation and sets it as active in
the module settings navigation.
2022-02-14 17:48:30 +08:00
Eloy Lafuente (stronk7) a419c7ec12 MDL-73834 mod_lti: Don't load external artifacts, original behaviour
Summary:

- With PHP7, libxml_disable_entity_loader() was making those
  flags futile, and the DTDs were not being requested ever.
- With PHP8, the flags get precedence and requests for the
  DTD have started to happen.
- Those requests are not served by W3C (1 minute time-out).
- Those DTDs aren't used by anything in code (no entity
  replacement, no validation...)

Hence:
- Remove the flags so it will work the same in PHP7 and PHP8.
- Just to double ensure we don't want any remote loading
  to happen ever, add explicitly the LIBXML_NONET flag.
2022-02-14 10:26:45 +01:00
Paul Holden a6b13214a9 MDL-72734 tool_task: consistent checks for running tasks from web. 2022-02-14 09:22:01 +00:00
Paul Holden c618717d1f MDL-73636 course: use formatted name in exported activity data. 2022-02-14 09:18:57 +00:00
Bas Brands f06091bec5 MDL-73609 theme_boost: footer popup accessible behaviour 2022-02-14 09:57:08 +01:00
Sara Arjona c88634617d Merge branch 'MDL-69542' of https://github.com/stronk7/moodle 2022-02-14 08:35:29 +01:00
Mihail Geshoski 42a0a9a71c MDL-73532 mod_label: Update the load_module_navigation() method 2022-02-14 09:40:27 +08:00
Mihail Geshoski a6c2a87fdf MDL-73532 mod_feedback: Update the load_module_navigation() method 2022-02-14 09:40:27 +08:00
Mihail Geshoski 404eeff690 MDL-73532 theme_boost: Display the course name in single activity format
The module context header will display the full name of the course when
the course is using the single activity format header.
2022-02-14 09:40:27 +08:00
Mihail Geshoski 4a9c83ac9e MDL-73532 navigation: Modify methods that extend the setting nav
Introduces some changes to the exising _extend_settings_navigation()
methods that utilize the global $PAGE object. In order to accomodate
the changes done for the secondary navigation for single activity
courses, the methods that extend the settings navigation can no longer
rely on the $PAGE object, instead the more reliabe way to obtain this
infomation is through the get_page() method from settings_navigation
class.
2022-02-14 09:40:27 +08:00
Mihail Geshoski bf27303955 MDL-73532 navigation: Update unit tests
Updates the existing unit tests related to the secondary navigation
class and includes cases where the given course uses single activity
format.
2022-02-14 09:35:04 +08:00
Mihail Geshoski 98c89410f9 MDL-73532 navigation: Secondary navigation for single activity course
Creates secondary navigation dedicated for the single activity course
format. To accomodate these chanages a new property
'showchildreninsubmenu' is introduced in navigation_node which can be
used to define whether the node's children should be displayed in a
submenu when applicable. Also, new method get_page() is added in
settings_navigation which can be used to get the $page class property.
2022-02-14 09:35:03 +08:00
Eloy Lafuente (stronk7) e3eb547c45 MDL-69542 auth_lti: Reconcile install.xml with the editor output 2022-02-12 10:14:07 +01:00
Eloy Lafuente (stronk7) 00b10bbb31 MDL-72762 backup: Accept empty and whitespace-only UI labels.
This was causing problems when sections or activity names where
set to be empty or whitespace-only, with the PARAM_CLEANHTML
leading to exception.

Now they are supported and handled like &nbsp; (0xc2a0) to
allow the process to continue.

Added a few extra tests to confirm the behaviour.
2022-02-11 23:50:34 +01:00
Eloy Lafuente (stronk7) d66a5316ae MDL-73826 phpunit: Allow curl mock responses to handle empty strings
Before this commit, is_empty() was being applied before returning
the mock response. But we want to be able to mock the empty response
for some tests, hence moving the condition to null/isset, that is
the value that array_pop() returns where there aren't more elements
in the array.

With that change performed, we can test lti_load_cartridge() with
empty responses, hence adding a new test for that.
2022-02-11 23:50:05 +01:00
Eloy Lafuente (stronk7) 64969e82d7 MDL-73826 mod_lti: Fix for Windows/PHP8 with empty curl responses
Sometimes (detected with Windows, when running @ GHA), both the
response and the error of a curl request to non-existing URL
returns the empty string.

In that case, we cannot call to DOMDocument::loadXML() because the
1st param cannot be empty. So here, whenever that happens, we are
throwing the moodle_exception earlier, instead of waiting for the
XML errors to be processed later.
2022-02-11 23:50:05 +01:00
Eloy Lafuente (stronk7) 98cc2cec29 Merge branch 'MDL-69542-db-fix' of https://github.com/sarjona/moodle 2022-02-11 17:57:27 +01:00
Sara Arjona ef8015baca MDL-69542 enrol_lti: Add missing index to install
A foreign-key from enrol_lti_users->ltideploymentid to
enrol_lti_deployment->id was defined in upgrade but missing in
install.xml.
2022-02-11 17:56:15 +01:00
Sara Arjona ee289b4286 Merge branch 'MDL-69542-master-fixes-historyfix' of https://github.com/snake/moodle 2022-02-11 17:07:43 +01:00
Sara Arjona 256232ad46 MDL-73248 adminpresets: Improvements to the Starter preset
This is the list of changes applied to the Starter preset, following
the community suggestions and the latest features included in 4.0:

- Hide Online users, Recently accessed courses and Starred courses.
- Re-enable Description and Essay question types.
- Disable guest enrolment and hide guest login button.
- Reduce the information displayed in the activity chooser.

Apart from that, the User menu items has been removed because it had
the same value in both presets (so it makes no sense having there).
2022-02-11 16:41:06 +01:00
Sara Arjona d24a4ab56f on-demand release 4.0dev+ 2022-02-11 15:55:38 +01:00
Sara Arjona 15404fea7c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-02-11 15:55:33 +01:00
Adrian Greeve 3a48a60cfc MDL-73354 mod_assign: Added removed group check to overrides. 2022-02-11 22:28:11 +11:00
Jun Pataleta 9af545659c Merge branch 'MDL-72928-rebase' of https://github.com/Chocolate-lightning/moodle 2022-02-11 22:28:11 +11:00
Jun Pataleta ae14ff321b MDL-72928 core: Remove Remember username 2022-02-11 12:01:26 +08:00
Mathew May ecb92c7ed9 MDL-72928 login: Update styling and functionality 2022-02-11 12:01:26 +08:00
Jake Dallimore e399b3995e MDL-69542 enrol_lti: behat feature covering tool registration 2022-02-11 11:07:26 +08:00
Jake Dallimore 55cbb9c655 MDL-69542 auth_lti: add mode based user provisioning
Three modes are initially introduced here, for use by dependent code:
1. Automatic - where accounts will be automatically created for users
2. Prompt new or existing - where the user can choose to use an existing
account or have a new account created for them.
3. Prompt existing only - where users must link an existing account.
This change also adds linked logins, for use with provisioning.
2022-02-11 11:06:54 +08:00
Jake Dallimore 66b76c4545 MDL-69542 enrol_lti: remaining changes for dynamic registration support
- Allow the tool to generate secure, one time, dynamic registration
URLs for use in supporting platforms.
- Registration endpoint, which validates the one time URL, makes
the registration requqest to the platform and adds the approriate
tool registration changes in the tool on success.
- Admin settings pages make use of the 'copy to clipboard' module
which is now in core.
2022-02-11 11:06:05 +08:00
Jake Dallimore d5ed4a3184 MDL-69542 enrol_lti: add LTI Advantage grade sync task
This change adds a new grade sync task for LTI Advantage and updates
the legacy task such that it only operates on legacy tools. This uses
the assignment and grades service 2.0.
2022-02-11 11:03:32 +08:00
Jake Dallimore 1f27bad809 MDL-69542 enrol_lti: add LTI Advantage member sync task
This change adds a new member sync task for LTI Advantage and updates
the legacy task such that it only operates on legacy tools. This uses
the names and roles provisioning service 2.0.
2022-02-11 11:03:00 +08:00
Jake Dallimore c9636d261b MDL-69542 core_lib: make lti tool generator default to legacy version
This means existing tests won't need to change.
2022-02-11 11:01:26 +08:00
Jake Dallimore 4d8a078154 MDL-69542 enrol_lti: backup changes for LTI Advantage 2022-02-11 10:52:40 +08:00
Jake Dallimore 6fbd30e15d MDL-69542 enrol_lti: add deep linking support 2022-02-11 10:52:31 +08:00
Jake Dallimore 2516938537 MDL-69542 enrol_lti: add version based resource publication
Adds tabs and a new table allowing LTI Advantage published resources
to be viewed.
2022-02-11 10:51:59 +08:00
Jake Dallimore c6c7b1dadc MDL-69542 enrol_lti: add generators for use in LTI Advantage behat 2022-02-11 10:50:06 +08:00
Jake Dallimore f0092f94d8 MDL-69542 enrol_lti: add OIDC endpoints for resource link launch 2022-02-11 10:49:40 +08:00
Jake Dallimore 983038161a MDL-69542 enrol_lti: add message_helper utility class 2022-02-11 10:49:30 +08:00
Jake Dallimore 9d5264d500 MDL-69542 enrol_lti: add tool launch service 2022-02-11 10:47:12 +08:00
Jake Dallimore 92195d97c0 MDL-69542 enrol_lti: add admin page for deployment management 2022-02-11 10:43:00 +08:00
Jake Dallimore c41ff5161d MDL-69542 enrol_lti: add tool deployments service 2022-02-11 10:38:41 +08:00
Jake Dallimore 8c62efe74e MDL-69542 enrol_lti: admin page providing platform registration 2022-02-11 10:36:01 +08:00
Jake Dallimore 1f3d37390d MDL-69542 enrol_lti: add tool endpoint page to admin settings 2022-02-11 10:35:51 +08:00
Jake Dallimore 0f6239a054 MDL-69542 enrol_lti: add application registration service 2022-02-11 10:32:49 +08:00
Jake Dallimore 948746eae7 MDL-69542 enrol_lti: make lib changes supporting LTI Advantage
This change includes:
- LTI Advantage specific code in delete_instance().
- LTI version field added to publish as lti tool form.
- LTI Advantage specific uuid added to add_instance().
- Moved secret validation (LTI1.1/2.0) to server side, allowing
the element to be hidden in LTI Advantage cases.
2022-02-11 10:24:49 +08:00
Jake Dallimore dad46e813b MDL-69542 enrol_lti: implement classes required by the lti13 library 2022-02-11 10:23:31 +08:00
Jake Dallimore 5649c72d43 MDL-69542 enrol_lti: add published resource view object support
The view objects introduced here will be used as a representation of
data during the content selection process.
2022-02-11 10:22:24 +08:00
Jake Dallimore 4049c08998 MDL-69542 enrol_lti: add entity repositories 2022-02-11 10:20:21 +08:00
Jake Dallimore a7d864a609 MDL-69542 enrol_lti: add base test class for lti advantage
Contains a collection of useful LTI Advantage specific methods.
2022-02-11 10:18:34 +08:00
Jake Dallimore 7a1f433043 MDL-69542 enrol_lti: add new entity classes for storing launch data 2022-02-11 10:12:57 +08:00
Jake Dallimore 23894ddd98 MDL-69542 enrol_lti: add upgrade and install code updating tables 2022-02-11 10:10:05 +08:00
Jake Dallimore 42078d4eec MDL-69542 enrol_lti: all lang string changes 2022-02-11 10:09:25 +08:00
Jake Dallimore 6c0ffde138 MDL-69542 libraries: Add the LTI 1.3 library 2022-02-11 10:07:39 +08:00
Limekiller 3c60f8a0ce MDL-73450 installation: Support Aurora MySQL >= 8.0.0 2022-02-10 15:14:35 -05:00
Eloy Lafuente (stronk7) 057a21e381 Merge branch 'MDL-73836' of https://github.com/paulholden/moodle 2022-02-10 21:12:19 +01:00
Eloy Lafuente (stronk7) 83497580cb Merge branch 'MDL-73669-master' of https://github.com/marinaglancy/moodle 2022-02-10 16:39:06 +01:00
Jun Pataleta 31a6f70ea1 Merge branch 'MDL-73784-master' of https://github.com/HuongNV13/moodle 2022-02-10 22:56:24 +08:00
Jun Pataleta 9dd8909360 Merge branch 'MDL-73811' of https://github.com/paulholden/moodle 2022-02-10 22:41:47 +08:00
Paul Holden b393248400 MDL-73837 reportbuilder: use column attributes in system reports. 2022-02-10 13:17:01 +00:00
Paul Holden 14b6334133 MDL-73836 reportbuilder: allow pre-defined action title attribute. 2022-02-10 12:38:25 +00:00
Ilya Tregubov 8685968870 Merge branch 'MDL-73764' of https://github.com/stronk7/moodle 2022-02-10 14:18:34 +02:00
Sara Arjona 3daeecd3d2 MDL-73827 lib: Fix URL blocked error for userinfo endpoint
When the oAuth2 issuer hasn't any userinfo endpoint, a call to
$this->get(false) was done, which was returning "The URL is
blocked".
This is a regression from MDL-70649, which added some cURL security
checks.
2022-02-10 10:43:38 +01:00
Paul Holden ff6e5cc71d MDL-73797 output: swap order of buttons in save/cancel dialogs.
The primary button should swap position with the secondary button,
so that it's displayed on the right hand side of the dialog.
2022-02-10 08:34:04 +00:00
Jake Dallimore 2a736da1ee Merge branch 'MDL-73448-master' of https://github.com/peterRd/moodle 2022-02-10 15:59:57 +08:00
Peter Dias 97fb06057b MDL-73448 scorm: Remove displayactivityname in scorm. 2022-02-10 15:23:36 +08:00
Peter Dias 8f16a4d98e MDL-73448 scorm: Update scorm tertiary navigation
* Left align scorm content
* Add headings
* Remove exit buttons when in separate window
2022-02-10 15:23:36 +08:00
Shamim Rezaie e30493108d Merge branch 'MDL-73722' of https://github.com/paulholden/moodle 2022-02-10 17:21:10 +11:00
Jake Dallimore 264e2b4781 Merge branch 'MDL-73354-master' of git://github.com/abgreeve/moodle 2022-02-10 14:14:41 +08:00
AMOS bot 612b39c175 Automatically generated installer lang files 2022-02-10 00:07:52 +00:00
Shamim Rezaie c652a07dd8 Merge branch 'MDL-73772-master' of https://github.com/aanabit/moodle 2022-02-10 09:42:25 +11:00
David Matamoros ad35d520c8 MDL-72061 reportbuilder: Fix lost focus on action menu items 2022-02-09 17:19:48 +01:00
Bas Brands 5e9e4c2e5e MDL-73816 theme_boost: increase font weight of headings 2022-02-09 17:16:35 +01:00
David Matamoros 48a6e92700 MDL-72061 reportbuilder: Report actions are shown in action menus 2022-02-09 15:55:08 +01:00
Bas Brands d9cefeba09 MDL-73795 theme_boost: align header actions on mobile 2022-02-09 15:06:04 +01:00
Bas Brands 7433e69353 MDL-73814 theme_boost: align contextheader 2022-02-09 14:34:06 +01:00
Amaia Anabitarte ddfc3316f3 MDL-73772 reports: Fix Activity completion report with no group select 2022-02-09 13:18:01 +01:00
Ilya Tregubov 7e34d42298 Merge branch 'MDL-73773' of https://github.com/paulholden/moodle 2022-02-09 13:28:43 +02:00
Ilya Tregubov acb47915e3 Merge branch 'MDL-71713-master' of https://github.com/cescobedo/moodle 2022-02-09 12:06:25 +02:00
Jun Pataleta 7d743b255d Merge branch 'MDL-73633-master' of git://github.com/mihailges/moodle 2022-02-09 17:45:54 +08:00
Huong Nguyen b5c181f117 MDL-72915 qtype_ddimageortext: Fix eventHandler for Unlimited items
Sometimes, for the question that has a lot of input groups and unlimited draggable items,
the 'clone' process takes longer than usual, so the questionManager.init() method
will not add the eventHandler for the cloned drag.
We should make sure to bind the eventHandler for the cloned too
2022-02-09 15:23:37 +07:00
Peter Dias df5425538e MDL-73373 behat: Update behat tests 2022-02-09 16:06:48 +08:00
Adrian Greeve 965f4e74cd fixup! MDL-73354 mod_assign: General tidy up of tertiary navigation. 2022-02-09 10:52:58 +08:00
Adrian Greeve ddb35c124a fixup! MDL-73354 mod_assign: Overrides page updates to tertiary navigation. 2022-02-09 10:52:35 +08:00
Adrian Greeve ac32195022 MDL-73354 mod_assign: Fixed broken timed assignment feature. 2022-02-09 10:52:35 +08:00
Adrian Greeve c565ec4535 MDL-73354 mod_assign: Removed unused test code. 2022-02-09 10:52:35 +08:00
Adrian Greeve 75aed26e78 MDL-73354 advanced grading: Updated management page.
The management page will no longer show the activity name in the
title if using secondary navigation.
2022-02-09 10:52:34 +08:00
Adrian Greeve 1b0fec7f03 MDL-73354 mod_assign: Overrides page updates to tertiary navigation. 2022-02-09 10:52:34 +08:00
Adrian Greeve 33e6a36daf MDL-73354 mod_assign: General tidy up of tertiary navigation. 2022-02-09 10:52:34 +08:00
AMOS bot e3bf7380ba Automatically generated installer lang files 2022-02-09 00:07:38 +00:00
Eloy Lafuente (stronk7) a0f8a78f16 MDL-73764 behat: Verify the report works and all files in core are ok 2022-02-08 19:25:03 +01:00
Eloy Lafuente (stronk7) 3bb4a4009c MDL-73764 tool_xmldb: Regenerate all the files detected by the report
Note that, instead of going one by one to them from the XMLDB Editor
(load, makes some tiny change, save, revert the change, save), the
report includes a commented line that, once uncommented, does regenerate
the file while reporting.

I've left it there as a commodity for the developer.
2022-02-08 19:25:03 +01:00
Eloy Lafuente (stronk7) ebd0f69daa MDL-73764 tool_xmldb: New report to show all xml files needing reconcile
People uses to edit the install.xml files manually, here and there. That
uses to come with small mistakes, like wrong white-space indentation,
some attributes out of order...

While none of them are critical, they add a lot of noise when somebody
is correctly editing a file with the XMLDB Editor because it, correctly,
overwrites the whole file and then diffs show a lot of unrelated changes.

So, this report will inform us about any file needing to be regenerated
because it has been manually edited (in a different way than the way
the editor has).

Note that the report is very basic, with minimal ouput, manually
generating the HTML, like the rest of the XMLDB Editor actions do. We
are not using renderers neither templates here.

Also note that it includes a commented line of code that, once
uncommented, enables the report to, also, fix the wrong files. Useful
for developers.
2022-02-08 19:25:02 +01:00
Paul Holden 683fc4d9d1 MDL-73811 reportbuilder: ensure audience cards are uniquely keyed. 2022-02-08 16:35:59 +00:00
Bas Brands c788b032ce MDL-73805 theme_boost: remove left icon margin
Reverted from MDL-73543 since it was causing multiple
icon alignment issues, Fixed the alignment issue for
the recently accessed courses block
2022-02-08 14:42:30 +01:00
Bas Brands 483686ad0e MDL-73768 theme_boost: add right margin to profile picture 2022-02-08 14:01:10 +01:00
Ilya Tregubov 5897242361 on-demand release 4.0dev+ 2022-02-08 14:54:21 +02:00
cescobedo fafa097dd2 MDL-71713 auth_cas: Set Moodle files after phpCAS upgrade 2022-02-08 07:09:12 +01:00
cescobedo 4045a42445 MDL-71713 auth_cas: Upgrade phpCAS to 1.4.0 2022-02-08 07:02:04 +01:00
Andrew Nicols 68ae89ccc4 Merge branch 'MDL-73631' of https://github.com/paulholden/moodle 2022-02-08 12:03:42 +08:00
Jun Pataleta 939cb7a90f Merge branch 'MDL-72246-master-2' of https://github.com/andrewnicols/moodle 2022-02-08 11:36:59 +08:00
Andrew Nicols 70cc41eec8 MDL-72246 core_completion: Only fetch other completion data on requested
Prior to this patch, the code was fetching all completion data for all
activities in a course, even when the activity was not requested. This
leads to recursion issues as the data has not been added to the cache
before this operation occurs.

To handle this situation, only the requested CM is fetched in full, and
a boolean flag is used to store whether the full data has been fetched.

When returning a partially fetched value from the cache, the flag is
used to determine whether more data must be fetched, and the cache
updated.

The flag is filtered out before the value is returned.

Note: Many of the tests were updated as these were inspecting private
features of the API which should not really be tested.
2022-02-08 11:35:23 +08:00
Andrew Nicols adc61dddc3 MDL-72246 core_completion: Test coverage improvements for completion 2022-02-08 11:22:14 +08:00
Andrew Nicols a999b12e02 MDL-72246 core_completion: Stop testing the inner workings of get_data() 2022-02-08 11:22:14 +08:00
Andrew Nicols 95c6d3c8d9 Merge branch 'MDL-73716' of https://github.com/stronk7/moodle 2022-02-08 10:59:34 +08:00
Andrew Nicols df154ecb72 Merge branch 'MDL-73116' of https://github.com/roland04/moodle 2022-02-08 10:57:40 +08:00
Andrew Nicols b710e57ebd Merge branch 'MDL-73766-master' of https://github.com/lucaboesch/moodle 2022-02-08 10:54:44 +08:00
Peter Dias 675b7eb234 MDL-73373 report: Disable module level report options 2022-02-08 09:04:04 +08:00
Peter Dias 81492f900f MDL-73373 roles: Enable tertiary navigation in module context 2022-02-08 09:04:04 +08:00
Víctor Déniz 1a42a95e8d Merge branch 'MDL-73279' of https://github.com/call-learning/moodle 2022-02-07 18:13:20 +00:00
Eloy Lafuente (stronk7) c5e2a4ded0 Merge branch 'MDL-73601-master' of https://github.com/aanabit/moodle 2022-02-07 12:01:19 +01:00
Mikel Martín 268157743f MDL-73116 reportbuilder: Use triggerElement parameter to return focus 2022-02-07 11:33:35 +01:00
Mikel Martín 8b535c297b MDL-73116 core: Add triggerElement parameter to saveCancel dialogue
triggerElement parameter is used to return the focus after modal is hidden
2022-02-07 11:33:35 +01:00
Eloy Lafuente (stronk7) 43280530b6 MDL-73716 phpunit: remove old simpletest static members
And replace them by phpunit @covers annotations including
all the classes declared or extended in the removed members.

It's not awesome coverage, but better than nothing.
2022-02-07 10:42:17 +01:00
Shamim Rezaie 9efbb2346a Merge branch 'MDL-73684-master' of https://github.com/marinaglancy/moodle 2022-02-07 18:40:39 +11:00
Luca Bösch c5df2d0c58 MDL-73766 theme_boost: have login page use loginto string 2022-02-07 07:54:31 +01:00
Andrew Nicols d4d0e14fef Merge branch 'MDL-73697-master' of https://github.com/ferranrecio/moodle 2022-02-07 14:23:31 +08:00
Shamim Rezaie 7a1488120e Merge branch 'MDL-73644-master' of https://github.com/lameze/moodle 2022-02-07 16:41:26 +11:00
Shamim Rezaie 7c8aaa6df2 Merge branch 'MDL-73480-master' of https://github.com/bmbrands/moodle 2022-02-07 16:36:39 +11:00
Andrew Nicols 8c08634b69 Merge branch 'MDL-73659' of https://github.com/stronk7/moodle 2022-02-07 13:34:01 +08:00
Simey Lameze 5396814489 MDL-73644 core: link confirm module CL to related JSDoc 2022-02-07 13:26:47 +08:00
Huong Nguyen 02f622c247 MDL-73784 usertours: Update tour steps to use Moodle langstring 2022-02-07 10:57:16 +07:00
Huong Nguyen 4c097bc6c0 MDL-73784 usertours: Support multiple PIXICON placeholder 2022-02-07 10:49:52 +07:00
Huong Nguyen 681df03204 MDL-73784 usertours: Make End tour button's label translatable
We can use the Moodle language format for End tour button's label now
2022-02-07 10:49:51 +07:00
Huong Nguyen d9d068699c MDL-73784 usertours: Deprecation of the step::get_string_from_input
Modified code to just simply call helper::get_string_from_input() rather than duplicating the code
2022-02-07 09:45:31 +07:00
Huong Nguyen 21caea1f9a MDL-73784 usertours: Improve the tours maching
- Introduce some new constants like MY, MYCOURSES, FRONTPAGE_MY...
 - The Tour now can detect the URL match is pointing to Dashboard (/my/) or My Course (/my/courses.php) correctly
2022-02-07 09:39:46 +07:00
Andrew Nicols 2d39b5bb39 Merge branch 'master_MDL-73666-questionimagebug' of https://github.com/catalyst/moodle-MDL-70329 2022-02-07 10:12:20 +08:00
Andrew Nicols bb20aefc8d Merge branch 'MDL-71712-master' of https://github.com/aanabit/moodle 2022-02-07 09:53:09 +08:00
Marc-Alexandre Ghaly 66115d7f0b MDL-73666 core_question: Question bank usage and comment modal fix
Fix for question bank modals not showing question images.
2022-02-07 08:37:05 +11:00
David Mudrák 38e05ba09f MDL-73748 admin: Check for available updates daily on random time
It's been a mistake to make every Moodle site out there to check for
available update every two hours, on the hour. We are experiencing
server load peaks that are harder and harder to deal with.

The patch addresses this by (1) checking for available updates just once
a day and (2) distributing the checking times randomly around the clock.
2022-02-06 22:02:34 +01:00
Eloy Lafuente (stronk7) 7a0d024e60 MDL-73659 phpunit: restore_date, api, rule, plugin, manager & helper
All restore_date_test, api_test, rule_test, plugin_test,
manager_test, helper_test testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- All restore_date_test cases have been put under xxx\backup
  level 2 (valid API) namespace.
2022-02-05 00:03:32 +01:00
Claude Vervoort b4d9519c47 MDL-73779 mod_lti: dynreg fix messages supported 2022-02-04 15:32:55 -05:00
Sara Arjona 6652ec135b on-demand release 4.0dev+ 2022-02-04 18:18:46 +01:00
Paul Holden b8f9f6635c MDL-73669 behat: correctly deprecate step for using flat navigation. 2022-02-04 17:18:43 +01:00
Marina Glancy 15eb402228 MDL-73669 core_enrol: move deprecated behat steps to own file
Steps were initially deprecated in MDL-72090
2022-02-04 17:17:08 +01:00
Marina Glancy c5c33d8eba MDL-73669 core_calendar: move deprecated behat steps to own file
Steps were initially deprecated in  MDL-72810
2022-02-04 17:17:08 +01:00
Marina Glancy 31751c2f32 MDL-73669 behat: allow multiple files with deprecated steps 2022-02-04 17:17:08 +01:00
Sara Arjona de83532bfa MDL-71696 question: Fix random PHPUnit error with question order 2022-02-04 18:10:35 +02:00
Sara Arjona 9cc81bb7bf MDL-71696 question: Fix Oracle GROUP BY error - Round 2 2022-02-04 18:10:35 +02:00
Eloy Lafuente (stronk7) 3e071a5240 Merge branch 'MDL-71696-behat-oracle-fix' of https://github.com/sarjona/moodle 2022-02-04 18:10:35 +02:00
Sara Arjona 2a01259d85 MDL-71696 core_question: Fix Oracle GROUP BY error 2022-02-04 18:10:35 +02:00
Paul Holden 2e8a9623e5 MDL-73773 behat: correctly deprecate step for using flat navigation. 2022-02-04 11:59:36 +00:00
Laurent David e1d255c95b MDL-73368 mod_bigbluebuttonbn: update activity icon
* Add the new icon (svg and png)
* Remove unused icon and font (the glyph was used once in the removed style)
2022-02-04 10:44:19 +01:00
Jun Pataleta 33208c84f3 Merge branch 'MDL-73651-master' of git://github.com/rezaies/moodle 2022-02-04 10:36:50 +08:00
Shamim Rezaie a159527748 MDL-73651 calendar: search in localised module type names as well 2022-02-04 10:06:05 +11:00
Víctor Déniz a5a3f87a76 Merge branch 'MDL-73514' of https://github.com/stronk7/moodle 2022-02-03 22:20:20 +00:00
Víctor Déniz 8890a730fc Merge branch 'MDL-73517' of https://github.com/stronk7/moodle 2022-02-03 22:02:39 +00:00
Víctor Déniz 6303c65b3f Merge branch 'MDL-73758-master' of https://github.com/snake/moodle 2022-02-03 21:45:50 +00:00
Eloy Lafuente (stronk7) ecbdf3fbad Merge branch 'MDL-71696-fix-oracle' of https://github.com/sarjona/moodle 2022-02-03 22:38:28 +01:00
Víctor Déniz 29f699cef7 Merge branch 'MDL-73605' of https://github.com/paulholden/moodle 2022-02-03 21:29:09 +00:00
Eloy Lafuente (stronk7) 549cfc5efb Merge branch 'MDL-73765-master-twenty-three-minutes' of https://github.com/mudrd8mz/moodle 2022-02-03 22:27:02 +01:00
Sara Arjona dc8b6a84a1 MDL-71696 question: Fix Oracle failures with ambiguous colum 2022-02-03 19:28:27 +01:00
David Mudrák 296f714916 MDL-73765 task: Fix calculation of random minute in the task schedule
The random minute was incorrectly set to a random value from the range
0 - 23 instead of 0 - 59 due to this copy & paste mistake.
2022-02-03 19:22:58 +01:00
Sara Arjona 1d0609bbdd MDL-71696 question: Align new tables with install/upgrade
Amended because, in all cases, install.xml wins and we
have make upgrade.php to match it...

But in the question_versions->status case, that needs to
be NOT_NULL, so upgrade was correct and install.xml has
been changed for it.

Note this has been changed without using the editor because
it has been detected that there are other changes in the xml
file that have been added manually, we'll create a "reconcile"
issue to fix that (mainly whitespace).

So, yes, please, always use the editor.
2022-02-03 16:32:04 +01:00
Ilya Tregubov aafeca8f75 Merge branch 'MDL-73664-master' of https://github.com/aanabit/moodle 2022-02-03 16:37:55 +02:00
Eloy Lafuente (stronk7) 4f02047208 Merge branch 'MDL-73507-master' of https://github.com/lameze/moodle 2022-02-03 15:25:18 +01:00
Gareth Barnard 9636ca7e36 MDL-73719 themes: Redundant theme_reset_all_caches callback. 2022-02-03 15:11:00 +01:00
Eloy Lafuente (stronk7) a2e4be3620 Merge branch 'MDL-73728-master' of https://github.com/andrewnicols/moodle 2022-02-03 14:59:00 +01:00
Paul Holden 002077952a MDL-73605 mod_forum: add label/help to the subscription mode options. 2022-02-03 13:25:34 +00:00
Ilya Tregubov 2b4f9d3c40 Merge branch 'MDL-69088' of https://github.com/jacdsouza/moodle 2022-02-03 14:56:11 +02:00
Amaia Anabitarte 0023f63772 MDL-73664 lib: Set Moodle files after ADODB upgrade 2022-02-03 13:56:02 +01:00
Sara Arjona b841a811be Merge branch 'master_MDL-71696-versioning-integration' of https://github.com/catalyst/moodle-MDL-70329 2022-02-03 13:25:27 +01:00
Jun Pataleta a772f13eba Merge branch 'MDL-73632-master-2' of https://github.com/bmbrands/moodle 2022-02-03 19:27:56 +08:00
Safat Shahin bf55e5a481 MDL-71696 core_question: class autoload changes
This commit implements some class autoloading
fixes to align with core question structure.
2022-02-03 22:22:50 +11:00
Safat Shahin 3008edd366 MDL-71696 core_question: Implement question status change
This commit implements the status change pop up for a question
in the base view. This feature update will allow the change of
status of a question without creating a new version.
This commit also implements the status as a char rather than
an int value.
2022-02-03 22:22:50 +11:00
Marc-Alexandre Ghaly b1ad75aef5 MDL-71696 qbank_preview: previewquestion plugin update
This commit implements versioning and associated features
in the previewquestion plugin. There have been some major
changes in the random question and version selection for
questions. This commit made those changes as well as added
some more features in the preview for version selection
and adds more behat coverage.
2022-02-03 22:22:50 +11:00
Safat Shahin 111951d861 MDL-71696 mod_quiz: quiz updates and behat coverage
The versioning changes will require some major changes
in the backup and restore of question bank and its
elements. This change introduces those changes to make
it compatible with the new world of versioning in question
bank. This commit also removes quiz_slots fields and
quiz_slot_tags table.
This commit will also introduce the versioning db
structure and some major changes to the quiz
and quiz attempts for the question, random
question and the view.
This commit implements the behat changes for versioning
in core question and associated locations.
2022-02-03 22:22:44 +11:00
Guillermo Gomez c6cfca2a08 MDL-71696 core_question: Changes for versioning
This commit adds the changes in questiontype base
to work with new question tables and the new structure in the
databse. Also needed for versioning.
This implementation will also introduct the question status
which allows a question to be in draft and ready status.
I also introduces changes to the base view where it shows
the latest version of the questions. The view of versions
for a question is not implemented in this commit.
This implementation will also introduce changes in the core
qtype plugins to support versioning and the changed
db schema.
2022-02-03 22:22:44 +11:00
Safat Shahin 7547f3e9f0 MDL-71696 tool_brickfield: accessibility changes for versioning
This implementation will introduce changes in the admin tools plugin brickfield to support versioning and the changed db schema.
2022-02-03 22:22:44 +11:00
Safat Shahin fc4c108f5b MDL-71696 core_question: question instance report
This commit implements changes in the question
instance report to support the new db structure
for versioning. I considers each question as a
an entity rather than counting each versions.
2022-02-03 22:22:44 +11:00
Guillermo Gomez c34b89a3c2 MDL-71696 core_question: Implement new database schema
This commit implements the new database structure for
versioning in question. It also does the migration of
current data to the new structure.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
2022-02-03 22:22:38 +11:00
Andrew Nicols fc082d349c MDL-73728 admin: Move adminpresets to admin/presets
This commit moves the presets subsystem to a location within the admin
folder, which is more appropriate given its purpose and reduces
developer frustration with tab completion of the admin directory.
2022-02-03 19:14:28 +08:00
Jun Pataleta 4e1a6e6830 Merge branch 'MDL-73646-master-v2' of https://github.com/sharidas/moodle 2022-02-03 19:09:37 +08:00
Jackson D'souza 18de3388f8 MDL-69088 cache: Make file cache store purge async 2022-02-03 10:30:09 +00:00
Eloy Lafuente (stronk7) 02747f07d3 Merge branch 'MDL-73682' of https://github.com/paulholden/moodle 2022-02-03 10:59:56 +01:00
Ilya Tregubov 20cbf048bc Merge branch 'MDL-73543-master' of https://github.com/lameze/moodle 2022-02-03 10:52:25 +02:00
Jake Dallimore b6e9d54a38 MDL-73758 availability: fix info::is_available_for_all()
Should only return true early when the config setting is disabled,
not when it's enabled.
2022-02-03 16:41:44 +08:00
Paul Holden 108feb6ffa MDL-73631 reportbuilder: singular, pivoted Behat data generators. 2022-02-03 08:31:01 +00:00
Andrew Nicols 5b730e1149 Merge branch 'MDL-72783-master-test' of https://github.com/rezaies/moodle 2022-02-03 15:30:59 +08:00
Shamim Rezaie 78b7fbb390 Merge branch 'MDL-73538-master' of https://github.com/ferranrecio/moodle 2022-02-03 15:24:04 +11:00
Jun Pataleta 8c7285040b Merge branch 'MDL-73649-master' of https://github.com/bmbrands/moodle 2022-02-03 12:11:06 +08:00
Jun Pataleta 0ca2ed3432 Merge branch 'MDL-73741-master' of https://github.com/sarjona/moodle 2022-02-03 12:06:26 +08:00
Jun Pataleta 454ee3852e Merge branch 'MDL-73594-master' of https://github.com/bmbrands/moodle 2022-02-03 11:51:35 +08:00
Jun Pataleta 5914c8ced2 Merge branch 'MDL-73452-master' of git://github.com/mickhawkins/moodle 2022-02-03 11:44:31 +08:00
Jun Pataleta b3d83d0ea4 Merge branch 'MDL-73390-master' of https://github.com/bmbrands/moodle 2022-02-03 11:36:58 +08:00
Jun Pataleta 6e9d9a5905 Merge branch 'MDL-73711' of https://github.com/stronk7/moodle 2022-02-03 11:14:30 +08:00
Eloy Lafuente (stronk7) 011251f229 Merge branch 'MDL-71724-master' of https://github.com/sarjona/moodle 2022-02-02 19:03:24 +01:00
Sara Arjona 5b0ff32841 MDL-73741 adminpresets: Remove duplicates from breadcrumbs 2022-02-02 16:51:37 +01:00
Eloy Lafuente (stronk7) 9f2fb75e77 Merge branch 'MDL-73730' of https://github.com/paulholden/moodle 2022-02-02 16:30:12 +01:00
Ilya Tregubov f079bd0626 Merge branch 'MDL-73623-master' of https://github.com/bmbrands/moodle 2022-02-02 15:41:20 +02:00
Simey Lameze 0074bd7338 MDL-73507 course: make current activity highlight darker 2022-02-02 20:36:37 +08:00
Jun Pataleta ee7b119943 Merge branch 'MDL-73363-master' of https://github.com/peterRd/moodle 2022-02-02 19:14:39 +08:00
Simey Lameze 005b6269c3 MDL-73543 theme: add left margin to move block icon 2022-02-02 19:11:52 +08:00
Eloy Lafuente (stronk7) 5aa93e3066 Merge branch 'MDL-72466-master' of https://github.com/bmbrands/moodle 2022-02-02 12:10:18 +01:00
Ferran Recio 7c249a7d84 MDL-73538 core_courseformat: fix course index manual completion
The current manual completion button triggers an event to alert the page
of any completion change. This event is capture in the course page by
the core_courseformat/local/content module but it was ignored when this
happens in an activity page. Now the activity header has its own
component to capture this event and support possible future reactive
actions.
2022-02-02 11:54:12 +01:00
Jun Pataleta ac9c2e1bc0 Merge branch 'MDL-73310-master' of https://github.com/aanabit/moodle 2022-02-02 18:40:57 +08:00
Eloy Lafuente (stronk7) 55b7ac9064 Merge branch 'MDL-73674' of https://github.com/paulholden/moodle 2022-02-02 11:23:47 +01:00
Paul Holden 85f2c044c0 MDL-73730 calendar: more precise matching of calendar day partial. 2022-02-02 10:19:26 +00:00
Paul Holden a73d989a65 MDL-73682 reportbuilder: allow columns to define how they're sorted. 2022-02-02 10:17:56 +00:00
Eloy Lafuente (stronk7) e1c2faca85 Merge branch 'MDL-73075' of https://github.com/paulholden/moodle 2022-02-02 11:11:16 +01:00
Paul Holden 99fa14185c MDL-73075 lang: move deprecated strings to correct component.
Fix deprecated version. See original change from f9e1c258 for context.
2022-02-02 09:59:45 +00:00
Paul Holden f37b67564a MDL-73682 reportbuilder: move active columns method to datasource.
This is consistent with similar methods for retrieving the active
filters and conditions of a given custom report.
2022-02-02 09:30:00 +00:00
Ferran Recio d7df919a2c MDL-73697 core_courseformat: fix weeks format this week badge 2022-02-02 09:25:37 +01:00
Amaia Anabitarte 2cd5c61049 MDL-73310 course: Add course index to all non-site course pages 2022-02-02 09:22:42 +01:00
Sujith Haridasan 3eda637c44 MDL-73646 navigation: Fix breadcrumbs for site admin
Fix the breadcrumbs for site administration page.
Created a new public method get_active_method for the same.
2022-02-02 10:56:16 +05:30
Mihail Geshoski f8cc5c8f8e MDL-73633 quiz: Set 'Overrides' to link to user overrides by default 2022-02-02 10:34:29 +08:00
Mihail Geshoski a50dd96c0d MDL-73633 lesson: Set 'Overrides' to link to user overrides by default 2022-02-02 10:34:29 +08:00
Mihail Geshoski d0dad63bc3 MDL-73633 assign: Set 'Overrides' to link to user overrides by default 2022-02-02 10:34:29 +08:00
Eloy Lafuente (stronk7) c352b70022 on-demand release 4.0dev+ 2022-02-01 19:52:17 +01:00
Eloy Lafuente (stronk7) 1c9d461d4a Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-02-01 19:52:13 +01:00
Amaia Anabitarte d9967a5763 MDL-73601 lib: Normalize readme_moodle.txt file name 2022-02-01 18:10:36 +01:00
Amaia Anabitarte 47ea43f5e8 MDL-73664 lib: Upgrade ADODB to 5.21.4 2022-02-01 16:58:30 +01:00
Mihail Geshoski 1c8cf75c47 MDL-73633 navigation: Force 'Overrides' into the more menu by default
Forces the 'Overrides' item to be always displayed within the 'more'
menu in the secondary navigation in the module context.
2022-02-01 23:42:04 +08:00
Amaia Anabitarte 4c7fac1957 MDL-71712 lib: Set Moodle files after PHP-JWT upgrade 2022-02-01 16:25:35 +01:00
Laurent David 4d726630b1 MDL-73279 mod_bigbluebuttonbn: Remove notify change option in settings
* As 'Send content change notification' is standard in all activities in Moodle 4.0
 we should be removing 'Notify this change to users enrolled'
* Fix and adjust tests
2022-02-01 15:39:31 +01:00
Michael Hawkins 537e31cf96 MDL-73452 navigation: Update to Course reuse string in secondary nav
Previously this used the "Course administration" string, which causes
some confusion for those familiar with the older usage of that string.
A new "Course reuse" string has been added to better reflect what is
being linked to in course secondary navigation.
2022-02-01 21:10:59 +08:00
Marina Glancy 5ddae1a189 MDL-73722 course: behat test for other users page 2022-02-01 12:23:05 +00:00
Bas Brands ed4d5bb89e MDL-73649 theme_boost: improve border-radius css 2022-02-01 13:10:08 +01:00
Michael Hawkins 02ba9600d6 MDL-73580 core: Updated security.txt expiry
Our standard process is to ensure major releases have an expiry 3 weeks
after the next major release. This update ensures 4.0 adheres to this
based on the current major release schedule. Date format also updated
to meet latest spec standard.
2022-02-01 19:53:21 +08:00
Amaia Anabitarte af1401bc76 MDL-71712 lib: Upgrade PHP-JWT to 6.0.0 2022-02-01 12:50:36 +01:00
Bas Brands 6f3a7998af MDL-73632 core_comment: useravatar styles new comments 2022-02-01 12:21:55 +01:00
Paul Holden 81f13529b2 MDL-73674 output: validate node actions in participants navigation. 2022-02-01 09:15:53 +00:00
Jun Pataleta 6b72060fcd Merge branch 'MDL-73357-master' of git://github.com/mihailges/moodle 2022-02-01 11:51:01 +08:00
Mihail Geshoski f2000f098f MDL-73357 mod_data: Update behat tests
After replacing the tabs navigation with the secondary and tertiary
navigation, the completion data will be no longer displayed on all
pages in the database activity. Therefore, we need to update the
behat tests that still verify the existance of completion data in
pages other than the database view page.
2022-02-01 11:45:12 +08:00
Mihail Geshoski 4cc2b15e51 MDL-73357 mod_data: Update tertiary navigation
The following commit disables the acivity header information in
pages where this information is not required, adds missing headings,
updates the breadcrumbs, repositions the groups selector in the
database view page.
2022-02-01 11:45:12 +08:00
Shamim Rezaie a70a2b25de Merge branch 'MDL-73612-master-2' of https://github.com/bmbrands/moodle 2022-02-01 14:33:34 +11:00
Jun Pataleta 02c3821975 MDL-73270 core: Update PHP XML-RPC warning message wording for accuracy
* Instead of the PHP XML-RPC extension is 'no longer supported' by PHP,
it is more accurate to say that it is 'no longer maintained'.
2022-02-01 11:04:15 +08:00
Jun Pataleta 99c3c9d169 Merge branch 'MDL-73270-master' of https://github.com/HuongNV13/moodle 2022-02-01 11:00:49 +08:00
Paul Holden 91683bf803 MDL-73722 enrol: verify we have a search button to render. 2022-01-31 18:11:07 +00:00
Ilya Tregubov c94d463afa Merge branch 'MDL-73706' of git://github.com/paulholden/moodle 2022-01-31 16:59:15 +02:00
Ilya Tregubov 2708e7ef60 Merge branch 'MDL-72756' of git://github.com/paulholden/moodle 2022-01-31 15:12:21 +02:00
Bas Brands f7868ad288 MDL-73649 theme_boost: remove dashed border add button 2022-01-31 12:03:35 +01:00
Bas Brands 9a9bee6d0d MDL-73623 theme_boost: footer button hidden using drawers 2022-01-31 11:32:44 +01:00
Bas Brands a74c715627 MDL-73612 gradereport_grader: drawer layout issues 2022-01-31 10:09:33 +01:00
Huong Nguyen 4a7caad272 MDL-72783 usertours: Create tours for the new navigation of Moodle 4.0 2022-01-31 18:27:00 +11:00
Huong Nguyen c59d3d7496 MDL-72783 usertours: Make tour name and description translatable
We can use the Moodle language format for tour's name and description now.
Also, several existing bugs were fixed in this commit when we use
the Moodle language format for step's title and content.
Now, it will display the translated text in the breadcrumb, editing page
instead of displaying the [identifier][component]
2022-01-31 18:27:00 +11:00
Huong Nguyen 87f233e698 MDL-72783 usertours: Improve the tours maching
Improve the regex so the Tour can detect the URL match is pointing to Dashboard (/my/) or My Course (/my/courses.php) correctly
2022-01-31 18:24:49 +11:00
Huong Nguyen 524f75797a MDL-72783 usertours: Fix the tour display for pages with drawers 2022-01-31 18:24:49 +11:00
Eloy Lafuente (stronk7) 6f982726fe MDL-73711 behat: Bump to Behat 3.10.x
Generated with php73, following the instructions at:

https://docs.moodle.org/dev/Composer

Note this also comes with a minor PHPUnit bump to 9.5.13.
2022-01-29 16:04:11 +01:00
AMOS bot 900cb40f6c Automatically generated installer lang files 2022-01-29 00:07:35 +00:00
Eloy Lafuente (stronk7) b524f21b44 MDL-73517 mnet: add some openssl missing parameters
Since php80 the 5th parameter (cypher) in the following functions:
  - openssl_seal
  - openssl_open
is mandatory, hence:
  - adding it.
  - with value 'RC4' to keep BC.
2022-01-28 20:10:52 +01:00
Eloy Lafuente (stronk7) fcbe439c4d MDL-73514 mnet: fix promiscuous mode and php80 support 2022-01-28 20:10:39 +01:00
Ilya Tregubov 4f9a539600 on-demand release 4.0dev+ 2022-01-28 20:17:19 +02:00
Ilya Tregubov 4c1c24e579 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-01-28 20:17:18 +02:00
Marina Glancy 3cc217193a MDL-73684 core_user: check edit capability only when user exists 2022-01-28 18:01:08 +01:00
Paul Holden eb2e261df4 MDL-73706 reportbuilder: fix count for columns with multiple fields.
When using the "Count distinct" aggregation type on a column that
selects multiple fields, we should account for each of them in the
returned SQL.

Move helper method to facilitate this to the base aggregation class
so it can be re-used between all types.
2022-01-28 15:38:40 +00:00
Jun Pataleta e1f34b394d MDL-73188 tool_usertours: Fix validation of text content 2022-01-28 20:53:07 +08:00
Sara Arjona 67b2e10f03 Merge branch 'MDL-72089' of https://github.com/stronk7/moodle 2022-01-28 08:51:43 +01:00
Ilya Tregubov 45c78098e9 Merge branch 'MDL-73337-fix' of https://github.com/sarjona/moodle 2022-01-28 09:43:53 +02:00
Sara Arjona 291ddd3bce MDL-73337 quiz: Fix PHPUnit errors with missing context_module 2022-01-28 08:38:59 +01:00
Shamim Rezaie a9dcc176c9 Merge branch 'MDL-72852-master-fix' of https://github.com/sarjona/moodle 2022-01-28 14:58:37 +11:00
Jun Pataleta 8aa45ea90d MDL-73470 tool_componentlibrary: Fix illegal whitespace 2022-01-28 11:47:13 +08:00
Jun Pataleta fd452f2fa2 Merge branch 'MDL-73470' of https://github.com/roland04/moodle 2022-01-28 11:02:01 +08:00
Huong Nguyen 683375af8b MDL-73270 admin: Warn about xmlrpc webservice protocol enabled
Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2022-01-28 09:32:08 +07:00
Víctor Déniz 9fac49a630 Merge branch 'MDL-73210-master-2' of https://github.com/HuongNV13/moodle 2022-01-28 01:09:36 +00:00
Eloy Lafuente (stronk7) 46d6c005e8 Merge branch 'MDL-72937' of https://github.com/paulholden/moodle 2022-01-28 00:25:52 +01:00
Eloy Lafuente (stronk7) 8f8b780008 Merge branch 'MDL-73216-master' of https://github.com/bmbrands/moodle 2022-01-28 00:23:48 +01:00
Tien Nguyen e21a8577c6 MDL-73337 Quiz: Editing quizzes should be logged in detail 2022-01-27 22:49:54 +00:00
Bas Brands 7c76e1c349 MDL-72466 core_output: dropdown menu alignment 2022-01-27 17:24:20 +01:00
Ilya Tregubov f6ff70c2e1 Merge branch 'MDL-73375-master' of https://github.com/bmbrands/moodle 2022-01-27 17:10:45 +02:00
Ilya Tregubov 57fe1a3099 Merge branch 'MDL-67853-master' of https://github.com/crazyserver/moodle 2022-01-27 16:41:19 +02:00
Pau Ferrer Ocaña d195956f3a MDL-67853 message: Translate user message preference from restore and WS 2022-01-27 15:22:15 +01:00
Pau Ferrer Ocaña b4c75986ad MDL-67853 message: Adapt tests removing online/offline settings 2022-01-27 15:22:15 +01:00
Pau Ferrer Ocaña d74bd798b6 MDL-67853 message: Remove on/offline settings on message preferences 2022-01-27 15:22:15 +01:00
Pau Ferrer Ocaña e8ad1eaa43 MDL-67853 message: Update notification config and preferences 2022-01-27 15:22:08 +01:00
Paul Holden 9626002d56 MDL-72756 reportbuilder: implement tests covering privacy updates. 2022-01-27 12:04:05 +00:00
David Matamoros ed55c7ecd6 MDL-72756 reportbuilder: Implement privacy provider
Co-authored-by: Paul Holden <paulh@moodle.com>
2022-01-27 12:04:03 +00:00
Eloy Lafuente (stronk7) 86282be888 Merge branch 'MDL-73588-master-curlfile' of https://github.com/mudrd8mz/moodle 2022-01-27 12:16:51 +01:00
Sara Arjona 1b7c63b191 Merge branch 'MDL-73562-master' of https://github.com/bmbrands/moodle 2022-01-27 11:24:30 +01:00
Shamim Rezaie 01e21818fb Merge branch 'MDL-73500' of https://github.com/stronk7/moodle 2022-01-27 11:37:47 +11:00
Eloy Lafuente (stronk7) 2d2b70bc01 MDL-72089 behat: Need to hover the cards to make the buttons visible
Kudos to Chrome that detected this. The buttons are now not visible
until you hover the course card. Hence, we have to do the same with
extra behat step, to allow the following click to work.
2022-01-26 23:31:05 +01:00
Bas Brands eb6c4ddf4f MDL-73594 theme_boost: only show lang icon on mobile 2022-01-26 15:34:49 +01:00
Bas Brands 2524339fc6 MDL-73390 core_course: align section collapse icons 2022-01-26 12:37:00 +01:00
Bas Brands 9c06763193 MDL-73480 core_course: course section heading alignment 2022-01-26 11:28:49 +01:00
Sara Arjona 08357782f2 MDL-72852 badges: Improve performance to display Badges nav
The course_get_user_navigation_options() is called on each request
from the add_course_essentials() method, to initialise the basic
navigation options that are available or not for the current user.
This information is not always displayed in boost (for
instance, in a module page), but it might be required by some blocks,
like Navigation.
However, this block is hidden by default in boost since MDL-73347,
so at any point we should check if it's possible to change the way
this navigations options is loaded, to only get this information
when it's strictly required.
2022-01-26 10:36:53 +01:00
Eloy Lafuente (stronk7) 049c7f0822 MDL-73188 usertours: Fix language string key typo 2022-01-26 10:29:49 +01:00
Eloy Lafuente (stronk7) f067a420cf Merge branch 'MDL-72089' of https://github.com/Chocolate-lightning/moodle 2022-01-26 10:23:01 +01:00
Eloy Lafuente (stronk7) 3916f80200 Merge branch 'MDL-72626-master' of https://github.com/sarjona/moodle 2022-01-26 10:16:27 +01:00
Eloy Lafuente (stronk7) 19dbb28366 Merge branch 'MDL-73314-master' of https://github.com/andrewnicols/moodle 2022-01-26 09:36:30 +01:00
Eloy Lafuente (stronk7) 567bf81981 Merge branch 'MDL-71706' of https://github.com/paulholden/moodle 2022-01-26 08:45:06 +01:00
Eloy Lafuente (stronk7) c41562279c Merge branch 'MDL-71711' of https://github.com/paulholden/moodle 2022-01-26 08:40:46 +01:00
AMOS bot e61d11f461 Automatically generated installer lang files 2022-01-26 00:07:39 +00:00
Mikel Martín b43c28567a MDL-73470 tool_componentlibrary: Documentation for toggle input 2022-01-25 18:04:58 +01:00
Mikel Martín 795087462f MDL-73470 core: Move toggle template to core 2022-01-25 18:04:58 +01:00
Bas Brands a809372c9f MDL-73375 theme_boost: main page scrollbars
match scrollbars for courseindex and main page
2022-01-25 13:31:46 +01:00
Bas Brands c5089fd7a7 MDL-73216 theme_boost: fix mobile primary nav 2022-01-25 10:50:42 +01:00
Bas Brands 068bb8ae8b MDL-73562 core_contentbank: alignment fixes 2022-01-25 09:35:07 +01:00
Sara Arjona 320f6fb5c6 MDL-72626 lib: Set Moodle files after RTLCSS upgrade 2022-01-25 09:20:34 +01:00
Sara Arjona 68578fc860 MDL-72626 lib: Upgrade RTLCSS to 1.0.1 2022-01-25 09:19:59 +01:00
Shamim Rezaie 090fd3f8ae Merge branch 'MDL-72852-master' of https://github.com/sarjona/moodle 2022-01-25 13:34:01 +11:00
Shamim Rezaie 05e5488b54 Merge branch 'MDL-73638' of https://github.com/paulholden/moodle 2022-01-25 13:15:26 +11:00
Shamim Rezaie 682340d858 MDL-73635 tool_componentlibrary: Removed extra whitespaces 2022-01-25 11:36:17 +11:00
Shamim Rezaie ca53fa6919 Merge branch 'MDL-73635-master' of https://github.com/junpataleta/moodle 2022-01-25 11:03:06 +11:00
Shamim Rezaie 61f6e6c639 Merge branch 'MDL-73068-master-2' of git://github.com/mickhawkins/moodle 2022-01-25 10:55:47 +11:00
Eloy Lafuente (stronk7) bdf816744b Merge branch 'MDL-71889' of https://github.com/paulholden/moodle 2022-01-25 00:14:51 +01:00
Eloy Lafuente (stronk7) d8e1ec2c81 Merge branch 'MDL-73188-master-3' of https://github.com/HuongNV13/moodle 2022-01-25 00:06:30 +01:00
Frode Petterson 080105c6d3 MDL-73588 curl: Fix expected CURLOPT_FILE behavior
After cbf9dfb the CURLOPT_FILE no longer behaves as expected. All
redirect responses are appended to the same stream resource.  This fix
reverts back to the old behavior by setting the stream pointer back to
the beginning for each subsequent redirect.
2022-01-24 17:08:25 +01:00
Sara Arjona 7c1d536b0d MDL-72852 navigation: Do not display badges when empty
If there are no course badges, students shouldn't have a link to a
page saying there are no badges available.

This patch is for displaying the Badges in the secondary navigation
only if the user can manage badges or there is, at least, one
badge available to the current user.
2022-01-24 15:31:23 +01:00
Sara Arjona 5b220a45ef MDL-71724 behat: Fix accessibility issues when upgrading axe lib 2022-01-24 15:30:57 +01:00
Sara Arjona bc77f8d9ea MDL-71724 lib: Set Moodle files after axe upgrade 2022-01-24 15:30:57 +01:00
Sara Arjona e35a803476 MDL-71724 lib: Upgrade axe to 4.3.5 2022-01-24 15:30:57 +01:00
Jun Pataleta a336dfc271 Merge branch 'MDL-73618-master' of https://github.com/ferranrecio/moodle 2022-01-24 18:59:15 +08:00
Jun Pataleta fbc3e7568e Merge branch 'MDL-73493' of git://github.com/paulholden/moodle 2022-01-24 17:32:32 +08:00
Shamim Rezaie 0f803de8aa Merge branch 'MDL-73254' of https://github.com/call-learning/moodle 2022-01-24 19:30:13 +11:00
Laurent David 9877868c6f MDL-73254 mod_bigbluebuttonbn: Fix hide recording functionality
* The hide recording is working in combination with several settings and should
allow the Record button to be hidden either globally on in a given activity
2022-01-24 08:33:45 +01:00
Mathew May c530e4c448 MDL-72089 block_myoverview: Template changes for styling 2022-01-24 15:09:38 +08:00
Jake Dallimore 041b1beb46 Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle 2022-01-24 13:40:57 +08:00
Andrew Nicols 6bec1964cc Merge branch 'MDL-73598' of https://github.com/paulholden/moodle 2022-01-24 11:29:48 +08:00
Andrew Nicols 5eebaa3cc1 Merge branch 'MDL-73625-master' of https://github.com/jleyva/moodle 2022-01-24 11:09:08 +08:00
Jake Dallimore 6e89a2e752 Merge branch 'MDL-73485' of https://github.com/stronk7/moodle 2022-01-24 10:46:06 +08:00
Jake Dallimore 1fa04d2e06 Merge branch 'MDL-73180' of git://github.com/paulholden/moodle 2022-01-24 10:37:53 +08:00
Andrew Nicols ea30c5e14b MDL-73314 core: Add CL documentation for core/toast 2022-01-24 10:03:10 +08:00
Andrew Nicols 7dd0a6983d MDL-73314 tool_componentlibrary: Add shortcode for jsdoc 2022-01-24 09:53:31 +08:00
Andrew Nicols ce0ac9ce75 MDL-73314 core: Accept a Promise which resolves to string for toasts 2022-01-24 09:53:30 +08:00
Jun Pataleta 35338975c3 MDL-73635 tool_componentlibrary: Move dynamic tabs sample page
* Move the example page for the dynamic tabs component into the examples
folder.
2022-01-24 09:24:08 +08:00
Jun Pataleta 7a6ff551a0 MDL-73635 tool_componentlibrary: Document how to add example files 2022-01-24 09:24:08 +08:00
Jun Pataleta 080e12e9ac MDL-73635 tool_componentlibrary: Move example codes to examples folders 2022-01-24 09:21:55 +08:00
Peter Dias 95b674062f MDL-73363 page: Remove printheading settings from page. 2022-01-24 08:52:15 +08:00
Paul Holden 21989c575a MDL-72937 user: restrict Moodlenet profile field length. 2022-01-23 23:00:54 +00:00
Eloy Lafuente (stronk7) 100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Eloy Lafuente (stronk7) 5300351831 MDL-73500 general: Remove php < 73 conditional code
This commit removes code that only was being executed by php < 73
and it's 100% safe to do so because Moodle 3.11 and up require
php 73, hence it was not executed ever.

Removed code includes:
- ldap_control_paged_result and ldap_control_paged_result_response
  (that were deprecated in php 73 and have been removed in php 80).
- conditional code in the session manager, where some hacks were
  needed for php < 73. Note that this removes the private function
  append_samesite_cookie_attribute() completely because it was
  doinf nothing (first line was returning for php < 73).
- Also removed the old session.hash_function ini setting because
  it was removed in php 71.

Kept code includes:
- The environmental check_igbinary322_version test has not been
  removed because it doesn't hurt (always returns "ok" for php 73
  sites) and doing it would involve to backport the environment.xml
  file to 39 and 310. Instead, a note has been added to MDL-71747
  in order to get rid of that check for 4.1 and up.
2022-01-21 19:47:55 +01:00
Paul Holden 628541b5e1 MDL-73493 reportbuilder: correct handling of empty string in filters.
This is specifically for Oracle, which treats empty strings and NULL
in an inconsistent manner unless passed as query parameters. Increase
test coverage of the same.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2022-01-21 15:43:01 +00:00
Sara Arjona e63604fb6d on-demand release 4.0dev+ 2022-01-21 15:01:09 +01:00
Sara Arjona 8e6ed611e0 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-01-21 15:01:03 +01:00
Huong Nguyen 46b5fa0279 MDL-73210 usertours: Exported file does not contain the uploaded image
The export file now contains the attached files in the ATTO editor
We can export and import the tour to another system without losing them
 - Export process now convert the files to base64 and embed them into the export file.
 - Import process now convert the base64 from the export file to Moodle store_file.
2022-01-21 17:11:25 +07:00
Huong Nguyen 2137ce6539 MDL-73188 usertours: Make language string ID work again
- New dropdown was created, user can choose to enter the content manually
  or using Moodle Language string
- New text field was created to allow user to input the Lang string format
- New validation was created to validate the language identifier
- New Behat tests were created to validate the new feature
2022-01-21 17:07:39 +07:00
AMOS bot b88af3f0e7 Automatically generated installer lang files 2022-01-21 00:07:42 +00:00
Paul Holden 944a68ae56 MDL-71706 core: use reflection to get directory of SCSS import.
This change is required to preserve existing validation of import
paths from a76b0b8b, since upgrading ScssPhp to 1.10.0.

See scssphp/scssphp@deba6fa4 for corresponding change that means
the current directory is no longer assumed when resolving paths.
2022-01-21 00:06:38 +00:00
Paul Holden bd854aa792 MDL-71706 libraries: upgrade to version 1.10.0 of ScssPhp. 2022-01-21 00:05:03 +00:00
Paul Holden 23f55fcd88 MDL-71711 libraries: upgrade to version 1.1.2 of GeoPattern. 2022-01-20 23:41:32 +00:00
Eloy Lafuente (stronk7) d8b75c3e5e Merge branch 'MDL-73637-master' of https://github.com/ilyatregubov/moodle 2022-01-20 23:30:58 +01:00
Eloy Lafuente (stronk7) 2a736794d6 Merge branch 'MDL-73548-master' of https://github.com/bmbrands/moodle 2022-01-20 23:25:22 +01:00
Paul Holden d84e84b509 MDL-73638 qbank_usage: format activity/course names in usage modal. 2022-01-20 17:07:40 +00:00
Max Larkin 4e104467ce MDL-73555 tool_brickfield: More efficient summary data processing 2022-01-20 11:40:55 -05:00
Ilya Tregubov 44ff1672a0 MDL-73637 core: Fix broken web installation. 2022-01-20 18:34:19 +02:00
Sara Arjona 6ed6520d86 Merge branch 'MDL-73603' of https://github.com/paulholden/moodle 2022-01-20 17:23:42 +01:00
Sara Arjona 6f576194aa Merge branch 'MDL-73600' of https://github.com/paulholden/moodle 2022-01-20 15:22:10 +01:00
Jun Pataleta 299eb4b1bb Merge branch 'MDL-73523' of https://github.com/stronk7/moodle 2022-01-20 21:52:50 +08:00
Eloy Lafuente (stronk7) d2ad5e8461 MDL-73523 libraries: openssl_free_xxx() methods are deprecated in php80
So we are putting them under a standard PHP_MAJOR_VERSION < 8 condition.

Also, added TODO comments to remember to delete that block of code when
php80 becomes the minimum required versions in the future (Moodle 4.3?).

When possible, an issue has been created upstream, else a comment in
readme_moodle files has been added.

Finally, when the keys being freed were class or object attributes, also
nullify them (but when the calls were part of destructor methods).
2022-01-20 14:48:22 +01:00
Jun Pataleta 6405cad2ae Merge branch 'MDL-73436-master' of https://github.com/dravek/moodle 2022-01-20 21:26:28 +08:00
Juan Leyva d7d0987553 MDL-73625 tool_mobile: Adapt mobile settings for 4.0 2022-01-20 12:36:13 +01:00
Jun Pataleta c304ec8d02 Merge branch 'MDL-73166' of https://github.com/roland04/moodle 2022-01-20 18:15:42 +08:00
David Matamoros 5e42a09a92 MDL-73436 tool_componentlibrary: Document dynamic tabs component 2022-01-20 11:01:54 +01:00
Mikel Martín eb65298bcd MDL-73166 core_reportbuilder: Fix action links accessibility 2022-01-20 09:48:29 +01:00
Sara Arjona fa9f8c451b Merge branch 'MDL-73554' of https://github.com/Chocolate-lightning/moodle 2022-01-20 09:17:26 +01:00
Sara Arjona efd5ddbd9f Merge branch 'MDL-73114-master' of https://github.com/bmbrands/moodle 2022-01-20 09:10:07 +01:00
Paul Holden 335012580b MDL-73598 reportbuilder: feature switch for custom reports. 2022-01-19 23:20:52 +00:00
Ferran Recio 664ccecd0a MDL-73618 theme_boost: fix drawers tooltips 2022-01-19 18:03:17 +01:00
Bas Brands 5e8b258cac MDL-73114 theme_boost: show page title on Dashboard page
replace the page title when the welcome message is shown
2022-01-19 17:36:54 +01:00
Carlos Castillo 3d8620854a MDL-73493 reportbuilder: Consider users without profile field defined
Include users who haven't defined text/checkbox custom profile field
in filter operators: 'Is not empty', 'Does not contain' and 'Is not equal to'.
2022-01-19 08:47:26 -05:00
Ilya Tregubov 67570f8b21 Merge branch 'MDL-73340-master-v02' of https://github.com/ferranrecio/moodle 2022-01-19 14:58:18 +02:00
Paul Holden f69077aa8c MDL-71889 user: help text for profile field max length/user identity. 2022-01-19 11:04:48 +00:00
Paul Holden a844d885b2 MDL-73180 reportbuilder: improve relative date filter definitions.
Changes since the original implementation in e55abd71 mean that
relative date filtering (by last/next day/week, etc) is now based
on the actual current time, rather than the start or end of the
current time unit.
2022-01-19 08:22:03 +00:00
Sara Arjona 83fda16687 Merge branch 'MDL-73611-master' of https://github.com/bmbrands/moodle 2022-01-19 09:08:16 +01:00
AMOS bot 81c1e19758 Automatically generated installer lang files 2022-01-19 00:07:40 +00:00
Daniel Neis Araujo 24e5c29008 MDL-69965 moodlenet: show moodlenet in profile only if it is enabled
Amended to use plain get_config() condition.
2022-01-18 23:27:46 +01:00
Eloy Lafuente (stronk7) 3f99bf0efe Merge branch 'MDL-73581-master' of https://github.com/sarjona/moodle 2022-01-18 23:17:18 +01:00
Eloy Lafuente (stronk7) 2252efa5e3 Merge branch 'MDL-73561-master' of https://github.com/sarjona/moodle 2022-01-18 23:09:22 +01:00
Sara Arjona 7a1fdc5f15 Merge branch 'mdl-72838-fix-master' of https://github.com/jaypha/moodle 2022-01-18 15:19:55 +01:00
Sara Arjona 8969abd82a MDL-73581 grade: Display success message on the same page
The "Grades were set for X items "message will be displayed on the
same screen, to safe one click to users and make it more consistent
with other similar actions in Moodle.
2022-01-18 15:12:55 +01:00
Sara Arjona a01f1fa71c on-demand release 4.0dev+ 2022-01-18 12:27:22 +01:00
Bas Brands 8c8ba7b55e MDL-73611 theme_boost: restore scroll on drawers div 2022-01-18 11:36:49 +01:00
Michael Hawkins 22eacb1590 MDL-73068 timeline: Make dates view consistent where no courses enrolled
Updating the dates view of the block so it shows the same message as
courses view if the user is not enrolled in any courses. The block also
no longer tries to fetch any content in this case, since we know they
have no courses to fetch events from.
2022-01-18 18:22:45 +08:00
Michael Hawkins e01f2d514a MDL-73068 timeline: Update courses view to omit courses without events
Previously, the timeline block courses view included all courses in
alphabetical order, whether they contained any events matching the
relevant filters or not. This could be tedious and misleading if there
were many courses with no events appearing before a course which did
have matching events. Now, courses are only included if they contain
events matching the currently set time filter and search term. When
those values are modified, the block will be refreshed and fetch
results for the current values, and also takes these into
consideration when determining whether to display the show more courses
button.
2022-01-18 18:22:45 +08:00
Bas Brands 7179d9760e MDL-73548 theme_boost: update privacy provider for new drawers 2022-01-18 09:42:14 +01:00
Jason den Dulk 91b30b4fd1 MDL-72838 nav: Skip redirect to Dashboard from logo link
Added homeurl ($PAGE->navigation->action) to config helpers added to mustache templates.
Changed boost and classic themes to use config.homeurl on the brand logo link.

Updated global_navigation class to set properties to correct values when
get_home_page() returns HOMEPAGE_MYCOURSES.
2022-01-18 17:07:33 +11:00
Shamim Rezaie 945058b890 Merge branch 'MDL-73342-master' of https://github.com/sarjona/moodle 2022-01-18 17:00:59 +11:00
Andrew Nicols 68a711ba9b Merge branch 'MDL-73218' of https://github.com/call-learning/moodle 2022-01-18 11:15:25 +08:00
Jun Pataleta c0928b3fd2 Merge branch 'MDL-72942-master' of https://github.com/bmbrands/moodle 2022-01-18 11:14:00 +08:00
Jun Pataleta d481ce1bfb Merge branch 'MDL-69966-master' of https://github.com/danielneis/moodle 2022-01-18 10:53:51 +08:00
Jun Pataleta 426d8badbd Merge branch 'MDL-73563' of https://github.com/paulholden/moodle 2022-01-18 10:43:47 +08:00
Andrew Nicols 6670c04c23 Merge branch 'MDL-73476' of https://github.com/stronk7/moodle 2022-01-18 09:31:44 +08:00
Víctor Déniz cb3e2eeeab Merge branch 'MDL-73206' of https://github.com/call-learning/moodle 2022-01-17 22:36:06 +00:00
Víctor Déniz ab79ded136 Merge branch 'MDL-71720-master' of https://github.com/sarjona/moodle 2022-01-17 22:22:17 +00:00
Paul Holden b385e0da5e MDL-73603 webservice: fix user retrieval in token form callback. 2022-01-17 21:51:39 +00:00
Víctor Déniz 04fe24ba0a Merge branch 'MDL-73584-master' of https://github.com/sarjona/moodle 2022-01-17 18:52:53 +00:00
Eloy Lafuente (stronk7) 12be973ee6 Merge branch 'MDL-71715-master' of https://github.com/ilyatregubov/moodle 2022-01-17 18:45:37 +01:00
Eloy Lafuente (stronk7) 210ffb2367 Merge branch 'MDL-73178' of https://github.com/paulholden/moodle 2022-01-17 18:34:47 +01:00
Daniel Neis Araujo 1346a3509a MDL-69966 quiz: start attempt button should be a primary button 2022-01-17 13:53:31 -03:00
Paul Holden ccd91bc753 MDL-73600 user: remove references to deleted user fields/strings.
Since f9e1c258 they are no longer valid.
2022-01-17 15:58:24 +00:00
Sara Arjona 0921e06ff6 Merge branch 'MDL-73486-master' of https://github.com/bmbrands/moodle 2022-01-17 16:32:10 +01:00
Ilya Tregubov 67adef891f Merge branch 'MDL-73358-master' of https://github.com/junpataleta/moodle 2022-01-17 16:11:32 +02:00
Sara Arjona 81b80edf40 MDL-73584 lib: Remove role menubar from Actions menu
The menubar role defined in the "menubar d-flex" element is not
required and it's causing the following error "Required ARIA children
role not present: group, menuitemradio, menuitem, menuitemcheckbox".
2022-01-17 12:50:53 +01:00
Sara Arjona f33e0f7ab0 Merge branch 'MDL-73334-fix' of https://github.com/sarjona/moodle 2022-01-17 12:02:24 +01:00
Sara Arjona ca1d3b7f8c MDL-73334 componentlibrary: Remove ilegal whitespaces 2022-01-17 12:01:00 +01:00
Laurent David 64d9f988f4 MDL-73206 mod_bigbluebuttonbn: Fix issue with participant roles
* Participant roles could not be updated to moderator and always defaults to viewer
* Remove additional DB query in form to retrieve the current module information
2022-01-17 11:48:31 +01:00
Sara Arjona fac897936f Merge branch 'MDL-73334-master' of https://github.com/lameze/moodle 2022-01-17 11:47:09 +01:00
Jun Pataleta 596dbc7492 Merge branch 'MDL-73416-master' of https://github.com/bmbrands/moodle 2022-01-17 18:36:31 +08:00
Simey Lameze cc7de3e86c MDL-73334 core: add CL documentation for core/confirm 2022-01-17 18:10:41 +08:00
Ilya Tregubov e21ec28dc3 Merge branch 'MDL-73356-master' of git://github.com/abgreeve/moodle 2022-01-17 12:10:18 +02:00
Ilya Tregubov f5740bf995 Merge branch 'MDL-73438-master' of git://github.com/mihailges/moodle 2022-01-17 10:42:45 +02:00
Laurent David 3d197d7493 MDL-73218 mod_bigbluebuttonbn: Remove phased out settings
* Remove deprecated settings :
  - bigbluebuttonbn_recordings_validate_url,
  - bigbluebuttonbn_recordings_html_default,
  - bigbluebuttonbn_recordings_html_editable
2022-01-17 09:17:15 +01:00
Sara Arjona a654a1674a Merge branch 'MDL-73366-master' of git://github.com/abgreeve/moodle 2022-01-17 09:00:24 +01:00
Sara Arjona bc771bdfd6 Merge branch 'MDL-72412-master' of https://github.com/junpataleta/moodle 2022-01-17 08:28:47 +01:00
Ilya Tregubov c10cf765d0 Merge branch 'MDL-73495-master' of https://github.com/dravek/moodle 2022-01-17 09:14:48 +02:00
Mathew May 1cb3cb375d MDL-73554 core: Update usermenu metadata display 2022-01-17 15:09:06 +08:00
Andrew Nicols 4f0b70ba6d Merge branch 'MDL-73316' of https://github.com/Chocolate-lightning/moodle 2022-01-17 14:16:12 +08:00
Andrew Nicols 472568f6b3 Merge branch 'MDL-73360-master' of https://github.com/peterRd/moodle 2022-01-17 13:36:47 +08:00
Andrew Nicols 65041d8079 Merge branch 'MDL-73365' of https://github.com/paulholden/moodle 2022-01-17 13:17:38 +08:00
Mathew May 0d279d3f24 MDL-73316 course: Prevent further redirects on redirect 2022-01-17 12:35:34 +08:00
Adrian Greeve 4870b363b0 MDL-73366 navigation: Changed the first tab of site administration.
It now reads "General" instead of "Site administration"
2022-01-17 11:52:13 +08:00
Andrew Nicols 475a400762 Merge branch 'MDL-73362-master-1' of https://github.com/peterRd/moodle 2022-01-17 11:28:23 +08:00
Peter Dias f956e1acbb MDL-73362 lesson: Marry up implementation with the prototype
- Update/Add page headings
- Add notifications on override pages
- Rename buttons.
2022-01-17 10:39:18 +08:00
Peter Dias 0e1b09615c MDL-73362 lesson: Bring tertiary nav changes into classic
- Remove usage of lesson's tabs.php
- Add tertiary navigation into classic as the other modules do
2022-01-17 10:39:18 +08:00
Ferran Recio 81b0bbe8cb MDL-73340 behat: add mobile and table size 2022-01-14 18:49:06 +01:00
Ferran Recio 72321cff3f MDL-73340 theme_boost: course index opened by default 2022-01-14 18:49:06 +01:00
Eloy Lafuente (stronk7) 0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01:00
Paul Holden 20b8a47596 MDL-73178 roles: show both role names in permission table. 2022-01-14 12:18:34 +00:00
Sara Arjona 53fe23d8b5 MDL-73347 behat: Add blocks hidden by default for boost
For the boost them, a few themes have been hidden by default.
The unaddable setting should be set to let admins add them again,
because some behat tests need them.
2022-01-14 13:08:48 +01:00
Sara Arjona 341a7b2a97 MDL-73347 blocks: New unaddableblocks theme setting
A new method, get_unaddable_by_theme_block_types(), has been added to
block_manager class to let themes define, using the unaddableblocks
theme setting, the blocks that won't be displayed in the "Add a block"
list.
For now, only the boost theme uses it, to disable some of the blocks,
like settings, navigation, course_list and section_links (they are still
required for classic).
2022-01-14 13:08:48 +01:00
Sara Arjona c8bda3e418 MDL-71720 lib: Set Moodle files after PHPSpreadSheet upgrade 2022-01-14 12:45:54 +01:00
Sara Arjona d1ee2435bc MDL-71720 lib: Upgrade PHPSpreadSheet to 1.21.0 2022-01-14 12:45:52 +01:00
Sara Arjona 0e188470b1 on-demand release 4.0dev+ 2022-01-14 11:14:20 +01:00
Sara Arjona f122edf3a9 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-01-14 11:14:17 +01:00
Jun Pataleta a926979c0c MDL-73358 report: Add page content heading for report pages 2022-01-14 16:14:07 +08:00
Sara Arjona 3fb1785038 MDL-73561 grade: Use proper alert for success message 2022-01-14 08:54:34 +01:00
Jun Pataleta 0b2032cb1e MDL-72412 core: Add the image role to informative icon fonts 2022-01-14 10:31:47 +08:00
Andrew Nicols 6c2a64dca1 Merge branch 'MDL-73575' of https://github.com/paulholden/moodle 2022-01-14 09:36:04 +08:00
Andrew Nicols 626c8b43bf Merge branch 'MDL-65801' of https://github.com/paulholden/moodle 2022-01-14 09:30:11 +08:00
Paul Holden 2ae0424bd7 MDL-73365 report_log: fix detection of site page logging.
In turn, this adds back the secondary navigation to the page.
2022-01-14 00:03:54 +00:00
Víctor Déniz ea3568ff6d Merge branch 'MDL-73572-master' of git://github.com/jleyva/moodle 2022-01-13 23:40:51 +00:00
Paul Holden 8d5e36d55d MDL-73563 course: add vertical space above category action buttons. 2022-01-13 23:13:10 +00:00
Eloy Lafuente (stronk7) 94eb0a5734 Merge branch 'MDL-69624' of https://github.com/paulholden/moodle 2022-01-13 23:24:47 +01:00
Eloy Lafuente (stronk7) 10e4cec874 Merge branch 'MDL-73004-master_access_unit_tests' of https://github.com/brickfield/moodle 2022-01-13 19:23:13 +01:00
Mike Churchward 23cb59bd85 MDL-73004 tool_brickfield: Fix unit tests for question areas.
Search array of areas for expected question components, rather than assume an array position.
2022-01-13 11:56:41 -05:00
Eloy Lafuente (stronk7) 4480b463d6 Merge branch 'MDL-71702-master' of https://github.com/sarjona/moodle 2022-01-13 17:14:23 +01:00
Paul Holden 3c90926f05 MDL-69624 question: add missing test required library. 2022-01-13 15:08:02 +00:00
Bas Brands 38d0498c0f MDL-73416 core_badges: limit page width on most badge pages 2022-01-13 14:36:13 +01:00
Paul Holden ef871e28b5 MDL-73575 webservice: ensure configured protocols are non-empty. 2022-01-13 12:21:29 +00:00
Juan Leyva 7cb78905a0 MDL-73572 grade: Fix return type for gradeformatted
Regression caused MDL-70874
2022-01-13 12:49:44 +01:00
Paul Holden 6ed8458eda MDL-65801 lang: final removal of deprecated 37/38 strings.
The following lang strings have been undepecated, as they are still
in use:

* errorcoursewronglypublished, core_hub
* eventrolecapabilitiesupdated, core_role
2022-01-13 09:50:50 +00:00
Sara Arjona 1ce7bc329c Merge branch 'MDL-73343-master' of https://github.com/aanabit/moodle 2022-01-13 10:22:16 +01:00
Amaia Anabitarte 615027ea75 MDL-73343 block_myoverview: Add link to create course for empty content 2022-01-13 09:39:43 +01:00
Jun Pataleta 527808b1b5 Merge branch 'MDL-73508-master' of https://github.com/bmbrands/moodle 2022-01-13 15:33:07 +08:00
Shamim Rezaie c4706a93ea Merge branch 'MDL-72757-master' of https://github.com/dravek/moodle 2022-01-13 18:29:28 +11:00
Bas Brands 8a650f2d4f MDL-72942 theme_boost: change carets to chevrons for dropdowns 2022-01-13 08:20:39 +01:00
Andrew Nicols 880495d25f Merge branch 'MDL-71704-master' of https://github.com/sarjona/moodle 2022-01-13 14:32:44 +08:00
Andrew Nicols 7af3ff3f8d Merge branch 'MDL-73530-master' of https://github.com/ferranrecio/moodle 2022-01-13 14:29:13 +08:00
Jun Pataleta 756b1c2e4c Merge branch 'MDL-73492-master' of https://github.com/aanabit/moodle 2022-01-13 14:22:38 +08:00
Jun Pataleta 0706308ccb Merge branch 'MDL-71721-master' of https://github.com/sarjona/moodle 2022-01-13 13:53:50 +08:00
Jun Pataleta 8b73145310 Merge branch 'MDL-73467' of git://github.com/paulholden/moodle 2022-01-13 11:43:32 +08:00
Andrew Nicols 03956b86e0 Merge branch 'MDL-73469' of https://github.com/roland04/moodle 2022-01-13 11:02:02 +08:00
Peter Dias 60150bd068 MDL-73360 glossary: Add heading when creating entries 2022-01-13 09:32:38 +08:00
Víctor Déniz 99df355421 Merge branch 'MDL-73418' of https://github.com/ja9837/moodle 2022-01-12 22:24:33 +00:00
Paul Holden b625b9ffed MDL-73467 reportbuilder: consistent scheduled report export class.
Use the same dataformat exporter in scheduled reports as that used
when downloading reports, from 7d753bed.
2022-01-12 17:41:41 +00:00
Eloy Lafuente (stronk7) 6b6ff255dc Merge branch 'MDL-73564-master' of https://github.com/marinaglancy/moodle 2022-01-12 18:31:09 +01:00
Eloy Lafuente (stronk7) 7be7bb5164 Merge branch 'MDL-73546-master' of https://github.com/sarjona/moodle 2022-01-12 18:27:39 +01:00
Sara Arjona 58bcc49ea6 Merge branch 'MDL-73392-master' of https://github.com/bmbrands/moodle 2022-01-12 16:28:59 +01:00
Sara Arjona d49b30d526 Merge branch 'MDL-71710-master' of https://github.com/ilyatregubov/moodle 2022-01-12 15:58:26 +01:00
Mikel Martín 142277dfcb MDL-73469 reportbuilder: Fix clipped corners
- Fix clipped corners in toggle cards
- Fix left corners in left sidebar search input
2022-01-12 15:27:48 +01:00
Paul Holden 6d18f136ae MDL-72772 gradereport_overview: account for users with parent roles. 2022-01-12 14:18:52 +01:00
Ilya Tregubov 040f9a9168 MDL-71715 lib: update PHP-ML to 0.9.0 2022-01-12 14:47:58 +02:00
Marina Glancy 6f6586b164 MDL-73564 webservice: make sure to require webservice lib once 2022-01-12 13:19:58 +01:00
Ilya Tregubov 5c21e9f610 MDL-71710 core: updated adapter.js to 8.0.0 2022-01-12 13:47:34 +02:00
Bas Brands 35f334be05 MDL-73508 core_course: bigger activity description on view page 2022-01-12 11:40:08 +01:00
Ferran Recio 88b8f0ef20 MDL-73530 theme_boost: fix course edit dropzones 2022-01-12 11:31:02 +01:00
Sara Arjona 7cba3c5d13 Merge branch 'MDL-71723-master' of https://github.com/ilyatregubov/moodle 2022-01-12 11:19:49 +01:00
Sara Arjona d5fbdb5ab0 Merge branch 'MDL-73359-master' of https://github.com/aanabit/moodle 2022-01-12 11:05:24 +01:00
Ilya Tregubov 30148593b2 Merge branch 'MDL-71949-fix-backup-log-master' of https://github.com/matthewhilton/moodle 2022-01-12 11:40:56 +02:00
Ilya Tregubov 4f5debcbef Merge branch 'MDL-72897-master' of https://github.com/ferranrecio/moodle 2022-01-12 11:32:36 +02:00
Eloy Lafuente (stronk7) cb9a8b5ef0 Merge branch 'MDL-70348' of https://github.com/paulholden/moodle 2022-01-12 10:17:22 +01:00
Sara Arjona 0156e25da7 Merge branch 'MDL-71461-master' of https://github.com/dravek/moodle 2022-01-12 09:58:21 +01:00
Sara Arjona 5c99a7e766 Merge branch 'MDL-72771_master' of https://github.com/reskit/moodle 2022-01-12 09:40:52 +01:00
Shamim Rezaie 5c600ac6b8 Merge branch 'MDL-72880' of https://github.com/paulholden/moodle 2022-01-12 19:21:22 +11:00
Adrian Greeve 83172ba682 MDL-73356 mod_chat: Move group selector on page and update title.
The group selector is now below the tertiary navigation. The title
for reports now does not contain the activity name. This is present
further up the page.
2022-01-12 14:16:57 +08:00
Mathew May 76eaf6ee5f MDL-73316 contentbank: Add in secondary navigation 2022-01-12 13:54:57 +08:00
Mathew May a9952cfe4c MDL-73316 navigation: Add homepagesecondary nav 2022-01-12 13:54:57 +08:00
Paul Holden 1964d68f85 MDL-72772 gradereport_overview: access checks for viewing grades. 2022-01-12 13:43:35 +08:00
Mihail Geshoski 78b2a70de5 MDL-73438 choice: Tertiary navigation changes
Removes unnecessary breadcrumb items, updates the headings and
repositions the groups selector in the view and responses page.
2022-01-12 13:13:57 +08:00
Shamim Rezaie 9142285ad6 Merge branch 'MDL-69555-master' of git://github.com/jleyva/moodle 2022-01-12 14:41:48 +11:00
Andrew Nicols bbf9b5561b Merge branch 'MDL-73511' of https://github.com/call-learning/moodle 2022-01-12 11:38:45 +08:00
Andrew Nicols 011ef83072 Merge branch 'MDL-73336-master-v02' of https://github.com/ferranrecio/moodle 2022-01-12 11:25:29 +08:00
Andrew Nicols f90d35580c Merge branch 'MDL-73474-master' of https://github.com/aanabit/moodle 2022-01-12 11:06:40 +08:00
Andrew Nicols c86258d19f Merge branch 'MDL-73526' of https://github.com/stronk7/moodle 2022-01-12 10:19:05 +08:00
AMOS bot eb9a2bec39 Automatically generated installer lang files 2022-01-12 00:07:44 +00:00
Eloy Lafuente (stronk7) 91e03eb3c8 MDL-73526 mod_wiki: Remove unused nwiki diff processor
It never has been used in core since it was introduced in 2011
by MDL-22112, because the ouwiki_diff_html() is used unconditionally
for all wiki formats (html, creole or nwiki).

So, removing it to avoid any current (php80) or future incidence
with it.
2022-01-11 17:27:44 +01:00
Sara Arjona 65d56fa87b MDL-73546 tool_admin_presets: Fix link error in logs 2022-01-11 17:14:37 +01:00
Sara Arjona 749c678ed5 MDL-73342 admin_presets: Remove blocks from the core presets 2022-01-11 16:58:48 +01:00
Sara Arjona f6af9e103d MDL-73342 selfcompletion: Disable the block by default
Co-authored by: Amaia Anabitarte <amaia@moodle.com>
2022-01-11 16:37:26 +01:00
Sara Arjona fcfa24f341 MDL-73342 rss_client: Disable the block by default
Co-authored by: Amaia Anabitarte <amaia@moodle.com>
2022-01-11 16:37:26 +01:00
Sara Arjona 219d8ec4a4 MDL-73342 feedback: Disable the block by default
Co-authored by: Amaia Anabitarte <amaia@moodle.com>
2022-01-11 16:37:25 +01:00
Sara Arjona b1a772d1ad MDL-73342 course_summary: Disable the block by default
Co-authored by: Amaia Anabitarte <amaia@moodle.com>
2022-01-11 16:37:25 +01:00
Sara Arjona 8044279e0f MDL-73342 behat: New step to enable a plugin
Co-authored by: Amaia Anabitarte <amaia@moodle.com>
2022-01-11 16:37:25 +01:00
Amaia Anabitarte 4f190127b5 MDL-73359 core_badges: Badge pages polish 2022-01-11 16:22:07 +01:00
Ferran Recio 7a16356b05 MDL-73336 core_courseformat: fix tree accessbility issues
The course index uses collapsible to simulate a tree. To ensure the
resulting HTML follows the WCAG tree implementation, the tree widget
cannot be a nav element but a div one.
2022-01-11 16:15:57 +01:00
Ferran Recio ea01266118 MDL-73336 theme_boost: fix drawer tooltips 2022-01-11 16:15:57 +01:00
Paul Holden d40cc61eba MDL-72367 badges: require sesskey to remove badge alignment. 2022-01-11 14:34:16 +01:00
Paul Holden c7a62a8c82 MDL-72573 mod_h5pactivity: tighter validation of external sort param.
Restrict external method $sortorder parameter to limited subset of
values.
2022-01-11 14:34:16 +01:00
Dongsheng Cai 2ee27313ce MDL-71239 calendar: disallow manager role users edit user events 2022-01-11 14:34:16 +01:00
Jun Pataleta e78184d827 on-demand release 4.0dev+ 2022-01-11 21:30:33 +08:00
Jun Pataleta 49b9d89e5a Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2022-01-11 21:30:28 +08:00
Jun Pataleta 5804180e20 MDL-69061 core: Require linkable_settings_page.php using $CFG->admin 2022-01-11 21:09:24 +08:00
Juan Leyva 34ceeb4883 MDL-69555 tool_mobile: Allow set auto-login min request time 2022-01-11 14:07:30 +01:00
Juan Leyva 80a9eef971 MDL-69555 tool_mobile: Allow to set QR login keys duration time 2022-01-11 14:07:30 +01:00
Bas Brands 572e6b2dab MDL-73392 theme_boost: remove overflow css for pages with drawers
Reset the overflow on the drawers page to allow grade report sticky headers to work.
2022-01-11 13:51:35 +01:00
Sara Arjona f667bdfb33 MDL-71704 lib: Set Moodle files after JQuery upgrade 2022-01-11 12:07:20 +01:00
Sara Arjona efea732674 MDL-71704 lib: Upgrade JQuery UI to 1.13.0 2022-01-11 12:01:00 +01:00
Sara Arjona 7891ac6d62 MDL-71704 lib: Upgrade JQuery to 3.6.0 2022-01-11 12:00:06 +01:00
Amaia Anabitarte bb056ca1f1 MDL-73474 tool_admin_presets: Remove unused strings 2022-01-11 11:38:46 +01:00
David Matamoros ba15586806 MDL-71461 core_customfield: Add missing library in textarea export value 2022-01-11 11:16:07 +01:00
Sara Arjona 4752452fd5 MDL-71702 lib: Set Moodle files after minify upgrade 2022-01-11 10:41:08 +01:00
Peter Dias f744eb8161 MDL-71702 core: Add custom Moodle patch to minify
There is a Pull-request from Tim Hunt to the project in GitHub
(https://github.com/matthiasmullie/minify/issues/317) but, for now,
as it hasn't been applied yet, we need to manually cherry-pick
this change.
2022-01-11 10:38:59 +01:00
Sara Arjona d77e0a6dae MDL-71702 lib: Upgrade minify to 1.3.66 2022-01-11 10:37:06 +01:00
Jun Pataleta e885801e58 Merge branch 'MDL-69061-master' of https://github.com/junpataleta/moodle 2022-01-11 11:56:52 +08:00
Adam Pawełczak f4783dbb0a MDL-69061 core: Fix admin path replacement with path to $CFG->admin 2022-01-11 11:32:26 +08:00
Andrew Nicols adbf7a9761 Merge branch 'MDL-73439-master' of https://github.com/peterRd/moodle 2022-01-11 10:09:41 +08:00
AMOS bot 94480c674a Automatically generated installer lang files 2022-01-11 00:07:34 +00:00
Víctor Déniz 7146bd1dfa Merge branch 'MDL-73414' of https://github.com/paulholden/moodle 2022-01-10 23:15:11 +00:00
Víctor Déniz 5a7c9ae8d5 Merge branch 'MDL-73430-master' of https://github.com/peterRd/moodle 2022-01-10 22:25:45 +00:00
Paul Holden ee566b88a8 MDL-72757 reportbuilder: improve model event tests.
Remove some boilerplate/duplication in the current test methods
using @depends annotation to pass persistents between them.
2022-01-10 17:21:23 +01:00
Ferran Recio ac77de1122 MDL-72897 core_courseformat: add scroll control to course index 2022-01-10 17:14:00 +01:00
Ilya Tregubov 0a89491cbc Merge branch 'MDL-73437-master' of https://github.com/peterRd/moodle 2022-01-10 12:46:47 +02:00
Sara Arjona 9a425a3cc3 MDL-71721 lib: Set Moodle files after emoji-data upgrade 2022-01-10 10:36:23 +01:00
Sara Arjona 411f91f1a9 MDL-71721 lib: Upgrade emoji-data to 7.0.2 2022-01-10 10:34:53 +01:00
Peter Dias 1a83bd79e0 MDL-73437 workshop: Use templates for actionbar
* Convert the actionbar to use renderables/templates
* Introduce spacing below tertiary navigation
* Add headings on allocations after tertiary navigation
2022-01-10 16:06:47 +08:00
Jun Pataleta 1077f39bcc Merge branch 'MDL-73502' of https://github.com/stronk7/moodle 2022-01-10 15:10:14 +08:00
Jun Pataleta d7fdb2e1da Merge branch 'MDL-73297-master' of https://github.com/HuongNV13/moodle 2022-01-10 14:42:36 +08:00
Jun Pataleta b0b9fa7d84 Merge branch 'MDL-72809-master' of https://github.com/HuongNV13/moodle 2022-01-10 10:24:38 +08:00
Peter Dias 8976da3ed5 MDL-73430 label: Change text of label's secondary nodes 2022-01-10 08:22:08 +08:00
AMOS bot c981dc526e Automatically generated installer lang files 2022-01-08 00:07:31 +00:00
Marc Català b2702ccad2 MDL-72771 core_course: Set module visibility after moving it
Move a module to another section needs to update its visibility after
placing it into the new section. Otherwise an invalid database state
prevents the system to move any module with a completion rule
involving grades.
2022-01-07 14:28:00 +01:00
Amaia Anabitarte d4c27c2dcc MDL-73492 adminpresets: Remove unused functions 2022-01-07 13:12:29 +01:00
Huong Nguyen 1ac6a82e1f MDL-72809 Themes: Fix the missing 'Reset user tour on this page' link 2022-01-07 17:03:32 +07:00
Paul Holden a7b940ba7d MDL-72880 badges: change badge exporter issuername field to text.
This matches it's type in the settings pages, and also the type
of the site name used as the default for the setting. It's content
will now be automatically filtered by the external exporter class.
2022-01-07 09:11:35 +00:00
Huong Nguyen db56452269 MDL-73297 Calendar: Display improvement in small screen
- Changed the breakpoint for responsiveness from 1200px to 768px
 - Added "dots" to indicate days with events for the large block and main calendar page
 - Added popovers for the main calendar page
 - Added new Behat scenarios to test the responsiveness
2022-01-07 14:41:32 +07:00
Ilya Tregubov c2a1d3ebca Merge branch 'MDL-73427-master' of https://github.com/cameron1729/moodle 2022-01-07 09:41:15 +02:00
Shamim Rezaie 6ed3d6d66b Merge branch 'MDL-73272/master' of https://github.com/skodak/moodle 2022-01-07 17:45:24 +11:00
Jun Pataleta bf1a7b0bb2 Merge branch 'MDL-73468' of git://github.com/paulholden/moodle 2022-01-07 14:27:31 +08:00
Jun Pataleta d90d2bc00c Merge branch 'MDL-73411-master' of git://github.com/mihailges/moodle 2022-01-07 11:30:48 +08:00
Jun Pataleta 7c710d6c6e Merge branch 'MDL-73487-master' of git://github.com/mihailges/moodle 2022-01-07 11:02:01 +08:00
AMOS bot b6b877d1db Automatically generated installer lang files 2022-01-07 00:07:42 +00:00
Eloy Lafuente (stronk7) 0098ebccbf MDL-73502 libraries: Avoid uses of get_magic_quotes_xxx() functions
They were deprecated in PHP 7.4 (warning) and have been removed in
PHP 8.0 (error). Plus they were returning false since ages ago (PHP
5.x).

Hence, adding conditional check to see if they are available (h5p
editor) or removing the unreachable code-block when they evaluated
to true.

Also, modified the corresponding moodle_readme files to document
the change.
2022-01-07 00:40:46 +01:00
Laurent David c7b706186c MDL-73511 mod_bigbluebuttonbn: exception raised when editing activity
* When editing an activity and the voicebridge_editable is set, there is an exception raised
2022-01-06 20:13:41 +01:00
Ilya Tregubov 0c63990e4f on-demand release 4.0dev+ 2022-01-06 20:51:09 +02:00
Jun Pataleta 0bc93dd077 Merge branch 'MDL-73306-patch' of https://github.com/ilyatregubov/moodle 2022-01-06 19:09:52 +08:00
Ilya Tregubov 9e95cb81b4 MDL-73306 mod_bigbluebuttonbn: Fix unit tests. 2022-01-06 12:20:16 +02:00
Matthew Hilton 90583e2f3b MDL-71949 backup: Fix userid and add backup ID to logging 2022-01-06 16:06:53 +10:00
Jun Pataleta faa588f7a3 Merge branch 'MDL-69700' of https://github.com/paulholden/moodle 2022-01-06 12:00:47 +08:00
Mihail Geshoski 9073f85530 MDL-73411 survey: Update tertiary navigation 2022-01-06 09:56:13 +08:00
Shamim Rezaie 7595736c9e Merge branch 'MDL-73456-master' of https://github.com/HuongNV13/moodle 2022-01-06 02:08:27 +11:00
Shamim Rezaie 83bf7f3c5a Merge branch 'MDL-71719-master' of https://github.com/sarjona/moodle 2022-01-06 01:46:59 +11:00
David Matamoros c6bf7d791e MDL-73495 reportbuilder: Fix generation of dynamic tabs 2022-01-05 13:16:13 +01:00
David Matamoros 5bef42d324 MDL-73495 core: Fix data attributes not being passed to individual tabs 2022-01-05 13:16:13 +01:00
Cameron Ball 776bfb134c MDL-73427 core: Remove $SESSION->fromurl 2022-01-05 19:39:21 +08:00
Ilya Tregubov a20f151438 Merge branch 'MDL-73306' of https://github.com/call-learning/moodle 2022-01-05 13:30:34 +02:00
Jun Pataleta 0dcfa504a0 Merge branch 'MDL-68773-clear-adhoc-tasks' of https://github.com/Peterburnett/moodle 2022-01-05 18:47:01 +08:00
Jun Pataleta 3314ba4557 Merge branch 'MDL-73465' of https://github.com/paulholden/moodle 2022-01-05 17:50:17 +08:00
David Matamoros 39b90208e1 MDL-72757 reportbuilder: Events for CRUD operations on report models 2022-01-05 09:55:36 +01:00
Paul Holden 892fa580b2 MDL-69700 tests: clarify expected exceptions in unit tests.
Resolves some leftovers from MDL-67673, see d95c3787.
2022-01-05 08:45:39 +00:00
Jun Pataleta 0abcec390f Merge branch 'MDL-73425' of git://github.com/paulholden/moodle 2022-01-05 12:53:49 +08:00
Peter Dias 2d8e8b5c61 MDL-73439 feedback: Update feedback styling
* Add sub-headings for the Analysis and Responses pages
2022-01-05 12:09:29 +08:00
Huong Nguyen c789e1f4f0 MDL-73456 Questions: Question bank tertiary navigation is not correct
"Questions" is always selected even the user is editing the question category
2022-01-05 09:02:35 +07:00
Ilya Tregubov 86a1422473 Merge branch 'MDL-73255-master' of https://github.com/andrewnicols/moodle 2022-01-04 16:18:35 +02:00
Jun Pataleta c0ec69a3aa Merge branch 'MDL-73352' of https://github.com/stronk7/moodle 2022-01-04 21:25:53 +08:00
Shamim Rezaie 64915bed6d Merge branch 'MDL-73397-master' of https://github.com/aanabit/moodle 2022-01-04 22:48:40 +11:00
Amaia Anabitarte dd9795530d MDL-73397 adminpresets: Fix docblocks for apply_behaviors 2022-01-04 12:13:20 +01:00
Amaia Anabitarte 570d2e7492 MDL-73397 adminpresets: Remove tree-view 2022-01-04 12:13:19 +01:00
Sara Arjona e5a1b33676 MDL-73397 adminpresets: Move lastpresetapplied to core
In MDL-73394 the lastpresetapplied setting was added to the
tool_admin_presets. This commit moves it to adminpresets.
2022-01-04 12:13:19 +01:00
Sara Arjona e5c440b3aa MDL-73397 adminpresets: Use new API from auth and quiz
The adminpresets has become an API in order to let plugins, such
as quiz and auth, to overwrite classes for their settings.
2022-01-04 12:13:19 +01:00
Sara Arjona e046c6e6ef MDL-73397 admin: Use method from new core_adminpresets
In MDL-73145, a new $CFG setting was added to let define the preset
to be installed.
This patch replaces the method call to the new one that has been
moved from tool_admin_presets plugin to core_adminpresets component.
2022-01-04 12:13:19 +01:00
Sara Arjona 1f47ef1a34 MDL-73397 adminpresets: Move sensiblesettings to core
The sensiblesettings setting has been moved from tool_admin_presets
to adminpresets component where it belongs, in order for being able
to use it from the API to decide whether sensible settings should
be included when exporting them.
2022-01-04 12:13:19 +01:00
Sara Arjona 8bf52e3195 MDL-73397 tool_admin_presets: Move data and API methods to new component
A new component has been created, core_adminpresets, and tables and some
API methods from this tool have been moved there, so it can spread over
other plugins.
Currently, the tool_admin_presets plugin only provides the UI to interact
with the core adminpresets stuff.
2022-01-04 12:13:19 +01:00
Ilya Tregubov bc8b1be24d Merge branch 'MDL-73451-master' of https://github.com/bmbrands/moodle 2022-01-04 12:46:41 +02:00
Paul Holden 7412121555 MDL-73465 theme_boost: apply rounded borders to modal dialogs. 2022-01-04 09:31:57 +00:00
Shamim Rezaie ec4fd41f39 Merge branch 'MDL-72930-master' of git://github.com/abgreeve/moodle 2022-01-04 19:03:08 +11:00
Adrian Greeve 0a04ebde11 MDL-72930 navigation: Remove duplicated navigation boxes.
Some pages have settings that really aren't required anymore.
These have been removed and a function has been aded so that other
developers can turn off the navigation overflow if they want.
2022-01-04 15:58:52 +08:00
abgreeve f56ecc27f9 MDL-72930 navigation: Update to quiz and questionbank navigation.
Alterations here allowed the removal of renderables, and mustache
templates for quiz report navigation. The questionbank was also
updated to show injected navigation nodes from third party plugins.
2022-01-04 15:58:52 +08:00
abgreeve f1d22c9830 MDL-72930 navigation: Update to badges navigation.
This allows navigation nodes injected into the badges section
to be displayed as either a button or a dropdown url_select.
2022-01-04 15:58:52 +08:00
abgreeve f0ecd475d0 MDL-72930 navigation: Update the reports helper navigation.
This allows injected navigation nodes into the reports to be
shown in the report selector.
2022-01-04 15:58:52 +08:00
abgreeve ffdf385547 MDL-72930 navigation: Update to the participants page navigation.
This adds the ability for the participants page to display injected
navigation nodes in the users navigation node.
2022-01-04 15:58:52 +08:00
abgreeve f85662d744 MDL-72930 navigation: Changes to the secondary view unit tests.
The display of the arrays has been changed and so updates were
necessary for the unit tests as well due to changing output.
2022-01-04 15:58:52 +08:00
abgreeve 060e5dedee MDL-72930 navigation: Change over old code to use new static methods.
This removes the old and less good methods for retrieving an array
for use with a url_select and uses the newer better ones instead.
2022-01-04 15:58:52 +08:00
abgreeve f17b124b7b MDL-72930 navigation: Creation of new secondary nav methods
This adds new static methods for general use when dealing with
third party navigation nodes that have been added via callbacks.
2022-01-04 15:58:52 +08:00
Bas Brands e3f5c0d191 MDL-73486 block_privatefiles: prevent stylelint warnings 2022-01-04 08:24:34 +01:00
Mihail Geshoski cb9e513ee5 MDL-73487 navigation: Remove outcomes from course admin overflow nodes 2022-01-04 14:57:06 +08:00
Peter Burnett 28d6333f47 MDL-68773 backup: Allow completed async backup + restore tasks to clear 2022-01-04 10:57:58 +10:00
Eloy Lafuente (stronk7) ed4c560c42 Merge branch 'MDL-72735-master' of https://github.com/bmbrands/moodle 2022-01-03 20:15:09 +01:00
Eloy Lafuente (stronk7) 3960da3fc7 Merge branch 'MDL-71718-master' of https://github.com/sarjona/moodle 2022-01-03 19:52:00 +01:00
Laurent David 09ba0cb9a8 MDL-73306 mod_bigbluebuttonbn: "Recently Activity" block display
* The callback 'xxx_print_recent_activity' needed to be created in order to display
the activities in the block
* Use the print_recent_activity_note api function
2022-01-03 15:04:21 +01:00
Sara Arjona 727f0d4daf MDL-73397 adminpresets: Create new core_adminpresets component
The core_adminpresets component has been added and some data and
methods from the tool_admin_presets have been moved here.
2022-01-03 11:51:33 +01:00
Bas Brands 31c4ac2c53 MDL-72735 core_course: style activity information on view page 2022-01-03 10:02:03 +01:00
Shamim Rezaie 2e4fcf618b Merge branch 'MDL-73449-master' of https://github.com/aanabit/moodle 2021-12-31 19:39:09 +11:00
Shamim Rezaie 33f1288675 Merge branch 'MDL-73339-master' of https://github.com/sarjona/moodle 2021-12-31 11:04:57 +11:00
Petr Skoda 2e95fabd95 MDL-73272 behat: move behat extension to core 2021-12-31 09:59:18 +13:00
Eloy Lafuente (stronk7) 511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Sara Arjona b90bc54f4b MDL-73339 mnet_hosts: Add block only if main feature is enabled
The Network servers block should be added only if the MNet
authentication is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 8246271f7c MDL-73339 glossary_random: Add block only if main feature is enabled
The Random glossary entry block should be added only if the glossary
module is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 595177194f MDL-73339 core_blocks: Behat tests to cover can_block_be_added 2021-12-30 13:17:49 +01:00
Sara Arjona bafe63dc9f MDL-73339 lp: Add block only if main feature is enabled
The Learning plans block should be added only if the competencies
advanced feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona c435627e18 MDL-73339 tags: Add block only if main feature is enabled
The Tags block should be added only if the badges advanced
feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 39faf1d99c MDL-73339 badges: Add block only if main feature is enabled
The Latest badges block should be added only if the badges
advanced feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 33499f32d3 MDL-73339 globalsearch: Add block only if main feature is enabled
The Global search block should be added only if the global search
advanced feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 5f7b53980b MDL-73339 completionstatus: Add block only if main feature is enabled
The Course completion status block should be added only if the
completion advanced feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 8e932d6fd9 MDL-73339 comments: Add block only if main feature is enabled
The Comments block should be added only if the comments advanced
feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 8d600233d3 MDL-73339 blog_tags: Add block only if main feature is enabled
The Blog tags block should be added only if the blogs and the tags
advanced features are enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 3413df37a5 MDL-73339 blog_recent: Add block only if main feature is enabled
The Recent blog entries block should be added only if the blogs
advanced feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 1e09ac167f MDL-73339 blog_menu: Add block only if main feature is enabled
The Blog menu block should be added only if the blogs advanced
feature is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 06e8cda348 MDL-73339 accessreview: Add block only if main feature is enabled
The Accessibility review block should be added only if the
"Enable accessibility tools" advanced setting is enabled.
2021-12-30 13:17:49 +01:00
Sara Arjona 1823873d9a MDL-73339 core_blocks: New method can_block_be_added
A new method, can_block_be_added, has been added to
let blocks override it to decide whether it should
be added to a page or not.
2021-12-30 13:17:47 +01:00
Paul Holden 98e7d99720 MDL-73468 reportbuilder: observe configured sorting when editing.
Users preferred sorting (via clicking on column headers) should only
take effect when pre/viewing the report, not when editing it.
2021-12-30 11:35:07 +00:00
Sara Arjona fdfa1a9524 MDL-71718 lib: Set Moodle files after codemirror upgrade 2021-12-30 12:34:16 +01:00
Sara Arjona 8dc095e54e MDL-71718 lib: Upgrade codemirror to 5.65.0 2021-12-30 12:34:16 +01:00
Sara Arjona 5c2004def2 MDL-71719 lib: Set Moodle files after jsbeautify upgrade 2021-12-30 12:33:10 +01:00
Sara Arjona eebf70d1e8 MDL-71719 lib: Upgrade jsbeautify to 1.14.0 2021-12-30 12:33:10 +01:00
Sara Arjona 541d999d27 on-demand release 4.0dev+ 2021-12-30 11:24:35 +01:00
Sara Arjona a94e8859e4 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-12-30 11:24:29 +01:00
Shamim Rezaie 2eaab7ec3e Merge branch 'MDL-73394-master' of https://github.com/sarjona/moodle 2021-12-30 16:10:27 +11:00
AMOS bot 756b212799 Automatically generated installer lang files 2021-12-30 00:07:28 +00:00
Sara Arjona ef233d31dd Merge branch 'MDL-73086' of git://github.com/paulholden/moodle 2021-12-29 16:18:07 +01:00
Paul Holden 9e6bbb4fb8 MDL-73086 user: account for mixed casing of profile field shortname.
Custom profile fields allow for shortnames containing mixed character
casing, which should also be supported within the user fields API
when retrieving said custom fields.

Given that the DML libs convert all selected columns to lowercased
equivalent, we need to do the same when requesting custom fields to
ensure calling code doesn't try to access `->profile_field_Foo`
property when the DB returns `->profile_field_foo` instead.
2021-12-29 15:09:30 +00:00
Sara Arjona 3f56100a4a Merge branch 'MDL-73295' of https://github.com/paulholden/moodle 2021-12-29 15:36:08 +01:00
Sara Arjona a633bb56c1 Merge branch 'MDL-72716' of https://github.com/paulholden/moodle 2021-12-29 15:01:38 +01:00
Paul Holden 844f4a7fb3 MDL-72716 blocks: fix external fetching of available blocks.
Pass `$PAGE->subpage` value in AJAX request, which is required on
some pages (e.g. user dashboard) for loading existing blocks.
2021-12-29 11:59:27 +00:00
Shamim Rezaie 3baf9b8564 Merge branch 'master_MDL-73440' of https://github.com/mattporritt/moodle 2021-12-29 22:14:47 +11:00
Paul Holden 89114f77fa MDL-73414 webservice: don't disable all WS when disabling mobile. 2021-12-29 10:37:00 +00:00
Sara Arjona eab34def91 Merge branch 'MDL-72911-master' of https://github.com/sarjona/moodle 2021-12-29 11:18:04 +01:00
Sara Arjona 65b10e3dc7 MDL-72911 behat: Unrelated, remove the @skip_interim tag
This commit is UNRELATED to the MDL-72911, but we need the
@skip_interim tag removed to one scenario that was causing lots
of noise and failures @ CI infrastructure. This tag can now be
removed because these failures were fixed a days ago.

So we are using MDL-72911 (this extra commit) to remove that tag
(sorry for the noise).
2021-12-29 11:13:10 +01:00
Paul Holden d4bd398ad7 MDL-73295 webservice: only pass around sesskey for tokens as needed. 2021-12-29 09:54:23 +00:00
Sara Arjona 27c1de3950 Merge branch 'MDL-73402' of git://github.com/paulholden/moodle 2021-12-29 10:07:55 +01:00
Sara Arjona ff959d8f5d Merge branch 'MDL-72375-completion-id' of https://github.com/Peterburnett/moodle 2021-12-29 09:48:22 +01:00
Sara Arjona 995ed32cf5 Merge branch 'MDL-71818-master-test4' of git://github.com/rezaies/moodle 2021-12-29 09:13:12 +01:00
Eloy Lafuente (stronk7) 0b577477e3 Merge branch 'MDL-73420-master' of https://github.com/marinaglancy/moodle 2021-12-29 09:03:37 +01:00
Shamim Rezaie 379f15f3b4 MDL-71818 calendar: Fix detection of a click on day link 2021-12-29 19:02:55 +11:00
Shamim Rezaie ffe65c9a2b Merge branch 'MDL-71818-master' of https://github.com/dcai/moodle into MDL-71818-master-test4 2021-12-29 18:59:46 +11:00
Sara Arjona d870aae9c7 Merge branch 'MDL-71818-master' of https://github.com/dcai/moodle 2021-12-28 17:32:18 +01:00
Sara Arjona a82631ffc2 Merge branch 'MDL-73237' of https://github.com/paulholden/moodle 2021-12-28 15:58:27 +01:00
Sara Arjona 430eddb721 Merge branch 'MDL-73207-cronspec' of https://github.com/brendanheywood/moodle 2021-12-28 15:43:13 +01:00
Ferran Recio 88e17ccad9 MDL-72911 core_courseformat: fix deprecation messages 2021-12-28 12:50:53 +01:00
Ferran Recio 43499d332c MDL-72898 core_courseformat: hidden activity link 2021-12-28 12:50:23 +01:00
Sara Arjona 1c33782d73 Merge branch 'MDL-73189-master' of https://github.com/nguyenphuctien/moodle 2021-12-28 11:41:54 +01:00
Sara Arjona 7e559628dc Merge branch 'MDL-72581-master' of https://github.com/junpataleta/moodle 2021-12-28 09:23:11 +01:00
AMOS bot daf21332f5 Automatically generated installer lang files 2021-12-28 00:07:28 +00:00
Víctor Déniz bcd06412ee Merge branch 'MDL-73269/master' of https://github.com/skodak/moodle 2021-12-27 15:25:30 +00:00
Amaia Anabitarte 0a2181cdb8 MDL-73449 installation: Make buttons rounded 2021-12-27 12:32:35 +01:00
Sara Arjona 0fc33251bf Merge branch 'MDL-72904-master-dec21' of https://github.com/peterRd/moodle 2021-12-27 08:47:50 +01:00
AMOS bot 713db956d2 Automatically generated installer lang files 2021-12-27 00:07:31 +00:00
AMOS bot af799fa3dd Automatically generated installer lang files 2021-12-26 00:07:28 +00:00
Bas Brands ec136c6d06 MDL-73451 theme_boost: editswitch fix for safari 2021-12-24 09:28:54 +01:00
Sara Arjona f8eb36373d on-demand release 4.0dev+ 2021-12-23 16:30:00 +01:00
Sara Arjona 09d3e88c48 NOBUG: Fixed SVG browser compatibility 2021-12-23 16:29:57 +01:00
Sara Arjona 61cb294eb7 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-12-23 16:29:56 +01:00
Sara Arjona bfa24ae53a MDL-73394 admin_presets: New setting to store last preset applied
A new setting has been added to config_plugins to store the last
preset identifier applied.
2021-12-23 16:07:57 +01:00
Peter Dias d19547ae69 MDL-72904 theme_boost: Boost navbar cleanup restrictions
Exclude the last node in a breadcrumb change from auto-removal if no URL provided.
2021-12-23 21:25:36 +08:00
Peter Dias 6d5ab2233a MDL-72904 core_badges: Update behat tests 2021-12-23 21:25:36 +08:00
Peter Dias 96dd6c9c94 MDL-72904 core_badges: Introduce tertiary navigation for badges 2021-12-23 21:02:01 +08:00
Jun Pataleta ada0ed1b83 Merge branch 'MDL-72845-master-fix' of https://github.com/lameze/moodle 2021-12-23 17:28:10 +08:00
Bas Brands c218e921d2 MDL-72739 theme_boost: fixed updated edit switch behat 2021-12-23 10:15:53 +01:00
Simey Lameze 076fba92c1 MDL-72845 core: make showservicesandsupport parameter optional 2021-12-23 16:22:17 +08:00
Shamim Rezaie c683b69855 Merge branch 'MDL-72819-master' of https://github.com/ferranrecio/moodle 2021-12-23 17:33:32 +11:00
Jun Pataleta 80c17cd2a0 Merge branch 'MDL-72701-master' of https://github.com/andrewnicols/moodle 2021-12-23 12:10:46 +08:00
Jun Pataleta 2b962cf691 Merge branch 'MDL-73274-master' of https://github.com/bmbrands/moodle 2021-12-23 11:31:25 +08:00
Andrew Nicols 8a126b75e5 MDL-73255 user: Ensure that invalid filters are not left
When there is no group but a default groupmode is set, the group
configuration is provided but the group data is not present. This
resulted in a JS error and an invalid filter line was left in place.

This change conditionally checks the data-filter-type-class value of the
filterDataNode so that no JS error is produced if the filterDataNode
does not exist and therefore removes the empty filter row.
2021-12-23 11:01:44 +08:00
Jun Pataleta 057f312cff Merge branch 'MDL-72845-master' of https://github.com/lameze/moodle 2021-12-23 10:49:44 +08:00
AMOS bot 729bb96567 Automatically generated installer lang files 2021-12-23 00:07:29 +00:00
Víctor Déniz b7fce1b070 Merge branch 'MDL-73391' of https://github.com/danmarsden/moodle 2021-12-22 20:56:51 +00:00
Víctor Déniz 37dd574ec2 Merge branch 'MDL-72739-master' of https://github.com/bmbrands/moodle 2021-12-22 20:08:17 +00:00
Petr Skoda 8954a607fe MDL-73269 dev: add requirements to composer.json 2021-12-23 07:23:33 +13:00
Josh.Aston b583c15e7a MDL-73418 Quiz: Continue the last attempt > Continue your attempt 2021-12-22 17:02:14 +00:00
Sara Arjona c16e2aae0a Merge branch 'MDL-73405' of https://github.com/stronk7/moodle 2021-12-22 17:20:43 +01:00
Sara Arjona 3e3a96b74b Merge branch 'MDL-73380' of git://github.com/paulholden/moodle 2021-12-22 16:59:04 +01:00
Sara Arjona cf651a1ed4 Merge branch 'MDL-73298-master' of https://github.com/bmbrands/moodle 2021-12-22 16:50:25 +01:00
Sara Arjona 5d87a70f37 Merge branch 'MDL-73256' of git://github.com/paulholden/moodle 2021-12-22 16:39:42 +01:00
Sara Arjona 7f9cf60fd0 Merge branch 'MDL-69023_mod-lti-conflicts-with-text-alignment-in-chat-messages' of https://github.com/ziegenberg/moodle 2021-12-22 16:27:57 +01:00
Sara Arjona ed0b14cbc4 Merge branch 'master_MDL-73350-statistics-column' of https://github.com/catalyst/moodle-MDL-70329 2021-12-22 16:07:36 +01:00
Sara Arjona 3946c78c2e Merge branch 'MDL-73275' of https://github.com/paulholden/moodle 2021-12-22 15:40:43 +01:00
Sara Arjona 3b736bc50a MDL-72598 reportbuilder: Fix database comparison error 2021-12-22 15:23:59 +01:00
Sara Arjona 445ba4f654 Merge branch 'MDL-72598' of https://github.com/paulholden/moodle 2021-12-22 14:54:03 +01:00
Sara Arjona c3f83fad47 Merge branch 'MDL-73168-master' of https://github.com/bmbrands/moodle 2021-12-22 12:53:28 +01:00
Simey Lameze be018b7c42 MDL-72845 core: add services and support link to help popover 2021-12-22 19:46:49 +08:00
Simey Lameze 9dc03a9e36 MDL-72845 core: add services and support content banner 2021-12-22 19:46:49 +08:00
Simey Lameze c3cb372e62 MDL-72845 core: make campaign template more generic 2021-12-22 19:42:49 +08:00
Jun Pataleta 5c05b019ae Merge branch 'MDL-73046-master' of https://github.com/junpataleta/moodle 2021-12-22 18:50:47 +08:00
Frederik Milling Pytlick b9898a23a7 MDL-73046 media_html5video: Fixed .mov files
.mov files will now have the mimetype 'video/mp4' instead of 'video/quicktime'. (Only if the user's browser is chromium-based)
2021-12-22 18:33:12 +08:00
Shamim Rezaie dacfebedf3 Merge branch 'MDL-73348' of https://github.com/stronk7/moodle 2021-12-22 21:19:52 +11:00
Sara Arjona 90c0a7aff4 Merge branch 'MDL-73200' of https://github.com/jfederico/moodle 2021-12-22 08:51:40 +01:00
Matt Porritt 3101f3c7ca MDL-73440 qbank_customfields: Fix behat tags
Remove erroneous behat tag that was accidentally
left in after development was complete.
2021-12-22 06:52:48 +00:00
Jun Pataleta b180acb3f2 Merge branch 'MDL-72650-master' of https://github.com/HuongNV13/moodle 2021-12-22 09:21:51 +08:00
AMOS bot a72bf14c8f Automatically generated installer lang files 2021-12-22 00:07:32 +00:00
Jun Pataleta 938ed7bbe7 Merge branch 'MDL-73379' of git://github.com/paulholden/moodle 2021-12-22 05:54:03 +08:00
jfederico 88ee5b8552 MDL-73200 mdl_bigbluebuttonbn: change default server_url on upgrade 2021-12-21 20:26:07 +00:00
Paul Holden 7d61928cfb MDL-73379 admin: consistent secondary navigation on settings pages.
Co-authored-by: Adrian Greeve <adrian@moodle.com>
2021-12-21 17:02:56 +00:00
Jun Pataleta f3324d208b MDL-72581 block_timeline: Update with the new activity icons 2021-12-21 18:04:25 +08:00
Jun Pataleta be2ff9eea0 MDL-72581 calendar: Add purpose template context data
* Add a purpose template context data for activity events that
support the FEATURE_MOD_PURPOSE feature. This can be used to determine
the style to be used when rendering the activity icon for a calendar
event.
2021-12-21 17:56:35 +08:00
Jun Pataleta 28428d7056 MDL-72581 theme: Style .icon under .activityiconcontainer
Style the .icon class under the .activityiconcontainer class just like
the .activityicon class.
2021-12-21 17:56:35 +08:00
Paul Holden 335f608abb MDL-72598 reportbuilder: tasks and API for report schedule delivery. 2021-12-21 09:44:43 +00:00
Ferran Recio 08670beb6e MDL-72819 core_courseformat: change collapsed attribute names 2021-12-21 10:02:40 +01:00
Paul Holden a05683d027 MDL-72598 reportbuilder: interface elements for creating schedules.
Add new tab to the report editor, with system report, external API
and Javascript modules for managing report schedules.
2021-12-21 08:57:17 +00:00
Jun Pataleta c6c2ad8360 Merge branch 'MDL-73369-master' of https://github.com/bmbrands/moodle 2021-12-21 16:36:51 +08:00
Jake Dallimore d2e9d5cb66 Merge branch 'MDL-72965-master' of https://github.com/peterRd/moodle 2021-12-21 15:32:26 +08:00
Andrew Nicols 80b3597c5d Merge branch 'MDL-73364' of https://github.com/paulholden/moodle 2021-12-21 14:16:52 +08:00
Andrew Nicols 4772504710 Merge branch 'MDL-72604-master' of https://github.com/jleyva/moodle 2021-12-21 14:12:12 +08:00
Simey Lameze 0d306f9733 MDL-72984 theme: fix the popover header html structure 2021-12-21 13:10:43 +08:00
Jun Pataleta e9bd499fb1 Merge branch 'MDL-72867-master' of https://github.com/HuongNV13/moodle 2021-12-21 11:23:09 +08:00
Andrew Nicols a7f6c8cdcd MDL-72701 core: Improve code coverage for core 2021-12-21 09:24:00 +08:00
Andrew Nicols 3a70983d53 MDL-72701 unit tests: Generate default coverage 2021-12-21 09:24:00 +08:00
Andrew Nicols bb9741d472 MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +08:00
AMOS bot 65439e5c70 Automatically generated installer lang files 2021-12-21 00:07:29 +00:00
Eloy Lafuente (stronk7) 0f30ed1b5e Merge branch 'MDL-71705-master' of https://github.com/ilyatregubov/moodle 2021-12-20 23:17:46 +01:00
Paul Holden 9a33a4ada8 MDL-73425 phpunit: document expected class and filename layout. 2021-12-20 18:53:37 +00:00
Marina Glancy 24db1f29fe MDL-73420 core: make static cache compatible with PHP8.1 2021-12-20 17:07:05 +01:00
jfederico 3007e0e40b MDL-73200 mod_bigbluebuttonbn: Fix Behat issue with shared secret 2021-12-20 14:58:39 +00:00
jfederico cea29ffebc MDL-73200 mod_bigbluebuttonbn: Replaced credentials provided by default 2021-12-20 14:51:44 +00:00
Bas Brands 061449612c MDL-72739 theme_boost: update editswitch to look like ux design 2021-12-20 15:24:22 +01:00
Shamim Rezaie 625a22ab1d Merge branch 'MDL-71457-master-3' of https://github.com/bmbrands/moodle 2021-12-21 01:05:54 +11:00
Bas Brands 47e63b518a MDL-71457 theme_boost: page header icon styling 2021-12-20 15:02:24 +01:00
Bas Brands f2ddd23ec1 MDL-71457 theme_boost: activity icon styling 2021-12-20 15:02:24 +01:00
Bas Brands 466152bb6d MDL-73168 theme_boost: make the default more rounded 2021-12-20 14:53:18 +01:00
Jake Dallimore 06e5340a9c Merge branch 'MDL-72984-master' of https://github.com/lameze/moodle 2021-12-20 16:37:09 +08:00
Bas Brands 5958c0df0c MDL-71457 theme_boost: replace all activity icons 2021-12-20 09:24:19 +01:00
Simey Lameze f88bcdb041 MDL-72984 cli: add support email option to cli install 2021-12-20 13:24:38 +08:00
Simey Lameze 4c5db7e80f MDL-72984 output: add support email to footer popover 2021-12-20 13:22:35 +08:00
Simey Lameze eadf157068 MDL-72984 admin: make support email setting mandatory 2021-12-20 13:22:35 +08:00
Shamim Rezaie 2d2d878ce7 Merge branch 'MDL-73175-master' of https://github.com/NoelDeMartin/moodle 2021-12-20 11:00:01 +11:00
Eloy Lafuente (stronk7) e3e3e8d265 MDL-73405 libraries: php80 compatibility fix to Horde Imap Client
The fix is already available upstream for versions 2.30.4 and up
See https://github.com/horde/Imap_Client/pull/13
2021-12-19 12:22:14 +01:00
Eloy Lafuente (stronk7) 0919060272 MDL-73405 phpunit: dataset fixes
This was detected when working in the renaming of test names:
- Fix file name, it was incorrectly named .test.php, now _test.php.
- Add namespace and rename testcase name to match file name.
- Fix php80 deprecation message about optional and required params
  order.
2021-12-19 11:41:52 +01:00
AMOS bot c95d99086a Automatically generated installer lang files 2021-12-19 00:07:28 +00:00
Eloy Lafuente (stronk7) 797148ce2a Merge branch 'MDL-73381-master' of https://github.com/bmbrands/moodle 2021-12-18 12:32:20 +01:00
Paul Holden d064a93d29 MDL-72598 reportbuilder: elements to allow audiences to be renamed.
This allows the user to give the audience more context, particularly
when they are used for selection on the forthcoming schedule form
editing.
2021-12-17 14:33:27 +00:00
Paul Holden eb460d93aa MDL-72598 reportbuilder: schema and model updates for schedules. 2021-12-17 14:33:27 +00:00
Eloy Lafuente (stronk7) e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7) 57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
Paul Holden 73ef0be41f MDL-73402 block_admin_bookmarks: slightly relax section cleaning.
Allow '/' character in external page names.
2021-12-17 11:59:23 +00:00
Eloy Lafuente (stronk7) 58a729f088 on-demand release 4.0dev+ 2021-12-17 11:48:19 +01:00
Eloy Lafuente (stronk7) 8da33c391a Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-12-17 11:48:14 +01:00
Noel De Martin fe83edf360 MDL-73175 mod_glossary: Add behat generators 2021-12-17 07:49:45 +01:00
Dan Marsden 6d95354d3e MDL-73391 lib: include externalib to prevent unit test fails 2021-12-17 13:11:27 +13:00
Víctor Déniz c8abe79865 Merge branch 'MDL-73199' of git://github.com/jfederico/moodle 2021-12-16 16:57:40 +00:00
jfederico 36caeca30a MDL-73199 bigbluebutton: fix protect recording action not being disabled 2021-12-16 16:24:33 +00:00
Eloy Lafuente (stronk7) 3bdfc0ff81 Merge branch 'MDL-72457-master-5' of https://github.com/bmbrands/moodle 2021-12-16 16:49:42 +01:00
Eloy Lafuente (stronk7) 77395be425 Merge branch 'MDL-72873-master-fix' of https://github.com/ilyatregubov/moodle 2021-12-16 16:42:48 +01:00
Ilya Tregubov 04395977e9 MDL-72873 behat: Fix behat tests. 2021-12-16 17:25:17 +02:00
Bas Brands 476ab1275f MDL-73369 theme_boost: contentbank toolbar narrow view 2021-12-16 10:39:09 +01:00
Ilya Tregubov d051e7dc02 Merge branch 'MDL-72873-master-v1' of https://github.com/mihailges/moodle 2021-12-16 10:21:48 +02:00
Bas Brands 6047a11147 MDL-72457 theme_boost: remove main container border 2021-12-16 08:58:41 +01:00
Eloy Lafuente (stronk7) 4428a025de Merge branch 'MDL-73145-master' of https://github.com/sarjona/moodle 2021-12-15 18:34:47 +01:00
Mihail Geshoski c728778df8 MDL-72873 core_grades: Update table headings in the user report page 2021-12-16 00:10:13 +08:00
Mihail Geshoski 31f3922cda MDL-72873 core_grades: Add unit tests 2021-12-16 00:10:13 +08:00
Mihail Geshoski b4e8e0a50d MDL-72873 core_grades: Create method that resets all static caches
Creates a new method reset_caches() in grade_helper which resets
all static caches within this class. This is required for unit
testing.
2021-12-16 00:10:13 +08:00
Mihail Geshoski 17bfe7e79f MDL-72873 behat: Update behat tests 2021-12-16 00:10:13 +08:00
Mihail Geshoski c744bdd1d4 MDL-72873 core_grades: Deprecate select_in_gradebook_tabs()
Deprecates the function select_in_gradebook_tabs() in behat_grade.php.
After the tertiary navigation changes in gradebook this function became
obsolete and is now replaced by select_in_gradebook_navigation_selector().
2021-12-16 00:10:13 +08:00
Mihail Geshoski ddd40c79f1 MDL-72873 core_grades: Update behat step definitions in grades
The behat definition step which is used for navigating to a specific
page in the course gradebook has been updated to reflect the changes
related to the addition of tertiary navitaion in gradebook.
2021-12-16 00:10:13 +08:00
Mihail Geshoski c0d5d988aa MDL-72873 core_grades: Deprecate unused strings 2021-12-16 00:10:13 +08:00
Mihail Geshoski de53412989 MDL-72873 core_grades: Remove $CFG->grade_navmethod
The $CFG->grade_navmethod setting has been removed because it is not
required anymore. This setting was used to set the type of navigation
(tabs or dropdown box) which will be used in gradebook. However, these
navigation methods are no longer used and replaced with tertiary
navigation.
2021-12-16 00:10:13 +08:00
Mihail Geshoski 95b35652d3 MDL-72873 core_grades: Deprecate unused methods
The functions grade_print_tabs() and print_grade_plugin_selector()
can be deprecated as they are no longer used. These functions were
used to generate and output the tabs and dropdown box navigation
in gradebook which is now replaced with tertiary navigation.
2021-12-16 00:10:13 +08:00
Mihail Geshoski eb0b022bb7 MDL-72873 core_grades: Add tertiary navigation in grade scales 2021-12-16 00:10:13 +08:00
Mihail Geshoski 4f403bfdca MDL-72873 core_grades: Add tertiary nav in grader report preferences 2021-12-16 00:10:13 +08:00
Mihail Geshoski c94ba3eea5 MDL-72873 core_grades: Add tertiary navigation in course grade settings 2021-12-16 00:10:13 +08:00
Mihail Geshoski afbc8b2586 MDL-72873 core_grades: Add tertiary navigation in grade outcomes 2021-12-16 00:10:13 +08:00
Mihail Geshoski c326402e86 MDL-72873 core_grades: Add tertiary navigation in grade export plugins 2021-12-16 00:10:13 +08:00
Mihail Geshoski bd13229e75 MDL-72873 core_grades: Add tertiary navigation in grade import plugins 2021-12-16 00:10:13 +08:00
Mihail Geshoski 08e90eeef4 MDL-72873 core_grades: Add tertiary navigation in grade letters 2021-12-16 00:10:13 +08:00
Mihail Geshoski cdc4aeae3e MDL-72873 core_grades: Add tertiary navigation in gradebook setup 2021-12-16 00:10:13 +08:00
Mihail Geshoski d1a0e4a95c MDL-72873 core_grades: Add general tertiary navigation 2021-12-16 00:10:13 +08:00
Bas Brands 5e09ba3286 MDL-73381 theme_boost: make dashboard background white 2021-12-15 16:22:45 +01:00
Bas Brands a8b6912e44 MDL-73274 theme_boost: add block/activity styling 2021-12-15 14:46:45 +01:00
Víctor Déniz 91ad6d08d9 Merge branch 'MDL-73198' of https://github.com/jfederico/moodle 2021-12-15 13:23:05 +00:00
Paul Holden 506adaeb1d MDL-70348 core: fix upgrade note referring to $CFG->localrequestdir.
The change in 9fabe1dd referred to incorrect config property.
2021-12-15 08:56:53 +00:00
Sara Arjona 731b181621 Merge branch 'MDL-73318-master' of https://github.com/andrewnicols/moodle 2021-12-15 09:38:45 +01:00
Huong Nguyen 8c336899a9 MDL-72867 Navigations: User menu improvements 2021-12-15 13:54:45 +07:00
Jake Dallimore 40e28d9aaf Merge branch 'MDL-73277-master' of https://github.com/sharidas/moodle 2021-12-15 13:38:14 +08:00
Safat Shahin 750fafeedd MDL-73350 qbank_statistics: Discrimination index column update
This implementation changes a little logic where the
discrimination index shows an empty row if there is
no attempts been made to a question rather than showing
very likely.
2021-12-15 15:02:16 +11:00
Andrew Nicols 873000b23b Merge branch 'MDL-73329' of https://github.com/paulholden/moodle 2021-12-15 09:34:34 +08:00
AMOS bot 02611b6d5a Automatically generated installer lang files 2021-12-15 00:07:33 +00:00
Paul Holden c45f92116a MDL-73380 mod_workshop: add lang string for phase auto switch event. 2021-12-14 21:51:36 +00:00
Paul Holden 83903f137e MDL-73364 core: add missing lang string for my courses viewed event. 2021-12-14 21:39:39 +00:00
Ilya Tregubov 508fe3937e on-demand release 4.0dev+ 2021-12-14 17:43:15 +02:00
Ilya Tregubov 7090a1c42b Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-12-14 17:43:14 +02:00
Ilya Tregubov c304a77326 Merge branch 'MDL-72413-performance-patch' of https://github.com/ilyatregubov/moodle 2021-12-14 13:53:36 +02:00
Peter Dias 90438c21d6 MDL-72413 forum: Use the common module for setting the header 2021-12-14 13:50:42 +02:00
Peter Dias 00cda46fae MDL-72413 core: Disable the default activity header 2021-12-14 13:50:42 +02:00
Tien Nguyen 24edbcc782 MDL-73189 File upload: Fix bug can upload more than maximum no. of files 2021-12-14 15:09:13 +07:00
Peter Dias 66b32a677b MDL-72413 course: Behat test update 2021-12-14 08:11:20 +02:00
Ilya Tregubov 6fa68a1aa8 MDL-72095 survey: Resolve merge conflict properly. 2021-12-14 08:10:45 +02:00
Víctor Déniz 437470b404 Merge branch 'MDL-73039' of git://github.com/paulholden/moodle 2021-12-13 19:28:35 +00:00
Víctor Déniz 3eafc7a1bc Merge branch 'MDL-73280' of git://github.com/paulholden/moodle 2021-12-13 18:44:10 +00:00
Ilya Tregubov 1f3fde6dee MDL-72095 survey: Add missing parenthesis after merge conflict. 2021-12-13 19:30:40 +02:00
Ilya Tregubov 9e5ffa2229 Merge branch 'MDL-72095-master-3' of https://github.com/bmbrands/moodle 2021-12-13 18:46:16 +02:00
Sara Arjona 9731e30123 Merge branch 'MDL-69467-master' of https://github.com/sebastianberm/moodle 2021-12-13 17:34:39 +01:00
Sara Arjona 9de028f9ec Merge branch 'MDL-73330' of https://github.com/paulholden/moodle 2021-12-13 17:25:28 +01:00
Sara Arjona 29649e2d6f Merge branch 'MDL-73231' of https://github.com/Chocolate-lightning/moodle 2021-12-13 16:31:43 +01:00
Mathew May 54e098c5a5 MDL-73231 my: Allow my courses to be a homepage 2021-12-13 22:43:28 +08:00
Sara Arjona 78f2461d45 Merge branch 'MDL-73196' of https://github.com/jfederico/moodle 2021-12-13 12:58:30 +01:00
Paul Holden 2832b63a9e MDL-73039 course: remove double encoding of course/site for download. 2021-12-13 10:09:03 +00:00
Ilya Tregubov 16a7c3a698 Merge branch 'MDL-72413-master-dec13' of https://github.com/peterRd/moodle 2021-12-13 09:35:14 +02:00
Peter Burnett cab836cf8d MDL-72375 completion: Remove id from custom rules
The id stored in the default custom rules was the courseid, and would
incorrectly be applied to new activities as the activity id.
2021-12-13 11:52:03 +10:00
Peter Dias 5e911213e9 MDL-72413 core: Unit test activity header 2021-12-13 09:49:35 +08:00
Peter Dias 710c04d5ee MDL-72413 core: Disable the default activity header 2021-12-13 09:49:35 +08:00
Peter Dias 4c3f5b8541 MDL-72413 questions: Disable the common activity header 2021-12-13 09:49:35 +08:00
Peter Dias 468204450c MDL-72413 page: Use the common module for setting the header 2021-12-13 09:49:35 +08:00
Peter Dias a6779348f4 MDL-72413 wiki: Use the common module for setting the header 2021-12-13 09:49:35 +08:00
Peter Dias 7fa1354496 MDL-72413 url: Use the common module for setting the header 2021-12-13 09:49:35 +08:00
Peter Dias 3700cc6e25 MDL-72413 survey: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias a292bb9ea7 MDL-72413 scorm: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 94886e96e7 MDL-72413 resource: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 7d3927afea MDL-72413 quiz: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 65ae3c1660 MDL-72413 lti: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias b79bbcba05 MDL-72413 workshop: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 0705928b4a MDL-72413 lesson: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 535bbed24e MDL-72413 data: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 054bff08bb MDL-72413 imscp: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 88983eef99 MDL-72413 h5p: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 8a510c31d1 MDL-72413 glossary: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias ab40bc5962 MDL-72413 forum: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 93782ecdb9 MDL-72413 folder: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias 7e5b0f6289 MDL-72413 feedback: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias ea76db4cbc MDL-72413 choice: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias c2c12a7b15 MDL-72413 chat: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias dd9ee99064 MDL-72413 book: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias d9e0d4ed31 MDL-72413 assign: Use the common module for setting the header 2021-12-13 09:49:34 +08:00
Peter Dias a2d8ac6eea MDL-72413 core: Introduce new header component to render standard items
New activity header to render common module items in a centralised location.
2021-12-13 09:49:34 +08:00
AMOS bot e2cb3acfdd Automatically generated installer lang files 2021-12-13 00:07:29 +00:00
Dongsheng Cai 41587ffb43 MDL-71818 core_calendar: fix accessibility issues 2021-12-13 00:19:05 +11:00
AMOS bot 540f4ab873 Automatically generated installer lang files 2021-12-12 00:07:27 +00:00
Ilya Tregubov 6f44f008d8 Merge branch 'MDL-73278' of https://github.com/stronk7/moodle 2021-12-10 18:51:40 +02:00
Paul Holden becf3bd15c MDL-73329 admin: improve detection of the admin search page.
After a query has been performed, the individual tab content
(it's settings links) isn't rendered to the page. In this case
we should redirect the user back to initial page without the
query parameter, in order for the tab content to load.
2021-12-10 14:00:38 +00:00
Sebastian Berm e0753cb080 MDL-69467 core_h5p: User uniqueness by id instead of email 2021-12-10 14:36:45 +01:00
Ilya Tregubov 222c8cc77c on-demand release 4.0dev+ 2021-12-10 15:14:52 +02:00
Ilya Tregubov f0905d74b1 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-12-10 15:14:49 +02:00
Juan Leyva eb5b0da2ff MDL-72604 assign: Return missing submission status 2021-12-10 11:07:41 +01:00
Safat Shahin 3011aa5226 MDL-72553 qbank_customfields: object issues with customfield form validation 2021-12-10 09:46:38 +02:00
jfederico fbbf30dd04 MDL-73198 mod_bigbluebuttonbn: restored synchrony of recordings 2021-12-10 03:13:28 +00:00
Andrew Nicols 097098735a Merge branch 'MDL-73060' of https://github.com/paulholden/moodle 2021-12-10 11:12:14 +08:00
AMOS bot 5614f64f19 Automatically generated installer lang files 2021-12-10 00:07:27 +00:00
Andrew Nicols f4a828d4ae MDL-73318 tool_componentlibrary: Use innerText instead of innerHTML
Some characters will be encoded for display in HTML which will affect
the process of JS evaluation. For example, the ` => ` sequence used for
fat-arrow syntax will be set as `=&gt;` in the HTML source.

To process the JS the innerText must be used instead.
2021-12-10 06:21:17 +08:00
Eloy Lafuente (stronk7) de66ba356e t checkout MOODLE_311_STABLE && git fetch https://github.com/mudrd8mz/moodle.git MDL-73201-311-enfix && git merge --no-ff FETCH_HEAD
Merge branch 'MDL-73201-master-enfix' of https://github.com/mudrd8mz/moodle
2021-12-09 23:18:03 +01:00
Eloy Lafuente (stronk7) 71746122a5 Merge branch 'MDL-72287-master' of https://github.com/mihailges/moodle 2021-12-09 23:14:32 +01:00
David Mudrák 46e2e2020d MDL-73201 lang: Use fixed strings in the tests, too 2021-12-09 19:56:02 +01:00
Helen Foster 558b4c826d MDL-73201 lang: Import fixed English strings (en_fix) 2021-12-09 19:53:10 +01:00
Sara Arjona 23dea97a6c Merge branch 'MDL-61554-40' of https://github.com/nwp90/moodle 2021-12-09 17:50:58 +01:00
Paul Holden 7905bbf240 MDL-73330 blocks: add missing library require for constants.
All the MY_PAGE_* constants used since 15b41641 reside in another
library. We should be explicit and include it, to avoid warnings.
2021-12-09 16:06:15 +00:00
Mihail Geshoski 8b8b037ec1 MDL-72287 theme_boost: Remove 'My courses' navbar item in module context 2021-12-09 23:47:57 +08:00
Mihail Geshoski e00da7e884 MDL-72287 behat: Update behat tests 2021-12-09 23:47:57 +08:00
Mihail Geshoski d000b16a72 MDL-72287 report: Add back link and headings in user profile pages 2021-12-09 22:46:57 +08:00
abgreeve b9d1aaaa3e MDL-72287 theme_boost: Remove the breadcrumb for course context. 2021-12-09 22:46:57 +08:00
Jun Pataleta e4ed6daa7b Merge branch 'MDL-73220' of https://github.com/call-learning/moodle 2021-12-09 22:19:08 +08:00
Ilya Tregubov 5c67d307d3 MDL-71723 core: Moodle customizations. 2021-12-09 16:12:02 +02:00
Ilya Tregubov 540bf0d59a MDL-71723 core: Upgrade php-enum to 1.8.3 2021-12-09 16:11:14 +02:00
Paul Holden 8bed417833 MDL-73280 reportbuilder: format checkbox profile fields correctly. 2021-12-09 14:09:44 +00:00
Paul Holden 805b9521fc MDL-73280 reportbuilder: remove profile field column alias.
It's not required, and also could cause issues for fields that
contained differing casing in their shortname.

Co-authored-by: David Matamoros <davidmc@moodle.com>
2021-12-09 12:42:40 +00:00
Ilya Tregubov 5e11de3af9 MDL-71705 libraries: Moodle customizations. 2021-12-09 14:19:33 +02:00
Ilya Tregubov 6f069f5272 MDL-71705 libraries: xhprof upgraded to 2.3.5 2021-12-09 14:08:31 +02:00
Ilya Tregubov 4c6151abd1 Merge branch 'MDL-71291-master' of https://github.com/bmbrands/moodle 2021-12-09 13:28:16 +02:00
Sara Arjona 14e62a3d5c Merge branch 'MDL-72981-master-2' of https://github.com/bmbrands/moodle 2021-12-09 12:01:09 +01:00
Paul Holden d8afa1b4e4 MDL-73060 webservice: fix logged config for first enabled protocol.
Resolves PHP notice from 1dfa86b4.
2021-12-09 10:41:49 +00:00
Eloy Lafuente (stronk7) 5df6768443 MDL-73278 phpunit: Add missing payment subsystem and fix dataprovider
While testing the changed unit tests one by one, the
payment/tests/helper_test.php was failing because of a mismatch
between the dataProvider data and the param type.

That made me think why that error was not popping in complete runs
and the answer is that the new (3.10) subsystem is not in the
phpunit.xml.dist file.

Hence, adding it and fixing the dataProvider mismatch.

Finally, it has been detected that some old ICU versions (< 62)
have an incorrect behaviour, not adding the required non-breaking
white-space between the currency abbreviation and the value. So
we are skipping some payment tests if that's found.
2021-12-09 10:31:33 +01:00
Sara Arjona 42895003e4 MDL-73145 install: Apply site preset if defined in config
A new setting, $CFG->setsitepresetduringinstall, has been added to
config file, to let admins define the site admin preset to be applied
during the Moodle installation.

Besides, a new parameter, "--sitepreset" has been also added
to admin/cli/install.php, to let define it too when running the
upgrade process using CLI.
2021-12-09 09:48:44 +01:00
Safat Shahin 63c31c338e MDL-72553 qbank_customfields: Behat fix for mssql and others
This commit implements behat fix for mssql and some other
environments.
2021-12-09 09:22:08 +02:00
Jun Pataleta 107bcc143c Merge branch 'MDL-72090-master' of git://github.com/abgreeve/moodle 2021-12-09 11:17:32 +08:00
abgreeve 05a6bca72c MDL-72090 behat: Deprecation of enrolment behat step.
i_add_enrolment_method_with() is now deprecated, please use
i_add_enrolment_method_for_with() instead.
2021-12-09 11:13:35 +08:00
abgreeve fcd4de8639 MDL-72090 navigation: Update to behat feature files for navigation.
This updates feature files to use the new steps to navigate to certain
pages.
2021-12-09 11:13:35 +08:00
abgreeve 8a5e36fa06 MDL-72090 navigation: Update to existing behat steps.
This creates new general behat steps for navigating in theme
boost and classic.
2021-12-09 11:13:35 +08:00
abgreeve 89d749fda6 MDL-72090 navigation: New unit and behat tests for navigation.
This adds new tests for functions that impact the more menu and
the course administration overflow.
2021-12-09 11:13:35 +08:00
abgreeve d02274137a MDL-72090 navigation: Create an overflow menu for course admin.
This adds a select menu for navigation on course administration
 pages such as import, export, course copy, and course reset.
2021-12-09 11:13:35 +08:00
AMOS bot 81275e8b77 Automatically generated installer lang files 2021-12-09 00:07:24 +00:00
Daniel Ziegenberg 73a2110269 MDL-69023 mod_lti: remove superfluous css rule
The mod_lti css rule .path-mod-lti .message conflicts with text
alignment in chats in message an can be removed. The last occurrence
of the css class "message" was deleted from the mod_lti code in 2011
with 036e84c389 (see MDL-30354).

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2021-12-08 19:39:27 +01:00
Bas Brands 946fd915e2 MDL-72095 theme_boost: max width for activity pages 2021-12-08 17:29:49 +01:00
Ilya Tregubov 3a434518ef Merge branch 'MDL-73103' of git://github.com/paulholden/moodle 2021-12-08 14:56:50 +02:00
Jun Pataleta 402101b58f Merge branch 'MDL-71691-master-9' of https://github.com/bmbrands/moodle 2021-12-08 20:29:40 +08:00
Bas Brands 3652222ec9 MDL-71691 block_social_activities: activity styling 2021-12-08 13:14:05 +01:00
Bas Brands a1efc59edf MDL-71691 block_site_main_menu: activity styling 2021-12-08 13:14:05 +01:00
Bas Brands 35a5288554 MDL-71691 core_behat: behat fixes for changed course design 2021-12-08 13:14:05 +01:00
Bas Brands c68813be08 MDL-71691 core_course: activity styling 2021-12-08 13:14:05 +01:00
Bas Brands cdb651d46a MDL-71691 core_course: section styling 2021-12-08 13:14:05 +01:00
Ilya Tregubov 4de7faf7f1 Merge branch 'master_MDL-72553_qbank_quiz' of https://github.com/catalyst/moodle-MDL-70329 2021-12-08 09:58:00 +02:00
Ilya Tregubov 4d2a00f36b Merge branch 'MDL-72910-master' of git://github.com/rezaies/moodle 2021-12-08 09:55:13 +02:00
Sujith Haridasan ce208a354c MDL-73277 theme_boost: Remove unused class and template
Remove files context_header.php and context_header.mustache
2021-12-08 12:18:52 +05:30
Eloy Lafuente (stronk7) 61f5c2038b MDL-73278 phpunit: Fix namespaces for the renamed classes
Within the renamed classes in the previous commit, there were a
few incorrect namespace, this commit fixes all them to be
correct component[\api] ones.

Also fix a few incorrect leading backslashes in namespace/use
statements. And tests extending renamed tests.
2021-12-07 23:54:29 +01:00
Eloy Lafuente (stronk7) deb0e76eee MDL-73278 phpunit: Rename already namespaced classes to match file name
These are the only cases 100% safe to apply the renaming of the
testcase class names to match the file names.

All other cases are not safe, because they are missing namespace
and may enter into name conflicts. Adding namespaces is not as
simple as imagined because it implies to, also, add a good number
of modifications to core. See the issue for more details.
2021-12-07 23:54:29 +01:00
Laurent David 8c1568d047 MDL-73220 mod_bigbluebuttonbn: "Recently accessed items" block display
* The BBB activity did not send the right event trigger when activity was viewed hence
the block_recentlyaccesseditems did not pick up information from any BBB activity
2021-12-07 21:03:08 +01:00
jfederico bef53cf1b8 MDL-73196 mod_bigbluebuttonbn: Fix blocked participant selection 2021-12-07 16:45:03 +00:00
Ilya Tregubov 5ee0b620ae weekly release 4.0dev+ 2021-12-07 14:59:36 +02:00
Ilya Tregubov 855aaa6053 NOBUG: Fixed file access permissions 2021-12-07 14:59:36 +02:00
Ilya Tregubov 7aaa453dae Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-12-07 14:59:34 +02:00
Jun Pataleta 29ebc9f153 MDL-71915 mod_quiz: Render add question when user can edit the quiz 2021-12-07 20:37:36 +08:00
Bas Brands 83a41d7056 MDL-73298 theme_boost: remove secondary nav from componentlibrary 2021-12-07 10:08:08 +01:00
Matt Porritt 556e2f1aec MDL-72553 qbank_customfields: Add custom fields for question types
Custom fields can now be added to question types.
Site administrators can configure the custom fields and
filed types available. Teachers and question creators can
then use these fields for extra question metadata when
creating questions. Question creators can control if
the fields are displayed to students when they are
taking a quiz or not.
This features uses the core Moodle custom field API.

Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Marc-Alexandre Ghaly <marc-alexandreghaly@catalyst-ca.net>
2021-12-07 18:32:41 +11:00
Jun Pataleta 24e9358ed7 Merge branch 'wip_MDL-73173_master' of https://github.com/gjb2048/moodle 2021-12-07 11:39:47 +08:00
Andrew Nicols 47a81d8844 Merge branch 'MDL-72796_fix-retry-delay-for-redis-session-cache' of https://github.com/ziegenberg/moodle 2021-12-07 10:51:56 +08:00
Jun Pataleta bdf0b8ef56 Merge branch 'MDL-73202-master' of https://github.com/NoelDeMartin/moodle 2021-12-07 10:38:22 +08:00
Shamim Rezaie 7c8a3636d7 MDL-72910 theme: define $drawer-transition and use the transition mixin 2021-12-07 12:49:26 +11:00
Shamim Rezaie f4516e8cbd MDL-72910 theme: move show footer button when right drawer expands 2021-12-07 12:48:37 +11:00
AMOS bot 17e2a2bd7b Automatically generated installer lang files 2021-12-07 00:07:30 +00:00
Nick Phillips e252390284 MDL-61554 calendar: Set $PAGE context in calendar export. 2021-12-07 12:30:23 +13:00
Paul Holden 5701326429 MDL-73237 check: detect same role overrides in different contexts.
Prevents DML debugging from duplicate values in first field, also
fixes `context` class namespace and removes undefined `localrole`
property of $role object.
2021-12-06 16:23:17 +00:00
Paul Holden f6ab7c95b8 MDL-73256 tool_oauth2: save requireconfirmation property on create. 2021-12-06 14:23:39 +00:00
Ilya Tregubov 7548cbfcf6 Merge branch 'MDL-72237-master' of https://github.com/dcai/moodle 2021-12-06 14:22:12 +02:00
Jun Pataleta 9b5b9affec Merge branch 'MDL-72870' of https://github.com/paulholden/moodle 2021-12-06 18:43:20 +08:00
Paul Holden 7d753bed0b MDL-73275 reportbuilder: dataformat exporter for downloading.
If the current dataformat doesn't support HTML then clean the text
and remove all tags.
2021-12-06 10:41:29 +00:00
Ferran Recio c3dbe5a977 MDL-71691 core_course: expand / collapse all sections 2021-12-06 10:55:38 +01:00
Bas Brands 70d86ac570 MDL-71691 core_availability: add show more link 2021-12-06 10:54:05 +01:00
Jun Pataleta 80bdd33b6b Merge branch 'MDL-73153-master' of https://github.com/sarjona/moodle 2021-12-06 17:43:29 +08:00
Bas Brands 5b76eb6900 MDL-71291 theme_boost: minimal frontpage styling tweaks 2021-12-06 10:29:14 +01:00
Bas Brands 26a0091d3c MDL-72981 theme_boost: homogenise logo display 2021-12-06 09:38:21 +01:00
Brendan Heywood a113af2446 MDL-73207 cron: Fixed cronspec field order bug 2021-12-06 17:52:40 +11:00
Shamim Rezaie 4a9e6036fd Merge branch 'MDL-73245-master' of https://github.com/cameron1729/moodle 2021-12-06 17:08:11 +11:00
Jake Dallimore 7f6f237c4f MDL-71915 mod_forum: whitespace fix 2021-12-06 13:50:25 +08:00
Jake Dallimore 1388a8596c Merge branch 'MDL-71915-master-v8' of https://github.com/sharidas/moodle 2021-12-06 13:34:58 +08:00
Sujith Haridasan 1cdab24b3a MDL-71915 gradereport_grader: Fix ajax_grader failure
Fix ajax_grader behat failure.
2021-12-06 10:26:41 +05:30
Sujith Haridasan 01f20ae665 MDL-71915 core_behat: Fix the page admin nav for question bank
Fix the access of items under the question tab in
classic theme.
2021-12-06 10:26:41 +05:30
Sujith Haridasan 45621b705d MDL-71915 mod_url: Update for tertiary nav
Remove the headings if the secondary nav
is present in this activity.
2021-12-06 10:26:40 +05:30
Sujith Haridasan 6dfb487810 MDL-71915 core_contentbank: Update behat tests
Update the behat tests to accomodate changes made
for the tertiary navigation.
2021-12-06 10:26:40 +05:30
Sujith Haridasan a6ed1ec63e MDL-71915 core: Update behat tests
Update behat tests to accommodate changes made for
tertiary navigation.
2021-12-06 10:26:40 +05:30
Sujith Haridasan d6ead553f5 MDL-71915 core_form: Update behat tests
Update behat tests to accommodate changes made
for tertiary navigation.
2021-12-06 10:26:40 +05:30
Sujith Haridasan 3c1f4474ea MDL-71915 course: Update behat tests
Update behat tests for the changes made for tertiarynav.
2021-12-06 10:26:40 +05:30
Sujith Haridasan 671012e709 MDL-71915 badges: Update the behat tests
Update the behat tests to accommodate the changes
made for the tertiary navigation.
2021-12-06 10:26:40 +05:30
Sujith Haridasan 1ee41ff7be MDL-71915 tool_recyclebin: Update behat tests
Update behat tests for the changes made to the
tertiary navigation.
2021-12-06 10:26:40 +05:30
Sujith Haridasan f000755ba1 MDL-71915 question: Update the behat tests
Update the behat tests to accommodate the
changes made for the tertiary navigation.
2021-12-06 10:26:40 +05:30
Sujith Haridasan 26eabeccf4 MDL-71915 question: Update the tertiary nav
Update the tertiary navigation activity for
question.
2021-12-06 10:26:40 +05:30
Cameron Ball f71fced168 MDL-73245 cache: Fix bug with session lock debugging
When session lock debugging and read only sessions deubgging are both
enabled, session lock debugging becomes moot. This patch causes
the session lock deubgging code to exit early if read only sessions
debugging is enabled.
2021-12-06 12:15:53 +08:00
Sujith Haridasan 1149f255fe MDL-71915 mod_quiz: Update the behat tests
Update the behat tests due to the changes made in UI
for tertiary navigation.
2021-12-06 09:27:58 +05:30
Sujith Haridasan 6ba821dc01 MDL-71915 mod_quiz: Update the tertiary nav
Update the tertiary navigation for this
activity.
2021-12-06 09:27:58 +05:30
Sujith Haridasan 0f029c04d7 MDL-71915 mod_forum: Update behat tests
Update behat tests to accommodate the changes made
for tertiary navigation.
2021-12-06 09:27:58 +05:30
Sujith Haridasan 92833547e9 MDL-71915 mod_forum: Update the tertiary nav
Update the tertiary navigation for this
activity.
2021-12-06 09:27:58 +05:30
Sujith Haridasan 621d0a8c72 MDL-71915 mod_scorm: Update behat tests
Update the behat tests as UI is updated for
tertiary navigation.
2021-12-06 09:27:58 +05:30
Sujith Haridasan b98ea6f547 MDL-71915 mod_scorm: Update tertiary nav
Update the tertiary navigation for this activity.
2021-12-06 09:27:58 +05:30
Sujith Haridasan 222ab7b222 MDL-71915 mod_survey: Update tertiary nav
Update tertiary navigation for this activity.
Updated the behat tests for the change made.
2021-12-06 09:27:57 +05:30
Huong Nguyen 1f6a45ba21 MDL-72650 Blocks: Use search_input_auto for Course overview and Timeline 2021-12-06 10:49:48 +07:00
Daniel Ziegenberg 371b490a1f MDL-72796 caching: fix retry delay for redis session cache
The random retry delay for redis session cache was calculated as
rand(100000, 500000) giving an effective retry delay of 100 seconds
to 500 seconds. That's off by a factor of a thousand! Using Redis as a
session cache and when the connection hangs, you can get random
"cannot obtain session lock" errors because it's waiting up to
500 seconds (or about 8.33 minutes) for a Redis connection.
This sets the delay to the originally intended 100ms to 500ms.
(see MDL-59866).

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2021-12-05 17:03:56 +01:00
Sujith Haridasan e0f584d64c MDL-71915 mod_workshop: Update tertiary nav
Update the tertiary navigation for the mod_workshop.
This also include a fix for behat tests due to the
tertiary navigation change made.
2021-12-04 18:09:14 +05:30
Eloy Lafuente (stronk7) c1e72a348a Merge branch 'MDL-73253-master' of https://github.com/vmdef/moodle 2021-12-03 18:52:12 +01:00
Eloy Lafuente (stronk7) 9b7bcdaec0 Merge branch 'MDL-72112-master-fix' of https://github.com/sarjona/moodle 2021-12-03 18:50:45 +01:00
Sara Arjona dc020cede9 MDL-72112 admin_presets: Fix behat errors 2021-12-03 18:01:13 +01:00
Víctor Déniz 292b33fb12 MDL-73253 ci: use setup-node action in GHA 2021-12-03 15:41:12 +00:00
Ilya Tregubov 689bf6fc1e Merge branch 'MDL-72112-master' of https://github.com/aanabit/moodle 2021-12-03 15:11:01 +02:00
Paul Holden b103060753 MDL-73103 reportbuilder: use new notification confirmation method.
Prefetch all language strings used by editor modules.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2021-12-03 13:01:58 +00:00
Andrew Nicols aecdb936cf MDL-73103 core: add new saveCancelPromise notification method. 2021-12-03 13:01:58 +00:00
Gareth Barnard 00f59c226e MDL-73173 core_my: Confusing 'Content' region. 2021-12-03 12:54:17 +00:00
Ilya Tregubov 638c8c452c Merge branch 'MDL-72875-master-v2' of https://github.com/peterRd/moodle 2021-12-03 14:29:59 +02:00
Sara Arjona 9e4f2a45f8 MDL-72112 admin_presets: Add admin_presets tool 2021-12-03 11:11:37 +01:00
Sara Arjona 51149a78cc on-demand release 4.0dev+ 2021-12-03 10:26:54 +01:00
Dongsheng Cai cffefca11c MDL-72237 core_calendar: limit number of day events on calenar view 2021-12-03 16:21:30 +11:00
Jun Pataleta 019df14c00 Merge branch 'MDL-67807-master' of git://github.com/jleyva/moodle 2021-12-03 12:24:42 +08:00
Jun Pataleta cf35e0a1d3 Merge branch 'MDL-72789' of https://github.com/paulholden/moodle 2021-12-03 12:16:41 +08:00
Shamim Rezaie 60d7bcd5e7 Merge branch 'MDL-68944-master' of https://github.com/juancs/moodle 2021-12-03 14:53:52 +11:00
Andrew Nicols 648d018759 Merge branch 'MDL-73195-master' of https://github.com/lameze/moodle 2021-12-03 10:14:13 +08:00
Andrew Nicols e2fd3f424e Merge branch 'MDL-72846-master' of https://github.com/NoelDeMartin/moodle 2021-12-03 08:26:17 +08:00
Eloy Lafuente (stronk7) 42900a7550 Merge branch 'MDL-73084-master' of https://github.com/jleyva/moodle 2021-12-02 19:27:54 +01:00
Eloy Lafuente (stronk7) aa3b57bc5a Merge branch 'MDL-72728' of https://github.com/paulholden/moodle 2021-12-02 18:49:35 +01:00
Noel De Martin 3ce936fe6d MDL-72846 testing: Add default block generators 2021-12-02 14:58:24 +01:00
Sara Arjona ba2e02e5ae Merge branch 'MDL-73087' of https://github.com/Chocolate-lightning/moodle 2021-12-02 12:57:26 +01:00
Mathew May 15b416416c MDL-73087 blocks: Add a way to fetch my courses via WS 2021-12-02 18:40:52 +08:00
Amaia Anabitarte ca78387d94 MDL-72919 core_course: remove unexisting CSS variable 2021-12-02 11:11:51 +01:00
Jun Pataleta 190a520fd6 Merge branch 'MDL-72785' of git://github.com/paulholden/moodle 2021-12-02 17:05:55 +08:00
Simey Lameze bde4c0b26f MDL-73195 mod_url: prevent invalid urls from breaking the course 2021-12-02 16:49:46 +08:00
Andrew Nicols c2a9fcfb18 MDL-73155 qtype_essay: Coding style fix 2021-12-02 14:41:55 +08:00
Andrew Nicols ce7530053e Merge branch 'MDL-73155' of https://github.com/mkassaei/moodle 2021-12-02 14:41:52 +08:00
Jun Pataleta bc6385cc6c Merge branch 'MDL-73142-master' of https://github.com/susyzan/moodle 2021-12-02 14:30:16 +08:00
Jun Pataleta bfecd28c7c Merge branch 'MDL-73000-master' of git://github.com/jleyva/moodle 2021-12-02 13:51:25 +08:00
Peter Dias 3cddee197f MDL-72875 course: Update behat test to use the tertiary nav 2021-12-02 13:09:12 +08:00
Peter Dias e0d7dbd022 MDL-72875 course: Introduce tertiary nav in participants
- Introduce tertiary nav in the participants page
2021-12-02 13:09:12 +08:00
Jun Pataleta 9c87d0772c Merge branch 'MDL-73113-master' of https://github.com/aanabit/moodle 2021-12-02 12:57:52 +08:00
Andrew Nicols e6600293f4 Merge branch 'MDL-73176' of https://github.com/paulholden/moodle 2021-12-02 12:09:33 +08:00
Andrew Nicols 0888efd258 Merge branch 'mdl-68199-fix-master' of https://github.com/jaypha/moodle 2021-12-02 11:54:59 +08:00
Andrew Nicols 312bfce30f Merge branch 'MDL-73205' of https://github.com/paulholden/moodle 2021-12-02 11:35:55 +08:00
Andrew Nicols 807718b723 Merge branch 'MDL-73070' of https://github.com/timhunt/moodle 2021-12-02 11:24:16 +08:00
Jun Pataleta f95cc84aa5 Merge branch 'MDL-72770' of https://github.com/roland04/moodle 2021-12-02 11:08:50 +08:00
Andrew Nicols da02146ea1 Merge branch 'MDL-73149' of https://github.com/paulholden/moodle 2021-12-02 11:02:08 +08:00
Jason den Dulk e7f51a3857 MDL-68199 setup: Fix invalid parameters to make_request_directory()
Added parameter type hint to make_request_directory()
Removed invalid parameters from calls to make_request_directory()

Removing these parameters should have no effect on behaviour.
2021-12-02 07:49:28 +11:00
Eloy Lafuente (stronk7) bf4a830f62 Merge branch 'MDL-70894-master' of https://github.com/yankudriavtsev/moodle 2021-12-01 19:10:36 +01:00
Eloy Lafuente (stronk7) 876d387e8f Merge branch 'MDL-72919-master' of https://github.com/aanabit/moodle 2021-12-01 19:06:40 +01:00
Eloy Lafuente (stronk7) 91a76566c9 Merge branch 'MDL-72141-master' of https://github.com/sarjona/moodle 2021-12-01 18:59:04 +01:00
Eloy Lafuente (stronk7) 2f1936be67 MDL-72791 behat: Unrelated, add the @skip_interim tag
This commit is UNRELATED to the MDL-72791, but we need the
@skip_interim tag added to one scenario that is causing lots
of noise and failures @ CI infrastructure.

So we are using MDL-72791 (this extra commit) to add that tag ASAP.
(sorry for the noise, the tag will be removed once the scenario
or its causes are fixed).
2021-12-01 17:15:56 +01:00
Eloy Lafuente (stronk7) 74f126770d Merge branch 'MDL-72791' of https://github.com/paulholden/moodle 2021-12-01 17:13:22 +01:00
Mikel Martín 6a6ebbac63 MDL-72770 reportbuilder: Display editor in full screen layout
- use 'popup' layout in editor page and create a custom navbar
- remove 'Settings' toggle button and show settings right sidebar with fixed position
- add 'Edit details' button on navbar that opens a modal to modify report basic settings
2021-12-01 17:12:45 +01:00
Sara Arjona 7fa38ba262 Merge branch 'MDL-67804-master' of https://github.com/jleyva/moodle 2021-12-01 16:08:32 +01:00
Sara Arjona 284c27ca4a Merge branch 'MDL-73147-master_take2' of https://github.com/lucaboesch/moodle 2021-12-01 14:50:08 +01:00
Sara Arjona ca8f2deea4 Merge branch 'MDL-73140' of https://github.com/timhunt/moodle 2021-12-01 12:29:47 +01:00
Jun Pataleta 216f36ab21 Merge branch 'MDL-73222' of https://github.com/paulholden/moodle 2021-12-01 18:48:26 +08:00
Sara Arjona 948c86ce07 Merge branch 'MDL-72996' of https://github.com/Chocolate-lightning/moodle 2021-12-01 11:35:01 +01:00
Sara Arjona 85c6da5649 Merge branch 'MDL-72866' of https://github.com/Chocolate-lightning/moodle 2021-12-01 11:18:35 +01:00
Paul Holden 171c615a1b MDL-73149 reportbuilder: update sorting options after aggregation.
Aggregation types can disable column sorting, e.g. both the current
group concatenation types. If such a type is selected for a column
we should update the report sorting options, ensuring that only those
columns that can be sorted are available for selection.
2021-12-01 09:12:07 +00:00
Sara Arjona 40818b5212 Merge branch 'MDL-72834-master' of https://github.com/HuongNV13/moodle 2021-12-01 08:59:47 +01:00
Shamim Rezaie 8a8340f468 Merge branch 'master_MDL-59115' of https://github.com/mattporritt/moodle 2021-12-01 14:54:40 +11:00
Jun Pataleta 3ae9f4cac3 Merge branch 'MDL-72822' of https://github.com/roland04/moodle 2021-12-01 11:27:06 +08:00
Matt Porritt 1c77897523 MDL-59115 auth_oauth2: Set all mapped field of user
On account creation by Oauth2 all configured mapped user
fields are now saved in the user profile on user creation.

Co-Authored-By: SKOLL Learning Technologies
2021-12-01 03:16:19 +00:00
Paul Holden aecd84851c MDL-73222 blocks: register add block modal listeners just once.
Ensure modal is built on each click, as the dataset URL of the
target element may differ.
2021-12-01 02:09:24 +00:00
Paul Holden 8573981a03 MDL-73176 forms: escape selector for active autocomplete element. 2021-11-30 20:08:36 +00:00
Luca Bösch ff95ec1150 MDL-73147 questions: remove modulespecificbuttonscontainer class.
Also, in the bulk actions ui this aligns the bulk action button
properly.
2021-11-30 20:53:34 +01:00
Eloy Lafuente (stronk7) d5698ac689 on-demand release 4.0dev+ 2021-11-30 19:02:03 +01:00
Eloy Lafuente (stronk7) ffd3050265 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-11-30 19:01:58 +01:00
Amaia Anabitarte 21eec081fb MDL-73113 block_myoverview: Change All filter names 2021-11-30 18:57:16 +01:00
Ilya Tregubov 44ea326a7d Merge branch 'MDL-72917-master-fix' of https://github.com/sarjona/moodle 2021-11-30 14:49:32 +02:00
Sara Arjona ecfded8d31 MDL-72112 plugininfo: Add new get_enabled_plugin method
Apart from adding the new get_enabled_plugin($pluginname) method to the
core_plugininfo\base class, and overwritting it for filter, a bug in
enable_plugin in filter, introduced in MDL-72720, has been fixed too.
2021-11-30 13:14:26 +01:00
Amaia Anabitarte 1f450065a6 MDL-72112 output: Add new displayoption parameter to confirm function 2021-11-30 13:14:26 +01:00
Sara Arjona 6ec80ca328 MDL-72917 course: Change section to avoid behat failure 2021-11-30 13:09:24 +01:00
Eloy Lafuente (stronk7) 2dbf0b4a2d Merge branch 'MDL-73066-master-fix' of https://github.com/junpataleta/moodle 2021-11-30 10:47:41 +01:00
Jun Pataleta a119f8e09c MDL-73066 calendar: Behat test fixes
* Specify which close button is being clicked
* Fill out course field when creating a group event
2021-11-30 17:18:42 +08:00
Noel De Martin d5e1463c4b MDL-73202 mod_forum: Add behat generators 2021-11-30 10:07:05 +01:00
Peter Dias bdbef74109 MDL-72965 mod_data: Update tertiary navigation wording
- Changed text to 'Manage fields' in the primary dropdown
- Change text to 'Create a new field' in the add new field dropdown
- Add a header when on 'Manage fields' page.
2021-11-30 15:30:57 +08:00
Mathew May f65b92577a MDL-70197 navigation: Update classic goutte tests 2021-11-30 08:13:49 +02:00
Huong Nguyen 7de559fa2f MDL-72834 Calendar: Move the calendar into the user menu 2021-11-30 10:22:07 +07:00
Eloy Lafuente (stronk7) cee0949109 Merge branch 'MDL-73074' of https://github.com/paulholden/moodle 2021-11-29 23:14:48 +01:00
Eloy Lafuente (stronk7) 113ced6c0d Merge branch 'MDL-73066-master' of https://github.com/lameze/moodle 2021-11-29 20:11:24 +01:00
Paul Holden b1204acbf0 MDL-73205 forms: handle AJAX error in dynamic/modal form submission. 2021-11-29 18:28:44 +00:00
Sara Arjona bc93e8438d Merge branch 'MDL-72790-master-3' of git://github.com/mickhawkins/moodle 2021-11-29 12:07:56 +01:00
Paul Holden 7e3a337500 MDL-72870 mod_quiz: fix attempt navigation button alignment. 2021-11-29 10:47:10 +00:00
Jun Pataleta 5438a3944a Merge branch 'MDL-72810-master' of git://github.com/mickhawkins/moodle 2021-11-29 17:19:28 +08:00
Paul Holden 726ad1f2b5 MDL-72789 report_eventlist: improve filtering of report by component.
Improves change from b8177caa, by filtering on the table eventname
property instead of parsing the same from the value column.
2021-11-29 09:08:51 +00:00
Sara Arjona d1667b684b Merge branch 'MDL-72893-master' of https://github.com/HuongNV13/moodle 2021-11-29 09:58:32 +01:00
Ilya Tregubov d29c09344e Merge branch 'migration-nov26' of https://github.com/Chocolate-lightning/moodle 2021-11-29 10:37:08 +02:00
Sara Arjona 3d0af6fa39 Merge branch 'MDL-73160' of https://github.com/stronk7/moodle 2021-11-29 09:31:04 +01:00
Mathew May b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Jun Pataleta 16b42a2119 Merge branch 'MDL-70274-master-2' of https://github.com/lameze/moodle 2021-11-29 12:16:51 +08:00
Simey Lameze b179f74b82 MDL-70274 core: fix Validate HTML and WCAG Check links 2021-11-29 12:08:57 +08:00
Jun Pataleta 267fd27c7b Merge branch 'MDL-72917-master' of https://github.com/lameze/moodle 2021-11-29 11:31:14 +08:00
AMOS bot 6b26d2e879 Automatically generated installer lang files 2021-11-27 00:07:40 +00:00
Paul Holden 74f1879000 MDL-72728 behat: switch import course steps to native execute method.
The previous iteration using the behat_form_field class directly
didn't explicitly require the file that defines this class, and in
Goutte runs this led to fatal errors (class not found).
2021-11-26 18:58:49 +00:00
Eloy Lafuente (stronk7) ef76e24bf9 MDL-73160 profiling: Fix links to profiling runs
When debug_footer_html() was split from standard_footer_html()
in MDL-71965 the $SCRIPT global declaration was left behind.

This just moves it wherever it's needed.
2021-11-26 17:10:25 +01:00
Sara Arjona 18b2af60f5 on-demand release 4.0dev+ 2021-11-26 15:26:21 +01:00
Sara Arjona 5ae7fa42b7 NOBUG: Fixed SVG browser compatibility 2021-11-26 15:26:18 +01:00
Sara Arjona 52b48db1a6 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-11-26 15:26:18 +01:00
Mahmoud Kassaei 66766eec24 MDL-73155 qtype_essay: Errors when Allow attachments is reset to 'No' 2021-11-26 13:51:05 +00:00
Jun Pataleta cef9c111cc Merge branch 'MDL-73092-master' of https://github.com/bmbrands/moodle 2021-11-26 12:32:33 +08:00
Víctor Déniz 81044f2c11 Merge branch 'MDL-70658' of https://github.com/stronk7/moodle 2021-11-25 22:03:44 +00:00
Ilya Tregubov f6feaad138 Merge branch 'MDL-72456-master' of https://github.com/ferranrecio/moodle 2021-11-25 20:25:19 +02:00
Eloy Lafuente (stronk7) 103a4b5c92 MDL-70658 phpunit: never apply for time() in data providers
Data providers are executed at the beginning of the execution
of the phpunit run, not when the test is run.

So, setting anything on them being dependent of current time
has high chances or fail when the test is executed (maybe some
hours later in slow databases / systems).

Data provider only can contain the relative values and then,
when the test is effectively run, they are applied to *current* time.
2021-11-25 18:13:51 +01:00
Ferran Recio 26d0e51d91 MDL-72456 mod_assign: fix behats 2021-11-25 15:29:54 +01:00
Ferran Recio bcb35d9dbe MDL-72456 theme_boost: detect drawers scroll 2021-11-25 11:30:32 +01:00
Ferran Recio 98617c5bc1 MDL-72456 core_courseformat: adding page item to course index 2021-11-25 11:28:13 +01:00
Ferran Recio 844681f54f MDL-72456 theme_boost: add tooltips to drawers 2021-11-25 11:28:06 +01:00
Jun Pataleta b5c4886efe Merge branch 'MDL-72443' of https://github.com/paulholden/moodle 2021-11-25 17:32:10 +08:00
Juan Segarra Montesinos 42fa69943d MDL-68944 mod_workshop: Workshop skips scheduled allocation 2021-11-25 09:49:27 +01:00
Eloy Lafuente (stronk7) b34da7b184 MDL-70658 dml: Shorten aliases to make Oracle happy
Some columns in the database have already 29 characters, so we
cannot use a prefix of 3 characters because that puts orcle over
the 30 characters max.
2021-11-25 09:05:52 +01:00
Mathew May 2e31a1c930 MDL-72996 myoverview: Hide the block header on the my courses page 2021-11-25 10:55:20 +08:00
Mathew May 60f0bae098 MDL-72996 my: Rounded course management button hover 2021-11-25 10:55:19 +08:00
Mathew May 34102b2094 MDL-72866 templates: Update navbar to match designs 2021-11-25 09:54:28 +08:00
AMOS bot dc348d46a0 Automatically generated installer lang files 2021-11-25 00:07:27 +00:00
Eloy Lafuente (stronk7) a700612f1b Merge branch 'MDL-73054' of https://github.com/paulholden/moodle 2021-11-24 23:56:52 +01:00
Eloy Lafuente (stronk7) 20d3cd6f88 Merge branch 'MDL-72988' of https://github.com/paulholden/moodle 2021-11-24 23:49:41 +01:00
Víctor Déniz 744687367c Merge branch 'MDL-70658-final' of github.com:vmdef/moodle 2021-11-24 20:40:52 +00:00
Susanna Zanatta 7825f31607 MDL-73142 filepicker: improved contrast in allowed file types list
Changed bootstrap class from text-muted to text-dark to bring the
contrast of listed file extensions above the Level AA pass mark.
2021-11-24 16:11:58 +00:00
Andrew Nicols 68c3f1e90c MDL-70658 mod_bigbluebuttonbn: Use core/event_dispatcher 2021-11-24 12:27:31 +00:00
laurentdavid 65212c538b MDL-70658 mod_bigbluebutton: Include version 2021091407 into core
This commit includes a copy of the bigbluebuttonbn activity module from:
- branch: tags/v2.5-alpha.2^0
- commit:
2021-11-24 12:27:27 +00:00
Mikel Martín 08d31c6657 MDL-72822 core_reportbuilder: Fix focus lost after applying changes
- Fix focus after adding conditions in the editor
- Fix focus after adding Filters in the editor
- Fix focus after applying sorting settings in editor
- Fix focus after selecting column aggregation in editor
2021-11-24 13:13:08 +01:00
Amaia Anabitarte 6e089b2602 MDL-72919 core_course: Improve add weeks styling 2021-11-24 12:10:13 +01:00
Sara Arjona dc631407b5 MDL-73153 badges: get image when it has more data
In some cases, image might have more fields rather than the URL.
This patch is for taking them into account and displaying the image
and also these information properly.
2021-11-24 10:27:15 +01:00
Mikel Martín 8e25d534b4 MDL-72822 core_reportbuilder: Accessibility improvements
- Add sr-only headings to tabs
- Change role to 'presentation' in tab <li> elements
- Remove unnecessary aria-labelledby
- Fix heading levels
- Avoid duplicated IDs in audiences
- Replace empty links with buttons
- Fix mustache comments
- Fix mustache contexts
2021-11-24 10:26:14 +01:00
Sara Arjona 88c31c7551 MDL-72141 badges: simplify external badges page
Apart from reorganising the information displayed in the external badges
page, this information has been moved to reuse the template created in
MDL-71937, to make it easier to modify and maintain.
2021-11-24 09:40:19 +01:00
Michael Hawkins c18fe5ecf6 MDL-72790 block_timeline: Set content width consistent with other blocks
Previously the margins were set with the container class, which meant
the content was narrower than other blocks. This does not need to be
managed by the block since the dashboard will soon manage this with
its own max width.
2021-11-24 14:09:57 +08:00
Michael Hawkins 873262bbaa MDL-72790 block_timeline: Ensure overdue badge visible at all widths
This ensures on narrower screens, the activity title still truncates
but the overdue pill always remains visible where present. There is no
visual change where an item is not overdue, or on wider screens where
there is room to display the full content.
2021-11-24 14:09:57 +08:00
Huong Nguyen 1a75b75b52 MDL-72790 block_timeline: Fix button layout and row wrapping on mobile
This ensures all row content wraps nicely on smaller screen sizes, and
forces all action buttons to be displayed in a consistent position
indepdendent of the length of the activity name etc. Buttons are also
now aligned under the text on small screens, to maximise space for the
text content.

Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-11-24 14:09:57 +08:00
Michael Hawkins 921eb5ce0e MDL-72790 block_timeline: Improve padding and background in Classic
This ensures in the Classic theme that some padding is appled to both
sides of each item, so titles and action buttons are not flush against
the margin. Dropdowns/inputs in the block are also aligned to this
content, so everything aligns in both Boost and Classic.
This commit also groups related elements with a solid background colour
(eg within the same course in courses view), rather than having
individual row items broken up, to improve readability (and look nicer).
2021-11-24 14:09:50 +08:00
Yan Kudriavtsev c72e7946cf MDL-70894 enrol: Fixed return type for count_enrolled_users 2021-11-24 00:06:54 +02:00
Juan Leyva a5c48fe780 MDL-67804 webservice: Fix exception class to allow clients treat errors 2021-11-23 16:59:21 +01:00
Juan Leyva dba18ce3b6 MDL-73000 webservice: Fix external_warnings message type 2021-11-23 16:15:08 +01:00
Juan Leyva 10a6e99ea2 MDL-73084 enroll: Return timemodified field in get_users_courses 2021-11-23 15:59:04 +01:00
Paul Holden d4b2745719 MDL-72785 course: remove double validation during category deletion.
Fixes issue from 0645319e that meant the category "Move into" field
was required even when user selected to "Delete all content".
2021-11-23 12:29:34 +00:00
Ferran Recio 73cfbea3ee MDL-72456 theme_boost: style drawers 2021-11-23 12:51:11 +01:00
Simey Lameze dba805c552 MDL-73066 calendar: remove course and cat params from footer links 2021-11-23 19:11:34 +08:00
Tim Hunt 11f8a08a0e MDL-73070 Behat: stop using no-longer-existant classes in behat_hooks 2021-11-23 10:58:49 +00:00
Ilya Tregubov 16a5169a43 on-demand release 4.0dev+ 2021-11-23 11:19:14 +02:00
Shamim Rezaie 46e6502283 Merge branch 'MDL-72776-master' of https://github.com/ferranrecio/moodle 2021-11-23 14:56:50 +11:00
Andrew Nicols eab5f3cfb2 Merge branch 'MDL-73069' of https://github.com/paulholden/moodle 2021-11-23 10:52:11 +08:00
Sara Arjona be78cb02f2 Merge branch 'MDL-73129-master' of https://github.com/dravek/moodle 2021-11-23 10:52:11 +08:00
Sara Arjona 4c1ccf5ed3 Merge branch 'MDL-72934-master' of https://github.com/peterRd/moodle 2021-11-23 10:52:11 +08:00
Sara Arjona 9773051128 Merge branch 'MDL-72927-master' of https://github.com/junpataleta/moodle 2021-11-23 10:52:11 +08:00
Eloy Lafuente (stronk7) a7571e934c Merge branch 'MDL-73067-master' of https://github.com/lameze/moodle 2021-11-23 10:52:11 +08:00
Eloy Lafuente (stronk7) e379b1d803 Merge branch 'MDL-73128-master' of https://github.com/sarjona/moodle 2021-11-23 10:52:11 +08:00
Sara Arjona d122f73c4d Merge branch 'MDL-73112' of https://github.com/paulholden/moodle 2021-11-23 10:52:11 +08:00
Ilya Tregubov 5cdaaa4a8d Merge branch 'MDL-72967-master' of https://github.com/lameze/moodle 2021-11-23 10:52:11 +08:00
Eloy Lafuente (stronk7) 0dd508d671 Merge branch 'MDL-73095_master_v3' of https://github.com/TomoTsuyuki/moodle
Added one extra TEXT column so we have it covered too.
2021-11-23 10:52:10 +08:00
Sara Arjona 89ab2b1c22 Merge branch 'master_MDL-72076-bulkactionsui-121' of https://github.com/catalyst/moodle-MDL-70329 2021-11-23 10:52:10 +08:00
Tim Hunt e1b28a7fc6 MDL-73140 grade history: fix badly formatted lists 2021-11-22 23:48:19 +00:00
Paul Holden 5dc866cc70 MDL-73054 filter_emoticon: re-factor test data providers.
PHPUnit test dataProvider methods should not modify global state,
such as initializing $OUTPUT, as they can cause failures in
unrelated tests at a distance.
2021-11-22 22:29:23 +00:00
Paul Holden 8b2423c7a1 MDL-73054 repository_googledocs: avoid $OUTPUT use in data provider. 2021-11-22 22:29:12 +00:00
Sara Arjona a0407f6d17 MDL-73128 badges: Fix warning with external badges 2021-11-22 16:31:32 +01:00
Paul Holden d38fe96834 MDL-73074 forms: ensure autocomplete element is enhanced only once.
This fixes the reportbuilder course filter, which was displayed twice
in response to an AJAX request for the rendered form.
2021-11-22 10:25:41 +00:00
David Matamoros 6d1a7a8283 MDL-73129 reportbuilder: Remove string with trailing whitespace 2021-11-22 10:30:10 +01:00
Paul Holden faeecd79ea MDL-73074 reportbuilder: consistent lang strings in course filter. 2021-11-22 09:20:04 +00:00
Paul Holden 881dccaa7d MDL-73069 reportbuilder: filter/condition for selecting user.
This allows a report creator to create personalised reports
according to the user who is viewing the report.
2021-11-22 09:17:52 +00:00
Paul Holden f4bf4dca36 MDL-73112 reportbuilder: improve handling of concatenated columns.
This change overcomes limitations in certain DB engines (such as
MySQL[1]) which can lead to truncation of data when applying group
concatenation to columns.

Ensure we account for that by validating that we are able to extract
the expected number of fields from each concatenated value.

[1] https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_group_concat_max_len
2021-11-22 09:14:41 +00:00
Ferran Recio 675f8e24ca MDL-72776 theme_boost: new editing progress effect 2021-11-22 08:57:10 +01:00
Jun Pataleta a44d41bb51 MDL-72927 core: Make Remember username checkbox look like a checkbox 2021-11-22 14:50:25 +08:00
Huong Nguyen f1c0c2905d MDL-72893 Behat: Fix Behat failures for Timeline block 2021-11-22 11:50:25 +07:00
Safat Shahin 0805e387b7 MDL-72076 bulk actions ui: Implement bulk actions in qbank API
This implementation will introduce bulk actions qbank
plugins which can grab the selected question and perform
actions according to the selected option from dropdown
in the base view.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
2021-11-22 11:35:21 +11:00
Eloy Lafuente (stronk7) 7013bda35b on-demand release 4.0dev+ 2021-11-19 19:16:53 +01:00
Eloy Lafuente (stronk7) dc5a834441 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-11-19 19:16:48 +01:00
Sara Arjona fe80a2b716 Merge branch 'MDL-72799' of https://github.com/stronk7/moodle 2021-11-19 15:51:03 +01:00
Juan Leyva c7e7229ccd MDL-67807 webservice: Return concurrent sessions information 2021-11-19 14:03:37 +01:00
Eloy Lafuente (stronk7) b62095fa97 MDL-72799 behat: Increase allowed size for privacy exports
Because of more moodle.css contents, the total size of the privacy
exports has grown over the allowed size. Just raise it a little bit
more.

Note this commit isn't a problem caused exclusively by this issue,
but as far as this also contributed to the size increase, assigning
the fix to it.
2021-11-19 12:07:07 +01:00
Michael Hawkins 0d644fe4e0 MDL-72810 core_calendar: Remove the three-month pseudo block
This removes the three-month pseudo block from along the side of the
main calendar, and deprecates relevant files/methods which will no
longer be in use.
2021-11-19 18:33:46 +08:00
Eloy Lafuente (stronk7) 57a2188cda Merge branch 'MDL-69092-patched' of https://github.com/ilyatregubov/moodle 2021-11-19 09:13:27 +01:00
Ilya Tregubov 47c9289420 MDL-69092 mod_lti: Fix typo. 2021-11-19 09:50:36 +02:00
Andrew Madden 36f3aee38e MDL-69092 mod_lti: Add js_pending to help behat tests 2021-11-19 09:50:35 +02:00
Simey Lameze 9e34fc65c0 MDL-72917 course: change padding for the add an activity element 2021-11-19 15:08:05 +08:00
Ilya Tregubov e14bb0b9c4 Merge branch 'MDL-69092' of https://github.com/stronk7/moodle 2021-11-19 08:53:44 +02:00
Shamim Rezaie a46aa000b0 Merge branch 'MDL-73098' of https://github.com/stronk7/moodle 2021-11-19 15:19:15 +11:00
Jun Pataleta 357ddcaff6 Merge branch 'MDL-72826' of git://github.com/paulholden/moodle 2021-11-19 11:07:03 +08:00
AMOS bot 243eb2575a Automatically generated installer lang files 2021-11-19 00:07:28 +00:00
Paul Holden 9a56e2ba1f MDL-72988 mod_lti: improved handling of missing tool endpoint. 2021-11-18 22:55:01 +00:00
Eloy Lafuente (stronk7) 2db434ea98 Merge branch 'MDL-71882-master' of https://github.com/andrewnicols/moodle 2021-11-18 23:31:03 +01:00
Eloy Lafuente (stronk7) 628de2bf08 MDL-69092 mod_lti: SQL fix for cross-db 2021-11-18 20:46:56 +01:00
Eloy Lafuente (stronk7) 1bdb9cafd6 Merge branch 'MDL-72470-master' of https://github.com/sharidas/moodle 2021-11-18 18:37:09 +01:00
Sara Arjona dc0e7a45df Merge branch 'MDL-70721-master' of git://github.com/rezaies/moodle 2021-11-18 15:18:51 +01:00
Shamim Rezaie 4f76d40628 Merge branch 'MDL-72887-master' of https://github.com/michael-milette/moodle 2021-11-18 22:37:08 +11:00
Bas Brands 79975c9a7f MDL-73092 theme_boost: increase right drawer width 2021-11-18 09:14:20 +01:00
Ilya Tregubov 39cae56ef5 Merge branch 'MDL-69092-master_lti_pagination' of https://github.com/andrewmadden/moodle 2021-11-18 08:57:12 +02:00
Tomo Tsuyuki cb4e37c462 MDL-73095 core_ddl: Fix binary type field check 2021-11-18 17:53:00 +11:00
Michael Milette 66bcaa69a5 MDL-72887 search: Tooltip added to navbar search icon. 2021-11-18 00:59:50 -05:00
Peter Dias 12ded633b4 MDL-72934 core_navigation: Early return if no nodes to be rendered.
Do not export any items for templates if the nodecollection does not
have any children.
2021-11-18 11:17:00 +08:00
Andrew Nicols 83c69cdfee Merge branch 'MDL-73090' of https://github.com/paulholden/moodle 2021-11-18 10:12:31 +08:00
Andrew Nicols f64e4ec2bf Merge branch 'MDL-70801-new' of https://github.com/Chocolate-lightning/moodle 2021-11-18 09:51:02 +08:00
Simey Lameze 46e4130b6f MDL-73067 block_calendar_month: remove event key filter 2021-11-18 09:08:03 +08:00
Mathew May 646a08958f MDL-70801 block_myoverview: Correct the user for course searching in behat 2021-11-18 08:18:09 +08:00
AMOS bot a5d38be14b Automatically generated installer lang files 2021-11-18 00:07:26 +00:00
Eloy Lafuente (stronk7) 4c0ae3e138 MDL-73098 install: Detect stale bootstrap.php files and disable them
It's important to say that this bug apparently (till now) only happens
when an *incorrect* instalation of a site happens, reusing the dataroot
from another existing site.

When that happens, the localcache/bootstrap.php file from the old
site is reused, setting siteidentifier and SYSCONTEXTID when it's not
time for them to be defined yet.

Their existenece leads to reusing some other structures from the old
dataroot (that, again, should have been changed or wiped!), ultimately
leading to all sort of errors about non-existent tables (course,
context...).

With this change we ensure that:

1) Whenever any change to the database configuration (prefix, user,
   type..) happens, it's detected and immediately the information
   in the localcache/bootstrap.php is discarded and the file removed.
   This should fix problems like MDL-73098 itself.

2) We only set SYSCONTEXTID if the file is not stale. Main reason
   for doing that check within the localcache/bootstrap.php file
   itself is that we cannot "undefine" it @ setup.php. This should
   prevent errros like MDL-72888 to happen.

3) Finally, little detail, we only define SYSCONTEXTID if it has
   not been defined earlier. In the past, it was recommended to
   define it in config.php (exactly to save one DB read) and, sites
   having them will face "already defined" warnings.
2021-11-17 20:56:36 +01:00
Paul Holden 80dd297a62 MDL-73090 reportbuilder: confirmation before resetting conditions.
Also prefetch all lang strings used by conditions editor.
2021-11-17 16:27:50 +00:00
Bas Brands aff86afaff MDL-72250 core_course: behat fix for targeting close button 2021-11-17 14:39:11 +02:00
Andrew Madden 1c78187010 MDL-69092 pagination: Add first/last config for paging_content_factory
Allow config toggle for showing first and last button for paging_content_factory.
2021-11-17 22:45:07 +11:00
Andrew Madden f435f313e0 MDL-69092 mod_lti: Add pagination to toolconfigure.php.
* Add local function to access subsets of proxies and types direct from DB.
* Add local function to access count of proxies and types direct from DB.
* Add new external function to get both proxies and types with pagination.
* Add new external function to get count of proxies and types.
* Implement pagination using page factory in JS.
* Added unit tests to cover new external functions.
* Add mod_lti behat generators and tests.
* Show first and last button in paging bar.
* Created helper class to assist with new functions.
2021-11-17 22:44:56 +11:00
Ilya Tregubov 557b56e1ec Merge branch 'MDL-72816-master-nov17' of https://github.com/peterRd/moodle 2021-11-17 10:27:15 +02:00
Jun Pataleta f6a15259f7 Merge branch 'MDL-72925_master_v2' of https://github.com/TomoTsuyuki/moodle 2021-11-17 16:05:46 +08:00
Peter Dias a7a5f6626a MDL-72816 navigation: Make sure a secondary node is active
- Clone nodes shared between nav trees before utilising it.
2021-11-17 15:55:24 +08:00
Peter Dias 423e5a5fee MDL-72816 navigation: Make sure a primary node is active
- Revert unnecessary primary_active_tab setters
- Modify the navigation nodes to never change text based on default homepage
- Make sure a tab is set active
2021-11-17 15:55:18 +08:00
Sara Arjona b238091f7c Merge branch 'MDL-71699' of https://github.com/mkassaei/moodle 2021-11-17 08:53:34 +01:00
Shamim Rezaie cb6f1d3d89 Merge branch 'MDL-72799' of https://github.com/Chocolate-lightning/moodle 2021-11-17 18:18:17 +11:00
Mathew May 24bfcd9fd7 MDL-72799 navigation: Improvements to navigation styling 2021-11-17 15:14:09 +08:00
Ilya Tregubov cffd19b699 Merge branch 'MDL-69496_Master' of https://github.com/1JackBlack1/moodle 2021-11-17 09:01:00 +02:00
Andrew Nicols 738d4cac07 Merge branch 'MDL-70801-new' of https://github.com/Chocolate-lightning/moodle 2021-11-17 12:41:32 +08:00
Andrew Nicols c1e639c41a MDL-71882 grunt: Replace module names
When a third-party AMD module is provided with an included name we must
replace it with a name that we are able to use.

The structure of an AMD module define function is:

    [name], [dependencies], [callback]
    String, Array,          Function

Each of these is (strangely) optional.

We know that the name is the only String and will always be the first,
and we can use AST to remove a provided name before adding the
Moodle-specific name.

This should be a safe change and not lead to any changes in built code,
but will make it easier to include third-party code.

An additional logging line is also included to inform developers that a
change was made.
2021-11-17 09:16:55 +08:00
AMOS bot 347878b3e5 Automatically generated installer lang files 2021-11-17 00:07:32 +00:00
PraiseSatan 982d1bb1c8 MDL-69496 quiz: Only validate completion if unlocked
Quiz completion settings are only validated if they are unlocked.
Undefined behaviour in the forms API results in the completion
settings 'require passing grade' and 'completion attempts exhausted'
not being sent to the process options function if completion
settings are locked. This resulted in the completion attempts
exhausted setting being disabled whenever the quiz was saved
as it did not detect the require passing grade setting.
This changes the behaviour so that validation is only performed
if the completion settings are unlocked.
A behat test is included to ensure the setting does not change.
2021-11-17 09:11:29 +11:00
Shamim Rezaie dfe03b3036 Merge branch 'MDL-72250-master-3' of https://github.com/bmbrands/moodle 2021-11-17 07:30:54 +11:00
Shamim Rezaie 8f65f24221 Merge branch 'MDL-72907-master' of https://github.com/sarjona/moodle 2021-11-17 02:02:51 +11:00
Paul Holden be11216d30 MDL-72826 reportbuilder: per-report option to show only unique rows.
This option allows report creators to avoid duplicate data being
displayed in their report. It is applied only when no columns in the
report currently have aggregation methods applied.
2021-11-16 13:59:16 +00:00
Eloy Lafuente (stronk7) eab63d2cfe on-demand release 4.0dev+ 2021-11-16 14:00:24 +01:00
Eloy Lafuente (stronk7) 70e91430b5 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-11-16 14:00:20 +01:00
Amaia Anabitarte 9b5367b306 MDL-72907 core_repository: Fix enable_plugin function 2021-11-16 09:20:56 +01:00
Bas Brands 8d976f932f MDL-72250 tool_usertours: behat update for new drawer toggle button 2021-11-16 08:58:01 +01:00
Bas Brands 4fb5fb052f MDL-72250 theme_boost: add mobile nav drawer 2021-11-16 08:58:01 +01:00
Tomo Tsuyuki 815f51979c MDL-72925 mod_forum: Filter discussion when grading 2021-11-16 15:23:51 +11:00
Jun Pataleta c988241f42 Merge branch 'MDL-72966-master' of https://github.com/NashTechOpenUniversity/moodle 2021-11-16 11:38:35 +08:00
Faisal Kaleem 26ca780f57 MDL-72967 lib: fix typo in excellib insert_bitmap() method 2021-11-16 10:31:42 +08:00
AMOS bot 3c88cc7fd7 Automatically generated installer lang files 2021-11-16 00:07:27 +00:00
Shamim Rezaie 7ba7920aa8 MDL-70721 output: Remove redundant title
The format_string() function does half html escaping. It escapes < and >
characters, but does not escape ". Therefore, it put us in a situation
where neither {{}}, nor {{{}}} are suitable in templates. If we use {{}}
for an attribute (like title or aria-label), then < and > characters
will be double escaped. On the other hand, if we use {{{}}} there, a
double quote character will break HTML when it is used in an attribute.
Therefore, neither {{}}, nore {{{}}} are usable in html attributes.

Moreover, The title attribute here was redundant because it had the same
value as the link's text.
2021-11-16 10:08:07 +11:00
Shamim Rezaie 652392d932 MDL-70721 output: remove {{#quote}} wherever it was misused
Also use the new {{#cleanstr}} helper where it was more appropriate
than the {{#str} helper.
2021-11-16 10:08:06 +11:00
Eloy Lafuente (stronk7) d0fc23cd06 Merge branch 'MDL-72096-master' of https://github.com/mickhawkins/moodle 2021-11-15 19:02:13 +01:00
Eloy Lafuente (stronk7) f897b267ad Merge branch 'MDL-72908' of https://github.com/paulholden/moodle 2021-11-15 18:57:54 +01:00
Mahmoud Kassaei ad1747e28c MDL-71699 grade_report: Add custom user field support 2021-11-15 15:08:23 +00:00
Paul Holden 836f2f044a MDL-72908 admin: correctly distinguish purging all/selected caches. 2021-11-15 12:20:11 +00:00
Ilya Tregubov 01f8949950 Merge branch 'MDL-73011' of https://github.com/paulholden/moodle 2021-11-15 13:37:16 +02:00
Shamim Rezaie 4f96d7ac92 MDL-70721 core: a new mustache helper to clean string after get_string 2021-11-15 22:14:03 +11:00
Ilya Tregubov 5efc19da4c Merge branch 'MDL-72612' of https://github.com/mkassaei/moodle 2021-11-15 10:15:46 +02:00
Michael Hawkins 6d26ba77f3 MDL-72096 core: Add safe ORDER BY helpers for db sorting from user input
The new get_safe_orderby() and get_safe_orderby_multiple() methods
provide a centralised safe way for user submitted sorting values to be
incorporated into SQL ORDER BY. They do this by removing the need for
user submitted data to pass in any SQL and not allowing arbitrary
column values, instead using string keys which map to a predefined
list of allowed sortable columns.
2021-11-15 12:42:43 +08:00
Mathew May e110e5b330 MDL-70801 block_myoverview: Upgrade steps to relocate the block 2021-11-15 11:49:35 +08:00
Mathew May 6ca9c2154a MDL-70801 core_my: Add a new courses page 2021-11-15 11:49:35 +08:00
Andrew Nicols 7be967d3d6 Merge branch 'MDL-73038' of https://github.com/paulholden/moodle 2021-11-15 08:54:24 +08:00
Thong Bui ec160a91cb MDL-72966 File upload: Uncaught Error from JS when uploading the file 2021-11-15 07:28:50 +07:00
Andrew Nicols e11332cf90 MDL-69092 behat: Repeated generator 2021-11-15 11:06:58 +11:00
PraiseSatan ef9ffcd16d MDL-69496 form: Check if element has attributes
Checks if a form element has attributes before
trying to get the default value. This fixes
an error when trying to get the default value
for a frozen group which does not have the
attributes array.
2021-11-15 09:38:20 +11:00
Mahmoud Kassaei 2bd34edc2d MDL-72612 Custom user field support: Quiz report grading 2021-11-12 15:29:50 +00:00
Paul Holden 35cefccfe9 MDL-72791 customfield: correct access checks for course search data. 2021-11-12 15:08:56 +00:00
Paul Holden 143c80e229 MDL-72443 files: support svg preview as with other image types. 2021-11-12 15:07:02 +00:00
Eloy Lafuente (stronk7) c69c33b14d weekly release 4.0dev+ 2021-11-12 13:40:27 +01:00
Eloy Lafuente (stronk7) 69f7218fbe Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-11-12 13:40:22 +01:00
Paul Holden 10baa46364 MDL-73038 course: remove course module title double encoding. 2021-11-12 09:55:10 +00:00
Jun Pataleta e327315ea6 Merge branch 'MDL-61671-master' of git://github.com/jleyva/moodle 2021-11-12 10:48:57 +08:00
Shamim Rezaie 6b477deb50 Merge branch 'MDL-60850-master' of https://github.com/junpataleta/moodle 2021-11-12 12:59:59 +11:00
Jun Pataleta 6285dfb7e5 MDL-60850 mod_lti: Centre-align tool configure form elements 2021-11-12 09:40:48 +08:00
Shamim Rezaie 96f910b62f Merge branch 'MDL-73040-master' of git://github.com/HuongNV13/moodle 2021-11-12 12:05:42 +11:00
Paul Holden c0ceaef772 MDL-73011 reportbuilder: remove workarounds for tab switching. 2021-11-11 23:54:56 +00:00
David Matamoros 697594cd95 MDL-73011 core: Clean previous tab content when switching tabs
Co-authored-by: Paul Holden <paulh@moodle.com>
2021-11-11 23:32:58 +00:00
Víctor Déniz e82b2ed8d1 Merge branch 'MDL-72565-integration' of https://github.com/roland04/moodle 2021-11-11 23:14:36 +00:00
Jun Pataleta e1c9c7b007 Merge branch 'MDL-73007' of https://github.com/paulholden/moodle 2021-11-11 23:45:12 +08:00
Jun Pataleta ce71c45f81 Merge branch 'MDL-72982-master' of https://github.com/junpataleta/moodle 2021-11-11 23:01:14 +08:00
Luuk Verhoeven f60a585929 MDL-72982 tool_dataprivacy: add class name to email table 2021-11-11 22:54:56 +08:00
Eloy Lafuente (stronk7) a30f0799e6 Merge branch 'MDL-68913-fix' of https://github.com/sarjona/moodle 2021-11-11 15:15:21 +01:00
Mikel Martín 68eb55b8e6 MDL-72565 reportbuilder: Add card view functionality
Use card view settings to show a 'card view' for custom reports in small devices
2021-11-11 13:55:32 +01:00
Mikel Martín eab63e82a1 MDL-72565 tablelib: Add modifications needed for report card view
- new 'set_columns_attributes' method created to add column attributes included in every column cell.
- new 'get_row_cells_html' method created from 'get_row_html', so it can be overriden individually.
2021-11-11 13:55:31 +01:00
Mikel Martín aaa7a5a445 MDL-72565 reportbuilder: Add 'Card view' settings to custom reports
- Create a new 'settings' column in reportbuilder_report table and provide an API to manage it
- Add new card view settings to custom reports
2021-11-11 13:55:29 +01:00
Mikel Martín f2582cc823 MDL-72565 reportbuilder: Use same template for system/custom reports
- rename 'system_report' template to 'report'
- view.php now uses 'report' template

Co-authored-by: Paul Holden <paulh@moodle.com>
2021-11-11 13:44:23 +01:00
Sara Arjona d650e65265 Merge branch 'MDL-71751-master' of https://github.com/nguyenphuctien/moodle 2021-11-11 12:44:25 +01:00
Sara Arjona 2ab697f627 Merge branch 'MDL-69561-master' of https://github.com/lameze/moodle 2021-11-11 12:42:09 +01:00
Sara Arjona f94f9f875d MDL-68913 mod_assign: fix behat failure & version number 2021-11-11 12:15:50 +01:00
Simey Lameze 89e59a60ef MDL-69561 mod: handle content download on course modules 2021-11-11 18:38:53 +08:00
Andrew Nicols 600b049def MDL-71751 js: Do not stop propagation on drop, and handle it properly 2021-11-11 15:52:35 +07:00
Ilya Tregubov 3da8ea4699 Merge branch 'MDL-71902-add-site-level-settings-enforcement-for-browsersecurity-settings' of https://github.com/keevan/moodle 2021-11-11 08:35:32 +02:00
Huong Nguyen 7d3d855193 MDL-73040 timeline: Update core_calendar_get_action_events_by_course API
This API now accepts an optional parameter 'searchvalue' to search the events
2021-11-11 12:26:40 +07:00
Jun Pataleta 8f9b534ed2 Merge branch 'MDL-72552' of https://github.com/spvickers/moodle 2021-11-11 11:42:14 +08:00
Andrew Nicols a1d7bfcd50 Merge branch 'MDL-73026-master' of https://github.com/junpataleta/moodle 2021-11-11 10:57:06 +08:00
Andrew Nicols fb7caf7982 MDL-68913 assign: Address coding style issues 2021-11-11 10:55:39 +08:00
Andrew Nicols 940097de9e Merge branch 'MDL-68913-master' of https://github.com/cameron1729/moodle 2021-11-11 10:49:05 +08:00
Shamim Rezaie d038fd822d Merge branch 'MDL-72952' of https://github.com/roland04/moodle 2021-11-11 10:38:26 +11:00
Kevin Pham 4141f88361 MDL-71902 mod_quiz: Add locked flag option for quiz options
- Applies locked settings to many other quiz general options.
  For example, allows an admin to lock the browsersecurity level so it
  cannot be changed at an instance level, and will apply the 'default'
  option (which is currently None).
2021-11-11 10:36:14 +11:00
Eloy Lafuente (stronk7) 2b18fad922 Merge branch 'MDL-72696' of https://github.com/paulholden/moodle 2021-11-10 19:20:39 +01:00
Mikel Martín 5a2624c472 MDL-72952 reportbuilder: UX behaviour improvements in audiences
- Show a toast notification when saving an audience
- Add form change checker when adding a new audience to prevent user from navigating away if it is not saved
- Remove expand/collapse animation in audience sidebar to be consistent with editor

Co-authored-By: Paul Holden <paulh@moodle.com>
2021-11-10 17:22:00 +01:00
Eloy Lafuente (stronk7) d824172077 Merge branch 'MDL-71912-master-v5' of git://github.com/abgreeve/moodle 2021-11-10 16:42:00 +01:00
Eloy Lafuente (stronk7) 0c9f92a317 Merge branch 'MDL-71956-master' of https://github.com/sarjona/moodle 2021-11-10 16:04:14 +01:00
Ilya Tregubov 8cbe01da89 Merge branch 'MDL-71115' of https://github.com/NeillM/moodle 2021-11-10 14:05:52 +02:00
Jun Pataleta 7f781d0b7e Merge branch 'MDL-72992-master' of git://github.com/cameron1729/moodle 2021-11-10 18:38:04 +08:00
Ilya Tregubov 1da9095ccb Merge branch 'MDL-73034-master' of git://github.com/ferranrecio/moodle 2021-11-10 11:45:04 +02:00
Neill Magill e86bc4921e MDL-71115 search: Only replace course search when equivalent
Not all global search configurations offer the same results as the
default course search does.

The default course search will return courses that the user can see
the details of even if they can see them via a category, even if
they are not enrolled and cannot enrol themselves on it.

The equivalent global search configuration is:

* Global search is enabled
* The course indexing is enabled
* All the name and summary of all courses are included in the results

This patch will only let global search replace the default course
search when those criteria are met.

It will also display on the global search configuration page if global
search will replace the legacy course search.
2021-11-10 09:11:19 +00:00
abgreeve e5b0be3192 MDL-71912 mod_book: Restore hastily removed editing setting. 2021-11-10 16:26:57 +08:00
abgreeve 7b935ca87b MDL-71912 behat: Assignment navigation related behat fixes. 2021-11-10 16:26:57 +08:00
abgreeve 05e6cdfd26 MDL-71912 mod_assign: Behat fixes for overrides. 2021-11-10 16:26:57 +08:00
abgreeve 85fded1a95 MDL-71912 mod_lesson: New step definitions for behat. 2021-11-10 16:26:56 +08:00
Shamim Rezaie 201f5034f9 Merge branch 'MDL-65799' of https://github.com/Chocolate-lightning/moodle 2021-11-10 18:35:34 +11:00
Mathew May bdffbe3e48 MDL-65799 enrol: Final deprecations 2021-11-10 15:22:43 +08:00
Mathew May 072311e9f4 MDL-65799 forum: Final deprecations 2021-11-10 15:22:43 +08:00
Mathew May 573c50bde8 MDL-65799 calendar: Final removal of constant 2021-11-10 15:14:05 +08:00
Mathew May b98d5c1614 MDL-65799 core: Final deprecation of 3.8 functions 2021-11-10 15:14:05 +08:00
Matt Porritt eaa1f56704 MDL-68913 Assign: Per attempt timing
This patch provides functionality to allow the
assign activity to have timed attempts for submissions.
It includes the logic, UI and adminstration changes
fot timed submissions.
2021-11-10 12:07:35 +08:00
Paul Holden 0d3f58db0a MDL-73007 output: trigger form changechecker when switching tabs.
Co-authored-by: Odei Alba <odeialba@gmail.com>
2021-11-09 17:20:23 +00:00
Juan Leyva 8bbdb41ab5 MDL-61671 tool_mobile: Improve certificate checks
Support different curl implementations and skip last certificate checks in some cases.
2021-11-09 17:05:48 +01:00
Sara Arjona e871e800f1 Merge branch 'MDL-71912' of https://github.com/stronk7/moodle 2021-11-09 17:01:24 +01:00
Sara Arjona 03af737f21 MDL-71956 filter_h5p: Display the edit content button
The H5P filter will display now the "Edit content" button if the
user can edit the file.
2021-11-09 16:47:19 +01:00
Sara Arjona eb4e36400e MDL-71956 core_h5p: Add more scenarios to can_edit_content
The method can_edit_content() now supports more scenarios where the
H5P content can be edited:
- Instead of supporting only mod_h5pactivity, now it supports any
mod or block when the user has the addinstance capability.
- If the component implements the can_edit_content method in the
h5p\canedit class and it returns true. For instance, the mod_forum
implements it and return true when filearea is post, if the user
can edit the post where the H5P is.
2021-11-09 16:47:18 +01:00
Eloy Lafuente (stronk7) 19576e54b3 MDL-71912 behat: Temporarily skip some troubled scenarios - js
That way we get everything else passing, because @skip_interim
scenarios are skipped by default. And can focus on the failing
ones apart.
2021-11-09 16:08:48 +01:00
Ilya Tregubov 90b40b99fd Merge branch 'MDL-73001-master' of https://github.com/dravek/moodle 2021-11-09 14:55:30 +02:00
Eloy Lafuente (stronk7) 11eb9f9465 MDL-71912 behat: Temporarily skip some troubled scenarios - nonjs
That way we get everything else passing, because @skip_interim
scenarios are skipped by default. And can focus on the failing
ones apart.
2021-11-09 12:47:34 +01:00
Ferran Recio b6a0b3a668 MDL-73034 js: add textarea and input check to dragdrop 2021-11-09 11:57:56 +01:00
Jake Dallimore c5a2e2db6c Merge branch 'MDL-71912-master-V4' of git://github.com/abgreeve/moodle 2021-11-09 11:47:55 +08:00
Sujith Haridasan 0b66b88bb2 MDL-71912 core: Fix behat tests for blocks
Fix the behat tests for blocks
2021-11-09 11:24:08 +08:00
Sujith Haridasan 4d2bfb38df MDL-71912 core_grading: Fix behat test
Fix behat test failure.
2021-11-09 11:24:08 +08:00
Mihail Geshoski d06da2d1a0 MDL-71912 core_grading: Update behat step definitions 2021-11-09 11:24:08 +08:00
Mihail Geshoski 93b3bf6ed3 MDL-71912 media_videojs: Update behat tests 2021-11-09 11:24:08 +08:00
Adrian Greeve 7520614e26 MDL-71912 course modules: Toggle heading depending on navigation.
If the secondary navigation is on then the activity header does
not need to be displayed twice.
2021-11-09 11:24:08 +08:00
Adrian Greeve c4c00f4e69 MDL-71912 mod_choice: Small alteration to show responses.
Depending on whether the secondary navigation is shown or not will
determine if the link to the responses is shown on the view.php
page.

Co-authored-by: Sujith Haridasan <sujith@moodle.com>
2021-11-09 11:24:08 +08:00
Adrian Greeve b72fa5fbae MDL-71912 behat: Updating various tests using assign steps. 2021-11-09 11:24:08 +08:00
abgreeve e75eb8481d MDL-71912 mod_assign: Updating the activity to use the actionmenu.
Co-authored-by: Sujith Haridasan <sujith@moodle.com>
2021-11-09 11:24:08 +08:00
abgreeve 1fa136a9b4 MDL-71912 mod_lesson: Add tertiary navigation to the lesson module.
Co-authored-by: Sujith Haridasan <sujith@moodle.com>
2021-11-09 11:24:08 +08:00
abgreeve 0c5e1bff21 MDL-71912 mod_book: Update book to implement the action menu.
Co-authored-by: Sujith Haridasan <sujith@moodle.com>
2021-11-09 11:24:08 +08:00
Jun Pataleta 76db9b294f Merge branch 'MDL-72896-master' of git://github.com/HuongNV13/moodle 2021-11-09 10:45:08 +08:00
Huong Nguyen ffca35b805 MDL-72896 Accessibility: Make html_table responsive
The tables are generated by html_table will responsive across viewports
2021-11-09 09:41:27 +07:00
AMOS bot 991070b213 Automatically generated installer lang files 2021-11-09 00:07:31 +00:00
Eloy Lafuente (stronk7) 553d56bca9 Merge branch 'MDL-73025-master' of https://github.com/dravek/moodle 2021-11-08 16:53:05 +01:00
Sara Arjona ecc7c74270 Merge branch 'MDL-72994-master' of https://github.com/lucaboesch/moodle 2021-11-08 16:37:56 +01:00
Sara Arjona 2a22d5b077 Merge branch 'MDL-72950' of https://github.com/stronk7/moodle 2021-11-08 15:33:46 +01:00
Jun Pataleta 2fcf41dcee MDL-73026 theme: Override Bootstrap modal styles for close button
* Adjust the margins to accommodate the button outline so that it
doesn't look clipped.
* Inherit the opacity when the button receives focus to improve the
focus outline's contrast.
2021-11-08 21:43:17 +08:00
Paul Holden 7a7375df4d MDL-72696 behat: support inplace editable fields of type select.
If an inplace editable field is using the "select" type, we should
treat it as a select field when setting it's value during scenarios.
2021-11-08 13:09:05 +00:00
David Matamoros aaa041a9bd MDL-73001 reportbuilder: Allow to set custom title to fullname columns 2021-11-08 13:54:41 +01:00
Sujith Haridasan 81b0d0533f MDL-72470 calendar: Add breadcrumbs to calendar page
Add breadcrumbs to the calendar page.
2021-11-08 16:53:39 +05:30
David Matamoros 26eddaf5a6 MDL-73025 core: Fix incorrect formatting for inplace editable title 2021-11-08 10:48:44 +01:00
Sara Arjona 87fc8810c2 Merge branch 'MDL-72980' of https://github.com/roland04/moodle 2021-11-08 10:02:04 +01:00
Sara Arjona 2a0c4a8a73 Merge branch 'MDL-72978-master' of https://github.com/dravek/moodle 2021-11-08 09:59:47 +01:00
Sara Arjona f2d2d7810b Merge branch 'MDL-72959' of https://github.com/paulholden/moodle 2021-11-08 08:57:04 +01:00
Andrew Nicols 97764798a4 Merge branch 'MDL-66776-master' of https://github.com/jleyva/moodle 2021-11-08 08:28:23 +08:00
Luca Bösch 8c66efebe9 MDL-72994 themes: Align Roles column in additional roles. 2021-11-06 00:00:07 +01:00
Eloy Lafuente (stronk7) 63b2bed3f0 MDL-72950 phpunit: Remove skipped tests now that the issue is fixed.
The problem (coincidence of contexts) was detected when running
oracle phpunit tests, so we skipped the tests as part of MDL-72743.

Now, with the problem fixed (previous commit), we can bring back
that test.
2021-11-05 18:52:18 +01:00
Eloy Lafuente (stronk7) c3a89cc550 MDL-72950 restore: Avoid qcat conflicts with matching contexts
Though it's really rare for this to happen (it only was discovered
when running unit tests with Oracle), it's possible to get
problems restoring courses when context ids in the backup file
do match existing contexts in the restore target site in certain
ways (see the issue for more information).

This change just ensures that every call to the method (that
happens 4 times, for sys, coursecat, course and module levels):

prechek_precheck_qbanks_by_level()

Is processed always for that level. Before the patch it was
possible (hardly but possible) to return question categories
belonging to another level when some qcats contexts were matching
between the backup file and the target site.
2021-11-05 18:52:18 +01:00
Ilya Tregubov d135a1200a on-demand release 4.0dev+ 2021-11-05 19:18:58 +02:00
Ilya Tregubov 8b55d318e3 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-11-05 19:18:54 +02:00
Safat Shahin 7ee798f679 MDL-72074 qbank_usage: Oracle phpunit issues resolve 2021-11-05 14:18:14 +02:00
Safat Shahin 8c004839c7 MDL-72074 qbank_usage: Behat issues resolve 2021-11-05 14:18:10 +02:00
Shamim Rezaie 96ca995d61 Merge branch 'MDL-70083-master' of git://github.com/jleyva/moodle 2021-11-05 19:20:26 +11:00
Juan Leyva 2d5ee7bf1a MDL-70083 message: Adapt tests to new number of default providers
We now have enough default providers, so no need to show a warning in that case
2021-11-05 08:51:26 +01:00
Huong Nguyen 48158134a0 MDL-71918 Calendar: Improve capability checks when fetching events 2021-11-05 13:15:01 +08:00
Jun Pataleta 9f4d3883fb Merge branch 'MDL-72667-master-fix' of https://github.com/lameze/moodle 2021-11-05 12:44:22 +08:00
Simey Lameze d3729ab664 MDL-72667 assign: change overdue message to darker red 2021-11-05 12:41:06 +08:00
Jun Pataleta d690997151 Merge branch 'MDL-72679-master' of git://github.com/HuongNV13/moodle 2021-11-05 12:40:50 +08:00
Andrew Nicols 750c04dd8f Merge branch 'MDL-72990-master' of https://github.com/rezaies/moodle 2021-11-05 11:50:30 +08:00
Shamim Rezaie 46d744c34a Merge branch 'MDL-70083-master' of git://github.com/jleyva/moodle 2021-11-05 14:37:44 +11:00
Andrew Nicols 924d538235 MDL-71439 core_grade: Coding style tidyup 2021-11-05 11:32:24 +08:00
Andrew Nicols 69ec4376c7 Merge branch 'MDL-71439_master' of https://github.com/mdjnelson/moodle 2021-11-05 11:32:16 +08:00
Jun Pataleta 4ed7cf0cd6 Merge branch 'MDL-72688-master' of git://github.com/rezaies/moodle 2021-11-05 11:23:22 +08:00
Víctor Déniz eafd9a19c7 Merge branch 'MDL-72945-master' of git://github.com/sarjona/moodle 2021-11-05 01:46:09 +00:00
Shamim Rezaie 399b2d4772 MDL-72688 contentbank: Some accessibility improvements described below
- Label the table/list with aria-label
- Hide sort buttons from screen-readers and use aria-sort instead
- Remove the redundant title from decorative thumbnails
2021-11-05 12:45:27 +11:00
Víctor Déniz e6cd902af8 Merge branch 'MDL-72969' of https://github.com/paulholden/moodle 2021-11-05 01:18:06 +00:00
AMOS bot 9323d6a9e2 Automatically generated installer lang files 2021-11-05 00:07:28 +00:00
Víctor Déniz 6c920c9f56 Merge branch 'MDL-72995-master' of https://github.com/ilyatregubov/moodle 2021-11-04 23:42:31 +00:00
Víctor Déniz 053dc587db Merge branch 'MDL-72920-master' of git://github.com/bmbrands/moodle 2021-11-04 23:08:25 +00:00
Eloy Lafuente (stronk7) 37fa747b30 Merge branch 'MDL-72968' of https://github.com/paulholden/moodle 2021-11-04 17:33:38 +01:00
Jun Pataleta 3b64e3e185 MDL-72667 theme: Fix moodle.css 2021-11-04 22:24:31 +08:00
Ilya Tregubov 73863ef3d9 Merge branch 'master_MDL-72074-usage' of https://github.com/catalyst/moodle-MDL-70329 2021-11-04 16:12:35 +02:00
Jun Pataleta 9556114475 Merge branch 'MDL-72667-master' of https://github.com/lameze/moodle 2021-11-04 22:05:37 +08:00
Safat Shahin 8f06aa01dc MDL-72074 qbank_usage: Add usage plugin to core
This implementation will introduce the usage plugin
which shows qhich quizes are using this question,
number of attmpts and other information.

Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
2021-11-05 00:36:36 +11:00
Simey Lameze 1eed73fc4b MDL-72667 message: fix contrast issue in the drawer 2021-11-04 21:01:56 +08:00
Simey Lameze fa080070a1 MDL-72667 notifications: improve colour contrast 2021-11-04 21:01:55 +08:00
Simey Lameze 91f5136363 MDL-72667 lesson: improve colour contrast of correct text 2021-11-04 21:01:55 +08:00
Simey Lameze 217d5c4183 MDL-72667 assign: improve contrast of not graded text 2021-11-04 21:01:55 +08:00
Ilya Tregubov 6b0b757124 Merge branch 'MDL-72961' of https://github.com/paulholden/moodle 2021-11-04 14:40:26 +02:00
Eloy Lafuente (stronk7) 7faf678b59 Merge branch 'MDL-72987' of https://github.com/paulholden/moodle 2021-11-04 12:52:38 +01:00
Ilya Tregubov b433583bc3 Merge branch 'MDL-71761' of https://github.com/timhunt/moodle 2021-11-04 13:38:34 +02:00
Sara Arjona 61fef90a74 Merge branch 'MDL-72962' of git://github.com/paulholden/moodle 2021-11-04 12:30:27 +01:00
Juan Leyva 6f0f979ae3 MDL-70083 message: Updated content notification task 2021-11-04 12:23:21 +01:00
Jun Pataleta 32be3853c3 Merge branch 'MDL-72672-master' of https://github.com/junpataleta/moodle 2021-11-04 18:21:46 +08:00
Juan Leyva 39d96944eb MDL-66776 notifications: New login session notification 2021-11-04 11:18:00 +01:00
Ilya Tregubov ac93013cd1 MDL-72995 core_course: Revert "MDL-55231: Partial course cache rebuild"
This reverts commits c1468388bc,
c1468388bc and
9a900492bc.
2021-11-04 11:57:58 +02:00
Sara Arjona 46ca6aa90e Merge branch 'MDL-72949-master' of https://github.com/NashTechOpenUniversity/moodle 2021-11-04 10:33:22 +01:00
Bas Brands 9ded7b06dc MDL-72920 core_renderer: do not show debug footer during install 2021-11-04 09:48:02 +01:00
Simey Lameze 9fe207211d MDL-72672 lesson: make edit collapsed table responsive 2021-11-04 16:18:35 +08:00
Simey Lameze 8889c69a38 MDL-72672 lesson: make detailed stats table responsive 2021-11-04 16:18:35 +08:00
Simey Lameze 575b22bcfc MDL-72672 lesson: make attempts table responsive 2021-11-04 16:18:35 +08:00
Simey Lameze e2649db6c4 MDL-72672 lesson: add label for true/false checkboxes 2021-11-04 16:18:35 +08:00
Simey Lameze f540540b9e MDL-72672 lesson: add label for multichoice checkboxes 2021-11-04 16:18:35 +08:00
Simey Lameze 1662fa085e MDL-72672 lesson: remove unnecessary nowrap
This commit also remove some deprecated table properties as well.
2021-11-04 16:18:35 +08:00
Simey Lameze f7f15b93e4 MDL-72672 mod_lesson: add aria-label to actions select element 2021-11-04 16:18:35 +08:00
Sara Arjona 8f78381d12 Merge branch 'MDL-72236-master' of https://github.com/inkjet2000/moodle 2021-11-04 08:50:25 +01:00
Cameron Ball b691e7b434 MDL-72992 assign: Allow gradebook to override feedback when empty 2021-11-04 15:46:17 +08:00
Nathan Nguyen dfe28d6781 MDL-72679 qtype_ddmarker: Fix incorrect positions in multiple viewportss
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2021-11-04 14:35:31 +07:00
Shamim Rezaie 0063ed3e76 MDL-72688 contentbank: Add and maintain appropriate aria roles
Also moved header text into the sorting button as per the example at
https://dequeuniversity.com/library/aria/table-sortable
2021-11-04 15:12:18 +11:00
Jun Pataleta 825b276b1a Merge branch 'MDL-72668-master' of git://github.com/rezaies/moodle 2021-11-04 12:03:42 +08:00
Shamim Rezaie c6cd47a82d MDL-72990 badges: Use imagecaption as alternative text for badge image 2021-11-04 14:45:19 +11:00
Shamim Rezaie 86ed2e7e40 MDL-72668 block_badges: Add alt attribute to badge images 2021-11-04 13:54:02 +11:00
Shamim Rezaie b5c5455573 MDL-72668 core: Highlight the focused tree item in a tree. 2021-11-04 13:48:06 +11:00
Shamim Rezaie ae2b100f55 MDL-72668 block_private_files: Switched from YUI to core/tree AMD 2021-11-04 13:48:06 +11:00
Víctor Déniz 234b9468e6 Merge branch 'MDL-72895-master' of https://github.com/HuongNV13/moodle 2021-11-04 01:53:29 +00:00
Eloy Lafuente (stronk7) 9e40598409 Merge branch 'MDL-72960' of https://github.com/paulholden/moodle 2021-11-03 19:09:11 +01:00
Eloy Lafuente (stronk7) 3873af5626 Merge branch 'MDL-72655-master' of https://github.com/andelacruz/moodle 2021-11-03 19:03:22 +01:00
Eloy Lafuente (stronk7) c11096576a Merge branch 'MDL-72619-master' of https://github.com/sammarshallou/moodle 2021-11-03 18:15:28 +01:00
Justin Merrill bb8ad90938 MDL-72236 forum: index restructure on table forum_read 2021-11-03 12:45:41 -04:00
Paul Holden faddd24a13 MDL-70823 qtype_ddwtos: new method for safer feedback unserializing. 2021-11-03 16:57:06 +01:00
Paul Holden b0cb1b8cea MDL-70823 mod: safely parse module display options array. 2021-11-03 16:57:06 +01:00
Paul Holden 58e8ad852f MDL-70823 blocks: safer unserializing during block restore. 2021-11-03 16:57:06 +01:00
Paul Holden e22fded5fe MDL-70823 core: safer alternative for unserializing objects. 2021-11-03 16:57:06 +01:00
Paul Holden 3191443f47 MDL-72987 reportbuilder: reset manager cache between Behat tests. 2021-11-03 15:31:08 +00:00
Juan Leyva 714b482cba MDL-70083 message: New message provider "coursecontentupdated" 2021-11-03 15:06:50 +01:00
Sara Arjona bc3890b60d Merge branch 'MDL-72603-master' of git://github.com/HuongNV13/moodle 2021-11-03 12:18:19 +01:00
sangnguyena 85e7f767ef MDL-72949 WS: Return coursegraceperiod setting in tool_mobile_get_config 2021-11-03 16:14:25 +07:00
Ilya Tregubov 498d6edd18 Merge branch 'master-MDL-72953' of https://github.com/golenkovm/moodle 2021-11-03 10:32:28 +02:00
Andrew Nicols d3ad2477cc MDL-72894 courseexport: Whitespace fix 2021-11-03 16:10:52 +08:00
Andrew Nicols 9b72750cee Merge branch 'MDL-72894' of https://github.com/paulholden/moodle 2021-11-03 16:10:49 +08:00
Sara Arjona 6f7e587f32 Merge branch 'MDL-72977-master' of https://github.com/juancs/moodle 2021-11-03 09:03:59 +01:00
Ilya Tregubov 0148708d3c Merge branch 'MDL-71872-master' of https://github.com/HuongNV13/moodle 2021-11-03 09:25:27 +02:00
Shamim Rezaie d11e20a523 Merge branch 'MDL-72963-master' of git://github.com/ferranrecio/moodle 2021-11-03 18:14:03 +11:00
Andrew Nicols 9b32fb1b5e Merge branch 'MDL-72569-master' of https://github.com/ferranrecio/moodle 2021-11-03 14:47:51 +08:00
Andrew Nicols c166d9d269 Merge branch 'master_MDL-72075-statistics' of https://github.com/catalyst/moodle-MDL-70329 2021-11-03 14:33:47 +08:00
Jun Pataleta 011636be62 Merge branch 'MDL-72687-master' of git://github.com/lameze/moodle 2021-11-03 11:57:10 +08:00
Angelia Dela Cruz 89c4c803e8 MDL-72655 behat: Use assign generators
Replace steps that manually add assignment instances via the UI
and use Behat generators. This improves the speed of Behat test
runs.
2021-11-03 11:34:26 +08:00
Nathan Nguyen 2fcc93981f MDL-72075 qbank_statistics: fix coding style 2021-11-03 14:27:27 +11:00
Mikhail Golenkov d9b82d96e1 MDL-72953 core_lang: Add string for new timezone Pacific/Kanton 2021-11-03 11:22:26 +11:00
AMOS bot 2e68262c20 Automatically generated installer lang files 2021-11-03 00:07:30 +00:00
Paul Holden 20d41ebae4 MDL-72370 badges: require sesskey to remove related badge. 2021-11-02 18:04:16 +01:00
Ilya Tregubov a9256af7f9 MDL-70887 mlbackend_python: Update to latest version. 2021-11-02 18:04:16 +01:00
Simey Lameze 940f20fde9 MDL-72571 tool_filetypes: change extension param to PARAM_ALPHANUMEXT 2021-11-02 18:04:16 +01:00
Sara Arjona 32e7e6fa37 Merge branch 'MDL-72857' of https://github.com/paulholden/moodle 2021-11-02 18:00:40 +01:00
Paul Holden c7a7a54495 MDL-72959 reportbuilder: format course/category names in entities. 2021-11-02 16:21:45 +00:00
Paul Holden 628fcdee55 MDL-72962 reportbuilder: format editable element names for output. 2021-11-02 15:43:07 +00:00
David Matamoros 741f47ea7a MDL-72978 reportbuilder: Report name can't have only blank spaces
- Don't allow to set a report name containing only blank spaces when
creating a new report or editing an existing report name.
- Removed TODO from code related to MDL-71086
2021-11-02 16:27:20 +01:00
Ferran Recio 461226ed27 MDL-72569 core_courseformat: aria-tree to move tool 2021-11-02 16:00:12 +01:00
Mikel Martín c788d4b486 MDL-72980 reportbuilder: Fix inputs overflows outside filters container
Select inputs with long select options overflows outside the filters container.
Fix this behaviour avoiding it in SCSS.
2021-11-02 15:32:19 +01:00
Eloy Lafuente (stronk7) 8af7bec81e on-demand release 4.0dev+ 2021-11-02 14:08:44 +01:00
Eloy Lafuente (stronk7) 79a9748f85 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-11-02 14:08:39 +01:00
Juan Segarra Montesinos 177e6553ac MDL-72977 qtype_essay: Honor Information for graders text format. 2021-11-02 11:49:06 +01:00
Ferran Recio da0296a948 MDL-72963 core: fix inplace editable in draggable elements 2021-11-02 11:45:03 +01:00
Simey Lameze 94f1483628 MDL-72687 assign: move labels for toggle zoom icons to the <a> 2021-11-02 11:53:56 +08:00
Simey Lameze 788f5c1778 MDL-72687 assign: move labels for collapse buttons to the button 2021-11-02 11:53:56 +08:00
Simey Lameze a47380719c MDL-72687 assign: remove title attr from view all submissions link 2021-11-02 11:53:56 +08:00
Simey Lameze f09cf2a354 MDL-72687 assign: move label from the edit settings icon to <a> 2021-11-02 11:53:56 +08:00
Simey Lameze 6b74ff2024 MDL-72687 assign: remove presentation role from profile image 2021-11-02 11:53:56 +08:00
Simey Lameze bffb40dff1 MDL-72687 assign: fix email and due date cut off whem zooming 2021-11-02 11:53:56 +08:00
Simey Lameze 43df3c3f57 MDL-72687 assign: fix colour picker broken aria menu 2021-11-02 11:53:56 +08:00
Simey Lameze e1fdd3f701 MDL-72687 assign: fix stamp picker broken aria menu 2021-11-02 11:53:56 +08:00
Simey Lameze 62e5a4d19d MDL-72687 assign: fix change filter element tab navigation 2021-11-02 11:53:56 +08:00
Simey Lameze 9252b53b6e MDL-72687 assign: use correct aria role for toolbar 2021-11-02 11:53:56 +08:00
Simey Lameze f1966bbb50 MDL-72687 assign: add missing label to change user element 2021-11-02 11:53:54 +08:00
Simey Lameze 8a307da415 MDL-72687 assign: display a more friendly link when not graded 2021-11-02 11:52:40 +08:00
Andrew Nicols ad7a38872d Merge branch 'MDL-72884' of git://github.com/paulholden/moodle 2021-11-02 11:33:53 +08:00
Simey Lameze 473c1cfc49 MDL-72687 assign: add missing aria-label to prev/next arrows 2021-11-02 11:28:35 +08:00
Andrew Nicols b4fbfb5eb1 Merge branch 'MDL-72767' of https://github.com/NeillM/moodle 2021-11-02 11:27:09 +08:00
Simey Lameze 6c515b820b MDL-72687 form: only add legend tag if a label is set 2021-11-02 11:19:24 +08:00
AMOS bot 8a09e3ee36 Automatically generated installer lang files 2021-11-02 00:07:29 +00:00
Eloy Lafuente (stronk7) c1a43e84f0 Merge branch 'MDL-72938-master' of git://github.com/ferranrecio/moodle 2021-11-01 23:06:11 +01:00
Eloy Lafuente (stronk7) 12795aa4b1 Merge branch 'MDL-72850' of https://github.com/paulholden/moodle 2021-11-01 22:58:09 +01:00
Paul Holden f328882175 MDL-72969 output: correct ansi colour format codes for check results. 2021-11-01 17:06:22 +00:00
Paul Holden d7e10c3dd1 MDL-72968 reportbuilder: breadcrumb navigation for edit/view report. 2021-11-01 16:00:16 +00:00
Paul Holden cac0068d88 MDL-72961 reportbuilder: move category elements to correct entity. 2021-11-01 15:44:14 +00:00
Paul Holden 677c2df9d6 MDL-72961 reportbuilder: more defensive usage of report elements.
We should gracefully handle invalid element models that refer to
columns, filters, conditions that are no longer defined within the
report/entity they are linked to.
2021-11-01 14:24:27 +00:00
Paul Holden 7071e4dfd4 MDL-72172 reportbuilder: fix cohort report source tests.
Choose aggregation method that has availability across all
supported databases; and allows sorting.

"Comma separated distinct values" doesn't fulfill either of
these criteria.
2021-11-01 15:42:35 +02:00
Jun Pataleta 440799b641 Merge branch 'MDL-72588-fix' of git://github.com/paulholden/moodle 2021-11-01 19:51:07 +08:00
Paul Holden 31ba06b837 MDL-72588 reportbuilder: fix expected exception message in tests.
See change to exception strings in 07b74820.
2021-11-01 11:21:07 +00:00
Paul Holden 374114e0f8 MDL-72857 badges: filter site/course name when showing issued badge. 2021-11-01 10:43:10 +00:00
Huong Nguyen eef7ecf914 MDL-71872 Questions: The placeholder disappears when double-clicking 2021-11-01 17:26:42 +07:00
Paul Holden f4c8daa479 MDL-72850 search: show role alias in "Teacher roles" configuration. 2021-11-01 10:15:14 +00:00
Neill Magill 653af355dc MDL-72767 forum: Stop duplicate digests being created
This change is to stop there being a possibility of 2 digests tasks
being created for a user on the day that MDL-72767 is applied.
2021-11-01 08:49:47 +00:00
Neill Magill 42171eb435 MDL-72767 forum: Ensure digests are sent
Before this change if a new post was made after the digest time but
before todays daily digest had been sent the run time on the digest
would be set to the next day resulting in no digest being sent to
the user.

By adding the server midnight to the custom data on the task we
ensure that in this case a new adhoc task is created for the next
day leaving the current one to get processed.

Server midnight is used so that if the digest time setting is
changed we would not get two tasks queued for the same day.
2021-11-01 08:49:46 +00:00
Neill Magill 7c8942046a MDL-72767 forum: Fix PHPDoc 2021-11-01 08:49:46 +00:00
Paul Holden 8f27f246a5 MDL-72960 reportbuilder: unique delimeters between concat'd fields.
Use delimeters that are less likely to conflict with genuine row
content, for both column fields and field values, in the group
concatenation aggregation methods.
2021-11-01 08:03:59 +00:00
Ilya Tregubov 03eca63387 Merge branch 'MDL-72736-master-v3' of git://github.com/peterRd/moodle 2021-11-01 08:19:24 +01:00
Peter Dias d632240ac4 MDL-72736 course: Switch tests to classic only 2021-11-01 15:17:00 +08:00
Ilya Tregubov 2b45c78426 Merge branch 'MDL-72172-master' of git://github.com/dravek/moodle 2021-11-01 07:26:34 +01:00
Jun Pataleta 6f7defeeb6 Merge branch 'MDL-72588' of git://github.com/dravek/moodle 2021-11-01 11:22:48 +08:00
Peter Dias 0f20d7bba9 MDL-72736 course: Remove nav links if index is available 2021-11-01 08:28:07 +08:00
Andrew Nicols 3535fcca7a Merge branch 'MDL-72921' of https://github.com/stronk7/moodle 2021-11-01 07:18:34 +08:00
Andrew Nicols 2c32a5f8d8 Merge branch 'MDL-72660-master' of git://github.com/ferranrecio/moodle 2021-11-01 06:50:51 +08:00
AMOS bot f89d8cd993 Automatically generated installer lang files 2021-10-30 00:07:29 +00:00
Eloy Lafuente (stronk7) b5c6ce0d7f MDL-72921 generators: exported users now match the plan size definition
Before this patch the exported users (to csv file that jmeter consumes)
were all the enrolled users in the test course. And that's ok when the
number of users enrolled match the number of concurrent threads planned
for a jmeter plan (each thread is a user).

But when both numbers don't match, that can lead to the jmeter plan
not behaving as expected, because it iterates over the excessive users
in the file, leading to some users having run 5 loops, others 4...

The only way to make results more consistent is to, always, ensure that
the number of users exported for the plan match the plan size and not
the site size.

And that's what this issue exactly does, restrict the export to the
number of threads that the plan will have. So every user always runs
the very same number of loops.
2021-10-29 18:03:39 +02:00
Eloy Lafuente (stronk7) b16fc54103 on-demand release 4.0dev+ 2021-10-29 17:16:34 +02:00
Eloy Lafuente (stronk7) c05e63bf5f Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-10-29 17:16:29 +02:00
Ilya Tregubov 0a34a151c9 Merge branch 'MDL-72743' of git://github.com/stronk7/moodle 2021-10-29 13:57:58 +02:00
Eloy Lafuente (stronk7) a23cc25ccd MDL-72743 phpunit: Skip test until MDL-72950 is fixed
It's good to keep the test because it's not easy to
reproduce the issue to be fixed. Part of the fix will
be to remove this skip.
2021-10-29 13:36:36 +02:00
Paul Holden 0188af39a1 MDL-72588 reportbuilder: performance improvement to report loader.
Statically cache list of loaded reports during request lifecycle,
this ensures that computationally heavy initialisation routines
in system reports are only executed once (e.g. the access tab).
2021-10-29 12:50:20 +02:00
Paul Holden 42481d5c43 MDL-72588 reportbuilder: fix dynamic loading of report parameters.
This fixes an issue for system reports that are initialised with
parameters (such as the access report). Previously these parameters
were not preserved, when sorting/paging them via AJAX requests.

We now defer the initialisation of the report until the table
filterset has been set, ensuring all parameters are available.
2021-10-29 12:50:20 +02:00
David Matamoros 8a1e7d913f MDL-72588 reportbuilder: add report access tab.
This tab includes a system report that provides a listing of all
users who can access the report, taking into account all audiences
that have been created for it. Update page of users available
reports to obey audience configuration.

Fix filters JS form to ensure it is only loaded once.

Co-authored-by: Mikel Martín <mikel@moodle.com>
2021-10-29 12:50:20 +02:00
Mikel Martín 144084a2ac MDL-72588 reportbuilder: interface for managing report audiences.
Add new tab to editor, allowing user to select from available audience
types in order to grant access to their reports.

Co-authored-by: David Matamoros <davidmc@moodle.com>
2021-10-29 12:50:15 +02:00
David Matamoros 70085ef7ac MDL-72588 reportbuilder: implement audience helpers and classes.
Create the base audience class, to be extended by all audience types
across the site. Implement types allowing audiences to be created per
user, cohort or system role assignment.

The helper class is used for interrogating report audience instances
and retrieving access lists of those users able to view specific
reports.

Co-authored-by: Paul Holden <paulh@moodle.com>
2021-10-29 12:28:24 +02:00
Ferran Recio 41487c38ed MDL-72660 core_courseformat: course index completion icons 2021-10-29 11:49:45 +02:00
Andrew Nicols d2d9d6087d MDL-72615 boxnet: Correct upgrade step for boxnet removal 2021-10-29 15:00:58 +08:00
Andrew Nicols f764fa8e62 Merge branch 'MDL-72433-master' of git://github.com/peterRd/moodle 2021-10-29 11:27:39 +08:00
Andrew Nicols 415c771768 Merge branch 'MDL-52484-master' of git://github.com/peterRd/moodle 2021-10-29 11:22:20 +08:00
Andrew Nicols a9eeca8c05 Merge branch 'MDL-72615-master' of git://github.com/cescobedo/moodle 2021-10-29 11:17:29 +08:00
Huong Nguyen 1e932d475c MDL-72895 Assignment: Fix colour contrast for grading navigation 2021-10-29 09:58:04 +07:00
Andrew Nicols 73ca68d3d5 Merge branch 'MDL-72779' of https://github.com/paulholden/moodle 2021-10-29 10:16:56 +08:00
Eloy Lafuente (stronk7) ba1c3c0b88 Merge branch 'MDL-72781-master' of git://github.com/mickhawkins/moodle 2021-10-28 22:26:59 +02:00
Eloy Lafuente (stronk7) 440fac33bb Merge branch 'MDL-72843-qbank_comment-unit-testsuite-resolve' of https://github.com/catalyst/moodle-MDL-70329 2021-10-28 22:12:11 +02:00
Shamim Rezaie 18fb0358f3 Merge branch 'MDL-72874-master' of git://github.com/andrewnicols/moodle 2021-10-29 03:34:19 +11:00
Víctor Déniz 4c34afebae Merge branch 'MDL-71779-master' of git://github.com/ferranrecio/moodle 2021-10-28 17:08:16 +01:00
Shamim Rezaie e852342d39 Merge branch 'MDL-72924-fix-component-initialisation-for-performance-checks' of https://github.com/keevan/moodle 2021-10-29 02:56:27 +11:00
Sara Arjona 4816fec3fa MDL-72945 badges: use default issuer contact
The defaultissuercontact was ignored if the sitebackpack email was set
to empty string..
2021-10-28 17:43:49 +02:00
Víctor Déniz 307c4b9d20 Merge branch 'MDL-72912' of https://github.com/timhunt/moodle 2021-10-28 15:43:57 +01:00
Ferran Recio 3d2a6eacae MDL-71779 core_courseformat: reactive add and delete sections 2021-10-28 16:41:17 +02:00
Eloy Lafuente (stronk7) 3efac737fe Merge branch 'MDL-63983' of https://github.com/NeillM/moodle 2021-10-28 16:23:15 +02:00
Ilya Tregubov a9d44b0f75 Merge branch 'MDL-72801' of https://github.com/paulholden/moodle 2021-10-28 15:44:54 +02:00
Shamim Rezaie 674ce41ffe Merge branch 'MDL-71086' of https://github.com/paulholden/moodle 2021-10-29 00:10:24 +11:00
Ilya Tregubov 2f5565af80 Merge branch 'MDL-72098-master' of git://github.com/peterRd/moodle 2021-10-28 15:07:12 +02:00
Víctor Déniz a826682819 Merge branch 'MDL-72901' of https://github.com/timhunt/moodle 2021-10-28 13:48:10 +01:00
Víctor Déniz 45029a10e2 Merge branch 'MDL-72806' of https://github.com/paulholden/moodle 2021-10-28 13:05:37 +01:00
Ilya Tregubov de8a4af190 Merge branch 'MDL-72670-master' of git://github.com/cameron1729/moodle 2021-10-28 13:14:05 +02:00
Eloy Lafuente (stronk7) a02a5cb90a MDL-72743 tests: tidy up the new test with NS/name/covers
Ideally any new test should be using a class name matching
the file name, and to use namespace when clearly belonging to
a component (sub-namespace also allowed for better accuracy).

And, also, adding a @covers label to indicate which class
(preferred, method is also possible) is being covered with the test.
2021-10-28 12:56:00 +02:00
Eloy Lafuente (stronk7) 49fc1fa292 Merge branch 'MDL-72743' of git://github.com/paulholden/moodle 2021-10-28 12:50:01 +02:00
Ferran Recio cf045f4b1c MDL-72938 core_courseformat: fix section title with 2021-10-28 12:27:10 +02:00
Eloy Lafuente (stronk7) e2f119e390 Merge branch 'MDL-72616-master' of git://github.com/cescobedo/moodle 2021-10-28 12:25:47 +02:00
Neill Magill a8d9b17b4b MDL-63983 messaging: Improve the performance of non-contact searches
When the messagingallusers setting is disabled only contacts that are
on the same course as the user should be returned as results.

We can reduce the number of candidate users significantly by
pre-filtering them by being enrolled on the same courses as the user
performing the search.

Since we must also return the user themselves sometimes, even when they
are not enrolled on a course I used a UNION as the most efficient way of
retriving them, this meant that the order by had to reference returned
columns by number to be sufficiently cross-database compatiable.
2021-10-28 10:56:38 +01:00
Andrew Nicols 54b4418596 Merge branch 'MDL-72871' of https://github.com/stronk7/moodle 2021-10-28 14:51:34 +08:00
Jun Pataleta 4d10196dec Merge branch 'MDL-72316-master-2' of git://github.com/mickhawkins/moodle 2021-10-28 14:51:34 +08:00
Andrew Nicols 00483c9419 MDL-72827 quiz: Remove pause step from behat scenario 2021-10-28 14:51:34 +08:00
Michael Hawkins 2a2ece647a MDL-72316 filelib: Add ability for modules to directly load SVG images
This also implements the functionality for SCORM packages, which may
have SVG images embedded within their content which require loading
directly (and are only created by users with appropriate risk flag).
2021-10-28 12:56:52 +08:00
Andrew Nicols f80a31b8b6 Merge branch 'MDL-72827-master' of git://github.com/peterRd/moodle 2021-10-28 11:51:29 +08:00
Peter Dias 44d06f8218 MDL-72827 quiz: Expand completion behat tests
- Update the behat tests to more precisely check the state in the completion report.
- Check combination of completion conditions with passing grade
2021-10-28 11:38:10 +08:00
Peter Dias cb2afc668d MDL-72827 completion: Revert completion flow logic
- Reverts the custom flow logic introduced in the 52206
- Expand unit tests to cover different grade based completion settings
2021-10-28 11:38:10 +08:00
Huong Nguyen c2979ff1cc MDL-72603 timeline: Lazy loading for timeline block
Replace timeline block pagination with "Show more activities" lazy loading
2021-10-28 09:12:14 +07:00
Andrew Nicols 88d5175d41 MDL-72263 theme: Adjust parameters for focusing close button 2021-10-28 08:51:16 +08:00
Andrew Nicols 62f1e0540e Merge branch 'MDL-72263-master-v02' of git://github.com/ferranrecio/moodle 2021-10-28 08:51:09 +08:00
Eloy Lafuente (stronk7) 4f271297ce Merge branch 'MDL-72879-master-enfix' of git://github.com/mudrd8mz/moodle 2021-10-27 22:12:11 +02:00
Jun Pataleta 369983e713 Merge branch 'MDL-72652-master' of git://github.com/mihailges/moodle 2021-10-27 22:28:21 +08:00
Eloy Lafuente (stronk7) 51b45f0c71 Merge branch 'MDL-55231-patch' of git://github.com/ilyatregubov/moodle 2021-10-27 15:22:32 +02:00
Ilya Tregubov c1468388bc MDL-55231 core_course: Fix behat tests. 2021-10-27 13:25:58 +02:00
Ferran Recio 59128bb411 MDL-72263 courseformat: adding core/tree to course index 2021-10-27 10:54:56 +02:00
Mikel Martín 9113f9d2f9 MDL-72588 reportbuilder: convert editing interface into a tab.
In preparation for further tabs in this interface, convert the report
editor to use the Dynamic tabs API.

At the same time, update the editor JS and it's modules to add listeners
on `document` instead of the report element itself, which will move in
and out of the current DOM in the future as tabs are switched.

Co-authored-by: Paul Holden <paulh@moodle.com>
2021-10-27 10:05:53 +02:00
David Matamoros b2dd94ab8b MDL-72588 reportbuilder: define schema/models for report audiences. 2021-10-27 10:05:44 +02:00
Jun Pataleta 472bdb44f3 Merge branch 'MDL-72669-master' of git://github.com/rezaies/moodle 2021-10-27 15:07:32 +08:00
Ilya Tregubov a704f137cf Merge branch 'MDL-55231-master' of https://github.com/dcai/moodle 2021-10-27 08:46:41 +02:00
David Mudrák 53bb0947b6 MDL-72879 lang: Use fixed strings in tests, too 2021-10-27 07:37:03 +02:00
Kevin Pham 086878c541 MDL-72924 check: Fix component initialisation for performance checks 2021-10-27 16:17:04 +11:00
cescobedo 0a5d387398 MDL-72615 core: Remove boxnet portfolio and repository 2021-10-27 06:24:55 +02:00
cescobedo 3c6ad8ac09 MDL-72616 blocks: Remove block_quiz_results 2021-10-27 06:23:04 +02:00
Mark Nelson 7bf0b6ab51 MDL-71439 core_grades: return a blank mustache template for letters 2021-10-27 12:19:31 +08:00
Mark Nelson 2621d36782 MDL-71439 mod_forum: display user grade from web service 2021-10-27 12:19:31 +08:00
Mark Nelson 4eecb896a2 MDL-71439 core_grades: return result of new method in web services 2021-10-27 12:19:31 +08:00
Mark Nelson 85eda546b3 MDL-71439 core_grades: add new method 'get_formatted_grade_for_user' 2021-10-27 12:19:31 +08:00
Mark Nelson 581bc8d6b4 MDL-71439 core_grades: fixed undefined class issues 2021-10-27 12:19:31 +08:00
Mark Nelson 2e1c282ef6 MDL-71439 core_grades: remove returning null when not possible
The method explicitly declares 'stdClass' as the return type.
2021-10-27 12:19:31 +08:00
Jake Dallimore 6266b198ed Merge branch 'MDL-71914-master-v3' of git://github.com/peterRd/moodle 2021-10-27 10:39:09 +08:00
Shamim Rezaie 4d705b52b1 Merge branch 'MDL-72385-master' of git://github.com/HuongNV13/moodle 2021-10-27 12:44:24 +11:00
Nathan Nguyen 341e3079fc MDL-72075 qbank_statistics: Add question statistics to core
This implementation will add the statistics plugin to core.
Statistics plugin shows the overall report for a question using
a couple columns in the base view.
2021-10-27 12:35:02 +11:00
Peter Dias 7791553bd9 MDL-71914 feedback: Unit tests for the dynamic forms 2021-10-27 09:33:20 +08:00
AMOS bot 4b1a4eb537 Automatically generated installer lang files 2021-10-27 00:07:29 +00:00
Helen Foster 07b7482063 MDL-72879 lang: Import fixed English strings (en_fix) 2021-10-26 21:05:10 +02:00
Eloy Lafuente (stronk7) fdc2dcf264 MDL-72871 cleanup: Remove incorrect whitespace from codebase
Differences can be checked with git diff --ignore-all-space and
that will show that the only non-whitespace change is in a test
in the git lib/tests/html2text_test.php file. In that case the
whitespace has been replaced by a quoted string (of whitespaces)
keeping the test 100% equivalent and workarrounding the whitespace.
2021-10-26 17:19:11 +02:00
Stephen Vickers 6fa817db27 MDL-72552 mod_lti: Add context_memberships_v2_url custom parameter 2021-10-26 15:47:45 +01:00
Ilya Tregubov 92fa7e150a Merge branch 'MDL-69723-master' of https://github.com/martygilbert/moodle 2021-10-26 16:32:52 +02:00
Marty 424fecb7b0 MDL-69723 assign: Add # need grading to summary
For teachers viewing the assignment summary (/mod/assign/index.php),
it shows a '-' in the 'Grade' column. Instead of showing a '-', display
the number of items that need grading.

Augment by creating a link to the grading page so that teachers can see
the outstanding assignments more quickly.

Also attempted to write phpunit tests that verify values for ungraded
submissions for teachers.
2021-10-26 09:58:02 -04:00
Paul Holden bbf95413fb MDL-72172 cohort: implement cohort datasource for custom reporting.
Create two entities exposing reportable data on site cohorts and
their members, via column and filter definitions.

Create report source bringing them together along with the user
entity to provide data for the reportbuilder editor.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2021-10-26 15:36:36 +02:00
Ilya Tregubov ff33ad50f3 Merge branch 'MDL-72663' of git://github.com/paulholden/moodle 2021-10-26 15:11:49 +02:00
Víctor Déniz 2b2897bf10 on-demand release 4.0dev+ 2021-10-26 12:36:28 +01:00
Víctor Déniz 3610fbca7b Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-10-26 12:36:23 +01:00
Dan Marsden ecc47348b3 MDL-55231 core_course: Correct chat cache handling 2021-10-26 19:08:15 +11:00
Dongsheng Cai 9a900492bc MDL-55231 core_course: Partial course cache rebuild 2021-10-26 19:08:15 +11:00
Tim Hunt 8950a974dd MDL-72912 questions: fix type of question_display_options::$context 2021-10-26 07:52:22 +01:00
Huong Nguyen b3df2aba62 MDL-72385 tool_usertours: Improve and simplify design of user tours 2021-10-26 12:55:37 +07:00
Peter Dias 7a67d3c0ac MDL-71914 theme: Disable secondary nav during behat 2021-10-26 11:21:32 +08:00
Peter Dias f3ee54ae04 MDL-71914 mod_glossary: Updated glossary behat tests 2021-10-26 11:21:32 +08:00
Peter Dias 57220ca4e3 MDL-71914 feedback: Updated feedback behat tests 2021-10-26 11:21:32 +08:00
Peter Dias f1ca3757a7 MDL-71914 navigation: Update tab urls
- Remove sr from the urls when not set
- Remove sesskey from course tab so the scan can pick it up
2021-10-26 11:21:32 +08:00
Peter Dias 773051b98f MDL-71914 mod_feedback: Add tertiary nav in feedback 2021-10-26 11:21:32 +08:00
Peter Dias 10b7badd61 MDL-71914 mod_glossary: Add tertiary nav in glossary 2021-10-26 11:21:32 +08:00
Ilya Tregubov 35fe820eb3 Merge branch 'MDL-72280' of git://github.com/paulholden/moodle 2021-10-25 16:13:54 +02:00
Paul Holden 1b245182e2 MDL-72894 course: format name and summary data for download.
The names and summaries of course elements (i.e. the course
itself, plus sections and modules) included when downloading
it's content are now passed through appropriate methods to
format their values.
2021-10-25 08:08:03 +01:00
Ilya Tregubov 122ff15517 Merge branch 'master-MDL-70323' of https://github.com/golenkovm/moodle 2021-10-25 08:21:55 +02:00
Andrew Nicols 9e9b7bb20d Merge branch 'MDL-71750-master' of https://github.com/NashTechOpenUniversity/moodle 2021-10-25 13:18:21 +08:00
Mikhail Golenkov 4c7bf9eb7e MDL-70323 core_h5p: Add H5P crossOrigin setting 2021-10-24 21:21:58 +11:00
AMOS bot d2855fdd51 Automatically generated installer lang files 2021-10-24 00:07:34 +00:00
Tim Hunt cd5eea3e35 MDL-72901 question: add missing {$a} in string attemptfinishedsubmitting 2021-10-22 23:14:25 +01:00
Paul Holden bd9abebcd1 MDL-72280 course: implement course datasource for custom reporting.
Create new entity for exposing report data on course categories,
joining it to the course entity to provide data for the reportbuilder
editor.

Co-authored-by: Carlos Castillo <carlos.castillo@moodle.com>
2021-10-22 17:19:33 +01:00
Paul Holden 5ec86bf501 MDL-72663 reportbuilder: improvements to column aggregation methods.
The group concatenation types now consistently sort the returned values
and support aggregating columns containing multiple fields and those
with defined callbacks.
2021-10-22 16:17:31 +01:00
Paul Holden 16a65f73e7 MDL-72663 reportbuilder: column API changes to improve aggregation.
Refinements to how columns can be defined in relation to available
aggregation methods:

* Disable aggregation types;
* Set column GROUP BY during aggregation;
* Defer column sorting to that of the aggregation method
2021-10-22 16:17:17 +01:00
Mahmoud Kassaei e799e8a1ba MDL-71761 Quiz: Show custom fields for user overrides
Note, this was a joint effort between Mahmoud & Tim.
2021-10-22 13:48:07 +01:00
Ilya Tregubov e5894c0455 on-demand release 4.0dev+ 2021-10-22 12:49:26 +02:00
Ilya Tregubov 95f575f7c0 Merge branch 'MDL-69371' of git://github.com/stronk7/moodle 2021-10-22 08:46:23 +02:00
Eloy Lafuente (stronk7) 777f654c28 MDL-69371 behat: Raise privacy exports allowed size
Note that this issue is not the one causing this problem alone
but just one more causing the download limits to be surpassed.

Allowing 1000 more bytes to have some margin, as far as we are
adding lots of new css stuff here and there.
2021-10-22 08:31:38 +02:00
Thong Bui 76c0a743bf MDL-71750 File upload: Disable submittion when uploading multiple files
Fixed issue "Save" and "Submit and finish" button is not disabled when file uploading in the ticket MDL-71644
2021-10-22 13:26:02 +07:00
Jun Pataleta 69243cd62a Merge branch 'MDL-69371-master-fix' of git://github.com/abgreeve/moodle 2021-10-22 12:59:38 +08:00
Shamim Rezaie 5c3cdd147d MDL-72669 qtype_multianswer: Replace empty option with NBSP 2021-10-22 14:33:50 +11:00
abgreeve 2c7b7ff3d3 MDL-69371 behat: Update to step definition.
This extends the step to look for the file manager on
admin pages as well which has a slightly different html
signature to look for.
2021-10-22 10:32:14 +08:00
Paul Holden c544288555 MDL-72884 atto_image: improve svg support in editor dialogue.
Where the dimensions of an image are not present, we should use
sensible defaults so that the dialogue is still usable.
2021-10-21 23:58:27 +01:00
Víctor Déniz f8cab39a04 Merge branch 'MDL-72607-master_fix_media_vimeo_url_parser' of https://github.com/praxisdigital/moodle 2021-10-21 23:29:41 +01:00
Eloy Lafuente (stronk7) 0e4bc1212b Merge branch 'two_failures' of https://github.com/stronk7/moodle 2021-10-21 23:21:51 +02:00
Eloy Lafuente (stronk7) 69a12d7606 Merge branch 'MDL-72228' of https://github.com/paulholden/moodle 2021-10-21 20:45:30 +02:00
Ferran Recio c0578a83df MDL-71663 core_courseformat: fix merge conflict 2021-10-21 20:27:35 +02:00
Ferran Recio db8e1d9423 MDL-71663: fix editor in classic 2021-10-21 19:40:17 +02:00
Jun Pataleta ab588eadbb Merge branch 'MDL-72878-master' of git://github.com/ilyatregubov/moodle 2021-10-21 23:40:26 +08:00
Eloy Lafuente (stronk7) cc31cb281f Merge branch 'MDL-69371-master-fix' of git://github.com/junpataleta/moodle 2021-10-21 17:35:51 +02:00
Jun Pataleta e26f47359b MDL-69371 output: Render lang_menu only when necessary 2021-10-21 22:54:48 +08:00
Sara Arjona a4d472cce6 Merge branch 'MDL-72567-master' of git://github.com/lucaboesch/moodle 2021-10-21 16:38:24 +02:00
Ilya Tregubov 584bc8cf7e MDL-72878 behat: Fix behat failing in chrome.
Element is on edge of browser. Changing window size.
2021-10-21 14:59:20 +02:00
Jun Pataleta f14239c8dc MDL-69371 output: Allow null return for export_for_single_select() 2021-10-21 18:35:04 +08:00
Jun Pataleta 1181f34253 MDL-69371 output: Allow null return for export_for_action_menu() 2021-10-21 18:14:47 +08:00
Michael Hawkins 3416ccc871 MDL-72781 tool_usertours: Remove disabled user tour JSON 2021-10-21 17:23:56 +08:00
Michael Hawkins 9d4f46e4b6 MDL-72781 tool_usertours: Disable activity completion user tours 2021-10-21 17:23:55 +08:00
abgreeve ca229dfcad Merge branch 'MDL-69371-master-4' of git://github.com/bmbrands/moodle 2021-10-21 17:16:48 +08:00
Andrew Nicols 453db3dcab Merge branch 'MDL-71953-behat' of git://github.com/HuongNV13/moodle 2021-10-21 16:27:02 +08:00
Luca Bösch 7e047dcf99 MDL-72567 courseformat: Have course index support activity name filters 2021-10-21 10:14:35 +02:00
Huong Nguyen 1382607708 MDL-71953 calendar: Fix behat failures 2021-10-21 14:51:32 +07:00
Paul Holden 9829fc5b99 MDL-72743 mod_quiz: verify user mapping prior to restoring attempts. 2021-10-21 08:26:50 +01:00
Eloy Lafuente (stronk7) 6863a92722 Merge branch 'MDL-72013-master-int' of git://github.com/andrewnicols/moodle 2021-10-21 09:25:58 +02:00
Andrew Nicols f59018f67a Merge branch 'MDL-71953-master' of git://github.com/HuongNV13/moodle 2021-10-21 14:02:58 +08:00
Andrew Nicols a8897c3517 MDL-72013 js: Configure eslint-jsdoc plugin
This change adds configuration for the eslint-jsdoc plugin in order to
detect the following errors with jsdoc blocks:
* missing params
* params in incorrect order
* params with no type defined
* properties incorrectly defined
* incorrect use of @package
* incorrect values for @access

In addition, warnings will be thrown where indentation is incorrect.
2021-10-21 13:28:04 +08:00
Andrew Nicols 4c1e0dcb19 MDL-72013 js: Add eslint-jsdoc plugin 2021-10-21 13:28:04 +08:00
Andrew Nicols 349312143d MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 13:28:00 +08:00
Andrew Nicols 05e6d69e4c Merge branch 'MDL-72507-master' of https://github.com/NashTechOpenUniversity/moodle 2021-10-21 12:56:23 +08:00
Huong Nguyen bca6b06a1c MDL-71953 calendar: Accessibility improvement for manage subscription
- Create new web services for manage subscription (Update calendar subscription)
 - Modified delete subscription feature to use Web service.
 - Midified update subscription feature to use in-place editbale
 - Delete subscription feature now have a confirmation box before processing.
 - Fixed some accessibility issues
 - Used 'Delete' instead of 'Remove' for deleting subscriptions
2021-10-21 11:02:34 +07:00
Andrew Nicols 2d62323d42 MDL-72874 behat: Allow behat window sizes to be modified during run
In some situations it is useful to modify the requested screensize by a
modifier. This allows for failing tests to be rerun at a different
screensize, where the original screensize triggered a failure for some
size-related reason.
2021-10-21 10:22:49 +08:00
Andrew Nicols f7ccc1b590 Merge branch 'MDL-71663-master' of git://github.com/ferranrecio/moodle 2021-10-21 09:29:19 +08:00
Paul Holden ba56a273ad MDL-72228 theme_boost: remove class to account for blocks presence.
Course pages use the the drawers layout file, which included a class
to identify whether the page included blocks (`has-blocks`), applying
a width offset to the main region settings menu.

Since 4fa713b0 all course-level blocks are hidden away by default in
a drawer, so the `has-blocks` class had the effect of shifting the
action menu away from the intended right hand side of the page.
2021-10-20 14:44:52 +01:00
Ferran Recio fb7d246a29 MDL-71663 core_courseformat: add move tool 2021-10-20 15:27:45 +02:00
Ilya Tregubov b7815208f3 Merge branch 'MDL-72639' of git://github.com/paulholden/moodle 2021-10-20 12:59:29 +02:00
Ilya Tregubov 150afce2b1 Merge branch 'MDL-52456-master-whitespace-fix' of git://github.com/ilyatregubov/moodle 2021-10-20 11:53:15 +02:00
Ilya Tregubov ce8daac9cf MDL-52456 quiz: Fix illegal white space. 2021-10-20 11:51:12 +02:00
Ilya Tregubov 282c4a124a Merge branch 'MDL-52456-master' of https://github.com/NashTechOpenUniversity/moodle 2021-10-20 11:33:14 +02:00
Ilya Tregubov 1cfcb89f68 Merge branch 'MDL-70795-fix-export-data-size' of git://github.com/ilyatregubov/moodle 2021-10-20 09:50:59 +02:00
Jun Pataleta 56c55f996a Merge branch 'MDL-72352-master-v2' of git://github.com/peterRd/moodle 2021-10-20 15:45:22 +08:00
Paul Holden ebbd92a5e9 MDL-70795 tool_dataprivacy: increase exported data download size. 2021-10-20 09:41:27 +02:00
Peter Dias 44922dfe2d MDL-72352 navigation: Unit tests 2021-10-20 14:55:11 +08:00
Peter Dias e30f73ddef MDL-72352 navigation: Add filters to moremenu 2021-10-20 14:55:11 +08:00
Adrian Greeve f7e33da502 MDL-72352 navigation: Third party settings with children displayed.
This makes sure that we are backwards compatible with plugins that
have extended the course or module settings navigation and have
containers.
2021-10-20 14:55:11 +08:00
Andrew Nicols 5b60230a26 Merge branch 'MDL-72851-master' of git://github.com/ilyatregubov/moodle 2021-10-20 14:12:40 +08:00
Andrew Nicols c5714ac280 Merge branch 'MDL-71211-master-v03' of git://github.com/ferranrecio/moodle 2021-10-20 09:04:57 +08:00
Safat Shahin f4b1b63684 MDL-72843 qbank_comment: unit test fix for individual testsuite
This change resolves a unit test issue while running an
individual testsuite rather than the entire one after the
first init call for phpunit. It requires the file so it can
point back to the comment api while required.
2021-10-20 10:50:06 +11:00
Eloy Lafuente (stronk7) b3e74f762a Merge branch 'MDL-72596-master' of https://github.com/sammarshallou/moodle 2021-10-19 23:05:43 +02:00
Eloy Lafuente (stronk7) 3d55dfdd77 Merge branch 'MDL-72849-master' of https://github.com/sammarshallou/moodle 2021-10-19 22:17:04 +02:00
sam marshall 9c29979b8b MDL-72596 core_cache: Track cache I/O size in perfdebug
For cache types which mean this information can be obtained without a
significant performance cost (i.e. just by calling strlen and not
having to serialize something that wasn't serialized already),
this change calculates the size of data read from or written to cache
in each request and includes it in the perfdebug table at bottom of
output (when that is turned on).

This supports the following cache types:

* File store
* Redis (only if caching is enabled)
2021-10-19 17:00:48 +01:00
Ilya Tregubov 1025ed1c22 MDL-72851 core: Bump $lastmajordbchanges to trigger upgrade immediately.
Fixing regression of MDL-52206.
2021-10-19 16:40:42 +02:00
Ilya Tregubov 6d8da6229f Merge branch 'MDL-70795' of git://github.com/paulholden/moodle 2021-10-19 15:56:57 +02:00
Thong Bui 46b88325ed MDL-52456 Quiz: notification message for students.
Notification message for students after questions have been manually graded.
2021-10-19 20:06:16 +07:00
David Matamoros 0457fb6675 MDL-70795 reportbuilder: allow user to view custom reports.
Reports can be viewed via two methods. Non-editing users can
access them via their report listing page, and report editors
can switch between editing and preview mode while working on
their reports.

Clean up remaining string definitions.

Co-authored-by: Mikel Martín <mikel@moodle.com>
2021-10-19 13:57:30 +01:00
Paul Holden f47e89a9bd MDL-70795 reportbuilder: editor elements to set column aggregation.
Aggregation of report columns allows the report editor to perform
common types of data aggregation (concatenation, sum, count, etc)
on given columns.
2021-10-19 13:56:05 +01:00
David Matamoros db7102eba5 MDL-70795 reportbuilder: report configuration for default sorting.
Co-authored-By: Mikel Martín <mikel@moodle.com>
2021-10-19 13:56:05 +01:00
Mikel Martín 9000d8d1a0 MDL-70795 reportbuilder: theme updates for custom report editor.
Includes nice interactions for element drag & drop, consistent
styling for templates and tidy up of element alignment/spacing.
2021-10-19 13:56:04 +01:00
David Matamoros 09b69d04e3 MDL-70795 reportbuilder: custom report filters editor.
Implement module for filters editing, allowing the report
editor to define which filters are available when users
are viewing the report.

These filters allow those users viewing the report to further
limit the data being displayed (after conditions have been
applied), by selecting their own values for each filter.

Co-authored-by: Paul Holden <paulh@moodle.com>
2021-10-19 13:56:04 +01:00
Paul Holden ab596ec11a MDL-70795 reportbuilder: custom report condition editor.
Report conditions allow report creators to limit which data
is displayed when the report is viewed. Users viewing the
report cannot override these condition values.
2021-10-19 13:56:04 +01:00
Paul Holden 8ca9e04f9a MDL-70795 reportbuilder: beginnings of the report editor.
Implement UI elements for editing columns of a report, taking their
definitions from the selected datasource.

Co-authored-By: David Matamoros <davidmc@moodle.com>
Co-authored-By: Mikel Martín <mikel@moodle.com>
2021-10-19 13:56:02 +01:00
David Matamoros 22d896e063 MDL-70795 reportbuilder: add interface for creating reports.
Implement elements for creating/editing reports, along with
new system report for listing and accompanying JS modules for
user interaction.

Create "Users" datasource as proof-of-concept.

Co-authored-By: Paul Holden <paulh@moodle.com>
2021-10-19 13:55:30 +01:00
Paul Holden 95967d62d5 MDL-70795 reportbuilder: define updated schema for custom reports.
Define new filter/column models, and updated database schema to
match.
2021-10-19 13:48:27 +01:00
sam marshall 8b8ef39802 MDL-72849 tool_behat: Use of xpath name() not compatible with Firefox
The xpath name() function returns upper-case e.g. 'IMG' in Firefox and
lower-case e.g. 'img' in Chrome.
2021-10-19 13:47:20 +01:00
Ilya Tregubov d04ab6191b Merge branch 'MDL-71270-master' of git://github.com/mickhawkins/moodle 2021-10-19 14:44:35 +02:00
Bas Brands cf630f06a1 MDL-69371 core_renderer: Move unit test for language renderable 2021-10-19 13:47:46 +02:00
abgreeve 0492b069be MDL-69371 core_renderer: New core language renderable. 2021-10-19 13:47:46 +02:00
abgreeve d236b2ec56 MDL-69371 core_login: simplification of behat steps 2021-10-19 13:47:05 +02:00
Bas Brands 7c2e6d07af MDL-69371 theme_boost: allow configuring a login background image 2021-10-19 13:47:04 +02:00
Bas Brands 47bbfe0f4f MDL-69371 theme_boost: redesign the moodle login page 2021-10-19 13:47:04 +02:00
Ilya Tregubov 0350d42610 MDL-71211 core_course: Keep the status of course index. 2021-10-19 13:17:25 +02:00
Eloy Lafuente (stronk7) 8885e22a0b on-demand release 4.0dev+ 2021-10-19 12:52:08 +02:00
Eloy Lafuente (stronk7) 46fd268d3f NOBUG: Fixed file access permissions 2021-10-19 12:52:08 +02:00
Eloy Lafuente (stronk7) b62064d043 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-10-19 12:52:03 +02:00
Thong Bui 3c19cbbb18 MDL-72507 Quiz: Quiz auto-save does not detect uploaded files 2021-10-19 16:10:15 +07:00
Eloy Lafuente (stronk7) e7fa5aefd9 Merge branch 'MDL-60917-Master' of https://github.com/tuanngocnguyen/moodle 2021-10-19 10:21:54 +02:00
Mihail Geshoski 10a91df9e3 MDL-72652 theme_boost: Reimplement navbar in site administration
Reimplements the navbar in the site administration pages and removes
any navbar nodes that are already present in the primary or secondary
navigation menu.
2021-10-19 13:08:34 +08:00
Andrew Nicols 8629c6b539 Merge branch 'MDL-71571-master' of https://github.com/kabalin/moodle 2021-10-19 11:23:06 +08:00
Nathan Nguyen 3c3fee43da MDL-60917 core_search: fix unit test 2021-10-19 14:22:39 +11:00
Andrew Nicols 0869496eb8 MDL-71785 mod_quiz: Correct string as per reviewer feedback 2021-10-19 11:19:54 +08:00
Andrew Nicols da98ed6ea2 Merge branch 'MDL-71785_master' of https://github.com/StudiUM/moodle 2021-10-19 11:19:06 +08:00
Jun Pataleta b92bb60a56 Merge branch 'MDL-72825-master' of git://github.com/HuongNV13/moodle 2021-10-19 10:59:51 +08:00
Andrew Nicols f09effd936 Merge branch 'MDL-72725-master' of git://github.com/ferranrecio/moodle 2021-10-19 10:05:37 +08:00
Eloy Lafuente (stronk7) 523b2643b7 Merge branch 'MDL-60917-Master' of https://github.com/tuanngocnguyen/moodle 2021-10-18 20:31:19 +02:00
Sara Arjona 3b38bc3e3e Merge branch 'MDL-72590-master' of git://github.com/lucaboesch/moodle 2021-10-18 17:38:27 +02:00
Luca Bösch ce96fcc06a MDL-72590 enrol: Course in success message after unenroll passes filter 2021-10-18 16:15:22 +02:00
Sara Arjona 999314af75 Merge branch 'MDL-72064-master' of https://github.com/NashTechOpenUniversity/moodle 2021-10-18 12:59:37 +02:00
Eloy Lafuente (stronk7) d1f479e8bd Merge branch 'MDL-72720-master-fix' of github.com:sarjona/moodle 2021-10-18 11:43:09 +02:00
Sara Arjona 1c8ed2fa2e MDL-72720 logstore: Display config changes as expected 2021-10-18 11:30:53 +02:00
Michael Hawkins 9f7f29ff22 MDL-71270 core: Updated security.txt expiry 2021-10-18 17:12:44 +08:00
Ferran Recio da0c19982d MDL-72725 courseformat: indentation pot-out 2021-10-18 10:18:37 +02:00
Sam Møller 87d26b4743 MDL-72607 media_vimeo: Fix vimeo URL parser
Fix vimeo URL parser to support the new vimeo URL format with privacy
settings (the video with password or domain restricted setting).
For example "https://vimeo.com/123456789/2bffff0000" the plugin must
parse the URL "https://player.vimeo.com/video/123456789?h=2bffff0000"
to the iframe source to make it compatible with the new vimeo URL
format.
See more about vimeo video privacy settings at
https://vimeo.com/blog/post/video-privacy-explained/
2021-10-18 08:54:53 +02:00
Ilya Tregubov 731b069c4d Merge branch 'MDL-72450-master-1' of git://github.com/mihailges/moodle 2021-10-18 08:26:49 +02:00
Shamim Rezaie 20d9ea7e05 Merge branch 'MDL-72706-master' of git://github.com/aanabit/moodle 2021-10-18 17:19:10 +11:00
Andrew Nicols 98cc837028 Merge branch 'MDL-65943-master' of git://github.com/HuongNV13/moodle 2021-10-18 14:02:47 +08:00
Shamim Rezaie 7a17a2e8e4 Merge branch 'MDL-72720-master' of git://github.com/sarjona/moodle 2021-10-18 15:43:31 +11:00
Huong Nguyen 88c87a1ffa MDL-65943 media_videojs: add videojs-ogvjs plugin
VideoJS now support to play Ogg Vorbis/Opus/Theora and WebM VP8/VP9/AV1 video on:
 - Safari on Mac OS
 - Safari on iPhone OS
 - Safari on iPad OS
2021-10-17 21:52:05 +07:00
AMOS bot 935d130cef Automatically generated installer lang files 2021-10-16 00:07:43 +00:00
Paul Holden acf6ed6fe1 MDL-72806 block_online_users: align picture/name of listed users.
Ensure alignment is consistent regardless of whether showing user
picture or auto-generated one based on their initials.
2021-10-15 18:27:22 +01:00
Amaia Anabitarte 1b1735f763 MDL-72706 core_course: Change default value of Hidden sections setting 2021-10-15 17:13:07 +02:00
Shamim Rezaie 385938b472 on-demand release 4.0dev+ 2021-10-16 00:30:29 +11:00
Sara Arjona fff40608ef Merge branch 'MDL-71689' of git://github.com/stronk7/moodle 2021-10-15 13:27:25 +02:00
Eloy Lafuente (stronk7) d87511c097 MDL-71689 behat: Raise privacy requests allowed sizes
This issue comes with some good new CSS that is included in the
privacy request downloads. Now that's causing them to be over
the allowed (tested) size (68 bytes). So raising it by 500 bytes
to have some margin.
2021-10-15 13:09:46 +02:00
Sara Arjona 8c8dfed278 MDL-72720 tinymce: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona 9cb8534590 MDL-72720 logstore: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona 1dfa86b4b4 MDL-72720 webservice: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona 96a16c14a0 MDL-72720 repository: Implement enable_plugin() method
This one was tricky because it works slightly different and requires
a repository instance will be created if it doesn't exist.
For now I've implemented the easiest approach because it's not
possible to create instances (some extra parameters should be added
to the method in order to support it).
2021-10-15 13:00:04 +02:00
Sara Arjona bdab64dc61 MDL-72720 qtype: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona a22093dbcf MDL-72720 qbehaviour: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona 5009021daf MDL-72720 qbank: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona 14e492bebb MDL-72720 portfolio: Implement enable_plugin() method
This one was tricky because it works slightly different and requires
a portfolio instance will be created if it doesn't exist.
For now I've implemented the easiest approach but, in the future,
it might be improved adding also the "deleted" status to the
enable_plugin() method, to completely remove it (current
implementation only switch status from "Enable but hidden" to
"Enable and visible").
2021-10-15 13:00:04 +02:00
Sara Arjona a7570bfcb6 MDL-72720 message: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona 105be1edc1 MDL-72720 format: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona e76c7375e2 MDL-72720 filter: Implement enable_plugin() method 2021-10-15 13:00:04 +02:00
Sara Arjona 0543ea7f02 MDL-72720 media: Implement enable_plugin() method 2021-10-15 13:00:03 +02:00
Sara Arjona 98bee59968 MDL-72720 fileconverter+paygw: Implement enable_plugin() method 2021-10-15 13:00:03 +02:00
Sara Arjona 518b981350 MDL-72720 enrol: Implement enable_plugin() method 2021-10-15 13:00:03 +02:00
Sara Arjona e8c60cff1f MDL-72720 editor: Implement enable_plugin() method 2021-10-15 13:00:03 +02:00
Sara Arjona e62f8ed093 MDL-72720 assignxxx: Implement enable_plugin() method 2021-10-15 13:00:03 +02:00
Sara Arjona 9a8f974a3a MDL-72720 mod: Implement enable_plugin() method 2021-10-15 13:00:03 +02:00
Eloy Lafuente (stronk7) 3b9aa60fb8 Merge branch 'MDL-72787-master-fix' of github.com:sarjona/moodle 2021-10-15 11:42:10 +02:00
Huong Nguyen af2eaccf3c MDL-72825 calendar: Course name still exists in the course view 2021-10-15 16:42:06 +07:00
Sara Arjona 9cc9c567b3 MDL-72787 site_main_menu: Fix classic behat error 2021-10-15 11:23:12 +02:00
Dani Palou 1e75faeade MDL-72586 message: Use count SQL in get_unread_notification_count 2021-10-15 16:32:28 +08:00
Jun Pataleta 043a43b089 Merge branch 'MDL-72774' of https://github.com/paulholden/moodle 2021-10-15 12:01:37 +08:00
Andrew Nicols 247b8645af MDL-71689 course: Rebuild theme_boost shipped scss 2021-10-15 11:53:49 +08:00
Andrew Nicols 6dfd0bc8ce Merge branch 'MDL-71689-master' of git://github.com/ilyatregubov/moodle 2021-10-15 11:31:57 +08:00
Andrew Nicols d07a2bc105 Merge branch 'MDL-71810-master-3' of git://github.com/HuongNV13/moodle 2021-10-15 11:30:55 +08:00
Ilya Tregubov 3b5d4c7818 MDL-71689 course: add activity button design changes. 2021-10-15 10:28:05 +07:00
Huong Nguyen 0328241373 MDL-71810 calendar: responsiveness for calendar block
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>>
2021-10-15 10:24:34 +07:00
Shamim Rezaie c844ae5313 Merge branch 'MDL-71344-master' of git://github.com/HuongNV13/moodle 2021-10-15 14:23:53 +11:00
Peter Dias f019394b89 MDL-72433 core: Final deprecation get_grades
Final deprecation of core_grades_external::get_grades along with unit tests and related private methods.
2021-10-15 10:53:45 +08:00
Andrew Nicols 8d5d300047 Merge branch 'MDL-72586-master' of git://github.com/dpalou/moodle 2021-10-15 10:23:15 +08:00
Andrew Nicols 2f0fb8f99b Merge branch 'MDL-72585-master' of git://github.com/dpalou/moodle 2021-10-15 09:53:19 +08:00
Jun Pataleta 23db4ccbb6 Merge branch 'MDL-72623' of https://github.com/stronk7/moodle 2021-10-15 09:47:27 +08:00
Jun Pataleta e6a518e497 Merge branch 'MDL-72807' of https://github.com/stronk7/moodle 2021-10-15 09:08:26 +08:00
Eloy Lafuente (stronk7) fc77e5e2ab Merge branch 'MDL-26633-master-workshopnumofreviews' of git://github.com/mudrd8mz/moodle 2021-10-14 22:40:43 +02:00
Eloy Lafuente (stronk7) 986bf19484 Merge branch 'MDL-72805-master' of git://github.com/junpataleta/moodle 2021-10-14 22:25:11 +02:00
Eloy Lafuente (stronk7) f5bc372630 Merge branch 'MDL-68325-master' of git://github.com/odeialba/moodle 2021-10-14 22:19:21 +02:00
Eloy Lafuente (stronk7) 256e3f9a59 Merge branch 'MDL-72464' of https://github.com/paulholden/moodle 2021-10-14 22:01:57 +02:00
Eloy Lafuente (stronk7) b3046c1213 Merge branch 'MDL-72787-master' of git://github.com/ferranrecio/moodle 2021-10-14 20:22:36 +02:00
Ilya Tregubov e95aee50cc Merge branch 'MDL-72099-master' of https://github.com/aanabit/moodle 2021-10-14 22:02:31 +07:00
Mihail Geshoski 242ec0860a MDL-71913 mod_data: Update behat tests 2021-10-14 21:57:52 +07:00
Sara Arjona 81556d883c MDL-72720 dataformat: Implement enable_plugin() method 2021-10-14 16:54:13 +02:00
Sara Arjona 87baf79723 MDL-72720 customfield: Implement enable_plugin() method 2021-10-14 16:54:13 +02:00
Sara Arjona fc59c10860 MDL-72720 contenttype: Implement enable_plugin() method 2021-10-14 16:54:13 +02:00
Sara Arjona 9991ce2cce MDL-72720 block: Implement enable_plugin() method 2021-10-14 16:54:13 +02:00
Sara Arjona c70519cc1d MDL-72720 availability: Implement enable_plugin() method 2021-10-14 16:54:13 +02:00
Sara Arjona bbf3a2d987 MDL-72720 auth: Implement enable_plugin() method 2021-10-14 16:54:12 +02:00
Sara Arjona 6e693fbce0 MDL-72720 antivirus: Implement enable_plugin() method 2021-10-14 16:54:12 +02:00
Sara Arjona cf54e29ddc MDL-72720 plugininfo: Add enable_plugin() method to base class 2021-10-14 16:54:12 +02:00
Eloy Lafuente (stronk7) 8515a0560f MDL-72807 behat: Add a few more @skip_chrome_zerosize tags
This is the 3rd round adding the tags to some scenarios
detected to be failing with zerosize problems lately.

Note that @ MDL-71108, the final solution will happen, say
switching to own webdriver till the upstream one is fixed
or whatever. Our @skip_chrome_zerosize solution is just a
workaround to have all those scenarios detected and ignored
by normal runs.
2021-10-14 16:12:20 +02:00
Paul Holden 77ac9a7e3b MDL-72801 theme_boost: make footer documentation link icon visible.
This change also makes the new window icon next to the feedback
link always visible (rather than only on focus).

Co-authored-by: Bas Brands <bas@moodle.com>
2021-10-14 12:50:36 +01:00
Amaia Anabitarte 1d4edcb57b MDL-72099 core_contenbank: Add context navigation 2021-10-14 13:04:13 +02:00
Ilya Tregubov 43a8c38f33 Merge branch 'MDL-72594-master-2' of git://github.com/mickhawkins/moodle 2021-10-14 16:45:09 +07:00
Jun Pataleta d7181f5000 Merge branch 'MDL-72802-master' of git://github.com/lucaboesch/moodle 2021-10-14 17:35:20 +08:00
Jun Pataleta 894a6b4500 Merge branch 'MDL-72813-master' of git://github.com/andrewnicols/moodle 2021-10-14 17:13:39 +08:00
Ilya Tregubov 7228f25ee3 Merge branch 'MDL-61674-master' of https://github.com/aanabit/moodle 2021-10-14 15:33:39 +07:00
Andrew Nicols f54ba13288 MDL-72813 js: Fix broken jsdoc usages 2021-10-14 15:44:56 +08:00
Mihail Geshoski fac039f231 MDL-72450 theme_boost: Blacklist feature files related to activity nav 2021-10-14 15:38:48 +08:00
Mihail Geshoski b2e31803ad MDL-72450 format_singleactivity: Add behat tests
Adds new behat scenarios to cover the activity navigation controls and
the ability to navigate through (hidden) activities as a teacher when
the course has multiple activities but it also uses the single activity
format.
2021-10-14 15:38:48 +08:00
Mihail Geshoski 0c35e76e7d MDL-72450 output: Remove activity navigation if there is course index
There is no need to display activity navigation links within the
activity if the user can already navigate through the activities
using the course index. Therefore, this change will prevent displaying
the activity navigation links if the theme has implemented course
index and the selected course format uses course index.
2021-10-14 15:38:48 +08:00
Mihail Geshoski 448960fe22 MDL-72450 theme_boost: Set config 'usecourseindex' to true in boost 2021-10-14 15:38:48 +08:00
Mihail Geshoski 3372adddb3 MDL-72450 theme: Allow themes to specify whether they use course index
Introduces a new theme config 'usecourseindex' which allows themes to
specify whether they implement and use course index.
2021-10-14 15:38:48 +08:00
Jun Pataleta b984315b38 Merge branch 'MDL-72530-master' of git://github.com/mihailges/moodle 2021-10-14 14:24:08 +08:00
Ilya Tregubov 3a3dca16df Merge branch 'MDL-71995-master' of git://github.com/ferranrecio/moodle 2021-10-14 14:24:08 +08:00
Peter Dias 724a6a5bff MDL-72098 core: Remove redundant insert function 2021-10-14 12:59:55 +08:00
Peter Dias 2bb5b40215 MDL-52484 core: Revert workaround PHP7 bug #70110 with preg_match
This reverts commit 144fb5e0a0. The fix is now part of php7.3
2021-10-14 12:19:29 +08:00
Mihail Geshoski 3910c41813 MDL-72530 navigation: Fix the auto collapse in the more menu 2021-10-14 10:55:33 +08:00
Mihail Geshoski f652127d28 MDL-72530 navigation: No display limit for secondary nodes in site admin
Avoids applying maximum limit of displayed secondary navigation nodes
only in site administration pages.
2021-10-14 10:55:33 +08:00
Jun Pataleta 2a9878e191 MDL-72805 tool_componentlibrary: Add image role to informative icons
Icon fonts that act as images and convey information should have an
image role. This patch adds the image role to the icons in the examples
to serve as a correct example of using informative icon fonts.
2021-10-13 22:37:02 +08:00
Michael Hawkins 780e19ae5e MDL-72594 timeline: Display same-day overdue events in overdue filter
Now that events due on the current date are indicated in the timeline
block, for consistency, the overdue filter has been updated to also
display those items.
2021-10-13 21:44:59 +08:00
Paul Holden 310bf46963 MDL-72779 core: add set_many helper method to persistent class. 2021-10-13 14:44:23 +01:00
Paul Holden 15d5f7a919 MDL-72774 reportbuilder: consistent layout of date/duration filters. 2021-10-13 13:33:49 +01:00
Ferran Recio 6eee428da4 MDL-72787 block_site_main_menu: require course_get_format 2021-10-13 12:53:31 +02:00
Luca Bösch 1f215809ec MDL-72802 Navigation: Active underline colour 2021-10-13 12:08:58 +02:00
Nadav Kavalerchik de978747a8 MDL-61674 usertours: Allow rich text (atto) editing of step content 2021-10-13 10:23:57 +02:00
Ferran Recio b58e780666 MDL-71995 core: reactive debug tools 2021-10-13 10:08:50 +02:00
Michael Hawkins 1a6f9467b0 MDL-72594 timeline: Display overdue status per events instead of date
Previously, only past dates displayed an indication of being overdue.
This update moves the badge to indicate each event that is overdue
instead, which makes the information clearer and also means it now
supports flagging events due earlier in the current day.
2021-10-13 15:59:13 +08:00
Michael Hawkins 262d0e07b6 MDL-72594 calendar: Add overdue status to event exporter
A new "overdue" value will be returned when exporting events, which
evaluates to true if the event has passed (eg assignment is past due).
2021-10-13 15:58:52 +08:00
Eloy Lafuente (stronk7) 43f39046b3 MDL-72623 nodejs: Bump from v14.15.0 to v14.18.0
Without modifying any installed package or dependency
because, after trying to do so, the updated stuff is huge
and leads to some JS validation / minimisation problems.
2021-10-13 09:49:48 +02:00
Mihail Geshoski 2c9ab4980d MDL-72530 navigation: Optional max limit of displayed secondary nodes
Includes an optional function argument $maxdisplayednodes (int/null)
in force_nodes_into_more_menu() which will enable configuration of the
max limit of displayed nodes in the secondary navigation. If null,
a limit of displayed nodes will not be applied.
2021-10-13 12:58:32 +08:00
Jake Dallimore 6eac166795 Merge branch 'MDL-71913-master' of git://github.com/mihailges/moodle 2021-10-13 12:17:15 +08:00
Mihail Geshoski d1c9c65e53 MDL-71913 mod_h5pactivity: Update behat tests 2021-10-13 11:05:30 +08:00
Mihail Geshoski 89878377b3 MDL-71913 mod_wiki: Update behat tests 2021-10-13 11:05:30 +08:00
Mihail Geshoski 6c0e1eee94 MDL-71913 mod_data: Update behat tests 2021-10-13 11:05:30 +08:00
Mihail Geshoski 671375115f MDL-71913 mod_folder: Add tertiary navigation 2021-10-13 11:05:30 +08:00
Mihail Geshoski 0dd4ddb1e8 MDL-71913 mod_resource: Hide unnecessary headings 2021-10-13 11:05:29 +08:00
Mihail Geshoski 3e97273b21 MDL-71913 mod_h5pactivity: Add attempts report setting node 2021-10-13 11:05:29 +08:00
Mihail Geshoski 77e9f45157 MDL-71913 mod_wiki: Add tertiary navigation 2021-10-13 11:05:29 +08:00
Mihail Geshoski 6470282e93 MDL-71913 mod_data: Add tertiary navigation 2021-10-13 11:05:29 +08:00
Andrew Nicols 9145d80b0b on-demand release 4.0dev+ 2021-10-13 09:41:16 +08:00
Andrew Nicols 8e57f12d81 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-10-13 09:41:13 +08:00
Jun Pataleta 23c0394fb0 Merge branch 'MDL-71965-master-2' of git://github.com/andrewnicols/moodle 2021-10-13 09:39:25 +08:00
Andrew Nicols a67a1c1179 MDL-71965 lang: Fix lang tst to not use boost-only footer feature 2021-10-13 09:02:37 +08:00
AMOS bot 4081a0edc2 Automatically generated installer lang files 2021-10-13 00:07:31 +00:00
Ilya Tregubov ecd75d652f Merge branch 'MDL-72689-master-test' of git://github.com/rezaies/moodle 2021-10-12 22:06:09 +07:00
Shamim Rezaie 3805f25a76 MDL-72689 theme_boost: Move the primary nav test to theme_boost 2021-10-13 01:50:11 +11:00
Ilya Tregubov 1a566975ac Merge branch 'MDL-71965-master-2' of git://github.com/andrewnicols/moodle 2021-10-12 15:38:50 +08:00
Andrew Nicols 9420b35170 Merge branch 'MDL-71965-master' of https://github.com/Chocolate-lightning/moodle 2021-10-12 15:38:50 +08:00
Víctor Déniz 44eb621ebd Merge branch 'MDL-72498' of git://github.com/paulholden/moodle 2021-10-12 15:38:49 +08:00
Andrew Nicols b5309d3889 MDL-71965 theme_classic: Include debug information in the footer 2021-10-12 12:18:34 +08:00
Nathan Nguyen 089ebc85b1 MDL-60917 core_search: add top result section 2021-10-12 14:49:36 +11:00
Mathew May b28293fce1 MDL-71965 theme_classic: Remove goto top from footer 2021-10-12 11:06:33 +08:00
Víctor Déniz 04f7132ca6 Merge branch 'MDL-72498' of git://github.com/paulholden/moodle 2021-10-12 00:52:16 +01:00
Paul Holden 2dc074656b MDL-72498 report_eventlist: use core component API for event list.
The previous method of hardcoded filepaths, specifically for events
belonging to core, meant that any events belongs to core subsystems
were omitted (core_customfield, core_h5p, core_payment, etc).
2021-10-11 17:22:03 +01:00
Paul Holden b8177caadb MDL-72498 report_eventlist: fix filtering by component.
Match on the component frankenstyle name rather than it's lang
string.
2021-10-11 17:22:03 +01:00
sam marshall 1b94bb8c20 MDL-72619 core_cache: Provide admin page to view cache size estimates 2021-10-11 16:49:21 +01:00
Shamim Rezaie 045ca2f1f0 Merge branch 'MDL-72689-master' of https://github.com/sharidas/moodle 2021-10-11 20:11:44 +11:00
Paul Holden de2b0565a7 MDL-71086 core: load only those properties defined within persistent. 2021-10-11 09:09:27 +01:00
Ilya Tregubov 843066ecf4 Merge branch 'MDL-72091-rebase-3' of https://github.com/Chocolate-lightning/moodle 2021-10-11 14:46:54 +07:00
Ilya Tregubov db21c7880a Merge branch 'master_MDL-71642-comment' of https://github.com/catalyst/moodle-MDL-70329 2021-10-11 14:01:21 +07:00
Andrew Nicols 551371c710 Merge branch 'MDL-71834-master-v02' of git://github.com/ferranrecio/moodle 2021-10-11 14:06:23 +08:00
Ilya Tregubov b58338c001 Merge branch 'MDL-71965-master' of git://github.com/andrewnicols/moodle 2021-10-11 12:18:39 +07:00
Andrew Nicols c4af869ffe MDL-71965 theme: Address behat failures
* The helplink has changed so the language customisation check had to be
  updated to use a different selector.
* The totop string has been moved from boost to classic only and the
  string must be moved too.
* The new footer toggle may sit over the [next page] button for the
  timeline block for some browsers (Linux only). Changing the browser
  size to large resolves this.

AMOS BEGIN
 CPY [totop,boost],[totop,classic]
AMOS END
2021-10-11 13:05:11 +08:00
Ilya Tregubov e36772cd31 Merge branch 'MDL-72295-master' of git://github.com/HuongNV13/moodle 2021-10-11 11:51:59 +07:00
Mathew May dba47e8641 MDL-72091 Navigation: Update navigation to match designs 2021-10-11 12:20:34 +08:00
Huong Nguyen b39f98243a MDL-71344 questions: Improve event handler for Drag n Drop family 2021-10-11 11:05:03 +07:00
Huong Nguyen cf34245d6d MDL-72295 timeline: Add text search to the timeline block
AMOS BEGIN
 CPY [clearsearch,tool_moodlenet],[clearsearch,block_timeline]
AMOS END
2021-10-11 10:04:45 +07:00
Ilya Tregubov d59782d1c3 Merge branch 'MDL-72305-master' of git://github.com/bmbrands/moodle 2021-10-11 10:02:00 +07:00
Andrew Nicols 290a741796 Merge branch 'MDL-66203-master' of git://github.com/rezaies/moodle 2021-10-11 08:28:53 +08:00
Andrew Nicols 9cba40c410 Merge branch 'MDL-71965-master' of git://github.com/bmbrands/moodle 2021-10-11 08:06:43 +08:00
Paul Holden 02680f59d9 MDL-72639 admin: consistent primary buttons during site upgrade. 2021-10-10 20:42:44 +01:00
Paul Holden 797cff78d5 MDL-72464 webservice: fix detection of non-expiring external tokens. 2021-10-10 20:40:14 +01:00
David Mudrák 78f9ea3b1c MDL-26633 workshop: Allow to randomly allocate more than 30 reviews
For classes with many students, there may be valid cases for having more
than 30 reviews per submission / reviewer.

The patch changes the type of the input field so that it can freely
editable to any integer value.
2021-10-08 17:46:43 +02:00
Sara Arjona e746dc75af weekly release 4.0dev+ 2021-10-08 12:43:14 +02:00
Sara Arjona b1d75afaa8 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-10-08 12:43:08 +02:00
Eloy Lafuente (stronk7) d9d49fc0ef Merge branch 'MDL-72674-master-fix' of github.com:sarjona/moodle 2021-10-08 11:47:05 +02:00
Sara Arjona 3369faa695 MDL-72674 componentlibrary: Remove whitespaces 2021-10-08 11:37:23 +02:00
Cameron Ball d5eaa5224e MDL-72670 session: Correct read only debugging logic
Prior to this patch the debugging mode (when enabled) would trigger
on everywhere, regardless of whether or not READ_ONLY_SESSION is defined.

This patch modifies that behaviour so that the debugging only kicks in
if READ_ONLY_SESSION is defined and set to true.
2021-10-08 15:11:40 +08:00
Peter Dias 7ab2d7d7bd MDL-52206 quiz: Integration bug fixes 2021-10-08 07:33:05 +02:00
Sujith Haridasan 28f4ab461e MDL-72689 core_navigation: Respect homepage preference
If defaulthomepage is set to Dashboard then Site home link
in the primary navigation should point to "/?redirect=0"
2021-10-08 10:46:40 +05:30
Guillermo Gomez 3be2b123e5 MDL-71642 qbank_comment: Add question comment plugin to core
This implementation will introduce a qbank plugin
"comment" which will allow users with the capability
to comment in a question. It also implements a
callback for the question preview page to view
and add comments from the preview page. Comment
plugin is implemented using the existing comments
API from the core.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
Co-Authored-By: Matt Porritt <mattp@catalyst-au.net>
2021-10-08 14:48:13 +11:00
abgreeve edb655e35c Merge branch 'MDL-72578-master' of git://github.com/ferranrecio/moodle 2021-10-08 09:12:57 +08:00
AMOS bot 67216a9611 Automatically generated installer lang files 2021-10-08 00:07:33 +00:00
Víctor Déniz 9ef79d0b36 Merge branch 'master-MDL-64576-v2' of https://github.com/golenkovm/moodle 2021-10-07 22:24:37 +01:00
Eloy Lafuente (stronk7) f77733148f Merge branch 'MDL-71306' of https://github.com/paulholden/moodle 2021-10-07 23:10:00 +02:00
Eloy Lafuente (stronk7) 9d3b3298e2 Merge branch 'MDL-72674-master' of git://github.com/junpataleta/moodle 2021-10-07 22:53:47 +02:00
Eloy Lafuente (stronk7) 553af0dddf Merge branch 'MDL-72309' of git://github.com/paulholden/moodle 2021-10-07 22:42:16 +02:00
Eloy Lafuente (stronk7) 3747362791 Merge branch 'MDL-72635-master' of git://github.com/lameze/moodle 2021-10-07 22:38:53 +02:00
Eloy Lafuente (stronk7) b662f299f4 Merge branch 'MDL-72454-master' of git://github.com/HuongNV13/moodle 2021-10-07 22:31:46 +02:00
Eloy Lafuente (stronk7) 8b577dfb46 Merge branch 'MDL-72621-master' of git://github.com/andrewnicols/moodle 2021-10-07 21:06:07 +02:00
Eloy Lafuente (stronk7) 6848218cc6 Merge branch 'MDL-61564' of https://github.com/danmarsden/moodle 2021-10-07 21:03:48 +02:00
Eloy Lafuente (stronk7) 2ef38aa865 Merge branch 'MDL-72753-master' of git://github.com/ilyatregubov/moodle 2021-10-07 20:21:40 +02:00
Ferran Recio d4bebe639f MDL-72578 core_courseformat: fix renderers deprecation messages 2021-10-07 17:17:29 +02:00
Ferran Recio fb753618a8 MDL-72578 course: fix format backward compatibility
The existing course format plugins are not adapted tu use the new
courseformat subsystem. This means they don't provide a valid renderer,
or hardcode the inclusion of the topics renderer.php file, or do not
extend the format renderer but the core one (missing some methods). This
commit provides some quick fixes to prevent exceptions.
2021-10-07 17:17:29 +02:00
Ferran Recio 41b4625693 MDL-72578 course: activity render to output classes 2021-10-07 17:17:29 +02:00
Víctor Déniz da8b658229 Merge branch 'MDL-57980-master_grade_items_index' of https://github.com/agrowe/moodle 2021-10-07 16:02:52 +01:00
Jun Pataleta 74fbe453c7 Merge branch 'MDL-72278-master' of git://github.com/bmbrands/moodle 2021-10-07 22:48:10 +08:00
Bas Brands 57581a1980 MDL-72278 theme_boost: open drawer with fake blocks on first visit 2021-10-07 16:14:37 +02:00
Eloy Lafuente (stronk7) d634e79ed4 Merge branch 'MDL-52206' of https://github.com/ilyatregubov/moodle 2021-10-07 14:37:20 +02:00
Ilya Tregubov c4542f4a19 MDL-52206 workshop: Fix Behat test broken by recent courseindex changes. 2021-10-07 16:56:43 +07:00
Ilya Tregubov 78ad30d662 MDL-72753 courseformat: Fix broken site installation via UI.
Fixing regression caused by MDL-71795.
2021-10-07 14:48:05 +07:00
Huong Nguyen f081ebeb4b MDL-72454 Themes: Removal of back to top link 2021-10-07 14:32:27 +07:00
abgreeve 24eac0b051 Merge branch 'MDL-72543-master' of git://github.com/lameze/moodle 2021-10-07 15:11:12 +08:00
Shamim Rezaie 7bd7ed4e58 Merge branch 'MDL-72629-master-2' of git://github.com/mickhawkins/moodle 2021-10-07 17:36:31 +11:00
Jun Pataleta 34b2639c70 Merge branch 'MDL-72682' of git://github.com/paulholden/moodle 2021-10-07 14:33:38 +08:00
abgreeve 72e58dbb55 Merge branch 'MDL-69696-master' of git://github.com/cameron1729/moodle 2021-10-07 14:32:17 +08:00
Matt Porritt f5d9267a29 MDL-69696 mod_assign: Class refactoring - rendering
Refactor rendering classes to be more PSR compliant.

Move renderer to output class folder and initial
splitting of classes in renderable.php into individual
class files. To make it easier to refactor assign UI
functionality in the future.
2021-10-07 14:25:11 +08:00
Michael Hawkins 34d6916968 MDL-72629 timeline: Reduce footprint when a course has no events
This also improves the noevents string so it makes sense in all
contexts.
2021-10-07 14:22:12 +08:00
Simey Lameze 9afd980b4e MDL-72543 block_timeline: change the display of event names 2021-10-07 14:05:34 +08:00
Shamim Rezaie e37c5b1ef3 Merge branch 'MDL-71938-master' of git://github.com/HuongNV13/moodle 2021-10-07 17:05:11 +11:00
Matt Porritt 1cb6f330a3 MDL-69696 mod_assign: Class refactoring - UI style change
Assign view UI style change.

Style submission status and grading summary tables
to have matched visual styles.
2021-10-07 14:00:22 +08:00
Ilya Tregubov b4675942ce Merge branch 'MDL-52206-master-rebased' of git://github.com/peterRd/moodle 2021-10-07 12:55:12 +07:00
abgreeve ea086c3cde Merge branch 'MDL-72277-master' of https://github.com/dcai/moodle 2021-10-07 13:39:45 +08:00
hiendinh e255952011 MDL-71938 tool_usertours: New "Display step numbers" setting
Co-authored-by: Huong Nguyen <huongnv13@gmail.com>
2021-10-07 10:53:40 +07:00
Dongsheng Cai 43e5cc11b5 MDL-72277 block_timeline: UI improvements 2021-10-07 14:49:51 +11:00
Shamim Rezaie 5f2963b053 MDL-72517 qformat: Removed extra whitespaces 2021-10-07 13:28:00 +11:00
Peter 7a9e3db9dc MDL-52206 completion: Behat test
Co-authored-by: aanabit
2021-10-07 10:17:25 +08:00
Shamim Rezaie 6e2f35ae18 Merge branch 'MDL-72517-master' of git://github.com/cescobedo/moodle 2021-10-07 13:03:06 +11:00
AMOS bot 65f63bf36d Automatically generated installer lang files 2021-10-07 00:07:31 +00:00
Jun Pataleta d9f53b70be Merge branch 'MDL-70874-master_take2' of git://github.com/lucaboesch/moodle 2021-10-06 22:49:03 +08:00
Jun Pataleta 87a5419f6f Merge branch 'MDL-72339-master' of https://github.com/sammarshallou/moodle 2021-10-06 22:44:40 +08:00
Luca Bösch aead4ba45a MDL-70874 gradereport_user: Add colors and icon distinguishing pass/fail 2021-10-06 16:36:12 +02:00
sam marshall 4dd7f2ac54 MDL-72339 core_availability: Unsafe to use format_string in description
The availability condition get_description method is called while
gathering data for the modinfo object. As such it is not safe to
call other functions which might rely on modinfo, such as format_string
(if using filters which access modinfo).

This change provides a mechanism to call format_string later, and also
a general callback to do other stuff later as well if needed. It uses
the same approach already taken to make activity names work correctly
in the availability_condition class.
2021-10-06 11:28:26 +01:00
Jun Pataleta 6f7e5cf2ce Merge branch 'MDL-72557-master' of git://github.com/rezaies/moodle 2021-10-06 18:20:04 +08:00
Bas Brands d1b9f7d1f1 MDL-71965 theme_boost: move footer content in popover 2021-10-06 11:32:08 +02:00
cescobedo 678826efb8 MDL-72517 qformat: Remove ExamView question format 2021-10-06 09:35:35 +02:00
Ilya Tregubov af94d5b09c Merge branch 'MDL-72662' of git://github.com/paulholden/moodle 2021-10-06 14:01:21 +07:00
Andrew Nicols d6f4f27bc6 Merge branch 'MDL-72515-master' of git://github.com/marinaglancy/moodle 2021-10-06 12:55:03 +08:00
Ilya Tregubov 2924d7c496 Merge branch 'MDL-72452-resource-filter' of https://github.com/Peterburnett/moodle 2021-10-06 10:53:55 +07:00
Jake Dallimore 3c7e486205 Merge branch 'MDL-72094-master' of git://github.com/mihailges/moodle 2021-10-06 10:51:29 +08:00
Andrew Nicols 7c357c22a1 Merge branch 'MDL-71707' of https://github.com/paulholden/moodle 2021-10-06 09:15:31 +08:00
Andrew Nicols d26bd7c078 Merge branch 'MDL-72599' of git://github.com/paulholden/moodle 2021-10-06 09:11:58 +08:00
Paul Holden 3aecdf42ec MDL-72682 reportbuilder: indicate count of applied report filters. 2021-10-06 01:29:58 +01:00
Eloy Lafuente (stronk7) 70073fdc74 on-demand release 4.0dev+ 2021-10-06 00:25:03 +02:00
Víctor Déniz 98804a0e5e Merge branch 'MDL-71963' of https://github.com/stronk7/moodle 2021-10-05 23:20:41 +02:00
Andrew Nicols fa72197258 MDL-72463 courseformat: Add missing docs 2021-10-05 23:20:41 +02:00
Eloy Lafuente (stronk7) ba84d525eb MDL-71963 behat: Let's search for blocks, not for strings
In classic, the "Search forums" string still was around (in the
"Add a block" block). So, instead of searching for strings, we
use the explicit step that allows us to look for blocks.
2021-10-05 23:20:41 +02:00
Andrew Nicols b7687bfef8 Merge branch 'MDL-72463-master' of git://github.com/ferranrecio/moodle 2021-10-05 23:20:41 +02:00
Andrew Nicols 3868d359ba Merge branch 'MDL-72407-master' of git://github.com/sarjona/moodle 2021-10-05 23:20:41 +02:00
Shamim Rezaie b472f96311 Merge branch 'MDL-72500' of git://github.com/paulholden/moodle 2021-10-05 23:20:41 +02:00
Andrew Nicols f013a60bed Merge branch 'MDL-72326' of https://github.com/NeillM/moodle 2021-10-05 23:20:41 +02:00
Andrew Nicols 3482a5494b Merge branch 'MDL-72347-master' of git://github.com/sarjona/moodle 2021-10-05 23:20:38 +02:00
Andrew Nicols 04ff28f00c Merge branch 'MDL-72348-master' of git://github.com/sarjona/moodle 2021-10-05 23:18:51 +02:00
Ilya Tregubov a4a59a4a74 Merge branch 'MDL-72455-master' of git://github.com/bmbrands/moodle 2021-10-05 23:18:51 +02:00
Ilya Tregubov 85c1947840 Merge branch 'MDL-56773-master' of git://github.com/rezaies/moodle 2021-10-05 23:18:51 +02:00
Andrew Nicols 598f3c2cc3 Merge branch 'MDL-72642-master' of git://github.com/mihailges/moodle 2021-10-05 23:18:51 +02:00
Jun Pataleta 98f437d16d Merge branch 'MDL-39324-master' of https://github.com/kiratskitizing/moodle 2021-10-05 23:18:51 +02:00
Víctor Déniz 311163bd9b Merge branch 'MDL-72597' of git://github.com/paulholden/moodle 2021-10-05 23:18:51 +02:00
Andrew Nicols df2af96ffa Merge branch 'MDL-72707' of https://github.com/stronk7/moodle 2021-10-05 23:18:50 +02:00
Víctor Déniz 55c3cf3870 Merge branch 'MDL-72691_Open_popup_fix_after_ajax_reload' of git://github.com/lostrogit/moodle 2021-10-05 23:18:50 +02:00
Eloy Lafuente (stronk7) f6a023d301 Merge branch 'MDL-72276' of https://github.com/vmdef/moodle 2021-10-05 23:18:50 +02:00
Andrew Nicols 0310b76642 MDL-71963 js: Address lint issues in integration 2021-10-05 23:18:50 +02:00
Andrew Nicols 89457e9acb Merge branch 'MDL-71963-master' of https://github.com/Chocolate-lightning/moodle 2021-10-05 23:18:50 +02:00
Víctor Déniz 48b5d50200 MDL-72276 block_timeline: behat scenario update after aria label change 2021-10-05 23:18:47 +02:00
Ilya Tregubov 40e4f5fc6b Merge branch 'MDL-72395' of https://github.com/stronk7/moodle 2021-10-05 23:18:47 +02:00
Víctor Déniz 2957711cd5 Merge branch 'MDL-72276-master' of git://github.com/junpataleta/moodle 2021-10-05 23:18:47 +02:00
Ilya Tregubov e560a4becc Merge branch 'master_MDL-71679-mod_quiz-52' of https://github.com/catalyst/moodle-MDL-70329 2021-10-05 23:18:47 +02:00
Andrew Nicols 8b7fb0f7ab Merge branch 'MDL-71795-master' of git://github.com/ferranrecio/moodle 2021-10-05 23:18:46 +02:00
sam marshall b8291d04f4 MDL-72619 core_cache: Move renderer to namespace 2021-10-05 09:56:59 +01:00
Paul Holden 968b872c9d MDL-71707 libraries: upgrade to version 3.3.0 of Spout. 2021-10-05 08:04:47 +01:00
Simey Lameze afb0856c5d MDL-72635 calendar: fix typo in data attribute 2021-10-05 06:30:22 +08:00
Alex Rowe 5ea613c99b MDL-57980 grade_items: add mdl_grade_items index
New index created on itemtype, itemmodule, iteminstance and courseid
2021-10-05 09:30:14 +11:00
Paul Holden d1b1b94fb4 MDL-71306 cohort: ignore empty values in form autocomplete element. 2021-10-04 21:09:56 +01:00
Jun Pataleta f0b22d1796 MDL-72674 core: Add component library documentation for accessible links 2021-10-05 00:29:34 +08:00
Carlos Castillo a9f45b0842 MDL-72691 reportbuilder: Encode popup data inside report actions.
Encode all popup data for report actions inside the action link
itself, because previously reloading a report via AJAX meant
actions no longer opened in popups, because the required JS was
absent from the page.
2021-10-04 09:59:42 -05:00
Paul Holden fe53a6262f MDL-72597 course: use formatted course module name in context header. 2021-10-04 14:19:58 +01:00
Dani Palou 2e61125a4a MDL-72586 message: New WebService get_unread_notification_count 2021-10-04 14:40:48 +02:00
Jun Pataleta 7ceb0f1de6 MDL-72674 core: Add indicator that feedback link opens in new window
* New pix icon i/externallink
* New lang string opensinnewwindow
* Use the external link pix icon with "Opens in new window" lang string
 as its alt text and add it to the "Give feedback about this software"
 link.
* Update cta template to indicate whether the link opens in new window.
2021-10-04 20:32:18 +08:00
Neill Magill 377c618083 MDL-72326 grunt: Fix component library grunt on Windows
Before this change grunt tried to use the Linux version of files in
node_modules/.bin rather than the Windows version which is generated
by npm.

To avoid this issue we need to run the components directly.
2021-10-04 13:18:08 +01:00
Peter Dias 2c7893cf9f MDL-52206 core: Update new activity_custom_completion
Update the custom_completion classes to accept the new completion
criteria
2021-10-04 19:45:47 +08:00
Peter Dias d975251813 MDL-52206 completion: New criteria to handle behaviour between modules 2021-10-04 19:45:45 +08:00
Peter Dias cd52b46e89 MDL-52206 quiz: Remove completionpass completion from quiz
AMOS BEGIN
 MOV [completionpass,mod_quiz],[completionpassgrade,core_completion]
 MOV [completionpassdesc,mod_quiz],[completionpassgrade_desc,core_completion]
 MOV [completionpass_help,mod_quiz],[completionpassgrade_help,core_completion]
AMOS END
2021-10-04 19:44:03 +08:00
Peter 90acd8d381 MDL-52206 core: Add completion criteria to course_modules 2021-10-04 19:44:02 +08:00
Peter 663137748e MDL-52206 core: Add completion based on pass grade
Add new completion based on pass grade to the completion criteria.
2021-10-04 19:42:34 +08:00
Joshua Ebarvia ddfc1ba89a MDL-39324 mod_url: Fix icon when URL has params 2021-10-04 20:05:43 +10:30
Marina Glancy 215b5ac398 MDL-72515 admin: do not call curl unnecessary on plugins page 2021-10-04 09:59:50 +02:00
Sara Arjona 2a3527ccb0 MDL-72407 videojs: Remove videojs-flash and videojs-swf libraries
Apart from removing these libraries because the Flash Player was deprecated
in 2017 and officially discontinued on 31 December 2020, the rtmp and useflash
settings have been removed too (they make no sense anymore).
2021-10-04 09:31:25 +02:00
Sara Arjona f02de69971 MDL-72348 repository: Deprecate import from skydrive repo
The repository_skydrive has been removed from core. Methods for
importing files from skydrive to onedrive repository have been
deprecated and will be completely removed in Moodle 4.4.
2021-10-04 09:30:45 +02:00
Sara Arjona 70e6deacee MDL-72348 repository: Remove Microsoft OneDrive legacy (skydrive)
The repository_skydrive was deprecated in 3.3 and here it has been
removed from core.
2021-10-04 09:30:43 +02:00
Sara Arjona 32576936ad MDL-72347 filter: Remove censor filter
Word censorship filter is not widely used these days so it has been
removed from Moodle core.
2021-10-04 09:28:59 +02:00
Paul Holden 0645319e62 MDL-72309 course: make category a required field in forms.
Course category fields were changed en masse from simple select
elements to autocompletes in 93d72205, but weren't defined as
required fields. This could lead to exceptions and/or unexpected
behaviour if their values were cleared prior to form submission.
2021-10-04 08:11:32 +01:00
Mathew May 6dcb5eb8a5 MDL-71963 Core: Add toast for confirmation modal success 2021-10-04 13:08:44 +08:00
Andrew Nicols 529c5c2ece MDL-71963 Core: Convert block deletion to a modal
Co-authored-by: Mathew May <mathewm@hotmail.co.nz>
2021-10-04 13:07:31 +08:00
Safat Shahin f9fc355ec7 MDL-71679 mod_quiz: Updates for new qbank api
This implementation will introduct changes to
the mod_quiz to implement the new qbank api
for view. Major changes are introduced in
the custom view and also all the legacy points
to the old qbank are changed to qbank plugins
where needed. It also deprecated and deletes
classes and scripts which were kept not to
break mod_quiz for the new api implementation.
2021-10-04 15:44:25 +11:00
Jun Pataleta f7d14691f7 MDL-72276 block_timeline: Update wording for the date filter 2021-10-04 11:30:37 +08:00
Jun Pataleta bbcf026ce4 MDL-72276 block_timeline: Make screen readers announce current selection
* Have the currently selected dropdown menu item serve as the dropdown's
description in order for screen readers to announce its current
selection.
 - JAWS and NVDA both read this as "[element name] [selected value]".
 - Chrome screen reader (formerly ChromeVox) does not announce the
description.
* Add a title attribute so the dropdown's element name can be shown by
browsers on hover.
2021-10-04 11:30:36 +08:00
Jun Pataleta 04392abd53 MDL-72276 block_timeline: Show current selection on timeline dropdowns 2021-10-04 11:30:36 +08:00
Andrew Nicols a8db8e590a MDL-72291 js: Fix event names for inplace_editable 2021-10-04 11:17:10 +08:00
Andrew Nicols c00e7b1bb8 Merge branch 'MDL-72291' of git://github.com/paulholden/moodle 2021-10-04 10:54:32 +08:00
Adrian Greeve 7a1b3e0f2c Merge branch 'MDL-72355-master' of git://github.com/mickhawkins/moodle 2021-10-04 10:35:26 +08:00
Mikhail Golenkov 17df506879 MDL-64576 completion: Fix criteria and course completion dates 2021-10-04 10:51:38 +11:00
Dan Marsden 988936e15e MDL-61564 enrol_cohort: Allow multiple cohort selection. 2021-10-04 09:44:13 +13:00
Shamim Rezaie 4cb9932163 MDL-66203 mod_assign: Reset submission status when removing a submission 2021-10-04 02:04:34 +11:00
Paul Holden e55abd713e MDL-72662 reportbuilder: add relative date options to date filter.
Allow user to filter dates relative to the current date, e.g dates
within the previous year, the current week or next month.
2021-10-03 11:53:11 +01:00
Eloy Lafuente (stronk7) c78624af2b MDL-72707 install: update the list of stale files for 4.0
Note that, at the same time, the function has got
return type specified and simple conversion to short-array.
2021-10-02 22:46:15 +02:00
Eloy Lafuente (stronk7) c99f7e1a0a MDL-72395 composer: Update to newer dependencies
More notably PHPUnit to 9.5.9 that comes with some good fixes
and better support for go prospecting php81 (beta) status.

Generated with php73, that is the lower version supported
by this branch, following the instructions @ https://docs.moodle.org/dev/Composer
2021-10-02 22:46:06 +02:00
Eloy Lafuente (stronk7) 1a9bee69e6 weekly release 4.0dev 2021-10-02 22:05:06 +02:00
Eloy Lafuente (stronk7) 200fb14b30 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-10-02 22:05:00 +02:00
Eloy Lafuente (stronk7) 0b6ed7bf7a Merge branch 'MDL-72714' of git://github.com/stronk7/moodle 2021-10-02 08:16:55 +02:00
Eloy Lafuente (stronk7) 8e90d8309c MDL-72714 behat: Make the window larger earlier
The step that causes the problem is:

And I navigate to "Badges > Add a new badge" in current page administration

(because "Add a new badge" is exactly on the edge (bottom) of the window)

So we need to make the window large before it, not after it, or the
"Add a new badge" link won't be ever clicked.
2021-10-01 22:40:10 +02:00
Víctor Déniz d0c9ba98da Merge branch 'MDL-72329' of https://github.com/stronk7/moodle 2021-10-01 19:10:41 +01:00
Eloy Lafuente (stronk7) e4f33b837c MDL-72329 phpunit: Avoid === on floats and raw reserved word
In general it's a bad idea to compare floats with ===,
because depending of different systems precision, can
come to mismatches after certain decimal position.

So we replace them by:

- assetIsFloat() : to verify the type.
- assertEqualsWithDelta() : to compare values with some delta allowed.

Also, "raw" is Oracle reserved word, so renaming to "someraw" in tests.
2021-10-01 18:40:06 +02:00
Sujith Haridasan bd12395717 MDL-72396 core: Fix the primary active tab for my/index.php
Fix the primary active tab for my/index.php
2021-10-01 13:24:10 +02:00
Víctor Déniz f01d69cb05 Merge branch 'MDL-72714-master' of git://github.com/ilyatregubov/moodle 2021-10-01 13:21:46 +02:00
Andrew Nicols 0437f409e5 Merge branch 'MDL-72329' of https://github.com/stronk7/moodle 2021-10-01 13:21:46 +02:00
Ilya Tregubov bb0942ad71 Merge branch 'MDL-71610-master' of git://github.com/andrewnicols/moodle 2021-10-01 13:21:46 +02:00
Eloy Lafuente (stronk7) 0df1347304 MDL-72329 phpunit: Fix some tests
- XMLDB_TYPE_FLOAT definition was incorrect, meaning no decimals for
  some DBs.
- Avoid using reserved words in column names.
2021-10-01 13:21:45 +02:00
Paul Holden 244d304b6e MDL-72291 output: emit native events from inplace editable element.
Removes jQuery dependency from calling code that wants to listen
for these events. Maintains backwards compatibility with existing
code that does want to listen to jQuery-style events.
2021-10-01 10:41:45 +01:00
Andrew Nicols 1d2cdb3a0d MDL-71610 behat: Add custom steps for edit mode checks 2021-10-01 16:41:03 +08:00
Andrew Nicols 4562ea0bd4 MDL-71610 gradereport_grader: Specify the pagelayout for grader report 2021-10-01 15:15:40 +08:00
Ferran Recio 5d18501ffb MDL-71795 behat: fix breadcrumb navigation step 2021-10-01 09:03:56 +02:00
Ferran Recio 7ad939c592 MDL-71795 courseformat: course index in activity page 2021-10-01 09:03:56 +02:00
Ferran Recio 5a165c86a2 MDL-71795 courseformat: add cache to course index 2021-10-01 09:03:56 +02:00
Ilya Tregubov fad4743ea8 MDL-72714 behat: Fix Behat failures for chrome 94. 2021-10-01 08:36:50 +02:00
Jun Pataleta b3166c4dcf Merge branch 'MDL-72449-master' of git://github.com/andrewnicols/moodle 2021-10-01 11:43:25 +08:00
abgreeve b7adf3a59d Merge branch 'MDL-69682' of git://github.com/paulholden/moodle 2021-10-01 11:21:40 +08:00
Andrew Nicols 29662c3488 Merge branch 'MDL-72329-master' of https://github.com/dravek/moodle 2021-10-01 11:02:28 +08:00
Andrew Nicols 123c8dd896 Merge branch 'MDL-71347' of https://github.com/paulholden/moodle 2021-10-01 10:26:56 +08:00
Andrew Nicols a096fb5998 Merge branch 'MDL-72673-master' of git://github.com/junpataleta/moodle 2021-10-01 10:21:30 +08:00
Andrew Nicols f4604fe5fb Merge branch 'MDL-72544' of git://github.com/paulholden/moodle 2021-10-01 10:14:51 +08:00
Andrew Nicols 4beb17e530 Merge branch 'MDL-70862' of https://github.com/marcusboon/moodle 2021-10-01 09:43:39 +08:00
Eloy Lafuente (stronk7) 529a558802 Merge branch 'MDL-72484' of git://github.com/paulholden/moodle 2021-09-30 23:19:06 +02:00
Eloy Lafuente (stronk7) 9f58ba6f7b Merge branch 'MDL-72587-master' of git://github.com/dpalou/moodle 2021-09-30 23:16:21 +02:00
Eloy Lafuente (stronk7) a665ad27d2 Merge branch 'MDL-72396-master' of https://github.com/sharidas/moodle 2021-09-30 20:12:39 +02:00
Víctor Déniz 2384dc7d0a Merge branch 'MDL-72496-master_assert_tag' of https://github.com/call-learning/moodle 2021-09-30 15:40:25 +01:00
Bas Brands 61bacfb935 MDL-72455 theme_boost: enable roundness for bootstrap components 2021-09-30 15:53:44 +02:00
Laurent David 93a3724d8e MDL-72496 question tests: fix assertTag if tag not found
* The basic_test::assertTag method will issue a warning as $tag is not
found, failing the PHP Unit test that uses this method.
* Add tests to check that assertTag is working
2021-09-30 13:04:45 +02:00
Ferran Recio 0aff2bd8c1 MDL-71795 course: fix participants pagetype 2021-09-30 11:35:14 +02:00
Dani Palou 1d388e154f MDL-72585 message: Return notifications iconurl in get_messages WS 2021-09-30 08:00:27 +02:00
abgreeve 23a5ce9a1d Merge branch 'MDL-71610-master' of git://github.com/andrewnicols/moodle 2021-09-30 12:50:45 +08:00
Andrew Nicols 1146c69257 MDL-71610 theme_classic: Check whether editing mode is enabled in behat 2021-09-30 12:49:40 +08:00
Andrew Nicols 26f7355965 Merge branch 'MDL-72545' of https://github.com/paulholden/moodle 2021-09-30 12:17:06 +08:00
abgreeve d9f4590c89 Merge branch 'MDL-72275-master-2' of git://github.com/mickhawkins/moodle 2021-09-30 09:57:35 +08:00
Andrew Nicols d46ff2929e Merge branch 'MDL-71727-master-v03' of git://github.com/ferranrecio/moodle 2021-09-30 09:52:56 +08:00
AMOS bot d7f83f84d5 Automatically generated installer lang files 2021-09-30 00:07:32 +00:00
Eloy Lafuente (stronk7) a8268e6562 Merge branch 'MDL-72462' of https://github.com/paulholden/moodle 2021-09-29 23:31:22 +02:00
Eloy Lafuente (stronk7) 87e7bcb12a Merge branch 'MDL-71970-master' of git://github.com/sarjona/moodle 2021-09-29 23:27:15 +02:00
Ruslan Kabalin 80bcf0d740 MDL-71571 enrol_meta: Add webservices for adding and deleting instances. 2021-09-29 21:17:52 +01:00
Andrew Nicols c83e637ff9 MDL-72621 admin: Add environment check for admin deprecation 2021-09-29 22:39:32 +08:00
Shamim Rezaie 912a580546 MDL-72557 tool_usertours: Allow customisation of the end tour button 2021-09-30 00:15:45 +10:00
Ilya Tregubov 34a0ba3232 Merge branch 'MDL-71610-master' of git://github.com/bmbrands/moodle 2021-09-29 15:40:39 +02:00
Ferran Recio 639a99014d MDL-71834 course: lock elements
Now components has a new property lock to disable all user interactions.
This is applied directly into the course index and course content to
freeze an element if some action is performed over it. To set this
locked value there are 2 new mutations cmLock and sectionLock.
2021-09-29 11:34:43 +02:00
Ferran Recio 96c6dc53cd MDL-72463 courseformat: course index highlight section badge 2021-09-29 11:32:03 +02:00
Ferran Recio 9abf7e1a72 MDL-71727 course: sync dragged elements
Two new mutations are added to indicate that a section
or a cm is being dragged. The logic related to refresh
a section or a cm has been moved to components to
simplify the code.
2021-09-29 10:01:25 +02:00
Ferran Recio a0b4cacc8c MDL-71828 courseformat: course index section link toggler 2021-09-29 09:57:24 +02:00
Bas Brands 350797397e MDL-71610 core_behat: access site admin manage tags link 2021-09-29 09:25:36 +02:00
Bas Brands 16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Bas Brands 3ff1b83239 MDL-71610 core_behat: update edit mode steps 2021-09-29 09:25:36 +02:00
Bas Brands 6ece030948 MDL-71610 theme_boost: switch to standard editing mode for gradebook
the gradebook need to use the standard $USER->editing to check if editing mode is turned on
2021-09-29 09:25:36 +02:00
Bas Brands a0bb51622c MDL-71610 theme_boost: remove edit button from Boost 2021-09-29 09:25:36 +02:00
Bas Brands 09f6ce9fed MDL-71610 theme_boost: add a edit mode switch 2021-09-29 09:25:36 +02:00
Ilya Tregubov 44f06eddc1 Merge branch 'MDL-72675' of git://github.com/paulholden/moodle 2021-09-28 15:51:58 +02:00
Shamim Rezaie 7d14aa28ae Merge branch 'MDL-72060-master' of git://github.com/lameze/moodle 2021-09-28 20:15:06 +10:00
Adrian Perez 55f6ff7358 MDL-72060 mod_lti: fix comparison if user is gradable 2021-09-28 17:23:30 +08:00
Dani Palou 244aade1d6 MDL-72587 message: Support getting both read and unread messages 2021-09-28 10:37:39 +02:00
Andrew Nicols 6ca7e3115a Merge branch 'MDL-67686' of git://github.com/paulholden/moodle 2021-09-28 15:17:23 +08:00
Ilya Tregubov 950504bac0 Merge branch 'MDL-72643-master' of git://github.com/sammarshallou/moodle 2021-09-28 08:03:14 +02:00
Andrew Nicols d7a67faf2f Merge branch 'MDL-72031-master' of https://github.com/NashTechOpenUniversity/moodle 2021-09-28 13:36:11 +08:00
AMOS bot 5ed38f2caa Automatically generated installer lang files 2021-09-28 00:07:50 +00:00
Eloy Lafuente (stronk7) 5f7db5bf85 Merge branch 'MDL-72658-master-welcometosite' of git://github.com/mudrd8mz/moodle 2021-09-27 23:33:47 +02:00
Eloy Lafuente (stronk7) b2406966e6 Merge branch 'MDL-72328-master' of https://github.com/sammarshallou/moodle 2021-09-27 23:19:34 +02:00
Paul Holden cf99ea1a46 MDL-72462 forms: style checkbox/radio field labels consistently.
Fixes small regression from 942dc9de that moved indentation of form
fields to the label node, but only for those labels with specific
class.
2021-09-27 18:23:51 +01:00
Paul Holden 0e9b0a4964 MDL-72484 report_eventlist: looser check for event 'other' docs. 2021-09-27 18:21:42 +01:00
Ilya Tregubov d7620cc5bc Merge branch 'MDL-71943-master' of git://github.com/dravek/moodle 2021-09-27 18:36:35 +02:00
David Matamoros 5909d5b0ce MDL-71943 core: Dynamic (AJAX) tabs in Moodle LMS 2021-09-27 17:53:37 +02:00
sam marshall e332d1849d MDL-72643 core: Improve display_size
Allows display_size to use a fixed unit for easy comparison of
multiple results, and fixed decimal places for the same reason.

Improves behaviour by using consistent decimal places and a
consistent space before the unit (the previous one only has a space
before 'bytes', not before 'KB').

Of existing uses, all the ones that displayed a 'maxbytes' type
configuration setting (which are likely to have an 'exact' size
and would be better shown as 512 KB rather than 512.0 KB) have been
changed to use 0 decimal places, to preserve previous behaviour.
All the uses which were showing an actual file or memory size have
been left as default (1 decimal place).
2021-09-27 16:52:33 +01:00
Bas Brands 646109ec3b MDL-72305 theme_boost: user initials as profile picture placeholder 2021-09-27 14:02:45 +02:00
Ilya Tregubov 18c7a8a5db Merge branch 'MDL-72335-master' of git://github.com/cescobedo/moodle 2021-09-27 11:45:22 +02:00
Sara Arjona f47a327290 MDL-71970 h5plib_v124: Replace references to new Moodle\H5Pxxx namespace
The joubel/core and joubel/editor libraries have been moved to Moodle
namespace.
This commit adds the new namespace to the places where these classes
are used.
Besides, a couple of minor changes have been done to replace the _test.php
classname and remove some unnecessary defined('MOODLE_INTERNAL').
2021-09-27 11:41:48 +02:00
Sara Arjona c1b4a4a97e MDL-71970 h5plib_v124: Add namespace to H5P editor library
The joubel/editor is a third-party library. A namespace has been added to
avoid collision with other plugins using it (such as mod_hvp).
That way, they will be able to have a different version without
side effects.
2021-09-27 11:41:48 +02:00
Sara Arjona 8e622fba87 MDL-71970 h5plib_v124: Add namespace to H5P core library
The joubel/core is a third-party library. A namespace has been added to
avoid collision with other plugins using it (such as mod_hvp).
That way, they will be able to have a different version without
side effects.
2021-09-27 11:41:48 +02:00
cescobedo bad5b1d891 MDL-72335 tool_health: Remove tool_health from core 2021-09-27 07:12:32 +02:00
Paul Holden ffa9b692e3 MDL-72675 repository_picasa: remove plugin config after uninstall.
It was missed as part of the original plugin uninstallation change
in 128ebcc4.
2021-09-24 12:35:03 +01:00
Jun Pataleta 8c180760eb MDL-72673 mod_glossary: Generate unique ID for Keywords select element 2021-09-24 18:30:49 +08:00
Paul Holden 876df13ea1 MDL-69682 theme_boost: remove minimum height of tables.
The change that introduced this property (a3124b15) is no longer
required, and it caused visual glitches on tables containing a
single row.
2021-09-24 08:21:49 +01:00
Paul Holden 8f3c7e6e8c MDL-72545 reportbuilder: reload form fragment after filter reset.
Instead of performing a page reload after resetting report filters,
we can use the fragment API to re-render the form after the user
presses the reset button.
2021-09-24 08:20:38 +01:00
Paul Holden e8d7817f7f MDL-72544 output: set default core/toast message type to information.
Update existing code to set type to warning as appropriate.
2021-09-24 08:19:54 +01:00
Paul Holden fc92e42abf MDL-67686 task: add duration filter to task logs report. 2021-09-24 08:14:37 +01:00
Paul Holden bd258be549 MDL-67686 reportbuilder: new duration filter type.
This report filter can be used for filtering reports by given
duration, via selection of time value and unit (seconds, minutes,
hours, etc).
2021-09-24 08:14:37 +01:00
Ilya Tregubov 6cc0d5dfbd Merge branch 'MDL-71828-master' of git://github.com/ferranrecio/moodle 2021-09-24 08:49:32 +02:00
David Matamoros c6cf30d47a MDL-72329 tool_dataprivacy: Fix type comparisons in unit tests 2021-09-24 08:45:09 +02:00
David Matamoros 306b070ac1 MDL-72329 competency: Fix contextid comparison 2021-09-24 08:45:09 +02:00
David Matamoros ab4d4b4724 MDL-72329 reportbuilder: Remove custom persistent getter 2021-09-24 08:45:09 +02:00
David Matamoros 78735a72bc MDL-72329 core: Persistent method get needs to return correct type 2021-09-24 08:45:08 +02:00
Michael Hawkins b5a64bf719 MDL-72355 calendar: Improve clarity of the imports table heading
The updates string provides consistency with the main page heading.
This commit also improves accessibility by setting the heading as the
aria-describedby element for the table which it is describing.
2021-09-24 11:31:21 +08:00
Michael Hawkins 9eed82a7f5 MDL-72355 calendar: Remove export link from the calendar footer
Now that subscriptions and exports are accessed from the same page which
is linked as "Import / export calendars", there is no need to have a
separate "Export calendar" link.
2021-09-24 11:29:56 +08:00
Michael Hawkins b1b8644fac MDL-72355 calendar: Update manage subscriptions language string
This has been modified to reflect the updated content on the page,
as this is now also includes exports.
2021-09-24 11:29:56 +08:00
Michael Hawkins c848e34fd4 MDL-72275 timeline: Add default offset to template
This value was being passed in the template, but the template
had 0 hardcoded instead of injecting the context value. With the other
bug fixes in this issue correctly loading the "All" view properly on
page load, this uncovered that at load time, the course view would not
load overdue items, which also meant a behat test was failing.
2021-09-24 11:23:05 +08:00
Michael Hawkins 0a7aa0a878 MDL-72275 timeline: Make time dropdown options display consistently
The 6 month option was highlighted on load if previously selected,
which was not the case for any other options. This has been removed
so it behaves consistently.
2021-09-24 11:23:05 +08:00
Michael Hawkins 328ea675ad MDL-72275 timeline: Fixed non-loading issue in dates sort
Incorrect setting/getting of the "seen" data attribute resulted in no
information being fetched when switching from course view back to dates
view.
2021-09-24 11:23:05 +08:00
Michael Hawkins 7b5c45f7e0 MDL-72275 timeline: Display "all" time on page load fix
When the timeframe filter was set to "all" when the timeline
block was initially loaded, an incorrect value rendered into
the template meant the timeframe limit was set to 0 (which will
return no results) instead of setting no limit (which would fetch all
 action events, as intended).
2021-09-24 11:23:05 +08:00
Marcus Boon d4a48daa9b MDL-70862 gradebook: Add callback so that we can add tabs in gradebook 2021-09-24 11:06:41 +10:00
AMOS bot 72229ce8b9 Automatically generated installer lang files 2021-09-24 00:07:53 +00:00
David Mudrák 3722466892 MDL-72658 lang: Let welcome message use other than just firstname
The patch allows for strings welcomeback and welcometosite to be
customised and use other user names than just the firstname.

Supported are placeholder properties matching all known name fields:
firstnamephonetic, lastnamephonetic, middlename, alternatename,
firstname and lastname. Special values fullname and alternativefullname
are supported, too.

By default, the firstname is kept for compatibility with the original
feature design.
2021-09-23 20:57:22 +02:00
Ilya Tregubov 214adb7984 weekly release 4.0dev 2021-09-23 18:21:49 +02:00
Ilya Tregubov eb1f88242c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-09-23 18:21:47 +02:00
Eloy Lafuente (stronk7) 6943cb85db Merge branch 'MDL-71964-master' of git://github.com/junpataleta/moodle 2021-09-23 10:38:58 +02:00
Mihail Geshoski 8e4a7c6b90 MDL-72642 navigation: Fix duplicated ID in more menu items 2021-09-23 15:10:48 +08:00
Jun Pataleta cb0b7fc9c5 MDL-71964 user: Fix preference lang string key
* Plus use example domain for user email in the Behat test
2021-09-23 14:11:20 +08:00
Jun Pataleta 959a562aa0 Merge branch 'MDL-72426-master' of git://github.com/lameze/moodle 2021-09-23 12:23:46 +08:00
Jun Pataleta 87b8583803 Merge branch 'MDL-71964-master' of git://github.com/junpataleta/moodle 2021-09-23 11:32:27 +08:00
Dongsheng Cai a2d5d43223 MDL-71964 dashboard: add welcome message for all users 2021-09-23 10:42:04 +08:00
AMOS bot b6cc37278a Automatically generated installer lang files 2021-09-23 00:07:48 +00:00
Ferran Recio 05b6f68f65 MDL-71828 courseformat: course index section link toggler 2021-09-22 20:10:04 +02:00
Eloy Lafuente (stronk7) b889f9f3f6 Merge branch 'MDL-72110-master-v3' of https://github.com/sharidas/moodle 2021-09-22 20:00:18 +02:00
Ilya Tregubov 3de9a4db4c Merge branch 'MDL-66549-master' of git://github.com/ilyatregubov/moodle 2021-09-22 19:47:28 +02:00
Jun Pataleta ed0d7efa2f Merge branch 'MDL-71664-master-v04' of git://github.com/ferranrecio/moodle 2021-09-22 21:17:32 +08:00
arjun-kallapur a5ab9e466e MDL-66549 grades: Double arrow sort order should be ascending first 2021-09-22 14:13:14 +02:00
Ilya Tregubov 0e979b85cc Merge branch 'MDL-72042-master' of git://github.com/sarjona/moodle 2021-09-22 13:34:28 +02:00
Ferran Recio 23499e6447 MDL-71664 course: add browser native drag and drop 2021-09-22 11:08:06 +02:00
Eloy Lafuente (stronk7) f4a730e350 Merge branch 'MDL-72593-master' of git://github.com/andrewnicols/moodle 2021-09-22 10:48:07 +02:00
Jun Pataleta 99cb8a7303 Merge branch 'MDL-71037-master-8' of git://github.com/ilyatregubov/moodle 2021-09-22 14:44:17 +08:00
Jun Pataleta c69c653b57 Merge branch 'MDL-51165-master' of https://github.com/kiratskitizing/moodle 2021-09-22 10:51:29 +08:00
AMOS bot 13a14653f5 Automatically generated installer lang files 2021-09-22 00:07:49 +00:00
Eloy Lafuente (stronk7) 9a19736556 Merge branch 'MDL-71352-master' of git://github.com/lucaboesch/moodle 2021-09-21 23:17:51 +02:00
Eloy Lafuente (stronk7) 09614b91c6 Merge branch 'MDL-72566-master' of git://github.com/ferranrecio/moodle 2021-09-21 19:07:17 +02:00
Bas Brands c08ee9169c MDL-71037 theme_boost: section collapse styling 2021-09-21 18:41:59 +02:00
Ilya Tregubov f2e28c0561 MDL-71037 course: Make sections collapsible for Topics/Weeks format. 2021-09-21 18:41:59 +02:00
Eloy Lafuente (stronk7) dabf7b45cd Merge branch 'MDL-69364-master-alt' of git://github.com/andrewnicols/moodle 2021-09-21 18:19:16 +02:00
Eloy Lafuente (stronk7) 74f38ccd66 Merge branch 'MDL-72630-master' of git://github.com/andrewnicols/moodle 2021-09-21 16:17:31 +02:00
sam marshall 8ddfa20121 MDL-72328 cachestore_redis: Add TTL support for Redis cache
A list of times for each cache key in a TTL cache is kept in a Redis
sorted list, which can be queried efficiently to delete expired
cache items later in a scheduled task.

This change makes set and delete 2x slower (only for caches which use
TTL) but there is no impact on get performance.
2021-09-21 13:43:11 +01:00
Ilya Tregubov 64bcb34a29 Merge branch 'MDL-70946-master' of git://github.com/peterRd/moodle 2021-09-21 13:08:27 +02:00
Andrew Nicols 0a0823672c MDL-72593 behat: Improve behat handling of file manager buttons
When using a try/catch for a find if the first match is not met then we
have an implicit 6 second delay waiting for the search to time out.

We can avoid this by combining the searches in a comma-separated
selection.

I have also taken the opportunity to convert the use of ->click() to the
i_click_on function which has the benefit of supporting wait for
pendingJS.
2021-09-21 15:59:46 +08:00
Andrew Nicols e4ceff2a24 MDL-72593 behat: Load the Field node content locally for processing
The standard NodeElement functions for getAttribute, getTagName,
getParent, and friends go back to WebDriver and parse the DOM for each
request. This is insanely slow per request, and in the case of forms we
do a lot of checking to determine the field type.

This change modifies the form field detection to copy the entire node
content into a DOMDocument and parse the document locally.

This is significantly faster - in some cases where there are large
documents minutes faster.

I believe that this should be a safe change as the document fetched from
the browser is normalised to match the doctype specified.
2021-09-21 15:55:21 +08:00
Andrew Nicols 1e78596419 MDL-72630 feedback: Increase screen size for links just off screen 2021-09-21 15:33:01 +08:00
Jun Pataleta e6e32acd21 Merge branch 'MDL-58939-master' of git://github.com/sarjona/moodle 2021-09-21 10:38:11 +08:00
Andrew Nicols dc3ecef948 MDL-72449 core: Fix show_confirm_dialog submission
The show_confirm_dialog function was passing a YUI Node object instead of
a DOM Node, which the form change checker is unable to handle.
2021-09-21 10:10:02 +08:00
Eloy Lafuente (stronk7) 0f04ec2ef6 Merge branch 'MDL-72387-master' of git://github.com/aanabit/moodle 2021-09-20 23:23:24 +02:00
Amaia Anabitarte 5c54b1a608 MDL-72387 core_course: section navigation visiblity for students 2021-09-20 21:49:19 +02:00
Eloy Lafuente (stronk7) 9c6489db36 Merge branch 'MDL-72205-master' of git://github.com/HuongNV13/moodle 2021-09-20 18:58:56 +02:00
Ilya Tregubov 2fb0c3bf71 Merge branch 'MDL-72356-master' of git://github.com/aanabit/moodle 2021-09-20 14:35:46 +02:00
Amaia Anabitarte 7958fa72e1 MDL-72356 core_course: auto enrol admins when adding a new course 2021-09-20 13:09:29 +02:00
Andrew Nicols 98421046dc MDL-69364 enrol: Improve setting of save button 2021-09-20 12:07:30 +08:00
Andrew Nicols 9fb596408d MDL-69364 enrol: Improve cohort test 2021-09-20 12:07:30 +08:00
Huong Nguyen 244a5f3264 MDL-72205 admin: admin_setting_configduration validation improvement
The write_setting() should only use the internal validation if no validation function was provided
2021-09-20 09:17:21 +07:00
Peter Dias 46daeb3ba1 MDL-70946 repository: Reenable and fix the disabled behat test 2021-09-20 08:01:15 +08:00
Joshua Ebarvia 7ccf18f65e MDL-51165 mod_url: allow directory index url direct access 2021-09-19 12:05:51 +09:30
Eloy Lafuente (stronk7) ea02bb0da7 Merge branch 'MDL-72605-master' of git://github.com/sarjona/moodle 2021-09-17 16:26:31 +02:00
Luca Bösch 1f7fbed812 MDL-71352 gradereport_grader: Add icons for pass/fail. 2021-09-17 13:54:41 +02:00
Sara Arjona 3b4b891a5f MDL-72605 my: Fix behat error with classic
This is a regression caused by MDL-72116, where the "Upcoming events"
block was removed from the dashboard.
In classic is failing because the text "Upcoming events" is displayed
in the "Add a block" list. So stopping edition should fix the issue.
2021-09-17 13:27:04 +02:00
Paul Holden 8f10f91bf5 MDL-72599 blocks: handle editing/deletion on admin notification page.
This was broken by changes in fdd5aef0, as the sesskey URL parameter
was required on admin/index.php in order for block related actions
to be performed uninterrupted by any redirections.
2021-09-17 12:17:24 +01:00
Sara Arjona 0cc61bbfc6 MDL-58939 lib_google: Remove google_picasa class
Picasa is discontinued since 2016 so google_picasa class has been
removed from core Moodle (it makes no sense to deprecate it because
it's not working properly)..
2021-09-17 10:46:10 +02:00
Sara Arjona 128ebcc4b0 MDL-58939 repository: Remove picasa repository
Picasa is discontinued since 2016 so repository_picasa has been
removed from core Moodle.
2021-09-17 10:46:09 +02:00
Sara Arjona ba06999e48 MDL-58939 portfolio: Remove picasa portfolio
Picasa is discontinued since 2016 so portfolio_picasa has been
removed from core Moodle.
2021-09-17 10:45:12 +02:00
Sara Arjona a0d3e32aa9 MDL-72042 media: Remove SWF media player
The Flash Player was deprecated in 2017 and officially discontinued
on 31 December 2020, so media_swf player has been completely
removed from Moodle core.
2021-09-17 10:39:17 +02:00
Sujith Haridasan 3d18e005e8 MDL-72396 core: Add tests for setting active tabs
Add the tests for setting active tabs in primary
and secondary nav.
2021-09-17 12:37:42 +05:30
Sujith Haridasan c1a2df7f64 MDL-72396 core: Allow setting of active tab
Allow easy setting of active tab for the navigation
views.
2021-09-17 12:37:42 +05:30
Ilya Tregubov 5ea3545115 weekly release 4.0dev 2021-09-17 08:58:30 +02:00
Ilya Tregubov 41a738f5fc Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-09-17 08:58:27 +02:00
Ilya Tregubov 1427a79ddb Merge branch 'MDL-72173-master' of git://github.com/andrewnicols/moodle 2021-09-16 14:57:51 +02:00
Andrew Nicols 11ebfe601c MDL-72173 behat: Respect login page preference 2021-09-16 20:47:18 +08:00
Ferran Recio cb39d0d28d MDL-72566 completion: fix missing mod bug
MDL-71899 produces a regression. When an activity plugin is not present
but it has activities in the DB the course view returns an exception.
With this patch the code will ignore missing modules when calculating
the completion.
2021-09-16 09:59:10 +02:00
Jun Pataleta 4359db8622 Merge branch 'MDL-72173-master' of git://github.com/andrewnicols/moodle 2021-09-16 15:39:42 +08:00
Andrew Nicols 92018f6971 MDL-72173 behat: Fix typo Logout <> Log out 2021-09-16 15:03:07 +08:00
Sara Arjona 878c1c89f9 Merge branch 'MDL-72118-master-solr-fix' of https://github.com/snake/moodle 2021-09-16 07:23:25 +02:00
Jun Pataleta f01c179cda Merge branch 'MDL-71602-master-2' of git://github.com/rezaies/moodle 2021-09-16 12:58:01 +08:00
Jun Pataleta df4e0d5497 Merge branch 'MDL-72116-master' of git://github.com/sarjona/moodle 2021-09-16 12:36:54 +08:00
Jun Pataleta 115baf17d0 Merge branch 'MDL-72173-master' of git://github.com/andrewnicols/moodle 2021-09-16 12:22:45 +08:00
Andrew Nicols ad8283a80f MDL-72173 behat: Add tests for login/logout steps 2021-09-16 12:20:37 +08:00
Andrew Nicols 41ebf95bbe MDL-72173 behat: Automatically log user out on behat login 2021-09-16 12:13:26 +08:00
Andrew Nicols 93cb87cddb MDL-72173 behat: Add and use behat logout URL 2021-09-16 12:13:26 +08:00
Jake Dallimore 6f5719ff29 MDL-72118 search: fix unit test dependant on HTML block pluginname
Change this to use "Block: Text" instead.
2021-09-16 11:51:35 +08:00
Jake Dallimore d221e3ba7e Merge branch 'MDL-71860-master' of git://github.com/lameze/moodle 2021-09-16 11:02:18 +08:00
Leon Stringer 13194d4e40 MDL-71860 core: Migrate lang string
Corresponding move of language string invalidpersistenterror following
move of class invalid_persistent_exception in MDL-57273.

AMOS BEGIN
 MOV [invalidpersistenterror,core_competencies],[invalidpersistenterror,core_error]
AMOS END
2021-09-16 10:49:53 +08:00
Jun Pataleta 385438b463 Merge branch 'MDL-72589' of https://github.com/stronk7/moodle 2021-09-16 09:46:56 +08:00
AMOS bot 12b15fa045 Automatically generated installer lang files 2021-09-16 00:07:46 +00:00
Eloy Lafuente (stronk7) c60ea2cde3 Merge branch 'MDL-72432-master' of https://github.com/katerynadegtyariova/moodle 2021-09-16 00:37:10 +02:00
Eloy Lafuente (stronk7) f1416b6eb1 Merge branch 'MDL-72118-master' of git://github.com/sarjona/moodle 2021-09-16 00:34:44 +02:00
Eloy Lafuente (stronk7) 433212a33e Merge branch 'MDL-72093-master' of git://github.com/mihailges/moodle 2021-09-16 00:32:47 +02:00
Eloy Lafuente (stronk7) 8fac400199 MDL-72589 behat: Create course with 3 sections (workaround)
With the default 5 sections course, after editing the activities, the
"log out" link is exactly on the edge of the view port. It's one of
those cases where Chrome fails to click/press it (have tried both).

So just make the course to have 3 sections is enough to avoid the
problem. Some day Chrome will fix that problem but, until then...
we cannot do much apart from changing the window size or try to
configure things to show differently.
2021-09-15 20:25:33 +02:00
Eloy Lafuente (stronk7) 9f9fe79c26 MDL-72589 behat: Add @skip_chrome_zerosize to failing scenarios
All the scenarios failing with Chrome zero-size errors are
getting the @skip_chrome_zerosize to be able to keep them apart from
regular runs. See MDL-71108 for more information about
that error.

They will be run by another job, specifically using that tag to
keep them failing and under control.
2021-09-15 20:25:11 +02:00
Ilya Tregubov de814baafe Merge branch 'MDL-72310-master' of git://github.com/aanabit/moodle 2021-09-15 14:06:17 +02:00
Jake Dallimore b27c7ae319 Merge branch 'MDL-71550-master' of git://github.com/bmbrands/moodle 2021-09-15 10:49:26 +08:00
Jake Dallimore f91529bed3 Merge branch 'MDL-71137-master' of https://github.com/NashTechOpenUniversity/moodle 2021-09-15 10:11:48 +08:00
Eloy Lafuente (stronk7) 07a05c288e Merge branch 'MDL-72251-RB-Tasks_admin_UI_fix_time' of git://github.com/lostrogit/moodle 2021-09-14 22:48:10 +02:00
Eloy Lafuente (stronk7) 2d65b1eb52 Merge branch 'MDL-72115-master' of git://github.com/sarjona/moodle 2021-09-14 22:42:15 +02:00
Eloy Lafuente (stronk7) 9049ec5dd3 Merge branch '71093-master-backup-honor-formatstringstriptags' of https://github.com/DSI-Universite-Rennes2/moodle 2021-09-14 22:21:55 +02:00
Eloy Lafuente (stronk7) 2f578362eb Merge branch 'MDL-72192' of git://github.com/paulholden/moodle 2021-09-14 22:17:19 +02:00
Marie-Eve Lévesque 689c9961e5 MDL-71785 core_quiz: Empty quiz section name behaves like new page 2021-09-14 15:22:48 -04:00
Ilya Tregubov 117707809c MDL-72119 admin: Fix warning on installation of new site. 2021-09-14 16:28:13 +02:00
Ilya Tregubov 64b17c4c5b Merge branch 'MDL-72119-master' of git://github.com/sarjona/moodle 2021-09-14 12:20:22 +02:00
Ilya Tregubov ddf6e31187 Merge branch 'MDL-71961-master' of git://github.com/nguyenphuctien/moodle 2021-09-14 11:49:04 +02:00
Mihail Geshoski 7d821080f0 MDL-72093 navigation: Update behat tests 2021-09-14 12:02:35 +08:00
Mihail Geshoski ecf8e77f19 MDL-72093 navigation: Update secondary nav unit tests 2021-09-14 12:02:35 +08:00
Mihail Geshoski a360abedf8 MDL-72093 mod_workshop: Replace strings in secondary nav 2021-09-14 12:02:35 +08:00
Mihail Geshoski a6f665a971 MDL-72093 mod_choice: Replace strings in secondary nav 2021-09-14 12:02:35 +08:00
Mihail Geshoski 55dd65a1f2 MDL-72093 mod_chat: Replace strings in secondary nav 2021-09-14 12:02:35 +08:00
Mihail Geshoski c8d992311b MDL-72093 booktool_exportimscp: Replace strings in secondary nav 2021-09-14 12:02:35 +08:00
Mihail Geshoski 9ce040a7a7 MDL-72093 navigation: Replace strings in course and module secondary nav 2021-09-14 12:02:35 +08:00
Mihail Geshoski 87a577aade MDL-72094 core_report: Deprecate report_helper::save_selected_report() 2021-09-14 11:44:18 +08:00
Mihail Geshoski 1dc3fa2c55 MDL-72094 report: Avoid storing the last accessed course report
Removes the logic in the course reports related to storing the last
accessed course report in a session variable as this behaviour is
no longer required.
2021-09-14 11:44:18 +08:00
Mihail Geshoski d5d99eddbb MDL-72094 report_log: Update existing behat test 2021-09-14 11:44:18 +08:00
Mihail Geshoski d18ba8bd6e MDL-72094 report_log: Modify the styling of the selector form elements 2021-09-14 11:44:18 +08:00
Mihail Geshoski ae2f555c9c MDL-72094 core: Modify the margins of the report selector 2021-09-14 11:44:17 +08:00
Mihail Geshoski 0d69f3ffc9 MDL-72094 core_report: Modify the redirects in the course report page
The course report page now redirects to the first avaliable course
report, instead of redirecting to the last accessed course report.
Also, a notification is now displayed on this page if there are no
course reports available.
2021-09-14 11:44:17 +08:00
Jun Pataleta 61fc746602 Merge branch 'MDL-71473-master' of git://github.com/sarjona/moodle 2021-09-14 10:42:52 +08:00
Paul Holden a6f9bad45b MDL-71347 user: add time created filter to browse users page.
AMOS BEGIN
 CPY [timecreated,core_contentbank],[timecreated,moodle]
AMOS END
2021-09-14 00:45:19 +01:00
Eloy Lafuente (stronk7) aed4799ad4 Merge branch 'master-MDL-72527' of https://github.com/matt-catalyst/moodle 2021-09-13 23:35:22 +02:00
Jun Pataleta 355e30cfec Merge branch 'MDL-71228-master-v02' of git://github.com/ferranrecio/moodle 2021-09-13 22:10:19 +08:00
Paul Holden a9f3cf6d75 MDL-72500 report_eventlist: group and sort list of components. 2021-09-13 12:38:27 +01:00
Ilya Tregubov 5fad3cd0f8 Merge branch 'MDL-71846' of git://github.com/paulholden/moodle 2021-09-13 13:38:25 +02:00
Tien Nguyen 95a82a9f2e MDL-71961 Quiz: Disable quiz navigation buttons when files are uploading 2021-09-13 17:31:17 +07:00
Odei Alba a1b38e4f8c MDL-68325 completion: Add validation to course completion form 2021-09-13 12:06:08 +02:00
Sara Arjona 3f2f2e85bb MDL-72115 course: Rename Miscellaneous category
The "Miscellaneous" course category has been renamed to Category 1.
Besides, the description field has been set from FORMAT_MOODLE to
FORMAT_HTML.
2021-09-13 08:36:17 +02:00
Sara Arjona 7045dd1948 MDL-71473 lib: Remove XMPPHP (Jabber) third-party lib
As the message_jabber notification plugin has been removed from core,
the XMPPHP library (aka Jabber) is not required any more so it has
been completely removed from Moodle core too.
2021-09-13 08:33:15 +02:00
Sara Arjona f471a7d23a MDL-71473 message: Remove jabber output notification
Jabber is not widely used these days so message_jabber has been removed
from Moodle core.
2021-09-13 08:32:47 +02:00
Sara Arjona 78c8d6f29b MDL-72119 admin: Move Enable WS for mobile to Advanced features
The "Enable web services for mobile devices" setting has been moved
from the "Mobile app settings" page to "Advanced features".
Besides, the "Mobile app" section and the "Mobile settings" page
won't be displayed if WS for mobile devices setting is disabled.
2021-09-13 08:29:22 +02:00
Sara Arjona 1d8fe9b84f MDL-72119 admin: Move Enable MoodleNet to Advanced features
The "Enable MoodleNet integration" setting has been moved from
the "MoodleNet settings" page to "Advanced features".
Besides, the "MoodleNet settings" page and section won't be
displayed if MoodleNet integration setting is disabled.
2021-09-13 08:29:22 +02:00
Sara Arjona 608b20383c MDL-72119 admin: Move Enable messaging to Advanced features
The "Enable messaging" setting has been moved from "Messaging
settings" page to "Advanced features".
Besides, the "Messaging settings" page won't be displayed if
$CFG->messaging is disabled.
2021-09-13 08:29:22 +02:00
Sara Arjona 6498d743c3 MDL-72119 admin: Move Enable competencies to Advanced features
The "Enable competencies" setting has been moved from "Competencies
settings" page to "Advanced features".
Besides, the behaviour of the "Competencies" section has been reviewed
to completely hide it when competencies are disabled.
2021-09-13 08:29:22 +02:00
Sara Arjona 5cbe9242f0 MDL-72118 block_html: Rename HTML block to Text 2021-09-13 08:28:38 +02:00
Sara Arjona 4cb297d4fd MDL-72116 dashboard: Remove some of the current blocks
The following blocks have been removed from the Dashboard:
- Online users
- Upcoming events
- Learning plans
- Recently accessed courses

This change will only apply on new installations.
2021-09-13 08:27:08 +02:00
Andrew Nicols 441f313217 MDL-72173 behat: Switch to behat login URL 2021-09-13 11:20:35 +08:00
gthomas2 8b52b17ad8 MDL-72173 behat: Add alternative login file for behat 2021-09-13 11:14:02 +08:00
Matt Clarkson 728e8c4a3c MDL-72527 core: Fix behat unit test failure
$CFG->behat_wwwroot, $CFG->behat_dataroot and $CFG->behat_prefix being
undefined resulted in unit test failure.
2021-09-13 11:32:50 +12:00
Carlos Castillo 2a6dce06df MDL-72251 Task: Display the time in full accuracy
For more specific diagnostic, it's added seconds in tasks time.
2021-09-12 13:08:25 -05:00
Eloy Lafuente (stronk7) 1d700796ca weekly release 4.0dev 2021-09-11 12:12:12 +02:00
Eloy Lafuente (stronk7) a41684d58f Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-09-11 12:12:07 +02:00
Shamim Rezaie 901ee1b6bc MDL-71240 filter_tex: Add allowlist for filter_tex_sanitize_formula 2021-09-10 17:57:33 +02:00
Jake Dallimore 1b58139052 Merge branch 'MDL-72216-master-fix' of git://github.com/junpataleta/moodle 2021-09-10 11:20:21 +08:00
Jun Pataleta 3d68eeb0d7 MDL-72216 question: Fix button spacing in preview template 2021-09-10 11:08:17 +08:00
Eloy Lafuente (stronk7) 8f4b2ca945 Merge branch 'MDL-71385-master-3' of git://github.com/junpataleta/moodle 2021-09-09 12:58:17 +02:00
Jun Pataleta 1401fa3bc1 Merge branch 'MDL-71899-master-2' of git://github.com/HuongNV13/moodle 2021-09-09 12:58:16 +02:00
Eloy Lafuente (stronk7) 69cdde9835 Merge branch 'MDL-63207-master' of git://github.com/cescobedo/moodle 2021-09-09 12:58:16 +02:00
Eloy Lafuente (stronk7) 633c2fcc5d Merge branch 'MDL-69855-master' of git://github.com/junpataleta/moodle 2021-09-09 12:58:16 +02:00
Ferran Recio 7659a18993 MDL-71228 course: sorting course on section state change 2021-09-09 11:16:10 +02:00
Ferran Recio 7f750dc01c MDL-71228 course: course index drag and drop 2021-09-09 11:16:10 +02:00
Jun Pataleta 71cf8ee1f4 MDL-71385 theme: Fix contrast for dimmed text against striped table rows
In order to achieve good colour contrast between dimmed text and striped
table rows, the background colour of the striped rows are being
lightened to 0.03 alpha. While $gray-600 is being adjusted to a bit
darker shade of #6a737b. This gives a colour contrast ratio of 4.5:1
between the dimmed text colour and the striped table row background
which meets WCAG 2.1 Level AA requirements.

Comparing the normal font colour (#212529) with the adjusted dimmed text
colour gives a contrast ratio of 3.20:1 which meets WCAG 2.1 Level AA
requirements and still makes them distinguishable from one another.
2021-09-09 15:59:23 +08:00
Huong Nguyen 3150612163 MDL-71899 performance: Improve activity completion data caching
- Modified SQL in get_data() to get the activity completion of all course modules without calling get_fast_modinfo() to reduce the DB queries.
 - Building activity completion cache for the whole course in one time instead of building the cache for each course module by passing $wholecourse = true to get_data()
2021-09-09 10:03:21 +07:00
Huong Nguyen e0dd5f268a MDL-71899 performance: Improve course image caching
Changed to use get_course() instead of get_fast_modinfo() for better performance
2021-09-09 09:21:14 +07:00
AMOS bot 5d53e43ba4 Automatically generated installer lang files 2021-09-09 00:07:44 +00:00
Eloy Lafuente (stronk7) bff1367a86 Merge branch 'MDL-72358-master' of git://github.com/sarjona/moodle 2021-09-08 17:07:58 +02:00
Eloy Lafuente (stronk7) 09825b1a9a Merge branch 'MDL-71614-fix' of github.com:sarjona/moodle 2021-09-08 16:32:43 +02:00
Sara Arjona 573b035122 MDL-71614 qbank_previewquestion: Add role button to Preview 2021-09-08 16:13:57 +02:00
Sara Arjona 37827bb15d MDL-71614 qbank_exporttoxml: Use correct helper class name 2021-09-08 15:27:13 +02:00
Eloy Lafuente (stronk7) d08cdaadb2 Merge branch 'MDL-72216-master' of git://github.com/lucaboesch/moodle 2021-09-08 11:28:47 +02:00
Jun Pataleta 8b0ea8df44 Merge branch 'MDL-68164-cache_pg_type' of https://github.com/brendanheywood/moodle 2021-09-08 17:02:57 +08:00
Sara Arjona 5c78efaaea Merge branch 'master_MDL-71614-previewquestion' of https://github.com/catalyst/moodle-MDL-70329 2021-09-08 09:29:22 +02:00
Safat Shahin 0d55b26da8 MDL-71614 qbank_previewquestion: Add Preview question plugin to core
This implementation will introduce a qbank plugin "previewquestion"
which will view the preview question action in the question bank
actions by replacing the core classes, scripts and yui modules.
This plugin will also replace the preview option in the edit
question form. Having this plugin will give users the
flexibility of enabling or disabling this feature from
the question bank view.
This change will also allow other qbank plugins to add
elements or information in the preview question page
by implementing a callback. It also changes the pop
up to page redirect from base view page to make sure
any changes in preview reflects in the base view, for
example, comments added and the number of comments in
the comments colum changes while back from the preview
page. Other locations like edit and qtype plugins where
the preview is implemented, stays the same.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
Co-Authored-By: Safat Shahin <safatshahin@catalyst-au.net>
2021-09-08 16:21:06 +10:00
Eloy Lafuente (stronk7) c2df50a673 Merge branch 'MDL-72499' of git://github.com/paulholden/moodle 2021-09-07 23:51:53 +02:00
Eloy Lafuente (stronk7) f014d3635a Merge branch 'MDL-72467' of git://github.com/paulholden/moodle 2021-09-07 23:46:58 +02:00
Eloy Lafuente (stronk7) 252c466bb1 Merge branch 'MDL-72071' of git://github.com/paulholden/moodle 2021-09-07 23:29:35 +02:00
Eloy Lafuente (stronk7) 3ad8d4b097 Merge branch 'MDL-71925-master_wordcount' of https://github.com/brickfield/moodle 2021-09-07 23:25:21 +02:00
Eloy Lafuente (stronk7) 6cd2a9319d Merge branch 'MDL-72488-master-importdatastring' of git://github.com/mudrd8mz/moodle 2021-09-07 22:59:15 +02:00
cescobedo 53b9dbdb11 MDL-63207 auth_ldap: Update user profile if field is empty 2021-09-07 22:50:48 +02:00
Eloy Lafuente (stronk7) b97c021a98 Merge branch 'MDL-69504-master' of https://github.com/snake/moodle 2021-09-07 20:03:45 +02:00
Eloy Lafuente (stronk7) 3a4ad12034 Merge branch 'MDL-67610-master-2' of git://github.com/junpataleta/moodle 2021-09-07 19:25:15 +02:00
Jun Pataleta 58bd7256ec MDL-67610 mod_forum: Do not include private replies in unread count
Fetching the counts of unread posts should only include unread regular
posts or unread private reply posts directed to the user unless the user
has the capability to read private replies.
In order to retrieve the correct counts, we also need to loop through
each forum instance in the course to check the capability of the user to
read private replies in each forum.
2021-09-07 23:19:26 +08:00
Eloy Lafuente (stronk7) add353c2f5 Merge branch 'MDL-72025-master' of https://github.com/sammarshallou/moodle 2021-09-07 16:30:44 +02:00
Paul Holden 0a33c4aacd MDL-72447 question: require sesskey to toggle plugin enabled state. 2021-09-07 12:10:28 +02:00
Brendan Heywood 66a923fe77 MDL-68164 dml: Cache postgres field type metadata in MUC 2021-09-07 19:29:31 +10:00
Paul Holden 1dfb62cbab MDL-71726 course: respect user access when exporting participants.
We should ensure that users being exported are enrolled on the
course being exported from. In courses where the current user can't
access all groups we should ensure that users being exported belong
to the same groups as them.
2021-09-07 09:04:23 +02:00
Sujith Haridasan 03093b42b8 MDL-71160 auth_db: Use strict comaprison
Use strict comparison to avoid type juggling.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-09-07 09:04:23 +02:00
Paul Holden d663d92357 MDL-71976 auth_shibboleth: consistent session parsing during logout. 2021-09-07 09:04:23 +02:00
Shamim Rezaie 83b23b86d3 MDL-71240 filter_tex: Sanitize the whole latex document
LaTeX documents have a preamble section and admins can use a \newcommand
statement to define new commands there (or to give an alias to another
command). This commit makes sure no blocked command can escape
sanitization by being used in a new seemingly harmless command that is
defined in the LaTeX preamble.
2021-09-07 09:04:23 +02:00
Shamim Rezaie e514e6951c MDL-71240 filter_tex: Support paranoid mode for openin_any in latex 2021-09-07 09:04:23 +02:00
Huong Nguyen af4fb733ee MDL-71797 quiz: Improve the checks when fetching user's attempts 2021-09-07 09:04:23 +02:00
Jun Pataleta fec5a40ddb Merge branch 'MDL-71671-master' of git://github.com/rezaies/moodle 2021-09-07 14:55:13 +08:00
Jake Dallimore 400186a18d Merge branch 'MDL-72041-master' of git://github.com/sarjona/moodle 2021-09-07 12:31:43 +08:00
Shamim Rezaie aa49eebd2a MDL-71671 atto_table: Insert menus html after the button 2021-09-07 13:53:50 +10:00
Shamim Rezaie 1e47c534a7 MDL-71671 editor_atto: Insert html of button menus after the button 2021-09-07 13:53:50 +10:00
Shamim Rezaie b2698f641a MDL-71671 core: Let YUI dialogues be inserted at given position 2021-09-07 13:52:49 +10:00
AMOS bot 9f183039e4 Automatically generated installer lang files 2021-09-07 00:07:46 +00:00
Eloy Lafuente (stronk7) fa67938486 Merge branch 'MDL-72286-master-test' of git://github.com/rezaies/moodle 2021-09-06 23:57:27 +02:00
Eloy Lafuente (stronk7) bf87572e0c Merge branch 'MDL-71639-fix' of github.com:sarjona/moodle 2021-09-06 17:49:22 +02:00
Eloy Lafuente (stronk7) 6afabd5757 Merge branch 'MDL-71641-fix' of github.com:sarjona/moodle 2021-09-06 17:48:58 +02:00
David Mudrák 2a1a00d79f MDL-72488 lang: Fix hard-coded English string at grades import form
Also adding a help tooltip as this seems to be the most important field
in the form and yet it was the only one without a help.
2021-09-06 17:40:46 +02:00
Sara Arjona 7cdb34aacf MDL-71639 qbank_exporttoxml: Use correct helper class name 2021-09-06 15:40:11 +02:00
Sara Arjona 46c1f7c43d MDL-71641 qbank_tagquestion: Fix behat failure with classic 2021-09-06 15:22:44 +02:00
Sara Arjona 2c90221888 Merge branch 'master_MDL-71641-tagquestion' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 13:06:01 +02:00
Safat Shahin 1db23e818c MDL-71641 qbank_tagquestion: Add Tag question plugin to core
This implementation will introduce a qbank plugin "tagquestion"
which will implement the tag question actions in the question
bank view by replacing the core class. Having this plugin
will give users the flexibility of enabling or
disabling this action.
2021-09-06 20:39:39 +10:00
Paul Holden 51ef7bd6f9 MDL-72499 event: add/correct event language strings as required. 2021-09-06 11:14:09 +01:00
Sara Arjona 3b903ae45d Merge branch 'master_MDL-71585-managecategories' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 10:39:06 +02:00
Sara Arjona c467ce725e Merge branch 'MDL-46778-master' of git://github.com/odeialba/moodle 2021-09-06 10:03:07 +02:00
Thong Bui 3972964e45 MDL-71137 File upload: progress bar issues display when D&D multi files 2021-09-06 14:11:03 +07:00
Sara Arjona a6d27c5b49 Merge branch 'master_MDL-71639-exporttoxml' of https://github.com/catalyst/moodle-MDL-70329 2021-09-06 08:58:20 +02:00
Eloy Lafuente (stronk7) 49b057e4dc Merge branch 'MDL-72428-master-enfix' of git://github.com/mudrd8mz/moodle 2021-09-03 19:09:52 +02:00
David Mudrák 9f8349bdfb MDL-72428 lang: Use the fixed strings in the tests 2021-09-03 17:38:35 +02:00
Helen Foster 92cc461235 MDL-72428 lang: Import fixed English strings (en_fix) 2021-09-03 17:38:35 +02:00
Eloy Lafuente (stronk7) 616e8a0e0b Merge branch 'MDL-72478-master' of git://github.com/sarjona/moodle 2021-09-03 17:02:40 +02:00
Amaia Anabitarte c5578db866 MDL-72310 core_course: Expand course index sections by default 2021-09-03 12:25:33 +02:00
Shamim Rezaie d4dfd44491 MDL-56773 atto_equation: The equation editor should always be rtl
Also re-applied the border that was added to the preview area as part of
MDL-44778. The class name that's used no longer exists.
2021-09-03 17:57:40 +10:00
Sara Arjona eb70e8f87e MDL-72478 calendar: Fix PHPUnit failure with offset
Before PHP 8.0.10, the time is lost when datetime->modify() is used
with weekdays. However, with PHP 8.0.10, the time is kept.
In consequence, the test_yearly_every_20th_monday_forever method
started failing.
For fixing it, the offset has been removed and the time has been set
to 00:00, so the behaviour will be the same regardless the PHP
version.
2021-09-03 09:28:46 +02:00
Simey Lameze cf7539ecb8 MDL-72426 theme: fix message and notification count colour contrast 2021-09-03 12:25:33 +08:00
Guillermo Gomez fb10b36c04 MDL-71585 qbank_managecategories: Add managecategories to core
This implementation will introduce a qbank plugin "managecategories"
which will add the question categories feature in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the category tab.
2021-09-03 09:41:18 +10:00
Peter Burnett 5414c59f0d MDL-72452 resource: Filter resource media embed output 2021-09-03 09:11:47 +10:00
Eloy Lafuente (stronk7) 6ae9f22653 Merge branch 'MDL-71014-cache-siteid' of https://github.com/brendanheywood/moodle 2021-09-02 23:00:17 +02:00
Paul Holden d12eb4943b MDL-72467 tool_task: improve cron status check details. 2021-09-02 17:32:19 +01:00
Sara Arjona c6d11f0f6c MDL-72041 qformat: Remove WebCT question format
WebCT was acquired by Blackboard in 2006, so qformat_webct has been
completely removed from Moodle core.
2021-09-02 16:16:55 +02:00
Odei Alba 15c7a4bd57 MDL-46778 behat: Allow different database for behat 2021-09-02 14:56:12 +02:00
sam marshall 5d62223bf0 MDL-72025 Upgrade: Out of memory when updating social profile fields 2021-09-02 13:42:58 +01:00
Luca Bösch 7923918df3 MDL-72216 questions: Don't stick buttons together in preview. 2021-09-02 13:37:14 +02:00
Safat Shahin c1797c6c9e MDL-71639 qbank_exporttoxml: Add Export to xml plugin to core
This implementation will introduce a qbank plugin "exporttoxml"
which will implement the export to xml action in the question
bank view by replacing the core class. Having this plugin will
give users the flexibility of enabling or disabling this action.
2021-09-02 21:21:57 +10:00
Sara Arjona 443a980aea weekly release 4.0dev 2021-09-02 11:51:22 +02:00
Brendan Heywood 7b938088b5 MDL-71014 core: Cache immutable bootstrap config locally 2021-09-02 13:22:28 +10:00
Jun Pataleta eefadd7492 Merge branch 'MDL-72440' of https://github.com/stronk7/moodle 2021-09-02 09:51:54 +08:00
Sara Arjona 72410362bf Merge branch 'MDL-72130-master' of git://github.com/ferranrecio/moodle 2021-09-01 18:15:18 +02:00
Sara Arjona 0d5139b908 Merge branch 'MDL-72169' of https://github.com/paulholden/moodle 2021-09-01 17:46:36 +02:00
Sara Arjona 2fe27fe564 Merge branch 'MDL-71375-master' of git://github.com/lameze/moodle 2021-09-01 17:09:27 +02:00
Sara Arjona 3eb399d283 Merge branch 'MDL-70376-master' of git://github.com/peterRd/moodle 2021-09-01 16:52:02 +02:00
Sara Arjona d7d1c1e9ee Merge branch 'MDL-71092-master' of git://github.com/abgreeve/moodle 2021-09-01 11:52:00 +02:00
Sara Arjona ff6e6ca8d2 Merge branch 'MDL-71674-master' of https://github.com/dcai/moodle 2021-09-01 11:36:33 +02:00
Dongsheng Cai 44f85767ab MDL-71674 editor_atto: more assessible errors 2021-09-01 18:15:49 +10:00
Adrian Greeve 8cf6ed1279 Merge branch 'MDL-70046-master-notificationfailure' of https://github.com/drjosephbaxter/moodle 2021-09-01 10:45:14 +08:00
abgreeve 40b6c725b4 MDL-71092 navigation: Update to better scan for the active node. 2021-09-01 09:09:21 +08:00
Adrian Greeve 67be3393bf MDL-71092 navigation: Update secondary nav to show category context. 2021-09-01 09:08:54 +08:00
Eloy Lafuente (stronk7) f6fbe3bac8 Merge branch 'MDL-72225' of git://github.com/paulholden/moodle 2021-09-01 00:00:23 +02:00
Eloy Lafuente (stronk7) bb8510fdba Merge branch 'MDL-72267-master' of git://github.com/bmbrands/moodle 2021-08-31 23:58:19 +02:00
Eloy Lafuente (stronk7) 2d9efcf7c8 Merge branch 'MDL-71999-master' of https://github.com/danielneis/moodle 2021-08-31 23:15:41 +02:00
Eloy Lafuente (stronk7) f13dc10e0a Merge branch 'MDL-71121' of https://github.com/paulholden/moodle 2021-08-31 23:12:58 +02:00
Jun Pataleta 6d1ead7f44 Merge branch 'MDL-71778-master' of git://github.com/lameze/moodle 2021-08-31 22:58:56 +08:00
Sara Arjona 42f1e5360a Merge branch 'MDL-72289' of git://github.com/paulholden/moodle 2021-08-31 14:11:03 +02:00
Sara Arjona e6a519cfd7 Merge branch 'MDL-72296' of https://github.com/paulholden/moodle 2021-08-31 13:52:31 +02:00
Sara Arjona aefb2a1243 Merge branch 'MDL-72303' of git://github.com/paulholden/moodle 2021-08-31 13:38:38 +02:00
Sara Arjona af6b9bcc4f Merge branch 'MDL-72137-master' of https://github.com/nguyenphuctien/moodle 2021-08-31 13:25:48 +02:00
Paul Holden 492b19db2c MDL-72192 user: observe fullname capability in selector context. 2021-08-31 12:17:28 +01:00
Paul Holden e814b5f0a0 MDL-71846 group: consistent escaping of user/group names. 2021-08-31 12:15:41 +01:00
Paul Holden b95dd8c5db MDL-72071 message: preserve window scroll opening processor modal. 2021-08-31 11:57:30 +01:00
Paul Holden 69d3e67189 MDL-72169 privacy: format course name/summary during export. 2021-08-31 11:55:56 +01:00
Paul Holden dcc130c7cf MDL-72289 output: allow customised inplace editable icon for editing.
Add optional argument to allow it to be defined by caller, and set
the default icon for `select` type as appropriate.
2021-08-31 11:37:02 +01:00
Paul Holden 7eae4e3e18 MDL-72296 admin: style form when prompting for upgrade key. 2021-08-31 11:23:00 +01:00
Paul Holden 052b384213 MDL-72303 task: fix assertions when filtering task logs report. 2021-08-31 11:21:38 +01:00
Paul Holden 0bcb4f862a MDL-72225 question: better specificity targetting form labels.
Since e2150f7d added `sr-only` text to announce Atto editors on
the page, that content appeared visible on question editing forms.

We only want this content to be visible for form labels.
2021-08-31 11:19:54 +01:00
Joseph Baxter c66c299939 MDL-70046 message: handle call processor failure
* ensure message_send returns false if message not sent
* digests only clear queue on success
* notifications requeue failed messages
2021-08-31 10:36:54 +01:00
Eloy Lafuente (stronk7) 28bdb57380 MDL-72440 js: reconcile npm installed stuff
When npm-shrinkwrap.json was regenerated few days ago by MDL-72014
running audit-fix on it, it seems that some checksums in the "lodash"
package were missing.

Now they are properly set and that's leading to npm-shrinkwrap.json
changes when people runs npm install (note npm ci is the recommended
way to install all the dev dependencies).

So, just reconcile the file to include the new checksums.
2021-08-31 11:17:07 +02:00
Sara Arjona 479bd0b9fa Merge branch 'master_MDL-71613-viewcreator' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 10:22:04 +02:00
Sara Arjona 0976e5ad08 Merge branch 'master_MDL-71575-viewquestiontext' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 10:05:34 +02:00
Sara Arjona 3156f4184f Merge branch 'master_MDL-71577-viewquestiontype' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 08:44:49 +02:00
Sara Arjona bfe57a0ddf Merge branch 'master_MDL-71576-viewquestionname' of https://github.com/catalyst/moodle-MDL-70329 2021-08-31 08:40:13 +02:00
cperves a457b85eb2 MDL-71778 admin: patch for hard-set check filter 2021-08-31 12:32:14 +08:00
Peter Dias 730defb1d1 MDL-70376 mod_assign: Reintroduce pdf orientation check
Reintroduce the orientation check and sizing when importing an image
2021-08-31 12:28:32 +08:00
Marc-Alexandre Ghaly b0067846ef MDL-71613 qbank_viewcreator: Add View creator to core
This implementation will introduce a qbank plugin "viewcreator"
which will view the question creator/modifier column in
the question bank view by replacing the core classes. Having
this plugin will give users the flexibility of enabling
or disabling the question creator and modifier column
in the question bank view.

Co-Authored-By: Marc-Alexandre Ghaly <marc-alexandreghaly@catalyst-ca.net>
2021-08-31 13:53:41 +10:00
Safat Shahin 97880f26b9 MDL-71575 qbank_viewquestiontext: Add View question text plugin to core
This implementation will introduce a qbank plugin "viewquestiontext"
which will view the question text row in the question bank view
by replacing the core class. Having this plugin will give users
the flexibility of enabling or disabling the question text row
in the question view.
2021-08-31 13:39:43 +10:00
Safat Shahin 354b98c86c MDL-71576 qbank_viewquestionname: Add View question name to core
This implementation will introduce a qbank plugin "viewquestionname"
which will view the question name column in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the question name column.
2021-08-31 12:06:00 +10:00
Safat Shahin c4eb3bda0a MDL-71577 qbank_viewquestiontype: Add View question type plugin to core
This implementation will introduce a qbank plugin "viewquestiontype"
which will view the question type column in the question bank view
by replacing the core class. Having this plugin will give users
the flexibility of enabling or disabling the question type
in the question bank view.
2021-08-31 11:49:41 +10:00
Eloy Lafuente (stronk7) 457c2026ed Merge branch 'MDL-71627-add-antivirus-check-api-and-notification-levels' of https://github.com/keevan/moodle 2021-08-30 12:39:29 +02:00
abgreeve a926f529b4 Merge branch 'MDL-72223' of https://github.com/paulholden/moodle 2021-08-30 15:40:44 +08:00
Jake Dallimore 483bc936bf Merge branch 'MDL-70433-master' of git://github.com/lucaboesch/moodle 2021-08-30 10:41:42 +08:00
Simeon Naydenov 3edf6b02e3 MDL-71375 lib: Fix tooltip in show_hide_icon in flexible table 2021-08-30 09:39:31 +08:00
Luca Bösch aa9a591ecd MDL-70433 grades: prevent double escaping in titles 2021-08-27 10:56:20 +02:00
Sara Arjona ab7ee8fa1d MDL-72358 contenttype_h5p: Improve error handling
In MoodleCloud it was raised that, in some cases, loading the content
bank, from a course page, gives an "Invalid H5P content URL", not
offering any way to delete the offending content or create new one.
An extra-check has been added to the "is_view_allowed" method to
guarantee the H5P API is called only if the H5P content has a file.
2021-08-27 10:39:39 +02:00
Sujith Haridasan 16e939fe2c MDL-72110 core_navigation: home page preference
Admin should respect the home page preference set
just like any other user. Also when user preference
is set to dashboard, the home points to the dashboard
and the dashboard should become "Site home" which would
point to Site home.
2021-08-27 10:05:48 +05:30
Andrew Nicols 206023c15f weekly release 4.0dev 2021-08-27 12:00:08 +08:00
Andrew Nicols 0fc9b2b640 NOBUG: Fixed SVG browser compatibility 2021-08-27 12:00:06 +08:00
Andrew Nicols eb968e8d29 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-08-27 12:00:05 +08:00
Sara Arjona 85feb719d8 Merge branch 'MDL-71209' of https://github.com/stronk7/moodle 2021-08-26 18:37:25 +02:00
Eloy Lafuente (stronk7) 083289d540 MDL-71209 behat: remove some useless "follow the course" steps
They are not really needed and, with the new course index (or
maybe with the new navigation, I've not checked), they don't work
any more. Hence, removing them.
2021-08-26 18:18:53 +02:00
Sara Arjona 9f7b645730 Merge branch 'MDL-71573' of https://github.com/stronk7/moodle 2021-08-26 18:09:09 +02:00
Eloy Lafuente (stronk7) a0e23f7c48 MDL-71573 behat: Move to 4.0 course-index compatible steps 2021-08-26 17:45:04 +02:00
Eloy Lafuente (stronk7) 15a3349c87 Merge branch 'master_MDL-71573-exportquestions' of https://github.com/catalyst/moodle-MDL-70329 2021-08-26 12:00:23 +02:00
Ferran Recio 5672bafcdb MDL-72130 courseformat: fix deprecated course_section_cm 2021-08-26 10:18:34 +02:00
Guillermo Gomez 6d4e072e54 MDL-71573 qbank_exportquestion: Add plugin to core
This implementation will introduce a qbank plugin "exporquestions"
which will add the export feature in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the export questions tab.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
2021-08-26 17:06:15 +10:00
Jun Pataleta 9036894c92 Merge branch 'MDL-68633-master-fix' of github.com:sarjona/moodle 2021-08-26 14:24:18 +08:00
Sara Arjona d2b5a689e1 MDL-68633 mod_forum: Fix behat error in classic 2021-08-26 08:11:18 +02:00
Sara Arjona 4f4b748a16 Merge branch 'MDL-69588-master-fix' of git://github.com/junpataleta/moodle 2021-08-26 07:23:34 +02:00
Sara Arjona 557d8fd475 Merge branch 'MDL-71029-master' of https://github.com/dcai/moodle 2021-08-26 07:12:20 +02:00
Andrew Nicols d929aa1fda Merge branch 'MDL-72403-master' of git://github.com/rezaies/moodle 2021-08-26 13:01:53 +08:00
Andrew Nicols 1c167ac64c Merge branch 'master-MDL-72187' of https://github.com/hdagheda/moodle 2021-08-26 12:28:54 +08:00
Andrew Nicols 9dea1359f4 Merge branch 'MDL-72315' of git://github.com/paulholden/moodle 2021-08-26 12:27:06 +08:00
Andrew Nicols 6d43959160 Merge branch 'MDL-67228-master' of git://github.com/sarjona/moodle 2021-08-26 12:22:49 +08:00
Andrew Nicols aa241e8047 Merge branch 'MDL-72361-master' of git://github.com/bmbrands/moodle 2021-08-26 12:20:47 +08:00
Andrew Nicols 3ab12ddbf5 Merge branch 'MDL-70176_master' of https://github.com/TomoTsuyuki/moodle 2021-08-26 12:08:56 +08:00
Andrew Nicols b69b7184e9 Merge branch 'MDL-72311-master' of git://github.com/aanabit/moodle 2021-08-26 11:54:08 +08:00
Andrew Nicols ed0700c16a Merge branch 'MDL-72271' of https://github.com/larsbonczek/moodle 2021-08-26 11:42:04 +08:00
Andrew Nicols dd41f234b6 Merge branch 'MDL-72152-master' of https://github.com/sammarshallou/moodle 2021-08-26 11:35:26 +08:00
Andrew Nicols 84556387ca Merge branch 'MDL-72153' of git://github.com/paulholden/moodle 2021-08-26 11:31:32 +08:00
Andrew Nicols fceac02bae Merge branch 'MDL-72312' of https://github.com/stronk7/moodle 2021-08-26 11:25:52 +08:00
Andrew Nicols dc41c2218b Merge branch 'master_MDL-71374-editquestion' of https://github.com/catalyst/moodle-MDL-70329 2021-08-26 11:11:28 +08:00
Andrew Nicols 9ec12d5980 Merge branch 'master_MDL-71573-exportquestions' of https://github.com/catalyst/moodle-MDL-70329 2021-08-26 11:08:57 +08:00
Jun Pataleta b36bdd18d8 MDL-69588 core: Activity navigation fixes 2021-08-26 09:58:15 +08:00
AMOS bot 46da12bc8c Automatically generated installer lang files 2021-08-26 00:07:49 +00:00
Sara Arjona 34f3d43397 Merge branch 'MDL-72106' of https://github.com/paulholden/moodle 2021-08-25 18:37:26 +02:00
Sara Arjona 2a043cd65e Merge branch 'MDL-70624-master' of git://github.com/jleyva/moodle 2021-08-25 16:24:57 +02:00
Sara Arjona f3ed47a47a Merge branch 'MDL-68633' of git://github.com/paulholden/moodle 2021-08-25 16:12:38 +02:00
Jun Pataleta 306a778855 MDL-69588 core: Revert user menu dropdown toggle to a link 2021-08-25 17:26:39 +08:00
Eloy Lafuente (stronk7) 24d0983142 Merge branch 'MDL-72163-master' of git://github.com/andrewnicols/moodle 2021-08-25 11:06:04 +02:00
Andrew Nicols 3f11a01e4b Merge branch 'MDL-37616' of https://github.com/tsmilan/moodle 2021-08-25 15:27:35 +08:00
Andrew Nicols b50e2b422f MDL-71608 qbank_importquestions: Correct plugin name in docblock 2021-08-25 15:13:41 +08:00
Andrew Nicols 61e4c8ddaa Merge branch 'master_MDL-71608-importquestions' of https://github.com/catalyst/moodle-MDL-70329 2021-08-25 15:09:32 +08:00
Andrew Nicols 617ff7fb83 MDL-72163 admin: Manually include some interfaces
Where the autolodaer is not registered (ABORT_AFTER_CONFIG and
installation), some adminlib classes, traits, and interfaces need to be
manually loaded.
2021-08-25 14:17:40 +08:00
Sara Arjona ef7cdecd7f Merge branch 'MDL-58579-master' of https://github.com/andrewnicols/moodle 2021-08-25 08:16:42 +02:00
Andrew Nicols 8662be1d85 MDL-58579 core_message: Refine behat steps to use message drawer 2021-08-25 14:01:57 +08:00
Jun Pataleta 4e75e73cb5 Merge branch 'primary_secondary_nav' of https://github.com/Chocolate-lightning/moodle 2021-08-25 10:42:57 +08:00
Jun Pataleta 300d0bc03a MDL-69588 mod: Additional Behat step fixes 2021-08-25 10:35:33 +08:00
Mathew May 89460a50d2 MDL-69588 navigation: Address final point from review 2021-08-25 10:35:23 +08:00
Eloy Lafuente (stronk7) 103027b723 Merge branch 'MDL-72163-master' of git://github.com/andrewnicols/moodle 2021-08-24 20:12:13 +02:00
Sara Arjona 640c04542f Merge branch 'MDL-70006' of git://github.com/danmarsden/moodle 2021-08-24 13:13:03 +02:00
Sara Arjona c5183622d6 Merge branch 'MDL-58579' of https://github.com/Chocolate-lightning/moodle 2021-08-24 12:35:10 +02:00
Sara Arjona d29c6f5977 Merge branch 'MDL-71952-master' of git://github.com/rezaies/moodle 2021-08-24 12:19:12 +02:00
Mathew May ccd62d2884 MDL-58579 block_myoverview: Implement searching within myoverview 2021-08-24 16:26:50 +08:00
Shamim Rezaie fc26c19c19 MDL-72403 calendar: prereserve courseid after form submit 2021-08-24 17:55:05 +10:00
Shamim Rezaie 7a529cc858 MDL-71952 calendar: Make breadcrumb consistent within calendar pages 2021-08-24 17:19:45 +10:00
Jake Dallimore 38ff4d528e MDL-69504 mod_lti: check role switches when setting lti roles on launch
is_siteadmin isn't aware of role switches, so make sure we're not in a
switched role before calling that method.
2021-08-24 14:33:11 +08:00
Mathew May 6cce0bf42e MDL-58579 block_myoverview: Refactor AMD to ES6 2021-08-24 13:43:04 +08:00
Mathew May c1130de5ff MDL-69588 accessibility: Address further review points 2021-08-24 11:56:02 +08:00
Andrew Nicols 2bb8497e1c Merge branch 'MDL-72014' of https://github.com/stronk7/moodle 2021-08-24 09:15:12 +08:00
Andrew Nicols 12d6a8c3d9 Merge branch 'MDL-72207-master' of git://github.com/jleyva/moodle 2021-08-24 09:06:07 +08:00
Kateryna Degtyariova b25e1738a6 MDL-72342 groups: Use get_columns() to handle BOM in CSV
Ensuring that BOM was properly removed from input CSV file by using get_columns() instead of parsing the raw data.
2021-08-24 10:33:29 +10:00
Heena Agheda 735a0fd5fd MDL-72187 logstore: record log store's visibility change 2021-08-24 09:53:57 +10:00
Eloy Lafuente (stronk7) c25fe3a183 Merge branch 'MDL-71055-master' of git://github.com/andrewnicols/moodle 2021-08-23 23:22:15 +02:00
Eloy Lafuente (stronk7) a65c0bbc0a MDL-71847 course: small tests fixes.
1) Namespace must match the one being covered.
2) the @covers annotation was wrong, missing class name(s). At the
   end I've used the coversDefaultClass annotation that allows to
   specify a whole namespace, useful in this case to get the 3
   existing (course, section, cm) classes covered.
2021-08-23 20:14:51 +02:00
Eloy Lafuente (stronk7) 101355638b Merge branch 'MDL-71847-master' of git://github.com/ilyatregubov/moodle 2021-08-23 18:48:25 +02:00
Eloy Lafuente (stronk7) 9438f0714b Merge branch 'MDL-72045-master' of git://github.com/lameze/moodle 2021-08-23 18:33:27 +02:00
Sara Arjona c14c308fbb Merge branch 'MDL-72257' of git://github.com/paulholden/moodle 2021-08-23 17:52:20 +02:00
Sara Arjona d91e9ccee8 Merge branch 'MDL-71603-master' of git://github.com/rezaies/moodle 2021-08-23 17:04:26 +02:00
Shamim Rezaie 1f8883cd14 MDL-71602 qtype_essay: label essay question's answer area 2021-08-24 00:57:08 +10:00
Eloy Lafuente (stronk7) 3417b7123d MDL-72312 environment: Add new optional custom check for igbinary
This optional environmental check will look if:

- the site is running php72.
- the site has igbinary extension enabled.
- the igbinary extension version is a buggy one >=3.2.2 <= 3.2.4
- the bug is reproducible.

And will warn if all the conditions are met.
2021-08-23 15:11:58 +02:00
Sara Arjona d5faaf5d6c Merge branch 'MDL-71209-master-fixup' of github.com:ferranrecio/moodle 2021-08-23 13:03:25 +02:00
Ferran Recio 0b18d478a2 MDL-71209 courseformat: disable course index in mod 2021-08-23 12:49:22 +02:00
abgreeve 56c34d71ef MDL-69588 theme_boost: Use partial templates in boost.
This moves away from using escaped html injected into the template
and uses partial templates instead.
2021-08-23 17:47:24 +08:00
Adrian Greeve 2d548e7433 MDL-69588 theme_boost: Change renderer to use templates.
This changes the existing context_header code copied from the
outputrenderers file and makes it use templates.
2021-08-23 17:47:24 +08:00
Mathew May 1f6bcd7eae MDL-69588 accessibility: Address review points 2021-08-23 17:47:24 +08:00
Mathew May 1ce2bb0007 MDL-69588 navigation: Show home primary node when required 2021-08-23 17:47:24 +08:00
Bas Brands eed2498215 MDL-72032 core: Fix aria roles moremenu
- Part of: MDL-69588
2021-08-23 17:47:24 +08:00
Peter Dias dfefc86393 MDL-72032 core: Add roles to items
- Part of: MDL-69588
2021-08-23 17:47:22 +08:00
Peter Dias 9f40dcae9a MDL-72032 core: Fixup the behat nav
- Part of: MDL-69588
2021-08-23 17:47:02 +08:00
Bas Brands da33265d73 MDL-72032 core_behat: secondary navigation behat fixes
- Part of: MDL-69588
2021-08-23 17:47:02 +08:00
Peter Dias 3110abec03 MDL-71901 core: Update the secondary nav nodes order
- Part of: MDL-69588
2021-08-23 17:47:02 +08:00
Peter Dias f4d3606a2e MDL-71901 core: Allow blocks to specify their own nav
- Part of: MDL-69588
2021-08-23 17:47:01 +08:00
Peter Dias f99a9eb117 MDL-71901 mod_assign: Custom secondary nav for assign
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Peter Dias d91183883e MDL-71901 core: Load plugin specific secondary nav
- Part of: MDL-69588
Try to search and load a plugin specific version of secondary nav
2021-08-23 17:46:40 +08:00
abgreeve 42e191cc4d MDL-72005 navigation: Change context header to switch breadcrumbs
- Part of: MDL-69588
This changes the context header to switch the breadcrumbs to the
top in boost. It also changes the context header in the modules
to have the activity name instead of the course name, and adds
an icon for the activity.
2021-08-23 17:46:40 +08:00
Mihail Geshoski e565850e50 MDL-71683 boost: Add behat tests related to the language selector
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Mihail Geshoski 7d739e9902 MDL-71683 behat: Add step definitions related to the lang menu in boost
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Mihail Geshoski 3e30d958b2 MDL-71683 behat: Add step definitions related to the user menu
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Mihail Geshoski 5f998b1249 MDL-71683 navigation: Update the primary nav unit tests
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Mihail Geshoski 68237ac761 MDL-71683 navigation: Implement the lang menu in the main navigation
- Part of: MDL-69588
2021-08-23 17:46:40 +08:00
Mihail Geshoski d78dc95d6b MDL-71683 navigation: Add a lang submenu within the user menu
- Part of: MDL-69588
The menu used to select one of the available languages is now
displayed as a submenu within the user menu only when a user is
logged in.
2021-08-23 17:46:40 +08:00
Mihail Geshoski 7318b68b77 MDL-71683 navigation: Enable submenus within the user menu
- Part of: MDL-69588
Adds support for creating collapsible submenus within the user
menu dropdown.
2021-08-23 17:46:40 +08:00
Mathew May d9016d2fa7 MDL-72006 navigation: Reduce max secondary nav items
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Peter Dias d677a3b690 MDL-71900 core: Remove the node if only a single node displayed
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Mihail Geshoski f836887844 MDL-69588 navigation: Utilize showinsecondarynavigation in secondary nav
Utilizes the 'showinsecondarynavigation' property from the
navigation_node object to avoid displaying any unwanted nodes in the
secondary navigation.
2021-08-23 17:46:39 +08:00
Mihail Geshoski bddc64a39d MDL-69588 navigation: Enable setting node visibility in secondary nav
Adds new property 'showinsecondarynavigation' and a new setter method
in the navigation_node class to enable setting the visibility of the
node in the secondary navigation.
2021-08-23 17:46:39 +08:00
Mihail Geshoski ee63214306 MDL-71977 navigation: Set default more menu nodes in mod secondary nav
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Adrian Greeve 1a8b11b721 MDL-71877 navigation: Set the correct url for the activity view.
- Part of: MDL-69588
The first tab in the secondary navigation is to show the tab to
navigate to the modules view.php file. This patch sets the url
to view.php and if it matches the pages url, also sets it as
active.
2021-08-23 17:46:39 +08:00
Mihail Geshoski 2748d4e7ee MDL-71680 navigation: Set forceintomoremenu to child nodes recursively
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Mihail Geshoski 1c017ad8fb MDL-71680 navigation: Update templates/js to force nodes into more menu
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Mihail Geshoski e3f35a2f22 MDL-71680 navigation: Add unit tests for force_nodes_into_more_menu()
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Mihail Geshoski 73154233e0 MDL-71680 navigation: Add unit tests for set_force_into_more_menu()
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Mihail Geshoski 9b792e814b MDL-71680 navigation: Force secondary navigation nodes into "more" menu
- Part of: MDL-69588
Enables to pre-define nodes which should be added into the "more" menu
by default and also setting a maximum limit of displayed nodes in the
secondary navigation.
2021-08-23 17:46:39 +08:00
Bas Brands 17e9d4a51a MDL-70202 theme_boost: push secondary navigation in admin search page
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Bas Brands 00239bccad MDL-70202 theme_boost: remove accessibility changes for moremenu tabs
- Part of: MDL-69588
- the more menu will be responsive and does not need changed tab styles on small devices
2021-08-23 17:46:39 +08:00
Bas Brands 527562d12f MDL-70202 theme_boost: frontend for secondary navigation
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Bas Brands da67b468fa MDL-70208 theme_boost: frontend for primary navigation
- Part of: MDL-69588
2021-08-23 17:46:39 +08:00
Mihail Geshoski 19fd786270 MDL-71680 navigation: Enable forcing navigation_node into "more" menu
- Part of: MDL-69588
Adds new property 'forceintomoremenu' and new setter method in the
navigation_node class to enable forcing a navigation note into a
"more" menu whenever possible.
2021-08-23 17:46:38 +08:00
Adrian Greeve f28535082c MDL-70196 behat: Add a new step for navigating with the navbar.
- Part of: MDL-69588
A lot of tests work on the basis that you can follow the last item
of the breadcrumb nav bar. This is not the case. This step will first
check to see if the page is already the one requested. If it is then
nothing further needs to happen, otherwise we follow the link in the
navbar.
2021-08-23 17:46:38 +08:00
Adrian Greeve c8422f4576 MDL-70196 mod_assign: Allow the last navbar item to have a link.
- Part of: MDL-69588
This updates a method to allow the last item in the breadcrumb
navbar to have a URL.
2021-08-23 17:46:38 +08:00
Adrian Greeve c3871a9174 MDL-70196 navigation: Update to pages to add a URL.
- Part of: MDL-69588
Some pages have added an item to the end of the  navbar without a
link for it. This adds the current page as a url to this navigation
node. Doing this brings it in line with all of the other pages
around Moodle and also helps with the new navigation changes in
theme boost.
2021-08-23 17:46:38 +08:00
Adrian Greeve 7d435fb5f2 MDL-70196 navigation: Update to feature files.
- Part of: MDL-69588
A lot of tests rely on the last element of the breadcrumb being
active. This updates feature files to not rely on this anymore.
2021-08-23 17:46:38 +08:00
Adrian Greeve dbc014b2a6 MDL-70196 theme_boost: New navbar renderer for navbar alterations
- Part of: MDL-69588
2021-08-23 17:46:38 +08:00
Peter Dias 5446cadef8 MDL-71148 core_navigation: Unit test for the primary output
- Part of: MDL-69588
2021-08-23 17:46:38 +08:00
Peter Dias 0c76a848ea MDL-71148 core_navigation: Templates to generate user menu
- Part of: MDL-69588
2021-08-23 17:46:36 +08:00
Peter Dias 8782702d34 MDL-71148 core_navigation: Provide user menu as nodes
- Part of: MDL-69588
2021-08-23 17:45:55 +08:00
Peter Dias 6462e651e4 MDL-71148 core_navigation: New renderer to combine nav components
- Part of: MDL-69588
2021-08-23 17:45:55 +08:00
Peter Dias 25e178aa59 MDL-71148 core_navigation: Move unauthenticated user checks to the lib
- Part of: MDL-69588
Added conditional information in user_get_user_navigation_info for
when a user is unauthenticated.
2021-08-23 17:45:55 +08:00
Peter Dias fe285d5496 MDL-71148 core_navigation: Provide a menu header in a system context.
- Part of: MDL-69588
2021-08-23 17:45:55 +08:00
Ferran Recio 1389487a1c MDL-71209 mod_assign: fix anonymous submission behat 2021-08-23 11:38:07 +02:00
Tien Nguyen dd6fd520e3 MDL-72137 Quiz: Quiz submission email notification update
Quiz submission notifications: separate out User versus System
2021-08-23 15:38:33 +07:00
Sara Arjona 4a4e452fa9 MDL-67228 tool: Set tool_replace maturity
The tool_replace has been in core for ages and, at this point, it
seems safe to set maturity from ALPHA to STABLE.
2021-08-23 07:49:20 +02:00
Andrew Nicols 891d1bfad3 MDL-71055 behat: Update core settings to use generator
These changes have only been applied to settings which were already
using settings names and values, but which were still using the UI.
2021-08-23 12:23:03 +08:00
Guillermo Gomez 06f192aec9 MDL-71573 qbank_exportquestion: Add plugin to core
This implementation will introduce a qbank plugin "exporquestions"
which will add the export feature in the question bank view
by replacing the core classes. Having this plugin will give users
the flexibility of enabling or disabling the export questions tab.

Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>
2021-08-23 12:06:20 +10:00
Safat Shahin 3e93aa780f MDL-71608 qbank_importquestions: Add importquestions to core
This implementation will introduce a qbank plugin "importquestions"
which will allow user to import a bank of questions in the question bank view
by replacing the core class. Having this plugin will give users
the flexibility of enabling or disabling the question import
in the question bank view.

Co-Authored-By: Marc-Alexandre <marc-alexandreghaly@catalyst-ca.net>
2021-08-23 11:47:05 +10:00
Safat Shahin 47478d6b59 MDL-71574 qbank_editquestion: Add Edit question plugin to core
This implementation will introduce a qbank plugin "editquestion"
which will implement the edit question, add question and copy
question actions in the question bank view by replacing the
core classes. Having this plugin will give users the
flexibility of enabling or disabling these actions.
2021-08-23 11:00:16 +10:00
Eloy Lafuente (stronk7) 19b1f2f3d4 Merge branch 'MDL-71973' of https://github.com/mohalisad/moodle 2021-08-20 19:07:25 +02:00
Víctor Déniz a651a21912 Merge branch 'MDL-71209-master' of git://github.com/aanabit/moodle 2021-08-20 15:50:15 +01:00
Andrew Nicols c79d58a50b MDL-71209 behat: Fix behat for new changes
Co-authored-by: Ilya Tregubov <ilya@moodle.com>
2021-08-20 16:49:06 +02:00
Ferran Recio ef745009ed MDL-71209 courseformat: add state suport to legacy action
Adapt the current course editing libraries to modify also
the course state data. This way, any UI component that
watches the course structure can react to the changes.
2021-08-20 16:49:06 +02:00
Ferran Recio 830c3eb907 MDL-71209 courseformat: add course index modules
The course index is the first UI component that implements the new
drawers and the reactive components. The course index uses the course
state to present the current course structure and changes whenever
that structure change.
2021-08-20 16:49:06 +02:00
Ferran Recio 804e138cb2 MDL-71209 core: reactive parent registration and updates
Now a reactive component could inherit the reactive instance from the
parent DOM element. This way components are more reusable. Apart, some
new state updates have been added. To the previous create, update and
delete, now the update message could provide also put and override,
making the state update message more REST alike and simplifying the
backend returns processing.
2021-08-20 16:49:06 +02:00
Eloy Lafuente (stronk7) 4162b92af9 MDL-72014 nodejs: audit fix to solve some security reports
Simply run npm audit fix that updates these main packages:

- xmldom 0.6.0
- grunt 1.4.1
- gherkin-lint 4.2.2

(and also a bunch of dependencies)
2021-08-20 13:49:46 +02:00
Ilya Tregubov 1464843a25 weekly release 4.0dev 2021-08-20 13:24:29 +02:00
Ilya Tregubov c6ac30c0ee Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-08-20 13:24:27 +02:00
Tomo Tsuyuki 0646a40b20 MDL-70176 mod_forum: Grading respects separate groups filter 2021-08-20 13:27:50 +10:00
Michael Milette de91d620f2 MDL-58395 auth_ldap: User sync now brings problem details and continue
Co-authored-by: Iñaki Arenaza <iarenaza@mondragon.edu>
2021-08-19 19:53:22 +02:00
Ilya Tregubov 9937593420 MDL-71516 core_question: Fix url not being composed correctly. 2021-08-19 17:48:00 +02:00
Ilya Tregubov eba1d32c00 MDL-49202 core: Comment broken test.
Should be fixed properly as part of MDL-72377.
2021-08-19 17:04:43 +02:00
Ilya Tregubov b8e4235160 Merge branch 'MDL-49202_master' of git://github.com/mdjnelson/moodle 2021-08-19 16:53:30 +02:00
Mark Nelson 9a0d63383a MDL-49202 core: fix failing unit tests
See MDL-72377.
2021-08-19 20:16:29 +08:00
Mark Nelson 757f872b72 MDL-49202 core_grades: add Behat tests 2021-08-19 20:16:29 +08:00
Juan Leyva 5784c39341 MDL-72207 assign: Support all participants in get_submission_status WS 2021-08-19 14:11:33 +02:00
Julien Boulen 196cb4e1f0 MDL-71093 backup: fix backup when activity names use HTML tags 2021-08-19 11:09:27 +02:00
Andrew Nicols 6f36b0998d MDL-71615 qbank_deletequestion: Ensure that the returnurl is qualified 2021-08-19 16:12:29 +08:00
Bas Brands 2092500f8a MDL-72361 theme_boost: page scroll issue on drawer close 2021-08-19 09:27:23 +02:00
Bas Brands 626af1a5f0 MDL-71550 theme_boost: improve dropdown hover styles 2021-08-19 09:15:20 +02:00
Andrew Nicols 73754b8c39 Merge branch 'MDL-72143-master' of git://github.com/jleyva/moodle 2021-08-19 09:10:18 +02:00
Andrew Nicols c65ea81183 Merge branch 'MDL-72135-master' of https://github.com/golenkovm/moodle 2021-08-19 09:10:18 +02:00
Andrew Nicols 70a2975041 Merge branch 'MDL-71709' of git://github.com/paulholden/moodle 2021-08-19 09:10:18 +02:00
Andrew Nicols 517fe298c3 Merge branch 'MDL-68639-master' of https://github.com/xcaro/moodle 2021-08-19 09:10:18 +02:00
Andrew Nicols 84077e5263 Merge branch 'MDL-71944' of git://github.com/paulholden/moodle 2021-08-19 09:10:18 +02:00
Andrew Nicols d5e04cab9a MDL-66266 core_message: Whitespace fix 2021-08-19 09:10:18 +02:00
Andrew Nicols c0d2f724ef Merge branch 'MDL-66266-master' of git://github.com/cescobedo/moodle 2021-08-19 09:10:18 +02:00
Eloy Lafuente (stronk7) dd23f8d903 Merge branch 'MDL-72186' of git://github.com/paulholden/moodle 2021-08-19 09:10:17 +02:00
Eloy Lafuente (stronk7) 39d9c8fdd4 Merge branch 'master-MDL-72210' of https://github.com/golenkovm/moodle 2021-08-19 09:10:17 +02:00
Eloy Lafuente (stronk7) 4275de7315 Merge branch 'MDL-72206-master' of git://github.com/junpataleta/moodle 2021-08-19 09:10:17 +02:00
Víctor Déniz 735bd7ffdb Merge branch 'MDL-72097' of git://github.com/danmarsden/moodle 2021-08-19 09:10:17 +02:00
Andrew Nicols 3a0f2d7d0b MDL-71615 qbank_deletequestion: Whitespace fixes 2021-08-19 09:10:17 +02:00
Safat Shahin 38ec802858 MDL-71615 qbank_deletequestion: Add Delete question plugin to core
This implementation will introduce a qbank plugin
"deletequestion" which will implement the delete question
action in the question bank view by replacing the core
class. Having this plugin will give users the
flexibility of enabling or disabling this action.
2021-08-19 09:10:17 +02:00
Andrew Nicols aebcf8d909 Merge branch 'MDL-69451-shared-temptables' of https://github.com/srdjan-catalyst/moodle 2021-08-19 09:10:17 +02:00
Víctor Déniz 94ca638c4c Merge branch 'master-MDL-72239-v2' of https://github.com/golenkovm/moodle 2021-08-19 09:10:17 +02:00
Víctor Déniz d078fe1197 Merge branch 'MDL-71685' of https://github.com/paulholden/moodle 2021-08-19 09:10:17 +02:00
Ilya Tregubov 192211b51d Merge branch 'MDL-71954-master' of git://github.com/rezaies/moodle 2021-08-19 09:10:16 +02:00
Víctor Déniz cff46fe6c1 Merge branch 'MDL-71487' of https://github.com/paulholden/moodle 2021-08-19 09:10:16 +02:00
Ilya Tregubov c0fc0747a8 Merge branch 'master_MDL-71516-qbank' of https://github.com/catalyst/moodle-MDL-70329 2021-08-19 09:10:16 +02:00
Ilya Tregubov 43ea2271eb Merge branch 'MDL-71814-master' of git://github.com/NashTechOpenUniversity/moodle 2021-08-19 09:10:16 +02:00
Dan Marsden 8aba9d1d34 MDL-72097 mod_assign: pass gradinginfo to disabled check. 2021-08-19 09:10:12 +02:00
Thong Bui 6ed50590bd MDL-72064 Questions: response selection area enough 2021-08-19 13:45:59 +07:00
Mark Nelson 0e68c5817f MDL-49202 core_grades: perform same action on categories in form
When you click on 'Edit' then 'Hide' on a grade item like a course category
that contains many grade items, the course and the grade items are set to
hidden. However, if you use the 'hidden' option on the 'Edit settings'
page it only hides that item and none of the items (assignment etc)
under that course category. We want them to be consistent.
2021-08-19 14:44:34 +08:00
Mikhail Golenkov 8355a9a018 MDL-72239 phpunit: Assert the number of db queries to be less or equal
The course unit test assumes the number of db call. This assumption
is correct in vanilla moodle only. Once some plugins installed their
observers may do extra db calls. Due to caching the number of actual
db calls in the unit test may be fewer.
2021-08-18 11:01:29 +10:00
AMOS bot 5de4b04f1a Automatically generated installer lang files 2021-08-18 00:07:45 +00:00
Amaia Anabitarte d45058fd21 MDL-72311 core_course: Go to course content when creating a course 2021-08-17 19:16:37 +02:00
Mark Nelson 25bce5c526 MDL-49202 core_grades: perform same action on items in form
When you click on 'Edit' then 'Hide' on a grade item like an
assignment it also hides the grades. However, If you use the
'hidden' option on the 'Edit settings' page it just hides that
item and doesn't hide grades as well. We want them to be
consistent.
2021-08-17 20:12:27 +08:00
safatshahin dfed4fd040 MDL-71516 core_question: Qbank api implementation
This commit implements the qbank api so that any plugin
can implement its own question bank. This api currently
works parallely with the moodle core classes and the
added qbank in the core, means the moment a plugin
is installed, that object is replaced with the object
from the plugin instead of core, which means the api
has flexibility till the plugins are integrated and the
plugins can be integrated in any order.

All the old classes are still there and not deprecated
as there is a different tracker for the changes to the
quiz and another tracker for class deprecation and
class renaming. Core question units tests are pointing
to the new api structure but the classes are pointing
to the location related to the plugin availability.

Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
Co-Authored-By: Guillermo Gomez Arias <guillermogomez@catalyst-au.net>

one more array fix
2021-08-17 18:57:31 +10:00
Frédéric Massart 1273c87cea MDL-72286 editor_atto: Declare type on plugins button groups 2021-08-17 11:58:58 +10:00
Nhan Vo 7bcd58783f MDL-68639 HTML Editor (Atto): Invalid HTML for nested lists 2021-08-17 02:51:14 +07:00
toanlam af67582dbe MDL-72031 atto_recordrtc: separate out max_time for audio/video files 2021-08-16 17:11:37 +07:00
Thach Le Huy b3be2bbb67 MDL-71814 Atto: File picker – file info panel focus issue 2021-08-16 16:52:08 +07:00
Jun Pataleta 6bd3db4fb5 MDL-69855 mod_forum: Deprecate postmailinfolink lang string
With the info text and reply link text being split, this lang string
is no longer being used and should be deprecated.
2021-08-16 17:42:18 +08:00
Jun Pataleta 6a82cbc6ab MDL-69855 mod_forum: Don't show reply link in email for private replies 2021-08-16 17:42:18 +08:00
safatshahin 351176bb71 MDL-71516 core_question: Create new plugin type - qbank
This commit implements the qbank plugin type which
includes the boilerplate for the qbank plugin, the
qbank plugin management admin page and required core
code addition.
2021-08-16 09:59:11 +10:00
safatshahin 86bdf87966 MDL-71516 core_question: Class movement for moodle autoloading
Movement of classes to classes/local/bank and additional
todo addition to all the existing ones to align with
future tracker for class renaming. This commit does not
contain any class renaming of the old or deprecated
classes. MDL-72004 will be used to rename, remove or
deprecate old classes after integrating all the qbank
plugins.
2021-08-16 09:59:11 +10:00
Mikhail Golenkov bdba9f695d MDL-72135 auth_mnet: Remove rand() from mnet cron task 2021-08-14 10:54:00 +10:00
Mikhail Golenkov 227a831aa1 MDL-72210 phpunit: Remove excessive curl mock responses 2021-08-14 10:38:55 +10:00
AMOS bot a52007cbe8 Automatically generated installer lang files 2021-08-14 00:07:46 +00:00
Paul Holden b45970de49 MDL-72153 privacy: correctly export user description/files. 2021-08-13 12:41:08 +01:00
Ilya Tregubov 6973d2c88a Merge branch 'MDL-72035-excel_csv_bom' of git://github.com/leonstr/moodle 2021-08-13 11:09:27 +02:00
Andrew Nicols 3ea604baf4 Merge branch 'MDL-72138' of https://github.com/paulholden/moodle 2021-08-13 10:28:26 +08:00
Andrew Nicols f06ef721f7 Merge branch 'MDL-72325-master-tourspolicy' of git://github.com/mudrd8mz/moodle 2021-08-13 09:58:12 +08:00
Trisha Milan c0ed64350c MDL-37616 enrol_cohort: Add suspend only unenrolaction 2021-08-13 10:55:12 +10:00
Ilya Tregubov 036800d99d weekly release 4.0dev 2021-08-12 16:50:14 +02:00
Ilya Tregubov 72d8d10ef1 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-08-12 16:50:12 +02:00
David Mudrák f9ee118e94 MDL-72325 user: Use the core_user::awaiting_action() in existing places
There were existing places each doing its own checks similar to the ones
covered by the newly added core_user::awaiting_action() method. This
patch replaces those custom checks with this new API call.
2021-08-12 13:05:38 +02:00
David Mudrák 124b82831b MDL-72325 user: Do not show user tours without site policy agreed
Fetching user tours used to fail on external_api::validate_context() and
require_login() calls if the user did not have the site policy agreed.

The patch introduces a check to see if the user is fully set up and
ready to use the site before attempting to load the tours.
2021-08-12 13:05:38 +02:00
David Mudrák 7a8eae027f MDL-72325 user: Introduce new core_user::awaiting_action() method
The method allows to check if the user is fully ready to use the site or
whether there is an action (such as filling the missing profile field,
changing password or agreeing to the site policy) needed.
2021-08-12 13:05:38 +02:00
Víctor Déniz 1e9118f4d6 MDL-71500 calendar_threemonth: fix wrong behat step 2021-08-12 11:35:31 +01:00
Paul Holden 58c6afb94d MDL-72138 task: allow running core tasks from schedules UI.
Fixes regression from 9c4510a3 that didn't consider tasks belonging
to core, rather than just those belonging to plugins.
2021-08-12 09:49:10 +01:00
Andrew Nicols 7b7b42b643 Merge branch 'MDL-71844' of https://github.com/paulholden/moodle 2021-08-12 10:24:50 +08:00
Eloy Lafuente (stronk7) ee468d201d Merge branch 'MDL-72265' of https://github.com/timhunt/moodle 2021-08-11 23:59:01 +02:00
Eloy Lafuente (stronk7) 401a79a79e Merge branch 'MDL-71515-master_improve_test_email' of https://github.com/guillogo/moodle 2021-08-11 23:41:34 +02:00
Eloy Lafuente (stronk7) 962b7f56a8 Merge branch 'MDL-71500-master' of git://github.com/lameze/moodle 2021-08-11 20:10:40 +02:00
Víctor Déniz 5f0690f5db Merge branch '71992-master-fix-behat-tests-on-https' of https://github.com/DSI-Universite-Rennes2/moodle 2021-08-11 14:32:20 +01:00
Víctor Déniz eda5b689fd Merge branch 'MDL-72000' of https://github.com/paulholden/moodle 2021-08-11 10:59:03 +01:00
Eloy Lafuente (stronk7) 615eb63ca4 Merge branch 'MDL-71945-master' of https://github.com/lucisgit/moodle 2021-08-11 11:46:56 +02:00
Eloy Lafuente (stronk7) 5307bd2930 Merge branch 'MDL-72242-master-svgforcedfilter' of git://github.com/mudrd8mz/moodle 2021-08-11 11:39:52 +02:00
Paul Holden a23eb3784e MDL-72315 reportbuilder: fix/improve module jsdoc. 2021-08-11 09:13:12 +01:00
Kevin Pham 0b997f63e3 MDL-71627 check: Add AV status, notification levels and more logging
- `notifylevel` will change what gets sent as part of the antivirus
  notification emails based on the scan type. For example if set on
  SCAN_RESULT_FOUND, it will not notify for any detections, if set to
  SCAN_RESULT_ERROR, it will notify for both detections and errors.
- `threshold` will determine how far the lookback is when displaying the
  status of the /reports/status (System Status) page. It will display as
  an ERROR state if there has been scanner issues within this certain
  threshold period
- As part of the above, scanner errors will now trigger a new event
  which will be logged as antivirus_scan_data_error or
  antivirus_scan_file_error. Due to the nature of it reading from the
  logs table, it only works currently for the "Standard logging"
  logstore.
2021-08-11 11:46:15 +10:00
Kevin Pham 5694f6eb11 MDL-71627 check: Add missing statusunknown string 2021-08-11 11:46:15 +10:00
Víctor Déniz 21909b59fb Merge branch 'MDL-69918-master' of git://github.com/andrewnicols/moodle 2021-08-10 19:15:22 +01:00
Eloy Lafuente (stronk7) b3c47da570 Merge branch 'MDL-72254' of https://github.com/timhunt/moodle 2021-08-10 19:28:13 +02:00
Eloy Lafuente (stronk7) 537c909680 Merge branch 'MDL-71656-master' of git://github.com/HuongNV13/moodle 2021-08-10 19:09:33 +02:00
Eloy Lafuente (stronk7) 08850538b4 Merge branch 'MDL-70165' of git://github.com/paulholden/moodle 2021-08-10 18:51:02 +02:00
Andrew Nicols 530322e2ce MDL-69918 core: Update uses of legacy form change checker 2021-08-10 23:54:01 +08:00
Andrew Nicols cbe19158e9 MDL-69918 core: Rewrite Form Change Checker a ES6 2021-08-10 23:54:01 +08:00
Ilya Tregubov 15e8ee2245 Merge branch 'MDL-71937-master' of git://github.com/sarjona/moodle 2021-08-10 16:24:51 +02:00
Ilya Tregubov 85c2f2fc82 Merge branch 'MDL-72033-master' of git://github.com/NashTechOpenUniversity/moodle 2021-08-10 15:59:37 +02:00
Sara Arjona 24fcc7ebea MDL-71937 badges: simplify badges page
Apart from reorganising the information displayed in the badges page,
this information has been moved to a template in order to make it
easier to modify and maintain.
2021-08-10 15:59:06 +02:00
Tony Butler a0595719d0 MDL-71945 mod_assign: Remove unneccesary call to assign_update_grades()
The update_grade() call achieves the same thing with additional checks.
2021-08-10 11:05:48 +01:00
Lars Bonczek ff1199cc5c MDL-72271 mod_quiz: fix secure_window close function 2021-08-10 11:51:33 +02:00
Paul Holden 2661214376 MDL-72223 atto_link: link text should match selected text.
Rather then using all text of the currently selected node, instead
use that text the user has currently selected.
2021-08-10 09:45:48 +01:00
Paul Holden d87d6c226d MDL-72106 calendar: redirect to same page post-subscription process.
Avoid issues when reloading page/re-sending POST data.
2021-08-10 09:40:45 +01:00
Paul Holden 969cbd2c7d MDL-71709 libraries: upgrade to version 1.10.1 of MaxMind. 2021-08-10 09:37:31 +01:00
Paul Holden 75e72a2b24 MDL-71844 tool_task: preserve navigation when executing task. 2021-08-09 10:44:45 +01:00
Paul Holden 95851ef8ba MDL-71944 mod_wiki: use confirm output API for comment deletion. 2021-08-09 10:41:00 +01:00
Paul Holden c18987bbe1 MDL-71685 dataformat_json: include column names in exported file. 2021-08-09 10:38:10 +01:00
Paul Holden fdbbef6372 MDL-71487 admin: ensure filesize settings don't overflow integer. 2021-08-09 10:36:10 +01:00
Paul Holden 25be710d23 MDL-72000 user: support custom user fields in participants export. 2021-08-09 10:33:48 +01:00
Paul Holden 2b6d4c3077 MDL-70165 course: always import inplace editable module.
It's required on the course participants table for the roles/groups
columns, but isn't always loaded after adding the first participant.
2021-08-09 10:30:22 +01:00
Huong Nguyen 80bf558bea MDL-71656 atto: Add meaningful labels to colour items
Colour chooser supported:
 - atto_fontcolor
 - atto_backcolor
2021-08-09 16:00:21 +07:00
AMOS bot 5789ac5274 Automatically generated installer lang files 2021-08-06 00:07:51 +00:00
Srdjan fa0eecd6bf MDL-69451 dml: use same temptables for both rw and ro database handle
moodle_read_slave_trait: when creating another handle, restore temptables
property that is clobbered by raw_connect().

Also a better condition for temptable related queries detection in
pgsql_native_moodle_database.

dml_pgsql_read_slave_test::test_temp_table(): use real db connection
if possible, otherwise skip the test.
2021-08-06 10:00:20 +10:00
Víctor Déniz 0d0e66d37c weekly release 4.0dev 2021-08-05 16:27:17 +01:00
Víctor Déniz 3c41448585 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-08-05 16:27:11 +01:00
Tim Hunt e7880337ad MDL-72265 backup: fix checking of override capabilites on restore
Thanks to Peter Dias <peter@moodle.com> for his help with the unit test.
2021-08-05 13:54:59 +01:00
Víctor Déniz 6d0a49f51f Merge branch 'MDL-71835' of git://github.com/paulholden/moodle 2021-08-04 23:22:40 +01:00
Víctor Déniz 4bd6f3938e Merge branch 'MDL-71152-master' of git://github.com/roland04/moodle 2021-08-04 20:37:33 +01:00
Víctor Déniz 9e6634556a Merge branch 'MDL-72262-master' of git://github.com/ilyatregubov/moodle 2021-08-04 12:08:22 +01:00
abgreeve 3757b5cd63 Merge branch 'MDL-71050' of https://github.com/paulholden/moodle 2021-08-04 15:54:08 +08:00
abgreeve 26125cf670 Merge branch 'MDL-71070' of git://github.com/paulholden/moodle 2021-08-04 10:14:18 +08:00
Paul Holden 07611b5f12 MDL-71070 report_configlog: convert report to system report.
Convert to system report API provided by Report builder. The entity
defines the columns and filters, which are used by the system
report class we have created.
2021-08-03 12:17:11 +01:00
Paul Holden a4a3721081 MDL-71070 reportbuilder: consistent user fullname columns sorting.
Report columns that display the fullname of users should behave
in a consistent manner with current functionality of tables, in
regards to sorting by each individual component of a name (first
name, middle name, surname, etc).

To facilitate this, instead of a hard-coded assumption that such
columns are always named 'fullname', table classes can now define
additional columns containing a users name.
2021-08-03 12:05:59 +01:00
Bas Brands 25cec83cd6 MDL-72267 theme_boost: prevent dropdowns to overflow drawer 2021-08-03 12:04:48 +02:00
abgreeve ec2e70aa80 Merge branch 'MDL-67412-master' of https://github.com/sharidas/moodle 2021-08-03 12:37:08 +08:00
Sujith Haridasan fbc7b28614 MDL-67412 setuplib: Final deprecation of generate_uuid
Final deprecation of generate_uuid function.
2021-08-03 08:32:01 +05:30
abgreeve d531f97f2c Merge branch 'MDL-67833' of https://github.com/paulholden/moodle 2021-08-03 10:27:39 +08:00
Dan Marsden 34bdef0b62 MDL-70006 analytics: Don't send notifications to suspended enrolments. 2021-08-03 10:52:53 +12:00
Paul Holden 4e29417b7a MDL-71121 backup: apply config defaults for async backups. 2021-08-02 23:27:18 +01:00
David Mudrák 079c0b75ee MDL-72242 files: Do not force text filtering of SVG files
It was a mistake to force filtering of SVG files in MDL-55243. It can
easily lead to corrupted SVG files.

The patch removes that forced filtering and clarifies the inline comment
of what and why we need to do.
2021-08-02 15:19:45 +02:00
Paul Holden 858bcbab0a MDL-72257 gradeexport_xml: detect absense of grade items to export.
Where there are no grade items with idnumbers for selection, then
nothing should be exported. Currently, this is being interpreted as
the user exporting all grade items.
2021-08-02 10:16:38 +01:00
Jake Dallimore a260a3154b Merge branch 'MDL-71323' of git://github.com/paulholden/moodle 2021-08-02 16:22:30 +08:00
David Matamoros 53ed7abf4c MDL-71153 task: convert task logs table to a system report.
Convert to system report API provided by Report builder. The entity
defined the column and filters, which are used by the system
report class we have created.

Report actions are also defined in the system report.
2021-08-02 15:46:17 +08:00
Ilya Tregubov 3420278c86 MDL-72262 behat: Make alias shorter to fix Oracle failures. 2021-08-02 08:24:59 +02:00
abgreeve 0dafa0707c Merge branch 'MDL-70794' of git://github.com/paulholden/moodle 2021-08-02 12:39:32 +08:00
abgreeve a5f13c6b3b Merge branch 'MDL-71621-master' of git://github.com/aanabit/moodle 2021-08-02 10:11:15 +08:00
AMOS bot 1eaaa7f6eb Automatically generated installer lang files 2021-08-01 00:07:46 +00:00
AMOS bot 4afb4fc903 Automatically generated installer lang files 2021-07-31 00:07:50 +00:00
Ilya Tregubov 6ea0ce7b75 Merge branch 'MDL-72070-master' of git://github.com/lucaboesch/moodle 2021-07-30 14:34:16 +02:00
Ilya Tregubov 04a2e1e827 Merge branch 'MDL-70271-master' of git://github.com/peterRd/moodle 2021-07-30 12:24:35 +02:00
Paul Holden 0795695872 MDL-68633 mod_forum: confirmation for subscription change navigation. 2021-07-30 10:46:58 +01:00
Víctor Déniz d25917e4fd Merge branch 'MDL-72085-master' of https://github.com/dmitriim/moodle 2021-07-30 08:51:47 +01:00
Tim Hunt e756c7f73d MDL-72254 filesapi: reject itemid=false in file_save_draft_area_files
This should never happen, and if it does, it causes many files to be deleted.
2021-07-29 12:12:05 +01:00
Jun Pataleta 27fda1e207 Merge branch 'MDL-72052' of git://github.com/danmarsden/moodle 2021-07-29 16:24:19 +08:00
Jun Pataleta 1a7f8e7eed Merge branch 'MDL-72054' of git://github.com/danmarsden/moodle 2021-07-29 15:53:43 +08:00
Dmitrii Metelkin 0fc73ee581 MDL-72085 core_phpunit: reset session notifications 2021-07-29 13:00:39 +10:00
Luca Bösch 15fa713f6d MDL-72070 core_calendar: Calendar footer links • separator colour 2021-07-28 20:13:25 +02:00
Mikel Martín 7edcf3615d MDL-70794 theme_boost: SCSS for Report builder filters dropdown. 2021-07-28 16:40:50 +01:00
Paul Holden ef3c605b02 MDL-70794 reportbuilder: user interface for using report filters.
The report filter form is implemented as a dynamic form. Implement
accompanying AMD module for interacting with it here (applying and
resetting report filters).

Co-Authored-By: Mikel Martín <mikel@moodle.com>
2021-07-28 16:40:50 +01:00
David Matamoros 9f814ffec0 MDL-70794 reportbuilder: privacy provider implementation.
Note that although system report persistents store user modified
and created fields, these are not the values of the user who did
either. Merely the user who first viewed the report.
2021-07-28 16:40:50 +01:00
Sara Arjona 7a63ff9f0b MDL-70794 reportbuilder: introduce the concept of report entities.
Entities are re-usable collections of report columns and filters. When
creating system reports, we can re-use those elements from entities
without having to know specific details about their implementation.

They can be joined to reports, or other entities, using standard SQL
query syntax.

Define base classes, and create two example entities: course and user.

Co-Authored-By: David Matamoros <davidmc@moodle.com>
2021-07-28 16:40:50 +01:00
Paul Holden 514caaa4ea MDL-70794 reportbuilder: output components and classes.
This change contains most of the output components required for
reports such as exporters, templates, AMD modules.

Also included are classes within the component table namespace which
are required for extending the dynamic table API.
2021-07-28 16:40:50 +01:00
Paul Holden 93025be2e7 MDL-70794 reportbuilder: management and further utility classes.
We define the base classes and APIs for reports, that can contain
columns and filters instances themselves.
2021-07-28 16:40:50 +01:00
David Matamoros 2a20238924 MDL-70794 reportbuilder: implement report filters and filter types.
Implement base filter classes as well as commonly used filter types
(e.g. text, date, select, etc).

Filters are used in reports to allow users to narrow down the data
that is being displayed.

Co-Authored-By: Paul Holden <paulh@moodle.com>
2021-07-28 16:40:50 +01:00
Paul Holden 907ff8555f MDL-70794 reportbuilder: implement report column and action classes.
The column class encapsulates all data related to a report column. It
allows developers to define the type of data contained within it, in
addition to how that data is retrieved and formatted for users.

Report actions are used to define action elements that are added to
each report row. They define an icon and link, and can be used to
direct users to related pages according to the current row data.
2021-07-28 16:40:50 +01:00
Paul Holden 542f2927f7 MDL-70794 reportbuilder: register new core sub-system.
In addition to housekeeping for the new sub-system, define our
table schema to be used in later persistents.
2021-07-28 16:40:50 +01:00
Ilya Tregubov dc437b5171 weekly release 4.0dev 2021-07-28 16:48:19 +02:00
Ilya Tregubov 2245735ab1 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-07-28 16:48:17 +02:00
Simey Lameze f3176e8ec5 MDL-72045 calendar: change export doc link by help text 2021-07-28 18:12:14 +08:00
Juan Leyva 1f5ceda78e MDL-72143 airnotifier: Additional configuration check
Additional check for $CFG->noemailever
2021-07-28 09:38:18 +02:00
Shamim Rezaie d93fb10f88 MDL-71603 editor_atto: set aria-pressed when a button status is changed 2021-07-28 16:45:27 +10:00
Shamim Rezaie 1eeb7ce395 MDL-71603 editor_atto: Make button icons decorative only 2021-07-28 15:43:59 +10:00
Shamim Rezaie b078f18c6e MDL-71603 editor_atto: Use aria-expanded for show/hide buttons toggle 2021-07-28 15:43:59 +10:00
Shamim Rezaie 7029fa056c MDL-71603 editor_atto: Focus on the toggled row
quoted from
https://www.accessibility-developer-guide.com/examples/sensible-aria-usage/expanded/

As a general rule, the toggled element should be right below the toggle
button, so screen readers will find it easily. If that is not the case,
then the focus should be placed inside the element upon toggling it
visible, and back to the initial element upon toggling it invisible.
2021-07-28 15:43:59 +10:00
Shamim Rezaie 90b3d575e3 MDL-71603 editor_atto: Wrap toolbar buttons in toolbar rows 2021-07-28 15:43:21 +10:00
Jun Pataleta 9ec6aead50 Merge branch 'MDL-72203-master-2' of git://github.com/mickhawkins/moodle 2021-07-28 11:26:42 +08:00
AMOS bot aaf64d36f3 Automatically generated installer lang files 2021-07-28 00:07:48 +00:00
Guillermo Gomez 330d323933 MDL-71515 admin: Improve Test outgoing mail config
Improve the Test outgoing mail configuration admin page adding:
- Timestamp to the subject and message text.
- Additional subject text to the current text subject.
- From field (username or email) to send the test email from the that Moodle user.
2021-07-28 09:19:54 +10:00
Mike Churchward 531b0c917e MDL-71925 tool_brickfield: Limited DOM tag count using core function. 2021-07-27 15:58:01 -04:00
Juan Leyva e320264a84 MDL-70624 tool_mobile: Return QR login configurration 2021-07-27 18:16:23 +02:00
Michael Hawkins 1d7c563f79 MDL-72203 curl: Improve redirect unit testing and update upgrade.txt
lib/upgrade.txt was updated to reflect the fact that all cURL redirects
will be emulated.
2021-07-27 22:39:44 +08:00
David Mudrák 6b558e9be8 MDL-72203 curl: Remove duplicate unit tests for emulated redirects
Before, we had each redirect test duplicated: one for the native
redirects via native cURL, second for our emulated implementation. Now
all redirects are always emulated so there is no need to have them
tested twice.
2021-07-27 21:30:16 +08:00
David Mudrák 92b066bdaf MDL-72203 curl: Check each URL in redirect chain to see if it is blocked
The security problem here was that only the first and the last URL in
the redirect chain was checked by the security helper. This patch forces
the curl wrapper to always emulate cURL redirects and check every
redirect URL in the chain before actually visiting it.
2021-07-27 21:30:16 +08:00
David Mudrák 6e5454780d MDL-72203 curl: Warn if someone actually started to use $maxredirects
The new parameter of curl_security_helper::url_is_blocked() introduced
in MDL-71916 became part of the API. Even if we reverted it quickly,
someone can use a released Moodle version that has that parameter in
place. For that reason and also to avoid potential troubles in the
future (e.g. when yet another argument would be added to this method),
we need to make it clear that the second parameter of this method should
never be used again.

Poor $maxredirects, you did not live long with us. Oh well.
2021-07-27 21:30:16 +08:00
David Mudrák c619cd1425 MDL-72203 curl: Revert original fix of redirects to blocked URLs
This reverts the original fix introduced in MDL-71916. It introduced an
extra native cURL call inside curl_security_helper to check if the given
URL triggers a redirect to a blocked URL or not.

Shortly after the release, a couple of regressions were reported as a
result of the integrated solution. It was agreed to revert the fix and
progress with implementing an alternative approach.
2021-07-27 21:30:16 +08:00
Ilya Tregubov 3d2e6b7932 Merge branch 'MDL-71946-master' of git://github.com/dcai/moodle 2021-07-27 13:41:05 +02:00
Ilya Tregubov ec50dc2fb7 Merge branch 'MDL-72179-master' of git://github.com/andrewnicols/moodle 2021-07-27 12:36:38 +02:00
Ilya Tregubov 3a55ff2c55 Merge branch 'MDL-71672-master-2' of git://github.com/rezaies/moodle 2021-07-27 11:59:15 +02:00
Andrew Nicols 776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Andrew Nicols f14dbe0087 MDL-72179 behat: Add page resolvers for activity roles/perms 2021-07-23 20:44:26 +08:00
Andrew Nicols 950c7adb1c MDL-72179 behat: Add page resolver for activity names 2021-07-23 20:43:48 +08:00
Andrew Nicols 9f428f68c7 MDL-72179 behat: Add activity editing page resolution 2021-07-23 20:43:48 +08:00
Andrew Nicols f1b41a1a7a MDL-72179 behat: Fix page resolvers to remove ambiguity
The simple pattern matches were conflicting in some situations. To make
this backwards compatable we need to convert it to a Regex pattern match
instead, and provide the quoted and unquoted variants.
2021-07-23 20:43:48 +08:00
Andrew Nicols ba8e0a4871 MDL-72179 behat: Correct course category page resolving
There were two issues here:
* I am on the [categoryname] category page page (duplicated page)
* the wrong URL was being used

Since an incorrect URL was used I felt it safe to rename the step from
'category page page' to 'category page'.
2021-07-23 20:43:48 +08:00
Andrew Nicols c204fe3eeb MDL-72179 behat: Lowercase all page instance resolvers 2021-07-23 20:43:48 +08:00
Andrew Nicols 730d6cb94e MDL-72179 behat: Improve core page resolvers
This commit makes the following improvements to core page resolverss:
* allows for mixed case naming (course, Course, etc.)
* allows fields other than the idnumber to be specified:
** course: idnumber, shortname, fullname
** course category: idnumber, name

Whilst some of these fields are not unique, they will typically be
unique in most test scenarios. Where they are not then the idnumber
should be used in preference.
2021-07-23 20:28:10 +08:00
Amaia Anabitarte 9108771ea3 MDL-71621 core_user: Parents could edit custom fields in child profile 2021-07-23 12:51:39 +02:00
Ilya Tregubov 8c0853d026 weekly release 4.0dev 2021-07-23 11:30:58 +02:00
Ilya Tregubov 152aa5d612 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-07-23 11:30:56 +02:00
Jun Pataleta 210e6faf65 MDL-72206 theme_boost: Have env check classes extend alert classes
To achieve good colour contrast and consistency with other parts of
Moodle, the environment check classes need to extend the alert-*
classes.
2021-07-23 15:05:25 +08:00
Julien Boulen 8f26ad2a99 MDL-71992 behat: allow to run behat tests on a https site 2021-07-22 11:42:30 +02:00
Jun Pataleta 68fa468885 MDL-71817 calendar: Use root node to find the target elements
Instead of passing querying for the root element again by its ID
which changed in this issue, use the already existing root element
at the beginning of this Mustache JS code. It also makes maintenance
simpler in the future.
2021-07-22 17:39:01 +08:00
cescobedo 4631be32eb MDL-66266 core_message: Final deprecation of 3.8 api functions
Final deprecation of:
- can_post_message
- get_individual_conversations_between_users
2021-07-22 06:31:05 +02:00
Jun Pataleta 68bd3a1158 Merge branch 'MDL-71817-master' of git://github.com/lameze/moodle 2021-07-22 11:27:08 +08:00
Andrew Nicols 4c9f590f18 Merge branch 'MDL-70427' of git://github.com/paulholden/moodle 2021-07-22 11:22:13 +08:00
Jun Pataleta 05db683745 Merge branch 'MDL-72154-master' of git://github.com/mickhawkins/moodle 2021-07-22 11:11:20 +08:00
Jun Pataleta 8a2c797cc0 MDL-71817 calendar: Set the calendar view mode properly for month view
* Store the view mode of the calendar in the calendar_information
   object.
 * Let the month exporter handle the production of context data by
   moving 'viewingmonth', 'showviewselector', and 'viewinginblock'
   inside it.
 * Set the proper calendar view mode in the core_calendar/month_detailed
   template.
 * Pass the calendar view mode to the
   core_calendar_get_calendar_monthly_view WS function.
2021-07-22 09:04:44 +08:00
Simey Lameze d748c71693 MDL-71817 calendar: change the calendar heading to h4 in the block
This commit adds the logic that change the size of the calendar
header depending if the user is viewing in the block or in the
full view.
2021-07-22 09:04:44 +08:00
Simey Lameze b0133904bf MDL-71817 calendar: behat changes for calendar block
This commit does few things:

1) Remove unnecessary "I hover over today in the calendar"
steps as it's not necessary to hover onto the day to see the events
any more.

2) Replace "I follow This month" steps to "I follow Full calendar"

3) Update i_create_a_calendar_event_with_form_data() to use the new
fullcalendar lang string.
2021-07-22 09:00:30 +08:00
Jun Pataleta 73a14b1075 MDL-71817 calendar: Fix duplicate IDs for multiple calendar blocks
Done by:
* Designating instance IDs for each month_exporter instances and
assigning these instance IDs in templates.
* Adding the instance ID as an optional parameter for the
core_calendar_renderer::course_filter_selector() to generate
course filters with unique element IDs.
2021-07-22 08:46:01 +08:00
Simey Lameze f0897dce80 MDL-71817 calendar: clicking on day link should redirect to day view
This patch prevents the full day view to be loaded
in the calendar block as this won't be supported.
When clicking in the day link it will redirect the
user to day view in the full calendar.
2021-07-22 08:46:01 +08:00
Simey Lameze 2e11059734 MDL-71817 calendar: make calendar block look like full calendar
This commit does few things:

1) Removes .path-calendar specificity styles from full view can
work on the Dashboard.

2) The new event button colour has been changed to btn-primary.

3) CSS fix to make the calendar controls inline on small block.
2021-07-22 08:46:01 +08:00
Simey Lameze 47ca6c017a MDL-71817 calendar: remove year from prev/next links 2021-07-22 08:46:01 +08:00
Simey Lameze 98612827b0 MDL-71817 calendar: only update url on full view
This patch prevents the URL from being updated on the calendar
block. It only updates the url if viewing the full calendar.
2021-07-22 08:46:01 +08:00
Simey Lameze d2f612ab24 MDL-71817 block_calendar_month: load month view in the block 2021-07-22 08:46:01 +08:00
AMOS bot a86e2213bf Automatically generated installer lang files 2021-07-22 00:07:56 +00:00
Víctor Déniz a9dfde7543 Merge branch 'MDL-72001-master' of git://github.com/roland04/moodle 2021-07-21 23:04:51 +01:00
Víctor Déniz 73a868c38d Merge branch 'MDL-72108-master' of git://github.com/andrewnicols/moodle 2021-07-21 19:25:54 +01:00
Michael Hawkins dffe445923 MDL-72154 calendar: Add manage subscription to export page breadcrumbs 2021-07-21 16:41:13 +08:00
Michael Hawkins 45fc997e84 MDL-72154 calendar: Remove unnecessary strings/link from import page 2021-07-21 16:41:13 +08:00
Shamim Rezaie c96d24be88 MDL-71954 calendar: improve form validation
For client-side validation benefits refer to
https://www.w3.org/WAI/tutorials/forms/validation/#client-side-validation-benefits
2021-07-21 02:38:10 +10:00
Ilya Tregubov 501bc9e117 Merge branch 'MDL-71604-master' of git://github.com/rezaies/moodle 2021-07-20 14:09:11 +02:00
Paul Holden 79ac69bb99 MDL-72186 mod_forum: version bump to trigger services reload.
Removal of services in 1530035f didn't include a version bump
which meant they were never fully removed and led to errors on
the web services documentation page.
2021-07-19 22:32:37 +01:00
Ilya Tregubov 494a9bb41f Merge branch 'MDL-72125-master' of git://github.com/andrewnicols/moodle 2021-07-19 13:03:46 +02:00
Andrew Nicols f29f6a28d1 MDL-72125 mod_assign: Use assign submission data generators 2021-07-19 18:41:32 +08:00
Andrew Nicols 2bb7e34b76 MDL-72125 mod_assign: Add data generator for assign submissions 2021-07-19 18:41:31 +08:00
Andrew Nicols 46a5c75196 MDL-72125 testing: Make global $CFG available when including generators
This will remove the requirement to add the global $CFG call to the top
of generator scripts.
2021-07-19 18:41:31 +08:00
Ilya Tregubov 295cd6dd7c Merge branch 'MDL-72078-master' of git://github.com/rezaies/moodle 2021-07-19 10:28:51 +02:00
Shamim Rezaie e2150f7da0 MDL-72078 editor_atto: Use role=application and aria-describedby in Atto
According to https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Application_Role
WYSIWYG web editors are proper use of the application role.
2021-07-19 16:45:20 +10:00
Shamim Rezaie da509ff492 MDL-71604 editor_atto: Move accessibility buttons to the first row 2021-07-19 16:42:25 +10:00
Shamim Rezaie d970bf0a1e MDL-71672 javascript: Fix the markup in the header of YUI dialogs
Move the close button out of the element that is set as the
aria-labelledby for the dialog.
Also used h5 for the dialog titles so they are consistent with
AMD modals.
2021-07-19 16:40:10 +10:00
Shamim Rezaie 902ab1e2f6 MDL-71672 atto_equation: Fix the markup and the initial focused element
The initial focused element should be the first operator button.
This commit also fixes the accessibility issues that previously were
wrongly fixed by a redundant click on the first tab using javascript.
2021-07-19 16:40:10 +10:00
Shamim Rezaie fd18007c1b MDL-71672 atto_managefiles: Focus the first file manager button 2021-07-19 16:40:10 +10:00
Shamim Rezaie 52c1e68631 MDL-71672 atto_emojipicker: Focus the search bar initially 2021-07-19 16:40:10 +10:00
Shamim Rezaie 9e801be452 MDL-71672 atto_recordrtc: focus Atto button after hide 2021-07-19 16:40:10 +10:00
Shamim Rezaie 2092f152b2 MDL-71672 javascript: Fix the issue of focusOnShowSelector being ignored
When focusOnShowSelector is not present, as a fallback, focus the first
focusable element in YUI dialogues
Ref:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role
2021-07-19 16:40:10 +10:00
Mikel Martín ef30d47645 MDL-72001 my: Add '__default' name check when retrieving default page 2021-07-16 11:56:48 +02:00
Mikel Martín f874652ad2 MDL-71152 theme_boost: Use 'scroll-margin-top' for anchor links
Current anchor link offset fix is not working with 'display:flex' elements
2021-07-16 11:56:31 +02:00
Andrew Nicols d55aeee10c MDL-72163 admin: Create interface for settings with a url 2021-07-16 15:20:30 +08:00
boygr49p 897300cbbd MDL-71500 calendar_threemonth: add behat step and coverage 2021-07-16 14:46:51 +08:00
boygr49p 15e311a1fd MDL-71500 calendar_threemonth: clicking in a diff day should refresh day view
Clicking in a day in the three month block replaces the div with id starting
with calendar- so we can do so repeatedly and successfully and test that it does (with behat).
2021-07-16 14:46:40 +08:00
Andrew Nicols 78c96c6f44 MDL-72163 admin: Plugins overview page should link to categories 2021-07-16 13:49:11 +08:00
Andrew Nicols 87b50a42e8 MDL-72125 behat: Add get_activity_id() behat generators helper 2021-07-16 12:33:56 +08:00
Andrew Nicols 7cd408501b MDL-72125 testing: Set a default idnumber when creating activities
The activity generator currently requires an idnumber when creating
activities, but this is not a requirement when creating the same
activity through the UI. The requirement comes because we want to
provide a way to refer to activities in subsequent steps.

This commit modifies the behaviour such that the generator uses the name
of the activity as the default idnumber.

This has two  main benefits:
1. it simplfies generation of activities; and
2. it makes the language used when writing behat tests much more natural.

With this change, steps will refer to the activity by its idnumber/title
in all cases, rather than sometimes by an idnumber which bears no
relevance to the title.
2021-07-16 12:33:56 +08:00
Andrew Nicols daf9b24b6a MDL-72125 testing: Add helper to run generators as a user 2021-07-16 12:33:56 +08:00
Thach Le Huy dc3aa743e4 MDL-72033 User tours: step placement issues if screen too narrow 2021-07-16 10:55:39 +07:00
abgreeve 8453fe0ddb weekly release 4.0dev 2021-07-16 10:16:35 +08:00
abgreeve 42ca8d9219 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-07-16 10:16:34 +08:00
AMOS bot fb95d7cd6b Automatically generated installer lang files 2021-07-16 00:07:50 +00:00
sam marshall 46099c7297 MDL-72152 Behat: No way to test key shortcuts with letter keys
Extends the existing step 'And I press the Shift Left key' so that
it supports letter/other keys: 'And I press the Ctrl C key'.
2021-07-15 09:42:34 +01:00
Eloy Lafuente (stronk7) f861b7a9bf Merge branch 'MDL-71788-master-fix' of git://github.com/junpataleta/moodle 2021-07-15 16:13:11 +08:00
Jun Pataleta 80f0b15165 Merge branch 'MDL-63770-master' of /home/jun/moodles/stable_master/moodle 2021-07-15 16:13:11 +08:00
Jun Pataleta e6f1baa9c8 Merge branch 'MDL-71456-master' of /home/jun/moodles/stable_master/moodle 2021-07-15 16:13:06 +08:00
Jun Pataleta 6c131ead99 Merge branch 'MDL-71775-master' of git://github.com/lameze/moodle 2021-07-15 16:10:48 +08:00
Jun Pataleta a067fc1df1 MDL-71788 calendar: Remove ready state listener
Adding a document ready state change listener might be too late by the
time this AMD module gets loaded. So there's really no point listening
for it. It's better to enable the Copy URL button by the time this
the calendar export module gets loaded since at this point, the
copy to clipboard JS module would have been loaded as well.
2021-07-15 14:55:16 +08:00
Matteo Scaramuccia 7910fa322a MDL-63770 core: 'port' should be an integer like in parse_url()
Plus trivial comment cleanup.
2021-07-15 11:37:13 +08:00
Simey Lameze f58750c2a5 MDL-71775 block_calendar_month: add footer options 2021-07-15 10:20:54 +08:00
Eloy Lafuente (stronk7) 43d77b9574 Merge branch 'MDL-71788-master-7' of git://github.com/junpataleta/moodle 2021-07-15 02:58:31 +02:00
Eloy Lafuente (stronk7) a0ac76505b Merge branch 'MDL-67338' of git://github.com/paulholden/moodle 2021-07-15 00:33:57 +02:00
Paul Holden bf97f707cd MDL-67338 message: re-implement block page type patterns.
The `page_type_list` method for the message component was deprecated
in 5b0769db as part of MDL-54744. However it is still required when
trying to configure blocks on any messaging pages.
2021-07-14 19:34:13 +01:00
Eloy Lafuente (stronk7) be3f3b1283 Merge branch 'MDL-71790-master' of git://github.com/HuongNV13/moodle 2021-07-14 19:25:47 +02:00
Eloy Lafuente (stronk7) 6c27c79512 Merge branch 'MDL-72139-master' of git://github.com/cescobedo/moodle 2021-07-14 13:59:50 +02:00
Bas Brands 99a4eee699 MDL-71456 core: fix behats with new drawers
The new drawers structure shows that some elements
are dependant from the page structure and broke some
behats. This commit fixes those components and tests.
2021-07-14 11:49:57 +02:00
Bas Brands 1f3006b3b4 MDL-71456 theme_boost: usertour fixes for pages with drawers 2021-07-14 11:49:57 +02:00
Bas Brands 4fa713b0d4 MDL-71456 theme_boost: drawers for blocks and the course index 2021-07-14 11:49:57 +02:00
cescobedo 7a6d65eedb MDL-72139 core_message: Fix encoding UTF-8 in prevent unclosed tags 2021-07-14 07:41:00 +02:00
Eloy Lafuente (stronk7) e8859a60fc Merge branch 'MDL-71984-master' of https://github.com/nguyenphuctien/moodle 2021-07-13 23:46:54 +02:00
Eloy Lafuente (stronk7) 0139d213ac Merge branch 'MDL-71874-master' of git://github.com/andrewnicols/moodle 2021-07-13 20:38:01 +02:00
Jun Pataleta 28f0fe3711 Merge branch 'MDL-71931-master' of git://github.com/andrewnicols/moodle 2021-07-14 00:41:58 +08:00
Sara Arjona b0012a408d Merge branch 'MDL-71782' of https://github.com/stronk7/moodle 2021-07-13 16:44:34 +02:00
Sara Arjona 730792e51b Merge branch 'MDL-32103-master' of git://github.com/ilyatregubov/moodle 2021-07-13 16:28:36 +02:00
Ilya Tregubov b26608d1d4 MDL-32103 completion: Fix CiBoT errors.
Old code still uses underscores in variable names, so CiBoT is
not happy. Making it constistant with Moodle code style.
2021-07-13 12:07:53 +02:00
Ilya Tregubov 4819625349 MDL-32103 completion: Allow instant completion updates.
For activity based course completion criteria allow instant
course completion updates if the activity completion state was changed
for a single user.
2021-07-13 12:07:53 +02:00
Andrew Nicols a953a29616 MDL-71931 tool_usertours: Emit real events on step/tour transitions 2021-07-13 16:29:51 +08:00
Andrew Nicols 61e03fe208 MDL-71931 tool_usertours: Update to ES format 2021-07-13 16:11:12 +08:00
Jun Pataleta 5056a9641f Merge branch 'MDL-72036-master' of git://github.com/sarjona/moodle 2021-07-13 16:05:45 +08:00
Sara Arjona a81c372f00 MDL-72036 atto_h5p: Random error with external URL
After a major upgrade was done in h5p.com, some random errors appeared
in the "H5P options are ignored for H5P URLs" scenario.
They have been fixed replacing the URL for different (which should
load quicker). As we're checking external content, no other improvement
can be done on the Moodle site.
2021-07-13 08:36:33 +02:00
Huong Nguyen 48d21af177 MDL-71790 calendar: Revamp the manage subscriptions page 2021-07-13 13:21:20 +07:00
Dongsheng Cai ff035c0aa7 MDL-71790 calendar: Create a new calendar import page
The commit was originally from MDL-71808
2021-07-13 13:19:57 +07:00
Paul Holden 42281e48f5 MDL-70427 task: correct missing component when queuing adhoc task.
If the task belongs to a component, and doesn't have it's own
component property set then we can lazy-load it based on class
namespace.
2021-07-12 20:47:04 +01:00
Paul Holden 689e20c8ba MDL-70427 admin: remove plugin adhoc tasks during uninstall. 2021-07-12 20:43:14 +01:00
Paul Holden 5255026717 MDL-71050 h5p: account for parent languages retrieving translations.
Take account of parent languages when requesting given library
translation. For example if we are currently using "de_kids" as the
current language, we need to recurse each language pack looking for
a matching H5P translation ("de_kids" -> "de_du" -> "de").
2021-07-12 13:17:02 +01:00
Dmitri Pisarev 1983718149 MDL-63770 core: Fix a false-positive in reverseproxyabused check
A `reverseproxyabused` error is wrongly triggered when external port number doesn't equal internal.
2021-07-12 11:23:49 +02:00
AMOS bot 57152c75ad Automatically generated installer lang files 2021-07-11 00:07:47 +00:00
Eloy Lafuente (stronk7) 47f708fc30 MDL-71782 behat: Ensure page after saving changes is there
A similar approach was followed @ MDL-67935, although the
case doesn't seem to be the same.

In any case, it's curious that all local execution are
100% passing and only CIs fail so often. Just guessing if,
maybe, there is some Chrome version factor around (we
are running older, sticky, versions @ CIs.
2021-07-10 00:18:33 +02:00
Paul Holden 91b5e4195f MDL-71835 report_log: correct query returning user fullname from DB. 2021-07-09 13:54:10 +01:00
Ilya Tregubov 7226a0fe5f MDL-71847 course: Cover state classes with direct unit tests. 2021-07-09 13:43:17 +02:00
Paul Holden f2f4d0a9bb MDL-67833 tool_customlang: break long text in component column. 2021-07-09 11:36:56 +01:00
AMOS bot 52a9bf728a Automatically generated installer lang files 2021-07-09 00:07:56 +00:00
Eloy Lafuente (stronk7) c357779722 weekly release 4.0dev 2021-07-08 23:43:55 +02:00
Jun Pataleta 3b0e7c65f4 Merge branch 'MDL-65252-master-fix' of git://github.com/lameze/moodle 2021-07-08 23:30:35 +02:00
Jun Pataleta b452bab8f7 Merge branch 'MDL-71919-master-fix' of https://github.com/cescobedo/moodle 2021-07-08 23:30:35 +02:00
Adrian Greeve 18515919e1 MDL-61460 tool_componentlibrary: Additional whitespace removal. 2021-07-08 23:30:35 +02:00
cescobedo 084833acbe MDL-71919 core_message: Fix tests in message_send 2021-07-08 23:30:35 +02:00
Jun Pataleta f21ac401e2 Merge branch 'MDL-70594' of https://github.com/stronk7/moodle 2021-07-08 23:30:35 +02:00
Huong Nguyen 9b758d5cc8 MDL-71922 file: Enhance endless recursion requests protection 2021-07-08 23:30:35 +02:00
cescobedo 9aa5f7fe9b MDL-71919 core_message: Fix unclosed html tags in email notification 2021-07-08 23:30:35 +02:00
Adrian Greeve 65642ef97a Merge branch 'MDL-61460-master-fix' of https://github.com/andrewnicols/moodle 2021-07-08 23:30:34 +02:00
Adrian Greeve f03a714607 MDL-61460 tool_componentlibrary: removed white space.
Also updated the version number as that was causing a problem.
2021-07-08 23:30:34 +02:00
Andrew Nicols f1525fbdbf MDL-61460 tool_componentlibrary: JS Documentation fix 2021-07-08 23:30:34 +02:00
Adrian Greeve a5336912d9 Merge branch 'MDL-61460-master-4' of git://github.com/bmbrands/moodle 2021-07-08 23:30:34 +02:00
Andrew Nicols b3b7b3daca MDL-61460 core: Rebuild npm-shrinkwrap for new dependencies 2021-07-08 23:30:34 +02:00
Paul Holden 5bc561ee7a MDL-71957 auth_shibboleth: safer session retrieval during logout. 2021-07-08 23:30:34 +02:00
Jun Pataleta 23f60fe84f Merge branch 'MDL-70335' of https://github.com/stronk7/moodle 2021-07-08 23:30:34 +02:00
Dongsheng Cai a4de29ced3 MDL-71978 core_calendar: only allow owner to edit user subscriptions 2021-07-08 23:30:34 +02:00
Eloy Lafuente (stronk7) 4094b4f92e MDL-70335 behat: Ensure the scenario passes under all themes
Also, get rid of not needed @javascript tag
2021-07-08 23:30:33 +02:00
Adrian Greeve aad5a102c7 Merge branch 'MDL-71887-master' of https://github.com/snake/moodle 2021-07-08 23:30:33 +02:00
Paul Holden 7d177640b0 MDL-71760 admin: escape identity fields in token management table. 2021-07-08 23:30:33 +02:00
Paul Holden 2408f98357 MDL-71898 mod_quiz: escape user identity fields on override pages. 2021-07-08 23:30:33 +02:00
Mihail Geshoski 4772dece1d MDL-58393 core: Remove firstname argument from emailconfirmation string 2021-07-08 23:30:33 +02:00
Sujith Haridasan b2527be7d3 MDL-71241 course: Validate and sanitize sort arguments
Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-07-08 23:30:27 +02:00
Mihail Geshoski 084ff0c8da MDL-71242 core_course: Test the validation of the sort value
Adds new unit test, test_course_get_recent_courses_sort_validation(),
which is reponsible for testing the validation of the sort value in
course_get_recent_courses().
2021-07-08 23:30:26 +02:00
Mihail Geshoski 069cc7164c MDL-71242 core_course: Update test_course_get_recent_courses() unit test
Adds additional assertions in test_course_get_recent_courses() test to
ensure that the sort funcionality works as expected.
2021-07-08 23:30:26 +02:00
Mihail Geshoski 68c90578e7 MDL-71242 core_course: Validate the value of the sort argument
This change validates the value of the sort argument in
course_get_recent_courses().
2021-07-08 23:29:26 +02:00
Simey Lameze 8fd7e5edeb MDL-65252 mod_forum: make inline attachment field optional 2021-07-08 16:14:12 +08:00
Tien Nguyen ac59c8b8e0 MDL-71984 Quiz: Add new attempt's events
Add attempt_updated, attempt_autosaved and attempt_question_restarted
events.
Update attempt_viewed to add page number.
2021-07-08 15:13:06 +07:00
Jun Pataleta 5c70150450 MDL-71788 calendar: Make it easier to copy the calendar URL
Converted the Calendar URL string to a read-only text input containing
the calendar URL. Pressing the "Copy URL" button will copy the calendar
URL to the clipboard.
Fixed Behat tests as well for the export feature. With the calendar URL
in a text input that clips the whole URL, the `preset_what` URL
parameter cannot be seen by the "I should see" step. Worked around
this by checking that the actual value attribute of the calendar URL
text input contains the preset_what parameter.

Plus: Deprecate the calendarurl string. It will be replaced by a new
lang string that does not contain the actual calendar URL.
2021-07-08 12:33:55 +08:00
Andrew Nicols 36f21508fb MDL-72108 js: Fix incorrect jsdoc examples for core/ajax 2021-07-08 10:39:13 +08:00
Bas Brands fda886c195 MDL-61460 tool_componentlibrary: Bootstrap docs pages v4.6.0 2021-07-08 09:51:02 +08:00
Bas Brands 3de68ad434 MDL-61460 tool_componentlibrary: Documentation for Moodle UI components
- This tool is only available for admins
- Before using this tool the hosting admin will need to have NPM installed and be able to run grunt
- To create the docs pages for the library run "grunt componentlibrary"
- After the pages are created the Library is available in Site adminstration > Development > UI Component Library
2021-07-08 09:51:02 +08:00
Andrew Nicols fa073102d3 MDL-61460 Grunt: Add Component Library tasks
This new task handles building of component library documentation,
including the markdown to HTML, an index of the generated content used
for searching, and the CSS for the component library.
2021-07-08 09:51:02 +08:00
Andrew Nicols 2f2ecdae4a MDL-61460 Grunt: Make startup tasks configurable by tasks 2021-07-08 09:51:02 +08:00
Jun Pataleta 341578bfde MDL-61460 core: Create a copy to clipboard JS module
This works by adding event listeners for elements that contain
the 'copytoclipboard' "data-action" attribute through event delegation.
These trigger elements must also define a "data-clipboard-target"
attribute which contains the query selector for the target element
where text will be copied.

On success, a toast message is shown to the user that the text has
been copied to the clipboard. This success message can be customised
by passing a message string to the "data-clipboard-success-message"
attribute in the trigger element.

When the element's value or innerText cannot be found, a toast message
indicating that the text cannot be copied to the clipboard is shown.

The copy to clipboard functionality is primarily using the Clipboard API
but in the event that this is not available, e.g. the site is not
running on HTTPS, this falls back to the document.execCommand('copy')
approach of copying the text in the target container.

Special thanks to Andrew for improving this module with the event
delegation approach and improved fallback handling.

Co-authored-by: Andrew Lyons <andrew@nicols.co.uk>
2021-07-08 09:50:34 +08:00
Claude Vervoort c8c81a1357 MDL-71887 mod_lti: repost when no cookie due to crosssite request 2021-07-07 14:17:12 +08:00
Michael Hawkins 0afab1d0f9 MDL-71916 lib: Check cURL redirects for blocked URLs before following 2021-07-06 23:45:59 +02:00
Eloy Lafuente (stronk7) e5b76c53b3 Merge branch 'MDL-70638' of git://github.com/paulholden/moodle 2021-07-06 20:21:16 +02:00
Eloy Lafuente (stronk7) 320eda3f7e Merge branch 'MDL-70335-master' of https://github.com/juancs/moodle 2021-07-06 20:18:16 +02:00
Eloy Lafuente (stronk7) 33666c1b5f Merge branch 'MDL-71537-master' of https://github.com/NashTechOpenUniversity/moodle 2021-07-06 20:16:21 +02:00
Ilya Tregubov c3a731d2d2 Merge branch 'MDL-26171' of git://github.com/paulholden/moodle 2021-07-06 12:46:23 +02:00
Paul Holden 4f343bd359 MDL-70638 user: correct access checks when serving profile files.
Requests for files from a users profile file area should follow
the same access checks as for the profile itself.
2021-07-06 10:28:24 +01:00
Paul Holden 052ba69f79 MDL-71323 admin: consistently indicate disabled state of plugins.
In order to be consistent with the majority of plugin management
pages, add the `dimmed_text` class to table rows to indicate that
a given plugin is disabled.
2021-07-06 10:14:13 +01:00
Jun Pataleta 761f1d7d51 Merge branch 'MDL-65252-master' of git://github.com/lameze/moodle 2021-07-06 14:04:33 +08:00
Simey Lameze 2a95ac4659 MDL-65252 forum: add missing inline attachments logic to forum API 2021-07-06 13:49:29 +08:00
cescobedo 2f4647c684 MDL-71917 core_message: Use $USER in WS delete_message_for_all_users 2021-07-06 13:34:23 +08:00
Thach Le Huy 1cf69802f0 MDL-71537 User tours: Minor display errors on mobile 2021-07-06 09:29:33 +07:00
Paul Holden 526f5eccb9 MDL-71981 user: escape identity fields if writer supports HTML. 2021-07-06 09:27:15 +08:00
Paul Holden f3b3684e5b MDL-71981 dataformat: indicate HTML support in writer callback. 2021-07-06 09:27:15 +08:00
Dan Marsden 0005474c9c MDL-72052 assign: - cache assign class. 2021-07-06 10:38:16 +12:00
Ilya Tregubov f77ff61ac1 Merge branch 'MDL-71796-master' of git://github.com/lameze/moodle 2021-07-05 12:32:09 +02:00
Simey Lameze f7155953f4 MDL-71796 mod_scorm: fix custom completion logic
AMOS BEGIN
 MOV [completiondetail:completionstatuscompletedandpassed,mod_scorm],[completiondetail:completionstatuscompletedorpassed,mod_scorm]
AMOS END
2021-07-05 17:46:31 +08:00
Eloy Lafuente (stronk7) 2d3798bd39 Merge branch 'MDL-71885-master' of git://github.com/sarjona/moodle 2021-07-05 11:43:35 +02:00
Sara Arjona 692abf2c46 MDL-71885 core_h5p: Display the edit content button
A new parameter has been added to the display method, to define whether
the edit button should be displayed or not.
The H5P activity will display this button (if the user has the required
permissions). However, it won't be displayed when previewing H5P in the
content bank.
2021-07-05 10:56:13 +02:00
Sara Arjona 86b06a7b9a MDL-71885 core_h5p: Add the form for editing content
The editor form is based on the code that Victor Deniz prepared
while he was working on the integration of the H5P editor into
Moodle. The original version of this file can be found in
MDL-67814.
2021-07-05 10:56:13 +02:00
Sara Arjona 13de79c66f MDL-71885 core_h5p: Add new methods to API 2021-07-05 10:56:13 +02:00
Eloy Lafuente (stronk7) 1ba1b4ea9c Merge branch 'MDL-72063-master-en_fix' of git://github.com/mudrd8mz/moodle 2021-07-04 11:02:13 +02:00
Juan Segarra Montesinos 48fbc20559 MDL-70335 mod_forum: Subscribe users from Forced to Auto mode
When a teacher changes the subscription mode from forced
subscription to auto subscription using the "cog" icon in the
forum page, users are not seen in the Show/edit current
subscribers" page.

This does not happens when done from the Edit settings page.
2021-07-03 10:01:08 +02:00
Eloy Lafuente (stronk7) 2ce4c0a1ee MDL-70594 ci: Bump Travis and GHA postgres to 10 2021-07-02 00:23:40 +02:00
Jake Dallimore f6804b7ba3 MDL-65252 mod_forum: fix posts builder so it excludes hidden posts
This makes the builder capability aware, via an injected manager
factory and fixes unit tests.
2021-07-02 06:19:16 +08:00
Jake Dallimore ea13242d99 MDL-65252 mod_forum: fix get_discussions_posts for deleted posts 2021-07-02 06:19:16 +08:00
Simey Lameze 1530035f12 MDL-65252 mod_forum: removal of get_forum_discussion_posts ws 2021-07-02 06:19:16 +08:00
Simey Lameze 8baf7d6e5f MDL-65252 core: final deprecation of forum_count_replies() function 2021-07-02 06:19:16 +08:00
Eloy Lafuente (stronk7) f9ee024477 MDL-70594 environment: Apply agreed changes
- PostgreSQL 10 required.
- Exif PHP extension recommended.
2021-07-01 22:40:01 +02:00
Eloy Lafuente (stronk7) 37e80dccd9 MDL-70594 environment: 4.0 base information
This is a direct copy of the 3.11 branch to have
the changes under control in next commits.
2021-07-01 22:36:05 +02:00
David Mudrák d2e9ca4821 MDL-72063 lang: Use fixed strings in tests, too 2021-07-01 19:28:13 +02:00
Ilya Tregubov 3610f1ee3b weekly release 4.0dev 2021-07-01 16:41:59 +02:00
Helen Foster ab53075f22 MDL-72063 lang: Import fixed English strings (en_fix) 2021-07-01 14:11:23 +02:00
Adrian Greeve db8bd5c5a9 Merge branch 'MDL-71366-master' of git://github.com/bmbrands/moodle 2021-07-01 10:08:04 +02:00
Andrew Nicols 44cde6766b Merge branch 'MDL-71176-master_password_autocomplete' of https://github.com/safatshahin/moodle 2021-07-01 10:08:04 +02:00
Andrew Nicols bccac31627 Merge branch 'MDL-72010' of https://github.com/timhunt/moodle 2021-07-01 11:10:43 +08:00
Dan Marsden ceb2da3b77 MDL-72054 assign: pass course/coursemodule to assign_files 2021-07-01 14:58:51 +12:00
Safat Shahin bc76ab4742 MDL-71176 login: Add html5 autocomplete attributes
This implementation will include the correct
autocomplete attribute value so that the password
managers can aid in creating good secure passwords
and not get confused with other autocomplete types.
There are some changes the password type form so
that autocomplete attribute can be passed an array.
2021-07-01 12:38:11 +10:00
Andrew Nicols e506742102 Merge branch 'MDL-71314' of https://github.com/paulholden/moodle 2021-07-01 10:23:47 +08:00
Andrew Nicols 1cb50a3a7d Merge branch 'MDL-71771-master' of git://github.com/HuongNV13/moodle 2021-07-01 10:11:14 +08:00
Andrew Nicols 1543d600e4 Merge branch 'master_MDL-71175' of https://github.com/danmarsden/moodle 2021-07-01 09:56:31 +08:00
Andrew Nicols 744e9266f0 Merge branch 'MDL-68003' of https://github.com/timhunt/moodle 2021-07-01 09:52:48 +08:00
Sara Arjona fd0321eede Merge branch 'MDL-67208-master' of git://github.com/lameze/moodle 2021-06-30 16:55:31 +02:00
Sara Arjona 6ec8364449 Merge branch 'MDL-71789-master' of git://github.com/lameze/moodle 2021-06-30 16:29:33 +02:00
Sara Arjona 9bcc08aacf Merge branch 'MDL-71971-master' of git://github.com/lucaboesch/moodle 2021-06-30 16:16:07 +02:00
Sara Arjona 27243e2ff7 Merge branch 'MDL-71991' of https://github.com/timhunt/moodle 2021-06-30 16:09:30 +02:00
Leon Stringer 22825647d4 MDL-72035 csvlib: Write BOM for Excel
Add option to class csv_export_writer to prefix CSV file with UTF-8 byte
order mark (BOM).  This helps Microsoft Excel detect the file's character
encoding.
2021-06-30 15:04:16 +01:00
Andrew Nicols b12bb97048 Merge branch 'MDL-71863-master-v02' of git://github.com/ferranrecio/moodle 2021-06-30 10:04:23 +08:00
Eloy Lafuente (stronk7) 17135030cc Merge branch 'MDL-66539-master' of git://github.com/HuongNV13/moodle 2021-06-29 18:37:20 +02:00
Tim Hunt 0bb2d16337 MDL-68003 session timeout warning: don't show in iframes 2021-06-29 16:58:06 +01:00
Paul Holden 4098af1c52 MDL-26171 user: implement method for retrieving fullname via SQL. 2021-06-29 16:35:35 +01:00
Ferran Recio 1c0abade3e MDL-71863 core_courseformat: mode site renderer to autoload 2021-06-29 11:52:48 +02:00
Eloy Lafuente (stronk7) 4242216e86 Merge branch 'MDL-71947-master' of https://github.com/bmbrands/moodle 2021-06-29 11:39:26 +02:00
Ferran Recio 176bf81cb1 MDL-71863 courseformat: new course editor methods in courseeditor AMD
The module now exports a getCourseEditor and a getCurrentCourseEditor
methods. The module is more consistent as it can be used to get
other course than the current one.
2021-06-28 13:50:18 +02:00
Ferran Recio 934fd12ca8 MDL-71863 core: add templates to ignored plugin folders 2021-06-28 13:50:18 +02:00
Ferran Recio 21d93554d4 MDL-71863 courseformat: create courseformat subsystem 2021-06-28 13:50:18 +02:00
Sara Arjona 6144623683 Merge branch 'MDL-71777' of https://github.com/appalachianstate/moodle 2021-06-28 11:33:18 +02:00
Dongsheng Cai 2f9e38a6fb MDL-71946 core_calendar: remove icons from calendar events 2021-06-28 18:58:56 +10:00
Paul Holden c8f0fee909 MDL-71314 course: add category record snapshot to deletion event. 2021-06-25 14:50:17 +01:00
Fred Woolard 1e34610c4e MDL-71777 antivirus: Use hash_from_path (sha1_file) 2021-06-25 09:48:54 -04:00
Dan Marsden 4b18cc0bb1 MDL-71175 plagiarism: Deprecate some old functions. 2021-06-25 12:57:20 +12:00
Luca Bösch f662ea7e5d MDL-71971 mod_quiz: separate "Repaginate" and "Select multiple items" 2021-06-25 00:03:41 +02:00
Eloy Lafuente (stronk7) a747fd3055 weekly release 4.0dev 2021-06-24 23:03:06 +02:00
Eloy Lafuente (stronk7) a12cac8724 NOBUG: Fixed SVG browser compatibility 2021-06-24 23:03:02 +02:00
Eloy Lafuente (stronk7) 62353b113b Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-06-24 23:03:01 +02:00
Tim Hunt 8f20d1627b MDL-72010 quiz: prevent session timeouts during attempts 2021-06-24 12:24:47 +01:00
Bas Brands 72a7171b5c MDL-71947 core_quiz: vertical forms for access rule popups 2021-06-24 12:31:13 +02:00
Bas Brands 11288e1598 MDL-71947 theme_boost: fix styles for vertical forms 2021-06-24 12:30:02 +02:00
Simey Lameze 1834f1c9ce MDL-67208 calendar: fix manage subscription redirection
This patch fix the subcription page only adding the course parameter
only when viewing the calendar on course context. It also passes the
url to the form instance, so we have the course parameter on the
form action attribute.
2021-06-24 16:32:59 +08:00
Andrew Nicols 98620214e1 Merge branch 'MDL-71694-master' of https://github.com/lucisgit/moodle 2021-06-24 12:00:09 +08:00
Andrew Nicols 728b3d6a7a Merge branch 'MDL-67536-master' of https://github.com/dcai/moodle 2021-06-24 11:21:55 +08:00
Andrew Nicols b10ac1ae04 Merge branch 'MDL-69498-group-admin-by-domain' of https://github.com/brendanheywood/moodle 2021-06-24 11:13:10 +08:00
Andrew Nicols fa0ce04e63 Merge branch 'MDL-71837' of git://github.com/paulholden/moodle 2021-06-24 10:58:12 +08:00
Andrew Nicols b4e879788a Merge branch 'MDL-55243-master' of git://github.com/HuongNV13/moodle 2021-06-24 10:55:01 +08:00
Huong Nguyen 816aa7aec2 MDL-55243 files: Make is_valid_image support SVG files 2021-06-24 09:02:05 +07:00
Eloy Lafuente (stronk7) d9347556e3 Merge branch 'MDL-71717' of git://github.com/paulholden/moodle 2021-06-24 00:18:45 +02:00
Eloy Lafuente (stronk7) 5df31d920b Merge branch 'MDL-71293-master' of git://github.com/bmbrands/moodle 2021-06-23 23:43:08 +02:00
Eloy Lafuente (stronk7) 7c80183646 Merge branch 'MDL-71593-master' of git://github.com/ilyatregubov/moodle 2021-06-23 23:34:16 +02:00
Daniel Neis Araujo 57454180b2 MDL-71999 enrol: enrol_imsenterprise_allow_group_member_remove global 2021-06-23 13:22:18 -03:00
Bas Brands c36972b2c0 MDL-71293 theme_boost: improve navbar for new navigation 2021-06-23 12:03:10 +02:00
Andrew Nicols c5ec238f9f Merge branch 'MDL-71669-master' of git://github.com/junpataleta/moodle 2021-06-23 14:06:32 +08:00
Brendan Heywood 5d5f165e26 MDL-69498 admin: Group site admins by email domain 2021-06-23 15:22:37 +10:00
Jun Pataleta 242ccc4752 MDL-71669 atto_table: Set appropriate ARIA roles for table button
The table button can become a menu button when the cursor's position
in the editor is within a table. So we'd need to update the button with
ARIA attributes appropriate for a menu button.
This is best done when the button's highlight gets toggled, so we're
adding an event listener for when this happens and add/remove the ARIA
attributes accordingly.
2021-06-23 12:55:02 +08:00
Jun Pataleta 2dcede1b0b MDL-71669 editor_atto: Fire custom event when toggling button highlight 2021-06-23 12:55:02 +08:00
Jun Pataleta 45906644be MDL-71669 editor_atto: Create an events module for the atto editor 2021-06-23 12:55:01 +08:00
Huong Nguyen 2140d3e55c MDL-71771 core_calendar: Convert the calendar footer buttons to links 2021-06-23 09:41:04 +07:00
AMOS bot 405763bed1 Automatically generated installer lang files 2021-06-23 00:07:51 +00:00
Simey Lameze 29979f21ed MDL-71789 calendar: fix subscription url validation 2021-06-23 07:46:46 +08:00
Dongsheng Cai 56399ef9b8 MDL-71029 forum: fix post count for users have more than 1 enrolment 2021-06-23 09:41:13 +10:00
Tim Hunt 1af25720b0 MDL-71991 files: check return value of rename when writing files 2021-06-22 19:36:09 +01:00
Víctor Déniz 7a94a9f9e6 Merge branch 'MDL-71634-master' of git://github.com/lucaboesch/moodle 2021-06-22 18:27:38 +01:00
Sara Arjona 002f3e6cbf Merge branch 'MDL-70750-master' of git://github.com/ilyatregubov/moodle 2021-06-22 10:20:57 +02:00
Andrew Nicols 4c6f22b4e5 Merge branch 'MDL-70233-alternative-disabled-cache' of https://github.com/Peterburnett/moodle 2021-06-22 15:46:48 +08:00
Peter Dias cf66500557 MDL-70271 repository_dropbox: Switch to core\oauth2 API
Dropbox is updating their OAuth2 authentication to issue short-term
tokens, which are already supported by core\oauth2\client.

This commit updates the dropbox repository to use the
core\oauth2 API, which has built-in support for tokens and
offline access.
2021-06-22 11:44:11 +08:00
mohalisad cf05819840 MDL-71973 analytics cli: fix enabling model bug
Fix the exception at line 143 caused by wrong argument for constructor in line 140
2021-06-21 17:21:57 +04:30
Tony Butler 46fd1d77d6 MDL-71694 assignfeedback_comments: Behat test for feedback preservation
Including efficiency improvements from https://github.com/davosmith
2021-06-21 11:21:53 +01:00
Ilya Tregubov e8898b3bd9 MDL-71593 oauth2: Remove methods that were readded by mistake. 2021-06-21 10:11:16 +02:00
Ilya Tregubov 6ecfb59077 MDL-70750 mod_survey: Fix warning for undefined offset. 2021-06-21 08:41:48 +02:00
Dongsheng Cai 8a3e5377b1 MDL-67536 libraries: replace babel-polyfill with core-js 2021-06-21 12:03:58 +10:00
Eloy Lafuente (stronk7) b09942824b Merge branch 'MDL-71113-master' of git://github.com/andrewnicols/moodle 2021-06-19 17:57:13 +02:00
AMOS bot 6478a52f98 Automatically generated installer lang files 2021-06-19 00:07:53 +00:00
Víctor Déniz 2547760f01 Merge branch 'MDL-69524' of https://github.com/NeillM/moodle 2021-06-18 20:48:32 +01:00
Jun Pataleta 9d943c4ff9 MDL-71669 editor_atto: Set proper roles to toolbar menus
* Menu button fix
  - Added aria-haspopup, aria-controls, and aria-expanded attributes.
* Menu fixes
  - Added aria-labelledby that points to the menu button label.
  - Removed the dialog role in the menu's container.
  - The ul tag needs the "menu" role.
  - The li tag needs the role "none" instead of the "presentation" role

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton
2021-06-18 15:20:08 +08:00
Andrew Nicols 4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols 92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Andrew Nicols 70dcc60862 MDL-71113 js: Bare minimum fixes to build jsdoc 2021-06-18 09:38:04 +08:00
Andrew Nicols 1a62c82fef MDL-71113 js: Add jsdoc configuration and Grunt 2021-06-18 09:38:04 +08:00
AMOS bot af4aa9d21c Automatically generated installer lang files 2021-06-18 00:07:53 +00:00
Luca Bösch 9fc6c45b10 MDL-71634 course: Do not show "Your progress" info any more. 2021-06-17 19:22:13 +02:00
Víctor Déniz 338b60f43b weekly release 4.0dev 2021-06-17 14:54:50 +01:00
Neill Magill 3a8db568e1 MDL-69524 backup: Code style fixes for the file 2021-06-17 09:31:17 +01:00
Neill Magill 0f073a4b10 MDL-69524 backup: Add PHPdocs to backup_controller class 2021-06-17 09:31:15 +01:00
Andrew Nicols 0e7e393748 Merge branch 'MDL-71813-master' of https://github.com/NashTechOpenUniversity/moodle 2021-06-17 11:28:22 +08:00
Andrew Nicols 8c0f8286a7 Merge branch 'MDL-58592-master' of git://github.com/HuongNV13/moodle 2021-06-17 11:06:53 +08:00
Andrew Nicols f2ed5255e5 Merge branch 'MDL-71927' of https://github.com/timhunt/moodle 2021-06-17 10:52:18 +08:00
Andrew Nicols 7e480f8b16 Merge branch 'MDL-71697' of https://github.com/mkassaei/moodle 2021-06-17 10:48:05 +08:00
Andrew Nicols a7cce0186e Merge branch 'MDL-71926-master' of git://github.com/peterRd/moodle 2021-06-17 10:44:36 +08:00
Víctor Déniz 754d164391 Merge branch 'MDL-71052' of git://github.com/paulholden/moodle 2021-06-17 02:37:46 +01:00
Víctor Déniz 9fed7e6f13 Merge branch 'MDL-71764' of https://github.com/paulholden/moodle 2021-06-17 01:43:50 +01:00
Eloy Lafuente (stronk7) 350bb0a282 Merge branch 'MDL-71896-master' of git://github.com/merrill-oakland/moodle 2021-06-17 00:11:21 +02:00
Eloy Lafuente (stronk7) 48a2245c4d Merge branch 'MDL-71888' of git://github.com/paulholden/moodle 2021-06-17 00:08:04 +02:00
Eloy Lafuente (stronk7) d581b1dbb4 Merge branch 'MDL-71736-master' of git://github.com/andrewnicols/moodle 2021-06-17 00:01:41 +02:00
Eloy Lafuente (stronk7) 9395d24ca9 Merge branch 'MDL-56873-master' of git://github.com/mickhawkins/moodle 2021-06-16 23:30:26 +02:00
Mahmoud Kassaei c259a065b0 MDL-71697 Custom user field support: Grade report grader 2021-06-16 15:06:10 +01:00
Tony Butler ec0185ccc2 MDL-71694 assignfeedback_comments: Fill latest submitted comment data
Otherwise if grading validation fails, any new/updated comments are
lost and replaced with previously saved data (or an empty editor).
2021-06-16 12:04:03 +01:00
Andrew Nicols fb61c1d930 Merge branch 'MDL-69908' of git://github.com/paulholden/moodle 2021-06-16 15:28:32 +08:00
Andrew Nicols 6ad0f55c5f Merge branch 'MDL-71528-master' of git://github.com/aanabit/moodle 2021-06-16 13:19:21 +08:00
Andrew Nicols 12ce136740 Merge branch 'MDL-71804' of https://github.com/stronk7/moodle 2021-06-15 11:26:46 +08:00
Peter Dias 25ef989bdb MDL-71926 core: Check capabilities before adding link
Check whether the user has the capability to manage courses before adding any link
2021-06-15 08:37:38 +08:00
Tim Hunt b4bbbf15a3 MDL-71927 reports: show time to the second in logs report
And in the question history in quiz reviews.

Without this, it can be difficult to investigate some problems.
2021-06-14 21:41:16 +01:00
Amaia Anabitarte 377aee95b5 MDL-71528 usertours: End button text for one step user tours 2021-06-14 17:30:03 +02:00
Paul Holden c260bad774 MDL-69908 user: include groups with exported course participants. 2021-06-14 09:31:30 +01:00
Sara Arjona 6347b916bc MDL-71165 course: core_course_update_course external method 2021-06-14 14:36:20 +08:00
Andrew Nicols a9b0f4dafe Merge branch 'MDL-71134-master-v03' of git://github.com/ferranrecio/moodle 2021-06-14 11:52:35 +08:00
Eloy Lafuente (stronk7) a9fb50a1be MDL-71804 travis: Bump to bionic 2021-06-13 22:53:32 +02:00
abgreeve 9533e8ddf5 weekly release 4.0dev 2021-06-11 13:52:09 +08:00
abgreeve bf5a4663e8 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-06-11 13:52:08 +08:00
Paul Holden 709b5aa9e1 MDL-71764 mod_quiz: custom user profile field support for attempts. 2021-06-10 20:52:22 +01:00
Eric Merrill 9552a027b5 MDL-71896 dml: Add auroramysql to config-dist 2021-06-10 15:29:27 -04:00
Ferran Recio ee3547306e MDL-71134 course: fix format get_output_classname
The get_output_classname method is used to invoke overridden output
components from course_formats. Now the method does not accept null
output names anymore, and it controls the format class is extending
the core one.
2021-06-10 16:08:39 +02:00
Ferran Recio e6779782dc MDL-71134 course: new course editor reactive module
The new course editor for Moodle 4.0 is the first AMD
module that will use the new reactive library. This
commit creates creates the initial structure of the
new course editor frontend.
2021-06-10 16:08:39 +02:00
Sujith Haridasan f11be42fae MDL-68915 core_form: Fix the behat test failure
Fix the behat test failure for the forums when
grades exist.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-10 15:05:42 +08:00
Michael Hawkins 18a7f0134d MDL-56873 admin: Set sensible default cURL security settings 2021-06-10 12:01:39 +08:00
Andrew Nicols fb39111722 Merge branch 'MDL-71806-improve-check-ux' of https://github.com/brendanheywood/moodle 2021-06-10 11:57:45 +08:00
Adrian Greeve eea0b54fdb Merge branch 'MDL-71369-master' of git://github.com/andrewnicols/moodle 2021-06-10 11:50:48 +08:00
Andrew Nicols d3654c3a27 Merge branch 'MDL-71838' of https://github.com/timhunt/moodle 2021-06-10 11:38:50 +08:00
Adrian Greeve 4af7195d1e Merge branch 'MDL-68915-master' of https://github.com/sharidas/moodle 2021-06-10 11:35:43 +08:00
Adrian Greeve 226c1d7a45 Merge branch 'MDL-64236-master' of git://github.com/mihailges/moodle 2021-06-10 11:29:19 +08:00
Andrew Nicols 8c8eac9df5 Merge branch 'MDL-67822-schema-check' of https://github.com/brendanheywood/moodle 2021-06-10 11:03:52 +08:00
Sujith Haridasan 25ea1f8e64 MDL-68915 lesson: Do not allow maxgrade change
Do not allow maxgrade change when some of the
users are already graded. As of now this is applicable
to the following activities:
1. Forum
2. Database
3. Lesson
4. Glossary

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-10 08:30:39 +05:30
Andrew Nicols f7222e6ee4 Merge branch 'MDL-71559-master' of https://github.com/sammarshallou/moodle 2021-06-10 10:57:26 +08:00
Adrian Greeve 5e6a3a46fc Merge branch 'MDL-71682' of git://github.com/paulholden/moodle 2021-06-10 10:52:11 +08:00
Andrew Nicols c116f35cb9 Merge branch 'MDL-71832-master' of https://github.com/sammarshallou/moodle 2021-06-10 10:39:36 +08:00
Andrew Nicols 412c7a4afa MDL-71382 couurse: Remove unnecessary js tag for test 2021-06-10 09:58:12 +08:00
Andrew Nicols 6bc1346333 Merge branch 'MDL-71382-master' of git://github.com/ilyatregubov/moodle 2021-06-10 09:48:55 +08:00
Andrew Nicols 11956c1812 Merge branch 'MDL-71836-master' of https://github.com/sammarshallou/moodle 2021-06-10 09:06:10 +08:00
Andrew Nicols e146f919fc Merge branch 'MDL-70230-master' of https://github.com/jpahullo/moodle 2021-06-10 08:45:26 +08:00
Andrew Nicols 73a5098a89 Merge branch 'MDL-70846-master' of https://github.com/dcai/moodle 2021-06-10 08:41:11 +08:00
AMOS bot 30da07cfa5 Automatically generated installer lang files 2021-06-10 00:07:45 +00:00
Paul Holden db98991498 MDL-71888 admin: define clitablesexist string used by CLI installer. 2021-06-09 22:04:30 +01:00
Andrew Nicols 657cbe587e MDL-71736 javascript: Run the ignorefiles command more liberally 2021-06-09 18:54:24 +08:00
Andrew Nicols 64e7326649 MDL-71874 behat: Show warning when using add to section without js 2021-06-09 16:26:43 +08:00
abgreeve d969465d41 Merge branch 'MDL-67975-master' of https://github.com/sharidas/moodle 2021-06-09 16:14:52 +08:00
Sujith Haridasan 0845f53d14 MDL-67975 nextcloud: Add support for Link to file
This change set would bring the following new additions
to the nextcloud repo:
1. Create a new radio button in filepicker: "Link to file"
2. When user clicks this radio button a warning message
   would be created, saying this file would become public.
   Meaning a public link is created in the nextcloud server.
3. Created a sync_reference method to sync the files downloaded
   from nextcloud server. The sync/refresh time given is 1 day/24 hours.
4. Made sure that when the file is downloaded, we use the file
   from moodledata file pool.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-06-09 13:34:31 +05:30
Andrew Nicols 7782eeb55e Merge branch 'MDL-65637-master' of git://github.com/peterRd/moodle 2021-06-09 13:22:49 +08:00
Eloy Lafuente (stronk7) 9f960ef744 Merge branch 'master_MDL-69194-core_user_update_users' of https://github.com/mattporritt/moodle 2021-06-08 19:26:28 +02:00
abgreeve 1a9e810e06 Merge branch 'MDL-71207_master' of https://github.com/TomoTsuyuki/moodle 2021-06-08 10:44:04 +08:00
Matt Porritt 8281261b5a MDL-69194 user: make core_user_update_users return warnings
Add unit test coverage for the new warning scenarios.
2021-06-08 01:24:48 +00:00
Tomo Tsuyuki 14d11b8f0e MDL-71207 course: Add info for task error 2021-06-08 09:44:59 +10:00
Eloy Lafuente (stronk7) ee7c31458a Merge branch 'master-MDL-71471_v2' of https://github.com/golenkovm/moodle 2021-06-07 20:14:46 +02:00
Eloy Lafuente (stronk7) 415a8c1c2c Merge branch 'MDL-71135-master' of git://github.com/sarjona/moodle 2021-06-07 12:56:50 +02:00
Ferran Recio b85cba317e MDL-71134 core: add new reactive modules
The new course creation for Moodle 4.0 requires to add
some leavel of reactivity to the frontend. Instead of
building a specific solution only for the course editor,
in this commit there's a generic solution that can be
used in other places in Moodle to implement single
state reactive components.
2021-06-07 12:27:06 +02:00
Vitaly Potenko 6e7d77d11c MDL-69194 user: make core_user_update_users return warnings
The external function 'core_user_update_users()' always returned 'null' no matter
if a user or users were successfully updated or there were some failures.
So, there was no way for the caller to know which users were updated and which were not.
After the commit changes the function returns an 'external_warnings' instance. The function uses
a delegated transaction for each user to update within a loop. This enables the function to update
as many users as possible. This differs from the previous behavior of the function when it used
a delegate transaction outside of the loop where the users were updated. This resulted in a rollback
of the whole users updating in case any of the users had some invalid data. For each user within a loop
a 'try-catch' block is used to throw exceptions which are actually returned
as warnings by the function when they are caught.
2021-06-07 05:44:49 +00:00
Sara Arjona 5f91cbb611 MDL-71135 course: core_course_get_state external method 2021-06-04 16:43:28 +02:00
Sara Arjona f7b0960d18 MDL-71135 course: add legacy_format_renderer support
Until Moodle 4.0, renderer.php file was optional (although highly recommended)
for course formats. From Moodle 4.0 onwards, renderer is required to support
the new course editor implementation.
The legacy_format_renderer class has been created for backward compatibility,
to avoid some errors with course formats (such as social) without the renderer
file. Apart from that, course_format->get_renderer() method has been reviewed
to use this legacy_format_renderer when no renderer.php file is found.
2021-06-04 16:43:06 +02:00
Paul Holden 7f6364971e MDL-71052 course: use filetypes setting for course overview files. 2021-06-04 09:35:15 +01:00
Jordi Pujol Ahulló 9c4510a358 MDL-70230 admin: add setting sched. task status
When defining settings that are used by scheduled tasks,
it is also useful, or even needed, to know the status
of that scheduled task to have the whole big picture of
that part of the system.

Based on the admin_setting_description, this new setting
reports its name, its status, a link to the configuration.

When adding a new setting of this type, the user can add
an extra description field to complete the whole meaning.
2021-06-04 08:12:16 +02:00
Mikhail Golenkov f3cd860698 MDL-71471 assign: Remove submission from queue when converted in web 2021-06-04 15:18:59 +10:00
Eloy Lafuente (stronk7) 411150a424 weekly release 4.0dev 2021-06-03 23:56:05 +02:00
Eloy Lafuente (stronk7) 99f76ae180 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-06-03 23:56:01 +02:00
sam marshall 007cde2eab MDL-71559 core_user: Fields support for PROFILE_VISIBLE_TEACHERS 2021-06-03 11:23:06 +01:00
Bas Brands c11a90acab MDL-71366 core_question: prevent question options overflow 2021-06-03 11:19:12 +02:00
Bas Brands 265629b568 MDL-71366 core_question: prevent shrinking of input radio 2021-06-03 11:08:38 +02:00
hiendinh ffb403d9b5 MDL-71813 filepicker: view file not available using keyboard (Enter) 2021-06-03 14:14:21 +07:00
Dongsheng Cai 4357b7ef16 MDL-70846 accessibility: update color to increase contrast 2021-06-03 13:52:05 +10:00
Dongsheng Cai e3690a392d MDL-70846 accessibility: update tree attributes to pass a11y check
- Move aria-* atrributes from <p> to <li>
- Move "role" attribute from <p> to <li>
- Update behat tests

Based on reference implementation from:
- https://www.w3.org/TR/wai-aria-practices-1.1/examples/treeview/treeview-2/treeview-2a.html
- https://www.w3.org/WAI/GL/wiki/Using_ARIA_trees
2021-06-03 13:52:04 +10:00
Andrew Nicols 95fed58b5e Merge branch 'MDL-71741-master' of git://github.com/HuongNV13/moodle 2021-06-03 11:51:12 +08:00
Huong Nguyen 711d309aa3 MDL-71741 portfolio: Reset header information between requests
The reset process also removes the CURLFile option in the HTTP object,
which will avoid the serialisation issue on PHP7.4 and upward
2021-06-03 10:49:50 +07:00
Andrew Nicols 1edd0acaaf Merge branch 'MDL-71661' of https://github.com/paulholden/moodle 2021-06-03 11:44:57 +08:00
abgreeve c5a08d897d Merge branch 'MDL-71284-master' of git://github.com/lucaboesch/moodle 2021-06-03 11:42:53 +08:00
Andrew Nicols ad2d9ec710 Merge branch 'MDL-71668-master' of git://github.com/rezaies/moodle 2021-06-03 11:31:42 +08:00
Andrew Nicols 5bbe63c584 Merge branch 'MDL-71622' of https://github.com/stronk7/moodle 2021-06-03 11:18:25 +08:00
Andrew Nicols aaba6ccce3 Merge branch 'MDL-71737-master' of git://github.com/HuongNV13/moodle 2021-06-03 11:06:57 +08:00
abgreeve 6176e350fc Merge branch 'MDL-71693' of git://github.com/paulholden/moodle 2021-06-03 10:17:11 +08:00
abgreeve e634ad8e3d Merge branch 'MDL-68927' of https://github.com/paulholden/moodle 2021-06-03 09:47:06 +08:00
abgreeve ef1d17c8ba Merge branch 'MDL-71644-master' of https://github.com/NashTechOpenUniversity/moodle 2021-06-03 09:40:43 +08:00
Eloy Lafuente (stronk7) 439dd153fe Merge branch 'MDL-71476-drop_myisam_migrate' of https://github.com/leonstr/moodle 2021-06-03 00:00:07 +02:00
Eloy Lafuente (stronk7) 0f5e9aa759 Merge branch 'master-MDL-71438_v2' of https://github.com/golenkovm/moodle 2021-06-02 23:51:52 +02:00
Paul Holden 3bd4d676c0 MDL-71717 libraries: upgrade to version 2.3.6 of FPDI. 2021-06-02 21:44:01 +01:00
Paul Holden e2327b5219 MDL-71682 course: remove deprecated non-AJAX activity chooser call.
The deprecated method to render the dropdown based activity chooser
from 430746d3 was still being called, which produced debugging on
the site when doing so.
2021-06-02 21:00:24 +01:00
Paul Holden 2f6e07d240 MDL-71837 calendar: turn off export form double submit protection. 2021-06-02 19:50:38 +01:00
Tim Hunt 1287ecaeff MDL-71838 quiz reports: average rows calc can run out of memory
Should not use get_records when you mean record_exists.
2021-06-02 16:06:32 +01:00
sam marshall 171313781d MDL-71836 core_enrol: Cannot search for users by username 2021-06-02 14:52:43 +01:00
Mikhail Golenkov ee3c6ad3ac MDL-71438 blocks: Add index on mdl_user_preferences.name 2021-06-02 22:10:37 +10:00
sam marshall 92bcadb9a8 MDL-71832 core_admin: Browse users page, sort by custom field fails
The failure was because the sort parameter in URL is like
profile_field_xx, but PARAM_ALPHANUM strips the _ symbols.
2021-06-02 12:03:37 +01:00
Brendan Heywood fbb36f8977 MDL-67822 report_performance: Add DB schema check 2021-06-02 18:45:12 +10:00
Ilya Tregubov b071a7b838 MDL-71382 course: Don't allow empty name for section 0. 2021-06-02 08:42:12 +02:00
Andrew Nicols 9d9352e01a Merge branch 'master-MDL-70337' of https://github.com/golenkovm/moodle 2021-06-02 12:20:47 +08:00
Huong Nguyen 36d5b918f0 MDL-58592 group: Remove group description on the groups overview page 2021-06-02 09:29:36 +07:00
Peter Dias 8e71f6b1f1 MDL-65637 core_oauth2: Introduce a new custom linkedin oauth2 client 2021-06-02 08:11:38 +08:00
Peter Dias 169e1812ed MDL-65637 core_oauth2: Create new oauth2 mapping function
Separated userinfo mapping into a function and new unit test
2021-06-02 08:11:38 +08:00
AMOS bot 0c93e0fb28 Automatically generated installer lang files 2021-06-02 00:07:41 +00:00
Brendan Heywood 7d96f74f6f MDL-71806 report_security: Improve public paths check 2021-06-01 18:24:53 +10:00
Andrew Nicols 73d178eb8f Merge branch 'MDL-71731' of https://github.com/stronk7/moodle 2021-06-01 12:46:54 +08:00
Huong Nguyen 6372d61f71 MDL-66539 atto_link: Non-intuitive action for atto link button 2021-06-01 08:52:32 +07:00
Eloy Lafuente (stronk7) 219ec6648c Merge branch 'MDL-71474' of https://github.com/paulholden/moodle 2021-05-31 23:03:16 +02:00
Eloy Lafuente (stronk7) cd03d5570b Merge branch 'MDL-70905-master' of https://github.com/kabalin/moodle 2021-05-31 22:41:28 +02:00
Eloy Lafuente (stronk7) 1a8f79a177 Merge branch 'MDL-71595-master' of https://github.com/sammarshallou/moodle 2021-05-31 22:34:39 +02:00
Shamim Rezaie 2ea485da78 MDL-71668 editor_atto: Accissibility focus styling for Atto buttons
Make all Atto buttons consistent in the way they show the focus outline
2021-05-31 19:20:49 +10:00
AMOS bot 86690ba498 Automatically generated installer lang files 2021-05-29 00:07:46 +00:00
Paul Holden fcbb2bda56 MDL-71474 mod_chat: remove redundant next session action item.
Deprecate now unused lang string for same.
2021-05-28 14:49:11 +01:00
Huong Nguyen 140252ad0f MDL-71737 portfolio: Make is_valid_image become internal function 2021-05-28 15:03:41 +07:00
Huong Nguyen 5f91063c91 MDL-71741 portfolio: Use the correct configurations 2021-05-28 08:52:05 +07:00
Luca Bösch 0fb0743025 MDL-71284 assign: prevent double escaping assignment name. 2021-05-27 20:31:42 +02:00
Eloy Lafuente (stronk7) 515fc0447e MDL-71731 phpunit: isolate tests requiring lots of peak mem
It's mostly addDocuments(), used by test_add_document_batch_large()
with 100 big documents what requires a lot of ram
although apparently, it's freed (partially) once ended.
Just the peak usage remains high. In any case, isolating that
test to avoid the non-freed side of it to consume too
much memory for the rest. (We allow "only" 2GB).

Still, I think that there is a good work about to detect which
tests are leaking / consuming too much, I'd bet there are
a bunch running completely out of control.
2021-05-27 19:42:22 +02:00
Eloy Lafuente (stronk7) 72f838ad96 MDL-71622 behat: use own fork of friends-of-behat/mink-extension
Upstream behat/mink-extension isn't updated since 2018.

So we switch to friends-of-behat/mink-extension until
upstream situation is clarified.

But friends-of-behat/mink-extension has some PHP8 issues
that, at the time of writting this, have not been solved:

- https://github.com/FriendsOfBehat/MinkExtension/pull/9

So we are temporarily changing to one fork:

https://github.com/moodlehq/MinkExtension

Whenever those issues are solved by friends-of-beha or behat
we will change back to them and remove our fork.

Generated with composer 2.x and PHP 7.3
2021-05-27 19:42:14 +02:00
Sara Arjona 30b8ad51f4 weekly release 4.0dev 2021-05-27 17:45:06 +02:00
Sara Arjona 11b4b412f5 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-05-27 17:45:03 +02:00
Sara Arjona 85d9ea2c09 Merge branch 'MDL-69703' of git://github.com/paulholden/moodle 2021-05-27 12:24:47 +02:00
Eloy Lafuente (stronk7) fc3238baa2 Merge branch 'MDL-68394-master' of git://github.com/ilyatregubov/moodle 2021-05-27 12:21:00 +02:00
Ilya Tregubov bbfb73afbd MDL-68394 h5pactivity: Limit query to given course module. 2021-05-27 12:08:28 +02:00
Paul Holden 4d484a34a7 MDL-69703 theme_boost: ensure multi-select options take all space. 2021-05-27 10:44:10 +01:00
Sara Arjona 31ae8472fe Merge branch 'MDL-71145-master' of git://github.com/HuongNV13/moodle 2021-05-27 11:36:53 +02:00
Huong Nguyen a962c705f0 MDL-71145 qtype_ddmarker: Fix Behat failure 2021-05-27 15:29:07 +07:00
Andrew Nicols 5bc02e7c40 Merge branch 'MDL-69703' of git://github.com/paulholden/moodle 2021-05-27 12:05:44 +08:00
Andrew Nicols c1b5ff301c Merge branch 'MDL-71637-master' of git://github.com/peterRd/moodle 2021-05-27 11:47:59 +08:00
Andrew Nicols 676e366257 Merge branch 'MDL-53544-master-2' of git://github.com/peterRd/moodle 2021-05-27 11:43:46 +08:00
Andrew Nicols e290e625ed Merge branch 'MDL-71466-master' of https://github.com/sammarshallou/moodle 2021-05-27 11:25:59 +08:00
Andrew Nicols 1aa1276a84 Merge branch 'MDL-71047-master' of https://github.com/NashTechOpenUniversity/moodle 2021-05-27 11:18:14 +08:00
Andrew Nicols 687b3928d8 Merge branch 'MDL-70853-master' of git://github.com/lucaboesch/moodle 2021-05-27 10:58:50 +08:00
Peter Dias d1c978c33c MDL-53544 core: Performance update is_charset_supported 2021-05-27 10:25:08 +08:00
Andrew Nicols a30d50c30a MDL-71462 core: Remove duplicate gitignore line 2021-05-27 09:54:02 +08:00
Andrew Nicols c04c0a8b57 Merge branch 'MDL-71462-master' of https://github.com/SysBind/moodle 2021-05-27 09:52:59 +08:00
Andrew Nicols 0f5ce89003 Merge branch 'MDL-67771-master' of git://github.com/peterRd/moodle 2021-05-27 09:44:26 +08:00
Andrew Nicols 3796be8126 Merge branch 'MDL-71145-master' of git://github.com/HuongNV13/moodle 2021-05-27 09:35:09 +08:00
AMOS bot fccd6fd95f Automatically generated installer lang files 2021-05-27 00:07:47 +00:00
Eloy Lafuente (stronk7) 27df23a5b7 Merge branch 'MDL-71159-master' of git://github.com/andrewnicols/moodle 2021-05-26 18:35:55 +02:00
Eloy Lafuente (stronk7) a2f6a833cc Merge branch 'MDL-68394-master' of git://github.com/ilyatregubov/moodle 2021-05-26 17:25:44 +02:00
Sara Arjona eeb5b4b4d8 Merge branch 'MDL-53544-master-2' of git://github.com/peterRd/moodle 2021-05-26 12:39:25 +02:00
Peter Dias f991397011 MDL-53544 lib: Update unit tests and thirdpartylibs 2021-05-26 16:46:30 +08:00
Peter Dias 490c72f491 MDL-53544 core: Remove typo3 usages in core 2021-05-26 16:46:30 +08:00
Peter Dias 36c64105a7 MDL-53544 lib: Remove typo3 from text.php 2021-05-26 16:46:30 +08:00
Peter Dias 5bf48252b5 MDL-71637 core: Set default for mb_substitute_character 2021-05-26 13:51:46 +08:00
Mihail Geshoski 9d80686630 MDL-64236 gradereport_grader: Add padding to content in grader report
In certain operative systems the browser's scrollbar may partly cover
the content in the student header and user cells when horizontally
scrolling through the table contents. This is most noticeable when in
RTL mode. Adding slight padding on the left (or right in RTL mode) to
the content in these cells would fix this UI issue.
2021-05-26 13:33:07 +08:00
Ilya Tregubov 045c3ec3ee MDL-68394 h5pactivity: Implement methods to display recent
activity info.
2021-05-26 06:54:34 +02:00
Jake Dallimore 83644cc414 Merge branch 'MDL-70990-master' of git://github.com/andrewnicols/moodle 2021-05-26 12:49:34 +08:00
Andrew Nicols 743d17ff58 MDL-70990 core: Deprecate core/events::getLegacyEvents() 2021-05-26 10:49:01 +08:00
Andrew Nicols 31d6adef4d MDL-70990 core_block: Replace legacy BLOCK_CONTENT_UPDATED event
The legacy M.core.event.BLOCK_CONTENT_UPDATED event has been replaced with a
new core_block/events::blockContentUpdated native DOM event.

The new event can be triggered using the `notifyBlockContentUpdated`
event, and by providing the HTMLElement that was updated, for example:

```
import {notifyBlockContentUpdated} from 'core_block/events';

const someHandler = e => {
    // ...
    const updatedBlock = e.target.closest('.block');
    notifyBlockContentUpdated(updatedBlock);
};
```

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_block/events';

const handler = e => {
    // The block that was updated.
    e.target;

    // The id of the updated block.
    e.detail.instanceId;
};

document.addEventListener(eventTypes.blockContentUpdated, handler);
```

A backward-compatabibility layer is included to ensure that any legacy
YUI event listener is still called with the same arguments.

This legacy bridges will be removed after Moodle 4.3.
2021-05-26 10:47:17 +08:00
Andrew Nicols 1a9d53d831 MDL-70990 core_form: Replace FORM_ERROR event
The legacy M.core.event.FORM_ERROR event has been replaced with a new
core_form/events::formError native DOM event.

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_form/events';

document.addEventListener(eventTypes.formError, handler);
```

A backward-compatabibility layer is included to ensure that any legacy
YUI event listener is still called with the same arguments.

This legacy bridges will be removed after Moodle 4.3.
2021-05-26 10:47:17 +08:00
Andrew Nicols d4c6ac20c7 MDL-70990 core_filter: Add new native filterContentUpdated event
The legacy M.core.event.FILTER_CONTENT_UPDATED event has been replaced with a
new core_filter/events::filterContentUpdated native DOM event.

The new event can be triggered using the `notifyFilterContentUpdated`
function, and by providing with an Array containing the HTMLElements
that were updated, for example:

```
import {notifyFilterContentUpdated} from 'core_filter/events';

const someHandler = e => {
    // ...
    const nodeList = Array.from(document.querySelectorAll('div'));
    notifyFilterContentUpdated(nodeList);
};
```

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_filter/events';

const handler = e => {
    // The list of HTMLElements in an Array.
    e.detail.nodes;
};

document.addEventListener(eventTypes.filterContentUpdated, handler);
```

A backward-compatabibility layer is included to ensure that any legacy
YUI event listener, or jQuery event listener are still called with the
same arguments.

This legacy bridges will be removed after Moodle 4.3.
2021-05-26 10:47:15 +08:00
Andrew Nicols a44cee78f1 MDL-70990 core_editor: Replace EDITOR_CONTENT_RESTORED event
The legacy M.core.event.EDITOR_CONTENT_RESTORED event has been replaced
with a new core_editor/events::editorContentRestored native DOM event.

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_editor/events';

document.addEventListener(eventTypes.editorContentRestored, handler);
```

A backward-compatabibility layer is included to ensure that any legacy
jQuery event is still called with the same arguments.

This legacy bridge will be removed after Moodle 4.3.
2021-05-26 10:47:03 +08:00
Andrew Nicols a1ccefe2ac MDL-70990 core_form: Standardise event name usage
The `types` object introduced in Moodle 3.11 has been replaced with the
`eventTypes` object which is used consistently across all CustomEvent
definitinos.

Likewise the trigger functions have been renamed from
`triggerUploadStarted` to `notifyUploadStarted` and from
`triggerUploadCompleted` to `notifyUploadCompleted`.

Backwards compatability is maintained.
2021-05-26 10:46:52 +08:00
Andrew Nicols 919db49a44 MDL-70990 core_form: Replace FORM_FIELD_VALIDATION event
The legacy core/event::FORM_FIELD_VALIDATION event has been replaced with a
new core_form/events::formFieldValidationFailed native DOM event.

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_form/events';

document.addEventListener(eventTypes.formFieldValidationFailed, handler);
```

A backward-compatabibility layer is included to ensure that any legacy
jQuery event is still called with the same arguments.

This legacy bridge will be removed after Moodle 4.3.
2021-05-26 10:46:52 +08:00
Andrew Nicols acd9d9823b MDL-70990 core_form: Replace FORM_SUBMIT_AJAX event
The legacy M.core.event.FORM_SUBMIT_AJAX ecent has been replaced with a
new core_form/events::formSubmittedByJavascript native DOM event.

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_form/events';

document.addEventListener(eventTypes.formSubmittedByJavascript, handler);
```

A backward-compatabibility layer is included to ensure that any
legacy YUI event triggered on a form is still respected and the new
native event is also fired.

A similar handler is also included to ensure that any legacy YUI event
listener is still called with the same arguments.

These legacy bridges will be removed after Moodle 4.3.
2021-05-26 10:46:49 +08:00
Andrew Nicols da8658e49a MDL-70990 core: Rewrite core/event as ES6 2021-05-26 10:45:21 +08:00
Andrew Nicols d30f573f47 Merge branch 'MDL-71628-master' of https://github.com/nguyenphuctien/moodle 2021-05-26 10:38:48 +08:00
Sara Arjona 0fe09ffcad Merge branch 'MDL-68925_master' of git://github.com/mdjnelson/moodle 2021-05-25 15:34:23 +02:00
Tien Nguyen b14e2d3bf3 MDL-71628 quiz: Quiz review: names not shown on Manual grading screens 2021-05-25 16:28:52 +07:00
Eloy Lafuente (stronk7) 413551656d Merge branch 'MDL-71659-master-missinggradeitem' of git://github.com/mudrd8mz/moodle 2021-05-24 23:22:59 +02:00
Paul Holden 241641ab59 MDL-69703 theme_boost: remove right padding for multi-selects.
This removes the whitespace obscuring longer option elements when
selected, particularly on narrow screens.
2021-05-24 15:56:46 +01:00
Paul Holden 42a59cbc66 MDL-71661 cohort: support custom user profile fields. 2021-05-24 15:02:35 +01:00
avi 641afc2631 MDL-71462 core: Add phpstorm metadata file to gitignore 2021-05-24 15:56:05 +03:00
Andrew Nicols 053b0462fd MDL-70990 core: Ignore amd directory in plugin-like lists
The `get_list_of_plugins()` function is used to fetch plugin-like files
or directories from a specified directory. A number of standard
exclusions are included but this list is not the same as the list in
`core_component`.

The list has been updated to include the `amd` directory, which is
regularly used in both components, and plugins.
2021-05-24 08:47:09 +08:00
Mikhail Golenkov ed5e808052 MDL-70337 backup: Enhance automated backup logs readability 2021-05-24 10:29:02 +10:00
AMOS bot 1fa14adc54 Automatically generated installer lang files 2021-05-24 00:07:47 +00:00
AMOS bot 5a84ad7dcb Automatically generated installer lang files 2021-05-23 00:07:43 +00:00
Andrew Nicols a48a917477 MDL-71369 admin: Apply form change checker to admin/category view 2021-05-21 09:57:34 +08:00
Peter Dias ca76395aba MDL-53544 lib: Remove old Typo3 files 2021-05-21 09:54:36 +08:00
Huong Nguyen 9079814421 MDL-71145 qtype_ddmarker: Incorrect marker positions in responsive mode 2021-05-21 08:42:50 +07:00
Jun Pataleta 85dc1ec358 Merge branch 'MDL-60431' of https://github.com/jonof/moodle 2021-05-21 08:56:08 +08:00
Jonathon Fowler be65ee093d MDL-60431 qtype_calculated: handle NAN and INF calculation outcomes
With significant-digits presentation mode, NAN would be formatted as
'NAN' followed by zeroes, which looks silly, and +INF would cause an
execution timeout as Moodle tries to divide +∞ by 10 until it becomes
less than 1, which can happen in a divide-by-zero situation.

Note that the user can't answer NAN or INF to any question, but at this
at least now looks consistent and also doesn't break Moodle in the case
of +INF.
2021-05-21 09:36:06 +10:00
Paul Holden 48e70b5fdb MDL-71693 admin: set default for debugdisplay to off.
The previous default value for this config was based on the
PHP ini file `display_error` property (6349a3ba). However we
override this propertly during page setup (25338300) according
to the value of the configuration itself.

This had the effect of always setting the default value for
this config to it's current value.
2021-05-20 21:37:37 +01:00
Luca Bösch 942dc9de42 MDL-70853 theme: align submit buttons in settings forms. 2021-05-20 13:00:28 +02:00
Sara Arjona efb3d4e7a7 weekly release 4.0dev 2021-05-20 11:09:00 +02:00
Sara Arjona 19eef15774 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-05-20 11:08:57 +02:00
Peter Dias 2d47939366 MDL-67771 theme: Add side-post to incourse views 2021-05-20 15:13:51 +08:00
Mark Nelson e170f1c957 MDL-68925 assignfeedback_editpdf: avoid hiding comments with a menu open
Co-authored by: Jonathon Fowler <fowlerj@usq.edu.au>
2021-05-20 13:14:00 +08:00
Jun Pataleta 97429f82b4 Merge branch 'MDL-71157-master' of git://github.com/sarjona/moodle 2021-05-20 12:30:15 +08:00
abgreeve de3f8e1240 Merge branch 'MDL-65203-master' of https://github.com/dcai/moodle 2021-05-20 11:10:07 +08:00
Andrew Nicols df7bbf713e Merge branch 'MDL-71647' of https://github.com/paulholden/moodle 2021-05-20 10:49:13 +08:00
Andrew Nicols da8787d68d Merge branch 'MDL-71626' of https://github.com/paulholden/moodle 2021-05-20 09:32:06 +08:00
Thong Bui f81cdd42b2 MDL-71644 Quiz: The issues outstanding from MDL-70947.
Issue 1: While essay question's uploading progress, we need to disable submit
buttons to prevent submit form event.

Issue 2: Enable buttons after pressing cancel button on the popup
confirming overwrite file existed.
2021-05-20 08:29:31 +07:00
Eloy Lafuente (stronk7) ba4a7b8ccb Merge branch 'MDL-71126-master' of git://github.com/HuongNV13/moodle 2021-05-19 23:02:41 +02:00
Eloy Lafuente (stronk7) 731a1ea04d Merge branch 'MDL-67935-master' of git://github.com/sarjona/moodle 2021-05-19 22:50:02 +02:00
Eloy Lafuente (stronk7) e27f6c2060 Merge branch 'MDL-71373-master' of git://github.com/lucaboesch/moodle 2021-05-19 19:36:04 +02:00
Luca Bösch 1c7dc8fa6e MDL-71373 tool_usertours: localize "previous"/"next" in user tours.
AMOS BEGIN
        CPY [previous,core],[previousstep,tool_usertours]
        CPY [next,core],[nextstep,tool_usertours]
       AMOS END
2021-05-19 09:55:30 +02:00
Sara Arjona fd8dabc9fe MDL-71157 block_myoverview: remove wait from behat
The step "And I wait until ".block_myoverview
[data-control='next']" "css_element" exists" is not correct
because this [data-control='next'] element exists before and
after the step so, in some cases, it might cause the following
step will start earlier than expected.
As pending JS has been added, this wait steps are not required
any more.
2021-05-19 09:43:04 +02:00
Andrew Nicols dfaa450621 MDL-71157 core: Pending JS in paged content bars 2021-05-19 09:30:15 +02:00
Leon Stringer 267aa870d3 MDL-71476 core_cli: Remove MyISAM migration
Remove support for migrating MySQL databases using the old MyISAM storage
engine to the InnoDB storage engine.  MyISAM was supported up to Moodle
2.8 (dropped in 2.9: MDL-46064).  Beyond Moodle 3.3 -- the highest version
that can upgrade from 2.8 -- this functionality was no longer applicable.
2021-05-19 08:27:19 +01:00
Eloy Lafuente (stronk7) c494791f30 Merge branch 'MDL-71619' of https://github.com/paulholden/moodle 2021-05-18 22:59:13 +02:00
Eloy Lafuente (stronk7) 29b15b76e2 Merge branch 'MDL-71373-master' of git://github.com/lucaboesch/moodle 2021-05-18 22:41:42 +02:00
David Mudrák a949a151f3 MDL-71659 completion: Consider modules without grade_item incomplete
Activity modules may not have the associated grade_item created yet. It
used to throw fatal error in that case - even when trying to view the
course or edit the activity. So there was no easy way to recover from
this situation.

The patch is based on reasoning that an activity without grade item is
same as activity without any grades. And as such it is considered
incomplete.

A new unit test is added to cover this specific scenario. The existing
unit test is modified and it does not expect the exception any more.
There does not seem to be any good reason why this situation should be
exceptional.
2021-05-18 20:59:51 +02:00
Dongsheng Cai ee58790e46 MDL-65203 template: tab should be quoted to produce valid json 2021-05-18 20:40:32 +10:00
AMOS bot 69c2aece33 Automatically generated installer lang files 2021-05-18 00:07:58 +00:00
Paul Holden dc9e6cb8f7 MDL-71647 user: allow searching user selector by identity fields.
Fixes regression from d916cd77, which passed empty extra fields when
not including custom fields.
2021-05-17 16:01:07 +01:00
Paul Holden 28f9c522a7 MDL-68927 admin: stricter validation of unknown file types.
If a given file type is unknown, then return an error string. This
matches implementation in the form field element of the same type.
2021-05-17 11:28:04 +01:00
Nhan Vo e1c7a18677 MDL-71047 HTML Editor (Atto): Cursor position is not correct when paste 2021-05-17 09:50:58 +07:00
Luca Bösch 19d7c11b60 MDL-71373 core_enrol: localize "close" in role manager. 2021-05-14 14:18:52 +02:00
Luca Bösch 9df96bea34 MDL-71373 tool_usertours: localize "previous"/"next" in user tours. 2021-05-14 14:18:52 +02:00
Luca Bösch 8c411f1234 MDL-71373 core_table: localize "previous"/"next" in pagination. 2021-05-14 14:18:52 +02:00
Huong Nguyen 46aece2b63 MDL-71126 Quiz: Manual grading page size preference can get stuck at 0
Including in this change:
 - New positiveint regex rule to check if the value is a positive integer
2021-05-14 17:01:45 +07:00
Sara Arjona 0b69b37f04 weekly release 4.0dev 2021-05-14 11:06:18 +02:00
Sara Arjona 49143009e9 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-05-14 11:06:16 +02:00
Sara Arjona c2a1bb5545 MDL-67935 tool_lp: fix random errors with login/logout 2021-05-14 10:11:12 +02:00
AMOS bot b227f8eac1 Automatically generated installer lang files 2021-05-14 00:07:53 +00:00
Víctor Déniz e64a080089 Merge branch 'MDL-71569-master_Summarydata' of https://github.com/brickfield/moodle 2021-05-13 22:34:11 +01:00
Paul Holden 605c8940a2 MDL-71626 admin: filter site fullname in CLI maintenance script. 2021-05-13 19:57:28 +01:00
Paul Holden 21c3869d03 MDL-71619 privacy: extend correct class in provider testcases.
Extending the privacy provider testcase means that it's tearDown
method will reset the request writer.
2021-05-13 11:51:00 +01:00
Sara Arjona 639707d8a2 Merge branch 'MDL-71611-master_blockaccessreviewupgrade' of https://github.com/brickfield/moodle 2021-05-13 11:45:36 +02:00
Jun Pataleta 95dcd99d85 Merge branch 'MDL-71612-master' of https://github.com/snake/moodle 2021-05-13 14:30:24 +08:00
Jun Pataleta 97b623aa9b Merge branch 'MDL-71584-master_Languagestrings' of https://github.com/brickfield/moodle 2021-05-13 13:57:22 +08:00
Jake Dallimore 0fcf1a1b7a MDL-71612 tool_oauth2: remove erroneous hideIf rules for form fields
Some fields were being hidden based on whether the service was set up
for internal service use or was a service shown on the login page.
These fields refer to OAuth 2 logins and must be configurable for both
kinds of services.
2021-05-13 12:47:58 +08:00
Eloy Lafuente (stronk7) d88452fd29 Merge branch 'MDL-71580-master-enfix' of git://github.com/mudrd8mz/moodle 2021-05-12 22:58:12 +02:00
Mike Churchward 0ebe676416 MDL-71611 block_accessreview: Return formats if feature disabled. 2021-05-12 16:29:09 -04:00
David Mudrák 03402e3c5d MDL-71580 lang: Fix reworded strings in tests 2021-05-12 17:10:16 +02:00
Helen Foster c8dc7bc942 MDL-71580 lang: Import fixed English strings (en_fix) 2021-05-12 17:10:16 +02:00
Mike Churchward 13fb58c663 MDL-71584 tool_brickfield: Fixed up language string issues. 2021-05-12 08:44:01 -04:00
Jun Pataleta 485ad2df85 Merge branch 'MDL-71590-master' of git://github.com/HuongNV13/moodle 2021-05-12 13:25:53 +08:00
Huong Nguyen c310c64460 MDL-71590 usertours: Create language string for activity information 2021-05-12 11:35:24 +07:00
Jake Dallimore a8a48a97bd Merge branch 'MDL-71583' of https://github.com/stronk7/moodle 2021-05-12 10:35:34 +08:00
Karen Holland aa8690f79d MDL-71569 Accessibility toolkit: Fix Summary data task failure 2021-05-11 19:46:31 -04:00
Eloy Lafuente (stronk7) 9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
sam marshall 588cb0fff6 MDL-71595 report_progress: Add custom user field support 2021-05-11 16:57:02 +01:00
sam marshall 9bc588a466 MDL-71466 admin: Add custom user field support to role screens
Implements custom user field support within the 'check capabilities'
and 'assign roles' screens.
2021-05-11 12:00:46 +01:00
Sara Arjona 3da88a7664 weekly release 4.0dev 2021-05-11 12:42:28 +02:00
Sara Arjona 349c0e503e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-05-11 12:42:25 +02:00
AMOS bot 9c638cf22b Automatically generated installer lang files 2021-05-11 00:07:55 +00:00
Víctor Déniz 823dd4ec6a Merge branch 'MDL-71060-master' of https://github.com/NashTechOpenUniversity/moodle 2021-05-10 23:40:53 +01:00
Víctor Déniz b697c3ddec Merge branch 'MDL-70900' of https://github.com/stronk7/moodle 2021-05-10 22:47:13 +01:00
Víctor Déniz 85ccac0afb Merge branch 'MDL-71543-master_toggleicon' of https://github.com/brickfield/moodle 2021-05-10 22:06:59 +01:00
Sara Arjona f08cbfa679 Merge branch 'MDL-71570-master' of git://github.com/mihailges/moodle 2021-05-10 15:38:24 +02:00
Sara Arjona 71c59ad8dd Merge branch 'MDL-71533' of git://github.com/danmarsden/moodle 2021-05-10 11:37:58 +02:00
Jun Pataleta 3ebe3953da Merge branch 'MDL-71552-master_heatmaptoggle' of https://github.com/brickfield/moodle 2021-05-10 17:23:05 +08:00
Mihail Geshoski 4cbde3c918 MDL-71570 mod_forum: Avoid using deprecated string in forum templates 2021-05-10 12:21:31 +08:00
Mihail Geshoski 1aaa3ca8a2 MDL-71570 core_grades: Avoid using deprecated string in grade templates 2021-05-10 12:17:15 +08:00
Thong Bui d1d7873f3a MDL-71060 Questions: Duplicates 'Current category' text. 2021-05-10 00:22:55 +07:00
Víctor Déniz 0a3b42e250 Merge branch 'MDL-71544-master_Errorspage' of https://github.com/brickfield/moodle 2021-05-08 20:30:31 +01:00
Eloy Lafuente (stronk7) 52ef32e4ff MDL-70900 ci: Move highest PHP to 8.0 (from current 7.4)
Also adds xmlrpc-beta from PECL (PHP8 moved the extension there)
and setups max_input_vars=5000 as initial value (see MDL-71390).

Note that this also includes a tiny modification when configuring
redis sessions, because there was some outdated code from old issue,
now fixed (MDL-60978), so that info has been removed.
2021-05-07 17:42:39 +02:00
Eloy Lafuente (stronk7) ad8b3d2ba9 weekly release 4.0dev 2021-05-07 16:54:26 +02:00
Eloy Lafuente (stronk7) dfb3c305a3 NOBUG: Fixed file access permissions 2021-05-07 16:54:26 +02:00
Eloy Lafuente (stronk7) 3a0397658e NOBUG: Fixed SVG browser compatibility 2021-05-07 16:54:23 +02:00
Jun Pataleta 91f398ce84 Merge branch 'MDL-71234-master' of git://github.com/HuongNV13/moodle 2021-05-07 12:21:33 +08:00
Huong Nguyen 860b5d8abc MDL-71234 usertours: Create tours for the activity completion output 2021-05-07 11:11:23 +07:00
abgreeve 178adf1c2f Merge branch 'MDL-68747-master' of https://github.com/dcai/moodle 2021-05-07 11:43:42 +08:00
Mathew May c95b254046 MDL-70622 mod_lti: Tighten redirect param typing 2021-05-07 11:43:42 +08:00
Adam Olley 752ad3d8eb MDL-70622 mod_lti: Prevent xss on lti 1.3 authentication script
Without this, people can craft URLs that other users might use not realising
what they do - and as a XSS vulnerability, it could do any number of things the
clicking-user has access to do on the site.

Change-Id: I82adc71e8706d8929011b4b24523d5b62b8ccea1
2021-05-07 11:43:33 +08:00
Jun Pataleta 3482ce5f78 Merge branch 'MDL-71395-master-2' of git://github.com/marinaglancy/moodle 2021-05-07 10:30:23 +08:00
abgreeve d30c967159 Merge branch 'MDL-70181' of https://github.com/stronk7/moodle 2021-05-07 10:21:46 +08:00
Dan Marsden f7529abb48 MDL-71533 lib: Remove libraries that already exist in core. 2021-05-07 12:18:47 +12:00
Víctor Déniz 47d63ce9ef Merge branch 'MDL-71303' of https://github.com/StudiUM/moodle 2021-05-06 23:32:05 +01:00
Mike Churchward 0673d72e75 MDL-71543 block_accessreview: Toggling the heatmap icon image. 2021-05-06 17:30:49 -04:00
Eloy Lafuente (stronk7) ee22c95918 Merge branch 'MDL-70049-master_count_submissions' of https://github.com/agrowe/moodle 2021-05-06 23:26:50 +02:00
Eloy Lafuente (stronk7) a7f40c5ac9 Merge branch 'MDL-70772' of git://github.com/paulholden/moodle 2021-05-06 23:19:55 +02:00
Eloy Lafuente (stronk7) b0d79e3b18 Merge branch 'MDL-71313' of https://github.com/timhunt/moodle 2021-05-06 23:14:50 +02:00
Eloy Lafuente (stronk7) e9f457e3c3 Merge branch 'MDL-71343-master' of https://github.com/rjnl/moodle 2021-05-06 23:07:29 +02:00
Mike Churchward 11646b9453 MDL-71552 block_accessreview: Removed 'alert' class when toggling off. 2021-05-06 16:06:17 -04:00
Marina Glancy b46badb130 MDL-70926 core: getuserdate() shoud show debugging if null was passed
passing null to getdate() has different results in PHP7 and PHP8
2021-05-06 19:55:32 +02:00
Eloy Lafuente (stronk7) 5469202423 Merge branch 'MDL-70110-fix' of github.com:sarjona/moodle 2021-05-06 19:38:01 +02:00
Sara Arjona 71996ef16b MDL-70110 mod_assign: make phpunit test DB order agnostic 2021-05-06 19:24:10 +02:00
Mike Churchward f5b85c0d31 MDL-71544 tool_brickfield: Allowing text to break in table. 2021-05-06 13:12:39 -04:00
Sara Arjona 076116e7a6 Merge branch 'MDL-71491' of git://github.com/paulholden/moodle 2021-05-06 18:42:18 +02:00
Sara Arjona 5e2a754e16 Merge branch 'MDL-71420' of https://github.com/stronk7/moodle 2021-05-06 17:58:02 +02:00
Víctor Déniz e41ff4f15e Merge branch 'MDL-71402' of git://github.com/paulholden/moodle 2021-05-06 16:46:19 +01:00
Paul Holden 72304875ec MDL-71491 repository_flickr: return more file data.
See also 643b0cca.
2021-05-06 16:36:49 +01:00
Sara Arjona 84c49ccc1a Merge branch 'MDL-71268-master' of git://github.com/lucaboesch/moodle 2021-05-06 17:11:16 +02:00
Marina Glancy 5148d33fa1 MDL-71395 core: fix bug in google lib wrapper
because of changes in PHP8 the '' == 0 is no longer true and the error in the google api wrapper was discovered
2021-05-06 15:39:11 +02:00
Paul Holden 2877501ad8 MDL-71402 availability: fix group restriction button in mod form.
* The button to "Add group/grouping access restriction" under
   common module settings should only be present if corresponding
   availability plugins are enabled; and
 * Prevent the same button behaving as a submit button, which
   intercepted the user hitting return in the form and added a
   restriction without deliberate action taken by the user.
2021-05-06 14:20:37 +01:00
Marina Glancy d7d609162e MDL-71395 block_tag_youtube: sometimes exception may have empty message 2021-05-06 14:44:24 +02:00
Eloy Lafuente (stronk7) d676a8114e MDL-71420 environment: Add some strategic comments and todos.
This isn't really a deprecations where something is replaced
by another and all uses must adapt to. Instead it's just a
fallback functionality that will stop working in Moodle 4.2.

Because of that, I've tried to add TODO/@todo comments to
the places that will need to modified, always pointing to
MDL-71421 that is where the removal will happen.

Also, haven't added any debugging() output, after thinking
a lot about it, because this isn't anything that developers
can be using but a internal implementation detail (a fallback)
that we want to remove in some versions.
2021-05-06 14:29:33 +02:00
Sara Arjona 5f476c2ab9 Merge branch 'MDL-70110-master' of https://github.com/septatrix/moodle 2021-05-06 13:15:59 +02:00
Víctor Déniz c0c63b0a88 Merge branch 'MDL-71434' of git://github.com/paulholden/moodle 2021-05-06 11:11:40 +01:00
Sara Arjona d8a029ad64 Merge branch 'MDL-71390-master' of git://github.com/marinaglancy/moodle 2021-05-06 08:01:47 +02:00
Jun Pataleta 5891fb1352 Merge branch 'MDL-71518-master' of git://github.com/rezaies/moodle 2021-05-06 11:38:48 +08:00
Shamim Rezaie a27876c3df MDL-71518 behat: Remove %P and AM/PM
The %P modifier is not supported in the macOS (MDL-71549)
2021-05-06 12:31:42 +10:00
Adrian Greeve 266bcab62e Merge branch 'MDL-70786-master' of git://github.com/lucaboesch/moodle 2021-05-06 10:06:02 +08:00
Jun Pataleta f23236acd2 Merge branch 'MDL-69863' of https://github.com/stronk7/moodle 2021-05-06 10:02:04 +08:00
Jake Dallimore c7c186681a Merge branch 'MDL-27193_glossaryDB' of https://github.com/andyjdavis/moodle 2021-05-06 09:49:14 +08:00
Jake Dallimore 52af65ca60 Merge branch 'MDL-71492-master' of git://github.com/jleyva/moodle 2021-05-06 09:15:47 +08:00
Eloy Lafuente (stronk7) 149e48d10e MDL-69863 database: Fix oracle and sqlsrv problems
1) The GROUP BY statement must include all fields in the SELECT
   not being aggregated or constant cols.
2) There was a missing space causing problems to databases
   using named parameters.
2021-05-06 00:04:59 +02:00
Juan Leyva 6a3465b6b4 MDL-71513 mobile: Fix last access visibility 2021-05-05 22:49:14 +01:00
Eloy Lafuente (stronk7) ab87155220 MDL-71420 environment: Lower sodium requirement to recommended 2021-05-05 23:06:10 +02:00
Eloy Lafuente (stronk7) 3a839a62c6 Merge branch 'MDL-71539_master_PHP8optionalparams' of https://github.com/brickfield/moodle 2021-05-05 20:00:17 +02:00
Sara Arjona 581f342506 Merge branch 'MDL-71532_master_illegalwhitespace' of https://github.com/brickfield/moodle 2021-05-05 19:05:42 +02:00
Mike Churchward 3dc209b748 MDL-71539 tool_brickfield: PHP8 optional param error fixed. 2021-05-05 11:47:33 -04:00
Mike Churchward 1f70d37d7e MDL-71532 tool_brickfield: Removing tabs and unneeded files. 2021-05-05 11:34:35 -04:00
Andrew Davis e34553d1b8 MDL-27193 mod_glossary: reducing system setting db queries 2021-05-05 23:13:53 +08:00
Juan Leyva 3018d40e88 MDL-71492 mod_quiz: Include missing gradepass in WebService 2021-05-05 14:44:16 +02:00
Sara Arjona 59ba1a9183 Merge branch 'MDL-71517' of https://github.com/paulholden/moodle 2021-05-05 12:17:31 +02:00
Sara Arjona b65d5a3da2 Merge branch 'MDL-71187-master' of git://github.com/lucaboesch/moodle 2021-05-05 12:13:59 +02:00
Víctor Déniz f798446f4c Merge branch 'MDL-71460-master' of git://github.com/peterRd/moodle 2021-05-05 10:16:44 +01:00
Luca Bösch 21503ed5e6 MDL-71187 quizaccess_seb: Change "Launch Safe Exam Browser" to a href.
In order to allow for correct seb:// or sebs:// calls without browser
warnings of insecure links, it is not possible to send a get request
with an attached cmid parameter to the unknown seb:// or sebs://
URL via a form button.
We've got to use a <a href> link outside a form to circumvent
browsers warning of an insecure link and call Safe Exam Browser
correctly.
2021-05-05 10:54:01 +02:00
Marina Glancy d42fd649cc MDL-71390 core: raise max_input_vars requirement 2021-05-05 10:49:59 +02:00
Luca Bösch b8a0cc9f00 MDL-70786 report_loglive: respect fullname setting. 2021-05-05 10:27:44 +02:00
Leon Stringer 37ae249dfa MDL-70181 database: Quote database object names
Table names and database name now enclosed in backticks.
admin/cli/mysql_collation.php failed if $CFG->prefix was blank with
MySQL 8.0 because table 'groups' conflicted with a new reserved word.

Note that this quotes both mysql_collation.php and mysql_compressed_rows.php
but only the former was mal-functioning.

The case of mysql_compressed_rows.php is a little bit special because
not all tables are processed, only those having big rows. And the groups
table is not one of them. In any case, better add the quotes there for
any future case.

Also, when testing this patch https://tracker.moodle.org/browse/MDL-71512
was discovered and will need to be fixed to make core 100% compliant
with MySQL 8.0 and MariaDB 10.6 and up.
2021-05-05 10:16:45 +02:00
Jun Pataleta e8b3ab767b Merge branch 'MDL-71518-master' of git://github.com/rezaies/moodle 2021-05-05 13:26:29 +08:00
Shamim Rezaie 35d1ac13d2 MDL-71518 core: Add weekday to activity dates 2021-05-05 13:56:06 +10:00
Peter Dias e5f7ecdacd MDL-71460 hub: Use checkboxes instead of dropdowns
Change the yes/no dropdowns to a checkbox. Defaults to unchecked.
2021-05-05 10:03:18 +08:00
Adrian Greeve 25a2729e62 Merge branch 'MDL-71530' of https://github.com/paulholden/moodle 2021-05-05 09:29:29 +08:00
Víctor Déniz 162278e69a Merge branch 'MDL-70864-master-zip_packer_windows' of git://github.com/mudrd8mz/moodle 2021-05-05 00:01:28 +01:00
Eloy Lafuente (stronk7) 9b522367a0 Merge branch 'MDL-71425-master-enfix' of git://github.com/mudrd8mz/moodle 2021-05-04 23:39:32 +02:00
Eloy Lafuente (stronk7) 21e3cf71bc Merge branch 'MDL-71397-master' of git://github.com/marinaglancy/moodle 2021-05-04 23:37:33 +02:00
Eloy Lafuente (stronk7) 7ae6e5da34 MDL-69863 tool_brickfield: Final version adjustments to current
In master, fixed to 2021052500
2021-05-04 19:50:24 +02:00
Mike Churchward be4fbf062c MDL-69863 block_accessreview: Better error display. 2021-05-04 19:49:55 +02:00
Mike Churchward 498f75502a MDL-69863 tool_brickfield: Better instance name displayed in error list. 2021-05-04 19:49:55 +02:00
Mike Churchward 7331bb1454 MDL-69863 tool_brickfield: Add 'periodically' to data message. 2021-05-04 19:49:55 +02:00
Mike Churchward 616f20e9a5 MDL-69863 tool_brickfield: Change public to private. 2021-05-04 19:49:55 +02:00
Mike Churchward 03ada14526 MDL-69863 tool_brickfield: Removing plugin_installed event. 2021-05-04 19:49:55 +02:00
Mike Churchward 623c1b0326 MDL-69863 tool_brickfield: Language improvements. 2021-05-04 19:49:54 +02:00
Mike Churchward ad1a600927 MDL-69863 tool_brickfield: Adding settings page title. 2021-05-04 19:49:54 +02:00
Mike Churchward 020109f3eb MDL-69863 tool_brickfield: Disable analysis by default on installation. 2021-05-04 19:49:54 +02:00
Mike Churchward ce9258afc4 MDL-69863 tool_brickfield: Ensure language strings use correct case. 2021-05-04 19:49:54 +02:00
Mike Churchward b8c7cf9a74 MDL-69863 tool_brickfield: Ensuring navigation is correct. 2021-05-04 19:49:54 +02:00
Mike Churchward 11dcd419a5 MDL-69863 tool_brickfield: ensuring lang string independence. 2021-05-04 19:49:54 +02:00
Mike Churchward c6c7c28dea MDL-69863 tool_brickfield: Moving plugins to core files. 2021-05-04 19:49:54 +02:00
Mike Churchward f8b34ffc68 MDL-69863 tool_brickfield: Added Behat tests. 2021-05-04 19:49:54 +02:00
Andrew Nicols b3ead50a47 MDL-69863 block_accessreview: Fix file mode 2021-05-04 19:49:54 +02:00
Mike Churchward e1c6497293 MDL-69863 tool_brickfield: Adding the Brickfield toolkit. 2021-05-04 19:49:54 +02:00
Paul Holden bf558732ce MDL-71530 competency: ensure all exported course fields are present.
Previously missing were the two new properties added in 36bc7b07:
showactivitydates & showcompletionconditions - this change ensures
all properties are requested before exporting courses linked to
competencies.
2021-05-04 17:53:00 +01:00
David Mudrák ad30fde448 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:45:18 +02:00
Paul Holden 06c4248b02 MDL-71359 mod_forum: empty forums shouldn't export anything. 2021-05-04 17:23:11 +02:00
Sara Arjona 4cb908690e MDL-71408 h5plib_v124: Add required changes after lib upgrade
- The mbstring extension is required since Moodle 3.9 onwards so
the upgrading steps have been removed because they are not
required any more.
- The pull-request for fixing some minor PHP7.4 problems has been
integrated so this patch is not required.
2021-05-04 17:23:11 +02:00
Sara Arjona 6a1e3c5c7e MDL-71408 h5plib_v124: Upgrade H5P core library to 1.24.02 2021-05-04 17:23:11 +02:00
Huong Nguyen 5444f88e4f MDL-70720 Quiz: Improve capability checks when fetching users' best grades 2021-05-04 17:23:11 +02:00
Shamim Rezaie 9c11ceac1f MDL-69028 repository: Put a rate limit on draft file uploads 2021-05-04 17:23:11 +02:00
Paul Holden f40dfdf51e MDL-71130 quiz_grading: escape user idnumber on display. 2021-05-04 17:23:11 +02:00
David Mudrák eaa157d6ff MDL-70804 mnet: Use proper DML method to get records from the table
This improves the code and avoids the risk of SQL injection through the
malicious XML-RPC request from the MNet peer.
2021-05-04 17:23:11 +02:00
Sara Arjona 5a0cca1e3c Merge branch 'MDL-71274-master' of git://github.com/aanabit/moodle 2021-05-04 17:10:36 +02:00
Paul Holden 6b859f9481 MDL-71517 mod_data: remove invalid form custom data access.
On PHP7.4, trying to access array offsets of NULL triggers a notice.
2021-05-04 15:25:57 +01:00
Helen Foster 49efd0b4b6 MDL-71425 lang: Import fixed English strings (en_fix) 2021-05-04 14:51:44 +02:00
Luca Bösch 5a8961c9e2 MDL-70786 report_log: respect fullname setting. 2021-05-04 14:28:29 +02:00
Luca Bösch ad7599a680 MDL-70786 report_completion: respect fullname setting. 2021-05-04 14:19:15 +02:00
Luca Bösch b5fa7e74bb MDL-70786 report_competency: respect fullname setting. 2021-05-04 14:19:15 +02:00
Luca Bösch 1dacdd0528 MDL-70786 report_progress: respect fullname setting. 2021-05-04 14:19:15 +02:00
Luca Bösch 092120bca1 MDL-71268 graphics: Use new Moodle logo for RSS feeds by Moodle 2021-05-04 14:17:52 +02:00
Sara Arjona 1c9837a557 weekly release 4.0dev 2021-05-04 13:27:45 +02:00
Sara Arjona f7c0ba49cf Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-05-04 13:27:42 +02:00
Adrian Greeve ca01567790 Merge branch 'MDL-66673-master' of https://github.com/ScottVerbeek/moodle 2021-05-04 15:49:15 +08:00
Jun Pataleta fd8544b37c Merge branch 'MDL-71401-master-3' of git://github.com/mickhawkins/moodle 2021-05-04 12:26:34 +08:00
Michael Hawkins 2984de32ff MDL-71401 mod_scorm: Completion behat test fix 2021-05-04 12:19:29 +08:00
Michael Hawkins cac5b30e01 MDL-71401 mod_quiz: Add behat testing for multiple completion conditions
Other tests check behaviour of individual conditions, this tests that
when multiple core and custom conditions are required, each will be
updated as required and not cache until all are completed.
2021-05-04 12:19:29 +08:00
Michael Hawkins c2dd5d7bc7 MDL-71401 mod_lesson: Update completion behat to test individual changes 2021-05-04 12:19:29 +08:00
Michael Hawkins 7c368add9c MDL-71401 mod_glossary: Update completion behat to test all changes 2021-05-04 12:19:29 +08:00
Michael Hawkins 9db08b47de MDL-71401 mod_forum: Update completion behat to test individual changes 2021-05-04 12:19:29 +08:00
Michael Hawkins 6469e8c1a9 MDL-71401 mod_data: Update completion behat to test individual changes 2021-05-04 12:18:36 +08:00
Michael Hawkins 70a653aa44 MDL-71401 assign: Update completion behat to test individual changes 2021-05-04 12:18:36 +08:00
Michael Hawkins 8e843696a2 MDL-71401 core_completion: Fix completion status caching
When an automatic completion condition may have had its state change,
we now unset the cached value for the user's completion in the relevant
activity, so up-to-date values are re-fetched and available to students.
The previous behaviour was that custom conditions would remain cached
until the activity reached overall completion.
2021-05-04 12:18:36 +08:00
AMOS bot e77692ab7c Automatically generated installer lang files 2021-05-04 00:07:57 +00:00
Eloy Lafuente (stronk7) 75dcac4716 Merge branch 'MDL-71463' of https://github.com/paulholden/moodle 2021-05-03 19:00:19 +02:00
David Mudrák 260c2bdb00 MDL-70864 files: Fix zip_packer extracting files with trailing dots
File and folder names cannot end with dots on Windows. So replace the
trailing dots with underscore consistently with how some other zip tools
(such as 7-zip) handle this case.
2021-05-03 18:13:14 +02:00
Shamim Rezaie 47f7c24f2b MDL-71163 mod_lesson: Fix behat failures 2021-05-03 15:41:43 +02:00
Sara Arjona b04d1c3041 Merge branch 'MDL-71163-master' of git://github.com/rezaies/moodle 2021-05-03 11:59:58 +02:00
Eloy Lafuente (stronk7) 3f9812835b Merge branch 'MDL-66431-fix' of github.com:sarjona/moodle 2021-05-03 10:07:47 +02:00
Adrian Greeve c0fcd9bd64 Merge branch 'MDL-71440-master' of git://github.com/mihailges/moodle 2021-05-03 16:05:24 +08:00
Jun Pataleta a8c8d2edf6 Merge branch 'MDL-71454-master' of git://github.com/lameze/moodle 2021-05-03 15:34:22 +08:00
Sara Arjona 1e40093bfa MDL-66431 behat: fix goutte + classic failure 2021-05-03 09:32:04 +02:00
Mihail Geshoski 1fa872b84f MDL-71440 mod_assign: New capability for viewing the submission summary
Creates a new capability mod/assign:viewownsubmissionsummary which will
be required in order to display the submission summary to the user in
the assignment page.
2021-05-03 15:27:27 +08:00
Víctor Déniz 6d3107641d Merge branch 'MDL-71189-master-3' of git://github.com/mickhawkins/moodle 2021-05-03 08:08:34 +01:00
Jake Dallimore 08e3b32181 Merge branch 'MDL-71273-master' of git://github.com/dpalou/moodle 2021-05-03 14:39:14 +08:00
Simey Lameze 0102485180 MDL-71454 theme: fix paddings for label resource 2021-05-03 14:35:42 +08:00
Michael Hawkins a9a4e56bb3 MDL-71189 mod_quiz: Update completion rule descriptions method
Allow for conditions that are not set, consistent with other modules.
They will usually always be set in practice, but best to handle it,
which also helps with unit testing.
2021-05-03 13:36:11 +08:00
Michael Hawkins b77c66ac10 MDL-71189 core_completion: Adding completion sort order to activities
This implements sort ordering for all completion conditions, in
activities which support custom completion conditions.
2021-05-03 13:36:11 +08:00
Michael Hawkins f105612d7f MDL-71189 core_completion: Implementing custom completion sort ordering
This adds the requirement for activities supporting custom completion to
specify the order all completion conditions should be displayed for that
activity. It also implements the sorting that takes place.
2021-05-03 13:36:11 +08:00
Michael Hawkins c997fc7784 MDL-71189 core_completion: Updates to meet current coding standards 2021-05-03 13:36:11 +08:00
Jake Dallimore e5e5a06190 Merge branch 'MDL-52724-master' of git://github.com/merrill-oakland/moodle 2021-05-03 13:25:05 +08:00
Adrian Greeve 661b168483 Merge branch 'MDL-71258' of https://github.com/timhunt/moodle 2021-05-03 11:09:47 +08:00
Eloy Lafuente (stronk7) e26b639281 Merge branch 'MDL-66431-master' of git://github.com/ilyatregubov/moodle 2021-05-02 19:12:47 +02:00
Víctor Déniz 4b847b673d Merge branch 'MDL-69956-master' of https://github.com/dcai/moodle 2021-05-02 19:11:10 +02:00
Víctor Déniz bd8600e923 Merge branch 'MDL-70753-master' of https://github.com/sharidas/moodle 2021-05-02 19:11:10 +02:00
Ilya Tregubov 7d9fa772d9 MDL-66431 core: Fix lti test for classic theme. 2021-05-02 16:06:17 +02:00
Ilya Tregubov bff4be683a MDL-66431 core: Fix section 0 not being dispayed on course page.
This is just to make Behat tests to pass. There is a bug
discovered MDL-71382. We will address that tracker after 3.11
release. For now we just replicate stables behavior.
2021-05-01 16:22:03 +02:00
Ilya Tregubov cf1cf222e7 MDL-66431 core: Fix behat tests.
Move activity creation to data generators. Only fixing those
tests failing due to removing usemodchooser preference.
2021-05-01 16:22:03 +02:00
Ilya Tregubov 430746d3a2 MDL-66431 core: Remove activity chooser user preference.
This commit removes activity chooser user preference and
course preference page. Separate dropdowns to activity and
resource is also removed.
2021-05-01 16:21:59 +02:00
Rajneel Totaram 7596e27989 MDL-71343 core_h5p: Convert all line-endings to UNIX format 2021-05-01 00:12:52 +12:00
Andrew Nicols 4ff86720bf MDL-71343 core_h5p: Add unit test for helper::parse_js_array
Signed-off-by: Rajneel Totaram <rjnlfj@yahoo.com>
2021-05-01 00:09:40 +12:00
Víctor Déniz 0a986fdf13 weekly release 4.0dev 2021-04-30 12:54:01 +01:00
Mahmoud Kassaei 95782015ba MDL-71258 questions: privacy support for settings defaults preferences 2021-04-30 10:14:38 +01:00
Shamim Rezaie 7e50138905 MDL-71163 mod_lesson: Remove duplicate info for open and close time 2021-04-30 17:13:56 +10:00
Shamim Rezaie 70ac3b091f MDL-71163 mod_forum: Remove duplicate due date info 2021-04-30 17:13:56 +10:00
Shamim Rezaie 2946894701 MDL-71163 mod_data: Remove duplicate info for open and close time 2021-04-30 17:13:56 +10:00
Shamim Rezaie 3ba12dcc5d MDL-71163 mod_scorm: Remove duplicate info for open and close time 2021-04-30 17:13:56 +10:00
Shamim Rezaie e25be6bd22 MDL-71163 quizaccess_openclosedate: remove duplicate date info
The quiz module now showa the quiz open and close dates at the top of
the page. So there is no need for the quizaccess_openclosedate plugin to
display these dates in the middle of the page.
2021-04-30 17:13:56 +10:00
Shamim Rezaie 1da9d7a8c7 MDL-71163 mod_feedback: remove duplicate date info
The $extradetails parameter in the constructor of the
mod_feedback\output\summary class is no longer used by any of the codes
that instantiate the class. Therefore, it is removed.
The respective template is updated as well.
2021-04-30 17:13:56 +10:00
Shamim Rezaie 0fc6bfab6c MDL-71163 mod_choice: remove duplicate info for timeopen and timeclose 2021-04-30 17:13:56 +10:00
Shamim Rezaie 7dbd7ee195 MDL-71163 mod_assign: remove duplicate available from and due date info 2021-04-30 17:13:56 +10:00
Shamim Rezaie 940f57d519 MDL-71163 mod_assign: Show the selected group's dates 2021-04-30 17:13:56 +10:00
Shamim Rezaie 9e3b2d6f47 MDL-71163 core: support relative dates in activity dates
AMOS BEGIN
 CPY [relativedatessubmissionduedateafter,mod_assign],[relativedatessubmissionduedateafter,core_course]
 CPY [relativedatessubmissionduedatebefore,mod_assign],[relativedatessubmissionduedatebefore,core_course]
AMOS END
2021-04-30 17:13:51 +10:00
Jun Pataleta 021d14896f Merge branch 'MDL-71051-master' of git://github.com/abgreeve/moodle 2021-04-30 14:18:41 +08:00
Adrian Greeve d6040d3056 MDL-71051 profilefield_datetime: Fix to missing required param.
The define_after_data method was looking for a required_param
when it should have been an optional parameter. This was causing
error messages when creating a new datetime field.
2021-04-30 13:00:21 +08:00
Dongsheng Cai 9e1dacc3c6 MDL-69956 forum: throw exception when advanced grading is not ready 2021-04-30 14:57:33 +10:00
Adrian Greeve c94a0090e0 Merge branch 'MDL-71481' of git://github.com/paulholden/moodle 2021-04-30 11:19:02 +08:00
Jun Pataleta 6d24e7fb17 Merge branch 'MDL-71486-master' of git://github.com/HuongNV13/moodle 2021-04-30 11:07:57 +08:00
Sujith Haridasan 686bd2681e MDL-70753 report: Provide a separate page for course report
Provide page for the reports in the course administration.
The page has a drop down to navigate to different reports.
The navigation is remembered just like the grade reports in
the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-04-30 08:37:38 +05:30
Jun Pataleta c646a8eaec Merge branch 'MDL-70947-master' of git://github.com/HuongNV13/moodle 2021-04-30 10:34:11 +08:00
Sara Arjona 3a07ee3191 Merge branch 'MDL-60331-master_take3' of git://github.com/lucaboesch/moodle 2021-04-29 17:49:43 +02:00
Sara Arjona 1aa318d3e0 Merge branch 'MDL-71162-master-2' of git://github.com/mickhawkins/moodle 2021-04-29 17:27:20 +02:00
Paul Holden 586cc05bce MDL-71463 dml: escape square brackets for SQL Server LIKE operator. 2021-04-29 13:49:43 +01:00
Dani Palou 7248aa0276 MDL-71273 tool_mobile: Change the LTI disabled feature 2021-04-29 13:54:42 +02:00
Jun Pataleta e61f3796dd Merge branch 'MDL-71455-master' of https://github.com/dcai/moodle 2021-04-29 18:05:09 +08:00
Amaia Anabitarte 8732ddd5d3 MDL-71274 analytics: Don't generate insight for hidden courses
Hidden courses can be used for training
but we do not want to generate insights for them
because students do not have access to hidden courses.
This was fixed in MDL-66806 for "Students at risk" model.
Fixed for "Students who have not accessed the course recently" in this issue.
2021-04-29 11:13:37 +02:00
Paul Holden 643b0ccabe MDL-71481 repository_flickr_public: return more file data.
A HTTP HEAD request is required to get the image filesize.
The remaining data can be obtained from existing calls to
the Flickr API.
2021-04-29 09:48:19 +01:00
Huong Nguyen c6fb80b639 MDL-70947 File upload: Upload protection
Interacts badly with double-submit protection, and not all uploads protected
2021-04-29 15:28:19 +07:00
Huong Nguyen 3e2570611f MDL-71486 course: Notice when in site home/course page 2021-04-29 14:42:49 +07:00
Adrian Greeve e17333c342 Merge branch 'MDL-71141-master' of git://github.com/ferranrecio/moodle 2021-04-29 15:40:51 +08:00
Sara Arjona af1d676fb8 Merge branch 'MDL-71016' of git://github.com/paulholden/moodle 2021-04-29 09:21:39 +02:00
Jun Pataleta 0e904ad5db Merge branch 'MDL-70863-master' of git://github.com/jleyva/moodle 2021-04-29 15:04:11 +08:00
Adrian Greeve 98edee3c4a Merge branch 'MDL-71235-master' of https://github.com/dcai/moodle 2021-04-29 14:42:35 +08:00
Adrian Greeve e42ce0baee Merge branch 'MDL-71470-master' of git://github.com/mihailges/moodle 2021-04-29 14:27:06 +08:00
Andrew Nicols b4baf69846 Merge branch 'MDL-70965-master' of git://github.com/marinaglancy/moodle 2021-04-29 13:49:59 +08:00
Dongsheng Cai 36bc7b07db MDL-71235 webservices: add activity completion data to web services 2021-04-29 13:52:32 +10:00
Andrew Nicols 430caa5de1 Merge branch 'MDL-70897-master' of git://github.com/kabalin/moodle 2021-04-29 10:18:01 +08:00
Dongsheng Cai 2935cb508d MDL-71455 core_backup: fix course completion options when backup/restore 2021-04-29 11:38:31 +10:00
Andrew Nicols 72498d5f99 Merge branch 'MDL-56609' of https://github.com/stronk7/moodle 2021-04-29 09:34:18 +08:00
Adrian Greeve d4673e3047 Merge branch 'MDL-71051-master-2' of git://github.com/marinaglancy/moodle 2021-04-29 09:27:07 +08:00
Paul Holden 0bda284937 MDL-71016 gradeexport_xml: ensure user/grade idnumbers are encoded. 2021-04-28 19:03:45 +01:00
Víctor Déniz 0ff631fabc Merge branch 'MDL-71200' of git://github.com/paulholden/moodle 2021-04-28 18:54:41 +01:00
Michael Hawkins bf8818f9a6 MDL-71162 mod_assign: Update and improve completion behat testing 2021-04-29 00:46:27 +08:00
Michael Hawkins c02e9af3ed MDL-71162 mod_resource: Improve behat testing for completion conditions 2021-04-29 00:46:27 +08:00
Michael Hawkins ec3ec899b6 MDL-71162 mod_label: Improve behat testing for completion conditions 2021-04-29 00:46:28 +08:00
Michael Hawkins 941330feac MDL-71162 mod_imscp: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins a74f47af90 MDL-71162 mod_h5pactivity: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 0ef85f4c0b MDL-71162 mod_folder: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 5ccda6fa5c MDL-71162 mod_chat: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins b7289dfd80 MDL-71162 mod_quiz: Improve behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 9fec71fe27 MDL-71162 mod_survey: Improve behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins f9c276632a MDL-71162 mod_scorm: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 4bf3b7a48d MDL-71162 mod_glossary: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 36d5523904 MDL-71162 mod_wiki: Improve behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 194a38b0a3 MDL-71162 mod_wiki: Ensure completion conditions displayed on all tabs 2021-04-29 00:41:07 +08:00
Michael Hawkins 2c2745cd89 MDL-71162 mod_book: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 3b715af830 MDL-71162 mod_forum: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 8970651506 MDL-71162 mod_feedback: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 1f2daaefc7 MDL-71162 mod_data: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Michael Hawkins 1ea2ae17be MDL-71162 mod_data: Ensure completion conditions displayed on all tabs 2021-04-29 00:41:07 +08:00
Michael Hawkins 53707660dc MDL-71162 mod_choice: Updated completion behat to use latest rules 2021-04-29 00:41:07 +08:00
Michael Hawkins 73bcf9a8d0 MDL-71162 mod_lesson: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Luca Bösch 7dd58aac64 MDL-60331 questions: prevent double escaping question categories. 2021-04-28 17:30:46 +02:00
Sara Arjona f123a7d0e0 Merge branch 'MDL-70979' of git://github.com/paulholden/moodle 2021-04-28 13:06:07 +02:00
Sara Arjona d0a84d36d7 Merge branch 'MDL-71127' of git://github.com/paulholden/moodle 2021-04-28 12:58:15 +02:00
Marina Glancy badf442ec7 MDL-70965 core_dml: php8 related changes:
1. pg_connection_status(false) fails on PHP8 because the argument is not a stream
2. skipeed the unittest that expected that pg_query() does not show an error if the resource is invalid
see also MDL-71482
2021-04-28 12:42:07 +02:00
Srdjan ebf19a7085 MDL-70965 core_dml: read_slave - mock db handles as resources
So they comply with the type hints.
2021-04-28 12:38:32 +02:00
Sara Arjona 92cfa71cd0 Merge branch 'MDL-70763' of git://github.com/paulholden/moodle 2021-04-28 12:36:23 +02:00
Septatrix 235c832d37 MDL-70110 assign: add group submission attemptnumber test 2021-04-28 11:50:49 +02:00
Ruslan Kabalin 3bf770c801 MDL-71051 core_user: fix issues and address review issues 2021-04-28 11:47:26 +02:00
Marina Glancy 8974874018 MDL-71051 core_user: create user profile field form is now modal form 2021-04-28 11:47:22 +02:00
Marina Glancy 4a159a0947 MDL-71051 core_user: move user profile edit field form to classes 2021-04-28 11:47:22 +02:00
Marina Glancy 60b95cd46f MDL-71051 core_user: editing user profiles - modal form, template 2021-04-28 11:47:22 +02:00
Marina Glancy 880aff7bf9 MDL-71051 core_user: move edit profile category form to classes 2021-04-28 11:47:22 +02:00
Marina Glancy ef3d6a3d70 MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
Marina Glancy 9a5fd6fbc1 MDL-71051 core_user: fix mistakes in phpdocs, deprecated unused func 2021-04-28 11:47:11 +02:00
Marina Glancy 5682b9a585 MDL-71051 core_user: always use API when working with profile fields 2021-04-28 11:39:04 +02:00
Mihail Geshoski 49ce037665 MDL-71470 repository_googledocs: Update unit tests 2021-04-28 16:30:27 +08:00
Mihail Geshoski 0ce519591b MDL-71470 repository_googledocs: Use file name in the source attribute
Instead of using the file title when generating the source attribute,
we should be using only the name of the Google Drive file in order to
avoid having the original extension within the filename after the file
is imported and added into Moodle.
2021-04-28 16:30:27 +08:00
Sara Arjona 0084f9c762 Merge branch 'MDL-71244-master' of git://github.com/lucaboesch/moodle 2021-04-28 09:17:28 +02:00
Jun Pataleta e30e83d0d0 Merge branch 'MDL-71330-master' of https://github.com/dcai/moodle 2021-04-28 13:41:57 +08:00
Dongsheng Cai b927b0eac3 MDL-71330 mod_chat: Implement the activity dates functionality 2021-04-28 15:33:14 +10:00
Andrew Nicols 679fcbfeaf Merge branch 'MDL-71168' of git://github.com/paulholden/moodle 2021-04-28 10:48:02 +08:00
Andrew Nicols 1b8bd1228d Merge branch 'MDL-70372-master-oldstrings' of git://github.com/mudrd8mz/moodle 2021-04-28 10:45:08 +08:00
Andrew Nicols 7eb248c27b MDL-70909 mod_h5pactivity: Whitespace fix 2021-04-28 10:25:36 +08:00
Andrew Nicols c53d6ffdbe Merge branch 'MDL-70909-master' of git://github.com/ferranrecio/moodle 2021-04-28 10:20:03 +08:00
Andrew Nicols 971d77854a Merge branch 'MDL-71386-master' of git://github.com/NoelDeMartin/moodle 2021-04-28 10:05:28 +08:00
Andrew Nicols aa6c02a74c Merge branch 'MDL-71389-master' of git://github.com/marinaglancy/moodle 2021-04-28 09:14:48 +08:00
Eloy Lafuente (stronk7) 6f7abc859b MDL-56609 phpunit: Fix bogus expectation on DST changes day
Current test works ok every day of the year but the day of
DST begin changes (last Sunday of March currently).

That day, 01:00 Europe/London simply doesn't exist, because
the time is moved forward by 60 minutes.

Hence the expectation for the next cron execution is not 1 "normal"
day (24h) but 1 less hour.

Note this only happens for the current test on DST begins, the
opposite change (DST ends), happening the last Sunday of October
is not affected, because, at all effects, 01:00 is a perfectly normal
and existing hour.
2021-04-27 18:30:52 +02:00
Luca Bösch 6ab749558e MDL-71244 enrol_manual: Add bootstrap classes to buttons 2021-04-27 17:29:20 +02:00
Sara Arjona 6319dc8c2c Merge branch 'MDL-71403' of git://github.com/paulholden/moodle 2021-04-27 16:01:55 +02:00
Ferran Recio 9a11eab790 MDL-70909 mod_h5pactivity: fix reports on freeze context 2021-04-27 15:35:57 +02:00
Sara Arjona a5f0b354e7 weekly release 4.0dev 2021-04-27 15:14:50 +02:00
Sara Arjona 5bf03b02b1 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-04-27 15:14:48 +02:00
Jun Pataleta 11df82e9f7 Merge branch 'MDL-71410-master' of git://github.com/rezaies/moodle 2021-04-27 12:36:24 +08:00
Shamim Rezaie 4ddc9fe0f4 MDL-71410 core: Prevent recursively calling getters 2021-04-27 14:32:26 +10:00
Shamim Rezaie 796e82124f MDL-71410 mod_quiz: implement activity_dates for the quiz module 2021-04-27 14:32:26 +10:00
Shamim Rezaie ec519a6488 MDL-71410 mod_quiz: Cache quiz times in modinfo for performance
We update the dates with user/group overrides. The calculation of
the override in the quiz module is different from the assignment
module as the quiz_overrides table des not have a sortorder column.
See quiz_update_effective_access().
2021-04-27 14:32:26 +10:00
Shamim Rezaie d61f18433f MDL-71410 mod_quiz: Cache user and group overrides 2021-04-27 14:32:26 +10:00
Shamim Rezaie 660f7c08c5 MDL-71410 mod_lesson: implement activity_dates for the lesson module 2021-04-27 14:32:26 +10:00
Shamim Rezaie 8a308c498c MDL-71410 mod_lesson: Cache lesson times in modinfo for performance
We update the dates with user/group overrides. The calculation of
the override in the lesson module is different from the assignment
module as the lesson_overrides table des not have a sortorder column.
See lesson::update_effective_access().
2021-04-27 14:01:49 +10:00
Shamim Rezaie 47fcfa0af8 MDL-71410 mod_lesson: Cache user and group overrides 2021-04-27 14:01:45 +10:00
Shamim Rezaie 18efd91d2f MDL-71410 mod_assign: implement activity_dates for the assignment module 2021-04-27 14:00:06 +10:00
Shamim Rezaie 4532d3f8b7 MDL-71410 mod_assign: Cache assign times in modinfo for performance
We update the dates with user/group overrides
2021-04-27 14:00:06 +10:00
Shamim Rezaie 8e50d64baf MDL-71410 mod_assign: Cache user and group overrides 2021-04-27 14:00:02 +10:00
Jun Pataleta ce01d49e6b Merge branch 'MDL-71252-master' of git://github.com/HuongNV13/moodle 2021-04-27 10:41:03 +08:00
Huong Nguyen 5e7ff4b80c MDL-71252 completion: PHPUnit failure 2021-04-27 08:42:37 +07:00
Adrian Greeve a8c614b2c1 Merge branch 'MDL-71329' of https://github.com/Chocolate-lightning/moodle 2021-04-27 09:36:56 +08:00
Víctor Déniz 54191ad718 Merge branch 'MDL-65687' of git://github.com/paulholden/moodle 2021-04-27 00:51:43 +01:00
Víctor Déniz 48a42f2289 Merge branch 'MDL-71003' of git://github.com/paulholden/moodle 2021-04-27 00:38:11 +01:00
Víctor Déniz 83ccf95c9e Merge branch 'MDL-71441-master' of git://github.com/bmbrands/moodle 2021-04-26 23:50:22 +01:00
Sara Arjona 57604e30ce Merge branch 'MDL-70917' of git://github.com/paulholden/moodle 2021-04-26 15:17:59 +02:00
Bas Brands 5941083d1d MDL-71441 core_user: add profilefield social to standard plugins list 2021-04-26 14:43:24 +02:00
Jun Pataleta d9a8245efb MDL-71252 completion: Fix Behat test for manual completion display
Adjusting the test since the manual completion button is now being
hidden from the course homepage when completion is disabled.
2021-04-26 19:53:28 +08:00
Sara Arjona 6923ba4088 Merge branch 'MDL-71416' of git://github.com/paulholden/moodle 2021-04-26 12:35:34 +02:00
Sara Arjona 7046626952 Merge branch 'MDL-71392' of git://github.com/paulholden/moodle 2021-04-26 11:52:46 +02:00
Jun Pataleta 3dd247e869 Merge branch 'MDL-71252-master' of git://github.com/HuongNV13/moodle 2021-04-26 17:02:46 +08:00
Huong Nguyen bda8e0fb2a MDL-71252 completion: Behat failure 2021-04-26 15:58:12 +07:00
Eloy Lafuente (stronk7) 5f9aa223b3 Merge branch 'MDL-70446-master' of https://github.com/sammarshallou/moodle 2021-04-26 10:44:59 +02:00
Jun Pataleta 93ab8c089e Merge branch 'MDL-71252-master' of git://github.com/HuongNV13/moodle 2021-04-26 15:55:11 +08:00
Sara Arjona b8d4e8f251 Merge branch 'MDL-71370-master-test' of git://github.com/junpataleta/moodle 2021-04-26 09:50:40 +02:00
Huong Nguyen 3f9035b989 MDL-71252 completion: Avoid showing the 'Mark as done' button
The following activites will be applied:
 - Label
 - File (Force download/Open/In pop-up)
 - URL (Open/In pop-up)
2021-04-26 14:24:41 +07:00
Shamim Rezaie 14e37590bb MDL-71410 core: Introduce override_customdata()
The get_custom_data() method now calls obtain_dynamic_data() because
$this->customdata can be dynamic now.
2021-04-26 05:28:36 +10:00
Paul Holden 5e5181497e MDL-71434 mod_data: add form control class to template textarea. 2021-04-25 18:29:22 +01:00
Paul Holden ad7092d281 MDL-71403 message: Bootstrap controls for message preferences.
Replicates changes made to notification preferences in e41b3485.
The templates for each are similar enough than one can be used
from the other. Remove redundant styles for previous controls.
2021-04-25 16:43:06 +01:00
Jun Pataleta fca42002f7 MDL-71370 course: Make showcompletionconditions nullable
* When completion tracking is not enabled for the course, it does not
make sense for the course's showcompletionconditions setting to
be set according to the default value indicated by the
"moodlecourse | showcompletionconditions" admin setting. Setting
showcompletionconditions as enabled when completion tracking is disabled
makes even less sense. So in such a case, we should not be setting a
default value for showcompletionconditions and allow it to be null.

* When the course is edited and completion tracking is enabled, this
also would set the "Show completion conditions" field to default to the
value set in the "moodlecourse | showcompletionconditions" admin
setting.
2021-04-24 19:07:42 +08:00
Tim Schroeder a7e1f4ebc0 MDL-70110 assign: fixed ws get_submissions for groups 2021-04-24 12:08:14 +02:00
AMOS bot e55190e726 Automatically generated installer lang files 2021-04-24 00:07:56 +00:00
Paul Holden 8fa458eb3b MDL-71416 report_log: user context header should show users name.
Co-Authored-By: Luca Bösch <luca.boesch@bfh.ch>
2021-04-23 20:24:12 +01:00
Sara Arjona 12f64a02c9 Merge branch 'MDL-71144-master' of git://github.com/rezaies/moodle 2021-04-23 13:16:01 +02:00
Marina Glancy 4d2c96861d MDL-71397 mod_glossary: empty category is the same as all categories
In PHP8 empty string is not equal to zero
2021-04-23 11:46:01 +02:00
Sara Arjona 146a38dc45 weekly release 4.0dev 2021-04-23 10:46:53 +02:00
Sara Arjona a080f64c01 NOBUG: Fixed SVG browser compatibility 2021-04-23 10:46:51 +02:00
Mathew May 54b57cb7dc MDL-71329 tool_moodlenet: Check to see if we get errors before curl 2021-04-23 15:43:58 +08:00
Jun Pataleta 24a5f53086 Merge branch 'MDL-71171_master' of git://github.com/mdjnelson/moodle 2021-04-23 12:41:15 +08:00
Mark Nelson 5eb3d47403 MDL-71171 customfield_text: ensure we set defaults properly 2021-04-23 12:31:53 +08:00
abgreeve ea362206a3 Merge branch 'MDL-70818-master-4' of git://github.com/rezaies/moodle 2021-04-23 12:19:51 +08:00
Andrew Nicols db49294748 Merge branch 'MDL-70903-master' of git://github.com/roland04/moodle 2021-04-23 11:56:47 +08:00
Andrew Nicols 1a34066129 Merge branch 'master-MDL-71376' of https://github.com/rjnl/moodle 2021-04-23 11:52:21 +08:00
Shamim Rezaie ac2b200a6e MDL-70818 mod_workshop: implement activity_dates for the workshop module 2021-04-23 13:46:28 +10:00
Shamim Rezaie 0b64b10eb9 MDL-70818 mod_workshop: cache workshop times in modinfo for performance 2021-04-23 13:46:28 +10:00
Shamim Rezaie 2ad16d8d9e MDL-70818 mod_scorm: implement activity_dates for the scorm module 2021-04-23 13:46:28 +10:00
Shamim Rezaie 31288bd1a6 MDL-70818 mod_forum: implement activity_dates for the forum module 2021-04-23 13:46:28 +10:00
Shamim Rezaie b284e9e705 MDL-70818 mod_forum: cache forum times in modinfo for performance 2021-04-23 13:46:28 +10:00
Shamim Rezaie b3b7c3f95a MDL-70818 mod_feedback: implement activity_dates for the feedback module 2021-04-23 13:46:28 +10:00
Shamim Rezaie 6b243c62e6 MDL-70818 mod_data: implement activity_dates for the database module 2021-04-23 13:46:28 +10:00
Andrew Nicols 8b7a5809b3 Merge branch 'MDL-71394-master' of git://github.com/marinaglancy/moodle 2021-04-23 11:42:00 +08:00
Andrew Nicols b124832fe6 Merge branch 'MDL-70970' of git://github.com/paulholden/moodle 2021-04-23 11:26:53 +08:00
Andrew Nicols 33173e7223 Merge branch 'MDL-70902-master' of git://github.com/dravek/moodle 2021-04-23 11:12:15 +08:00
ScottVerbeek 8bd9dca9a8 MDL-66673 groups: Stop notice when messaging system is disabled 2021-04-23 08:52:48 +10:00
Sara Arjona 80b1bb4751 Merge branch 'MDL-57831' of git://github.com/paulholden/moodle 2021-04-22 18:13:04 +02:00
Paul Holden f9f679611d MDL-57831 tool_monitor: update Behat tests for message preferences. 2021-04-22 16:11:30 +01:00
Ferran Recio 201a37e6aa MDL-70909 behat: context freeze and not freeze steps 2021-04-22 15:50:55 +02:00
Sara Arjona 841df2a216 Merge branch 'MDL-71136_master' of https://github.com/TomoTsuyuki/moodle 2021-04-22 13:56:37 +02:00
Ferran Recio 45048b8796 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:16:35 +02:00
Sara Arjona c9c18da021 Merge branch 'MDL-71400-master' of git://github.com/mihailges/moodle 2021-04-22 13:16:23 +02:00
Shamim Rezaie 0ca7548443 MDL-71144 mod_scorm: Deprecate scorm_get_completion_state() 2021-04-22 21:11:43 +10:00
Shamim Rezaie 7d102bb67d MDL-71144 mod_quiz: custom_completion should not use deprecated function
This commit also removes an unnecessary DB query.
2021-04-22 21:11:43 +10:00
Shamim Rezaie d9d0ae01d3 MDL-71144 mod_quiz: Deprecate quiz_get_completion_state() 2021-04-22 21:02:02 +10:00
Jun Pataleta c070f3e66d Merge branch 'MDL-71170_master' of git://github.com/mdjnelson/moodle 2021-04-22 18:55:28 +08:00
Ruslan Kabalin af560d454f MDL-70905 admin: Change default player dimensions to 360p. 2021-04-22 11:24:51 +01:00
Noel De Martin 168f28fa75 MDL-71386 behat: Support for 3.9.5+ mobile app 2021-04-22 12:14:18 +02:00
Paul Holden 4264f85063 MDL-71200 mod_folder: ensure "Download folder" option is backed up. 2021-04-22 10:29:25 +01:00
Paul Holden 250944bc1e MDL-70979 search: validate external user search parameters.
Clean return value in unit test for same.
2021-04-22 10:22:35 +01:00
Paul Holden 0de5ab4b43 MDL-71392 mod_quiz: don't display grade to pass if not set. 2021-04-22 09:53:24 +01:00
Mihail Geshoski 4e714cebae MDL-71400 assignfeedback_offline: Fix message after worksheet upload 2021-04-22 13:08:15 +08:00
Jun Pataleta e853e6b7db Merge branch 'MDL-71156-master' of git://github.com/lameze/moodle 2021-04-22 11:51:59 +08:00
Andrew Nicols 81d5ed8184 Merge branch 'MDL-69460' of https://github.com/paulholden/moodle 2021-04-22 11:11:40 +08:00
Jun Pataleta 7af3fa1cdd Merge branch 'MDL-71288-master' of git://github.com/lameze/moodle 2021-04-22 10:29:25 +08:00
Simey Lameze 5b0282847e MDL-71156 core: machinery to recover orphaned calendar events
The machinery to fix orphaned calendar events that were broken by MDL-67494.

The solution consists of:

1) Upgrade step that checks if this site has executed the problematic upgrade steps and
   if positive, it will schedule a new run for calendar_fix_orphaned_events adhoc task.

2) Adhoc task that will self-spawn calling the recovery machinery, running until
   all the orphaned calendar events are fixed. It also sets the maximum runtime of
   60 seconds. It is also possible to override that number by specifing the desired
   number setting the ->calendareventsmaxseconds in your config.php

3) CLI script that will look for all the calendar events which userids
   where broken by a wrong upgrade step, affecting to Moodle 3.9.5
   and up.

   It performs checks to both:
     a) Detect if the site was affected (ran the wrong upgrade step).
     b) Look for orphaned calendar events, categorising them as:
       - standard: site / category / course / group / user events
       - subscription: events created via subscriptions.
       - action: normal action events, created to show common important dates.
       - override: user and group override events, particular, that some activities support.
       - custom: other events, not being any of the above, common or particular.

   By specifying it (--fix) try to recover as many broken events (missing userid) as
   possible. Standard, subscription, action, override events in core are fully supported but
   override or custom events should be fixed by each plugin as far as there isn't any standard
   API (plugin-wise) to launch a rebuild of the calendar events.

4) Unit tests and helper functions to generate calendar events. We have decided to
   keep the tests simple, testing only true and false and not using data generators because
   the code is purely to recover the calendar events and won't turn into an API or something
   and also due to the urgency of this issue.
   The helpers have been created in calendar/tests/helpers.php since there are no data generators
   for calendar.
2021-04-22 10:28:52 +08:00
Andrew Nicols 5104159fcc Merge branch 'MDL-70412-master' of git://github.com/aanabit/moodle 2021-04-22 10:10:38 +08:00
Simey Lameze f518f61757 MDL-71288 completion: add fallback for plugins
This commits adds a fallback for plugins which does not have
custom_completion implementation.

For those cases, it will search for {modulename}_get_completion_state
callback in the plugin and call get_overall_completion() method in
cm_completion_details class to get the overall completion state for
a course module and user.
2021-04-22 09:45:11 +08:00
abgreeve 8a53fe7f6b Merge branch 'MDL-28452-master' of git://github.com/bmbrands/moodle 2021-04-22 09:38:50 +08:00
Shamim Rezaie a2bf666a0c MDL-71144 mod_lesson: Deprecate lesson_get_completion_state() 2021-04-22 10:08:11 +10:00
Shamim Rezaie b4c8f0f8a6 MDL-71144 mod_survey: Deprecate survey_get_completion_state() 2021-04-22 10:08:11 +10:00
Shamim Rezaie 5f9aa4d35f MDL-71144 mod_glossary: Deprecate glossary_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta c9fa4f9cd7 MDL-71144 mod_forum: Deprecate forum_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta c10dfd7583 MDL-71144 mod_feedback: Deprecate feedback_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta 08fb6a71b7 MDL-71144 mod_data: Deprecate data_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta 17c3c4dc75 MDL-71144 mod_choice: Deprecate choice_get_completion_state() 2021-04-22 10:08:10 +10:00
Jun Pataleta d484b3e371 MDL-71144 mod_assign: Deprecate assign_get_completion_state() 2021-04-22 10:08:04 +10:00
Jun Pataleta d0963c711f MDL-71144 completion: Deprecate get_completion_state callbacks
* *_get_completion_state() callback functions have been deprecated and
should no  longer be used. Plugins that define custom completion rules
must implement the mod_[modname]\completion\custom_completion class that
extends the \core_completion\activity_custom_completion base class.
2021-04-22 09:48:50 +10:00
Paul Holden 702b119f57 MDL-57831 theme_boost: accessibility update for message preferences.
The preferences table did not meet accessibility guidelines regarding
colour contrast between hovered rows and the disabled switch
elements.

Ensure white background is used for all table cells, and replace the
highlighted columns used to differentiate processors with borders.
2021-04-21 21:46:29 +01:00
Sara Arjona 49dbf2c130 Merge branch 'MDL-64336' of https://github.com/NeillM/moodle 2021-04-21 17:13:57 +02:00
Marina Glancy e1ab67836d MDL-71394 core_blog: fix incorrect default setting in form
the keys of the options are strings, in PHP8 strings are compared with 0 differently
2021-04-21 16:22:22 +02:00
Neill Magill bce4c28577 MDL-64336 assign: Add missing PHP doc 2021-04-21 15:14:15 +01:00
Neill Magill 06a69802d6 MDL-64336 assign: Teachers should be able to see all submissions
Before this change a teacher would be able to see users listed if:

* They have an active enrolment and can submit
* They have an an inactive enrolment for a role that can submit

After this change they will additonally be able to see users listed:

* That have an active enrolment and have submitted
* That have an inactive enrolment and have submitted

This means that if an assignment has it's context frozen all users
that have made some form of submission will still be listed.

It will also apply if the submission capability is removed from a
user.

If a user's enrolment is deleted they will not be listed.

The submission and grading counts have also been updated so
they will reflect the new rules.
2021-04-21 15:14:14 +01:00
Neill Magill 1f55fff393 MDL-64336 assign: Submissions should be visible while frozen
Before this change if a student visited an assignment that is
frozen they would only see the title and description even if
they had made a submission to it.

After the change they will be able to see the status of their
submission and any feedback and grades they have recived.

It will also make the Moodle app recognise that submission
should not happen because the assignment is frozen.

Tests based on ones created by Andrew Nicols
2021-04-21 15:14:14 +01:00
Marina Glancy 263c39ba21 MDL-71389 various: changes to unittests due to php8 changes:
- some engine error messages changed
- some warning levels changed
- the carriage return symbol randomly appears
- one phpunit assertion fails and not really representative of anything
2021-04-21 12:38:46 +02:00
Bas Brands 0fe5d5faa8 MDL-28452 core_user: add custom profilefield capability
Add a setting to show custom profilefields to self or others
with capability moodle/sit:viewuseridentity in the course context only
2021-04-21 11:22:31 +02:00
Bas Brands 2c89b82e17 MDL-28452 core_user: add behat test for duplicate shortname warning 2021-04-21 11:22:31 +02:00
Bas Brands f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Sara Arjona d54a89ad2e Merge branch 'dynreg-upgrade-squash' of https://github.com/cengage/moodle 2021-04-21 09:58:29 +02:00
Jun Pataleta 610b339c6e Merge branch 'MDL-71017-master-2' of git://github.com/marinaglancy/moodle 2021-04-21 14:58:06 +08:00
abgreeve d1be6cf1d8 Merge branch 'MDL-71205' of https://github.com/mkassaei/moodle 2021-04-21 13:32:14 +08:00
Jake Dallimore 49c97a866c Merge branch 'MDL-71030-master' of https://github.com/NashTechOpenUniversity/moodle 2021-04-21 12:06:50 +08:00
abgreeve dac0c020ef Merge branch 'MDL-71174' of git://github.com/danmarsden/moodle 2021-04-21 11:01:05 +08:00
Eloy Lafuente (stronk7) 7c75781518 Merge branch 'MDL-63381_master_v3' of https://github.com/TomoTsuyuki/moodle 2021-04-20 23:56:56 +02:00
Claude Vervoort ca80d53b38 MDL-70500 lti: dyn reg can be used to update tools 2021-04-20 17:12:28 -04:00
Sara Arjona d0b3f1d24a Merge branch 'MDL-62244_master_label_view' of https://github.com/sheesania/moodle 2021-04-20 17:44:54 +02:00
Marina Glancy 881b4258f7 MDL-70897 various: uasort callback can not return bool
Co-authored-by: Ruslan Kabalin <ruslan.kabalin@gmail.com>
2021-04-20 14:58:25 +01:00
Sara Arjona e29b256438 weekly release 4.0dev 2021-04-20 15:51:10 +02:00
Sara Arjona 92261bbb2a Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-04-20 15:51:07 +02:00
Paul Holden 6c159262f0 MDL-70970 quizaccess_seb: consistent property array sorting by key.
In PHP8.0 using `ksort` was producing incorrect results by sorting
keys differing only in case in the wrong order. This change makes
sorting consistent between PHP versions.

Co-Authored-By: Tim Hunt <T.J.Hunt@open.ac.uk>
2021-04-20 14:36:13 +01:00
Mikel Martín a2a41ae5e6 MDL-70903 mod_h5p: Fix PHP8.0 warning 2021-04-20 15:17:12 +02:00
Marina Glancy 57a444d31f MDL-71017 oath2: configuration check fix and return types 2021-04-20 12:07:54 +02:00
David Matamoros 3b1de08da5 MDL-70902 libraries: upgrade to version 6.4.1 of TCPDF 2021-04-20 11:53:54 +02:00
David Matamoros 5a6f05c605 MDL-71017 tool_oauth2: Small fixes on Oauth 2 services UI and tests 2021-04-20 10:50:44 +02:00
Marina Glancy d80f3c5d8a MDL-71017 tool_oauth2: show not configured services 2021-04-20 10:50:44 +02:00
Marina Glancy 0152fdbdff MDL-71017 oauth2: configure some oauth2 services for login only 2021-04-20 10:50:40 +02:00
Rajneel Totaram 2ff9484417 MDL-71376 mod_quiz: fix undefined object reference 2021-04-20 20:10:04 +12:00
Thong Bui a8c868822f MDL-71030 Quiz: Add 'who' made changes in question response history 2021-04-20 09:06:15 +07:00
Jun Pataleta 0d92e1bc11 Merge branch 'MDL-71364' of https://github.com/stronk7/moodle 2021-04-20 09:24:52 +08:00
AMOS bot 3a134a3066 Automatically generated installer lang files 2021-04-20 00:07:51 +00:00
Paul Holden e41b3485ba MDL-57831 message: Boostrap controls for notification preferences.
Switch from previous custom controls that caused problems with
overflowing labels when using long language strings.
2021-04-19 23:48:36 +01:00
Víctor Déniz ab6f97292d Merge branch 'MDL-71087-master' of https://github.com/NashTechOpenUniversity/moodle 2021-04-19 23:44:06 +01:00
Eloy Lafuente (stronk7) ea2fd1ace6 Merge branch 'MDL-69256-master' of git://github.com/andrewnicols/moodle 2021-04-20 00:04:48 +02:00
Víctor Déniz 50fb2248f5 Merge branch 'master_fix_gradeimport_csv' of https://github.com/intrajp/moodle 2021-04-19 22:47:32 +01:00
Víctor Déniz f7dd6b26b7 Merge branch 'MDL-71118-master' of git://github.com/lucaboesch/moodle 2021-04-19 19:43:32 +01:00
Eloy Lafuente (stronk7) 973a4a2ae1 Merge branch 'MDL-71181-master' of https://github.com/ettolrah/moodle 2021-04-19 18:58:14 +02:00
Eloy Lafuente (stronk7) ce06891713 Merge branch 'master-MDL-71190-backup-lastaccess' of https://github.com/ScottVerbeek/moodle 2021-04-19 18:52:18 +02:00
Sara Arjona 9ffe994b4c Merge branch 'MDL-71262' of https://github.com/mkassaei/moodle 2021-04-19 17:44:03 +02:00
Sara Arjona 5013604f18 MDL-71225 questions: Remove duplicated empty line 2021-04-19 17:28:19 +02:00
Sara Arjona ee6eccd7fd Merge branch 'MDL-71225' of https://github.com/mkassaei/moodle 2021-04-19 17:18:33 +02:00
Sara Arjona 4478fcf1ce Merge branch 'MDL-67882-message-config-log' of https://github.com/brendanheywood/moodle 2021-04-19 16:22:48 +02:00
Dongsheng Cai a42df81709 MDL-68747 mod_quiz: force LTR for quiz grading overview chart 2021-04-19 21:06:04 +10:00
Sara Arjona 754c8f8d74 Merge branch 'MDL-71367' of https://github.com/stronk7/moodle 2021-04-19 11:12:49 +02:00
Sara Arjona 727bb77860 Merge branch 'MDL-71365' of https://github.com/stronk7/moodle 2021-04-19 10:18:25 +02:00
Paul Holden 4b3f22e5d1 MDL-71127 mod_quiz: fix thrown exception for invalid question columns. 2021-04-19 09:06:56 +01:00
Paul Holden fd9a39384d MDL-71168 report_participation: fix select all users checkbox. 2021-04-19 09:05:28 +01:00
Paul Holden 5163f1e6bd MDL-69460 admin: prevent CLI upgrade when stale files present. 2021-04-19 09:03:39 +01:00
Sara Arjona 545996577e Merge branch 'MDL-66475' of git://github.com/paulholden/moodle 2021-04-19 09:49:09 +02:00
Sara Arjona d688af7edd Merge branch 'MDL-65553-master' of git://github.com/aanabit/moodle 2021-04-19 08:53:33 +02:00
Jun Pataleta ba5f069ada Merge branch 'MDL-71324-master' of git://github.com/lucaboesch/moodle 2021-04-19 12:31:18 +08:00
ScottVerbeek dc1048c301 MDL-71190 backup: Include users last access to course
Backup the table user_lastaccess which holds data for when a user last accessed a course.
And also restore to the table user_lastaccess from the .xml file created in the backup.
2021-04-19 12:03:50 +10:00
Andrew Nicols d649ec2837 Merge branch 'MDL_71012_master' of https://github.com/jessansell/moodle 2021-04-19 08:47:50 +08:00
Eloy Lafuente (stronk7) fc530b1837 MDL-71367 unit tests: Add missing ->destroy() call to test backups
As part of the tests preparations, some backups are created, but
the tests aren't calling to their ->destroy() method at the end.

The destroy() method is needed to go cleaning and unsetting various
objects that, only then, will free resources, like memory, open files...

This isn't critical under Unix OSs... but Windows is really sensible
and keeps all open files locked, so any write operation on them fails.
2021-04-19 00:04:10 +02:00
Eloy Lafuente (stronk7) 64ae826093 Merge branch 'MDL-71031' of https://github.com/stronk7/moodle 2021-04-18 17:08:43 +02:00
Eloy Lafuente (stronk7) be927f0327 MDL-71031 external: Minor tweaks towards coding style and external rules
- Some small namespace/use/MOODLE_INTERNAL/requires reorganization.
- Move file phpdocs to class phpdocs.
- Move external method names to be new "execute" default ones.
- Move unit tests to matching core_grades\external namespace.
- Add missing clean_returnvalue() calls.
2021-04-18 11:52:14 +02:00
Peter Burnett 71ffad7ea6 MDL-71031 webservices: Extended gradecategory creation API
This adds a new webservice that creates gradecategories as a batch,
and deprecates the old single creation call, which is superseded.
It also patches a few small issues in the single WS, for any integrations
currently relying on that webservice.
2021-04-18 11:52:07 +02:00
AMOS bot 66684b7b8e Automatically generated installer lang files 2021-04-18 00:07:48 +00:00
Eloy Lafuente (stronk7) 2d287b8adf MDL-71365 grunt: fix boost ignores order and missing LF @ EOF 2021-04-18 00:10:46 +02:00
Eloy Lafuente (stronk7) 10a4932e25 MDL-71364 behat: fix randomness causes by "now" advancing
Some recent tests do set a date time element
to ##now## or tomorrow and, immediately after that
the look if, effectively, ##now## and #tomorrow#
have been set (with minutes resolution).

Problem is that, between the field is set and the field
is verified, it can happen that the time advances to
next minute (from H:M:59 to H:M+1:00) and then the
assertion fails.

To avoid this, we could have lowered the resolution to be
hours... but that doesn't solve the problem just makes it
to happen less often.

So, instead of that... we are setting the 2 now and tomorrow
cases to be "today noon" and "tomorrow noon" (12:00:00) so
we ensure they won't be ever in the risk of jumping of minute.
2021-04-17 12:31:23 +02:00
Luca Bösch 3316562636 MDL-71324 course: Render hasinfo class only if necessary. 2021-04-17 11:49:39 +02:00
Luca Bösch aee27d0a9b MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:46:09 +02:00
Luca Bösch b9c7ea61a9 MDL-71118 gradereport_user: Display Grades (plural) in profile page. 2021-04-17 11:46:09 +02:00
Eloy Lafuente (stronk7) b60fbb9cd4 Merge branch 'MDL-70099' of git://github.com/paulholden/moodle 2021-04-17 09:40:19 +02:00
Eloy Lafuente (stronk7) fc2e04d903 Merge branch 'MDL-71334-master' of git://github.com/mickhawkins/moodle 2021-04-16 19:59:37 +02:00
Sara Arjona 0fd37bf5d8 weekly release 4.0dev 2021-04-16 17:03:25 +02:00
Sara Arjona dd33f73bfa Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-04-16 17:03:22 +02:00
Eloy Lafuente (stronk7) 26d8cc9ce7 Merge branch 'MDL-69331-fix' of github.com:sarjona/moodle 2021-04-16 13:04:51 +02:00
Sara Arjona ef557b970f MDL-69331 core_h5p: fix behat errors 2021-04-16 11:09:02 +02:00
Andrew Nicols e37158ba6c Merge branch 'master_MDL-71233' of https://github.com/golenkovm/moodle 2021-04-16 07:57:02 +01:00
Jun Pataleta c44e5c2218 Merge branch 'MDL-48594-master' of https://github.com/nguyenphuctien/moodle 2021-04-16 07:57:01 +01:00
Andrew Nicols 0afbb0517c Merge branch 'MDL-60490-missing_close_div' of https://github.com/leonstr/moodle 2021-04-16 07:57:01 +01:00
Andrew Nicols c58e9a14ee Merge branch 'MDL-69415-master' of git://github.com/sarjona/moodle 2021-04-16 07:57:01 +01:00
Jake Dallimore 64e24894f4 Merge branch 'master' of git://github.com/paulphillip5/moodle 2021-04-16 07:57:01 +01:00
Jake Dallimore 829b8b70c8 Merge branch 'MDL-71342-master-2' of git://github.com/junpataleta/moodle 2021-04-16 07:57:01 +01:00
Andrew Nicols 0dbcbbb452 Merge branch 'master_MDL-71254' of https://github.com/golenkovm/moodle 2021-04-16 07:57:01 +01:00
Andrew Nicols 1528661e68 Merge branch 'MDL-71186-master' of https://github.com/clransom/moodle 2021-04-16 07:57:01 +01:00
Víctor Déniz 95e9ccea79 Merge branch 'MDL-69331-master' of git://github.com/sarjona/moodle 2021-04-16 07:57:01 +01:00
Sara Arjona 0d29672cd7 Merge branch 'MDL-70269' of https://github.com/timhunt/moodle 2021-04-16 07:57:00 +01:00
Michael Hawkins 7ffc5a7160 MDL-71334 mod_lti: Fix manual activity completion behat test 2021-04-16 14:09:55 +08:00
Tien Nguyen c51b77e48a MDL-48594 Report: More filtering options on Activity Completion Report 2021-04-16 10:22:16 +07:00
Jun Pataleta daa9992215 MDL-71342 mod: Conditionally display activity info
* The activity information output component is still being displayed
even in the case when the activity does not have dates to show and
completion tracking is not enabled.
This also causes a horizontal line to be rendered in activity view pages
below the activity heading which does not serve much purpose when
there's no activity information to be shown.
The activity information output component should only be displayed
if there's completion information to show or if there are activty dates
to show. Otherwise, there's no need to render it.
2021-04-15 23:10:03 +08:00
Amaia Anabitarte 9798fb06c8 MDL-70412 groups: Improving create_group data generator
Increasing the size of the name for generated groups
to ensure we don't have problems with ordering.
2021-04-15 16:57:23 +02:00
Amaia Anabitarte 5af5368059 MDL-65553 core_analytics: Don't allow to flag predictions several times
Even if a prediction is hidden from the report once is flagged,
it can be flagged several times if the user visits detailed view via URL.
We remove the checkbox to select a prediction and flag it
once it has already been flagged.
2021-04-15 16:39:09 +02:00
Katie Ransom d916cd77ca MDL-71186 core_user: show custom user fields in group management screens 2021-04-15 15:28:17 +01:00
Sara Arjona bd572b2434 Merge branch 'MDL-71090' of git://github.com/paulholden/moodle 2021-04-15 11:56:40 +02:00
Sara Arjona 39263ddb62 MDL-69331 core_h5p: Add missing @core_h5p tag 2021-04-15 09:16:36 +02:00
Sara Arjona f3d43c76bc MDL-69331 core_h5p: Add missing library files to behat tests
Some of the pre-existing behat tests were creating content into the
content bank using the generator but the H5P content-type libraries
weren't uploaded.
Since MDL-69331, libraries need to be deployed previously (so fake
H5P content-type won't be displayed if these libraries don't exist).
2021-04-15 09:16:36 +02:00
Sara Arjona 39fa45e299 MDL-69331 core_contentbank: Hide disabled H5P content-types
If a H5P content-type is disabled:
- The content bank won't display existing contents having it as a
main library.
- The content bank won't allow to create new contents using it.
2021-04-15 09:16:32 +02:00
Sara Arjona dbfd4aebb5 MDL-69331 core_h5p: Only upgrade enabled libraries
The core\task\h5p_get_content_types_task task will only download
content-type for enabled libraries.
2021-04-15 09:03:56 +02:00
Sara Arjona 5308ba0947 MDL-69331 core_h5p: Display error when main library is disabled
H5P contents with the main library disabled won't be deployed; a
message error will be displayed instead of.
2021-04-15 09:03:56 +02:00
Sara Arjona d3d3b3bdc0 MDL-69331 core_h5p: Add enabled field to libraries
The "enabled" field has been added to the H5P libraries to let
admins decide whether a library should be used or not in the site.
2021-04-15 09:03:56 +02:00
Jake Dallimore a83dd7dd43 Merge branch 'MDL-71338' of git://github.com/paulholden/moodle 2021-04-15 14:42:10 +08:00
Sara Arjona e82e8b4b1c Merge branch 'MDL-71337-master' of git://github.com/junpataleta/moodle 2021-04-15 08:30:08 +02:00
Jake Dallimore a807361422 Merge branch 'MDL-61768-master-3' of git://github.com/mihailges/moodle 2021-04-15 14:16:04 +08:00
abgreeve 965a7fd357 Merge branch 'MDL-71007-courseidnumer-grade-ws' of https://github.com/brendanheywood/moodle 2021-04-15 13:48:39 +08:00
Jun Pataleta 18ad675111 MDL-71337 mod_h5pactivity: Increase window size during test
The addition of the activity information moves the h5p content down
out of the window view on Firefox which causes the Check button to be
unclickable. This patch increases the window size to ensure that the
check button is visible and clickable.

Credits to Eloy <stronk7@moodle.org> for the thorough investigation
of the root cause of this issue :)
2021-04-15 12:44:31 +08:00
Mihail Geshoski 5f4bdefc54 MDL-61768 repository_googledocs: Deprecate unused methods
Deprecates methods from the repository_googledocs class which are
no longer used.
2021-04-15 12:40:32 +08:00
Mihail Geshoski 6528181e72 MDL-61768 repository_googledocs: Add unit tests
Adds unit tests for the newly introduced methods related to the content
browsing and searching functionallity across drives.
2021-04-15 12:40:32 +08:00
Mihail Geshoski 54a850640d MDL-61768 repository_googledocs: Support shared drives
Enables the Google Drive repository to support browsing and searching
for content from the existing shared drives.
2021-04-15 12:40:32 +08:00
Mihail Geshoski 241e778ca7 MDL-61768 repository_googledocs: Rest API function to list shared drives
Adds a new rest API function in the googledocs repository which would
return the existing shared drives.
2021-04-15 11:06:11 +08:00
Jake Dallimore e845a21a64 Merge branch 'MDL-70142' of git://github.com/paulholden/moodle 2021-04-15 10:35:33 +08:00
Andrew Nicols b1975b002c Merge branch 'MDL-70311-master' of git://github.com/ilyatregubov/moodle 2021-04-15 09:19:24 +08:00
Jake Dallimore c8a8dc6a52 Merge branch 'MDL-70649-alternative-security-helper' of https://github.com/xuangui2018/moodle 2021-04-15 08:38:48 +08:00
Jake Dallimore 1ed346c3cc Merge branch 'MDL-71119-master' of git://github.com/sarjona/moodle 2021-04-15 08:31:47 +08:00
AMOS bot 6563acb37f Automatically generated installer lang files 2021-04-15 00:08:03 +00:00
Paul Holden 0fea9ec133 MDL-71338 tool_usertours: correct Content-Type on tour export.
Replace existing code with standard file serving mechanism, in
turn correcting the previously incorrect Content-Type header.
2021-04-14 21:09:16 +01:00
Eloy Lafuente (stronk7) 41d9dc459f Merge branch 'MDL-67999-master' of git://github.com/sarjona/moodle 2021-04-14 19:17:19 +02:00
Mahmoud Kassaei 42a4c30ec4 MDL-71225 Questions: Default options for
ddimageortext, ddmarker and match qtypes
2021-04-14 18:02:09 +01:00
Mahmoud Kassaei 4971015e38 MDL-71262 Questions: Default options for qtype_essay 2021-04-14 18:00:34 +01:00
Sara Arjona e5872a3b45 MDL-67999 contentbank: Remove contentbank/upload.php
As the form to upload files to the content bank has been moved to
modal, this file is not required any more, so it has been removed.
2021-04-14 18:10:04 +02:00
Sara Arjona dcf94b0ca2 MDL-67999 contentbank: Make upload/replace files modal form
Once MDL-64554 landed, content bank can implement the original
proposal, using a modal form when uploading files.
2021-04-14 18:04:10 +02:00
Sara Arjona 9c07064417 MDL-67999 core_contentbank: Add namespace to upload form
The form to upload/replace files has been moved to classes/form
(it's where it should have been added when it was created).
Besides, this class has been renamed because now, with the
namespace, contentbank and form don't need to be in the name ;-)
2021-04-14 18:04:09 +02:00
Xuan Gui ed046b8eb1 MDL-70649 files: Alternative security helper
Augument all installed plugin's security helper if there is any.
Plugins function has to be defined as plugintype_pluginname_security_helper in pluginname/lib.php file.
2021-04-14 21:21:35 +10:00
Eloy Lafuente (stronk7) 9ee80056de Merge branch 'MDL-70616-master' of https://github.com/izendegi/moodle 2021-04-14 12:45:00 +02:00
Iñigo Zendegi 9391a177d8 MDL-70616 gradingform_rubric: Filters not applied to rubric name 2021-04-14 11:04:54 +02:00
Sara Arjona 24ff49f681 MDL-71119 core_badges: Add more information to errors
Some errors raised when calling external services were ignored.
Displaying this information helps to debug and find the real reasons
why some action, like connecting to an external backpack, can't be
done.
2021-04-14 10:52:47 +02:00
Jun Pataleta dbda8528f5 Merge branch 'MDL-71315-master' of git://github.com/sarjona/moodle 2021-04-14 16:50:42 +08:00
Paul Holden 16eefb1444 MDL-70772 mod_forum: check for valid usernode before making active. 2021-04-14 09:20:02 +01:00
Sara Arjona c1649591a2 MDL-71119 core_badges: Use basicauth and remove urlencode
Basic authorization header is required to get token. Besides, client
id and secret shouldn't call urlencode.
2021-04-14 09:18:36 +02:00
Sara Arjona c974a59f41 MDL-71119 core_badges: Initialise scopes param in backpack-connect.php
The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.
2021-04-14 09:18:35 +02:00
Sara Arjona e281a5ef69 MDL-71315 core_badges: Fix warning when rendering badges 2021-04-14 09:06:06 +02:00
Andrew Nicols 88a29d6ca7 Merge branch 'MDL-71154' of https://github.com/stronk7/moodle 2021-04-14 12:09:01 +08:00
Jake Dallimore 195abe8ab1 Merge branch 'MDL-70207-master' of git://github.com/peterRd/moodle 2021-04-14 09:07:21 +08:00
Andrew Nicols c10791cab9 Merge branch 'MDL-71169-master-execute' of git://github.com/mudrd8mz/moodle 2021-04-14 08:35:07 +08:00
AMOS bot ee7d8d7f30 Automatically generated installer lang files 2021-04-14 00:07:59 +00:00
Eloy Lafuente (stronk7) 7d3012f9bc Merge branch 'MDL-69874-master' of git://github.com/lucaboesch/moodle 2021-04-13 23:08:45 +02:00
Eloy Lafuente (stronk7) 392fc8ead0 Merge branch 'MDL-70722-master' of git://github.com/sarjona/moodle 2021-04-13 22:39:27 +02:00
Víctor Déniz cfcad45150 Merge branch 'MDL-71089-master' of git://github.com/roland04/moodle 2021-04-13 19:45:03 +01:00
Eloy Lafuente (stronk7) 17ff770eaa MDL-71154 ci: Prevent upstream branches and tags to be built
Both for travis and GHA:

- master and MOODLE_XXX_STABLE branches
- any vX.Y.Z tag

won't lead to a build anymore.
2021-04-13 16:55:42 +02:00
Mikel Martín 5fade7fcc6 MDL-71089 core: Add different Toast notification styling 'types' 2021-04-13 16:28:35 +02:00
Mikel Martín e7fa11471e MDL-71089 theme_boost: Add styles for different toast types 2021-04-13 16:28:35 +02:00
Sara Arjona fd2740d592 Merge branch 'MDL-71011' of https://github.com/stronk7/moodle 2021-04-13 12:26:57 +02:00
Sara Arjona b9de0d1794 Merge branch 'MDL-65983-master' of git://github.com/jleyva/moodle 2021-04-13 12:19:25 +02:00
Luca Bösch 37a1f2454a MDL-69874 workshop: Title mentions received assessments in close phase. 2021-04-13 11:52:36 +02:00
Eloy Lafuente (stronk7) 511a87f5fc weekly release 4.0dev 2021-04-13 10:26:25 +02:00
Eloy Lafuente (stronk7) 99541a198e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-04-13 10:26:20 +02:00
Adrian Greeve 83b71194cd Merge branch 'MDL-71161-master-4' of git://github.com/junpataleta/moodle 2021-04-13 11:42:30 +08:00
Tomo Tsuyuki 108da43e9f MDL-63381 backup: Have an option to import permissions
Add options to use permission settings for import / restore
2021-04-13 13:24:15 +10:00
Adrian Greeve 4cc1d6c56e Merge branch 'MDL-70821-master-5' of git://github.com/junpataleta/moodle 2021-04-13 10:59:02 +08:00
Eloy Lafuente (stronk7) 6e39487123 Merge branch 'mdl_71172' of https://github.com/AnupamaSarjoshi/moodle 2021-04-13 00:46:55 +02:00
Tim Hunt 385ce8a5e1 MDL-71313 repositories: warn if get_instances context is wrong type 2021-04-12 20:30:43 +01:00
Michael Hawkins 09a59a75c6 MDL-71161 mod_workshop: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins 907ce56d20 MDL-71161 mod_wiki: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins f37c83da8d MDL-71161 mod_url: Display activity completion information 2021-04-13 01:21:12 +08:00
Simey Lameze 59249a54c9 MDL-71161 mod_survey: show survey activity info 2021-04-13 01:21:12 +08:00
Michael Hawkins 920646237d MDL-71161 mod_scorm: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins 1a596574ba MDL-71161 mod_resource: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins a219b812b4 MDL-71161 mod_quiz: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins c8a6d12608 MDL-71161 mod_page: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins e3fb51e3c8 MDL-71161 mod_lti: Display activity completion information 2021-04-13 01:21:12 +08:00
Michael Hawkins 8395543c40 MDL-71161 mod_lesson: Display activity completion information 2021-04-13 01:21:12 +08:00
Jun Pataleta 23cb701a75 MDL-71161 mod_imscp: Display activity information output component 2021-04-13 01:21:12 +08:00
Jun Pataleta 16a9e8ada7 MDL-71161 mod_h5pactivity: Display activity information output component 2021-04-13 01:21:12 +08:00
Simey Lameze 1e459102e4 MDL-71161 mod_glossary: show glossary activity info 2021-04-13 01:21:12 +08:00
Simey Lameze 3e228db3bf MDL-71161 mod_forum: show forum activity info 2021-04-13 01:21:11 +08:00
Jun Pataleta 10ed7500fb MDL-71161 mod_folder: Display activity information output component 2021-04-13 01:21:11 +08:00
Simey Lameze 52b9a0c920 MDL-71161 mod_feedback: show feedback activity info 2021-04-13 01:21:11 +08:00
Simey Lameze a45eca85bb MDL-71161 mod_data: show database activity info 2021-04-13 01:21:11 +08:00
Jun Pataleta 0ba0dfe3a9 MDL-71161 mod_chat: Display activity information output component 2021-04-13 01:21:11 +08:00
Jun Pataleta 6b46ce4c48 MDL-71161 mod_book: Display activity information output component 2021-04-13 01:21:11 +08:00
Simey Lameze 8d38fc7eab MDL-71161 mod_assign: show assign activity info 2021-04-13 01:21:11 +08:00
Jun Pataleta bb5ed7d4af MDL-70821 core_completion: Fix completion settings Behat tests 2021-04-13 00:57:46 +08:00
Jun Pataleta f5d9ac9626 MDL-70821 course: Render activity information only when necessary
Render the activity information output component in the course homepage
only if either completion details or activity dates are to be displayed.
This can help reduce the number of files being included when loading the
course homepage (e.g. the activity information template for each
activity in the course homepage).
2021-04-13 00:51:48 +08:00
Eloy Lafuente (stronk7) 297156a72a MDL-71011 adodb: Update readme and thirdpartylibs
Small changes in readme and document the bump in xml
2021-04-12 18:49:38 +02:00
Eloy Lafuente (stronk7) 59a8b7182b MDL-71011 php80: final private makes no sense, throwing warning
Ref: https://php.watch/versions/8.0/final-private-function#final-private

This applies #712 from upstream libraries.

Unrelated: I've also changed a occurrence of "private final"
by the correct (PSR-12) "final private" in the constructor
(the final&private combination is allowed in constructors)
in lib/classes/event/base.php, because it's the unique case
in core and phpcs was really insisting.
2021-04-12 18:49:38 +02:00
Eloy Lafuente (stronk7) 91969d1e04 MDL-71011 adodb: Bump to v5.21.0
Following the instructions @ readme_moodle.txt
2021-04-12 18:49:30 +02:00
Eloy Lafuente (stronk7) 003a47bd02 Merge branch 'MDL-71064' of git://github.com/paulholden/moodle 2021-04-12 17:32:24 +02:00
Sara Arjona 4a45b3f8ef Merge branch 'MDL-68716' of git://github.com/paulholden/moodle 2021-04-12 17:24:33 +02:00
Sara Arjona a521c2d985 Merge branch 'MDL-71264' of https://github.com/stronk7/moodle 2021-04-12 16:40:04 +02:00
Sara Arjona c11b6cfbea Merge branch 'MDL-70595-master' of git://github.com/mickhawkins/moodle 2021-04-12 16:01:29 +02:00
Ferran Recio 6ae566c55d MDL-71141 course: fix frontpage section warning 2021-04-12 12:41:10 +02:00
Sara Arjona 334f7760d9 Merge branch 'MDL-71107-master' of git://github.com/aanabit/moodle 2021-04-12 12:41:03 +02:00
Anupama Sarjoshi c4fa89d55a MDL-71172 quiz: Improve quiz Behat tests 2021-04-12 11:31:44 +01:00
Juan Leyva 47a142704d MDL-65983 airnotifier: Configuration check report 2021-04-12 11:23:06 +02:00
Jake Dallimore 0bbdf3b910 Merge branch 'MDL-71251-master' of git://github.com/jleyva/moodle 2021-04-12 14:48:28 +08:00
Adrian Greeve d24df2a201 Merge branch 'MDL-70821-master-5' of git://github.com/junpataleta/moodle 2021-04-12 14:45:59 +08:00
Jun Pataleta a5e6df51a7 MDL-70821 course: Activity information fixes
* Make sure the activity is visible to the user (cm_info::uservisible)
before showing the activity completion information.
* Add to-do status for overridden automatic completion
2021-04-12 11:41:37 +08:00
Jun Pataleta 15a9b2c51c MDL-70821 course: Check activity dates on course homepage
* Check the activity dates on the course homepage depending on
  the value of the showactivitydates course setting
* Plus use the new Behat steps for checking activity dates
2021-04-12 11:41:37 +08:00
Jun Pataleta 5dee6f45d8 MDL-70821 course: New Behat steps for activity dates
* activity_date_in_activity_should_contain_text()
  - Checks the presence of the given text in the activity's date info.
* activity_dates_information_in_activity_should_exist()
  - Checks the presence of activity dates information in the activity
    information output component.
* activity_dates_information_in_activity_should_not_exist()
  - Checks the absence of activity dates information in the activity
    information output component.
2021-04-12 11:41:37 +08:00
Jun Pataleta 1c15796a75 MDL-70821 behat: Use new activity completion steps for Behat tests
Replace usages of completion Behat steps that check for the completion
checkboxes with the new activity completion Behat steps.
2021-04-12 11:41:37 +08:00
Jun Pataleta 300b72f81a MDL-70821 completion: New Behat steps for activity completion
* activity_completion_condition_displayed_as()
  - Shows the status of an automatic completion condition for a given
    activity
* activity_should_have_the_completion_condition()
  - Checks that the activity displays the given completion condition
* manual_completion_button_displayed_as()
  - Shows the status of the manual completion button for a given
    activity
* the_manual_completion_button_for_activity_should_be_disabled()
  - Checks that the manual completion button for the given activity is
    disabled.
* there_should_be_no_completion_for_activity()
  - Checks that the activity does not show completion information
* toggle_the_manual_completion_state()
  - Toggles the manual completion button's state for a given activity
* overridden_manual_completion_button_displayed_as()
  - Checks the manual completion state of an activity.
* overridden_activity_completion_condition_displayed_as()
  - Checks if the activity with specified name is maked as complete.
2021-04-12 11:41:37 +08:00
Jun Pataleta 147a3a3661 MDL-70821 course: activity_information template changes
* Add activity name for completion conditions labels. This would give
  better information to screen reader users the activity that the list
  of automatic completion conditions belong to. This would be useful
  especially when the completion conditions are displayed on the course
  homepage.
* Add data-region attributes to activity dates and completion
  information divs.
* Reorganise activity dates and completion information divs so they
  are only rendered when they have data to show.
2021-04-12 11:41:37 +08:00
Jun Pataleta 32b76b34d8 MDL-70821 course: Remove old manual completion toggling
Remove the old ways of toggling manual completion via completion.js
and the ajax part of togglecompletion.php.
2021-04-12 11:41:37 +08:00
Jun Pataleta e933044409 MDL-70821 course: Deprecate course_section_cm_completion()
Deprecate \core_course_renderer::course_section_cm_completion(). It is
not being used anymore and is being replaced by
\core_renderer::activity_information().
2021-04-12 11:41:37 +08:00
Jun Pataleta 13f88df351 MDL-70821 course: Cover availability conditions for manual completion
When an activity has manual completion tracking, pressing the manual
completion checkbox reloads the page after toggling the completion
state when the activity is linked to availability conditions.
The "Mark as done" button needs to mimic this behaviour as well.

The approach being taken here is to add a core_course/view JS module
for the course homepage which listens for the manualCompletionToggled
event and reloads the page when the activity module has availability
conditions tied to it.

Perhaps for future development, instead of reloading the page, the
container of the restricted course sections/activities can reloaded via
AJAX as well.
2021-04-12 11:41:37 +08:00
Jun Pataleta 642059155c MDL-70821 course: Create manualCompletionToggled event
Add a new "manualCompletionToggled" course event and dispatch this
when the manual completion state for an activity is toggled.
2021-04-12 11:41:37 +08:00
Jun Pataleta 7d8cc2c610 MDL-70821 course: Remove unused completion info from cm_format
With the activity information output component dealing with the
completion information of the activity, there's no need to pass
completion info to the cm_format renderable.
2021-04-12 11:41:34 +08:00
Jun Pataleta abc5d76175 MDL-70821 course: Render activity information output component in course
Use the activity information output component to render activity
completion details and activity dates for activities on the course
homepage.

Includes fixup from Shamim Rezaie <shamim@moodle.com>
2021-04-12 11:40:54 +08:00
Eloy Lafuente (stronk7) 7467584517 Merge branch 'MDL-69102-master' of https://github.com/martygilbert/moodle 2021-04-11 23:52:41 +02:00
Eloy Lafuente (stronk7) 377d6dc12a MDL-69102 phpunit: Add test to cover ALL cohort criteria
That way we can check that the expectations are
working ok for every database. Previously only the
ANY case was being tested.

Also, convert them to course badges and check, via
review_all_criteria() that the SQL structures returned
by award_criteria_cohort->get_completed_criteria_sql()
doesn't fail and return the expected counters.
2021-04-10 12:31:22 -04:00
Marty Gilbert d8085396de MDL-69102 badge: Fixes broken WHERE clause
When buildilng the 'WHERE' clause, the SQL generated
a query that selected any user who was a member of the
**last** group, not all of the groups.

I believe the query has to be re-worked so that it only
returns users who are in ALL of the groups. This can
be done by a GROUP BY and HAVING.
2021-04-10 12:26:22 -04:00
Issam Taboubi 0aa65aefe7 MDL-71303 core: HTML not escaped in block skip link 2021-04-09 17:10:19 -04:00
Mahmoud Kassaei 2d18de87ce MDL-71205 Default options for qtype_numerical 2021-04-09 18:39:37 +01:00
Juan Leyva 46a9a2b6c4 MDL-71251 qtype_essay: Return new min/max word limit settings via WS
Those settings are required by external clients such as the Moodle App
2021-04-09 17:15:18 +02:00
Dan Marsden 17ee54fcda MDL-32226 plagiarism: add span around links.
Make it easier for Mobile app to parse.
2021-04-09 12:03:04 +02:00
AMOS bot 11919a5bf5 Automatically generated installer lang files 2021-04-09 00:07:57 +00:00
Víctor Déniz f85364c1ea Merge branch 'MDL-70769-master' of https://github.com/sharidas/moodle 2021-04-09 00:54:18 +01:00
Eric Merrill 59704c659c MDL-52724 editor_atto: Scrub atto html for invalid ol, ul, and li tags
Try to correct broken ul/ol/li tags, as they have an outsized impact
on course layout. Uses basic regex and loops to track open and closed
tags.

Also adds a deep clean option to the HTML cleaner, that runs less
frequent, more intensive cleanings. This is because normally _cleanHTML
gets called after each keystroke, which could cause problems with
large content on weak systems.

Behat changes are a fix for setting multiline strings in Atto, and
creating a multiline match step.
2021-04-08 15:20:24 -04:00
Eloy Lafuente (stronk7) c06ed30430 Merge branch 'MDL-70802-master' of git://github.com/andrewnicols/moodle 2021-04-08 18:30:13 +02:00
Sara Arjona fc59c4773e Merge branch 'MDL-65616' of git://github.com/paulholden/moodle 2021-04-08 17:45:41 +02:00
Eloy Lafuente (stronk7) c33b5efaad Merge branch 'master_MDL-32226' of https://github.com/danmarsden/moodle 2021-04-08 17:30:12 +02:00
Víctor Déniz 25b8cb9783 Merge branch 'MDL-71116-master' of git://github.com/sarjona/moodle 2021-04-08 01:01:15 +01:00
Víctor Déniz 6bd0e7b34d Merge branch 'MDL-71178-master' of git://github.com/junpataleta/moodle 2021-04-07 16:09:15 +01:00
Amaia Anabitarte 33fed53ad9 MDL-71107 core_contentbank: Behat test. Authoring when copying a course 2021-04-07 10:03:38 +02:00
Amaia Anabitarte 9b7b70ca9b MDL-71107 core_contentbank: Fill content author when copying a course
'usercreated' and 'usermodified' fields can not be always mapped.
We are filling those fields with 'old' users when working on the same
site, or with current user when working on a different instance.
2021-04-07 10:03:38 +02:00
Adrian Greeve 1145cf4659 Merge branch 'MDL-70935-master-4' of git://github.com/mickhawkins/moodle 2021-04-07 15:41:04 +08:00
Shamim Rezaie a75861f78e MDL-70935 mod_quiz: Custom completion implementation 2021-04-07 15:09:36 +08:00
Shamim Rezaie 7a9f13e37f MDL-70935 mod_quiz: combine 'pass' and 'attemptsexhausted' rules
Custom rules are combined using the AND operator. However, the
'completionpass' and 'completionattemptsexhausted' rules are exceptions
because they are combined together with OR, and form a single new rule
that then will be combined with the rest of the rules using AND.
This commit combines the mentioned rules into a single rule named
'completionpassorattemptsexhausted'.
2021-04-07 15:09:36 +08:00
Shamim Rezaie 24b9ff4c71 MDL-70935 mod_quiz: Missing completionminattempts rule description
The mod_quiz_get_completion_active_rule_descriptions() function was not
returning the description for the 'completionminattempts' rule. Added
that.
2021-04-07 15:09:36 +08:00
Michael Hawkins 663b273a55 MDL-70935 mod_scorm: Custom completion implementation 2021-04-07 15:09:36 +08:00
Michael Hawkins f85b36edc5 MDL-70935 mod_lesson: Custom completion implementation 2021-04-07 15:09:36 +08:00
Peter Burnett 93c0dc8ec4 MDL-70233 cache: Disabled factory now gets writer from parent 2021-04-07 15:33:31 +10:00
Adrian Greeve 7ef3653b65 Merge branch 'MDL-70820-master' of git://github.com/lameze/moodle 2021-04-07 13:26:12 +08:00
Simey Lameze 7c7c1aafc8 MDL-70820 mod_forum: custom completion implementation 2021-04-07 12:17:30 +08:00
Simey Lameze d8e2ca0aae MDL-70820 mod_glossary: custom completion implementation 2021-04-07 12:17:30 +08:00
Simey Lameze c8cb54f15a MDL-70820 mod_assign: custom completion implementation 2021-04-07 12:17:30 +08:00
Simey Lameze f807863ba3 MDL-70820 mod_data: custom completion implementation 2021-04-07 12:17:30 +08:00
Simey Lameze 5e26acf0b0 MDL-70820 mod_feedback: custom completion implementation 2021-04-07 12:17:30 +08:00
Simey Lameze 20e5a04776 MDL-70820 mod_survey: custom completion implementation 2021-04-07 12:17:30 +08:00
Eloy Lafuente (stronk7) 68a6915c06 Merge branch 'MDL-68635' of https://github.com/paulholden/moodle 2021-04-06 22:23:15 +02:00
Víctor Déniz f72cc98503 Merge branch 'MDL-71128' of git://github.com/paulholden/moodle 2021-04-06 19:41:04 +01:00
Eloy Lafuente (stronk7) aa8c07276b MDL-71264 behat: Change date(time) element update order
This includes 2 change to the order date(time) elements are filled,
each one addressing one type of problem, where current order is
problematic and can lead to unexpected dates.

1) Changing date, when current month only has X days and target
   month has more than X days. Example, being 1 April, change
   the date to 31 May.
     This is solved by changing the order of introduction
     from current D => M => Y to Y => M => D.
2) Changing date, when target month only has X days and current
   month has more that X days. Example, being 31 March, change
   the date to 28 Feb.
     This is solved by always setting the D to 1, before the
     Y => M => D sequence commented @ 1) begins.
2021-04-06 16:25:46 +02:00
Eloy Lafuente (stronk7) 068430e3ce MDL-71264 behat: New feature covering all day/month/year date changes
Because of the order that dates and datetimes are filled by behat
sometimes there are some intermediate results that are impossible
and then the form (javascript) automatically reacts and fixes the
date, ultimate leading to a different date that the one we wanted
to set with Behat.

This is noticeable when switching between months (with some day
being the last day of the month) and the 2 months have a different
number of days. For example April date => March date (or the opposite).

This test covers all the critical changes (day, month and year),
back and forth. All times are Perth/Australia.
2021-04-06 16:25:46 +02:00
Sara Arjona 18aafd0ed4 weekly release 4.0dev 2021-04-06 15:29:06 +02:00
Sara Arjona 28d90a0be6 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-04-06 15:29:02 +02:00
Eloy Lafuente (stronk7) 0384e9d254 Merge branch 'MDL-71215-master' of https://github.com/sammarshallou/moodle 2021-04-06 15:13:16 +02:00
sam marshall af3c05ca44 MDL-71215 Acceptance test: Missing Behat for webservice service_users 2021-04-06 11:52:56 +01:00
Adrian Greeve 9a58a5f7e6 Merge branch 'MDL-70817-master' of git://github.com/abgreeve/moodle 2021-04-06 16:35:17 +08:00
Adrian Greeve 03e0523e22 MDL-70817 lib: Update the install xml file to use the correct length.
The showactivitydates field had the wrong length of 4. This changes
it to 1.
2021-04-06 15:42:27 +08:00
Michael Hawkins a3e2e2d669 MDL-70595 core: Updated security.txt expiry 2021-04-06 13:01:19 +08:00
Adrian Greeve b816b9566d Merge branch 'MDL-70817-master-8' of git://github.com/junpataleta/moodle 2021-04-06 13:00:53 +08:00
Peter Dias c8c39e403b MDL-70207 core_navigation: Primary nav unit tests 2021-04-06 11:45:44 +08:00
Peter Dias f8f83eae0e MDL-70207 core_navigation: Initial backend for primary navigation 2021-04-06 11:45:44 +08:00
Alex Rowe c8be1d7e94 MDL-70049 assign: count_submissions_need_grading call when can't grade 2021-04-06 10:32:56 +10:00
AMOS bot 2f61120648 Automatically generated installer lang files 2021-04-06 00:08:07 +00:00
Paul Holden b5267b7b38 MDL-70099 enrol: increase accuracy of current enrolments by date.
By rounding the current time it was possible that the most recently
created user enrolments (e.g. self enrolments) were being excluded.

This would manifest itself in a user being enrolled on a course,
but it not appearing under "My courses" navigation or on their own
Dashboard until the rounded time had caught up with the current
time.
2021-04-05 19:32:33 +01:00
Paul Holden f0d44ddf0f MDL-71003 user: fix alignment of autocomplete participant filters. 2021-04-04 23:21:12 +01:00
Paul Holden 069cfef590 MDL-70917 tool_behat: fix profile/replace option comparison.
The `isset` call always returned true for the 'replace' option,
because even if not specified it receives a non-null value. The
`strpos` call now does a strict equality check rather than
greater-than-or-equal (which always returns true).
2021-04-04 23:18:17 +01:00
Paul Holden 3b9e53c7e1 MDL-70763 core: export preferences for correct user.
Ensure we are using the ID of the given user rather than falling
back to that of the current user during privacy export.
2021-04-04 23:15:23 +01:00
Paul Holden 4b193ee3e1 MDL-70763 quiz_overview: export preferences for correct user. 2021-04-04 23:15:23 +01:00
Paul Holden c32192957f MDL-70763 gradereport_grader: export preferences for correct user. 2021-04-04 23:15:23 +01:00
Paul Holden 2d6cde2c6c MDL-66475 task: fix random timing failures in logger cleanup test. 2021-04-04 23:12:57 +01:00
Eloy Lafuente (stronk7) 13e89a1e87 Merge branch 'MDL-71215-master' of https://github.com/sammarshallou/moodle 2021-04-04 15:49:59 +02:00
AMOS bot 9e64a9ac2b Automatically generated installer lang files 2021-04-04 00:08:05 +00:00
Jun Pataleta 9a6958ae4c MDL-70817 admin: Remove heading for showcompletionconditions
It should be under the "Completion tracking" subheading just like in
the course form.
2021-04-02 21:53:20 +08:00
Simey Lameze ec270a3fef MDL-70781 completion: behat coverage for new setting
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Simey Lameze a4f7c1d91f MDL-70781 course: setting for displaying completion conditions
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Simey Lameze c0d0679c8a MDL-70782 course: behat coverage for new setting
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Simey Lameze 680018c95d MDL-70782 course: add setting to show activity dates
Part of MDL-70817
2021-04-02 21:53:20 +08:00
Jun Pataleta 98f44ac00d MDL-70817 mod_choice: Behat tests for the activity completion info 2021-04-02 21:53:20 +08:00
Jun Pataleta 469f035a4c MDL-70817 mod_choice: Show choice activity info 2021-04-02 21:53:20 +08:00
Jun Pataleta dd32d65f3a MDL-70817 core_course: Create an activity information output component
The activity information output component displays information about
an activity module that can contain:
1. Activity dates
2. Completion information
   a. A manual completion button; or
   b. A list of automatic completion conditions and their statuses.

This patch also includes a new JS module called
core_course/manual_completion_toggle for toggling the
completion state of activities that support manual completion.
2021-04-02 21:53:20 +08:00
Jun Pataleta 3c5b29e75d MDL-70817 core_course: Add manual completion toggle to repository
Add the functionality of toggling the completion state of an
activity with manual completion to the core_course/repository
JS module.
2021-04-02 21:53:20 +08:00
Jun Pataleta 3a960c15a4 MDL-70817 core_course: Convert core_course/repository to ES6 2021-04-02 21:53:20 +08:00
Jun Pataleta 6fc9b23d3d MDL-70817 core: Allow the manual completion update WS function for AJAX
Allow the core_completion_update_activity_completion_status_manually
web service function to be called from AJAX as well. This is needed
by the new manual completion toggle button in the
core_course/completion_manual template.
2021-04-02 21:53:20 +08:00
Jun Pataleta 24bf4f58f5 MDL-70817 core_completion: Unit tests for cm_completion_details 2021-04-02 21:53:20 +08:00
Jun Pataleta c81441f5c9 MDL-70817 core_completion: Course module completion details
* Class cm_completion_details builds the custom completion details
for an activity module.
2021-04-02 21:53:20 +08:00
David Mudrák f54b8f9c64 MDL-70372 qtype_numerical: Remove unused format description strings
All these three strings were introduced in MDL-20296. The screenshots
there show some examples of where and how they were used. They stopped
being used shortly after in MDL-20636.

Given that they are specific strings with narrow semantic; they are
provided by a plugin and not by the core component; they have not been
used for 10 years; and no other plugin in the Plugins directory use
them, I feel we can safely bypass the deprecation phase and simply drop
them.
2021-04-02 09:40:18 +02:00
AMOS bot 42169f0db7 Automatically generated installer lang files 2021-04-02 00:07:49 +00:00
Alison Blomenberg 2f8a102da7 MDL-62244 Resource: label view redirects to label, not course 2021-04-01 11:48:00 -06:00
Leon Stringer f56aabd726 MDL-60490 tool_lp: Missing div close
Mustache template had opening <div> with missing </div>.
2021-04-01 12:13:49 +01:00
sam marshall cca005b48a MDL-70446 search_solr: File indexing can fail due to multipart upload
Due to Solr bug SOLR-15039, uploading files for indexing can fail if
it uses multipart upload. This changes it to use direct binary upload.

Unfortunately, the direct binary version in PHP curl only supports a
string, so we have to load the file into memory. I added extra code to
restrict the size of files indexed to (memory limit - 100MB), which is
usually 284MB unless configured differently because cron runs under
MEMORY_EXTRA.
2021-04-01 11:18:33 +01:00
Mikhail Golenkov b808d72a62 MDL-71254 oauth2: Redirect to the login page in case of error 2021-04-01 13:35:51 +11:00
AMOS bot 7a9904c6bc Automatically generated installer lang files 2021-04-01 00:07:51 +00:00
Jun Pataleta 6a6cdf14ca MDL-71178 completion: Rebuild course cache before completion reset
Before resetting completion states during module update, we need to
rebuild the course cache first in order to properly reset the completion
states. Otherwise, calls to methods that fetch course module info
via cache (e.g. cm_info::create()) will fetch outdated information.
2021-04-01 00:46:34 +08:00
Juan Leyva b63065cea3 MDL-70863 mod_forum: Allow NULL in timecreated 2021-03-31 17:54:36 +02:00
Jun Pataleta 9d35715453 Merge branch 'MDL-70895' of https://github.com/mkassaei/moodle 2021-03-31 21:26:39 +08:00
sam marshall 611e2569aa MDL-71215 core_user: User fields - remaining deprecated functions
This change removes references in code and comments to a few
deprecated functions that were accidentally missed in the larger
change.

The code changes only affect service_users.php. I made it support
custom user profile fields in this query, because it was easy
enough, rather than adding another TODO to fix later.
2021-03-31 11:12:16 +01:00
Mahmoud Kassaei 01403b2f0d MDL-70895 Questions: Default options when creating a question 2021-03-31 09:26:54 +01:00
Adrian Greeve facec59334 Merge branch 'MDL-37655' of https://github.com/stronk7/moodle 2021-03-31 15:46:51 +08:00
Eloy Lafuente (stronk7) 870a8de3fb MDL-37655 phpunit: Avoid having multiple testcase classes in 1 file
Note that there wasn't any case of multiple testcase classes in
1 file. All the cases reported in the issue were false positives
caused but other "mock/fixture" files being named _test.

So all this issue does is:

1) rename any _test suffixed class in test files, because we are
   going to start renaming a lot of test classes to _test.

2) ensure that the 2 test case classes modified in this issue,
   are already observing the filename = classname rule that will
   be implemented soon (and verigy it works).
2021-03-30 19:17:54 +02:00
Víctor Déniz f0eb6a5729 weekly release 4.0dev 2021-03-30 15:37:25 +01:00
Víctor Déniz a2ad40d02d Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-03-30 15:37:18 +01:00
Paul Holden 6150e8c7f4 MDL-65687 message: increase confirmation dialog zindex.
Make sure that confirmation dialogs (such as block/unblock user,
delete conversation) are shown with prominence in the messaging
drawer.
2021-03-30 10:50:29 +01:00
Tomo Tsuyuki b6f6203e65 MDL-71136 backup: Fix moodle_exception path. 2021-03-30 10:54:08 +11:00
Mikhail Golenkov 0d2f65ffc9 MDL-71233 backup: Fix Moodle version for MDL-69418 2021-03-30 10:41:59 +11:00
Paul Holden 7107649bc8 MDL-68635 tool_cohortroles: observe user initial table filter. 2021-03-29 14:12:36 +01:00
Paul Holden a22604d6ed MDL-68716 mod_forum: extra column sorting options in privacy export.
Accounts for extra sort options that were added in bc23cbaf.
2021-03-29 14:05:57 +01:00
Eloy Lafuente (stronk7) 67b2e62fe7 Merge branch 'MDL-70963-master' of git://github.com/sarjona/moodle 2021-03-29 12:39:32 +02:00
Sara Arjona 51ec496f75 MDL-70963 core_badges: Use expected JSON format for OBv2.1
This patch adds some changes to guarantee that OpenBadges 2.1 (OBv2.1)
will return always the same JSON format that OBv2.0 (because the only
difference between both versions it's the BadgeConnect API).
2021-03-29 10:02:58 +02:00
Andrew Nicols 91bd6289e2 Merge branch 'MDL-70962' of git://github.com/paulholden/moodle 2021-03-29 11:58:05 +08:00
Andrew Nicols 963e1f835f Merge branch 'MDL-71004' of https://github.com/stronk7/moodle 2021-03-29 11:53:43 +08:00
AMOS bot 91f30ac7cb Automatically generated installer lang files 2021-03-29 00:07:49 +00:00
Eloy Lafuente (stronk7) 14f82f4eb5 Merge branch 'MDL-68496-master' of git://github.com/andrewnicols/moodle 2021-03-28 23:48:14 +02:00
Eloy Lafuente (stronk7) eceba8b92d Merge branch 'MDL-71131-master' of https://github.com/sammarshallou/moodle 2021-03-28 23:21:33 +02:00
AMOS bot 0502bc3b3c Automatically generated installer lang files 2021-03-28 00:07:46 +00:00
Eloy Lafuente (stronk7) 3ed772f418 Merge branch 'MDL-71099-master' of https://github.com/sammarshallou/moodle 2021-03-27 10:17:43 +01:00
Víctor Déniz 4d0292b3b5 Merge branch 'MDL-70537-master' of https://github.com/sammarshallou/moodle 2021-03-26 20:14:19 +00:00
Dan Marsden 21778d8d16 MDL-32226 mod_quiz: Add Plagiarism hooks to quiz and essay question. 2021-03-27 09:13:41 +13:00
Paul Holden 0c6ea21bac MDL-70142 admin: preserve selected cache definitions in the form.
By not redirecting when we are already on the purge caches page we
can preserve the submitted form data, allowing users to easily
repeat the previous action.
2021-03-26 13:09:33 +00:00
Sara Arjona 7afda52e62 MDL-70722 oauth2: move Nextcloud methods to service class 2021-03-26 09:20:52 +01:00
Sara Arjona fdaa958ff7 MDL-70722 oauth2: move Microsoft methods to service class 2021-03-26 09:20:52 +01:00
Sara Arjona 0b53d70ae9 MDL-70722 oauth2: move Facebook methods to service class 2021-03-26 09:20:52 +01:00
Sara Arjona 5d93de8b67 MDL-70722 core_badges: minor fixes from MDL-70689
In MDL-70689, Eloy and Helen suggested some fixes to improve this patch.
As this is a followup issue to move the pending services, this
very first commit will fix pending things raised in the parent issue.
2021-03-26 09:20:52 +01:00
Shintaro Fujiwara 48bce2cee1 MDL-69304 gradeimport_csv: Validate if the user id is numerical. 2021-03-26 04:45:52 +09:00
Paul Holden 11099c15bb MDL-70962 forms: catch modal exceptions when getting body content.
They are thrown in the following circumstances:

 * The dynamic form class doesn't exist;
 * It does exist but it's `check_access` method throws exception

Co-Authored-By: Andrew Nicols <andrew@nicols.co.uk>
2021-03-25 17:26:36 +00:00
Víctor Déniz 96ef956556 Merge branch 'MDL-71194-master' of git://github.com/NoelDeMartin/moodle 2021-03-25 15:06:48 +00:00
sam marshall efb9654dcb MDL-71131 Admin: Users page incorrectly showing all name fields 2021-03-25 13:49:39 +00:00
sam marshall 5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
Víctor Déniz bd926ec382 Merge branch 'MDL-70842_master_v3' of https://github.com/TomoTsuyuki/moodle 2021-03-25 12:57:18 +00:00
Noel De Martin d5eb99d02f MDL-71194 behat: Fix app tests 2021-03-25 13:53:30 +01:00
Andrew Nicols 2624530b36 Merge branch 'MDL-70318-master' of https://github.com/ilyatregubov/moodle 2021-03-25 12:32:41 +08:00
Andrew Nicols 01266b38c0 Merge branch 'MDL-65776-master' of git://github.com/sarjona/moodle 2021-03-25 11:03:32 +08:00
Andrew Nicols bf49f3ef23 Merge branch 'MDL-70844-master' of git://github.com/peterRd/moodle 2021-03-25 10:22:51 +08:00
Peter Dias dbda380b4e MDL-70844 core: Pass anchors instead of URL for siteadmin tabs. 2021-03-25 09:41:13 +08:00
Andrew Nicols 23543fd552 Merge branch 'MDL-70871-master' of git://github.com/roland04/moodle 2021-03-25 08:10:14 +08:00
AMOS bot 32cdec7d58 Automatically generated installer lang files 2021-03-25 00:07:58 +00:00
Andrew Nicols 78e8d63182 Merge branch 'MDL-70980-master' of git://github.com/ferranrecio/moodle 2021-03-25 08:06:14 +08:00
Brendan Heywood f0aae55b81 MDL-67882 message: Add notification setting changes to config_log 2021-03-25 10:34:48 +11:00
Eloy Lafuente (stronk7) 1d3acd9df0 MDL-71004 git: Ignore moodle-plugin-ci.phar in any directory 2021-03-24 20:10:26 +01:00
Víctor Déniz d65ed58e73 weekly release 4.0dev 2021-03-24 14:20:33 +00:00
Eloy Lafuente (stronk7) 86e2b4c551 Merge branch 'MDL-71182-master-2' of git://github.com/lameze/moodle 2021-03-24 10:48:37 +01:00
Tim Hunt b473b950e4 MDL-70269 ClamAV: make retry the default option on failure 2021-03-24 09:33:27 +00:00
Simey Lameze beff5c6685 MDL-71182 calendar: add logic for category events in get_context
This commit adds the missing logic for category events in
get_context() method. Without this fix, users will get errors
if they have category events with userid set to 0.
2021-03-24 17:31:33 +08:00
Tomo Tsuyuki 9a46c4da29 MDL-70842 mod_assign: Add more cases to add file to archive 2021-03-24 16:00:00 +11:00
Andrew Nicols 1b7ce2dd0d MDL-70802 javascript: Normalise component consistently in templates 2021-03-24 11:18:33 +08:00
Simey Lameze 1fcd850859 MDL-71182 calendar: Revert "Merge branch 'MDL-67494-master' of git://github.com/lameze/moodle"
This reverts commit 9d58d4de46, reversing
changes made to 535c0277de.
2021-03-24 09:11:01 +08:00
Víctor Déniz 3cd0ad32bc Merge branch 'MDL-71022' of git://github.com/paulholden/moodle 2021-03-23 22:49:55 +00:00
Víctor Déniz 15b00d34e2 Merge branch 'MDL-70727-master' of https://github.com/NashTechOpenUniversity/moodle 2021-03-23 16:52:46 +00:00
Charlotte Peachey e10428aa00 MDL-71181 Quiz: Pass grade not displayed on front page 2021-03-23 16:49:58 +00:00
Paul Phillips 00579c7583 MDL-71167 mod_scorm: use full url in redirect 2021-03-23 09:28:14 +00:00
Mikel Martín 8de59fc435 MDL-70871 user: Move 'Show all X' functionality to dynamic_table 2021-03-23 09:55:24 +01:00
Mikel Martín 2471e6ec8d MDL-70871 table: Add 'Show all X' functionality to dynamic_table 2021-03-23 09:55:16 +01:00
Paul Holden 6846ff49f1 MDL-71090 tool_dataprivacy: convert cancellation of requests to ES6. 2021-03-23 08:49:18 +00:00
Paul Holden 4cd11a3f3f MDL-71090 tool_dataprivacy: convert contact DPO to modal forms. 2021-03-23 08:49:18 +00:00
Travis CI b68dc5c492 Merge branch 'MDL-71149' of https://github.com/stronk7/moodle 2021-03-23 15:56:00 +08:00
Travis CI fa7c534032 Merge branch 'MDL-71084-master' of git://github.com/peterRd/moodle 2021-03-23 13:57:13 +08:00
Peter Dias 9ee4dd69a9 MDL-71084 core_navigation: Move secondary_test to proper location with namespace 2021-03-23 13:56:29 +08:00
Peter Dias 0c7c677617 MDL-71084 core_navigation: Provide a header title and active node text 2021-03-23 13:56:29 +08:00
Travis CI d23b1488b3 Merge branch 'MDL-69792-master' of git://github.com/sarjona/moodle 2021-03-23 13:53:01 +08:00
Travis CI e8baa93c44 Merge branch 'MDL-71104-master-2' of git://github.com/mickhawkins/moodle 2021-03-23 13:46:20 +08:00
Michael Hawkins fd302dc842 MDL-71104 core_completion: Fix fetching of grade completion status
We should be able to fetch the grade completion status for modules
that do not have custom completion configured. This also improves
unit testing coverage.
2021-03-23 12:25:22 +08:00
Jun Pataleta 6770a2949a MDL-71104 completion: Fix completion_info::get_data() unit tests
* Fixed inverted $sameuser test data.
* Fixed caching expectation check. Caching only relies on whether the
user accessing the completion data is the same user or not.
* Fixed checking for the caching of other modules. Should have been
checking cm ID and not instance ID.
* Additional test case when whole course parameter is passed as
true, but the requesting user is different from the target user.
2021-03-23 11:53:26 +08:00
Andrew Nicols 9a9bf7f116 Merge branch 'MDL-71039-master' of git://github.com/marinaglancy/moodle 2021-03-23 11:17:44 +08:00
Andrew Nicols 568b179010 Merge branch 'MDL-70313-master' of git://github.com/peterRd/moodle 2021-03-23 09:58:57 +08:00
Andrew Nicols 4cf1006227 Merge branch 'MDL-69036' of git://github.com/paulholden/moodle 2021-03-23 09:51:39 +08:00
Andrew Nicols 3ba4deedcc Merge branch 'MDL-67870-master' of git://github.com/mihailges/moodle 2021-03-23 09:16:28 +08:00
Andrew Nicols cbcf9f6cdf MDL-69256 tests: Fix random slow test failures in completion cron 2021-03-23 08:07:49 +08:00
Dan Marsden 8b1f69ca7b MDL-71174 core: Improve phpdoc for plagiarism_update_status 2021-03-23 10:31:27 +13:00
David Mudrák 22ecf2f9b8 MDL-71169 external: Do not explicitly specify the default methodname 2021-03-22 15:56:46 +01:00
David Mudrák b9fbb752ab MDL-71169 external: Use execute as the default external method name
If the 'methodname' is not explicitly specified in db/services.php,
expect it to be 'execute'.
2021-03-22 15:56:46 +01:00
Jess Ansell 52bc582e77 MDL-71012 setup: Return 500 error code for setup errors. 2021-03-22 14:05:45 +00:00
Mark Nelson a63378bc02 MDL-71170 customfield_text: use correct error string 2021-03-22 21:55:49 +08:00
Sara Arjona 51cdc0e874 MDL-69415 core_h5p: prepend H5P libraries in autoloader
Core and mod_hvp are using the same namespace for some H5P
libraries. This is causing some random errors.
In order to get the expected behaviour in Moodle core, this patch
prepends H5P libraries in order to guarantee they are loaded first.
Plugins using same libraries will need to use a different namespace
if they overlap and a different version of these libraries should
be used.
2021-03-22 12:39:16 +01:00
Ferran Recio b08381b212 MDL-70980 mod_h5pactivity: fix review mode 2021-03-22 10:52:44 +01:00
Thinh Pham 07cbbc9193 MDL-71087 File picker: Focus lost after 'Create folder' 2021-03-22 14:35:44 +07:00
Mihail Geshoski 5cc31c3691 MDL-67870 backup: Skip value change if setting is locked by hierarchy
The given condition in the if statement did not take into account cases
when the setting is locked by hierarchy. Settings which are locked by
hierarchy should should keep their current values which were inherited
from the parent.
2021-03-22 15:32:49 +08:00
Andrew Nicols 32638b3a45 MDL-68496 Grunt: Stylelint should only lint relevant component files
Prior to this change the Grunt stylelint command was too greedy when
determining which files hsould be linted.

This change modifies the watch command to only watch relevant files and
subdirectories of each component directories. This means that unrelated
CSS and SCSS files are no longer watched for changes, and has the added
benefit of significantly increaseing the startup speed of grunt.

Without this patch applied the watch tasks were checking for matches in
the node_modules, and vendor directories.
2021-03-22 15:18:47 +08:00
Andrew Nicols 1cc66e0ac6 Merge branch 'MDL-70816-master-4' of git://github.com/rezaies/moodle 2021-03-22 13:29:09 +08:00
Shamim Rezaie 029d6102ea MDL-70816 mod_choice: activity_dates implementation 2021-03-22 16:15:24 +11:00
Shamim Rezaie dfbf50e18b MDL-70816 core: Activity date details base class
* Base class for fetching an activity module's important date for a user
2021-03-22 16:15:17 +11:00
Andrew Nicols badd97c52b MDL-71159 output: Do not run content prefetch during install 2021-03-22 13:08:58 +08:00
Andrew Nicols 2014163f57 Merge branch 'MDL-71139-master-trademark' of git://github.com/mudrd8mz/moodle 2021-03-22 11:58:31 +08:00
Andrew Nicols b171685d6e Merge branch 'MDL-70919-master' of git://github.com/marinaglancy/moodle 2021-03-22 07:44:26 +08:00
Eloy Lafuente (stronk7) 70acb15cbd MDL-71149 install: update the list of stale files for 3.11 2021-03-19 17:31:07 +01:00
Sara Arjona a5558e1ae5 MDL-65776 libraries: Set moodle files after jsbeautify upgrade 2021-03-19 15:22:36 +01:00
Sara Arjona 84d8da8314 MDL-65776 libraries: Upgrade jsbeautify to 1.13 2021-03-19 15:22:35 +01:00
Sara Arjona 50e9e5b2bd MDL-69792 core_badges: deprecated backpack.js and BADGE_BACKPACKURL
Final deprecation for constant BADGE_BACKPACKURL (it has been removed)
and badges/backpack.js file (it has been removed too).
Besides, some methods have started the deprecation process too:
 - badges_check_backpack_accessibility
 - badges_setup_backpack_js()
 - badges_local_backpack_js()

Apart from that, string 'addbackpack' has been deprecated here
because it's not used anywhere.
2021-03-19 15:13:03 +01:00
Sara Arjona 2c8de780d5 MDL-71116 core_badges: Backpack URLs with more than 50 chars
Backpack URLs (web and API) can have up to 255. However, the form
for creating/editing them, doesn't allow URLs with more than 50
characters. This patch align limitation to DB value (255).
2021-03-19 15:08:12 +01:00
Eloy Lafuente (stronk7) 4c26696e7e weekly release 4.0dev 2021-03-19 14:06:19 +01:00
Eloy Lafuente (stronk7) 6b95768f5f NOBUG: Fixed file access permissions 2021-03-19 14:06:19 +01:00
Eloy Lafuente (stronk7) 49e8125aee Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-03-19 14:06:15 +01:00
Ilya Tregubov 56edf8c799 MDL-70318 core: Moodle customisations. 2021-03-19 10:19:10 +02:00
Ilya Tregubov 3dc634f2ee MDL-70318 core: Upgrade CFPropertyList to 2.0.2. 2021-03-19 10:19:10 +02:00
Andrew Nicols 61fca0e05c MDL-68496 grunt: Restructure grunt tasks into subdirectories
Prior to this change all Grunt features were in a single Gruntfile.js
but this has become difficult to manage and maintain.

This commit moves the existing dependencies for component calculation
and babel moduel definition into a new .grunt directory, and
restructures the existing tasks in Gruntfile.js into separate task
configuration files.

This improves the maintainability of the Grunt build system and allows
for easier future expansion.
2021-03-19 12:56:35 +08:00
sam marshall c89ea6733c MDL-70537 Availability: Avoid recursive calls to $cm->name
These recursive calls didn't work in PHP 7.3 and below, but in PHP
7.4 they also cause a fatal error which means if you have invalid
availability data, the whole page might die.
2021-03-18 15:54:17 +00:00
Marina Glancy c79e72085b MDL-70919 core_form: non-static method can not be called statically 2021-03-18 12:15:49 +01:00
Sujith Haridasan c7a9ce8d08 MDL-70769 libraries: Upgrade mimetex to 1.77 version
Upgrade mimetex to version 1.77. The steps followed
remained the same described in readme_moodle.txt.
This time we have made support for 64 bit architecture.
Hence all the binaries created now work with 64 bit only.
Following are the binaries which are upgraded:
1. Linux
2. Arm(aarch64)
3. Windows(exe)
4. Freebsd
5. Mac(darwin)

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-03-18 16:27:46 +05:30
Sujith Haridasan d7e059aaff MDL-70769 libraries: Upgrading mimetex binaries
Upgrading mimetex binaries to version 1.77

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-03-18 16:18:32 +05:30
Chris Brown 599e08db30 MDL-71139 trademark: Improve the trademark messaging 2021-03-18 10:33:04 +01:00
Jun Pataleta d10edc787c Merge branch 'MDL-70992-master' of https://github.com/NashTechOpenUniversity/moodle 2021-03-18 12:23:48 +08:00
Adrian Greeve 8790de8fcf Merge branch 'MDL-70924' of git://github.com/paulholden/moodle 2021-03-18 11:53:58 +08:00
Jun Pataleta 54cc7804a8 Merge branch 'MDL-70198-master-2' of git://github.com/peterRd/moodle 2021-03-18 11:41:51 +08:00
Adrian Greeve 089afdfceb Merge branch 'MDL-71048' of https://github.com/paulholden/moodle 2021-03-18 11:11:46 +08:00
Adrian Greeve 4496a4e41c Merge branch 'MDL-70977' of git://github.com/paulholden/moodle 2021-03-18 10:49:42 +08:00
Jun Pataleta 8ab5344098 Merge branch 'MDL-70978-master' of git://github.com/aanabit/moodle 2021-03-18 09:55:44 +08:00
Adrian Greeve 0268bd5624 Merge branch 'MDL-71068-protectusername-confirmed' of https://github.com/brendanheywood/moodle 2021-03-18 09:53:44 +08:00
AMOS bot f0e45a8a9d Automatically generated installer lang files 2021-03-18 00:07:48 +00:00
Eloy Lafuente (stronk7) e3a46964dc Merge branch 'MDL-70901-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:40:46 +01:00
Eloy Lafuente (stronk7) ac086dcf23 Merge branch 'MDL-70896-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:34:05 +01:00
Eloy Lafuente (stronk7) 4ee5fb3b5f Merge branch 'MDL-70968-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:29:38 +01:00
Eloy Lafuente (stronk7) cfba0366db Merge branch 'MDL-70893-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:23:26 +01:00
Eloy Lafuente (stronk7) 3edac87e20 Merge branch 'MDL-70689-master' of git://github.com/sarjona/moodle 2021-03-17 23:20:37 +01:00
Jun Pataleta ebf078458d Merge branch 'MDL-71036' of https://github.com/stronk7/moodle 2021-03-17 20:05:25 +08:00
Ilya Tregubov 11956f9fff MDL-70311 theme_boost: upgrade bootstrap to version 4.6.0 2021-03-17 12:26:45 +02:00
Brendan Heywood 7a825b659c MDL-71068 login: Fix edge cases with $CFG->protectusernames 2021-03-17 17:37:29 +11:00
Peter Dias d589352f4f MDL-70198 core_navigation: Secondary nav unit tests 2021-03-17 13:32:54 +08:00
Peter Dias 683e7b2aaf MDL-70198 core_navigation: Implement secondary nav and curate nodes
Implement the new secondary nav and curate the nodes from flatnav and settingsnav
2021-03-17 13:32:53 +08:00
Peter Dias 23bb8a21c1 MDL-70198 core_navigation: Create new base view class 2021-03-17 12:44:13 +08:00
sangnguyen edd37a6c07 MDL-70992 Folder: Unnecessary tab stops to the left of files 2021-03-17 09:30:04 +07:00
Eloy Lafuente (stronk7) c9912e2c0e Merge branch 'MDL-70565' of git://github.com/paulholden/moodle 2021-03-16 22:48:57 +01:00
Eloy Lafuente (stronk7) 44c302a607 Merge branch 'master-MDL-71044_v3' of https://github.com/golenkovm/moodle 2021-03-16 22:38:48 +01:00
Paul Holden 50d3268a6c MDL-71128 mod_quiz: escape question idnumber on display. 2021-03-16 20:27:14 +00:00
Eloy Lafuente (stronk7) f0733b2f41 Merge branch 'MDL-67748-master-managewebservices' of git://github.com/mudrd8mz/moodle 2021-03-16 19:02:10 +01:00
David Mudrák 4a9f864969 MDL-67748 admin: Add Behat tests for tokens filtering features
Credit goes to Andrew for Behat data generators for webservices.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2021-03-16 10:51:39 +01:00
Sara Arjona fe6d780d0d Merge branch 'MDL-44613-integration-master' of git://github.com/mihailges/moodle 2021-03-16 08:26:48 +01:00
Adrian Greeve ab8b390b78 Merge branch 'MDL-69474' of https://github.com/stronk7/moodle 2021-03-16 12:54:21 +08:00
Adrian Greeve c862a09c61 Merge branch 'MDL-70780-master' of git://github.com/andrewnicols/moodle 2021-03-16 10:54:46 +08:00
Mihail Geshoski fcbd1605cb MDL-44613 mod_assign: Fix behat failure in classic
The link to the calendar page is missing in the navigation block in
classic which causes a behat failure in the 'Set availibility dates
for an assignment' feature. The fix includes adding the calendar block
to the Course page which can be used to navigate to the calendar page.
2021-03-16 10:26:09 +08:00
Eloy Lafuente (stronk7) f35e3f09c2 MDL-69474 accessibility: page->url can be not set, protect against that
Both in unit tests, but also in other areas (say blocks, for example)
it's possible that page->url has not been set yet.

So, let's change current code to always check if we have something
(page->url) to compare.

Note the use of has_set_url() is needed, because page->url is magic
method and it doesn't work as expected. Hate magics!
2021-03-16 00:52:28 +01:00
Paul Holden a2b0686773 MDL-71064 media_videojs: enable hotkeys support in player.
Hotkeys were enabled by default, except fullscreen (hotkey "f").
2021-03-15 22:32:35 +00:00
David Mudrák b0fd376db3 MDL-67748 admin: Do not show missing capabilities for mobile app service
We used to display capabilities like "Manage any calendar entries",
"Delete evidence", "Manage competency frameworks", "View hidden courses"
and others as "Missing capabilities" for the mobile app service tokens.

This gave dangerous impression that the app will not work for students
without these capabilities granted. There are known cases of admins who
started to grant all these caps to the Authenticated user role because
they were afraid the app would not work for them.

The problem here is that the official mobile app service includes some
functions that have these capabilities declared as required. But they
are not really required to use the app. Either the app makes its own
clever checks of capabilities before calling the functions, or sometimes
the capabilities are not even correctly declared.

It is safer for everybody to display this information for custom
services only where the risk of the falsely missing caps is lower and
the information is more accurate.

Also, the help text has been improved so it does not suggest that these
capabilities must be always added. We do not know why the service has
them declared. In some cases, a service has capabilities declared just
because it makes use of them in the if-then fashion.

Additionally, the patch also displays the service short name because it
is actually needed to know.
2021-03-15 21:24:06 +01:00
David Mudrák 6ea3588d82 MDL-67748 admin: Show user identity fields on the manage tokens page
On sites with many users, the fullname itself may not be unique
identifier of users. Display the user identity fields below the token
owner's name.
2021-03-15 21:24:06 +01:00
David Mudrák c4ad1bf2f6 MDL-67748 admin: Add filter to the WS tokens management page
The patch adds ability to filter the list of token by the token value,
the user and the service. Also the button to create a new token is made
more prominent and easier to spot.
2021-03-15 21:24:06 +01:00
David Mudrák bcd8692fef MDL-67748 admin: Improve the display of tokens the user cannot see 2021-03-15 21:24:06 +01:00
David Mudrák 2c177ae4c1 MDL-67748 admin: Refactor tokens management as an external page
No need to have a dedicated admin_setting_managewebservicetokens admin
setting subclass, and yet do not use almost any of its features. So the
patch merges the list and the forms handling into a single external
page.

Similarly, it feels like overkill to have a renderer method for a
simple confirmation widget - especially given that the URLs were
hard-coded in it. So that one was dropped.
2021-03-15 21:24:06 +01:00
David Mudrák 596b0bb23e MDL-67748 admin: Improve the display of missing capabilities
The patch improves the display of the missing capabilities on the Manage
tokens page and the Select authorised users page. The list of
capabilities is rendered in a collapsible area and does not occupy too
much space by default.

Additionally on the later page, the patch improves the display of the
list of existing authorised users so that it respects the configured
identity fields.
2021-03-15 21:24:06 +01:00
David Mudrák c07f15d791 MDL-67748 admin: Improve get_missing_capabilities_by_users()
The previous implementation falsely reported all implicit capabilities
inherited from the authenticated user archetype. That caused a lot of
capabilities reported as missing, even if they were correctly granted.

This new implementation uses a different logic. Instead of seeking for
explicitly assigned capabilities, it searches for capabilities that are
not assigned to any of the user's role across the system.

Please refer to the inline documentation. This should be still used for
informative reports only, not for actual permissions evaluation. The
context has been ignored here, as well as all the overrides etc. This
patch just makes it a lesser evil.
2021-03-15 21:24:06 +01:00
David Mudrák 0bcaab32ad MDL-67748 admin: Simplify the webservice token form
We can now use the autocomplete element to select the user. No need to
for the legacy behaviour.
2021-03-15 21:24:05 +01:00
David Mudrák a7f6934297 MDL-67748 admin: Respect the viewfullnames cap at manage tokens table 2021-03-15 21:24:05 +01:00
David Mudrák b389393dc5 MDL-67748 user: Add new core_user/form_user_selector JS module
The module provides AJAX support for the autocomplete form element.
2021-03-15 21:24:05 +01:00
David Mudrák f51d3a81d6 MDL-67748 user: Add a new core_user_search_identity external function
The purpose of this external function is to provide data for
asynchronous user selectors and similar widgets. It allows to search
users matching the given query in their name or other available identity
fields.
2021-03-15 21:24:05 +01:00
David Mudrák 614036d797 MDL-67748 user: Fix @link docs tag usage
Not related to this issue, just spotted while working on it.
2021-03-15 21:21:43 +01:00
David Mudrák db723ad066 MDL-67748 admin: Move the web service token form to its own file 2021-03-15 21:21:43 +01:00
David Mudrák 2bf6db2d5a MDL-67748 admin: Move the web services under the server administration
I suppose the original reasoning was that the web services protocols are
pluggable and that plugins can provide external function. But those are
not good reasons to put the whole Web services section under plugins.
Web services are not a plugin type and they always felt very
counter-intuitive there.

From the server administrtaion perspective, web services are similar to
scheduled tasks and therefore, they should live in the same section.
2021-03-15 21:21:43 +01:00
Paul Holden 58501c742f MDL-65616 message: always notify user after sending contact request. 2021-03-15 18:56:36 +00:00
Eloy Lafuente (stronk7) 695f75373b Merge branch 'MDL-69474-master' of https://github.com/NashTechOpenUniversity/moodle 2021-03-15 16:27:02 +01:00
Sara Arjona 69de0629fa Merge branch 'MDL-44613-master-1' of git://github.com/mihailges/moodle 2021-03-15 15:53:34 +01:00
Eloy Lafuente (stronk7) 49c99fbc54 Merge branch 'MDL-65974-master-iteration03' of git://github.com/ferranrecio/moodle 2021-03-15 14:07:17 +01:00
Paul Holden 763a3c3383 MDL-70977 mod_forum: fix empty equality check updating post content.
Using the external method for updating posts, the check for empty
subject/message content wasn't correct (disallowed the string '0'),
in addition to being impossible to set a posts message format
property to FORMAT_MOODLE (integer 0).
2021-03-15 12:48:51 +00:00
Paul Holden 584f874e50 MDL-70924 course: ensure required fields present when getting courses. 2021-03-15 12:46:27 +00:00
Ferran Recio 875e7314b8 MDL-65974 course: fix return section in modchooser 2021-03-15 13:11:53 +01:00
Jun Pataleta 839abe254c Merge branch 'MDL-66667-cache-course-image-master' of https://github.com/dmitriim/moodle 2021-03-15 17:19:06 +08:00
Adrian Greeve 00cb88c352 Merge branch 'MDL-65974-master-iteration03' of git://github.com/ferranrecio/moodle 2021-03-15 15:16:44 +08:00
Adrian Greeve 1998b411ad Merge branch 'MDL-70306-master' of git://github.com/peterRd/moodle 2021-03-15 11:17:31 +08:00
Peter Dias 809d700ad0 MDL-70306 auth: Update the thirdpartylib.xml 2021-03-15 11:09:30 +08:00
Peter Dias ce863f7ded MDL-70313 core: Update the thirdpartylib.xml 2021-03-15 10:25:28 +08:00
Peter Dias 7e308ac133 MDL-70313 core: Rebuilt module files 2021-03-15 10:25:28 +08:00
Peter Dias fdabce2329 MDL-70313 core: Update codemirror to 5.59.4 2021-03-15 10:25:28 +08:00
Dmitrii Metelkin 2affc87d2b MDL-66667 course: add course image cache 2021-03-15 12:50:35 +11:00
Mihail Geshoski 23f7830bcd MDL-44613 mod_assign: Automate testing of the assignment availability 2021-03-15 08:22:12 +08:00
Mihail Geshoski c14242c807 MDL-44613 tool_behat: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in tool_behat behat tests.
2021-03-15 08:22:12 +08:00
Mihail Geshoski 5c91e63f54 MDL-44613 core_message: Update datetime format usages to strftime
Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in core_message behat tests.
2021-03-15 08:22:12 +08:00
Mihail Geshoski 9fadf911e3 MDL-44613 behat: strftime format in time to timestamp transformation
Modifies the 'string time to timestamp' behat trasformation to use
userdate() instead of date(). The userdate() method is generally used
throught Moodle for constructing formatted date strings and this change
will provide more consistency and prevent any potential behat failures.
Therefore, if the date format is defined in the given trasformation, it
has to be strftime compatible. Example:
'I should see "##tomorrow noon##%A, %d %B %Y, %I:%M %p##"'
2021-03-15 08:22:12 +08:00
AMOS bot dcf55a6ad4 Automatically generated installer lang files 2021-03-13 00:07:49 +00:00
Amaia Anabitarte f2b6911061 MDL-70978 core_contentbank: Increasing contrast for unlisted content 2021-03-12 12:49:07 +01:00
Sara Arjona 4211787141 MDL-70689 oauth2: unit tests for new IMS OBv2.1
Apart from adding new unit tests for covering new IMS OBv2.1 issuer,
some extra tests have been added to test existing issuers and confirm
they are still working as expected after the changes.
2021-03-12 12:31:24 +01:00
Sara Arjona 57d9354505 MDL-70689 oauth2: deprecate unused strings 2021-03-12 12:31:24 +01:00
Sara Arjona 0f59f19d3b MDL-70689 oauth2: self-register IMS OBv2.1 services
IMS OBv2.1 services have a registration endpoint to get client id
and secret.
This patch adds and implements the "register" method for the IMS
Open Badges Connect discovery system, to get the proper client id
and secret values.
2021-03-12 12:31:24 +01:00
Sara Arjona 5066c60206 MDL-70689 oauth2: add support to IMS OBv2.1 service
In order to make easier to create and maintain new OAuth2 services,
a couple of classes have been added:

- discovery\* contains methods related to the discovery system. Until
now, only OpenID Connect was supported by Moodle so all the code was
centralised in api.php.
With this patch, as IMS OBv2.1 has a different discovery system, a new
abstract class (base_definition) has been added to be called and let
every discovery system (OpenID Connect, IMS Badge Connect...)
implement their own methods.

- service\* . Instead of keep adding methods to the api, the service
namespace has been created to store all the standard issuer services.
An interface (issuer_interface) has been created and all the services
should implement it.
This patch creates the "IMS OBv2.1" and "Custom" services and moves
the methods for "Google" service because it uses the OpenID connect
discovery system.
2021-03-12 12:31:22 +01:00
Paul Holden be2862fe6f MDL-70565 user: filter course participants by country. 2021-03-12 09:50:05 +00:00
Eloy Lafuente (stronk7) 713722c3fb MDL-71036 phpunit: Coding style changes, 99% whitespace only
I've gone over a few of the mofified files (those
which were showing warnings and errors to CiBoT. Some of them
have been fixed completely, while others only have fixed
for the lines belonging to this issue (lib/tests/moodlelib_test.php)
for example.
2021-03-11 23:04:32 +01:00
Eloy Lafuente (stronk7) 49975d5879 MDL-71036 phpunit: Add all the noticeable changes to upgrade notes 2021-03-11 23:04:32 +01:00
Eloy Lafuente (stronk7) 9fd6ac7c9d MDL-71036 phpunit: xml config - switch coverage info to new includes
This applies the "whitelist" => "include" changes to all the core
phpunit_coverage_info occurrences, so core won't emit any deprecation
warning (see previous commit).

At the same time, modified a bunch of comments in coverage files
to be more readable/understandable.
2021-03-11 23:04:32 +01:00
Eloy Lafuente (stronk7) a148fd8602 MDL-71036 phpunit: xml config - deprecate whitelist from coverage
Following the changes in the schema, from "whitelists" to "includes",
we are deprecating these two properties from phpunit_coverage_info:

- whitelistfolders => includelistfolders
- whitelistfiles   => includelistfiles

They will continue working over the deprecation period but the init/util
scripts will throw some warnings about them being deprecated for 3.11 and
the way to replace them.

Standard 2y deprecation applies with final removed to happen @ MDL-71067
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7) 83a35142f6 MDL-71036 phpunit: xml config - change dist file to spread them to final
Basically switch to 2-space indenting and small tweaks to comments,
so both the main phpunit.xml file and also the individual components
ones, all them based in the dist one will be consistent.
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7) 682ce8f07a MDL-71036 phpunit: xml config - change generation code to follow xsd
This performs all the changes needed in the util generator to
produce XML files compliant with the new schema (see previous
commit for description of changes).

- All the occurrences in code of filter => coverage.
- All the occurrences in code of whitelist => include.
- Apply all the changes to comply with the new schema.

- Remove processUncoveredFilesFromWhitelist attribute, useless (false
    is its default value, and now have another name).
- Move from 4-spaces indented XML to 2-spaces indented.
- Small linefeed tweaks to generate better-looking XML.
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7) bec0db9223 MDL-71036 phpunit: xml config - add new (9.5) validation xsd
PHPUnit 9 comes with various changes in the XML
configuration file, namely:

  - the old "filter" section has been renamed to "coverage".
  - "whitelist" has been renamed to "include"
  - "exclude" is not a child of "include" anymore, but of "coverage".
  - "include" cannot have configuration attributes anymore, only
    "coverage" can"

Visually it means that the old section (invented example):
```
<filter>
  <whitelist attributes_may_go_here="xx">
    <directory suffix=".php">classes</directory>
    <directory suffix=".php">externallib.php</directory>
    <exclude>
      <directory suffix="_test.php">.</directory>
    </exclude>
  </whitelist>
</filter>
```
Now looks like:
```
<coverage attributes_may_go_here="xx">
  <include>
    <directory suffix=".php">classes</directory>
    <directory suffix=".php">externallib.php</directory>
  </include>
  <exclude>
    <directory suffix="_test.php">.</directory>
  </exclude>
</filter>
```

So, switching to the new xsd so we can validate the remaining changes.
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7) 81407f18ec MDL-71036 phpunit: Mock->setMethods() silently deprecated
The current ->setMethods() has been silently (won't emit any
warning) in PHPUnit 9. And will stop working (current plans)
in PHPUnit 10.

Basically the now deprecated method has been split into:

- onlyMethods(): To point to existing methods in the mocked artifact.
- addMethods(): To point to non existing (yet) methods in the mocked
  artifact.

In practice that means that all our current setMethods() calls can be
converted to onlyMethods() (existing) and done. The addMethods() is
mostly useful on development phases, not final testing.

Finally note that <null> isn't accepted anymore as parameter to
double all the methods. Instead empty array [] must be used.

Link: https://github.com/sebastianbergmann/phpunit/issues/3770
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7) 8a14a7bd22 MDL-71036 phpunit: assertContains() now performs strict comparison
The methods assertContains() and assertNotContains() now perform
strict (type and value) comparison, pretty much like assertSame()
does.

A couple of new assertContainsEquals() and assertNotContainsEquals()
methods have been created to provide old (non-strict) behavior, pretty
much like assertEquals() do.

Apart from replacing the calls needing a relaxed comparison to those
new methods, there are also a couple of alternative, about how to
fix this, depending of every case:

- If the test is making any array_values() conversion, then it's better
  to remove that conversion and use assertArrayHasKey(), that is not
  strict.
- Sometimes if may be also possible to, simply, cast the expectation
  to the exact type coming in the array. I've not applied this technique
  to any of the cases in core.

Link: https://github.com/sebastianbergmann/phpunit/issues/3426
2021-03-11 23:04:31 +01:00
Eloy Lafuente (stronk7) 4a1df0219e MDL-71036 phpunit: ->at() matcher is deprecated
Mocke at() matcher is being deprecated with phpunit9 and
will be removed with phpunit10.

Source: https://github.com/sebastianbergmann/phpunit/issues/4297

Luckily we are using those deprecated matchers only in completionlib
tests, so there aren't many cases to modify. Now, we are using
supported matchers (once, exactly, never...) and the tests have
been reorganised to better represent the expected behavior (how
many times stuff is called, with which params and return values).
2021-03-11 23:04:19 +01:00
Eloy Lafuente (stronk7) be30af0e23 MDL-71036 phpunit: Remove custom autoloader
Custom autoloaders are deprecated with PHPUnit 9 and will be removed
with PHPUnit 10.

Since PHPUnit 8.5 custom autoloaders don't do much because that
version removed the ability to launch unit tests by class name
and that's exactly the reason we had a custom autoloader (to map
class names to files within our tests). See MDL-67673 about
when direct use of classes was deprecated (8.5), now removed (9.5).

So, as far as it's unused, removing it now, test still can be
selectively using any of:

- a relative path to file (although there are some restrictions comming
  with PHPUnit 9, see https://github.com/sebastianbergmann/phpunit/issues/4105
- using --filter, to point to any classname[::method]
- using --testsuite to run a complete suite
- using --config to point to custom components.

Also, commented out the lib/ajax/tests directory because it doesn't
exist / is empty and PHPUnit 9 emits error when a configured test
directory does not exist. See
https://github.com/sebastianbergmann/phpunit/issues/4493.

Alternative was to completely remove the configuration line, but
decided to keep it around in case some day we want to add some
test there.
2021-03-11 19:22:24 +01:00
Eloy Lafuente (stronk7) 8a3663b175 MDL-71036 phpunit: XML load() method has been moved to new loader class
Used by our custom assertTag() and assertNotTag() assertions, that some
day we should deprecate... the loading of XML content for further
processing has been moved to new classes within the PHPUnit utils. We
are just following the move here.
2021-03-11 19:22:24 +01:00
Eloy Lafuente (stronk7) 857f6385a4 MDL-71036 phpunit: Fix param check, must be array
With stricter typed param checks in php73, the 7th param of the
getMockForAbstractClass() must be array, so previous code defaulting
to null now throws a TypeError.
2021-03-11 19:22:24 +01:00
Eloy Lafuente (stronk7) 5f755ac26e MDL-71036 phpunit: Deprecated expectException for notice/warning/error
In PHP 9.1, the use of expectException(PHPUnit\Framework\Error\*) has
been deprecated, that is, when a Notice/Warning/Error/Deprecated
problem is reported. Instead, these new assertions must be used:

- expectDeprecation() for E_DEPRECATED and E_USER_DEPRECATED
- expectNotice() for E_NOTICE, E_USER_NOTICE, and E_STRICT
- expectWarning() for E_WARNING and E_USER_WARNING
- expectError() for everything else

More info:

https://github.com/sebastianbergmann/phpunit/blob/9.0.0/ChangeLog-9.0.md
https://github.com/sebastianbergmann/phpunit/issues/3775

Regexp to find all them:

ag 'expectException.*(Notice|Warning|Error|Deprecated)
2021-03-11 19:22:24 +01:00
Eloy Lafuente (stronk7) ba5b6089d5 MDL-71036 phpunit: Renamed various regexp-related assertions
In PHPUnit 9.1, the following regexp-related assertions
have been deprecated and there are new alternatives for
all them:
    - assertRegExp()     -> assertMatchesRegularExpression()
    - assertNotRegExp()  -> assertDoesNotMatchRegularExpression()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

    ag 'assertRegExp|assertNotRegExp' -li
2021-03-11 19:22:24 +01:00
Eloy Lafuente (stronk7) 309a65a6f7 MDL-71036 phpunit: Renamed various file-related assertions
In PHPUnit 9.1, the following file-related assertions
have been deprecated and there are new alternatives for
all them:
- assertNotIsReadable()         -> assertIsNotReadable()
- assertNotIsWritable()         -> assertIsNotWritable()
- assertDirectoryNotExists()    -> assertDirectoryDoesNotExist()
- assertDirectoryNotIsReadable()-> assertDirectoryIsNotReadable()
- assertDirectoryNotIsWritable()-> assertDirectoryIsNotWritable()
- assertFileNotExists()         -> assertFileDoesNotExist()
- assertFileNotIsReadable()     -> assertFileIsNotReadable()
- assertFileNotIsWritable()     -> assertFileIsNotWritable()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

ag 'assertNotIsReadable|assertNotIsWritable|assertDirectoryNotExists|\
assertDirectoryNotIsReadable|assertDirectoryNotIsWritable|\
assertFileNotExists|assertFileNotIsReadable|assertFileNotIsWritable'
2021-03-11 19:22:23 +01:00
Eloy Lafuente (stronk7) 5fcd5e1cf7 MDL-71036 phpunit: Stricter signature matching 2021-03-11 19:22:23 +01:00
Eloy Lafuente (stronk7) 10c2aa7122 MDL-71036 phpunit: Bump to phpunit 9.5.x 2021-03-11 19:22:23 +01:00
Ferran Recio 8e7dc42440 MDL-65974 course: move format renderers to outputs 2021-03-11 17:36:34 +01:00
Ferran Recio 1c839f9072 MDL-65974 course: move format_base to core_course\course_format 2021-03-11 17:36:34 +01:00
Sara Arjona fc335f5ea0 weekly release 4.0dev 2021-03-11 17:18:40 +01:00
Sara Arjona c51a5056b3 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-03-11 17:18:36 +01:00
Jun Pataleta 8eab098f26 Merge branch 'MDL-70911-master' of git://github.com/sarjona/moodle 2021-03-11 17:41:46 +08:00
hiendinh bc6997a889 MDL-69474 Accessibility: Profile image changes 2021-03-11 16:29:11 +07:00
Sara Arjona 0a0729f48e MDL-70911 core_badges: Add navigation menu in classic
Manage backpacks page wasn't displaying the navigation and administration
menus when using classic theme (it's unrelated to changes done here).
This patch fixes this unexpected behaviour (raised thanks to behat tests).
2021-03-11 09:00:35 +01:00
Adrian Greeve baa906485c Merge branch 'MDL-66025' of git://github.com/paulholden/moodle 2021-03-11 11:46:34 +08:00
Adrian Greeve 98fa5b64bd Merge branch 'MDL-71026-master' of git://github.com/ilyatregubov/moodle 2021-03-11 11:04:23 +08:00
Eloy Lafuente (stronk7) 90db228323 Merge branch 'MDL-70726-master' of https://github.com/NashTechOpenUniversity/moodle 2021-03-11 00:11:15 +01:00
Eloy Lafuente (stronk7) 82b2488305 Merge branch 'MDL-70789' of git://github.com/paulholden/moodle 2021-03-10 23:52:16 +01:00
Eloy Lafuente (stronk7) 9c07520969 Merge branch 'MDL-70891-master' of git://github.com/marinaglancy/moodle 2021-03-10 23:39:44 +01:00
Eloy Lafuente (stronk7) 4f0b58714c Merge branch 'MDL-70967-master' of git://github.com/marinaglancy/moodle 2021-03-10 23:39:25 +01:00
Sara Arjona 2c0038f7f9 Merge branch 'MDL-70287-master-3' of git://github.com/rezaies/moodle 2021-03-10 20:48:44 +01:00
Jun Pataleta fc238f329d MDL-70815 completion: Cast custom data to array
Since cm_info::customdata can be of any type, we need to cast it to an
array first before checking for custom completion rules. Otherwise,
an exception can be thrown (e.g. customdata has been set as an stdClass)
2021-03-10 19:22:15 +01:00
Jun Pataleta 5a7c629f7c Merge branch 'MDL-45242-master' of https://github.com/sammarshallou/moodle 2021-03-10 23:39:30 +08:00
sam marshall 987e55452f MDL-45242 Course: Enrol feature supports custom profile fields 2021-03-10 10:57:11 +00:00
sam marshall e86ead1d91 MDL-45242 Course: Participants list supports custom profile fields 2021-03-10 10:57:11 +00:00
sam marshall dbc09f74e9 MDL-45242 Admin: User list supports custom profile fields 2021-03-10 10:57:11 +00:00
sam marshall 558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Jun Pataleta 644f32784d Merge branch 'MDL-70911-master' of git://github.com/sarjona/moodle 2021-03-10 16:15:43 +08:00
Sara Arjona 49c1d41a60 MDL-70911 core_badges: Remove $CFG->badges_site_backpack
The $CFG->badges_site_backpack setting has been completely removed
because it's not required anymore. From now, the primary site
backpack will be the first one in the "Manage backpacks" list (so,
the one with lower sortorder value).
2021-03-10 09:09:05 +01:00
Sara Arjona 066e998400 MDL-70911 core_badges: Add support to backpacks sortorder
Before removing $CFG->badges_site_backpack setting, admins should be
able to re-order the existing site-backpacks (because then, the first
one will be treated as the default one).
This patch adds the sort order feature to the backpack list.
2021-03-10 08:29:47 +01:00
AMOS bot 11826cc831 Automatically generated installer lang files 2021-03-10 00:07:42 +00:00
Eloy Lafuente (stronk7) 9e1da41763 Merge branch 'MDL-63961-master' of git://github.com/sarjona/moodle 2021-03-10 00:19:31 +01:00
Paul Holden 3294431fd0 MDL-69036 theme_boost: consistent table row hovering for links.
When hovering over table rows with the `dimmed_text` class we
should consistently set the text/link colour.

Co-Authored-By: Mikel Martín <mikel@moodle.com>
2021-03-09 16:22:15 +00:00
Sara Arjona 1fa9fe25dc Merge branch 'MDL-70608-master-langimportasync' of git://github.com/mudrd8mz/moodle 2021-03-09 16:42:52 +01:00
Sara Arjona 489318e327 Merge branch 'MDL-70815-master-6' of git://github.com/junpataleta/moodle 2021-03-09 15:18:28 +01:00
Sara Arjona 471819e5cd Merge branch 'MDL-70855-master' of https://github.com/dmitriim/moodle 2021-03-09 14:56:57 +01:00
Jun Pataleta 8d29653fbc MDL-70815 completion: Test internal_get_state() with custom completion
Use the custom completion implementation for mod_choice to test
completion_info::get_state() to cover the case where the completion
state is being determined from the custom completion condition.
2021-03-09 20:15:28 +08:00
Jun Pataleta 2f0914e55f MDL-70815 mod_choice: Unit tests for the custom completion class 2021-03-09 20:15:28 +08:00
Jun Pataleta 4b2d9ef76d MDL-70815 mod_choice: Custom completion implementation 2021-03-09 20:15:28 +08:00
Jun Pataleta 32721b3511 MDL-70815 core_completion: Update completion_info
* Update completion_info::get_data() to add other completion
information from a new method called get_other_cm_completion_data().
This allows the storage of the completion statuses of the following
completion rules to completion_info objects:
  - 'Students must receive a grade' completion rule.
  - Any custom completion rule defined by an activity.
This allows detailed completion information to be fetched for course
modules.
It also allows custom completion statuses to be cached which will help
reduce DB queries when fetching completion statuses.
* Update update_state() to fetch overall completion state from the
module's activity_custom_completion implementation. Falls back to the
*_get_completion_state() callback function.
* Update internal_set_data() to include the other cm completion data
in the updated cache data for the module instance.
2021-03-09 20:15:28 +08:00
Jun Pataleta 18ef213da5 MDL-70815 core_completion: completion_info::get_grade_completion()
Move the current logic for determining the completion status for the
"Student must receive grade" completion rule to a function so it cann
be reused.
Unit test included.
2021-03-09 20:15:28 +08:00
Jun Pataleta 236033151d MDL-70815 core_completion: Fix unit tests
* Unit tests for completion_info::get_data() and
completion_info::internal_get_state are mocked which causes failures
with the new implementation. It's more straightforward and realistic
to generate real course and modules to test these methods.
2021-03-09 20:15:24 +08:00
Jun Pataleta 14234bf240 MDL-70815 core_completion: Unit tests for activity_custom_completion
Tests cover
 - get_overall_completion_state()
 - is_available()
 - validate_rule()
Tests don't cover
 - methods that rely on static methods such as:
   - is_defined()
 - static methods in the class because they can't be mocked
 - abstract methods that can be tested better by the plugins
   that extend activity_custom_completion such as:
   - get_state()
   - get_defined_custom_rules()
   - get_custom_rule_descriptions()
2021-03-09 19:27:46 +08:00
Jun Pataleta beb0dd74f2 MDL-70815 core_completion: Activity custom completion details base class
* Base class for defining an activity module's custom completion details
2021-03-09 19:27:41 +08:00
Andrew Nicols ad71486df0 MDL-70780 customfield: Rewrite management JS as ES6 2021-03-09 07:56:04 +08:00
Andrew Nicols 6cbc86973e MDL-70780 customfield: Address random behat fails
A number of behat fails have been creeping in with the customfield code
as behat is moving onto the next step before the current step finishes.

This change introduces some additional pending JS tracking to prevent
this.
2021-03-09 07:52:24 +08:00
Sara Arjona 323b3ca3a4 Merge branch 'MDL-70766-auth-config-log' of https://github.com/brendanheywood/moodle 2021-03-08 11:39:13 +01:00
sam marshall 3f003455f3 MDL-45242 Lib: Replace direct references to ->showuseridentity 2021-03-08 09:20:18 +00:00
sam marshall 60a1b159aa MDL-45242 Lib: Deprecate field-related library functions 2021-03-08 09:20:18 +00:00
sam marshall 677e1c6248 MDL-45242 Lib: Allow custom profile fields in showuseridentity 2021-03-08 09:20:18 +00:00
sam marshall 9ddb51b07e MDL-45242 Testing: Generators for user profile fields 2021-03-08 09:20:17 +00:00
sam marshall e18b37c61d MDL-45242 Admin: Added lazy-loading callback to multicheckbox
Currently admin_setting_configselect has lazy-loading support via a
callback function (so you don't have to make pointless single-use
classes for each unusual setting), but this is not present in other
similar types.

This commit adds identical support to
admin_setting_configmulticheckbox.
2021-03-08 09:20:17 +00:00
Sara Arjona a306fd7a18 MDL-70911 core_badges: Move "External backpack" to badges settings
Setting "External backpack connection" has been moved from "Backpack
settings" to "Badges settings" in order to make easier to find and
configure it.
Some extra tests have been added to cover existing behaviour and
confirm is still working as expected.
2021-03-08 09:24:53 +01:00
Mikhail Golenkov e9eb3ad6c5 MDL-71044 backup: backup_cleanup_task task to remove old files 2021-03-07 21:46:47 +11:00
AMOS bot a654567b9c Automatically generated installer lang files 2021-03-07 00:07:46 +00:00
AMOS bot 7c75f9d2e5 Automatically generated installer lang files 2021-03-06 00:07:51 +00:00
Sara Arjona 96b49ddc97 weekly release 4.0dev 2021-03-05 16:01:32 +01:00
Sara Arjona 05c3663ff0 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-03-05 16:01:30 +01:00
Amaia Anabitarte d0bea8aa5e MDL-70726 behat: Fixing existing fail tests
Some of the current behat tests were wrong but not failing because of the bug in 'should not exist' step.
Once the bug is fixed, we must fix also wrong behats.
2021-03-05 14:19:55 +07:00
Ilya Tregubov da0fe0df66 MDL-69680 lib: Fix behat test backup_and_restore.feature 2021-03-04 22:50:58 +01:00
Paul Holden c21b4b7ff5 MDL-71048 lang: fix null equality check of lang string args. 2021-03-04 17:59:54 +00:00
Marina Glancy 960bb02482 MDL-71039 core_form: support valuehtmlcallback in autocomplete inline 2021-03-04 13:39:05 +01:00
Brendan Heywood 5e1e3b33a1 MDL-71007 grade_report: Add course idnumber to grade report api
The gradereport_user_get_grade_items now includes the idnumber
2021-03-04 16:19:56 +11:00
Thinh Pham d84a9eec2f MDL-70727 Behat: function scrollIntoView not working in the app 2021-03-04 11:53:17 +07:00
Ilya Tregubov eaf40e050e MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:48:26 +08:00
Ilya Tregubov ec47946ea9 MDL-69680 lib: Update jQuery version in Moodle files 2021-03-04 12:48:26 +08:00
Ilya Tregubov d00e53dd31 MDL-69680 lib: Upgrade jQuery lib to 3.5.1 2021-03-04 12:48:26 +08:00
Eloy Lafuente (stronk7) 8cf7878e18 Merge branch 'MDL-70424-auth-avoid-changes' of https://github.com/brendanheywood/moodle 2021-03-04 00:27:53 +01:00
Ilya Tregubov a303eb9e9e MDL-70767 feedback: Prevent xss in feedback answer text. 2021-03-03 23:08:22 +01:00
Sara Arjona 40720df008 Merge branch 'MDL-68721-master' of git://github.com/ferranrecio/moodle 2021-03-03 17:51:16 +01:00
Ferran Recio fe3ee4a066 MDL-68721 mod_h5pactivity: report acceptance tests 2021-03-03 17:21:56 +01:00
Paul Holden 1d66efeda5 MDL-65552 block_activity_results: correct Behat tests for idnumbers.
Teachers can see user idnumber fields only when they are configured
identity fields. Students cannot.
2021-03-03 23:15:07 +08:00
Marina Glancy 9cfacff738 MDL-65552 user: escape idnumber and email in table_sql 2021-03-03 23:15:07 +08:00
Paul Holden a7e0ba1e71 MDL-65552 user: escape idnumber field on output.
This commit also corrects parameter definition of the field to
match core_user.
2021-03-03 23:15:07 +08:00
Sara Arjona 01959703ba Merge branch 'MDL-70125_master-3' of git://github.com/mdjnelson/moodle 2021-03-03 15:47:16 +01:00
Sara Arjona 1285a8d868 Merge branch 'MDL-70921-master' of git://github.com/marinaglancy/moodle 2021-03-03 15:24:44 +01:00
Sara Arjona 9d58d4de46 Merge branch 'MDL-67494-master' of git://github.com/lameze/moodle 2021-03-03 11:45:28 +01:00
Sara Arjona 535c0277de Merge branch 'MDL-67119-master' of git://github.com/aanabit/moodle 2021-03-03 11:11:29 +01:00
Ilya Tregubov 2deaee321e MDL-71026 user: Fix incorrect get_string call. 2021-03-03 11:43:45 +02:00
Jun Pataleta 572ec82454 Merge branch 'MDL-70987-master' of git://github.com/andrewnicols/moodle 2021-03-03 16:42:18 +08:00
Sara Arjona 187801ccf5 Merge branch 'MDL-70966-master' of git://github.com/marinaglancy/moodle 2021-03-03 09:30:41 +01:00
Jun Pataleta 44001630d8 Merge branch 'MDL-71009' of https://github.com/timhunt/moodle 2021-03-03 16:22:50 +08:00
Sara Arjona 97786378be Merge branch 'MDL-69097-master' of https://github.com/inigozendegi/moodle 2021-03-03 09:06:45 +01:00
Simey Lameze 633a822f88 MDL-67494 calendar: user_delete_user should delete all user events 2021-03-03 16:06:32 +08:00
Simey Lameze 538b6d3c90 MDL-67494 calendar: privacy provider should not delete shared events 2021-03-03 16:06:32 +08:00
Simey Lameze b7b0b246bc MDL-67494 calendar: shared subscriptions should not set userid to 0 2021-03-03 16:06:32 +08:00
Simey Lameze ac0a0bad63 MDL-67494 calendar: only user overrides should retain userid 2021-03-03 16:06:32 +08:00
Simey Lameze 2dd31504b9 MDL-67494 calendar: set userid to zero for shared events 2021-03-03 16:06:32 +08:00
Simey Lameze ba04a79ac6 MDL-67494 calendar: step to set userid 0 to all shared events 2021-03-03 16:06:32 +08:00
Simey Lameze a3e2601675 MDL-67494 calendar: add logic for category events in get_context 2021-03-03 16:06:32 +08:00
Jun Pataleta 2ad776694a Merge branch 'MDL-70995' of https://github.com/paulholden/moodle 2021-03-03 15:05:36 +08:00
Jun Pataleta 9419124654 Merge branch 'MDL-69883' of https://github.com/paulholden/moodle 2021-03-03 14:35:06 +08:00
Andrew Nicols 3cda34adf2 Merge branch 'MDL-70268-master-2' of git://github.com/peterRd/moodle 2021-03-03 12:23:04 +08:00
Peter Dias 63cb8999ce MDL-70268 core: Update the oauthlib to exclude scope if none provided 2021-03-03 12:03:40 +08:00
AMOS bot 291e942a49 Automatically generated installer lang files 2021-03-03 00:07:43 +00:00
Paul Holden a251c260c4 MDL-70822 enrol: respect capability to view other users profile.
When retrieving courses of another user via web services, we should
respect the capability to view that users profile in a given course.
2021-03-02 23:44:24 +01:00
Sander Wind c9855a8b20 MDL-70668 auth: Fix secret validation during user confirmation
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2021-03-02 23:44:24 +01:00
Eloy Lafuente (stronk7) 5b45f13073 Merge branch 'MDL-70340-master' of git://github.com/jleyva/moodle 2021-03-02 23:32:30 +01:00
Víctor Déniz 65957d8109 Merge branch 'MDL-70676-master' of git://github.com/ilyatregubov/moodle
Fixed mod/workshop/db/upgrade.php: \xmldb_field::getNotNull()
does not verify if the column is nullable in the database.
2021-03-02 18:29:19 +00:00
Peter Dias 36e529a889 MDL-59293 block_onlineusers: Update behat tests 2021-03-02 15:51:31 +00:00
Peter Dias 33d6017287 MDL-59293 block_onlineusers: Check whether current user can view online users
- Removed block from site admin.
- Blocked guest from viewuserlist cap
2021-03-02 15:51:31 +00:00
Ilya Tregubov 0420ec757a MDL-70676 workshop: Allow empty grades. 2021-03-02 13:41:52 +02:00
Sara Arjona 5db1ed89b9 Merge branch 'MDL-67515-master' of git://github.com/vmdef/moodle 2021-03-02 11:21:17 +01:00
Jun Pataleta e86504fbcf Merge branch 'MDL-70457' of https://github.com/stronk7/moodle 2021-03-02 17:39:36 +08:00
Víctor Déniz b1bbfbbbdb Merge branch 'MDL-70172-master' of git://github.com/rezaies/moodle 2021-03-02 09:16:41 +00:00
Paul Holden c199eef7d7 MDL-71022 gradereport_history: prevent double escaping of users.
The user identity fields are already escaped by the AJAX endpoint
that returns them, we don't need to do it again at the client.
2021-03-02 09:12:25 +00:00
Víctor Déniz bb4da690cf MDL-67515 tool_customlang: Ignore invalid component strings
After uninstalling a plugin, the translated strings remain in
tool_customlang table, throwing an exception when trying to localise
any strings. Currently there is no mechanism to
clean up customlang tables and files during the uninstall process,
so with this patch the invalid components will be ignored.
2021-03-02 09:07:38 +00:00
Sara Arjona b64ee9ecf3 Merge branch 'MDL-70877' of https://github.com/stronk7/moodle 2021-03-02 09:29:17 +01:00
Jun Pataleta 2b113fd93c Merge branch 'MDL-70876' of https://github.com/stronk7/moodle 2021-03-02 16:02:52 +08:00
AMOS bot 39e2552088 Automatically generated installer lang files 2021-03-02 00:07:42 +00:00
Eloy Lafuente (stronk7) bf2b1b18b5 Merge branch 'MDL-70898-master' of git://github.com/marinaglancy/moodle 2021-03-01 22:50:33 +01:00
Eloy Lafuente (stronk7) 476a0ad905 Merge branch 'MDL-67974-master' of git://github.com/sarjona/moodle 2021-03-01 22:33:17 +01:00
Eloy Lafuente (stronk7) 932e2a5478 Merge branch 'MDL-70916' of https://github.com/timhunt/moodle 2021-03-01 21:58:45 +01:00
Eloy Lafuente (stronk7) ece2fe5da1 Merge branch 'MDL-70899-master' of git://github.com/marinaglancy/moodle 2021-03-01 20:20:46 +01:00
Shamim Rezaie 612a1741f6 MDL-70172 output: pages with main logo should have a first-level header 2021-03-02 05:35:14 +11:00
Shamim Rezaie 2896cb83cc MDL-70172 output: Fix empty links
The approach taken is inline with font-awesome documentation:
https://fontawesome.com/how-to-use/on-the-web/other-topics/accessibility
2021-03-02 05:19:36 +11:00
Eloy Lafuente (stronk7) e635eed2ed Merge branch 'MDL-70912-master' of git://github.com/sarjona/moodle 2021-03-01 16:47:28 +01:00
Sara Arjona f5bee1b704 Merge branch 'MDL-68735' of https://github.com/stronk7/moodle 2021-03-01 16:17:19 +01:00
Eloy Lafuente (stronk7) 76e5b1b59d Merge branch 'MDL-70913-master' of git://github.com/sarjona/moodle 2021-03-01 14:21:59 +01:00
Sara Arjona 9e5655b7c7 MDL-70913 core_badges: Use and update properly sortorder
Sortorder field in badge_external_backpack was updated with a wrong
value. This patch fixes this behaviour and adds sortorder as
sorting criteria for displaying the list of site backpacks.

In the phpunit method reviewed for covering this, a couple of
assertEquals() calls have been changed too to put the expected value
first.
2021-03-01 13:04:00 +01:00
Thong Bui 6abb07712e MDL-70726 behat: should_not_exist function does not work correctly 2021-03-01 17:55:05 +07:00
Eloy Lafuente (stronk7) b7d3e56d7e Merge branch 'MDL-70931-master-xmldbeol' of git://github.com/mudrd8mz/moodle 2021-03-01 10:00:27 +01:00
Eloy Lafuente (stronk7) bd2efca873 Merge branch 'MDL-70941-master' of git://github.com/dravek/moodle 2021-03-01 09:54:00 +01:00
Eloy Lafuente (stronk7) 537905a773 Merge branch 'MDL-70910-master' of git://github.com/dravek/moodle 2021-03-01 09:46:27 +01:00
Eloy Lafuente (stronk7) ac9b920981 Merge branch 'MDL-70964-master-enfix' of git://github.com/mudrd8mz/moodle 2021-03-01 09:33:49 +01:00
Dmitrii Metelkin e99e0bb557 MDL-70855 course: add extra callback for extending course module form 2021-03-01 13:33:52 +11:00
AMOS bot b380c403a4 Automatically generated installer lang files 2021-03-01 00:07:45 +00:00
Marina Glancy 593540cc19 MDL-70968 core: PHP8 compatibility, not allowed to pass extra parameters 2021-02-28 19:43:37 +01:00
Marina Glancy 612c230709 MDL-70966 various: Under PHP8 empty string is no longer equals to 0 2021-02-28 19:16:09 +01:00
AMOS bot d25ccbc1bd Automatically generated installer lang files 2021-02-28 00:07:41 +00:00
AMOS bot 0300ab41f6 Automatically generated installer lang files 2021-02-27 00:07:50 +00:00
David Matamoros 05e4c75ca5 MDL-70910 contentbank: fix for using contentid not validated 2021-02-26 14:36:39 +01:00
Tim Hunt 9216860b88 MDL-71009 question bank: escape idnumbers when displayed 2021-02-26 12:46:32 +00:00
Eloy Lafuente (stronk7) 08ae245926 MDL-70876 php80: 5th param removed from custom error handlers
It was deprecated in php72 and now it's gone.

Have used this regexp to find all the uses in core:

ag set_error_handler | uniq

And then checked all them manually, that parameter was not
being used in the 3 methods where we are removing it.
2021-02-26 13:08:27 +01:00
Eloy Lafuente (stronk7) 0dea9a80c8 MDL-68735 env: Moodle 3.8.x, 3.9.x and 3.10.x do not support PHP 8.0 2021-02-26 13:07:59 +01:00
Marina Glancy a7553de7ad MDL-70877 php: remove final functions __clone and __wakeup
Implementing these functions as final does not prevent the object to be
cloned or serialized, so the comment to them was wrong.
However having these functions not public breaks in PHP 8.0.
It still does not make sense to clone or serialise file_system or external_settings classes
but there are a lot of classes in moodle that should not be cloned, no reason to have
a specific solution here.
2021-02-26 13:07:52 +01:00
Eloy Lafuente (stronk7) 599567977f MDL-70457 forms: php74 fix for the (not used in core) date element
Curly brackets to access by index to strings or arrays is
deprecated since php74.
2021-02-26 11:55:24 +01:00
Amaia Anabitarte 3feafb1a4c MDL-67119 core_analytics: Analyse users once per course
User's activity in a course should be analysed only once
no matter the number of enrolments the user has in that course.
2021-02-26 11:50:16 +01:00
David Matamoros 9b8c45e0d6 MDL-70941 contentbank: fix empty equality check when renaming content 2021-02-26 11:50:09 +01:00
Jun Pataleta 95dd305cc6 weekly release 4.0dev 2021-02-26 13:42:40 +08:00
Jun Pataleta b80b050624 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-02-26 13:42:36 +08:00
Marina Glancy 465d1ef495 MDL-70921 repository: filter function can not accept argument by ref
PHP8.0 shows error that filter function accepts value by reference
The nested filtering was never working but also this function was never called on a tree with sub-levels,
so this logic is now removed
2021-02-25 18:24:52 +01:00
David Mudrák 0c9eaeff59 MDL-70964 lang: Use the fixed strings in tests 2021-02-25 16:20:58 +01:00
Helen Foster 422e70e308 MDL-70964 lang: Import fixed English strings (en_fix) 2021-02-25 16:18:57 +01:00
Jun Pataleta 2024a32283 Merge branch 'MDL-70169-master' of git://github.com/lameze/moodle 2021-02-25 12:30:22 +08:00
Jun Pataleta e85b1f9c0f Merge branch 'MDL-70768-langpack-admin' of https://github.com/brendanheywood/moodle 2021-02-25 11:32:36 +08:00
AMOS bot d6536d6fc1 Automatically generated installer lang files 2021-02-25 00:07:45 +00:00
Paul Holden 7aa234db32 MDL-69883 message: fix lazy loading of conversations.
Set max-height on each container section rather than the container
itself, so that each can respond to the scrollBottom event within
the lazy loading module (which handles the overflow itself).
2021-02-24 22:01:03 +00:00
Paul Holden 73bffed8f6 MDL-70995 user: format group names in course participants filter. 2021-02-24 19:22:21 +00:00
Iñigo Zendegi df9eefacef MDL-69097 mod_forum: Apply filters to whole forum grading 2021-02-24 17:08:34 +01:00
Víctor Déniz f86591b516 Merge branch 'MDL-51111-muc-reset' of https://github.com/brendanheywood/moodle 2021-02-24 14:07:33 +00:00
Shamim Rezaie 9317849257 MDL-70287 core_payment: Redirect user to the successurl after payment 2021-02-24 22:44:10 +11:00
Shamim Rezaie 51b73e431e MDL-70287 core_payment: Add get_success_url to service_provider 2021-02-24 22:44:10 +11:00
Shamim Rezaie 03b9d60b8e MDL-70287 core_payment: Improving existing and missing phpdocs 2021-02-24 22:42:03 +11:00
Eloy Lafuente (stronk7) aa1c493a2a Merge branch 'MDL-70828-master' of git://github.com/abgreeve/moodle 2021-02-24 11:14:25 +01:00
Adrian Greeve cb69d6389c MDL-70828 performance: Allow session locking issue to be turned off.
If a developer has debugging on then they will recieve all debugging
messages for locking whether wanted or not. We already have a setting
to display these messages.
2021-02-24 11:26:08 +08:00
Andrew Nicols 972e6ffe47 MDL-70987 core_form: Use correct id for elementid during validation
The id of the formid was being passed instead of the elementid.
2021-02-24 09:05:38 +08:00
Eloy Lafuente (stronk7) 6cf59943ca Merge branch 'MDL-52817' of git://github.com/paulholden/moodle 2021-02-23 19:07:56 +01:00
Eloy Lafuente (stronk7) 90f1c55191 MDL-70314 lib: Remove a few more hidden files and add instructions 2021-02-23 18:40:29 +01:00
Eloy Lafuente (stronk7) e5c163a48b Merge branch 'MDL-70314' of https://github.com/Chocolate-lightning/moodle 2021-02-23 18:33:29 +01:00
Eloy Lafuente (stronk7) a3bd2b3357 Merge branch 'MDL-70920-master' of git://github.com/marinaglancy/moodle 2021-02-23 17:43:32 +01:00
Sara Arjona 2ccd242538 MDL-67974 core_badges: Recovered expired stamp
Expired stamp icon displayed over the badge images has been added
again to CSS (it was lost at any point).
2021-02-23 15:26:25 +01:00
Sara Arjona 5b4204a584 MDL-67974 core_badges: Badge expiry date when hover
Text displayed for expired badges when the user hovers over the
warning (!) icon has been fixed in the "Issued badge information"
page.
2021-02-23 15:23:56 +01:00
Víctor Déniz 534eae88d7 Merge branch 'MDL-70038-master' of https://github.com/jpahullo/moodle 2021-02-23 11:14:14 +00:00
Jordi Pujol Ahulló 96557076a2 MDL-70038 assign: add suport for pdftoppm tool
pdftoppm (from poppler-utils package) is several orders of
magnitude quicker than ghostscript extracting PNG images
from PDF documents.

We add support for this tool and use it whenever set up,
or using gs as before if missing.

Revisited code with peer review comments. In particular:

1. Make default path for pdftoppm empty string.
2. Fix a typo on the method description for get_gs_command_for_image.
3. Added more information why is useful pdftoppm into string pathtopdftoppm_help.
4. Check that path for pdftoppm is executable to prevent errors. Otherwise, use gs.
2021-02-23 08:07:20 +01:00
Brendan Heywood 300213ee2e MDL-70424 auth: Avoid random changes to $CFG->auth 2021-02-23 11:40:57 +11:00
Eloy Lafuente (stronk7) c79778bf9f Merge branch 'MDL-43697-master' of https://github.com/praxisdigital/moodle 2021-02-22 23:09:53 +01:00
Marina Glancy ef99a587d3 MDL-70967 enrol_meta: fix error in unittest 2021-02-22 18:04:14 +01:00
Marina Glancy b88f1a84bf MDL-70901 core: @ no longer masks errors in PHP 8.0 2021-02-22 16:18:46 +01:00
Marina Glancy 2d059d1657 MDL-70901 cache: @ no longer masks errors in unlink in php 8 2021-02-22 16:17:49 +01:00
Marina Glancy a1a72f720e MDL-70901 core_files: @ does no mask errors in php8 anymore 2021-02-22 16:17:49 +01:00
Marina Glancy 3e076d8cff MDL-70901 backup: check handle before calling fclose()
@fclose no longer catches error in PHP 8.0 when handle is null
2021-02-22 16:17:49 +01:00
Sara Arjona 49c5b85eba MDL-63961 core_badges: Use high-resolution image
High-resolution image for a badge (f3) should be sent to external
backpacks through JSON and WS methods.
Besides, when a badge is cloned, the high-resolution image should be
used to avoid the copied looks blurry.
2021-02-22 12:43:06 +01:00
Mark Nelson 1b7236cbd5 MDL-70125 core_grade: do not change overridden status during regrading 2021-02-22 17:23:51 +08:00
Mathew May 9bd5c31d11 MDL-70314 lib: Change XLSX wrapper to no change the default styles
This is required due to changes in the base library see #1712
Summary is that if a column already has styling it can't be overpowered.
2021-02-22 15:32:09 +08:00
Mathew May d41210cf0f MDL-70314 lib: Apply Moodle specific phpspreadsheet changes 2021-02-22 15:28:40 +08:00
Mathew May 1ee8dd7f6f MDL-70314 lib: Upgrade PhpSpreadsheet to 1.16.0 2021-02-22 15:28:40 +08:00
Andrew Nicols cffeb4b797 MDL-69259 h5pactivity: Whitespace fix 2021-02-22 12:19:18 +08:00
Andrew Nicols 6b23a271b8 Merge branch 'MDL-69259-master' of git://github.com/ilyatregubov/moodle 2021-02-22 12:06:13 +08:00
AMOS bot 23c2130505 Automatically generated installer lang files 2021-02-22 00:07:44 +00:00
Andrew Nicols 175964fbf9 Merge branch 'MDL-70879' of https://github.com/stronk7/moodle 2021-02-22 07:49:54 +08:00
Marina Glancy f4fb91aecb MDL-70920 core: prevent calls to call_user_fun_array() with assoc array 2021-02-21 22:22:21 +01:00
Marina Glancy 7b003c04a8 MDL-70920 backup: call_user_func_array can accept named arguments
Because arguments names do not match in associative array, we change it to regular array or arguments
2021-02-21 22:19:52 +01:00
Marina Glancy 9e89652461 MDL-70891 core: fix the lang_string::__set_state()
The function must be static and actually has to do what it is supposed to. It also breaks PHP 8.0
2021-02-21 22:07:18 +01:00
Paul Holden b2d19cc29f MDL-52817 dml: implement driver methods for SQL group concatenation. 2021-02-19 15:31:00 +00:00
David Mudrák af9ad8b2b6 MDL-70608 lang: Recommend running the scheduled task to update packs 2021-02-19 16:02:02 +01:00
David Mudrák c85215e955 MDL-70608 lang: Install langpacks asynchronously via ad hoc task
When multiple language packs are selected for installation, perform the
installation asynchronously in the background via ad hoc task.
2021-02-19 16:02:02 +01:00
Daniel Kristian Steffensen 50b313fc56 MDL-43697 backup: Archived badges are restored during course restore 2021-02-19 15:47:39 +01:00
Ilya Tregubov 82433c0b6a MDL-69259 h5pactivity: Add get_user_attempts webservice 2021-02-19 16:07:51 +02:00
Eloy Lafuente (stronk7) d0def28ed5 MDL-70879 behat: Bump to Behat 3.8.x (required for php80) 2021-02-19 14:49:11 +01:00
Víctor Déniz a93828a188 weekly release 4.0dev 2021-02-19 12:38:56 +00:00
Víctor Déniz 5e59112d0a NOBUG: Fixed file access permissions 2021-02-19 12:38:56 +00:00
Víctor Déniz f2a83a15e7 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-02-19 12:38:51 +00:00
Jake Dallimore 525b17bc27 Merge branch 'MDL-64554-master-fix2' of git://github.com/andrewnicols/moodle 2021-02-19 11:53:18 +08:00
Andrew Nicols a84a55bd45 MDL-64554 user: Fix use of Private files page on classic
The "Private files" link does not exist in the site navigation when
using the classic theme, so it is not possible to test the dedicated
page via Behat at this time.
2021-02-19 09:33:06 +08:00
AMOS bot f046dfd6c4 Automatically generated installer lang files 2021-02-19 00:07:57 +00:00
Marina Glancy 1e03a240b5 MDL-64554 form: reset form change checker before triggering submit event 2021-02-18 13:04:14 +01:00
Jun Pataleta 28dadc2fb9 Merge branch 'MDL-47410-master' of git://github.com/andrewnicols/moodle 2021-02-18 11:21:23 +08:00
Andrew Nicols 7d5b808e3e Merge branch 'MDL-64554-master' of git://github.com/andrewnicols/moodle 2021-02-18 11:16:40 +08:00
Andrew Nicols 79731372c3 MDL-64554 core_form: Rename class for dynamic form 2021-02-18 11:16:21 +08:00
Andrew Nicols d7d7fa8385 Merge branch 'MDL-70880' of git://github.com/paulholden/moodle 2021-02-18 10:47:05 +08:00
Andrew Nicols d6e50d14d2 Merge branch 'MDL-64554-master' of git://github.com/andrewnicols/moodle 2021-02-18 10:21:55 +08:00
Andrew Nicols ab70110a74 MDL-64554 core_form: CI fixes 2021-02-18 10:10:08 +08:00
Andrew Nicols 708ae8aa0f MDL-47410 behat: Perform exact match for date_time selectors 2021-02-18 09:34:45 +08:00
Víctor Déniz 4e26c93473 Merge branch 'MDL-70536-reset-page-cli' of https://github.com/brendanheywood/moodle 2021-02-18 00:31:39 +00:00
David Mudrák 70b0df5891 MDL-70931 xmldb: Generate install.xml files with EOL and EOF
As discussed in MDLSITE-6397, all Moodle code files should end with
single Unix-style end of line character. Files created and edited
through the XMLDB editor should follow this rule, too.
2021-02-17 20:59:19 +01:00
Marina Glancy 3045005295 MDL-64554 core_form: Move strings to outputrequirements.lib 2021-02-17 18:07:01 +01:00
Marina Glancy 440073ff20 MDL-64554 user: make private files editor modal/ajax form 2021-02-17 18:06:57 +01:00
Marina Glancy aa33a22733 MDL-64554 core_customfield: use modal forms for fields 2021-02-17 18:06:53 +01:00
Marina Glancy 72be49c473 MDL-64554 core_form: new API for modal forms 2021-02-17 18:06:49 +01:00
Víctor Déniz 8a4ce781b9 Merge branch 'master-MDL-70752' of https://github.com/golenkovm/moodle 2021-02-17 16:56:48 +00:00
Tim Hunt 1d552eca6c MDL-70916 Essay/Moodle XML: min and max word limits not imported 2021-02-17 11:32:05 +00:00
Eloy Lafuente (stronk7) a72ea10b84 Merge branch 'MDL-70552-master' of git://github.com/ilyatregubov/moodle 2021-02-17 10:26:20 +01:00
Ilya Tregubov 729688b379 MDL-70552 core_message: Show popup for teachers when anonymous
user completed feedback.
2021-02-17 08:42:52 +02:00
Andrew Nicols 243262d940 MDL-68853 mod_h5pactivity: Whitespace fix 2021-02-17 12:02:53 +08:00
Andrew Nicols 57e233e742 Merge branch 'MDL-68853-master' of git://github.com/ilyatregubov/moodle 2021-02-17 11:47:27 +08:00
Andrew Nicols ab024ac209 Merge branch 'MDL-47410-master' of git://github.com/mihailges/moodle 2021-02-17 09:34:22 +08:00
AMOS bot 6783c31251 Automatically generated installer lang files 2021-02-17 00:07:52 +00:00
Andrew Nicols c7529c7859 Merge branch 'MDL-70264-master' of git://github.com/sarjona/moodle 2021-02-17 07:26:15 +08:00
Eloy Lafuente (stronk7) 166add5c8c Merge branch 'MDL-69562_master' of https://github.com/dvdcastro/moodle 2021-02-16 22:32:56 +01:00
Eloy Lafuente (stronk7) a32ed14f03 Merge branch 'MDL-66600' of https://github.com/mkassaei/moodle 2021-02-16 22:11:55 +01:00
Eloy Lafuente (stronk7) 56a5136cc0 Merge branch 'MDL-70525_master' of https://github.com/TomoTsuyuki/moodle 2021-02-16 19:56:09 +01:00
Eloy Lafuente (stronk7) 3d117c1934 Merge branch 'MDL-48269-master-4' of git://github.com/junpataleta/moodle 2021-02-16 19:45:44 +01:00
Sara Arjona 1be2350a74 MDL-70912 mod_data: Add filepicker to the H5P Atto button
The filepicker wasn't displayed fot the H5P Atto button when a text
area database field was created because some options were missing
in the textarea field class.
2021-02-16 18:16:21 +01:00
Sara Arjona 845b865b22 Merge branch 'MDL-69762_master' of https://github.com/grillonbleu/moodle 2021-02-16 15:29:34 +01:00
Jun Pataleta c8f5e8c7f3 MDL-48269 core_backup: Prevent unwanted group icons from being restored
* Old backups might have hidepicture defined and set to 1 in which case
we must make sure to exclude the group picture for these groups from
being restored.
2021-02-16 22:26:13 +08:00
Jun Pataleta f04cbfa7ab MDL-48269 mod_forum: Remove occurrences of hidepicture 2021-02-16 12:48:45 +08:00
Jun Pataleta 32ed88ad07 MDL-48269 messageoutput_email: Remove occurrences of hidepicture 2021-02-16 12:48:44 +08:00
Jun Pataleta 666cce74e5 MDL-48269 group: Remove additional occurrences of hidepicture 2021-02-16 12:48:44 +08:00
Frederic Massart 19c8985c7e MDL-48269 language: Deprecating 'hidepicture' string 2021-02-16 12:48:44 +08:00
Frederic Massart 3aed37ee4d MDL-48269 group: Remove the option to hide the picture of a group
Plus additional amendments to Fred's original commit:
1. Updating the version numbers
2. Merging the original two-step upgrade below into one for simplicity:
   1. Deleting the pictures for groups with hidepicture set to 1; and
   2. Dropping the hidepicture field itself.
3. Converted array() usages to the short syntax [].
2021-02-16 12:46:58 +08:00
AMOS bot 6cd0a22927 Automatically generated installer lang files 2021-02-16 00:07:48 +00:00
Eloy Lafuente (stronk7) 260c6f3097 Merge branch 'MDL-70806-master' of git://github.com/ferranrecio/moodle 2021-02-15 22:29:31 +01:00
Eloy Lafuente (stronk7) 43bf98f2eb Merge branch 'MDL-70882-master' of git://github.com/andrewnicols/moodle 2021-02-15 22:22:15 +01:00
François Moreau 3776fbafb2 MDL-69762 core_contentbank: let users hide their content 2021-02-15 13:26:32 -05:00
Marina Glancy 1e8375d830 MDL-70896 mod: libxml_disable_entity_loader is deprecated in php 8.0 2021-02-15 18:58:56 +01:00
Marina Glancy 0eada7a5f9 MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
Marina Glancy 6f90758721 MDL-70899 dml: set_db_handle() definition not compatible with parent 2021-02-15 16:25:15 +01:00
Marina Glancy 0af0a96bb1 MDL-70898 various: private functions can not be declared final 2021-02-15 16:20:06 +01:00
Mahmoud Kassaei 4a571882db MDL-66600 quiz manual grading: show any automated grading and feedback 2021-02-15 08:19:31 +00:00
Adrian Greeve c09879ffa6 Merge branch 'MDL-70735-pdf-metadata' of https://github.com/brendanheywood/moodle 2021-02-15 09:09:40 +08:00
Andrew Nicols 74ccc12fb3 MDL-70882 performance: Revert "MDL-47456 core: Remove redundant DB call during bootstrap"
This reverts commit 522e4c6c76.

The DB calls are not redundant and have an impact in a number of edge
cases.
2021-02-15 08:07:18 +08:00
Paul Holden 3112712ec3 MDL-66025 user: require message content in bulk action.
Also import missing 'core/notification' dependency.
2021-02-14 20:09:18 +00:00
Paul Holden 776863806f MDL-70880 message: preserve window scroll when close message drawer. 2021-02-14 19:27:10 +00:00
AMOS bot 67973c70da Automatically generated installer lang files 2021-02-13 00:07:57 +00:00
Ilya Tregubov 4795b09f23 MDL-68853 h5pactivity: Add a websevice to trigger report_viewed event. 2021-02-12 15:49:05 +02:00
Brendan Heywood 6532708ed2 MDL-70735 tcpdf: Reduce information disclosure from TCPDF 2021-02-12 15:41:38 +11:00
Simey Lameze f339182af0 MDL-70169 login: fix accessibility issues 2021-02-12 12:12:02 +08:00
Paul Holden ccc2f64244 MDL-70789 theme_boost: fix double click on drawer hiding content.
If the drawer toggle button was clicked in quick succession to close
and then re-open, then the delayed Aria.hide method would be called
which hid the drawer content when it finished opening.
2021-02-11 21:39:06 +00:00
Sara Arjona 329b87720a MDL-70264 badges: remove badges/oauth2callback.php
File badges/oauth2callback.php has been removed and now badges
API will use admin/oauth2callback.php because it makes no sense having
it twice.

Credits go to Andrew Nicols for raising it!
2021-02-11 16:56:56 +01:00
Sara Arjona 41037efa7a weekly release 4.0dev 2021-02-11 14:54:37 +01:00
Sara Arjona 3122b30050 NOBUG: Fixed file access permissions 2021-02-11 14:54:37 +01:00
Sara Arjona 3deec3b67d Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-02-11 14:54:35 +01:00
Ferran Recio f6a1a529a6 MDL-70806 h5p: fix resize glitch 2021-02-11 13:10:10 +01:00
Mihail Geshoski 46fd92b938 MDL-47410 mod_assign: Update mod_assign behat tests
Updates the mod_assign behat tests to utilize the ability to
conviniently populate the datetime selector fields.
2021-02-11 12:05:58 +08:00
Mihail Geshoski 3ac452047f MDL-47410 behat: Support selection from the datetime selector element
Adds behat support for selecting date and time from a datetime selector
element. The passed values should represent a textual date and time
description wrapped in '##' (e.g. '##first day of January 2020 08:00##',
'##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be
used to disable the datetime selector element.
2021-02-11 12:04:46 +08:00
Mihail Geshoski 76fe097b55 MDL-47410 tool_licensemanager: Update tool_licensemanager behat tests
Updates the tool_licensemanager behat tests to utilize the ability to
conviniently populate the date selector fields.
2021-02-11 12:01:09 +08:00
Mihail Geshoski b7bef8f297 MDL-47410 behat: Support date selection from the date selector element
Adds behat support for selecting a date from the date selector element.
The passed values should represent a textual date description wrapped
in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also,
the value 'disabled' is valid and can be used to disable the date
selector element.
2021-02-11 11:58:44 +08:00
Mihail Geshoski afd1cf81b5 MDL-47410 behat: Create custom selector for the date and datetime fields
Creates a custom field selector to locate the requested date or datetime
form fields.
2021-02-11 11:49:18 +08:00
Mihail Geshoski dbb58833ba MDL-47410 behat: Move logic from guess_type() to a separate method
Moves the logic from guess_type() to a separate protected method
get_field_instance_for_element(). This would be quite useful for
form field classes as they can now use this method when there is
a need to determine the type of a given node element.
2021-02-11 11:40:30 +08:00
Mihail Geshoski 896364e4c4 MDL-47410 behat: Use data-fieldtype attribute to guess the field type
The data-fieldtype attribute (if present) should be also utilized in
guess_field_type() and match the behavior in get_field_node_type().
2021-02-11 11:38:00 +08:00
Mihail Geshoski d46f1a3ef4 MDL-47410 form: Add data-fieldtype attribute to checkbox inline element
Includes the data-fieldtype attribute to the checkbox inline form
element. This element does not extend the parent inline element
template due to its specific nature and therefore this attribute was
missing.
2021-02-11 11:36:27 +08:00
Tuan.Dinh 8ae7019cf8 MDL-70124 course: Activity names are now trimmed. 2021-02-11 11:12:59 +08:00
Adrian Greeve 007c270507 Merge branch 'MDL-70755' of https://github.com/mkassaei/moodle 2021-02-11 10:54:38 +08:00
Adrian Greeve e54ee9e512 Merge branch 'MDL-70773' of https://github.com/mkassaei/moodle 2021-02-11 10:19:39 +08:00
Adrian Greeve f83156fcf9 Merge branch 'MDL-70513' of https://github.com/timhunt/moodle 2021-02-11 10:06:50 +08:00
John Yao b67e022b7f MDL-70627 filters: aarch64 mimetex type support for filter tex notation
Amended to correct permissions.
2021-02-11 02:41:12 +01:00
Adrian Greeve 9cacb16c01 Merge branch 'MDL-69867-master_display_grade_with_scale' of git://github.com/moffe42/moodle 2021-02-11 09:23:50 +08:00
AMOS bot 93b39194d9 Automatically generated installer lang files 2021-02-11 00:07:48 +00:00
Brendan Heywood 6b48a24cc6 MDL-70766 auth: Add all auth plugin changes to configlog 2021-02-11 11:05:25 +11:00
Brendan Heywood 05f138600b MDL-51111 cache: Don't lock and write the config file if unchanged 2021-02-11 11:04:50 +11:00
Brendan Heywood 17e465ca85 MDL-70768 tool_langimport: Make installed admin UI more consistent 2021-02-11 10:43:19 +11:00
Sara Arjona fd31854480 Merge branch 'MDL-70732-master' of git://github.com/aanabit/moodle 2021-02-10 17:20:22 +01:00
Sara Arjona 3b15de89c7 Merge branch 'MDL-70796' of https://github.com/timhunt/moodle 2021-02-10 16:50:04 +01:00
Sara Arjona be575645e0 Merge branch 'MDL-69101' of https://github.com/timhunt/moodle 2021-02-10 15:11:52 +01:00
Sara Arjona 3a5fcbe6e6 Merge branch 'MDL-70631-master-unzip' of git://github.com/mudrd8mz/moodle 2021-02-10 12:38:03 +01:00
Sara Arjona 9afbbf0e78 Merge branch 'MDL-70736_master' of https://github.com/TomoTsuyuki/moodle 2021-02-10 08:28:08 +01:00
Jacob Christiansen 0770d9fec3 MDL-69867 mod_assign: Display current grade with scale value
When using workflow we show the current grade with its scale value
instead of the internal index
2021-02-10 08:13:05 +01:00
Adrian Greeve 1fb0a4168a Merge branch 'MDL-70643' of git://github.com/paulholden/moodle 2021-02-10 14:02:56 +08:00
Adrian Greeve 407ed3ff33 Merge branch 'MDL-52420-master' of https://github.com/sharidas/moodle 2021-02-10 12:54:19 +08:00
Sara Arjona 4f3d90b6a9 Merge branch 'master-MDL-65390' of https://github.com/yao9394/moodle 2021-02-09 15:10:42 +01:00
Sara Arjona 68d39e634f Merge branch 'MDL-68736-master' of git://github.com/ferranrecio/moodle 2021-02-09 15:05:29 +01:00
Sara Arjona 08d1538313 Merge branch 'MDL-70282-oauth2_improve_error' of https://github.com/leonstr/moodle 2021-02-09 11:04:54 +01:00
Sara Arjona 1d6b734108 Merge branch 'MDL-70173-master' of git://github.com/rezaies/moodle 2021-02-09 08:29:13 +01:00
Sara Arjona ec1996998f Merge branch 'MDL-70377' of https://github.com/mkassaei/moodle 2021-02-09 08:23:24 +01:00
Shamim Rezaie 6df239900e MDL-70173 core: Use a meaningful first level header 2021-02-09 16:16:09 +11:00
Shamim Rezaie 805df4f846 MDL-70173 theme_boost: Fix empty link issue on the "Go to top" button
On behat, we have to use a more specific test step if we are looking
for a "Go" button on a modal. The reason is that the html of the modal
content is put after the html of the "Go to top" button, so behat
may find the "Go to top" button if we just look for "Go".
2021-02-09 16:16:09 +11:00
Shamim Rezaie 97b0401443 MDL-70173 theme_boost: Increase the size of notification counter
WAVE considers any text with the size of 10px or below really small.
Increasing the font size of the navbar counter by 1px should not make a
big negative impact on the design, but improves accessibility.
2021-02-09 16:16:09 +11:00
Shamim Rezaie c0e3a4108c MDL-70173 output: All pages should have a heading
In MDL-63040, it was decided that the page header for the dashboad page
should be removed.
However, Based on Success Criteria 1.3.1 and 2.4.6 from the WebAIM's
WCAG 2 Checklist, all pages should have an <h1> element.
So I put an sr-only heading on the dashboard and all other pages, where
no page header is shown.
2021-02-09 16:16:09 +11:00
Shamim Rezaie 3a9fa051c3 MDL-70173 dashboard: ARIA role presentation conflicted the empty alt
The markup <img role="presentation" alt="alt text"> is contradictory.

According to https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/presentation/PresentationRoleExamples.html
 It is recommended that authors instead use empty alt text (alt="")
 where they use role="presentation".
2021-02-09 16:16:09 +11:00
Shamim Rezaie a6578dd64f MDL-70173 message: Fix empty link 2021-02-09 16:16:09 +11:00
Shamim Rezaie b0b3a53521 MDL-70173 output: use an empty alt to hide user pic from screen readers
There is no need to use WAI-ARIA to hide images from screen readers.
See https://www.w3.org/WAI/tutorials/images/decorative/
2021-02-09 16:16:09 +11:00
Tomo Tsuyuki 6581cb7137 MDL-70525 tool_profiling: Cannot import profiling file
Change type from int to integer to be able to have big numbers
2021-02-09 09:45:45 +11:00
Mahmoud Kassaei 8544b09e7b MDL-70377 qtype_essay: When reviewing an attempt as a teacher
In the Response history table, Action Saved: does not display the value
of $a in the language string.
2021-02-08 17:11:06 +00:00
Sara Arjona 927f2dc46d Merge branch 'MDL-51287-master' of https://github.com/SangNguyenAnh/moodle 2021-02-08 11:28:54 +01:00
Andrew Nicols 3b7a564e17 Merge branch 'MDL-70429-master' of git://github.com/sarjona/moodle 2021-02-08 12:02:11 +08:00
Andrew Nicols f5e348ac3e Merge branch 'MDL-69898' of https://github.com/paulholden/moodle 2021-02-08 10:48:29 +08:00
Andrew Nicols 98a261b6ea Merge branch 'MDL-70614' of git://github.com/paulholden/moodle 2021-02-08 10:34:46 +08:00
Andrew Nicols 5cef15ea60 Merge branch 'MDL-70725-master' of git://github.com/sarjona/moodle 2021-02-08 10:33:52 +08:00
Andrew Nicols a98c0cf01d Merge branch 'MDL-70719' of https://github.com/mkassaei/moodle 2021-02-08 09:47:05 +08:00
Brendan Heywood a87ddbd685 MDL-70536 cli: Fixed cli progress bar when 100% more than once 2021-02-07 00:36:01 +11:00
Brendan Heywood 67fb670cc6 MDL-70536 cli: Add cli for resetting all dashboards 2021-02-06 15:36:12 +11:00
AMOS bot bfe5e7a0cd Automatically generated installer lang files 2021-02-06 00:07:49 +00:00
Mahmoud Kassaei d2f8ea2073 MDL-70719 quiz overrides: only show Actions column header if needed 2021-02-05 15:46:37 +00:00
Tim Hunt 6c7cf1123e MDL-70796 count_words: match the count from LibraOffice & MS Word 2021-02-05 11:59:48 +00:00
Amaia Anabitarte 248d4ff200 MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:22 +01:00
John Yao b964ba6373 MDL-65390 accessibility: correct focus after "Show more" clicked 2021-02-05 12:15:21 +11:00
Tomo Tsuyuki a87ffa5b90 MDL-70736 gradingform_guide: Fix loading marking guide template issue
Do not check grade item name if it is from shared template.
2021-02-05 11:57:51 +11:00
Sara Arjona 4e398ff3f7 weekly release 4.0dev 2021-02-04 14:56:10 +01:00
Sara Arjona 9fa917be61 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-02-04 14:56:07 +01:00
sangnguyen 1d50e833e0 MDL-51287 Profile: Should notify users that changes are saved 2021-02-04 14:54:12 +07:00
Mikhail Golenkov ad9598c758 MDL-70752 restore: Fix remote file recovery 2021-02-04 17:27:54 +11:00
Andrew Nicols 6995888454 Merge branch 'MDL-69748-master' of git://github.com/rezaies/moodle 2021-02-04 11:51:57 +08:00
Shamim Rezaie a321181fe6 MDL-69748 core: Fix hideif issue with array elements
Changed the element selector to get all array elements,
whether named or unnamed. The previus selector was only
working for elements that thir names were like name="something[]".
It was not working for name="something[a]" elements.
2021-02-04 14:37:40 +11:00
Andrew Nicols 0377b0f9fa Merge branch 'MDL-64866-master' of git://github.com/ilyatregubov/moodle 2021-02-04 11:37:01 +08:00
Andrew Nicols 031509861b Merge branch 'MDL-70579' of git://github.com/paulholden/moodle 2021-02-04 09:28:22 +08:00
Andrew Nicols 84872802ce Merge branch 'MDL-70632' of git://github.com/paulholden/moodle 2021-02-04 09:25:25 +08:00
AMOS bot 1a49bc4999 Automatically generated installer lang files 2021-02-04 00:07:54 +00:00
Eloy Lafuente (stronk7) b74beab57c MDL-70741 capability overview: missing whitespace after placeholder 2021-02-04 00:01:31 +01:00
Tim Hunt f44bff98fb MDL-70513 quiz manual grading: use formchangechecker to avoid dataloss 2021-02-03 16:06:54 +00:00
David Mudrák 6109e8b272 MDL-70631 files: Replace hard-coded value with FL_ENC_RAW constant
This is not related to the issue but I noticed it while trying to debug
it.

Back when this line was introduced in 9c140a681e, the ZipArchive had
not yet exposed this flag as a constant. It was added later with PHP
7.0.8 and we can switch to using it now.
2021-02-03 16:06:39 +01:00
David Mudrák b227b6ea45 MDL-70631 files: Fix performance of zip_packer::extract_to_pathname()
The original implementation was based on ZipArchive::getStream() which
turns out to be very slow and if the archive contains many files, the
unzipping performance is very slow.

The patch changes the implementation to use ZipArchive::extractTo()
unless the extracted entry path contains a folder name ending with dot
(such as some/path./to/file.txt). There is a known upstream bug in the
PHP ZIP extension #77214 (also #74619 and #69477) so that we fall back
to keep using the stream in those cases.
2021-02-03 16:06:39 +01:00
Sara Arjona 407133af76 Merge branch 'MDL-70315' of git://github.com/paulholden/moodle 2021-02-03 16:04:16 +01:00
Sara Arjona 36f4cfc071 Merge branch 'MDL-70705-master' of git://github.com/lucaboesch/moodle 2021-02-03 15:33:02 +01:00
Sara Arjona 1e5a862c93 Merge branch 'MDL-70316-master' of git://github.com/mihailges/moodle 2021-02-03 15:29:23 +01:00
Luca Bösch 0e9680d64a MDL-70705 block_blog_recent: support multilang blog entry titles 2021-02-03 15:14:46 +01:00
Sara Arjona 655a682794 Merge branch 'MDL-70741' of https://github.com/timhunt/moodle 2021-02-03 14:49:36 +01:00
David Castro 15527bf4a8 MDL-69562 admin: Allow getting IP from all sources. 2021-02-03 07:23:36 -05:00
Eloy Lafuente (stronk7) 3d276111e1 Merge branch 'MDL-70711-master' of git://github.com/kordan/moodle 2021-02-03 13:03:50 +01:00
Sara Arjona 09cfed9186 Merge branch 'MDL-70439-master' of https://github.com/DinhHien0307/moodle 2021-02-03 13:03:02 +01:00
Mahmoud Kassaei 32b645fd03 MDL-70773 Quiz overrides: User links don't point to user profile page 2021-02-03 11:47:23 +00:00
Sara Arjona 3abda98a2d Merge branch 'MDL-70163' of git://github.com/paulholden/moodle 2021-02-03 12:25:28 +01:00
Sara Arjona e63081f68d Merge branch 'MDL-70634-master' of git://github.com/ferranrecio/moodle 2021-02-03 11:34:05 +01:00
Sara Arjona 7fde34ad55 Merge branch 'MDL-70535' of git://github.com/paulholden/moodle 2021-02-03 11:19:14 +01:00
Paul Holden 3f36a7da98 MDL-70632 tool_langimport: search for available language packs. 2021-02-03 10:03:37 +00:00
Sara Arjona 6d0b97a176 Merge branch 'MDL-67959-master-2' of git://github.com/junpataleta/moodle 2021-02-03 10:50:29 +01:00
Mahmoud Kassaei b297faa4ab MDL-70755 Quiz overrides: Broken layout for Group overrides 2021-02-03 09:29:11 +00:00
Sara Arjona a35c197a4a Merge branch 'MDL-66769-master' of git://github.com/ilyatregubov/moodle 2021-02-03 09:32:30 +01:00
Ilya Tregubov dde8a5b62c MDL-66769 core_h5p: Clean up orphaned h5p records task. 2021-02-03 10:10:30 +02:00
Tim Hunt 99778a61a3 MDL-69101 Essay/Moodle XML: recent new settings not imported/exported 2021-02-03 08:09:27 +00:00
Sara Arjona a50802c68b Merge branch 'MDL-70621-master' of git://github.com/lucaboesch/moodle 2021-02-03 09:02:45 +01:00
Sara Arjona 4d5c3c3914 Merge branch 'MDL-68970' of https://github.com/timhunt/moodle 2021-02-03 08:51:11 +01:00
Luca Bösch f37dbcc15b MDL-70621 mod_glossary: use glossary rsstype string. 2021-02-03 08:33:54 +01:00
Andrew Nicols f979519ff6 Merge branch 'MDL-56772-master' of git://github.com/peterRd/moodle 2021-02-03 10:26:26 +08:00
Andrew Nicols 5b6063e226 Merge branch 'MDL-66932_master' of https://github.com/nadavkav/moodle 2021-02-03 10:06:32 +08:00
Andrew Nicols 83c148971a Merge branch 'MDL-68893-master' of git://github.com/lucaboesch/moodle 2021-02-03 09:40:36 +08:00
Andrew Nicols 4364244970 Merge branch 'MDL-68958-master' of git://github.com/peterRd/moodle 2021-02-03 09:30:11 +08:00
Andrew Nicols 71b232e23a Merge branch 'MDL-70339-master' of git://github.com/peterRd/moodle 2021-02-03 08:54:31 +08:00
Andrew Nicols a35c7f5dce Merge branch 'MDL-70583-cli-progress' of https://github.com/brendanheywood/moodle 2021-02-03 08:27:05 +08:00
Brendan Heywood ded82b7f5b MDL-70583 cli: Allow progress bars to be rendered in cli scripts 2021-02-02 22:07:14 +11:00
Sara Arjona a00be13f7d Merge branch 'MDL-70309-master' of git://github.com/ferranrecio/moodle 2021-02-02 10:44:40 +01:00
Víctor Déniz 35a0bec31a Merge branch 'MDL-59782-master' of git://github.com/bmbrands/moodle 2021-02-02 09:36:19 +00:00
Andrew Nicols 1432180138 Merge branch 'MDL-70304-master' of git://github.com/ilyatregubov/moodle 2021-02-02 15:31:52 +08:00
Sara Arjona d0ff6939bb Merge branch 'MDL-70574' of https://github.com/timhunt/moodle 2021-02-02 08:20:17 +01:00
Sara Arjona f756d2afbe Merge branch 'MDL-70288-master-2' of git://github.com/junpataleta/moodle 2021-02-02 07:59:28 +01:00
Ilya Tregubov e174f19db6 MDL-70304 core: updated adapter.js to 7.4.0 2021-02-02 08:58:30 +02:00
Jun Pataleta 2961feb71c MDL-70288 qtype: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 13:53:05 +08:00
Jun Pataleta 793aa03598 MDL-70288 mod_lti: Remove unnecessary empty label string
* When a label is passed to an (advanced) checkbox and no text
  was provided, the label will be displayed on the right of the the
  checkbox element. So there's no point in passing an empty string for
  the label just to render the text to the right of the checkbox.
2021-02-02 13:53:05 +08:00
Sujith Haridasan a44dbf0894 MDL-52420 mod_assign: Save comment when save buttons are clicked
Save comment in the assignment when the Save changes
or Save and show next button are clicked at the bottom
of the page.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-02-02 10:52:13 +05:30
Jun Pataleta e3457dc4aa MDL-70288 core: Remove duplicate labels for checkbox elements
* If there's a label, the text will serve as the description of  the
element.
2021-02-02 13:11:58 +08:00
Jun Pataleta da237792ec MDL-70288 theme_boost: Manage aria-describedby on form validation
* The aria-describedby attribute can be a list of element IDs that
describe the element. On form validation, the ID of the error message
container is added to this attribute which may already be containing
another ID. So we need to properly add/remove the error message ID
so that we don't delete any existing ID(s) in the aria-describedby
attribute during form validation.
2021-02-02 13:11:58 +08:00
Eloy Lafuente (stronk7) 43b36f6d68 Merge branch 'MDL-46256' of https://github.com/timhunt/moodle 2021-02-01 23:20:01 +01:00
Eloy Lafuente (stronk7) cd4d387936 Merge branch 'MDL-70648-master' of git://github.com/lameze/moodle 2021-02-01 19:13:47 +01:00
Sara Arjona ff1ad4baac Merge branch 'MDL-70625-master' of git://github.com/rezaies/moodle 2021-02-01 15:36:55 +01:00
Paul Holden e0d3b4505e MDL-70643 admin: add summary argument to install database CLI.
Show warning for any unrecognised arguments.
2021-02-01 12:33:11 +00:00
Sara Arjona 2a2370f362 Merge branch 'MDL-70734-master' of git://github.com/andrewnicols/moodle 2021-02-01 12:30:07 +01:00
Sara Arjona 10095d8781 Merge branch 'MDL-70740-master' of git://github.com/andrewnicols/moodle 2021-02-01 11:25:04 +01:00
Paul Holden a01397bdce MDL-69898 admin: link to config changes report from logged event. 2021-02-01 09:14:06 +00:00
Paul Holden 9e06441ad6 MDL-69898 report_configlog: allow searching settings by page parameter. 2021-02-01 09:14:06 +00:00
Paul Holden 43adc7a333 MDL-70614 user: consistent roles spacing in course profile. 2021-02-01 07:55:04 +00:00
Andrew Nicols 0e01c484e4 Merge branch 'MDL-58673' of git://github.com/paulholden/moodle 2021-02-01 14:02:01 +08:00
Andrew Nicols 4effeb0b65 MDL-70740 behat: Composer bump for new version of Mink Driver 2021-02-01 09:08:48 +08:00
AMOS bot 1af0f814d9 Automatically generated installer lang files 2021-02-01 00:07:52 +00:00
Andrew Nicols 793f131019 MDL-70734 behat: Increase the WebDriver Curl timeout 2021-01-31 18:21:41 +08:00
AMOS bot 5365fab016 Automatically generated installer lang files 2021-01-31 00:07:48 +00:00
Luca Bösch 55ab2bce55 MDL-70621 mod_forum: use forum rsstype string. 2021-01-29 23:43:37 +01:00
Luca Bösch ac3a15c287 MDL-68893 mod_data: use own RSS feed string.
AMOS BEGIN
 CPY [rsstype,core],[rsstype,mod_data]
AMOS END
2021-01-29 23:43:18 +01:00
Tim Hunt 3da5a51df7 MDL-70741 capability overview: avoid errors from orphan contexts 2021-01-29 20:48:14 +00:00
Víctor Déniz 9dabd071fe weekly release 4.0dev 2021-01-29 17:12:50 +00:00
Víctor Déniz 88c991168f Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-01-29 17:12:44 +00:00
Jake Dallimore 9a4cfdeabb Merge branch 'MDL-66979-master-7' of git://github.com/andrewnicols/moodle 2021-01-29 15:41:03 +08:00
Andrew Nicols b658d18b51 MDL-66979 behat: Mark some tests as being slow
Uses of the httpsreplace and customlang tools are known to be extremely
slow.

In our CI infrastructure on slwoer DBs, the customlang tool can take
over 90 seconds to load the page, whilst the httpsreplace tool can take
up to about 60 seconds.

These changes set appropriate timeout factors to increase the timeout
accordingly.
2021-01-29 14:15:26 +08:00
Andrew Nicols bead2a1d96 MDL-66979 behat: Add a step to set a timeout factor for a test 2021-01-29 14:15:24 +08:00
Eloy Lafuente (stronk7) adc8204a83 MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-29 14:15:20 +08:00
Jun Pataleta cbee8815fc MDL-67959 mod_forum: Display group pictures in forum only if available
Displaying a default group picture in forum posts leads to confusion,
so better to not display a default group picture when the group
picture is not set for the group.
2021-01-29 12:29:29 +08:00
AMOS bot 1737f4d4f6 Automatically generated installer lang files 2021-01-29 00:07:51 +00:00
Eloy Lafuente (stronk7) fec3a697c8 Merge branch 'MDL-66979' of git://github.com/stronk7/moodle 2021-01-28 17:11:04 +01:00
Sara Arjona d80613f9de MDL-70429 repository_contentbank: set default returntype
Credits for Alexander Bias, for sharing the patch!

The content bank was designed for making easier to reuse content.
So "Link to the file" should be the default option when using the
contentbank repository, in order to let teachers modify their
content in the content bank and update automatically it everywhere
is used.
2021-01-28 16:45:08 +01:00
Eloy Lafuente (stronk7) 653101964d MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-28 12:23:05 +01:00
Leon Stringer 5070f0d7ce MDL-70282 oauth: Improve error information
If the request to the OAuth 2 token endpoint fails show the response
body the endpoint returned with its HTTP status (when debug: DEVELOPER).
If no response is available show any error returned by Curl.  Previously
none of this information was available making troubleshooting difficult.

If a token refresh fails in \core\oauth2\refresh_system_tokens_task an
exception is now thrown so that the result is shown as "Fail" on
admin/tasklogs.php?filter=core\oauth2\refresh_system_tokens_task
2021-01-28 10:00:18 +00:00
Eloy Lafuente (stronk7) 2eebe68cad Merge branch 'MDL-66979-master-7' of git://github.com/andrewnicols/moodle 2021-01-28 09:07:39 +01:00
Kordan c8e67bac6b MDL-70711 form: deleted useless if block
get_magic_quotes_gpc() always return false since PHP 5.3 so (1 == get_magic_quotes_gpc()) is never verified.
This allows me to safetly delete what I dropped out.
2021-01-28 08:48:55 +01:00
Andrew Nicols 5d8e4e9fd4 MDL-66979 behat: Set script timeout with timeout factor 2021-01-28 15:27:50 +08:00
Bas Brands 12bc605457 MDL-59782 core_question: improve questionbank highlighting 2021-01-28 08:12:58 +01:00
Andrew Nicols 230896b7a5 MDL-66979 behat: Correct selenium2 reference in config-dist 2021-01-28 15:08:10 +08:00
Andrew Nicols 991c8a9e78 MDL-66979 behat: Handle driver stop failure properly
An case was found where the webdriver stop() call could fail in an
AfterScenario hook, leading to a complete rerun if no other errors were
experienced.
2021-01-28 15:07:52 +08:00
Jun Pataleta 3a8e9d769a Merge branch 'MDL-70444-dashboard-reset-progress-m' of https://github.com/Peterburnett/moodle 2021-01-28 09:54:55 +08:00
Andrew Nicols bf6983107f Merge branch 'MDL-70048-master' of git://github.com/peterRd/moodle 2021-01-28 08:02:58 +08:00
Peter Dias 663c84ace6 MDL-70048 dropbox: Augmented unit tests to account for additional params 2021-01-28 07:31:07 +08:00
Peter Dias 44664d35e5 MDL-70048 dropbox: Update the dropbox search URL.
- Update fetch_dropbox_data to allow different result nodes and version
- Update search to the new URL with new params
- Update the get entities function to account for the change in structure.
2021-01-28 07:31:07 +08:00
Víctor Déniz 34dec1d26e Merge branch 'MDL-69816' of git://github.com/paulholden/moodle 2021-01-27 23:00:53 +00:00
Sara Arjona 9975f5e2dc MDL-70725 oauth2: move expectException to separate method 2021-01-27 17:52:55 +01:00
Víctor Déniz d0e99460e7 Merge branch 'MDL-70585' of git://github.com/paulholden/moodle 2021-01-27 10:52:58 +00:00
hiendinh c3b7e5fe16 MDL-70439 Profile: Indicate user email address settings on own profile 2021-01-27 13:37:18 +07:00
Mihail Geshoski db758db533 MDL-70316 core: Update the emoji categories in the emoji picker 2021-01-27 13:37:03 +08:00
Mihail Geshoski adb66d4b03 MDL-70316 core: Document emoji-data upgrade and update version in core 2021-01-27 13:37:02 +08:00
Mihail Geshoski 517069bc8e MDL-70316 core: Upgrade emoji-data to 6.0.0 2021-01-27 13:35:44 +08:00
Mihail Geshoski e840aa653a MDL-70316 core: Update the categories in the emoji data generator script
The emoji categories were modified in the newer versions of the
emoji-data library. Therefore, the category list in $categorysortorder
needs to be updated with the correct category names in order to properly
sort the categories in the generated emoji data file.
2021-01-27 13:35:44 +08:00
Mihail Geshoski 609cc46be3 MDL-70316 core: Detect category name changes in the emoji data generator
The emoji data generator script is enabled to detect inconsistencies
between the emoji category names used in the emoji-data library and the
ones used in Moodle. These inconsistencies should be fixed, as soon as
they are detected upon library upgrade.
2021-01-27 13:35:44 +08:00
AMOS bot 893f6ea56b Automatically generated installer lang files 2021-01-27 00:07:53 +00:00
Eloy Lafuente (stronk7) 938c018963 Merge branch 'MDL-66979-master-7' of git://github.com/andrewnicols/moodle 2021-01-26 22:43:54 +01:00
Víctor Déniz abd55fac97 Merge branch 'MDL-70528-master' of git://github.com/ilyatregubov/moodle 2021-01-26 14:05:37 +00:00
Ilya Tregubov 7a77493ba5 MDL-70528 h5pactivity: Fix block can't be added to h5pactivity page. 2021-01-26 15:19:01 +02:00
Ferran Recio 734bf378a5 MDL-68736 h5pactivity: remove legacy log method 2021-01-26 11:15:57 +01:00
Paul Holden 5ece7e75d7 MDL-70163 core: fix attachment validation when localrequestdir absent.
Switch the order of operations performed when collating list of paths
from which a user can include attachments.

First collect all normalised/absolute paths then filter empty entries,
which fixes an issue where $CFG->localrequestdir could be defined but
not exist. This would lead to an empty string being passed to strpos
which triggered a PHP warning.

Co-authored-by: Peter Burnett <peterburnett@catalyst-au.net>
2021-01-25 19:53:26 +00:00
Tim Hunt bdbe3cd268 MDL-68970 quiz: prevent page caching during attempts
This ensures that the page reloads if the student uses
the Back or Forwards buttons within an attempt. This
avoids questions being in a stale state, or
the timer showing the wrong time.

Thanks to Jake Dallimore and Russell Boyatt for suggestions
which lead to this fix.
2021-01-25 18:33:51 +00:00
Víctor Déniz df4ca28e37 Merge branch 'MDL-65135' of https://github.com/paulholden/moodle 2021-01-25 13:48:52 +00:00
Ferran Recio bc8f4118ac MDL-70634 h5p: minimizing height glitch 2021-01-25 13:54:23 +01:00
Peter Burnett 4e72d5916c MDL-70444 my: Improved robustness of bulk dashboard reset 2021-01-25 13:54:44 +10:00
Adrian Greeve 7e0c33b376 Merge branch 'master-MDL-69631-v3' of https://github.com/golenkovm/moodle 2021-01-25 08:15:36 +08:00
Andrew Nicols 05fca85d8e MDL-66979 behat: Warn about old behat.yml file location 2021-01-23 20:43:20 +08:00
AMOS bot c1db43add7 Automatically generated installer lang files 2021-01-23 00:07:51 +00:00
Ferran Recio e161edc97a MDL-70309 libraries: upgrade mongodb integration files 2021-01-22 14:41:12 +01:00
Ferran Recio 4b948f8a50 MDL-70309 libraries: upgrade mongodb to version 1.8.0 2021-01-22 14:41:12 +01:00
Paul Holden 81fdd46315 MDL-70585 course: deeper clean of path names in course export.
This fixes an issue on those systems that don't fully support unicode
characters within zip structures, which subsequently led to broken
links when browsing downloaded course content.
2021-01-22 08:15:16 +00:00
Ilya Tregubov bf5dd33546 MDL-64866 message: Remove message/defaultoutputs.php
and final deprecation of admin_page_defaultmessageoutputs class.
2021-01-22 09:44:41 +02:00
Andrew Nicols 14a267e862 MDL-66979 behat: Rename and warn on old config 2021-01-22 14:52:12 +08:00
Andrew Nicols 0c2403f9b3 MDL-66979 behat: Uncomment step disabled for old firefox 2021-01-22 14:52:12 +08:00
Andrew Nicols 52d9024580 MDL-66979 behat: Pad messaging drawer
This works around an issue highlighted by MDL-70411 whereby some of the
messaging links are covered by the scrollbar in Firefox on MacOS.
2021-01-22 14:52:11 +08:00
Andrew Nicols da3b304ab5 MDL-66979 behat: Work around weird gradebook focus behaviour
I can't expand this one in a sane fashion but the older JS is doing some
weird and wonderful things with focus.

The only way I could get this to behave correctly was to move away from
the field, move back to it, and then move away again. Other combinations
failed in different browsers for different reasons.
2021-01-22 14:52:11 +08:00
Andrew Nicols c876d6298e MDL-66979 behat: availability field extends textarea
The availability behat field extends the textarea type, and therefore
needs to include this type.
2021-01-22 14:52:11 +08:00
Andrew Nicols a9bd31810f MDL-66979 behat: Improve chromeOptions configuration
Simplify the chromeOptions configuration to improve readability.
2021-01-22 14:52:11 +08:00
Andrew Nicols cedb58f642 MDL-66979 question: Improve behat test reliability
Expand all fieldsets rather than individual fieldsets.

This can fail in some situations where the page moves as the first
fieldset opens and HTML transitions take effect. This causes subsequent
fieldsets to move after WebDriver has calculated the click target.
2021-01-22 14:52:11 +08:00
Andrew Nicols fd5b398488 MDL-66979 mod_assign: Stop clicking the user filters
Remove the documented hack which was re-opening a popup because it
"closes for some reason". It no longer randomly closes.
2021-01-22 14:52:11 +08:00
Andrew Nicols a61c4fbce3 MDL-66979 behat: Switch to generators
These steps were creating content manually in an unnecessary fashion. I
had to debug some issues with features in these areas so took the time
to update them to make use of data generators, which are significantly
faster.
2021-01-22 14:52:11 +08:00
Andrew Nicols 7d777911af MDL-66979 behat: Remove unused var 2021-01-22 14:52:11 +08:00
Andrew Nicols d5f211d00f MDL-66979 behat: Whitespace fix 2021-01-22 14:52:11 +08:00
Andrew Nicols afecc583aa MDL-66979 behat: Remove manually triggered events
Behat should not trigger Synthetic browser events. It is incorrect to do
so as the UI should be used to trigger events correctly.

The W3C WebDriver specification explicitly states when and where these
events will be triggered from (the browser) and therefore there is no
ambiguity and no need to synthetically trigger them from Behat.
2021-01-22 14:52:10 +08:00
Andrew Nicols bce46258a4 MDL-66979 group: Replace direct element interaction with steps
The W3C WebDriver leads to faster operation of individual steps which
highlights where WebDriver is moving to a new step faster than the
browser can process it.

The solution here is to use the `execute` function to interact with the
browsers as this makes use of the various wait and check steps.
2021-01-22 14:52:10 +08:00
Andrew Nicols 653fb1842f MDL-66979 behat: Remove unnecessary steps which fail
These steps were completely pointless and were failing with the W3C
Webdriver becuase focus was never on the Update Profile button in the
first place.

At a minimum we should remove the Focus change step as it not valid, but
the following step is also pointless.
2021-01-22 14:52:10 +08:00
Andrew Nicols dd8d8c7ac2 MDL-66979 scorm: Increase behat window size
On Firefox there can be some issues with ensuring that all nodes are
visible in order to click them.

This is likely an upstream geckodriver bug and not one that can be
easily addressed across all of Moodle.

In this instance the "Next" button is just outside the Visible Window,
but it is in an iFrame which is fully visible. In this situation
Firefox is unable to click the button but does not error.
2021-01-22 14:52:10 +08:00
Andrew Nicols 0121d366bf MDL-66979 behat: Scroll nodes into view before hover
The W3C Specification does not require that a NodeElement be in the
current viewport before triggering a mouseOver. As a result the
mouseOver will generate an Exception because the element is not in the
viewport, and the X/Y co-ordinates are invalid.

To handle this the node is scrolled into view.
2021-01-22 14:52:10 +08:00
Andrew Nicols 6a2a2e957b MDL-66979 behat: Fix window switching
Normalise switching of window contexts by setting the main window name
to a null.

Where the window has no name (null/empty), then the root context is
selected.
2021-01-22 14:52:10 +08:00
Andrew Nicols 74a86acc8d MDL-66979 behat: Use tab to blur current focus
The focus should be on something, rather than removed.

The way in which focus removal works can lead to side effects.
2021-01-22 14:52:10 +08:00
Andrew Nicols fd5621554a MDL-66979 behat: Update passwordunmask form field control
Update the passwordunmask form field type for behat to interact with the
form element as a human would rather than via synthetic event triggers.
2021-01-22 14:52:10 +08:00
Andrew Nicols 2a969d891a MDL-66979 behat: iFrames must have a name for switchTo
The W3C WebDriver protocol supports switching of contexts using a named
context, and not the class asscoiated with that context.
2021-01-22 14:52:10 +08:00
Andrew Nicols 2896d23776 MDL-66979 mod_data: Improve behat chart data step
Charts data visibility is more reliable when checked via the
aria-expanded attribute.

The isVisible attribute can cause some failures under Firefox.
2021-01-22 14:52:10 +08:00
Andrew Nicols 041b75f00a MDL-66979 behat: Handle JS on elements better
This change introduces a new function to execute Javascript directly on
a node.

This should not, ordinarily, be used directly by steps, but may be
required in other parts of the Behat interaction.
2021-01-22 14:52:10 +08:00
Andrew Nicols c96cde27ea MDL-66979 behat: Rename selenium config to webdriver
The PHP WebDriver Mink Driver does not necessarily require Selenium. It
supports Selenium 3 upwards, and can be used directly with ChromeDriver,
EdgeDriver, SafariDriver, GeckoDriver, and others.

It therefore uses a slightly different configuraitno path.
2021-01-22 14:52:09 +08:00
Andrew Nicols 50b9866e54 MDL-66979 behat: Core updates for W3C WebDriver
This commit updates core Behat features to make use of the
php-webdriver/webdriver library instead of the legacy Instaclick
library.

Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
2021-01-22 14:52:09 +08:00
Andrew Nicols 007389b214 MDL-66979 behat: Switch to new W3C Behat driver
This commit updates the composer dependencies to make use of the updated
version of moodlehq/moodle-behat-extension which depends upon the
php-webdriver/webdriver and relevant Mink WebDriver.
2021-01-22 14:52:09 +08:00
Jake Dallimore fd840ab59c weekly release 4.0dev 2021-01-22 11:30:38 +08:00
Jake Dallimore 3d5c1693b9 NOBUG: Fixed file access permissions 2021-01-22 11:30:38 +08:00
Jake Dallimore bf8a4a613f Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-01-22 11:30:35 +08:00
Tim Hunt 6a62cbe599 MDL-46256 count_words: fix handling of paragraphs 2021-01-21 09:53:10 +00:00
Paul Holden 278c818e8f MDL-70315 libraries: upgrade Javascript polyfills.
* mdn-polyfills@5.20.0
 * url-polyfill@1.1.12
2021-01-21 08:04:56 +00:00
Jun Pataleta afc39f38af Merge branch 'MDL-70297-master' of git://github.com/ilyatregubov/moodle 2021-01-21 12:19:15 +08:00
Adrian Greeve 3f2462a5c7 Merge branch 'MDL-57020-master-allow_delete_unused_scale' of https://github.com/sharidas/moodle 2021-01-21 12:01:32 +08:00
Mikhail Golenkov ddcd769e93 MDL-69631 assign: Add 'Draft' filter for grading table 2021-01-21 14:36:01 +11:00
Jun Pataleta a61fbcd27d Merge branch 'MDL-70301' of https://github.com/Chocolate-lightning/moodle 2021-01-21 11:33:43 +08:00
Mathew May 6d253061de MDL-70301 lib: Update thirdpartylibs scssphp 2021-01-21 10:33:09 +08:00
Mathew May cda207d07f MDL-70301 lib: Upgrade scssphp to 1.4.1 2021-01-21 10:32:58 +08:00
Adrian Greeve dc77f45fdb Merge branch 'MDL-70302-master' of git://github.com/peterRd/moodle 2021-01-21 09:49:55 +08:00
Peter Dias 05498a0afd MDL-70302 core: Update the lib's readme, xml and upgrade files 2021-01-21 09:32:53 +08:00
Eloy Lafuente (stronk7) 35407b0cb6 Merge branch 'MDL-70317-master' of git://github.com/lucaboesch/moodle 2021-01-20 23:26:38 +01:00
Eloy Lafuente (stronk7) f2d8bd4461 Merge branch 'MDL-70134' of https://github.com/timhunt/moodle 2021-01-20 22:47:15 +01:00
Eloy Lafuente (stronk7) 9fe648d4da Merge branch 'MDL-70055-master' of https://github.com/kabalin/moodle 2021-01-20 19:44:45 +01:00
Eloy Lafuente (stronk7) f291fd3007 Merge branch 'MDL-70291-master-1' of git://github.com/peterRd/moodle 2021-01-20 19:17:20 +01:00
Eloy Lafuente (stronk7) a5c57cd36b Merge branch 'MDL-70438-fix' of https://github.com/sarjona/moodle 2021-01-20 19:00:53 +01:00
Sara Arjona c7a7fdab25 MDL-70438 contentbank: fix behat issue with classic 2021-01-20 17:36:36 +01:00
Eloy Lafuente (stronk7) 9d8e42ac31 Merge branch 'MDL-70296-master-1' of git://github.com/peterRd/moodle 2021-01-20 17:17:44 +01:00
Jun Pataleta cc6868891d Merge branch 'MDL-70319-master' of git://github.com/ilyatregubov/moodle 2021-01-20 22:40:41 +08:00
Jun Pataleta cdcc37ad68 Merge branch 'MDL-70300' of https://github.com/Chocolate-lightning/moodle 2021-01-20 17:13:18 +08:00
Mathew May ca64b0af46 MDL-70300 core_lib: Update thirdpartylibs php-css-parser 2021-01-20 15:52:11 +08:00
Mathew May f2cc1a8a34 MDL-70300 lib: Apply php css parser patches 2021-01-20 15:52:11 +08:00
Mathew May 3b244c0e16 MDL-70300 lib: Upgrade php css parser to 8.3.1 2021-01-20 15:52:11 +08:00
Nadav Kavalerchik 75ceb0495a MDL-66932 theme/boost: Use LTR directionality to display user % grades 2021-01-20 09:27:29 +02:00
Jun Pataleta 0d6ea0d604 Merge branch 'MDL-70562-master' of git://github.com/lucaboesch/moodle 2021-01-20 15:01:34 +08:00
Peter Dias ecb1e0dc18 MDL-56772 core: Update the picker styles for rtl langs 2021-01-20 14:05:23 +08:00
Peter Dias 1e2e5ea0d3 MDL-70339 mod_lti: Use the convenience function to get the right img 2021-01-20 11:49:40 +08:00
Jake Dallimore 5a24764390 Merge branch 'MDL-69333-fingerprint-checks' of https://github.com/brendanheywood/moodle 2021-01-20 11:23:49 +08:00
Peter Dias 0e0d08ed1b MDL-68958 mod_imscp: Return manifestfilename as default response. 2021-01-20 09:51:44 +08:00
Adrian Greeve 07861300d1 Merge branch 'MDL-70438-master' of git://github.com/sarjona/moodle 2021-01-20 09:48:06 +08:00
Simey Lameze e8bd3b41a3 MDL-70648 calendar: upgrade step to delete wrong cat events 2021-01-20 09:36:24 +08:00
Simey Lameze b9e33cccbf MDL-70648 calendar: add form validation for category events 2021-01-20 09:35:42 +08:00
Brendan Heywood a6e9ac9af7 MDL-69333 report_security: Add checks for many public & private urls 2021-01-20 11:19:14 +11:00
Brendan Heywood 5922222778 MDL-69333 error: Allow explicit http error codes in web server config
eg in Apache you could capture 403 errors and funnel them to this
error handler script and also transform them to 404s:

ErrorDocument 403 /error/index.php?code=404
2021-01-20 09:52:25 +11:00
Eloy Lafuente (stronk7) 333472ce2a Merge branch 'MDL-70159' of git://github.com/paulholden/moodle 2021-01-19 23:43:55 +01:00
Tim Hunt 82a050d67b MDL-46256 count_letters: an unit tests and fix HTML editity handling 2021-01-19 16:41:56 +00:00
Tim Hunt c110115cc0 MDL-46256 word count: Convert existing tests to a data provider 2021-01-19 16:41:56 +00:00
Jun Pataleta b935998bee Merge branch 'MDL-70292-master' of git://github.com/ilyatregubov/moodle 2021-01-20 00:12:22 +08:00
Sara Arjona b0f2fb291d Merge branch 'MDL-70303-master' of git://github.com/ferranrecio/moodle 2021-01-19 16:50:01 +01:00
Ferran Recio 23b681c7b5 MDL-70303 libraries: upgrade GeoIP to 2.11.0 and MaxMind DB to 1.9.0 2021-01-19 16:35:04 +01:00
Sara Arjona 3810b293ad MDL-70438 contentbank: Add column to view mode for content uses 2021-01-19 16:08:03 +01:00
Sara Arjona deeadc98d6 MDL-70438 contentbank: Display content uses before removal 2021-01-19 16:08:03 +01:00
Ilya Tregubov 976c6d34e5 MDL-70319 core: Moodle customizations. 2021-01-19 10:03:03 +02:00
Ilya Tregubov c3eff2e3b4 MDL-70319 core: Upgrade php-enum to 1.7.7 2021-01-19 10:02:00 +02:00
Ilya Tregubov db0f3ee517 MDL-70297 libraries: Moodle customizations. 2021-01-19 09:47:13 +02:00
Adrian Greeve 97b18d6743 Merge branch 'MDL-69202_master' of https://github.com/ffhs/moodle 2021-01-19 15:41:24 +08:00
Jake Dallimore 790cb18211 Merge branch 'MDL-69522-custom-message-m' of https://github.com/Peterburnett/moodle 2021-01-19 15:38:01 +08:00
Ilya Tregubov 602498c5e4 MDL-70297 libraries: xhprof upgraded to 2.2.3 2021-01-19 09:31:19 +02:00
Sara Arjona 890d0690d4 MDL-70438 contentbank: Add method get_uses to content 2021-01-19 08:21:30 +01:00
Ilya Tregubov c16c68928b MDL-70292 lib: fix unit tests. 2021-01-19 09:08:44 +02:00
Ilya Tregubov b5ccb0eb46 MDL-70292 lib: Moodle customizations. 2021-01-19 09:05:55 +02:00
Ilya Tregubov df2fba3aa4 MDL-70292 lib: update phpmailer to 6.2.0 2021-01-19 09:02:19 +02:00
Adrian Greeve 38f21e126e Merge branch 'MDL-70128-master' of git://github.com/jleyva/moodle 2021-01-19 14:50:23 +08:00
Jun Pataleta f4074280fb Merge branch 'MDL-70294' of git://github.com/paulholden/moodle 2021-01-19 09:20:44 +08:00
Paul Holden 0f12910aa4 MDL-70294 libraries: document upgrade of TCPDF. 2021-01-18 21:05:05 +00:00
Paul Holden b559600219 MDL-70294 libraries: upgrade to version 6.3.5 of TCPDF. 2021-01-18 21:04:01 +00:00
Tim Hunt f6a665a84a MDL-70134 essay qtype: Provide options for smaller response boxes
And make the default box size 10
2021-01-18 09:21:43 +00:00
Tim Hunt f0934f6db9 MDL-70134 manual grading: make starting comment box size 3 lines
I am guessing most comments are short, and the box can be expanded if needed.
2021-01-18 09:13:56 +00:00
Sara Arjona 309a7f9785 Merge branch 'MDL-70290-master' of git://github.com/peterRd/moodle 2021-01-18 09:23:33 +01:00
Sara Arjona fea8fb3e92 Merge branch 'MDL-70305-master' of git://github.com/peterRd/moodle 2021-01-18 09:20:21 +01:00
Peter Dias f38b21ef5a MDL-70296 core: Update the moodle's readme, xml and upgrade files 2021-01-18 09:30:02 +08:00
Peter Dias 6e266373ad MDL-70296 core: Upgrade markdown lib 2021-01-18 09:29:46 +08:00
Peter Dias 2389cca858 MDL-70291 core: Update lib readme, upgrade and xml files 2021-01-18 09:28:14 +08:00
Peter Dias b21db6aa43 MDL-70291 core: Add custom moodle patch to minify 2021-01-18 09:27:55 +08:00
Peter Dias c28728112f MDL-70291 core: Upgrade pathconverter lib to 1.1.3 2021-01-18 09:27:55 +08:00
Peter Dias aab221f2c3 MDL-70291 core: Upgrade minify lib to 1.3.63 2021-01-18 09:27:55 +08:00
Peter Dias cf06d415c4 MDL-70302 core: Upgrade spout to 3.1.0 2021-01-18 09:19:36 +08:00
AMOS bot c4e4c4ee5c Automatically generated installer lang files 2021-01-17 00:07:52 +00:00
Adrian Perez 9e15569d48 MDL-69202 Restore backup: add getter method for oldmoduleid 2021-01-16 10:25:05 +01:00
Paul Holden c8ed6413f7 MDL-58673 media_videojs: enable playback rates in player. 2021-01-15 14:06:30 +00:00
Paul Holden c4c5eb9ace MDL-70535 media_videojs: fallback to English language video player.
When current language doesn't have accompanying videojs language file
we should fallback to displaying the player in English, otherwise the
web service returns empty and a Javascript exception is triggered.
2021-01-15 13:51:13 +00:00
Luca Bösch 0daf89a0e3 MDL-70562 mod_quiz: "Edit quiz" and "Back to the course" button spacing 2021-01-15 11:59:38 +01:00
Luca Bösch 4dfb1e0c46 MDL-70317 filter_mathjaxloader: update default CDN to 2.7.9 2021-01-15 11:53:10 +01:00
Sujith Haridasan 7b3f43db95 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:07:53 +05:30
Sara Arjona c381757f2a weekly release 4.0dev 2021-01-15 08:25:37 +01:00
Sara Arjona f1333db578 NOBUG: Fixed file access permissions 2021-01-15 08:25:37 +01:00
Sara Arjona c2f91dc03a NOBUG: Fixed SVG browser compatibility 2021-01-15 08:25:35 +01:00
Sara Arjona d6901cc07f Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-01-15 08:25:34 +01:00
Sara Arjona 7d24686e59 Merge branch 'MDL-69308' of https://github.com/stronk7/moodle 2021-01-14 12:03:30 +01:00
Paul Holden 5d778a7646 MDL-65135 message: use full date in messaging drawer for old messages.
Messages sent in previous years will now include the year portion of
the date string.
2021-01-14 08:01:07 +00:00
Paul Holden 20905a1481 MDL-70159 tool_capability: order capabilities by their name. 2021-01-14 07:32:56 +00:00
Jake Dallimore f89a0a8748 Merge branch 'MDL-69877-master' of git://github.com/mickhawkins/moodle 2021-01-14 14:51:46 +08:00
Michael Hawkins 01a775cf34 MDL-69877 core: Added security.txt 2021-01-14 14:29:55 +08:00
Jun Pataleta adbebb3bcc Merge branch 'MDL-70312' of git://github.com/paulholden/moodle 2021-01-14 11:54:37 +08:00
Jake Dallimore a2ab10fca4 Merge branch 'MDL-68608-improve-readonly-debugging' of https://github.com/brendanheywood/moodle 2021-01-14 08:48:10 +08:00
Adrian Greeve eceeb180bf Merge branch 'MDL-68597' of https://github.com/timhunt/moodle 2021-01-14 08:35:02 +08:00
AMOS bot 6edf56a163 Automatically generated installer lang files 2021-01-14 00:07:47 +00:00
Peter Dias af73671e65 MDL-70290 core: Update the lib's xml and upgrade files 2021-01-14 07:58:29 +08:00
Peter Dias 6a32601010 MDL-70290 core: HTMLPurifier upgrade to 4.13.0 2021-01-14 07:57:58 +08:00
Peter Dias a0573603e6 MDL-70305 lib: Update thirdpartylibs chartjs version 2021-01-14 07:54:19 +08:00
Peter Dias 79ee30c6ca MDL-70305 lib: Upgrade chartjs to 2.9.4 2021-01-14 07:36:35 +08:00
Eloy Lafuente (stronk7) e15aaed77a Merge branch 'MDL-70408-master' of git://github.com/sarjona/moodle 2021-01-13 23:59:36 +01:00
Eloy Lafuente (stronk7) 77342b96fc MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018120300 (v3.6.0) as anti-cheating measure.

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:11:19 +01:00
Sara Arjona b3164b3253 Merge branch 'MDL-70299' of git://github.com/paulholden/moodle 2021-01-13 17:19:50 +01:00
Shamim Rezaie 8d9f0ef52c MDL-70625 core_calendar: Fix whitespace appearance in the id attribute 2021-01-14 01:54:26 +11:00
Sara Arjona 8717e87916 Merge branch 'MDL-70394-master' of git://github.com/rezaies/moodle 2021-01-13 15:31:11 +01:00
Sara Arjona 58eaf86573 Merge branch 'MDL-70387-master' of git://github.com/jleyva/moodle 2021-01-13 14:56:04 +01:00
Juan Leyva 7f02879ce7 MDL-70387 files: New WS core_files_get_unused_draft_itemid 2021-01-13 13:01:40 +01:00
Sara Arjona f287ef5cb2 Merge branch 'master-MDL-70362' of https://github.com/golenkovm/moodle 2021-01-13 12:36:24 +01:00
Sara Arjona 8f4ff3014d Merge branch 'MDL-68010-cron-run-disabled' of https://github.com/brendanheywood/moodle 2021-01-13 11:28:10 +01:00
Tim Hunt c4e2b67c22 MDL-68597 qtype_essay: show the word count on the review screen 2021-01-13 10:27:40 +00:00
Tim Hunt 6fc462ad4d MDL-68597 qtype_essay: switch the form to consistently use hideIf 2021-01-13 10:27:40 +00:00
Tim Hunt d9b0da85cc MDL-68597 essay word limits: fixes requested by the integrator 2021-01-13 10:27:40 +00:00
Mahmoud Kassaei 997a407b37 MDL-68597 qtype_essay: add word min/max for online text input 2021-01-13 10:27:14 +00:00
Mihail Geshoski 06a338f00b MDL-68486 auth_shibboleth: Reset convert_data if it uses dataroot file
Upgrade step that resets the 'Data modification API' (convert_data)
setting to its default value if this setting is currently configured
to use a file located within the $CFG->dataroot directory.
2021-01-13 12:34:24 +08:00
Mihail Geshoski 6c51299e30 MDL-68486 auth_shibboleth: Prevent using dataroot files in convert_data
Prevents configuring the 'Data modification API' (convert_data) setting
to use files located within the $CFG->dataroot directory as it exposes
the site to security risks.
2021-01-13 12:34:24 +08:00
Jun Pataleta 81cb8b9f09 Merge branch 'MDL-70580' of git://github.com/paulholden/moodle 2021-01-13 10:20:20 +08:00
AMOS bot 66d960259c Automatically generated installer lang files 2021-01-13 00:07:48 +00:00
Paul Holden be48efc9b7 MDL-70580 core: retrieve closest tree node in click handler. 2021-01-12 20:11:25 +00:00
Michael Hawkins 11e13d1629 MDL-69911 core: Clean content passed through TeX filter 2021-01-12 17:14:33 +01:00
Ferran Recio ce87be7db6 MDL-67782 message: fix messages max length 2021-01-12 17:14:33 +01:00
Juan Segarra Montesinos b17037b960 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 17:14:33 +01:00
Juan Segarra Montesinos 8fb9f2bcc5 MDL-69797 core_grades: Implement authorization into fetch method 2021-01-12 17:14:33 +01:00
Juan Segarra Montesinos 8a5f5c3ef9 MDL-69797 gradingform_rubric: Implement authorization into fetch method 2021-01-12 17:14:33 +01:00
Juan Segarra Montesinos eda0980d7a MDL-69797 gradingform_guide: Implement authorization into fetch method 2021-01-12 17:14:33 +01:00
Sara Arjona d716a3f151 Merge branch 'MDL-70308-master' of git://github.com/ferranrecio/moodle 2021-01-12 17:04:25 +01:00
Sara Arjona 894c9c9d7b Merge branch 'MDL-70298-master' of git://github.com/ilyatregubov/moodle 2021-01-12 15:58:34 +01:00
Ilya Tregubov 49266827c4 MDL-70298 lib_horde: Upgrade Horde library to 5.2.23 2021-01-12 15:57:58 +02:00
Sara Arjona 51bf5852ec Merge branch 'MDL-70009-master' of git://github.com/ilyatregubov/moodle 2021-01-12 10:20:55 +01:00
Jake Dallimore 893411c673 Merge branch 'MDL-69431-master' of git://github.com/watson8/moodle 2021-01-12 17:08:29 +08:00
Sara Arjona d9df954a25 Merge branch 'MDL-68768-adhoc-task-faildelay-check' of https://github.com/brendanheywood/moodle 2021-01-12 10:06:53 +01:00
Jake Dallimore 606a534571 Merge branch 'MDL-69529-master' of git://github.com/ilyatregubov/moodle 2021-01-12 16:40:26 +08:00
Ilya Tregubov bcdf87a877 MDL-70009 h5pactivity: Split get_pluginfile_hash in two methods. 2021-01-12 09:10:24 +02:00
Jun Pataleta 495f45ef3b Merge branch 'MDL-70580' of git://github.com/paulholden/moodle 2021-01-12 13:16:00 +08:00
AMOS bot 90ceeab2f9 Automatically generated installer lang files 2021-01-12 00:07:57 +00:00
Andrew Nicols d0bc893972 MDL-70580 core: Tree nodes should check if they were clicked directly 2021-01-11 23:42:03 +00:00
Eloy Lafuente (stronk7) d64aa10197 Merge branch 'MDL-70486-master-get_region_name' of git://github.com/mudrd8mz/moodle 2021-01-11 22:55:19 +01:00
Tim Hunt 937cb2cfa4 MDL-70574 qtype_multianswer: fractional scores should be possible 2021-01-11 17:31:23 +00:00
Michael Hawkins dc9de7b0d4 MDL-70571 lib: Added additional escaping to search_input template 2021-01-11 16:20:16 +01:00
Eloy Lafuente (stronk7) 36ef29a8e9 Merge branch 'MDL-70266' of https://github.com/timhunt/moodle 2021-01-11 16:11:50 +01:00
Sara Arjona df8df7477c Merge branch 'MDL-70034_master' of git://github.com/mdjnelson/moodle 2021-01-11 15:19:22 +01:00
Sara Arjona 5a8ccff85b Merge branch 'MDL-70567-master' of https://github.com/dmitriim/moodle 2021-01-11 13:09:34 +01:00
Sara Arjona c89e435316 Merge branch 'MDL-70578-master' of git://github.com/lucaboesch/moodle 2021-01-11 12:58:01 +01:00
Sara Arjona 786bb3422c Merge branch 'MDL-70352-master' of https://github.com/dmitriim/moodle 2021-01-11 12:23:47 +01:00
AMOS bot 1f26285707 Automatically generated installer lang files 2021-01-11 00:09:02 +00:00
Eloy Lafuente (stronk7) cc0e5e223d MDL-69308 github actions: Bump min PHP requirement to 7.3 2021-01-10 23:44:47 +01:00
Eloy Lafuente (stronk7) 1dbb7f3d6b MDL-69308 travis: Bump min PHP requirement to 7.3 2021-01-10 23:42:52 +01:00
Eloy Lafuente (stronk7) 632aceec60 MDL-69308 environment: Apply agreed changes
- PHP 7.3 required.
- Moodle 3.6 required.
- SQL*Server 2017 (aka, 14.0) required.
- Sodium PHP extension required.
2021-01-10 23:38:34 +01:00
Eloy Lafuente (stronk7) 79e6e5b920 MDL-69308 environment: 3.11 base information
This is a direct copy of the 3.10 branch to have
the changes under control in next commits.
2021-01-10 23:32:04 +01:00
David Watson ddc0da4b31 MDL-69431 course: validate section url param against maxsections 2021-01-10 17:26:31 +00:00
Eloy Lafuente (stronk7) a1c6c4b5a1 Merge branch 'MDL-70550-master-enfix' of git://github.com/mudrd8mz/moodle 2021-01-09 13:17:35 +01:00
Mark Nelson 9c7135ea92 MDL-70034 gradingform_guide: use new API to retrieve grade item name 2021-01-09 14:30:22 +08:00
AMOS bot 3603697744 Automatically generated installer lang files 2021-01-09 00:07:55 +00:00
Paul Holden 23765039d4 MDL-69816 tool_uploadcourse: configure course content download value. 2021-01-08 18:43:49 +00:00
Sara Arjona 8905bbd4c8 Merge branch 'MDL-70558' of git://github.com/paulholden/moodle 2021-01-08 17:06:30 +01:00
Sara Arjona 6231d34a03 Merge branch 'MDL-70102-master' of https://github.com/sammarshallou/moodle 2021-01-08 15:50:08 +01:00
Paul Holden 67f137832d MDL-70299 libraries: upgrade to version 1.7.1 of loglevel. 2021-01-08 09:55:03 +00:00
David Mudrák 2fba82e7b6 MDL-70550 lang: Use the fixed strings in Behat tests, too 2021-01-08 08:33:42 +01:00
Jun Pataleta e751c98000 Merge branch 'MDL-70310-master' of git://github.com/ilyatregubov/moodle 2021-01-08 14:47:30 +08:00
Luca Bösch e25c56ac94 MDL-70578 cohorts: Add bootstrap classes to buttons 2021-01-08 07:28:34 +01:00
Jun Pataleta ed2400457b weekly release 4.0dev 2021-01-08 12:14:45 +08:00
Jun Pataleta 4dda07c63c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2021-01-08 12:14:42 +08:00
AMOS bot 01901e420b Automatically generated installer lang files 2021-01-08 00:07:47 +00:00
Eloy Lafuente (stronk7) 74200b8adc Merge branch 'MDL-70245-master' of https://github.com/TomoTsuyuki/moodle 2021-01-07 23:49:05 +01:00
Eloy Lafuente (stronk7) c2a21a2862 Merge branch 'MDL-70584-master' of git://github.com/marinaglancy/moodle 2021-01-07 23:31:09 +01:00
Helen Foster 8e080c9703 MDL-70550 lang: Import fixed English strings (en_fix) 2021-01-07 19:35:32 +01:00
sam marshall b5568aad80 MDL-70102 PHPunit: Core test fails with weird added modules
Specifically it fails if the modules have unusual default capabilities
so that editingteacher doesn't have addinstance.
2021-01-07 16:09:57 +00:00
Marina Glancy 5ac66934f4 MDL-70584 core_iplookup: increase tolerance in test 2021-01-07 14:12:59 +01:00
Tim Hunt 3fbf8529ab MDL-70266 quiz overrides: respect show user identity setting 2021-01-07 10:38:39 +00:00
Ilya Tregubov 0511eb9d6c MDL-70310 user: Remove yahoo icon since domain no longer exists. 2021-01-07 09:14:44 +02:00
Jun Pataleta 50fdadffc0 Merge branch 'MDL-70374' of https://github.com/timhunt/moodle 2021-01-07 12:37:08 +08:00
Eloy Lafuente (stronk7) c59c8e79ec Merge branch 'MDL-70476' of https://github.com/timhunt/moodle 2021-01-07 00:27:48 +01:00
Eloy Lafuente (stronk7) fd1d9fec1e Merge branch 'master_MDL-70520' of https://github.com/golenkovm/moodle 2021-01-07 00:17:08 +01:00
Paul Holden 6fc5f5f1f6 MDL-70579 course: filter site fullname when exporting course content. 2021-01-06 21:28:53 +00:00
Adrian Greeve b65cfd4330 Merge branch 'MDL-70482_master' of https://github.com/sebmehr/moodle 2021-01-06 11:27:17 +08:00
Dmitrii Metelkin 7ccbd912e7 MDL-70567 task: fix broken result filter on logs page 2021-01-06 13:12:43 +11:00
Jun Pataleta 62630bf781 Merge branch 'MDL-57552-master' of git://github.com/aanabit/moodle 2021-01-05 22:20:32 +08:00
Jun Pataleta 22295df424 Merge branch 'master-MDL-68792_v3' of https://github.com/golenkovm/moodle 2021-01-05 22:09:19 +08:00
Paul Holden cbd719556e MDL-70558 tool_langimport: sort available language packs. 2021-01-04 23:53:05 +00:00
Paul Holden a2a410fe09 MDL-70312 libraries: upgrade to version 2.3.5 of FPDI. 2021-01-04 09:34:17 +00:00
Amaia Anabitarte bafdfedf9d MDL-57552 core_course: Typo in view-combined class 2021-01-04 09:48:14 +01:00
Ilya Tregubov 1ec93d4747 MDL-69529 contentbank: Remove redundant code. 2021-01-04 09:28:17 +02:00
Dmitrii Metelkin 21789c7168 MDL-70352 core: attach modal to a specific element 2020-12-31 14:02:20 +11:00
AMOS bot 14afe023f5 Automatically generated installer lang files 2020-12-27 00:07:49 +00:00
Ruslan Kabalin 536fdb0c2f MDL-70055 pgsql DML: Support large number of SQL-IN parameters.
This patch adds a solution for Postgres that allows overriding IN
statement limit of 16bit (65535 values) by wrapping items in VALUES
list. This only takes place in number of items exceeds 65535, otherwise
parent class get_in_or_equal() function is used.
2020-12-24 14:39:21 +00:00
Sébastien Mehr 95c5173789 MDL-70482 template: add missing closing bracket 2020-12-24 13:54:00 +01:00
AMOS bot bcc9b96468 Automatically generated installer lang files 2020-12-24 00:07:56 +00:00
Eloy Lafuente (stronk7) 56fd8c5125 weekly release 4.0dev 2020-12-23 20:24:28 +01:00
Eloy Lafuente (stronk7) 32a90b9b80 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2020-12-23 20:24:25 +01:00
Ferran Recio 6f8a3bc181 MDL-70308 libraries: upgrade videojs to 7.10.0 2020-12-23 11:04:17 +01:00
Jake Dallimore d0915426f1 Merge branch 'MDL-69399-master_lti_alpha' of https://github.com/haietza/moodle 2020-12-23 11:36:34 +08:00
Eloy Lafuente (stronk7) 546c0307cd Merge branch 'MDL-56119-DEV' of https://github.com/inigozendegi/moodle 2020-12-23 01:23:13 +01:00
Eloy Lafuente (stronk7) 2d37d7f94d Merge branch 'MDL-70279' of git://github.com/paulholden/moodle 2020-12-23 00:46:42 +01:00
Eloy Lafuente (stronk7) 4598041cf1 Merge branch 'MDL-70436-master' of git://github.com/bmbrands/moodle 2020-12-22 18:29:17 +01:00
Eloy Lafuente (stronk7) 663412626f Merge branch 'MDL-70386-master' of git://github.com/bmbrands/moodle 2020-12-22 18:21:02 +01:00
Víctor Déniz 7c3f210441 Merge branch 'MDL-70341-task-override-fix-disabled' of https://github.com/jamie-catalyst/moodle 2020-12-22 12:04:41 +00:00
Jake Dallimore 814f60a438 Merge branch 'MDL-70459-master' of git://github.com/rezaies/moodle 2020-12-22 16:50:41 +08:00
Jake Dallimore b2382c7d38 Merge branch 'MDL-69422-master-2' of git://github.com/junpataleta/moodle 2020-12-22 15:58:21 +08:00
Jake Dallimore cc1ad82037 Merge branch 'MDL-70426-master' of https://github.com/HuongNV13/moodle 2020-12-22 15:15:56 +08:00
Jake Dallimore f0f6f79027 Merge branch 'master-MDL-64865' of https://github.com/kristian-94/moodle 2020-12-22 13:39:00 +08:00
Mikhail Golenkov c8229e3915 MDL-70520 mod_assign: Use task API to get scheduled task lastruntime 2020-12-22 12:57:17 +11:00
Andrew Nicols eed01bbc94 Merge branch 'MDL-65856' of https://github.com/hdagheda/moodle 2020-12-22 09:38:01 +08:00
AMOS bot 2a2435d0c4 Automatically generated installer lang files 2020-12-22 00:07:48 +00:00
Mikhail Golenkov eb694bdd5a MDL-70520 tasks: Keep lastruntime when a scheduled task is reset 2020-12-22 10:37:43 +11:00
Víctor Déniz 4d3da873b2 Merge branch 'MDL-70355-master' of git://github.com/lucaboesch/moodle 2020-12-21 23:20:14 +00:00
Eloy Lafuente (stronk7) 2a698951e5 Merge branch 'MDL-70430-master-oauth2refreshtoken' of git://github.com/mudrd8mz/moodle 2020-12-22 00:06:32 +01:00
Víctor Déniz 92e59b663d Merge branch 'MDL-70284-dynreg-bug' of https://github.com/cengage/moodle 2020-12-21 16:39:08 +00:00
Heena Agheda 9c5dc8fc7d MDL-65856 session: UX review of session timeout
Add new setting 'sessiontimeoutwarning', gives logged in user ability to extend session when there is no activity.
2020-12-21 08:43:21 +11:00
Sara Arjona 8099deda48 Merge branch 'MDL-69107-master-2' of git://github.com/andrewnicols/moodle 2020-12-18 15:22:09 +01:00
Michelle Melton 6c235e4e96 MDL-69399 LTI: Alphabetize LTI tool list in selection menu 2020-12-18 08:58:07 -05:00
Tim Hunt add7ebab30 MDL-70374 qtype_multichoice: code cleanup
* Remove some obsoliete CSS.
* Put the CSS in a more logical order.
* Rename some variables in the renderer, for more clarity.
2020-12-18 13:12:54 +00:00
Tim Hunt 4d23573182 MDL-70374 qtype_multichoice: improve alignment of choices 2020-12-18 12:59:30 +00:00
Mikhail Golenkov 5d7941c893 MDL-70362 admin_cli: Add showdebugging and showsql to uninstall_plugins 2020-12-18 12:15:51 +11:00
Mikhail Golenkov b01eb0b3f8 MDL-68792 theme_boost: Do not move blocks on embedded layout. 2020-12-18 12:06:03 +11:00
Mikhail Golenkov 8325c83b20 MDL-68792 theme_boost: Show the fake blocks on embedded layout. 2020-12-18 12:06:03 +11:00
Sara Arjona 064e1a7e39 MDL-70408 mod_h5pactivity: Add link to content bank content
If the activity uses a referenced H5P file from the content bank,
a link for displaying this specific content will be shown into the H5P
activity form instead of the generic one to the main content bank
page.
2020-12-17 18:32:38 +01:00
Luca Bösch 940689126e MDL-70355 calendar: Filter popuptext for calendar entries. 2020-12-17 17:46:42 +01:00
Sara Arjona 4ec279a2f0 weekly release 4.0dev 2020-12-17 15:52:41 +01:00
Sara Arjona f480067e39 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2020-12-17 15:52:38 +01:00
David Mudrák f00ad20a6f MDL-70486 output: Improve check for block region name string existence
* The fact that non-existing strings are returned in certain format
  starting with the bracket, is kind of side debugging effect. The value
  is really undefined and should not be relied upon.
* The string could actually exist and be worded so that its first
  character is also the square bracket.
2020-12-17 10:04:46 +01:00
Jake Dallimore cc52b8fad0 Merge branch 'MDL-65284-master' of git://github.com/aanabit/moodle 2020-12-17 11:06:16 +08:00
Jake Dallimore 4946c2b2ea Merge branch 'MDL-66138-master' of git://github.com/ilyatregubov/moodle 2020-12-17 10:57:14 +08:00
Jun Pataleta d27c4f8566 Merge branch 'MDL-68831' of https://github.com/timhunt/moodle 2020-12-17 00:04:33 +08:00
Jun Pataleta 037417af1d Merge branch 'MDL-69735' of https://github.com/timhunt/moodle 2020-12-16 23:01:28 +08:00
Ilya Tregubov b9c1eabe0c MDL-66138 forum: Deprecate get_forum_discussions_paginated 2020-12-16 16:32:24 +02:00
Tim Hunt 7d11dcfde2 MDL-68831 quiz overrides: show a summary on the quiz info page 2020-12-16 14:21:45 +00:00
Shamim Rezaie 0dc19291b9 MDL-70394 paygw_paypal: Fix the incorrect foreign key 2020-12-17 00:20:59 +11:00
Víctor Déniz 9c83fc0399 Merge branch 'MDL-70261-master' of git://github.com/ilya-catalyst/moodle 2020-12-16 12:37:10 +00:00
Amaia Anabitarte 46927df906 MDL-65284 analytics: Final deprecation get_analysables() 2020-12-16 12:47:52 +01:00
Sara Arjona 45bbc5a4cf Merge branch 'MDL-70373' of https://github.com/timhunt/moodle 2020-12-16 12:40:36 +01:00
Shamim Rezaie 22dfcb1029 MDL-70459 enrol_fee: Sort the list of currencies when displaying 2020-12-16 22:26:44 +11:00
Sara Arjona 2aa55eb4a5 Merge branch 'MDL-70322-master' of git://github.com/roland04/moodle 2020-12-16 12:04:03 +01:00
Jun Pataleta eacff87304 Merge branch 'MDL-68481_master' of git://github.com/mdjnelson/moodle 2020-12-16 15:20:12 +08:00
Jun Pataleta 57485d656f Merge branch 'MDL-68533_master-clean_param' of git://github.com/mdjnelson/moodle 2020-12-16 12:49:03 +08:00
Jun Pataleta d4b9511bbe Merge branch 'MDL-54907' of https://github.com/timhunt/moodle 2020-12-16 10:34:58 +08:00
Andrew Nicols 31402aa406 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Sara Arjona f7bd85b502 Merge branch 'MDL-70422' of https://github.com/paulholden/moodle 2020-12-15 16:42:46 +01:00
Sara Arjona df7701598b Merge branch 'MDL-70409-master' of git://github.com/merrill-oakland/moodle 2020-12-15 16:15:34 +01:00
Shamim Rezaie 9f4a7c6da1 MDL-70459 core_payment: use array_merge to merge currencies 2020-12-16 01:54:18 +11:00
Tim Hunt fbc010aca1 MDL-70476 permission overrides: role names double-escaped in tool tip 2020-12-15 14:51:32 +00:00
Sara Arjona cb9b0032be Merge branch 'MDL-70342-master' of git://github.com/abias/moodle 2020-12-15 15:28:39 +01:00
Sara Arjona 50cfe2c0a2 Merge branch 'MDL-70357-master-cronlibthrowables' of git://github.com/mudrd8mz/moodle 2020-12-15 14:55:46 +01:00
Ilya Tregubov 3952391706 MDL-70261 course: Allow update locked course custom fields
on course upload.
2020-12-15 14:39:31 +02:00
Jake Dallimore d520e005f8 Merge branch 'MDL-67623-40_blocks_myoverview_pagination_regression' of https://github.com/tomdickman/moodle 2020-12-15 18:21:13 +08:00
Brendan Heywood 75d5debe54 MDL-68010 tool_task: Allow disable tasks to still be run manually 2020-12-15 16:59:47 +11:00
Jun Pataleta b4ea4caf0f Merge branch 'MDL-70361-dlrlid' of https://github.com/cengage/moodle 2020-12-15 11:16:58 +08:00
Brendan Heywood 71f180447a MDL-68768 tool_tasks: Check for failing adhoc tasks 2020-12-15 12:49:00 +11:00
Andrew Nicols f07d3b71d2 MDL-69107 form_autocomplete: Rewrite item selection
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.

The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
2020-12-15 09:08:05 +08:00
AMOS bot 235a9bd837 Automatically generated installer lang files 2020-12-15 00:07:48 +00:00
Sara Arjona a7d39bc3bd Merge branch 'MDL-70397-master' of git://github.com/andrewnicols/moodle 2020-12-14 17:11:46 +01:00
Jake Dallimore 5c10b07c6f Merge branch 'MDL-70324-master' of https://github.com/JBThong/moodle 2020-12-14 11:29:37 +08:00
Brendan Heywood 1dadeaeb39 MDL-68608 session: Improved the readonly session debugging 2020-12-14 14:09:55 +11:00
Tom Dickman c00fc9707f MDL-67623 block overview: fix pagination regression
Fixed a regression caused by MDL-64194 resulting in Dashboard - Course
overview pagination not working from second page of courses onwards.

Course overview block should now do the following:
- Display no pagination controls when user has no courses
- Display no pagination controls when less than 12 courses to display
- Only display pagination controls up to the number of courses user is
enrolled in
- Work correctly when on a page greater than the second page.
2020-12-14 13:15:26 +11:00
AMOS bot 90ae7f3dc7 Automatically generated installer lang files 2020-12-13 00:07:48 +00:00
Mark Nelson 9fff03a90a MDL-68481 mod_folder: stream files when creating zip 2020-12-12 12:49:04 +08:00
Mark Nelson 3b687239da MDL-68533 mod_assign: stream files when creating zip 2020-12-12 12:44:55 +08:00
Mark Nelson 38cd9a6bd7 MDL-68533 core_files: add archive_writer API 2020-12-12 12:44:55 +08:00
AMOS bot 6be26114df Automatically generated installer lang files 2020-12-12 00:07:59 +00:00
AMOS bot 2b7c85cc4e Merge branch 'master' into install_master 2020-12-12 00:07:58 +00:00
Tim Hunt 7350f41bf8 MDL-69735 quiz: new capability for read-only view of setting overrides 2020-12-11 19:54:40 +00:00
Tim Hunt 5a96b5427f MDL-69735 core renderer notifications: make closebutton option usable 2020-12-11 19:54:39 +00:00
Mikel Martín c31561e4a2 MDL-70322 core_search: consistent search icon 2020-12-11 15:42:47 +01:00
AMOS bot 5587d30083 Automatically generated installer lang files 2020-12-11 00:07:56 +00:00
Víctor Déniz c307f3b138 weekly release 4.0dev 2020-12-10 21:09:54 +00:00
Víctor Déniz 6078300141 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2020-12-10 21:09:47 +00:00
Shamim Rezaie 1ca295c34f MDL-69301 theme_boost: Remove the special handling of Escape key 2020-12-10 15:05:11 +08:00
Tomo Tsuyuki 745d4c2a4f MDL-70245 core_grade: Fix grade_get_setting unit test failures
To fix the phpunit issue, change from static variable to use cache
2020-12-10 16:46:09 +11:00
Jake Dallimore b83d99c4cf Merge branch 'MDL-70320-master' of https://github.com/andrewnicols/moodle 2020-12-10 11:56:40 +08:00
Andrew Nicols c571f582bf MDL-70320 behat: User full path to page admin node 2020-12-10 07:53:56 +08:00
Bas Brands 250ff98be3 MDL-70386 theme_boost: quizes correctness badges 2020-12-09 18:07:10 +01:00
Bas Brands 105e6b5b5e MDL-70436 theme_boost: closebutton styles in moodle-dialog-fullscreen 2020-12-09 14:46:24 +01:00
Víctor Déniz 8027c25085 Merge branch 'MDL-63683-master' of https://github.com/dravek/moodle 2020-12-09 12:48:34 +00:00
Iñigo Zendegi 5cbd7a1d0f MDL-56119 gradingform_rubric: Rubric display layout issue 2020-12-09 13:44:48 +01:00
Jake Dallimore 6a053ecbf0 Merge branch 'MDL-70151-master' of git://github.com/andrewnicols/moodle 2020-12-09 14:45:39 +08:00
Shamim Rezaie 4f82e3c5db MDL-69301 behat: comment a test out
The e.key is not filled correctly by Geckodriver on the verssion of
Firefox that we use.
2020-12-09 13:43:45 +08:00
Andrew Nicols 9b30fc2beb Merge branch 'MDL-65186-master' of git://github.com/ilya-catalyst/moodle 2020-12-09 13:31:42 +08:00
Huong Nguyen d07c7ae33e MDL-70426 qtype_ddmarker: infinite markers keep duplicating 2020-12-09 11:16:31 +07:00
Andrew Nicols 9d8a0d3574 Merge branch 'MDL-70295' of git://github.com/paulholden/moodle 2020-12-09 12:09:37 +08:00
Andrew Nicols cd3809653c Merge branch 'MDL-70320' of https://github.com/timhunt/moodle 2020-12-09 11:56:05 +08:00
Andrew Nicols eec9da5b68 Merge branch 'MDL-70293' of git://github.com/paulholden/moodle 2020-12-09 11:28:41 +08:00
Andrew Nicols ad3153940d Merge branch 'MDL-69869-master' of git://github.com/ilya-catalyst/moodle 2020-12-09 11:08:06 +08:00
Jake Dallimore e26cfc19c7 Merge branch 'MDL-69145-master-3' of git://github.com/junpataleta/moodle 2020-12-09 11:00:22 +08:00
Jun Pataleta a6e4ea65a4 MDL-69145 core_user: Set default filter to ALL 2020-12-09 10:51:12 +08:00
Jun Pataleta a489f20f17 MDL-69145 core: Set the default filterset join type to ALL
* Plus minor PHPDoc type fix for the JOINTYPE_DEFAULT constants
2020-12-09 10:51:06 +08:00
Andrew Nicols 47eda9594a Merge branch 'MDL-62707' of https://github.com/paulholden/moodle 2020-12-09 08:51:53 +08:00
David Mudrák 16d8706e2e MDL-70430 oauth2: Fix storing of the new refresh token
There was a typo - missing underscore. As a result, the new refresh
token was never updated in the database. Depending on the issuer and
whether or when theyu invalidate issued refresh tokens, this might or
might not make the token refresh stop working.
2020-12-08 11:26:23 +01:00
Jake Dallimore 7430e7c074 Merge branch 'MDL-70285' of https://github.com/timhunt/moodle 2020-12-08 16:31:54 +08:00
Ilya Tregubov aa1691d811 MDL-69869 enrol: Fixing intendation for travis. 2020-12-08 09:15:15 +02:00
Ilya Tregubov 65a1d6e8e0 MDL-69869 enrol: Clean up - switch to [] from array(). 2020-12-08 09:15:15 +02:00
Ilya Tregubov e53bc6a1f8 MDL-69869 enrol: Add ability to get suspended users through
core_enrol_get_enrolled_users webservice.
2020-12-08 09:15:15 +02:00
Ilya Tregubov 2cc84a792b MDL-65186 analytics: Deprecate add_builtin_models 2020-12-08 09:12:00 +02:00
AMOS bot caddd393c6 Automatically generated installer lang files 2020-12-08 00:07:46 +00:00
Kristian Ringer 3a9e3f1db4 MDL-64865 auth: Log changing auth config in get_enabled_auth_plugins 2020-12-08 09:10:14 +11:00
Jamie Stamp 2fee98919d MDL-70341 tasks: Allow disabled tasks to be overridden 2020-12-07 16:53:19 +00:00
Paul Holden 509a0f4d00 MDL-70422 restore: fix for undefined question answer ordering in test. 2020-12-07 10:13:22 +00:00
Peter Burnett c426b09d0d MDL-69522 antivirus: Added ability for scanners to set found message 2020-12-07 14:44:24 +10:00
Jake Dallimore 972e098275 Merge branch 'MDL-64982-master' of git://github.com/rezaies/moodle 2020-12-07 12:03:20 +08:00
Jake Dallimore de5780279b Merge branch 'MDL-65818-master' of https://github.com/sammarshallou/moodle 2020-12-07 11:26:32 +08:00
Adrian Greeve b4e6552776 Merge branch 'MDL-69301-master' of git://github.com/rezaies/moodle 2020-12-07 10:05:55 +08:00
AMOS bot 266ee66058 Automatically generated installer lang files 2020-12-06 00:07:53 +00:00
Eric Merrill 9e830efe9d MDL-70409 chat: Use require_once to import lib.php 2020-12-04 10:44:12 -05:00
Paul Holden 1cef02d293 MDL-70279 tool_templatelibrary: preserve component search field value. 2020-12-04 14:55:38 +00:00
sam marshall ddbafce0e0 MDL-65818 Security: Encryption API and admin setting for secure data 2020-12-04 14:41:21 +00:00
Paul Holden e7e62a4b2e MDL-62707 search: account for no matching courses when listing areas.
When limiting the list of courses during retrieval of the search areas
the user can access, make sure we have some contexts before looking
for blocks.
2020-12-04 09:42:59 +00:00
David Matamoros 9b5eb38f55 MDL-63683 enrol: Fix plugin settings when no role has student archetype 2020-12-04 09:09:37 +01:00
Shamim Rezaie 77baa12643 MDL-64982 behat: Remove deprecated behat timeout constants
Behat timeout constants behat_base::TIMEOUT, EXTENDED_TIMEOUT, and
REDUCED_TIMEOUT, which were deprecated in 3.7, have been removed.
2020-12-04 17:07:06 +11:00
Andrew Nicols aba763fdc0 MDL-70397 behat: Prevent browser restarting after initial start 2020-12-04 12:05:39 +08:00
Jake Dallimore 7fa836cf36 weekly release 4.0dev 2020-12-04 08:42:34 +08:00
Jake Dallimore ca963d790e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2020-12-04 08:42:31 +08:00
Juan Leyva 29c6b17d6b MDL-70128 webservice: New entry point for draftfiles 2020-12-03 14:28:12 +01:00
Jake Dallimore 0dcc55e25a Merge branch 'MDL-70326' of https://github.com/durzo/moodle 2020-12-03 11:53:53 +08:00
Andrew Nicols 5eca1223c3 Merge branch 'MDL-70327-master' of git://github.com/cescobedo/moodle 2020-12-03 11:49:35 +08:00
Andrew Nicols 9e12342aa5 Merge branch 'MDL-70321' of https://github.com/timhunt/moodle 2020-12-03 11:39:13 +08:00
Jake Dallimore 3022dfa1b5 Merge branch 'MDL-69411-master' of git://github.com/dravek/moodle 2020-12-03 11:36:26 +08:00
Jake Dallimore f403766f1e Merge branch 'MDL-67460-master_profile_secure' of https://github.com/beenet-dev/moodle 2020-12-03 11:15:30 +08:00
Adrian Greeve a051f6d13a Merge branch 'wip_MDL-70267_master' of git://github.com/gjb2048/moodle 2020-12-03 10:59:03 +08:00
Jake Dallimore cad122fee7 Merge branch 'MDL-65319-master' of git://github.com/peterRd/moodle 2020-12-03 10:28:29 +08:00
Jake Dallimore c196068cc4 Merge branch 'MDL-65086-master' of git://github.com/peterRd/moodle 2020-12-03 10:15:19 +08:00
Adrian Greeve ef4a0fc128 Merge branch 'MDL-70167-master' of git://github.com/andrewnicols/moodle 2020-12-03 10:09:47 +08:00
AMOS bot 94f0e0e903 Automatically generated installer lang files 2020-12-03 00:07:52 +00:00
Andrew Nicols 1cdae7a717 Merge branch 'MDL-69868-master' of git://github.com/ilya-catalyst/moodle 2020-12-03 07:47:12 +08:00
Tim Hunt 7a1da781a9 MDL-70373 qtype_essay: missing border on atto input 2020-12-02 20:08:53 +00:00
Shamim Rezaie 4dfc4adfa1 MDL-69301 theme_boost: Use event.key in aria.js
Both event.which and event.keyCode are deprecated. So
We switched to using event.key. We can only do so now
because IE is no longer supported.
2020-12-03 04:18:01 +11:00
Shamim Rezaie 7bd6145d13 MDL-69301 course: Remove custom keyboard navigation code 2020-12-02 22:57:44 +11:00
Shamim Rezaie c8ea0c12d7 MDL-69301 core: Enhanced WAI-ARIA support for tab elements 2020-12-02 22:57:42 +11:00
Shamim Rezaie baf68eae5e MDL-69301 theme_boost: convert aria.js to es6 module 2020-12-02 22:57:18 +11:00
Jake Dallimore 3382bc0ece Merge branch 'MDL-67514' of https://github.com/paulholden/moodle 2020-12-02 16:20:37 +08:00
Andrew Nicols 145a72ca9c Merge branch 'MDL-57614-master-4' of git://github.com/mihailges/moodle 2020-12-02 15:09:52 +08:00
Mihail Geshoski 16b72504b3 MDL-57614 core: Fetch blocks through a webservice in add block modal 2020-12-02 13:43:15 +08:00
Mihail Geshoski d16faf211d MDL-57614 core_block: Create webservice that returns the addable blocks
Creates a webservice that returns the addable blocks in a given page.
The webservice expects the page context id, page type and page layout as
parameters and returns the block name and block title for each available
block.
2020-12-02 13:40:41 +08:00
AMOS bot d5ed07c000 Automatically generated installer lang files 2020-12-02 00:07:47 +00:00
Thong Bui 017b1252ed MDL-70324 Question: get_all_response_file_areas() not work correctly 2020-12-01 16:03:44 +07:00
Sara Arjona 32bd7eeac9 Merge branch 'MDL-70037' of git://github.com/paulholden/moodle 2020-12-01 08:00:28 +01:00
AMOS bot cf231873cd Automatically generated installer lang files 2020-12-01 00:07:54 +00:00
Paul Holden 356b4f9cc4 MDL-70037 mod_forum: include post modified date in external structure. 2020-12-01 00:04:25 +00:00
Claude Vervoort 3071777ddb MDL-70361 mod_lti: deeplinking multiple preserve resourceid and tag 2020-11-30 14:41:13 -05:00
David Mudrák e6f4190203 MDL-70357 cron: Catch Throwables not just Exceptions when running tasks
Starting from PHP 7, most language errors throw Error exceptions. We
want to deal with those equally as with any other exception so we need
to catch all Throwables here.
2020-11-30 17:25:19 +01:00
Alexander Bias 3c0a064421 MDL-70342 block_timeline: Get rid of double quotes
This commit gets rid of double quotes around the activity name and course name
which have sneaked into block_timeline's view in MDL-65183.
2020-11-30 13:20:26 +01:00
Adrian Greeve bc581748c2 Merge branch 'MDL-68052' of git://github.com/danmarsden/moodle 2020-11-30 09:39:51 +08:00
Gareth Barnard ac7cf94d96 MDL-70267 ux, theme: Course user profile inconsistent page layout. 2020-11-29 23:48:56 +00:00
AMOS bot d1f55115b7 Automatically generated installer lang files 2020-11-29 00:07:58 +00:00
Tim Hunt 040c15c27e MDL-54907 quiz unit tests: clean up code style in attempts_test.php 2020-11-27 18:29:25 +00:00
Tim Hunt fc9d2e0843 MDL-54907 quiz: better timefinish for attempts finished asynchronously
There are serveral ways a quiz attempt can be submitted:

1. The student click the Submit and finish button. In this case,
   no problem. We record the current time as the finish time
   for the quiz attempt.

2. The student is activly working away at the quiz, and the
   count-down timer reachers zero. In this case, we also record
   the current time. Note that, if the server is under high load,
   then this could well end up being a few seconds after the
   theoretical end time, so you could have a quiz with a 30 minute
   time limit, with an attempt that lasted 30:07. However, this
   is just an accurate reflection of what happened, so should
   be recorded like this.

3. If the student is offline when the time expires, then
   (depending on the quiz settings) the attempt may be
   automatically submitted by cron, but this will happen with
   at least some delay (to prevent race conditions between cron
   and a student working online) and if cron is running slow
   on the server, it could be a lot later. Previously, this led
   to, say, a 30 minute quiz where an attempt seemed to have
   lasted 67 minutes, which confused people.

   Now, in this situation, the finsh time for the quiz attempt is
   recorded as the time when the time limit ran out. This is not
   just less confusing for teachers looking at the quiz report,
   it is also more accurate. That is the latest time at which
   students could have made any changes to their responses.
2020-11-27 17:51:55 +00:00
Juan Leyva 795a8ac8a0 MDL-70340 mod_workshop: Do not apply format to peer comments
This text is not directly output to final users, it is used just in the textarea in both the site and the app.
Applying format, case issues like adding glossary links etc...
2020-11-27 18:10:04 +01:00
Jun Pataleta 15709f18b3 MDL-69422 mod_data: Deprecate unused 'unsupportedexport' string 2020-11-27 23:27:33 +08:00
Jun Pataleta 22a14f6cf6 MDL-69422 mod_data: Export form accessibility fixes
* Set appropriate heading element IDs
* Replace usages of deprecated HTML tag acronym with abbr instead.
* Add a label for the export fields fieldset.
* Move the CSV delimiter list outside the radio group.
* Fix div under a label element and duplicate labels
for the checkboxes of the fields to be exported by showing the field
name and type together.
* Group the fields to be exported as a fieldset.
* Move unsupported fields into a separate list.
* Move export options into its own section and group the options as a
fieldset.
2020-11-27 23:21:02 +08:00
Jun Pataleta 1d685419d4 MDL-69422 core: Convert required and help button container to div
* A span element cannot have a div as a child.
2020-11-27 23:16:03 +08:00
Tim Hunt ec6978b9d6 MDL-54907 quiz generator: defaults should match a new Moodle install 2020-11-27 14:57:36 +00:00
Tim Hunt dc72bc6ac5 MDL-54907 dml: Correct incorrect PHPdoc 2020-11-27 14:57:36 +00:00
Sara Arjona f34b44674f weekly release 4.0dev 2020-11-27 07:50:34 +01:00
Sara Arjona d0d2c06775 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2020-11-27 07:50:30 +01:00
AMOS bot c8c4d35930 Automatically generated installer lang files 2020-11-27 06:21:37 +00:00
Sara Arjona e74ed03d70 Merge branch 'MDL-70276' of https://github.com/stronk7/moodle 2020-11-26 15:04:13 +01:00
Andrew Nicols 0671a2e92d Merge branch 'MDL-65215-master' of git://github.com/peterRd/moodle 2020-11-26 12:46:11 +01:00
Andrew Nicols a57de96846 Merge branch 'MDL-63266-master' of git://github.com/peterRd/moodle 2020-11-26 12:46:11 +01:00
Andrew Nicols 0aecabf004 MDL-70153 qtype_essay: Whitespace/behat fixes 2020-11-26 12:46:10 +01:00
Andrew Nicols 22388c9e7f Merge branch 'MDL-70153-master' of git://github.com/dpalou/moodle 2020-11-26 12:46:10 +01:00
Andrew Nicols 78999ae627 Merge branch 'MDL-70237-master' of git://github.com/rezaies/moodle 2020-11-26 12:46:10 +01:00
Andrew Nicols e6715939bc Merge branch 'MDL-70242-master' of git://github.com/marinaglancy/moodle 2020-11-26 12:46:10 +01:00
Andrew Nicols 5a929185c5 Merge branch 'MDL-65852-master' of git://github.com/ilya-catalyst/moodle 2020-11-26 12:46:10 +01:00
Eloy Lafuente (stronk7) 9860796cbb Merge branch 'MDL-42382-master' of git://github.com/NoelDeMartin/moodle into master 2020-11-26 12:46:10 +01:00
Sara Arjona 42d23f2ddf Merge branch 'MDL-70248-master' of https://github.com/HuongNV13/moodle 2020-11-26 12:46:10 +01:00
Sara Arjona 9708b2aa1d Merge branch 'MDL-70265' of https://github.com/stronk7/moodle 2020-11-26 12:46:10 +01:00
Sara Arjona 2ae62e9a51 Merge branch 'MDL-69878-master' of git://github.com/bmbrands/moodle 2020-11-26 12:46:10 +01:00
Ilya Tregubov 932e8ea7a3 MDL-69868 h5pactivity: Prevent breaking $USER when seeing
attempt report.
2020-11-26 12:39:49 +02:00
Eloy Lafuente (stronk7) 4b3409b7a4 MDL-70276 github actions: First cut, phpunit and grunt checks
First working version, supports phpunit (using build matrix):

- php72 (lowest), running mysql.
- php74 (highest), running postgres.

Also verifies that the branch has been "gruntified" and there
isn't any missing change (build js/css files).

TODO: Verify the remaining checks currently in .travis.yml, namely:
 - CITEST
 - Add caching
 - Better health-check for DB images.
 - Support from the tracker (satus badges and enable check).
 - Support from CiBoT (status and enable check).
 - Consider moving both the common setup (git, composer...)
   and the database (mysql, postgres) to own actions for
   easier tweaking.
2020-11-26 00:26:47 +01:00
Paul Holden 1e3449ca28 MDL-70295 libraries: upgrade to version 4.3.1 of Html2Text. 2020-11-25 21:35:14 +00:00
Tim Hunt 374d3e7700 MDL-70320 permission overrides: role names were double-escaped 2020-11-25 21:19:57 +00:00
Paul Holden e1153faace MDL-70293 libraries: upgrade to version 1.5.6 of SimplePie. 2020-11-25 20:44:03 +00:00
Claude Vervoort 33594cf3a4 MDL-70284 mod_lti: dynreg fix response claims 2020-11-25 10:52:12 -05:00
cescobedo 7caad99f99 MDL-70327 core_h5p: Add preventredirect to the player 2020-11-25 16:30:04 +01:00
Jordan Tomkinson d0e185ae79 MDL-70326 antivirus: fixing regression in MDL-66222 2020-11-25 11:31:36 +01:00
Ilya Tregubov b71615f5e2 MDL-65852 user: Fix permission check to download course participants. 2020-11-25 11:25:34 +02:00
Eloy Lafuente (stronk7) 93f49909d5 Merge branch 'MDL-69121-redis-session-store-compression' of git://github.com/jamie-catalyst/moodle into master 2020-11-24 22:58:48 +01:00
Sara Arjona 01ac1cc74c Merge branch 'master-MDL-69773_v2' of https://github.com/golenkovm/moodle 2020-11-24 17:24:44 +01:00
Tim Hunt 32bd113761 MDL-70321 question backup: fix MDL-47178 unit tests
They were failing if you had CodeRunner installed
2020-11-24 15:26:32 +00:00
Simon Mok 10768bbd9e MDL-67460 profile: User profile link to use HTTPS 2020-11-24 20:37:26 +08:00
Peter Dias 3f934e4abd MDL-65215 core: Deprecate i_dock_block 2020-11-24 10:02:00 +08:00
Peter Dias 86269654f9 MDL-65319 core: Final deprecation get_courses_page 2020-11-24 09:59:47 +08:00
Adrian Greeve a2906d5a39 Merge branch 'MDL-64776-master' of git://github.com/peterRd/moodle 2020-11-24 08:57:12 +08:00
Mikhail Golenkov 53663f2ea1 MDL-69773 block_section_links: Add an option to display section name 2020-11-24 11:33:27 +11:00
Tim Hunt a6edd14d27 MDL-70285 completion upgrade: fix performance of the MDL-69687 code 2020-11-23 20:46:48 +00:00
David Matamoros c99a148628 MDL-69411 core_message: Fix return structure for empty result set
Passing a timefrom higher than last message timecreated needs to
return a formatted response so it does not break ws.
2020-11-23 19:25:09 +01:00
Eloy Lafuente (stronk7) df16c07624 MDL-70265 travis: Completely remove the UPGRADE check
It was broken since ages ago, see MDL-64874, so no sense
to keep it eating minutes for nothing.
2020-11-23 13:45:22 +01:00
Adrian Greeve 41b9a81caa Merge branch 'MDL-67668-master-2' of git://github.com/andrewnicols/moodle 2020-11-23 15:40:04 +08:00
Jake Dallimore 766f68cbd2 Merge branch 'MDL-70160-function-cache-m' of https://github.com/Peterburnett/moodle 2020-11-23 15:21:31 +08:00
Adrian Greeve 76ddbf3822 Merge branch 'MDL-67028-additional-custom-parameters' of https://github.com/cengage/moodle 2020-11-23 14:05:05 +08:00
Andrew Nicols 78d4adf7e2 MDL-70151 assign: Fix bulk change for behat
Behat does not play well with confirmation dialogues and in some
situations it does not wait for the page to reload before starting the
next step.

This change adds a pending_js call which is only resolved if the cancel
button was pressed, otherwise it remains in-progress until the page
reloads resetting the entire state of it.
2020-11-23 11:11:23 +08:00
Andrew Nicols 9d6413d16d MDL-70167 behat: Rewrite attribute check steps
This commit updates the following steps to use the
`the_attribute_of_should_be_set` step under the hood:
- the [element] [type] should be disabled
- the [element] [type] should be enabled
- the [element] [type] should be readonly
- the [element] [type] should not be readonly

This reduces unnecssary code duplication.
2020-11-23 11:02:36 +08:00
Andrew Nicols 7d70165c25 MDL-70167 behat: Boolean attributes should either exist or not 2020-11-23 11:02:36 +08:00
Andrew Nicols 0d580d2b3e MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:01:19 +08:00
Andrew Nicols fd71823ec7 MDL-67668 behat: Add inplace editable field type
This commit promotes the Inplace Editable field to a first-class form
element by introducing a new partial selector for inplace editable
fields, and teaching the field manager how to recognise these, then
introducing a new field type which can handle setting values for this
field.
2020-11-23 09:01:19 +08:00
Andrew Nicols 548da2ce97 MDL-67668 behat: Share behat_behat functionality with forms
Behat form fields are implemented in a way completely isolated from the
rest of the Behat Context system. Whereas regular step definitions have
access to execute steps, to call `find`, check for JS running, and other
related functionality, the Moodle implementation of a field type does
not have any access to this.

By moving the core functionality of behat_base to a new trait, and the
constants to a new interface, the functionality can also be used in
behat form fields in the same way as elsewhere.
2020-11-23 09:01:19 +08:00
Andrew Nicols 59daa3b548 MDL-67668 behat: Correct js pending check
Pending checks should only run when JS is running, but some uses were
not apply this check.
2020-11-23 09:01:19 +08:00
Andrew Nicols 1144969755 MDL-67668 behat: Support NodeElement when fetching node in container
This is similar to change made in MDL-69136 to allow an already-fetched
NodeElement to be provided to the get_node_in_container() function and
makes it easier to be deterministic when writing steps.
2020-11-23 09:01:19 +08:00
Eloy Lafuente (stronk7) 866fb5fd56 MDL-70265 travis: Only run highest phpunit if configured via env
By default only lowest php version will be executed, and only pgsql.

This default behavior can be changed with a new variable:

MOODLE_PHP = [all]
MOODLE_DATABASE = [pgsql | mysqli | all]
2020-11-21 11:28:11 +01:00
Eloy Lafuente (stronk7) c8d33eb9ce weekly release 4.0dev 2020-11-20 23:16:43 +01:00
Eloy Lafuente (stronk7) ca6c43e13a Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-11-20 23:16:41 +01:00
Peter Dias 1d6f66151a MDL-64776 book: Final deprecation booktool_print_get_toc 2020-11-19 17:02:16 +08:00
Adrian Greeve 4baf02505a Merge branch 'master-MDL-67636' of https://github.com/yao9394/moodle 2020-11-19 11:59:32 +08:00
Jake Dallimore 6603ee4853 Merge branch 'MDL-67081-profile-cli' of https://github.com/brendanheywood/moodle 2020-11-19 11:41:31 +08:00
John Yao 11886d37ed MDL-67636 gradebook: Prevent exposing hidden grade in locked category 2020-11-19 14:29:55 +11:00
Adrian Greeve a0ba1ae381 Merge branch 'MDL-65843-task-overrides' of https://github.com/jamie-catalyst/moodle 2020-11-19 11:29:01 +08:00
Adrian Greeve 3f5489e014 Merge branch 'MDL-56653_enrol_meta_edit_instance_validation' of https://github.com/vtos/moodle 2020-11-19 11:07:27 +08:00
Andrew Nicols e988d9ec4d Merge branch 'MDL-69809' of https://github.com/paulholden/moodle 2020-11-19 10:40:47 +08:00
Andrew Nicols 5b1f83ef3f Merge branch 'MDL-67702' of https://github.com/paulholden/moodle 2020-11-19 10:34:02 +08:00
Jun Pataleta d74c9c622e MDL-70094 core: Fix version number for the upgrade note. 2020-11-19 09:40:25 +08:00
Jun Pataleta 1ce10609f3 Merge branch 'MDL-70094-master' of https://github.com/SangNguyen2601/moodle 2020-11-19 09:38:39 +08:00
Andrew Nicols 0c556aff71 Merge branch 'MDL-47456-avoid-siteid-db' of https://github.com/brendanheywood/moodle 2020-11-19 08:51:57 +08:00
Eloy Lafuente (stronk7) 695f0b4597 Merge branch 'MDL-70107-task-unlock-session' of https://github.com/brendanheywood/moodle into master 2020-11-18 23:06:49 +01:00
Eloy Lafuente (stronk7) 30f2fe5301 Merge branch 'MDL-69201' of https://github.com/paulholden/moodle into master 2020-11-18 22:59:28 +01:00
Jamie Stamp 3a232840a5 MDL-65843 tasks: Allow schedules to be overridden in config 2020-11-18 12:44:05 +00:00
Shamim Rezaie bbf468099b MDL-70237 payment: Allow html tags in gateway description 2020-11-18 23:22:51 +11:00
sangnguyen2601 39652702f0 MDL-70094 Question: Technical info section expands if click help icon 2020-11-18 18:03:08 +07:00
Dani Palou 98dac07d54 MDL-70153 qtype_essay: Add behat test for attachments max size 2020-11-18 10:15:43 +01:00
Huong Nguyen a03b08abaf MDL-70248 qtype_ddimageortext: Drop zones have UI issue in Editing form 2020-11-18 16:09:05 +07:00
Andrew Nicols 3492cf87f0 Merge branch 'MDL-70158' of git://github.com/paulholden/moodle 2020-11-18 10:17:32 +08:00
Andrew Nicols 2820aa31dc Merge branch 'MDL-68896' of git://github.com/danmarsden/moodle 2020-11-18 09:32:46 +08:00
Eloy Lafuente (stronk7) 6ca32e21e5 Merge branch 'MDL-70148-master' of git://github.com/andrewnicols/moodle into master 2020-11-17 23:12:56 +01:00
Paul Holden c85f45ee35 MDL-67514 customfield: correct external usescategories return type. 2020-11-17 21:17:03 +00:00
Marina Glancy e72bd85285 MDL-70242 auth_oauth2: set page context and url 2020-11-17 16:47:12 +01:00
Paul Holden cc66de23f4 MDL-70158 tool_templatelibrary: group and sort list of components. 2020-11-17 13:56:01 +00:00
Noel De Martin c74fa727db MDL-42382 admin: Add replace filters button
Co-authored-by: Luca Bösch <luca.boesch@bfh.ch>
Co-authored-by: Andrei Bautu <abautu@gmail.com>
2020-11-17 10:21:40 +01:00
Dan Marsden 9ae716734f MDL-68052 analytics: Clean up analytics_indicator_calc records. 2020-11-17 20:27:00 +13:00
Andrew Nicols 3959958372 MDL-70148 gradereport_grader: Improve reliability of keyboard usage
In some browsers the ajax grade select does not properly update the
grade after setting values. The previous solution was to press the
[enter] key, but doing this with the new key type step opens the select
box again. This is what happens when a real user presses enter on the
select.

This is the last possible field in the report, so pressing the tab key
to move to the next gradable element does not work.

The solution uses a shift-tab to move the focus away to the previous
gradale element. In this case it must also be moved to an earlier step
because the previously selected value must be checked in the Then
section of the test and if it is selected then its value cannot be
checked.
2020-11-17 15:14:43 +08:00
Andrew Nicols bce0d4b80f MDL-70148 qtype: Update qtype steps to new key interaction
Note: The ddmarker question type was previously getting the number of
keypresses wrong. This was because it was using both keyDown/keyUp, and
also keyPress. As a result each keypress was essentially happening two
times.
2020-11-17 15:14:43 +08:00
Andrew Nicols ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Andrew Nicols 9c35ea1040 MDL-70148 behat: Add steps to send keys without an element 2020-11-17 15:14:43 +08:00
Andrew Nicols 84aae71f36 Merge branch 'MDL-69526-master' of git://github.com/lucaboesch/moodle 2020-11-17 14:52:58 +08:00
Peter Dias a726e52e80 MDL-65086 analytics: Deprecate get_enabled_time_splitting_methods 2020-11-17 13:55:26 +08:00
Adrian Greeve a370cb44bc Merge branch 'MDL-50955-master' of git://github.com/peterRd/moodle 2020-11-17 13:04:57 +08:00
Andrew Nicols a2da1d0e28 Merge branch 'MDL-69964' of git://github.com/paulholden/moodle 2020-11-17 10:21:27 +08:00
Paul Holden 5fb73c9639 MDL-69964 course: toggle participant checkboxes in root element.
For a given toggleGroup, the relevant action elements are not
necessarily descendants of the same tableRoot element, on the
course participants page.
2020-11-16 17:44:17 +00:00
Peter Dias 487c6f67b5 MDL-63266 core: Final deprecation enrol/cli/sync.php 2020-11-16 23:11:17 +08:00
Dani Palou d1af86fd62 MDL-70153 qtype_essay: Fix max size displayed for attachments 2020-11-16 15:20:34 +01:00
Eloy Lafuente (stronk7) de317c2cd4 Merge branch 'MDL-67513-master-fix' of https://github.com/andrewnicols/moodle into master 2020-11-16 09:17:31 +01:00
Andrew Nicols 78962293ef MDL-67513 core: Only move modal to body if currently attached
A previous change as part of this commitset was intended to move the
modal to the document.body, but where the modal had been destroyed it
was instead added back to the body.
2020-11-16 15:19:32 +08:00
Peter Dias 8e3031aed0 MDL-50955 core: Reset lessons completion criteria if grade type is none 2020-11-16 15:12:34 +08:00
Brendan Heywood 522e4c6c76 MDL-47456 core: Remove redundant DB call during bootstrap 2020-11-16 16:04:07 +11:00
Brendan Heywood 2481b041ce MDL-70107 tool_task: Unlock session on long running tasks in UI 2020-11-16 15:42:25 +11:00
Andrew Nicols 73bd838c1b Merge branch 'MDL-67513' of https://github.com/NeillM/moodle 2020-11-16 08:22:51 +08:00
Brendan Heywood 7f97d1181d MDL-67081 xhprof: Allow conditional profiling from CLI using env vars 2020-11-13 14:01:38 +11:00
AMOS bot bb55bcf014 Automatically generated installer lang files 2020-11-13 00:09:47 +00:00
Luca Bösch c2164fa6bb MDL-69526 block_myoverview: custom course fields natural sorting 2020-11-13 00:59:07 +01:00
Eloy Lafuente (stronk7) 6ef4e66f03 weekly release 4.0dev 2020-11-12 22:11:32 +01:00
Eloy Lafuente (stronk7) 6baec70346 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-11-12 22:11:29 +01:00
Vitaly d7d1ed65a5 MDL-56653 enrol_meta: a single DB query in edit_instance_validation
The 'edit_instance_validation()' method checks for existing meta enrolment instances.
The fix replaces DB queries in a loop for each course with a single query for all courses.
Also, a new testing method 'test_edit_instance_validation_with_existing_courses()'
was added to /enrol/meta/tests/plugin_test.php to test if the new implementation
returns an error in case of trying to save the already linked courses in the 'customint1' field.
2020-11-12 15:14:44 +03:00
Neill Magill 524253382c MDL-67513 forum: View conversations while fullscreen grading
Before this change when a modal was shown and an element on the page
was fullscreen the modal would be created behind it.

This change ensures that the modal will be inside an element that is
fullscreen so that it will be correctly displayed.
2020-11-12 08:35:55 +00:00
Adrian Greeve 1691176799 Merge branch 'MDL-69453-master' of git://github.com/bmbrands/moodle 2020-11-12 11:53:49 +08:00
Adrian Greeve 5d2617a462 Merge branch 'master-MDL-70117' of https://github.com/golenkovm/moodle 2020-11-12 11:48:57 +08:00
Andrew Nicols ea77b43b4e Merge branch 'MDL-70067-master_theme_classic' of https://github.com/alexmorrisnz/moodle 2020-11-12 10:26:30 +08:00
Eloy Lafuente (stronk7) 7378fac031 Merge branch 'MDL-65941-master' of https://github.com/snake/moodle into master 2020-11-12 00:18:26 +01:00
Eloy Lafuente (stronk7) a765b5a170 Merge branch 'MDL-70023-master' of git://github.com/marinaglancy/moodle into master 2020-11-11 23:57:15 +01:00
Alex Morris fa99232970 MDL-70067 report_insights: Replace BS3 column naming
Bootstrap 4 removed col-xs- and replaced it with col-
2020-11-12 08:56:19 +13:00
Sara Arjona c33f967019 Merge branch 'MDL-70063-master-1' of git://github.com/mihailges/moodle 2020-11-11 16:32:08 +01:00
Bas Brands 35bd8622f7 MDL-69878 core_message: always show message drawer close icon 2020-11-11 15:39:16 +01:00
Jun Pataleta f0b91724fe Merge branch 'MDL-70072-master' of git://github.com/rezaies/moodle 2020-11-11 22:08:07 +08:00
Mihail Geshoski ce76a3e89b MDL-70063 block_tag_youtube: Add behat tests 2020-11-11 21:24:44 +08:00
Mihail Geshoski 87b9e72f4e MDL-70063 block_tag_youtube: Fix category config in existing instances
Upgrade step that fixes the category configuration of existing
tag_youtube block instances.
2020-11-11 21:24:44 +08:00
Mihail Geshoski ca5850e341 MDL-70063 block_tag_youtube: Update category config to use category ID
In YouTube Data API v3, the API call to fetch the videos related to a
certain category expects the category ID to be passed to the
videoCategoryId parameter, instead of the category name. Therefore, the
category config should store the category ID.
2020-11-11 21:10:12 +08:00
Bas Brands 4d181cafa5 MDL-69453 core_form: improve form UI icons and alignment 2020-11-11 13:46:00 +01:00
Sara Arjona 84a8a2270f Merge branch 'MDL-70141-master' of https://github.com/sammarshallou/moodle 2020-11-11 08:39:14 +01:00
Sara Arjona e7ea4ae450 Merge branch 'MDL-69823-master' of git://github.com/jleyva/moodle 2020-11-11 07:41:19 +01:00
Michael Aherne 2385ae7ee2 MDL-65941 cache: Prevent cache config failure on redis problems. 2020-11-11 14:33:22 +08:00
Andrew Nicols c3086f74fb Merge branch 'MDL-70126' of git://github.com/paulholden/moodle 2020-11-11 10:20:00 +08:00
Andrew Nicols 8d8443411d Merge branch 'MDL-70065' of https://github.com/timhunt/moodle 2020-11-11 09:49:26 +08:00
AMOS bot 987023631c Automatically generated installer lang files 2020-11-11 00:07:43 +00:00
Mikhail Golenkov 8d025b449e MDL-70117 dataformat_pdf: Fix content overflow when headers are involved 2020-11-11 10:49:58 +11:00
Paul Holden 5148154d2e MDL-69809 mod_folder: include forcedownload setting in WS responses. 2020-11-10 20:47:57 +00:00
Juan Leyva 440aaccb57 MDL-69823 qtype: Support core question types 2020-11-10 19:16:24 +01:00
Juan Leyva caddb8f175 MDL-69823 mod_quiz: Return question options via WS 2020-11-10 19:16:24 +01:00
Sara Arjona 16af4ae4db Merge branch 'MDL-70106-icon-cache' of https://github.com/Peterburnett/moodle 2020-11-10 16:53:27 +01:00
Jun Pataleta 84b7d23334 Merge branch 'MDL-69930-master' of https://github.com/HuongNV13/moodle
# Conflicts:
#	question/type/ddimageortext/amd/build/question.min.js
#	question/type/ddimageortext/amd/build/question.min.js.map
#	question/type/ddimageortext/amd/src/question.js
2020-11-10 14:11:54 +08:00
Peter Burnett 7fa2f521d7 MDL-70160 cache: plugin_functions checks for function_exists() 2020-11-10 16:02:55 +10:00
Jun Pataleta 62fcc8d22a Merge branch 'MDL-68349-master' of git://github.com/marinaglancy/moodle 2020-11-10 10:14:57 +08:00
Jake Dallimore 5365057493 Merge branch 'MDL-69841-master' of https://github.com/HuongNV13/moodle 2020-11-10 09:32:34 +08:00
Paul Holden 3521d50c13 MDL-67702 gradereport_grader: user filters per report instance. 2020-11-09 23:21:24 +00:00
Paul Holden 05680020e7 MDL-67702 mod_assign: distinct uniqueid value for grading tables.
This has the effect of making table sorting and filtering by initials
apply only to the current table instance, rather than to all of them.
2020-11-09 23:18:09 +00:00
Víctor Déniz 27ef489443 Merge branch 'MDL-69955-master' of https://github.com/HuongNV13/moodle 2020-11-09 21:46:53 +00:00
Paul Holden 70936e0c5e MDL-69201 core: consistent table primary sort column/order. 2020-11-09 19:45:49 +00:00
Paul Holden c1c4ae95f2 MDL-70126 tag: correct thrown exception class name. 2020-11-09 19:43:47 +00:00
Neill Magill 76df82c5a7 MDL-67513 forum: Test that discussions can be viewed while grading 2020-11-09 14:28:46 +00:00
Jamie Stamp f2ee4599f7 MDL-69121 core: Add ZSTD/Gzip compression options to Redis sessions 2020-11-09 12:34:22 +00:00
AMOS bot e27bb27abd Automatically generated installer lang files 2020-11-09 00:07:51 +00:00
AMOS bot 409a3d61de Automatically generated installer lang files 2020-11-07 00:07:44 +00:00
Eloy Lafuente (stronk7) d330035f11 weekly release 4.0dev 2020-11-06 22:55:37 +01:00
Eloy Lafuente (stronk7) 7db6bb2343 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-11-06 22:55:34 +01:00
Víctor Déniz 4aa279956f Merge branch 'MDL-70137-master-2' of git://github.com/andrewnicols/moodle 2020-11-06 19:15:44 +00:00
Andrew Nicols b8bf6f9c42 MDL-70137 cache: Write config to temp file and move into place 2020-11-06 19:15:43 +00:00
Andrew Nicols db8377b53e MDL-70137 cache: Use sensible default when reading MUC config
When we read the MUC configuration, a file which exists but is empty
will not error, but will cause all configuration to be empty.

We already perform an {{is_array()}} check on the {{$configuration}}
variable, but the default value for {{$configuration}} is an empty
array. In the case where the file exists, but is empty, no errors occur
when the file is loaded, and the initial {{$configuration}} value is
not overwritten, leading to the file being replaced with an empty copy.
2020-11-06 19:15:34 +00:00
Eloy Lafuente (stronk7) 114102d37d Merge branch 'MDL-70143-master' of git://github.com/marinaglancy/moodle into master 2020-11-06 19:52:03 +01:00
Marina Glancy c2aa5a29f1 MDL-70143 tool_uploaduser: fix wrong cache reference 2020-11-06 19:31:25 +01:00
Eloy Lafuente (stronk7) 1c3871e25a Merge branch 'MDL-70139-master' of git://github.com/sarjona/moodle into master 2020-11-06 19:27:10 +01:00
sam marshall 26231f17e6 MDL-70141 core_block: Web service set $PAGE url to avoid warnings 2020-11-06 17:37:11 +00:00
Sara Arjona e85c7179b2 MDL-70139 core_badges: fix invalid request when sending to backpack
Having mixed $data in badge exporters is causing some issues.
As all these exporters are using $data as an object, $data can be
converted to object in the constructor, to avoid errors and get
the expected behaviour always.
2020-11-06 16:05:44 +01:00
Shamim Rezaie f0f45c01b1 MDL-70072 core: Fix always displaying date in Gregorian 2020-11-06 19:21:17 +11:00
Jun Pataleta 48e4dbea7c Merge branch 'MDL-70130-master' of git://github.com/andrewnicols/moodle 2020-11-06 11:28:02 +08:00
Andrew Nicols c42c08793b MDL-70130 core: Compare realpaths for file attachment checks
Rather than using the provided path, the `realpath` must be used to
ensure that the use of symlinks in paths is normalised.
2020-11-06 10:54:09 +08:00
Andrew Nicols 4f22fad9ac MDL-70130 core: Simplify attachment handling in email_to_suer 2020-11-06 10:54:09 +08:00
Marina Glancy e30716a16e MDL-70130 core: allow to attach files from localrequestdir to emails
Co-authored-by: Paul Holden <paulh@moodle.com>
2020-11-06 10:02:04 +08:00
Marina Glancy 8a9a4ee4f3 MDL-70131 cli: only allow to negate existing keys 2020-11-06 09:30:08 +08:00
Andrew Nicols 6d138e3675 Merge branch 'MDL-70120-assign-stamp-expires' of https://github.com/brendanheywood/moodle 2020-11-06 09:04:06 +08:00
AMOS bot aa403760a0 Automatically generated installer lang files 2020-11-06 00:09:51 +00:00
Eloy Lafuente (stronk7) ea32d651e9 weekly release 4.0dev 2020-11-05 12:15:57 +01:00
Marina Glancy 7fb6ce765f MDL-70023 core_course: improve performance of recently accessed courses 2020-11-05 09:56:01 +01:00
Jun Pataleta 2927457dbf Merge branch 'MDL-70075-master-2' of git://github.com/andrewnicols/moodle 2020-11-05 12:51:31 +08:00
Andrew Nicols 7d713f6060 Merge branch 'MDL-70066-master' of git://github.com/lameze/moodle 2020-11-05 10:00:33 +08:00
Andrew Nicols 7d786c7968 MDL-70075 core: Autocomplete selection should always have an active item
Ensure that there is always one active element in the list of selected
autocomplete elements.

Without this we have issues beacuse clicking on the link makes the first
one active if one is not already active, and this turns a click event
into a drag event, which means that it is not deleted.
2020-11-05 08:55:50 +08:00
Eloy Lafuente (stronk7) b27a4e4573 Merge branch 'MDL-70100-master' of git://github.com/bmbrands/moodle into master 2020-11-04 22:39:24 +01:00
Víctor Déniz 65bb82c7c8 Merge branch 'MDL-70112' of https://github.com/timhunt/moodle 2020-11-04 19:17:04 +00:00
Sara Arjona 73758fc4d9 Merge branch 'MDL-70114-master' of git://github.com/bmbrands/moodle 2020-11-04 20:14:50 +01:00
Víctor Déniz d8c9475572 Merge branch 'MDL-68749-master-2' of git://github.com/mickhawkins/moodle 2020-11-04 15:17:03 +00:00
Sara Arjona e0a5d313e4 Merge branch 'MDL-70119-master' of git://github.com/ferranrecio/moodle 2020-11-04 15:19:28 +01:00
Bas Brands 4f9f4b2af5 MDL-70114 mod_data: add border for to textarea 2020-11-04 13:29:31 +00:00
Ferran Recio 9ca1707f5a MDL-70119 core_badges: fix tab names 2020-11-04 12:49:12 +01:00
Brendan Heywood 8e7ec10968 MDL-70120 assignfeedback_editpdf: Stamp files should be cached 2020-11-04 22:42:21 +11:00
Simey Lameze edf2df07fe MDL-70066 badges: change usages of array_key_exists to isset 2020-11-04 15:50:15 +08:00
Peter Burnett 7fe1554c21 MDL-70106 cache: Set icon localstorage cache to use theme localisation 2020-11-04 13:29:53 +10:00
Andrew Nicols a88838c25f MDL-70075 core: Do not return a value in an event handler
Returning a value of `false` in an event handler has the effect of
calling event.preventDefault() and event.stopPropagation().

This is neither obvious, nor desirable in this situation.
2020-11-04 11:27:55 +08:00
Andrew Nicols 5d16bfcf7c MDL-70075 core: jQuery.attr() does not accept a bool value
The documented values that jQuery.attr() accepts are String, Number, or
null. For some reason, when we pass a Boolean value, the subsequent
click handler does not work in some situations.

Changing this to take a Number, and unsetting it when empty, resolves
this issue.
2020-11-04 11:27:55 +08:00
Andrew Nicols 189a4c8f8e MDL-70075 core: Listen for change in accessibleChange event
The accessibleChange custom interaction event was only listening for
blur and focus, however some OS/browser combinations do not emit these
events until the element is explicitly blurred. This is notably
different on Firefox on some Operating Systems.

Recent changes in MDL-68167 explicitly moved the user participants page
filter module to use the accessibleChange event, which means that the
selections are now only triggered on an explicit blur when using
Firefox. This highlight a bug whereby, when the mouse is used to make a
selection, the event is not triggered until the element is blurred.

This change modifies the accessibleChange event to ignore the `change`
event where it was triggered by the keyboard and where that keybaord
event was not a [return] or [escape] keypress, but to otherwise respect
the native change event.
2020-11-04 11:27:55 +08:00
Andrew Nicols 3caa6bfbe1 MDL-70075 core: Listen for the focus and blur events again
The `blur` event does not bubble, but the `focusout` events are not
available in all supported versions of Firefox.

Rather than switching event, this patch using event capture to
effectively achieve the same result and bubble the event up through the
DOM to the delegated listener.

There should be no functional change with this patch, except to support
Firefox fully.
2020-11-04 11:27:55 +08:00
Huong Nguyen d67bcd6b9a MDL-69955 qtype_ddimageortext: drop zone disappear in special case 2020-11-04 09:51:00 +07:00
Jake Dallimore 3ab2d0010b Merge branch 'MDL-70093-master' of https://github.com/golenkovm/moodle 2020-11-04 09:00:05 +08:00
Tim Hunt a26c04c34a MDL-70112 drag-drop qtypes: fix form preview 2020-11-03 21:25:51 +00:00
Mihail Geshoski 253af8711d MDL-67837 backup: Add unit tests 2020-11-03 12:34:28 +01:00
Mihail Geshoski c8ac07fb50 MDL-67837 backup: Verify caps before unenrolling users on course restore 2020-11-03 12:34:28 +01:00
andreasschenkel 85994027bd MDL-69844 user: Fix no email in download_participants_table
Only include eMail in download_participants_table 
if selected in showuseridentity 
($identityfieldsselect)
2020-11-03 12:34:28 +01:00
Juan Leyva 8169aeff59 MDL-67015 mod_data: Prevent users adding entries to other groups 2020-11-03 12:34:28 +01:00
Amaia Anabitarte 66be08216e MDL-69046 core_contentbank: Escape quotes when showing name 2020-11-03 12:34:28 +01:00
Ferran Recio b8e1eec4c7 MDL-69378 tool_uploadcourse: fix enrolment methods uploads 2020-11-03 12:34:28 +01:00
Peter Dias 828caaac70 MDL-56310 restore: Confirm user has permission to change capabilities 2020-11-03 12:34:28 +01:00
Eloy Lafuente (stronk7) 2444c9d9be weekly release 4.0dev 2020-11-03 12:21:06 +01:00
Michael Hawkins fe60d58063 MDL-68749 theme: Fix bootstrap toggle switches in RTL layout
Co-authored-by: Bas Brands <bas@moodle.com>
2020-11-03 15:12:01 +08:00
Andrew Nicols 2c20083a16 Merge branch 'MDL-70059-master' of git://github.com/sarjona/moodle 2020-11-03 12:03:49 +08:00
Jun Pataleta e275f0f5da Merge branch 'MDL-70033-master-2' of git://github.com/mickhawkins/moodle 2020-11-03 12:02:08 +08:00
Michael Hawkins d1f0ca6e3c MDL-70033 course: Update download content event handling for Classic 2020-11-03 11:53:57 +08:00
Michael Hawkins f01c2fa4e7 MDL-70033 core: Update tree.js event handlers to replace stopPropagation
Also added support to allow links to override action keys (enter/space)

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2020-11-03 11:53:57 +08:00
Eloy Lafuente (stronk7) cb163538bb Merge branch 'MDL-70081-master' of git://github.com/jleyva/moodle into master 2020-11-03 01:24:45 +01:00
Jun Pataleta a81f648ac4 Merge branch 'MDL-69975' of https://github.com/stronk7/moodle 2020-11-03 00:00:44 +08:00
Sara Arjona 88460c4b00 Merge branch 'MDL-69973' of https://github.com/stronk7/moodle 2020-11-02 15:44:41 +01:00
Bas Brands d64def4d53 MDL-70100 theme_boost: quiztimer zindex fix 2020-11-02 11:29:37 +00:00
Sara Arjona ee0c9d2efd MDL-70059 core_badges: avoid duplicate key error
When 2 or more backpack were created without credentials,
a "Duplicate key value violates unique constraint" error
was raised because externalbackpackid was not taking the
correct value.
Other improvements have been done to the code too in order
to make it more readable.
2020-11-02 10:41:38 +01:00
Jake Dallimore 7e44e7d2dc Merge branch 'MDL-70073-master' of git://github.com/peterRd/moodle 2020-11-02 13:57:21 +08:00
Mikhail Golenkov 4da24c982e MDL-70093 dataformat_pdf: Fix row height calculation with high cells 2020-11-02 14:46:17 +11:00
Peter Dias df177126af MDL-70073 badges: Fix the master upgrade savepoint 2020-11-02 10:17:30 +08:00
Jun Pataleta 4231758896 Merge branch 'MDL-70074-add-authendpoint' of https://github.com/cengage/moodle 2020-11-02 10:04:24 +08:00
Alexander 98ea30aac9 MDL-70067 theme_classic: Use col-12 as col-xs-12 was removed in BS4 2020-11-02 09:04:23 +13:00
Brendan Heywood 10f33b6fdc MDL-69975 core: Fix paths longer than 260 chars on windows
Also, ensure that remove_dir() only processes directories,
because sometimes it was being called by shutdown managers
with files, leading to PHP warnings.

Co-authored-by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
Co-authored-by: Jun Pataleta <jun@moodle.com>
2020-11-01 11:02:00 +01:00
Juan Leyva 4bc5333b05 MDL-70081 airnotifier: Add missing device type in token registration 2020-10-31 13:07:30 +01:00
Claude Vervoort 6f34fe6dfe MDL-70074 mod_lti: add authorization_endpoint 2020-10-30 18:16:04 -04:00
Eloy Lafuente (stronk7) 12e273dddd MDL-69973 xmldb: Ensure all reports use fresh metadata (not cached) 2020-10-30 19:27:11 +01:00
Eloy Lafuente (stronk7) 533c35ff99 MDL-69973 xmldb: Fix problem with MariaDB >= 10.2.7 metadata defaults
With MariaDB 10.2.7 the driver was incorrectly returning '' (empty
string) as default for all the columns having null (meaning, no
default).

Also, cover the case in unit tests, it seems that we were already
testing other defaults but not the null case.
2020-10-30 19:27:11 +01:00
Marina Glancy 81fe9e9af5 MDL-68349 auth_db: user_created event should be triggered later 2020-10-30 14:18:02 +01:00
Eloy Lafuente (stronk7) 58ba94a729 weekly release 4.0dev 2020-10-30 13:48:48 +01:00
Eloy Lafuente (stronk7) 3814233fa0 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-10-30 13:48:46 +01:00
Jun Pataleta 48397d35ab Merge branch 'MDL-68167-master' of git://github.com/rezaies/moodle 2020-10-30 13:17:02 +08:00
Shamim Rezaie 0438cd60bb MDL-68167 lib: autocomplete focos should not be removed on blur
See https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-rearrangeable.html
2020-10-30 16:01:38 +11:00
Shamim Rezaie e2ee6025fe MDL-68167 lib: Do not set aria-expanded if it should not be set 2020-10-30 16:01:38 +11:00
Shamim Rezaie c682aa5f97 MDL-68167 user: Fix missing label for participants filter input fields 2020-10-30 16:01:38 +11:00
Shamim Rezaie cb0bf0ffe0 MDL-68167 lib: Clear single-select autocomplete elements with keyboard
Following MDL-57680, it should be possible to clear the selected option
using keyboard as well.
2020-10-30 16:01:38 +11:00
Shamim Rezaie 6fdfbc44f9 MDL-68167 user: Fix a hardcoded string to be read from lang pack 2020-10-30 16:01:38 +11:00
Shamim Rezaie b6d733dd4e MDL-68167 lib: Fix label for autocomplete selection/suggestion box
The content of the autocomplete selection div is purged by javascript
so we have to move its label outside of it. aria-labeledby is the way
to go.

Each time the suggestion box is expanded, autocomplete js renders the
autocomplete suggestions template. So the label cannot be outside the
suggestions ul.
2020-10-30 16:01:38 +11:00
Shamim Rezaie ceda24637d MDL-68167 user: filter elements should listen to accessibleChange event 2020-10-30 14:52:52 +11:00
Shamim Rezaie 15a349dd4f MDL-68167 lib: The accessibleChange custom event now supports bubbling
The change event bubbles so the accessibleChange shoud bubble as well.
2020-10-30 14:52:52 +11:00
Shamim Rezaie 29ad80e4ff MDL-68167 theme_boost: make focus outline accessible for autocompletes 2020-10-30 14:52:52 +11:00
Andrew Nicols 0ac855a304 Merge branch 'MDL-69156_master' of https://github.com/ffhs/moodle 2020-10-30 11:51:48 +08:00
Shamim Rezaie b643c88682 MDL-68167 lib: Autocomplete selection to use listbox aria role
The aria-selected state cannot be used for the listitem role. The
autocomplete widget highly uses the aria-selected state internally.
2020-10-30 14:43:00 +11:00
Shamim Rezaie ce484f2872 MDL-68167 user: Improve keyboard navigation on autocomplete fields 2020-10-30 14:43:00 +11:00
Shamim Rezaie 2a02fba4bd Merge branch 'MDL-69390-master' of git://github.com/bmbrands/moodle into MDL-69390-master-test 2020-10-30 14:37:25 +11:00
Huong Nguyen 3dcfb904b7 MDL-69841 Quiz: Review options 'Help' icons do not work correctly 2020-10-30 10:18:20 +07:00
AMOS bot 458e531bdf Automatically generated installer lang files 2020-10-30 00:09:45 +00:00
Víctor Déniz 5009d5030d Merge branch 'MDL-70032-master-2' of git://github.com/junpataleta/moodle 2020-10-29 22:27:47 +00:00
Tim Hunt 1622425260 MDL-70065 quiz: fix paging when adding questions from the bank 2020-10-29 20:25:53 +00:00
Paul Holden eec03671f8 MDL-69156 backup: correct behaviour of course copy idnumber field.
When a given user doesn't have the capability to change the idnumber
field during course copy, freeze the field value.
2020-10-29 14:14:13 +01:00
Adrian Perez d5ec9d66a4 MDL-69156 course_copy: set defaults for idnumber when not permitted 2020-10-29 14:14:08 +01:00
Jun Pataleta ac9ecf6bef MDL-70032 qtype_multichoice: Use custom partial named selector
* With the removal of the label element, Behat now has to click on the
answer text. In order to achieve this, the custom partial named selector
"qtype_multichoice > Answer" was now added and have replaced the
instances where the label of the answer's checkbox/radio button is
being clicked.
2020-10-29 16:21:22 +08:00
Jun Pataleta a1d81dc6d9 MDL-70032 qtype_multichoice: Fix answer labelling
* Discard the use of the label element in order to be able to render
multiple choice answers as they are and have these act as the radio
button/checkbox' label through the aria-labelledby attribute.
* New JS module qtype_multichoice/answers that listens for click events
on the answer text container and selects the appropriate answer radio
button/checkbox.
2020-10-29 15:36:15 +08:00
Andrew Nicols ede8fbe9f4 Merge branch 'MDL-68722-master' of https://github.com/matt-catalyst/moodle 2020-10-29 14:02:59 +08:00
Jake Dallimore f6356b99aa Merge branch 'MDL-69716-master' of git://github.com/aanabit/moodle 2020-10-29 12:39:48 +08:00
Jake Dallimore 6fcd084f68 Merge branch 'MDL-70041-master' of git://github.com/mihailges/moodle 2020-10-29 11:48:58 +08:00
Adrian Greeve 131dacceb5 Merge branch 'm40_MDL-70042_Progress_Bar_Upgrade_Message_Popup' of https://github.com/scara/moodle 2020-10-29 08:34:27 +08:00
Matteo Scaramuccia 6e97e31423 MDL-70042 message_popup: Trivial savepoint comment cleanup 2020-10-28 22:44:07 +01:00
Matteo Scaramuccia fad0a943b2 MDL-70042 message_popup: progress bar on upgrade only when necessary 2020-10-28 22:41:48 +01:00
Jun Pataleta 16ff8bc54c Merge branch 'MDL-69390-master' of git://github.com/bmbrands/moodle 2020-10-28 22:44:15 +08:00
Bas Brands 451bd40752 MDL-69390 theme_boost: dropdown menu accessibility
- display a dot before the active element
- use the active colour for the hover colour
2020-10-28 14:01:17 +01:00
Jun Pataleta 35edfe4754 Merge branch 'MDL-69815-master' of git://github.com/andrewnicols/moodle 2020-10-28 14:19:32 +08:00
Andrew Nicols 7b80dd3852 Merge branch 'MDL-70004-master' of git://github.com/junpataleta/moodle 2020-10-28 13:10:14 +08:00
Jake Dallimore f9f909282e Merge branch 'MDL-64723' of git://github.com/paulholden/moodle 2020-10-28 12:10:29 +08:00
Jake Dallimore 36f29a2ebd Merge branch 'MDL-65792-master' of git://github.com/bmbrands/moodle 2020-10-28 11:59:44 +08:00
Mihail Geshoski 81d0642b6c MDL-70041 filepicker: Make sure the user has a recently used license 2020-10-28 11:48:33 +08:00
Jake Dallimore 62e5852f36 Merge branch 'MDL-70010' of https://github.com/stronk7/moodle 2020-10-28 11:07:19 +08:00
Andrew Nicols 3354f1f93a MDL-69815 core: Bump Node to v14.15.0 (LTS/Fermium) 2020-10-28 09:34:31 +08:00
Eloy Lafuente (stronk7) d59487ded3 Merge branch 'MDL-69998-master-enfix' of git://github.com/mudrd8mz/moodle into master 2020-10-28 00:41:53 +01:00
Eloy Lafuente (stronk7) 99680d1be4 weekly release 4.0dev 2020-10-27 23:47:26 +01:00
Eloy Lafuente (stronk7) f9faf700aa NOBUG: Fixed file access permissions 2020-10-27 23:47:26 +01:00
Eloy Lafuente (stronk7) 96c572c5f3 NOBUG: Fixed SVG browser compatibility 2020-10-27 23:47:24 +01:00
Matt Clarkson 541e90c32c MDL-68722 atto_equation: fix for form elements with special characters
Element id's containing characters such as ':' would break the tab
selector in bootstrap.

This specifically affects the essay question type.
2020-10-28 09:26:43 +13:00
Sara Arjona 54d718b2b0 MDL-69166 enrol_fee: fix behat string from fee to enrolment by payment 2020-10-27 15:00:30 +01:00
Sara Arjona 5c422a03b9 MDL-69166 enrol_fee: define default value to currency setting 2020-10-27 15:00:11 +01:00
David Mudrák e576fef1fa MDL-69998 lang: Fix reworded strings in Behat test scenarios 2020-10-27 11:32:10 +01:00
Helen Foster dd7a1d60e2 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:32:10 +01:00
Andrew Nicols 533bcf9f7b Merge branch 'MDL-69166-master-4' of git://github.com/rezaies/moodle 2020-10-27 16:35:48 +08:00
Bas Brands 56d3baa214 MDL-65792 mod_forum: show release time on timed posts 2020-10-27 08:58:26 +01:00
Shamim Rezaie 7676918e75 MDL-69166 core: Fix missing lang strings 2020-10-27 18:13:34 +11:00
Andrew Nicols d5be288740 MDL-69166 core: Fix upgrade step savepoint 2020-10-27 13:12:59 +08:00
Andrew Nicols 931f36ce15 Merge branch 'MDL-69166-master-4' of git://github.com/rezaies/moodle 2020-10-27 12:47:50 +08:00
Shamim Rezaie ce7c648526 MDL-69166 core_payment: Add privacy implementation 2020-10-27 15:34:56 +11:00
Shamim Rezaie 0ecce652b1 MDL-69166 core_payment: Use promises instead of callbacks 2020-10-27 15:34:56 +11:00
Shamim Rezaie f5d94d6305 MDL-69166 core_payment: Addressing various integration points
- Add help for 'payment account' field in the enrol instance form
- Remove MOODLE_INTERNALs when not necessary
- Add $userid to deliver_order
- Check if provider classes implement the provider interface
- Rename get_cost to get_payable
- get_payable returns payable object
- Improve registerEventListeners and added init
- Rename payment\provider to payment\service_provider
2020-10-27 15:34:56 +11:00
Shamim Rezaie d5a9d6e520 MDL-69166 core_payment: Rename componentid to itemid 2020-10-27 15:34:56 +11:00
Shamim Rezaie 2d7feb7583 MDL-69166 core_payment: Renamed plugintype name from pg to paygw 2020-10-27 15:34:55 +11:00
Marina Glancy 9ad96a63a4 MDL-69166 core_payment: addressing integration review 2020-10-27 15:34:55 +11:00
Marina Glancy 71ccaf200d MDL-69166 core_payment: rename some functions 2020-10-27 15:34:55 +11:00
Shamim Rezaie 410973cf10 MDL-69166 Replace all upgrade steps with just "create_table" steps 2020-10-27 15:34:54 +11:00
Michael Hawkins 4a81496e28 MDL-69559 course: Fix course download cap checks when creating courses 2020-10-27 12:04:42 +08:00
Shamim Rezaie 61766b3d11 MDL-69166 core_payment: Add paymentarea to the payment subsystem 2020-10-27 14:40:49 +11:00
Marina Glancy 409857a42f MDL-69166 core_payment: archiving accounts, triggering events, tests 2020-10-27 14:40:49 +11:00
Shamim Rezaie 73527fa213 MDL-69166 core_payment: Show cost on the modal when no gateway is chosen 2020-10-27 14:40:49 +11:00
Marina Glancy 1d479dc0cf MDL-69166 core_payment: improvements to api, small fixes 2020-10-27 14:40:49 +11:00
Marina Glancy 6ff3087fe6 MDL-69166 core_payment: add payment accounts 2020-10-27 14:40:49 +11:00
Shamim Rezaie 3c87455f4b MDL-69166 enrol_fee: Show a warning when no currency is supported 2020-10-27 14:40:49 +11:00
Shamim Rezaie 22a949196d MDL-69166 enrol_fee: Prevent adding instance if no currency is supported 2020-10-27 14:40:49 +11:00
Shamim Rezaie d5958c420e MDL-69166 pg_paypal: only prevent closing during autorisation 2020-10-27 14:40:49 +11:00
Shamim Rezaie e25eb2c0e1 MDL-69166 core-payment: Autoselect gateway when there is only one 2020-10-27 14:40:49 +11:00
Shamim Rezaie e3e83185ed MDL-69166 core_payment: payment gateways can have a surcharge 2020-10-27 14:40:47 +11:00
Shamim Rezaie 11b2d9e9ac MDL-69166 core_payment: show cost on the modal 2020-10-27 14:37:29 +11:00
Shamim Rezaie 950e69dd4c MDL-69166 pg_paypal: capture payment directly 2020-10-27 14:37:29 +11:00
Shamim Rezaie 9e6630ab99 MDL-69166 pg_paypal: New helper to get order details from PayPal 2020-10-27 14:37:29 +11:00
Marina Glancy 7740c45de4 MDL-69166 core_form: allow modals to prevent closing on accidental click 2020-10-27 14:37:28 +11:00
Shamim Rezaie fd187060ad MDL-69166 core_payment: ES6-ifying modal_gateways 2020-10-27 14:37:28 +11:00
Shamim Rezaie b23dcc37f2 MDL-69166 core_payment: Use a custom modal type for gateway selector 2020-10-27 14:37:28 +11:00
Shamim Rezaie 2bb44987a6 MDL-69166 pg_paypal: Support multiple currencies on the same page 2020-10-27 14:37:28 +11:00
Shamim Rezaie 9d773ee592 MDL-69166 enrol_fee: use template for payment btn & properly format cost 2020-10-27 14:37:28 +11:00
Shamim Rezaie ad6df31745 MDL-69166 core_payment: es6-ify 2020-10-27 14:37:28 +11:00
Shamim Rezaie b5507b8685 MDL-69166 core_payment: add a callback for when payment is done 2020-10-27 14:37:28 +11:00
Shamim Rezaie 8726d77517 MDL-69166 pg_paypal: Display PayPal buttons in a modal 2020-10-27 14:37:28 +11:00
Shamim Rezaie c67e35521a MDL-69166 pg_paypal: handle paypal checkout callbacks 2020-10-27 14:37:28 +11:00
Shamim Rezaie 330f492089 MDL-69166 pg_paypal: Ability to connect to sandbox or live environment 2020-10-27 14:37:28 +11:00
Shamim Rezaie 16099e4038 MDL-69166 pg_paypal: Process after payment 2020-10-27 14:37:28 +11:00
Shamim Rezaie 52ed1392f8 MDL-69166 core_payment: Save general payment information 2020-10-27 14:37:28 +11:00
Shamim Rezaie fc37fb1eb2 MDL-69166 pg_paypal: paypal helper class to work with API 2020-10-27 14:37:28 +11:00
Shamim Rezaie 184d2d078a MDL-69166 enrol_fee: Implement callback functions for payment subsystem 2020-10-27 14:37:28 +11:00
Shamim Rezaie 22c68a8197 MDL-69166 core_payment: helper methods to get cost and to deliver order
Also create the infrastructure to let components know when they have to
deliver what they sold. We are going to use namespace functions instead
of traditional callbacks.
2020-10-27 14:37:28 +11:00
Shamim Rezaie e88e3b87be MDL-69166 enrol_fee: set a description for enrolment 2020-10-27 14:37:28 +11:00
Shamim Rezaie 03f20edbd5 MDL-69166 core_payment: send a purchase description to payment gateways
We truncate description to 127 chars as per PayPal requirement
2020-10-27 14:37:28 +11:00
Shamim Rezaie 7f988ff518 MDL-69166 pg_paypal: render PayPal buttons and set up transaction
We truncate brand_name to 127 chars as per PayPal requirement.
2020-10-27 14:37:25 +11:00
Michael Hawkins 2660d542c8 MDL-69559 core: Removed stopPropagation from tree click handling
It was preventing JS click event handlers being reached on some
elements, such as course admin items in Classic
(eg download course content for teachers).
2020-10-27 07:52:43 +08:00
Michael Hawkins c2b115f829 MDL-69559 course: Fixed behat navigation in download course content 2020-10-27 07:52:18 +08:00
Paul Holden e5fa5c31d5 MDL-64723 tool_mobile: workaround for invalid certificate parsing.
This is to account for specific server configuration that are affected
by one of the following issues, which results in certificate signature
algorithms being incorrectly parsed:

 * https://bugs.php.net/bug.php?id=77548
 * https://github.com/curl/curl/issues/3706
2020-10-26 23:04:46 +00:00
Sara Arjona c7d9b12994 MDL-65959 core_badges: fix unique index in upgrade.php
There was an error when creating the unique index. Apart from that,
the code has been reorganised to copy data in the new structure only
if password field hasn't been removed.
2020-10-26 23:56:04 +01:00
Sara Arjona 5deb0dad76 Merge branch 'MDL-65959-master' of git://github.com/peterRd/moodle 2020-10-26 22:39:28 +01:00
Shamim Rezaie e75112a886 MDL-69166 pg_paypal: WS and AMD to return some settings to be used in js 2020-10-27 08:37:08 +11:00
Shamim Rezaie 8ef156b7dc MDL-69166 core_payment: post to process payment 2020-10-27 08:37:08 +11:00
Shamim Rezaie 59eaf4b662 MDL-69166 core_payment: display an image for each gateway 2020-10-27 08:37:08 +11:00
Shamim Rezaie 96f57f803d MDL-69166 core_payment: some basic styling 2020-10-27 08:37:08 +11:00
Shamim Rezaie e9de430907 MDL-69166 core_payment: display the gateways modal 2020-10-27 08:37:08 +11:00
Shamim Rezaie 9f2d8a0bdc MDL-69166 core_payment: WS to get list of gateways supporting a currency 2020-10-27 08:37:08 +11:00
Shamim Rezaie a580b33738 MDL-69166 enrol_fee: An enrolment plugin that supports payments 2020-10-27 08:37:08 +11:00
Shamim Rezaie a5d219b811 MDL-69166 pg_paypal: A new payment gateway is born 2020-10-27 08:37:08 +11:00
Shamim Rezaie 9e9ae7a51e MDL-69166 core: list settings page in the admin tree 2020-10-27 08:37:08 +11:00
Shamim Rezaie e52362fc5c MDL-69166 core_payment: basic gateway skeleton 2020-10-27 08:37:08 +11:00
Shamim Rezaie 9d77bf7c9b MDL-69166 core: define payment as a subsystem and pg as a plugin type 2020-10-27 08:37:08 +11:00
Jun Pataleta b7294cc13b MDL-70004 qtype_multichoice: Set appropriate clear my choice role 2020-10-27 01:58:44 +08:00
Peter Dias ef447fc7ef MDL-65959 badges: Allow cross domain/protocol functionality - obv2 2020-10-27 00:28:16 +08:00
Peter Dias d3af959238 MDL-65959 badge: Enable OB2.1 *connection* with cross domain ability 2020-10-27 00:27:20 +08:00
Peter Dias f451ef06cd MDL-65959 badge: Reset external_identifiers if backpack details modified 2020-10-27 00:27:19 +08:00
Peter Dias 8308d10561 MDL-65959 badge: Confirm assertion data is updated before awarding 2020-10-27 00:27:19 +08:00
Peter Dias 6d2df90a0c MDL-65959 badges: Unit and Behat tests 2020-10-27 00:27:19 +08:00
Peter Dias 96ec45cb17 MDL-65959 badges: Do not use badge user preference after verification 2020-10-27 00:27:19 +08:00
Peter Dias 3cae9421a8 MDL-65959 badges: Update the implementation to use admin set backpack 2020-10-27 00:27:19 +08:00
Peter b6435e0934 MDL-65959 core_badges: Allow ability to upload badges cross domain. 2020-10-27 00:27:18 +08:00
Eloy Lafuente (stronk7) 0dbeb9748b MDL-70010 core: reconcile MOODLE_310_STABLE and master
There are some unexpected differences between 310 and master,
better reconcile them now. Note this is not 100% critical but,
as far as nothing exclusively for 4.0 has landed to master yet
only branch/version differences should exist.
2020-10-26 10:48:53 +01:00
Eloy Lafuente (stronk7) 3dcb4f549f Merge branch 'MDL-69993' of git://github.com/paulholden/moodle into master 2020-10-26 10:42:31 +01:00
Andrew Nicols 08b523871c Merge branch 'MDL-69995-master' of git://github.com/lucaboesch/moodle 2020-10-26 16:00:19 +08:00
Adrian Greeve e1eba7fa9b MDL-69559 core_course: Fix to bad behat test formatting. 2020-10-26 13:24:12 +08:00
Adrian Greeve f7df6051c8 Merge branch 'MDL-69559-master-7' of git://github.com/mickhawkins/moodle 2020-10-26 13:02:31 +08:00
Jun Pataleta 1ec3dda801 Merge branch 'MDL-67301-dynreg-squashed' of https://github.com/cengage/moodle 2020-10-26 12:40:31 +08:00
Michael Hawkins 840bcd8810 MDL-69559 course: Add course setting and cap to control course downloads 2020-10-26 10:00:47 +08:00
Michael Hawkins d661b1148b MDL-69559 course: Add course content download UI and execution page 2020-10-26 10:00:47 +08:00
Michael Hawkins eb54686500 MDL-69559 course: Add capability and access checks for course download 2020-10-26 10:00:47 +08:00
Michael Hawkins 11456d71f0 MDL-69559 admin: Add course download admin settings and lang strings 2020-10-26 10:00:47 +08:00
Peter 1c4620bce6 MDL-65959 core_badges: Unrestricted user's badger account
* Restructure the email to be backpack specific
* Amended table defintion and functions
2020-10-25 23:03:59 +08:00
Huong Nguyen dc293a2eb6 MDL-69930 qtype_ddimageortext: Duplication items in drag-onto-image question 2020-10-25 20:13:39 +07:00
Luca Bösch 16d5028567 MDL-69995 backup: padding before activity icons. 2020-10-25 02:08:38 +02:00
Claude Vervoort 84e90d5db4 MDL-67301 mod_lti: dynamic registration 2020-10-24 09:27:55 -04:00
Amaia Anabitarte bceb4280bf MDL-69716 mod_quiz: No timestamp for in progress attempts 2020-10-23 16:01:15 +02:00
Eloy Lafuente (stronk7) aed0ee06f9 weekly release 4.0dev 2020-10-23 14:40:27 +02:00
Eloy Lafuente (stronk7) 3980887e7e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-10-23 14:40:21 +02:00
Paul Holden b14cca8a24 MDL-69993 output: correct navigation node type for user reports. 2020-10-23 08:04:44 +01:00
Adrian Greeve 295a1e3bee Merge branch 'MDL-67650-forced-checkbox-textarea' of https://github.com/brendanheywood/moodle 2020-10-23 09:03:20 +08:00
Víctor Déniz 56bbd6d92e Merge branch 'MDL-68664-master' of git://github.com/lameze/moodle 2020-10-22 12:25:56 +01:00
Sara Arjona 6d6f30f298 Merge branch 'MDL-69553' of https://github.com/NeillM/moodle 2020-10-22 08:55:55 +02:00
Brendan Heywood 0f3fdc1133 MDL-67650 admin: Consistently show forced config settings 2020-10-22 13:16:51 +11:00
Jake Dallimore 8006aac75c Merge branch 'MDL-68438_master' of https://github.com/t-schroeder/moodle 2020-10-22 09:30:28 +08:00
Adrian Greeve a9ab6a1db7 Merge branch 'MDL-69788' of https://github.com/paulholden/moodle 2020-10-22 09:08:50 +08:00
AMOS bot e0c208e739 Automatically generated installer lang files 2020-10-22 00:07:57 +00:00
Eloy Lafuente (stronk7) 284d0ae8f8 Merge branch 'MDL-66392' of https://github.com/paulholden/moodle into master 2020-10-21 19:43:13 +02:00
Paul Holden cecd90ffec MDL-66392 analytics: make model output directory default to empty.
Falling back to path within $CFG->dataroot/models.
2020-10-21 18:04:26 +01:00
Sara Arjona a3039fd1d4 Merge branch 'm40_MDL-68536_Notice_Undefined_Property_CFG_branch' of https://github.com/scara/moodle into master 2020-10-21 18:32:38 +02:00
Sara Arjona ca2db4be71 Merge branch 'MDL-67673' of https://github.com/stronk7/moodle into master 2020-10-21 17:38:05 +02:00
Víctor Déniz 06fdc6aacf Merge branch 'MDL-69392-master' of git://github.com/junpataleta/moodle 2020-10-21 16:27:05 +01:00
Víctor Déniz 3e6892af4b Merge branch 'MDL-69513-dkim-settings' of https://github.com/brendanheywood/moodle 2020-10-21 11:57:11 +01:00
Eloy Lafuente (stronk7) 07c1522d88 MDL-67673 phpunit: Document all the changes in upgrade.txt
This includes:

- Breaking changes (return void + PHP 7.1 min requirement).
- Deprecations and removals.
- Specifically DbUnit and its replacement.
- Printer showing how to rerun tests removed.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) cc1c4de8dc MDL-67673 phpunit: Remove the rerun hint on failed test cases
That custom printer was using some hacks to be able to intercept
configuration switches, reflection and other tricks to be able to
print the:

To re-run:
 vendor/bin/phpunit --verbose "core_setuplib_testcase" lib/tests/setuplib_test.php

line on every failed/exceptional/skipped test. After some internal
discussion it was agreed that the normal phpunit output:

1) core_setuplib_testcase::test_localcachedir
Time is lower that allowed start value
Failed asserting that 1601976686 is equal to 1601976687 or is greater than 1601976687.

/var/www/html/lib/phpunit/classes/advanced_testcase.php:446
/var/www/html/lib/tests/setuplib_test.php:170
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

has already all the information at hand about how to rerun a test:

- vendor/bin/phpunit lib/tests/setuplib_test.php
- vendor/bin/phpunit --filter core_setuplib_testcase::test_localcachedir
- vendor/bin/phpunit --filter ::test_localcachedir
- vendor/bin/phpunit --testsuite componentname_testsuite
- vendor/bin/phpunit --config <<compoenent directory>>
- use --cache-result to get failed tests rerun with ease.
- ...

So better, let's use standard phpunit output and done. Also, note that,
with the upgrade to phpunit 8.5, the printer was not working correctly
any more, causing some switches, like --verbose ... to be ignored. Sure
it could have been fixed but, as commented above, no real need for all
that "parapheranlia" to print the rerun information.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) 447316a9f6 MDL-67673 phpunit: deprecate old phpunit/dbunit stuff
Apply the standard deprecation procedure to the old APIs, to
be removed in Moodle 4.2 (MDL-69882). Existing unit tests
cover the deprecation debugging.

Originally MDL-64600
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) 8183def69e MDL-67673 phpunit: Move tests to use new phpunit_dataset
- Make advanced_testcase old methods to use new ones internally.
- Fix advanced_testcase, statslib, mod/quiz and mod/data tests.

Originally MDL-64600
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) ed103545dd MDL-67673 phpunit: Introduce a new, lightweight phpunit_dataset
In charge of taking over the, now removed/archived, phpunit/dbunit
package. It supports loading of CSV/XML files and strings and
PHP arrays, allowing to send the loaded information to database.

Perform some basic controls about the consistency of information,
surely not super-exhaustive but fair enough.

100% covered with unit test.

Planned like an "interim" replacement for phpunit/dbunit uses in
core that, ideally, should be moved to generators stuff at some
point.

Note, expect a few tests in core to fail with this commit, I've
changed some fixtures around. Next commit will fix existing uses.

Originally MDL-64600
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) 61ff13f0f3 MDL-67673 phpunit: Disable phpunit results cache by default
It can be enabled if desired from CLI using the --cache-result
option (or modifying the phpunit.xml cacheResult to true).

That will create the .phpunit.result.cache files that,
later, can be used to easily repeat failed (defects) tests or
run the slow ones first and more. See the --order-by option
to know more about all the available criteria. For example:

./vendor/bin/phpunit --order-by=defects --stop-on-defect

(will run all the failed ones first, stopping on problem, useful
for TDD and other scenarios, not so much for complete runs or CI).

Also, added to .gitignore so they won't be committed ever.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) 3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) 40de097e65 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) a293b3aea8 MDL-67673 phpunit: Remove deprecated non-public attribute assertions
With PHPUnit 8 a good number of assertions, all them related with
operations on non-public attributes have been deprecated. And will
be removed with PHPUnit 9.

The main point is that unit tests shouldn't be testing non-public
APIs (good practice) and those assertions were an error originally.

See https://github.com/sebastianbergmann/phpunit/issues/3338 for
the complete list and other details.

When possible (the attributes being checked are public), the change
is simple, just switching to normal assertions.

When the attributes are not public we need to find a workaround
to be able to test the same using public APIs, or use Reflection,
or remove the tests.

For the records, this is the regexp used to find all the cases:

ag '>(assertAttribute|attribute\(|readAttributte|getStaticAttribute| \
    getObjectAttribute)' -G "test.php"
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) d95c378771 MDL-67673 phpunit: Remove expectedException annotations
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

The annotations `@expectedException`, `@expectedExceptionCode`,
`@expectedExceptionMessage`, and `@expectedExceptionMessageRegExp`
are now deprecated.
Using these annotations will trigger a deprecation warning
in PHPUnit 8 and in PHPUnit 9 these annotations will be removed.

Also, all uses of expectExceptionMessageRegExp() has been moved
to expectExceptionMessageMatches(). See https://github.com/sebastianbergmann/phpunit/issues/3957

TODO: Various weirdness found while doing the changes with these tests:
- vendor/bin/phpunit lib/tests/exporter_test.php (created MDL-69700)
- vendor/bin/phpunit competency/tests/external_test.php (same issue than prev one)
- vendor/bin/phpunit question/engine/tests/questionengine_test.php (created MDL-69624)
- vendor/bin/phpunit lib/tests/event_test.php (created MDL-69688)
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7) 598d578af7 MDL-67673 phpunit: Remove deprecated assertArraySubset()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertArraySubset() is deprecated and will be removed in PHPUnit 9.
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7) f94195c320 MDL-67673 phpunit: Remove deprecated assertInternalType()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertInternalType() is deprecated and will be removed in
PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(),
assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(),
assertIsResource(), assertIsString(), assertIsScalar(),
assertIsCallable(), or assertIsIterable() instead.
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7) 80be8d2204 MDL-67673 phpunit: phpunit_constraint_object_is_equal_with_exceptions
Constraints are now declared final, so we cannot extend them anymore.

Hence, instead of extending PHPUnit\Framework\Constraint\IsEqual we
are just wrapping it into our constraint.
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7) f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7) bdc3ad00c9 MDL-67673 phpunit: Bump to PHPUnit 8.5 and remove DBunit
This makes everything to break, but it's what we'll be fixing
in the next commits, heh. :-)

Generated with php72 (min version supported), following the
instructions @ https://docs.moodle.org/dev/Composer
2020-10-21 12:45:59 +02:00
Paul Holden 7337934484 MDL-69788 admin: validate language menu configuration. 2020-10-21 11:24:26 +01:00
Jun Pataleta 6ca0291f5a Merge branch 'MDL-37226-master' of git://github.com/lucaboesch/moodle 2020-10-21 17:46:55 +08:00
Tim Schroeder 8e0423d9a5 MDL-68438 message: fixed email format change with messaging disabled 2020-10-21 11:26:07 +02:00
Neill Magill 661fa18e07 MDL-69553 output: Handle pre-loading multiline string defines
Before this patch strings that were declared over multiple lines in
a template would not be parsed correctly.

{{#str}}value,
mod_forum{{/str}}

would have been been parsed to get_string('value', 'core')

{{#str}}
value, mod_forum
{{/str}}

would have been been parsed to get_string('', 'core')
2020-10-21 10:08:56 +01:00
Neill Magill b65c22de20 MDL-69553 output: Unit tests for loading multiline string defines 2020-10-21 10:08:54 +01:00
Jun Pataleta 04d7c59e30 Merge branch 'MDL-69945-master' of git://github.com/lucaboesch/moodle 2020-10-21 16:03:20 +08:00
Adrian Greeve 56c172af7e Merge branch 'MDL-69807' of https://github.com/paulholden/moodle 2020-10-21 14:13:07 +08:00
Jun Pataleta e58bb28610 MDL-69392 mod_forum: Colour contrast check for locked discussions 2020-10-21 14:11:39 +08:00
Jun Pataleta 191de5fe26 MDL-69392 block_myoverview: Basic contrast check for the dashboard 2020-10-21 14:11:39 +08:00
Jun Pataleta 56bfa69a72 MDL-69392 question: Fix Try again button styling 2020-10-21 14:11:39 +08:00
Jun Pataleta 3b7f63337e MDL-69392 theme_boost: Improve question colour contrast
* Lighten info container.
* Fix colour contrast for the question container by
  - Lightening the background a bit
  - Darkening the text colour a bit
  - Making sure the link colour has good colour contrast against the
  question text.
* Fix colour contrast for the comments container by
  - Lightening the text colour a bit
  - Darkening the link colour a bit for better colour contrast against
  the feedback text.
2020-10-21 14:11:13 +08:00
Jun Pataleta 73126a6767 MDL-69392 theme_classic: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:11:07 +08:00
Jun Pataleta df18b4eebf MDL-69392 theme_boost: Darken red, blue and green colours
The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)
2020-10-21 14:10:31 +08:00
Adrian Greeve 5dc282a0d3 Merge branch 'MDL-68766-master' of https://github.com/ised-isde-canada/moodle 2020-10-21 12:55:11 +08:00
Jake Dallimore b64a8b3675 Merge branch 'MDL-68983-recent-session-lock-ro' of https://github.com/brendanheywood/moodle 2020-10-21 12:45:36 +08:00
Jake Dallimore 127befd73b Merge branch 'MDL-69902' of https://github.com/marinaglancy/moodle 2020-10-21 10:57:15 +08:00
Jake Dallimore 3d0f28ebb8 Merge branch 'MDL-69751-master' of git://github.com/mihailges/moodle 2020-10-21 10:05:16 +08:00
Eloy Lafuente (stronk7) 3ba1073919 weekly release 4.0dev 2020-10-21 00:50:19 +02:00
Luca Bösch 97a37413b9 MDL-65448 block_site_main_menu: Restyle moving. 2020-10-20 17:23:48 +02:00
Jake Dallimore 6325f848d8 Merge branch 'MDL-67695-master_get_lti_proxies' of https://github.com/andrewmadden/moodle 2020-10-20 11:08:16 +08:00
Adrian Greeve 33831f6e21 Merge branch 'master-MDL-68284' of https://github.com/yao9394/moodle 2020-10-20 08:48:05 +08:00
Mihail Geshoski e412f3029e MDL-69751 core: Restore deleted guest user and add missing context
This upgrade step fixes the cases where the current guest user is
labelled as 'deleted' and the related user context is missing.
2020-10-20 08:37:44 +08:00
Mihail Geshoski 2939efff84 MDL-69751 course: Handle missing guest user context
Makes sure the guest user context exists when fetching
the recommended modules. If the context does not exist
an exception is being thrown describing the problem.
2020-10-20 08:31:43 +08:00
Víctor Déniz b79f17e609 Merge branch 'MDL-69962-master' of https://github.com/clransom/moodle 2020-10-20 01:28:31 +01:00
Simey Lameze 1db3f6687c MDL-68664 theme: remove right margin from form-inline class 2020-10-20 08:23:24 +08:00
Andrew Nicols 178e343a0f Merge branch 'MDL-69687-master' of https://github.com/sammarshallou/moodle 2020-10-20 08:01:51 +08:00
Jake Dallimore b0c0d612d7 Merge branch 'MDL-69726' of git://github.com/aolley/moodle 2020-10-20 07:45:35 +08:00
Paul Holden fdd5aef039 MDL-69807 blocks: remove redundant sesskey loading edit/delete page. 2020-10-19 22:40:48 +01:00
Eloy Lafuente (stronk7) 4f3d5dfcb4 Merge branch 'MDL-69906-master-searchsimpledb' of git://github.com/mudrd8mz/moodle into master 2020-10-19 22:56:20 +02:00
Eloy Lafuente (stronk7) 6b3774b7b7 Merge branch 'MDL-57756-text-customparams' of https://github.com/cengage/moodle into master 2020-10-19 22:31:51 +02:00
Andrew Madden 8177ccf566 MDL-67695 mod_lti: Use correct return structure for get_tool_proxies.
* Deprecated serialise_tool_proxy() as no longer used.
* Use tool_proxy_return_structure for each proxy.
* Added tests for getting all proxies and orphaned proxies.
2020-10-20 04:08:35 +11:00
Sara Arjona d09980a8b0 Merge branch 'MDL-69897' of https://github.com/paulholden/moodle into master 2020-10-19 18:14:45 +02:00
Sara Arjona 66e3cceaa2 Merge branch 'MDL-69900-master' of git://github.com/mihailges/moodle into master 2020-10-19 13:41:51 +02:00
Katie Ransom ad7d432ebe MDL-69962 tool_usertours: Fix increase in included files 2020-10-19 10:45:26 +01:00
sam marshall 4dcca1b084 MDL-69687 Course: remove_course_contents orphaned completion data
The remove_course_contents function did not delete data from
course_module_completion table in most cases, resulting in large
quantities of orphaned data.
2020-10-19 10:26:12 +01:00
Sara Arjona c8ad0ca25b Merge branch 'master-MDL-69791' of https://github.com/golenkovm/moodle into master 2020-10-19 10:07:11 +02:00
Andrew Nicols 0fa7d368a6 Merge branch 'MDL-65448-master' of git://github.com/lucaboesch/moodle 2020-10-19 15:49:13 +08:00
Luca Bösch bdc639de03 MDL-65448 block_social_activities: Restyle moving. 2020-10-19 09:43:42 +02:00
Luca Bösch 60b2431798 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-19 09:33:19 +02:00
Luca Bösch 96d54e2ac9 MDL-65448 gradebook: Remove erraneous dev .movehere class left over. 2020-10-19 09:14:30 +02:00
Sara Arjona d06da02935 Merge branch 'MDL-69736-master' of git://github.com/ferranrecio/moodle into master 2020-10-19 09:03:42 +02:00
Brendan Heywood 1b47d4bc0e MDL-69513 email: Add support for email DKIM signatures 2020-10-19 16:20:24 +11:00
Andrew Nicols f9482497c1 Merge branch 'MDL-69687-master' of https://github.com/sammarshallou/moodle 2020-10-19 11:27:04 +08:00
Andrew Nicols 0f049286f0 Merge branch 'MDL-65448-master' of git://github.com/lucaboesch/moodle 2020-10-19 10:04:11 +08:00
sam marshall 2fe87d9566 MDL-69687 Course: Improve removal of completion data on MySQL 2020-10-16 18:20:23 +01:00
sam marshall edb5cd0de4 MDL-69687 DB: Add API for deleting data based on subquery
The new API works on normal databases (by deleting data based on the
subquery) and also on MySQL (by deleting the data using a weird join
on the subquery).
2020-10-16 18:20:23 +01:00
Luca Bösch 9340b2a18e MDL-37226 assign: align select all header checkbox 2020-10-16 16:09:09 +02:00
Paul Holden 59ec5b1851 MDL-69788 lang: fallback to all translations if misconfigured.
If given translation list contains only invalid entries, fallback
to returning the complete list of available language translations.
2020-10-16 14:33:39 +01:00
Luca Bösch 531ce52940 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-16 14:50:21 +02:00
Luca Bösch 71f05ec9cb MDL-65448 block_site_main_menu: Restyle moving. 2020-10-16 14:50:21 +02:00
Luca Bösch d1c884a56a MDL-65448 block_social_activities: Restyle moving. 2020-10-16 14:50:21 +02:00
Luca Bösch 411432c434 MDL-65448 gradebook: Restyle moving. 2020-10-16 14:50:21 +02:00
Luca Bösch 32be54d369 MDL-69945 core_calendar: let circles appear as circles 2020-10-16 14:24:09 +02:00
Sara Arjona 149fdcf075 weekly release 4.0dev 2020-10-16 13:18:32 +02:00
Sagar Ghimire a0ffd0de5f MDL-68284 gradebook: Prevent exposing hidden quiz grade item 2020-10-16 15:08:08 +11:00
Jake Dallimore e19669e432 Merge branch 'master_MDL-47178' of https://github.com/golenkovm/moodle 2020-10-16 11:52:09 +08:00
Jun Pataleta 3ae9f39c5c Merge branch 'MDL-69266-master' of https://github.com/HuongNV13/moodle 2020-10-16 10:09:47 +08:00
Huong Nguyen 0ee64fbc9c MDL-69266 qtype_ddwtos: 'unlimited' options fail in 3.9 2020-10-15 19:44:35 +07:00
Adrian Greeve a83c69c2f5 Merge branch 'MDL-69549-master-7' of git://github.com/andrewnicols/moodle 2020-10-15 15:10:05 +08:00
Jun Pataleta f720b77ab6 Merge branch 'MDL-69583-master' of git://github.com/ferranrecio/moodle 2020-10-15 13:56:47 +08:00
Jun Pataleta 8252b24f95 Merge branch 'MDL-69520-master' of git://github.com/sarjona/moodle 2020-10-15 13:53:26 +08:00
Simey Lameze d6c5df42a4 MDL-69549 mod_resource: content export implementation 2020-10-15 13:45:59 +08:00
Andrew Nicols bf535c522d MDL-69549 mod_page: Content export implementation 2020-10-15 13:45:59 +08:00
Andrew Nicols 1e6f81659e MDL-69549 mod_folder: Content export implementation 2020-10-15 13:45:59 +08:00
Andrew Nicols deb400c6bf MDL-69549 core: Add context export API 2020-10-15 13:45:58 +08:00
Andrew Nicols e5371191c6 Merge branch 'MDL-69739-master' of https://github.com/clransom/moodle 2020-10-15 13:16:32 +08:00
Eloy Lafuente (stronk7) 7a478c3211 Merge branch 'MDL-69813' of https://github.com/paulholden/moodle into master 2020-10-14 22:47:02 +02:00
Eloy Lafuente (stronk7) 76cfbfc5bc Merge branch 'MDL-63805-master' of git://github.com/jleyva/moodle into master 2020-10-14 21:22:02 +02:00
Eloy Lafuente (stronk7) 19b0f08cc2 MDL-68070 messaging: Ensure that error is shown on first messages
Before there is a conversation, messages between users are sent
using core_message_send_instant_messages instead of
core_message_send_messages_to_conversation.

That method had an undefined $errormessage variable, ultimately
causing the problem detected on message_post_message()/message_send()
to never been returned by the external.

This just adds the same error than already existing conversations do,
but returning it as warning, for BC, JS will show it.
2020-10-14 18:57:16 +02:00
Sara Arjona 0c69575cc4 MDL-69520 core_h5p: unit tests for covering example and tutorial 2020-10-14 17:47:48 +02:00
Sara Arjona 6171c4bbe8 MDL-69520 core_h5p: add example and tutorial links 2020-10-14 17:47:46 +02:00
Eloy Lafuente (stronk7) 33a4c4a3b9 MDL-68070 messaging: Amend lang string to be clearer for any user.
Credit goes to Helen Foster for the improvement, thanks!
2020-10-14 16:53:22 +02:00
Katie Ransom 51caf76655 MDL-69739 tool_usertours: Add tour-level CSS selector 2020-10-14 13:17:16 +01:00
Víctor Déniz e335eb092a Merge branch 'MDL-68900-master' of https://github.com/sumitnegi933/moodle 2020-10-14 12:35:26 +01:00
Juan Leyva 1a09fc8d34 MDL-63805 glossary: New WS mod_glossary_prepare_entry_for_edition 2020-10-14 12:46:41 +02:00
Juan Leyva b4a30d7acc MDL-63805 glossary: New WS mod_glossary_update_entry 2020-10-14 12:46:41 +02:00
Juan Leyva 3f5d99063b MDL-63805 glossary: Glossary API refactor 2020-10-14 12:46:41 +02:00
Ferran Recio fed691aa17 MDL-69583 tool_customlang: add CLI import 2020-10-14 11:59:17 +02:00
Jake Dallimore b5b9bbc7fe Merge branch 'master_MDL-69848' of https://github.com/golenkovm/moodle 2020-10-14 09:41:39 +08:00
Víctor Déniz df61149804 Merge branch 'MDL-69779-better-x-redirect-by' of https://github.com/brendanheywood/moodle 2020-10-13 23:39:29 +01:00
Víctor Déniz 01fe171421 Merge branch 'MDL-68440-master' of https://github.com/Peterburnett/moodle 2020-10-13 23:16:20 +01:00
Eloy Lafuente (stronk7) b673c0910a Merge branch 'MDL-68070-master_messaging_fix' of https://github.com/beenet-dev/moodle into master 2020-10-13 23:40:24 +02:00
Eloy Lafuente (stronk7) 05f18c4d01 Merge branch 'MDL-63806-master' of git://github.com/jleyva/moodle into master 2020-10-13 22:26:27 +02:00
Ferran Recio 489f6f2684 MDL-69583 tool_customlang: add customization import 2020-10-13 13:26:21 +02:00
Sara Arjona 11b094be4c weekly release 4.0dev 2020-10-13 13:24:07 +02:00
Sara Arjona cd678ee4c3 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-10-13 13:24:02 +02:00
Brendan Heywood 57aed80df6 MDL-68983 cache: Fix bug with readonly session combined with lock debug 2020-10-13 14:52:37 +11:00
Andrew Nicols 99ed3c3f1e Merge branch 'MDL-66928-request-dir-purge-bug' of https://github.com/brendanheywood/moodle 2020-10-13 11:48:41 +08:00
Brendan Heywood 9fabe1dda5 MDL-66928 core: Move request dirs to system tmp instead of localcache 2020-10-13 14:17:39 +11:00
Andrew Nicols 60dc6b01b5 Merge branch 'MDL-67654' of https://github.com/paulholden/moodle 2020-10-13 07:57:15 +08:00
Jenkins Automation 5650b7e3ad MDL-69726 calendar: fix raw event fetcher under postgres
Without this, there's a code path that under the right circumstances is hit and
results in a query with `FROM (mdl_event) ev` in it - which is not valid syntax
under postgres.
2020-10-13 09:33:52 +10:30
Paul Holden bdfe918b13 MDL-67654 mod_forum: formchangechecker for discussion inline replies. 2020-10-12 23:32:50 +01:00
Michael Milette 33c9499b28 MDL-68766 auth: Login form: 'Log in using...' should be h3, not h6 2020-10-12 10:40:22 -04:00
Simon Mok bf17107882 MDL-68070 messaging: Fix error when personal notification is disabled 2020-10-12 19:30:02 +08:00
Adrian Greeve 8a22784785 Merge branch 'master-MDL-69818' of https://github.com/golenkovm/moodle 2020-10-12 14:49:40 +08:00
Jake Dallimore 502a5d8a74 Merge branch 'MDL-68292-admin-sesskey' of https://github.com/brendanheywood/moodle 2020-10-12 14:36:41 +08:00
Brendan Heywood 155b0da5a5 MDL-68292 core: Remove sesskey leakage on module pages 2020-10-12 17:10:03 +11:00
Adrian Greeve 095aecb555 Merge branch 'MDL-65743-master' of git://github.com/lameze/moodle 2020-10-12 13:39:16 +08:00
Andrew Nicols 0c21917931 Merge branch 'MDL-69776-master' of git://github.com/jleyva/moodle 2020-10-12 12:33:07 +08:00
Adrian Greeve 6fb8242e93 Merge branch 'MDL-69649-master' of git://github.com/rezaies/moodle 2020-10-12 10:14:53 +08:00
Jake Dallimore 29da421a85 Merge branch 'MDL-69910-calendar-protectusername' of https://github.com/brendanheywood/moodle 2020-10-12 10:05:28 +08:00
Jake Dallimore 18dc396fb2 Merge branch 'MDL-69707-redis-avoid-write' of https://github.com/brendanheywood/moodle 2020-10-12 09:57:15 +08:00
Jake Dallimore 411d12bc9c Merge branch 'MDL-68406-master' of git://github.com/jleyva/moodle 2020-10-12 09:50:56 +08:00
Peter Burnett 3d49421a21 MDL-68440 cache: Added counting of default mappings 2020-10-12 11:41:00 +10:00
Adrian Greeve 560ef8653e Merge branch 'MDL-69825' of https://github.com/paulholden/moodle 2020-10-12 08:08:15 +08:00
AMOS bot 6e1508b6b3 Automatically generated installer lang files 2020-10-11 00:08:26 +00:00
Brendan Heywood 16c209cbc0 MDL-69779 core: Improved the X-Redirect-By header when debugging is on 2020-10-11 09:48:12 +11:00
Brendan Heywood 8d70a11307 MDL-69910 calendar: Fix export exception when both params are sent 2020-10-10 19:31:16 +11:00
Paul Holden 96ec6ee826 MDL-69825 admin: externalpage class using a callback for access check.
Co-Authored-By: Marina Glancy <marina@moodle.com>
2020-10-09 15:09:09 +01:00
David Mudrák b295a88821 MDL-69906 admin: Display Setup search engine as link only if it is valid
We use auto-generated admin section name here so we need to check that
the target section actually exists.
2020-10-09 14:16:37 +02:00
Sara Arjona 46f977a8bf weekly release 4.0dev 2020-10-09 11:11:39 +02:00
Sara Arjona d098704660 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-10-09 11:11:34 +02:00
Juan Leyva 328396c0d5 MDL-68406 tool_mobile: Allow users to log-out from the app
In this commit, we also reorganised how the Mobile box is displayed in the user profile.
We are allowing now site admins to see the user last access time.
2020-10-09 09:59:15 +02:00
Juan Leyva 8441d551ea MDL-63806 glossary: New WS mod_glossary_delete_entry 2020-10-09 09:42:56 +02:00
Juan Leyva f9b56649e7 MDL-63806 glossary: Return user permissions for entries in WS 2020-10-09 09:42:56 +02:00
Juan Leyva a7a1f0d48c MDL-63806 glossary: Move delete code to API function 2020-10-09 09:42:56 +02:00
Marina Glancy be53990301 MDL-69902 core_search: fix error in the custom fields indexing 2020-10-09 08:53:24 +02:00
Adrian Greeve 611a42b934 Merge branch 'MDL-68384-fix-spec-violations' of https://github.com/cengage/moodle 2020-10-09 12:06:37 +08:00
Jun Pataleta b68708059f Merge branch 'MDL-69740' of https://github.com/timhunt/moodle 2020-10-09 11:56:54 +08:00
Jun Pataleta fac0b05ed5 Merge branch 'MDL-69257-master' of git://github.com/mihailges/moodle 2020-10-09 11:12:23 +08:00
Mihail Geshoski 2212df5dd8 MDL-69257 core_h5p: Move $maxsize outside the foreach loop
There is no reason to repeatedly obtain the maximum size for uploading
files as a part of foreach loop.
2020-10-09 10:23:28 +08:00
Stephen Bourget 0544ab902d MDL-69900 core_backup: Allow IMSCC v1.0 restore to finish 2020-10-09 09:04:22 +08:00
Eloy Lafuente (stronk7) 56be458c45 Merge branch 'MDL-69582-master' of git://github.com/ferranrecio/moodle into master 2020-10-08 22:44:21 +02:00
Paul Holden 9cbce6858f MDL-69897 repository: add heading to delete file modal. 2020-10-08 20:28:40 +01:00
Thomas Wedekind 40fecef9d2 MDL-69582 tool_customlang: export cli script 2020-10-08 19:08:15 +02:00
Thomas Wedekind 1f4a5e485e MDL-69582 tool_customlang: add export langstring feature 2020-10-08 19:08:15 +02:00
Eloy Lafuente (stronk7) 2be470ab4b Merge branch 'MDL-69810-master' of git://github.com/jleyva/moodle into master 2020-10-08 16:36:48 +02:00
Eloy Lafuente (stronk7) 61da7e4fa6 Merge branch 'MDL-69712-master' of git://github.com/aanabit/moodle into master 2020-10-08 16:24:40 +02:00
Sara Arjona f25dba2de1 Merge branch 'MDL-64657-master' of git://github.com/jleyva/moodle into master 2020-10-08 14:15:26 +02:00
Sara Arjona e5a9a92d74 Merge branch 'MDL-69146' of https://github.com/stronk7/moodle into master 2020-10-08 12:43:22 +02:00
Sumit Negi bd6449fca9 MDL-68900 mod_forum: permission check for user who is viewing timed post
Pass current user object to post builder as argument, so that the permission to view timed post
will check with current user, who is viewing the posts instead of user who made that post.
2020-10-08 12:47:31 +05:30
Adrian Greeve b239ee8f1c Merge branch 'MDL-69805-master' of https://github.com/dravek/moodle 2020-10-08 15:01:35 +08:00
Adrian Greeve 348961d206 Merge branch 'MDL-69798' of https://github.com/timhunt/moodle 2020-10-08 13:35:41 +08:00
Jake Dallimore 87abb87ebd Merge branch 'MDL-69192-master-behat' of https://github.com/andrewnicols/moodle 2020-10-08 09:22:21 +08:00
Andrew Nicols 36419cf8d5 MDL-68665 assignfeedback_editpdf: Coding style fixes 2020-10-08 08:23:03 +08:00
Andrew Nicols 814ec28fef Merge branch 'MDL-68665-assign-stamp-cache' of https://github.com/jamie-catalyst/moodle 2020-10-08 08:17:01 +08:00
Andrew Nicols f908e8beef MDL-69192 mod_assign: Stop clicking OK on non-existent modal 2020-10-08 08:04:10 +08:00
Eloy Lafuente (stronk7) 753bda3d58 Merge branch 'MDL-69760-master' of https://github.com/inkjet2000/moodle into master 2020-10-08 00:23:47 +02:00
Víctor Déniz 308f1dd9ed Merge branch 'MDL-69759-master' of https://github.com/sammarshallou/moodle 2020-10-07 22:24:38 +01:00
Jamie Stamp e522d6dad4 MDL-68665 assignfeedback_editpdf: Fix systemsstamp URLs 2020-10-07 16:26:16 +01:00
Jamie Stamp 74b4d6368a MDL-68665 assignfeedback_editpdf: Add filearea to persist stamps 2020-10-07 16:25:59 +01:00
Justin Merrill b80d65e45a MDL-69760 core: add mdl_event index for assign adhoc tasks 2020-10-07 10:35:57 -04:00
Sara Arjona 7941ada0ee Merge branch 'MDL-65451' of https://github.com/marinaglancy/moodle into master 2020-10-07 09:39:46 +02:00
Andrew Nicols 675d90a39a Merge branch 'MDL-69192' of https://github.com/willob99/moodle 2020-10-07 13:15:08 +08:00
Andrew Nicols b702feb38d Merge branch 'MDL-67275-master-post_noun_verb' of git://github.com/mudrd8mz/moodle 2020-10-07 12:16:39 +08:00
Jake Dallimore 5e207348d3 Merge branch 'MDL-52407-master' of git://github.com/vmdef/moodle 2020-10-07 10:45:24 +08:00
Adrian Greeve c935f3bae0 Merge branch 'MDL-59510-master' of https://github.com/snake/moodle 2020-10-07 10:02:19 +08:00
AMOS bot be7fbeb8ef Automatically generated installer lang files 2020-10-07 00:07:41 +00:00
Víctor Déniz c064f06ea1 Merge branch 'MDL-62678-core-fetch-notifications' of https://github.com/brendanheywood/moodle 2020-10-06 22:59:24 +01:00
Eloy Lafuente (stronk7) 202a4cc6b8 Merge branch 'MDL-69746-Master' of https://github.com/tuanngocnguyen/moodle into master 2020-10-06 23:53:14 +02:00
Marina Glancy 7a9c8cbd3e MDL-65451 tool_uploaduser: move code away from index.php, add CLI script 2020-10-06 15:54:09 +02:00
Ferran Recio dd4a089b1c MDL-69736 core_h5p: enable player reporting 2020-10-06 13:02:45 +02:00
Paul Holden 27f8784204 MDL-69813 h5p: fix undefined addon ordering in framework test. 2020-10-06 10:45:21 +01:00
Eloy Lafuente (stronk7) 5ecd01fb19 weekly release 4.0dev 2020-10-06 10:20:34 +02:00
Eloy Lafuente (stronk7) a5dc22850e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-10-06 10:20:31 +02:00
Mikhail Golenkov f8d859a685 MDL-47178 question: Retain question authors when restoring backups. 2020-10-06 09:29:18 +11:00
Eloy Lafuente (stronk7) 9427ae82ce Merge branch 'MDL-69772-master-allcountrycodes' of git://github.com/mudrd8mz/moodle into master 2020-10-06 00:03:54 +02:00
Eloy Lafuente (stronk7) fd46cc5b37 Merge branch 'MDL-65074' of https://github.com/hitteshahuja/moodle into master 2020-10-05 23:12:01 +02:00
Víctor Déniz 7a8950c172 Merge branch 'MDL-69625' of https://github.com/paulholden/moodle 2020-10-05 19:22:03 +01:00
Sara Arjona 134c45e9ee Merge branch 'MDL-69355-master-filebuffer' of git://github.com/mudrd8mz/moodle into master 2020-10-05 18:33:34 +02:00
Jun Pataleta cc7c3b3e25 Merge branch 'MDL-69704-master' of git://github.com/sarjona/moodle 2020-10-05 23:13:08 +08:00
Adrian Hutchinson 9980578112 MDL-67028 mod_lti: Support CourseSection.timeFrame custom parameters 2020-10-05 07:55:02 -07:00
Paul Holden d178779851 MDL-69625 course: return raw custom field value in external method.
For clients that wish to consume the original value of the custom
field (e.g. timestamps for date fields), rather than the formatted
version, add a new "valueraw" property to the returned data.
2020-10-05 10:39:31 +01:00
Eloy Lafuente (stronk7) 79e1ab91d4 Merge branch 'master-MDL-69752' of https://github.com/golenkovm/moodle into master 2020-10-05 10:54:45 +02:00
Amaia Anabitarte 46b9e12a27 MDL-69712 core_h5p: Remove 'whitelist' key uses 2020-10-05 10:27:48 +02:00
Simey Lameze ac7ceac97e MDL-65743 lib: update moodle library docs 2020-10-05 13:38:31 +08:00
Simey Lameze 1c0baed969 MDL-65743 lib: add XMPPHP namespace and update calls 2020-10-05 13:37:51 +08:00
Simey Lameze 2a0b0df8d3 MDL-65743 lib: upgrade XMPPHP library to v2.2 2020-10-05 13:34:41 +08:00
Jun Pataleta 06d35120c8 Merge branch 'master-MDL-53966' of https://github.com/golenkovm/moodle 2020-10-05 13:24:19 +08:00
Mikhail Golenkov 9e23f5d7b8 MDL-69791 gradereport: Fix error message when invalid grade is entered 2020-10-05 14:56:58 +11:00
Jake Dallimore 255a910c92 MDL-59510 core_oauth2: autorefresh google drive, nextcloud and onedrive
Request additional offline access, allowing the repository to sign in
automatically each time, including across different user sessions, until
either the refresh token is invalidated or the user logs out of the
repository.
2020-10-05 09:19:29 +08:00
Jake Dallimore f5046a5a1d MDL-59510 core: report oauth2_refresh_token table in core provider 2020-10-05 09:19:29 +08:00
Jake Dallimore 0132037427 MDL-59510 core_oauth2: add autorefresh mode to oauth2\client
Changes:
- The client can now be instantiated with the new mode enabled.
- A user refresh token will be stored if returned as part of the
authorization_code grant but only if the user is authenticated and only
if the mode is enabled.
- If the mode permits it, attempt to exchange a stored refresh token for
a new access token during login checks, allowing access to continue
across sessions without the need to re-grant consent every time.
- Purge all refresh tokens for a given user, issuer and scope on client
log out. This makes sure logout persists across logins.
2020-10-05 09:19:29 +08:00
Jake Dallimore 6502c13b4f MDL-59510 core_oauth2: add oauth2_refresh_token table 2020-10-05 09:19:28 +08:00
Mikhail Golenkov 6edd064414 MDL-69848 upgrade: Delete notifications in chunks 2020-10-05 12:11:28 +11:00
Mikhail Golenkov 33f4559da1 MDL-69818 mod_feedback: Fix item dependency during activity restoration 2020-10-04 18:25:43 +11:00
Mikhail Golenkov 0f7c2b92f6 MDL-69752 mod_data: Format module intro on Database activities page 2020-10-04 13:44:17 +11:00
Mikhail Golenkov 252e85be58 MDL-53966 lesson: Allow maximum number of attempts to be unlimited 2020-10-04 13:20:39 +11:00
AMOS bot ca440b40d0 Automatically generated installer lang files 2020-10-03 00:08:25 +00:00
Tim Hunt 3a048549de MDL-69740 Behat init: more progress info at the end of the install 2020-10-02 23:15:50 +01:00
Juan Leyva 09cc128f95 MDL-69810 tool_mobile: Return support contact information via WS 2020-10-02 21:02:10 +02:00
Eloy Lafuente (stronk7) e3da0ef75d MDL-69146 composer: bump to moodle-behat-extension 3.400.0
Generated following the instructions @:

https://docs.moodle.org/dev/Composer#How_to_prepare_and_submit_composer_changes

(using php72)

Note that here we are jumping to 3-digit branches (for all branches > 39),
exactly how we have done for moodle.git branches (310, 311, 400, 401...)
2020-10-02 15:06:58 +02:00
Sara Arjona 87afa4d759 weekly release 4.0dev 2020-10-02 13:43:12 +02:00
Nathan Nguyen 6ced7617c5 MDL-69746 tool_replace: additional skip tables 2020-10-02 14:57:18 +10:00
Víctor Déniz 5cdc620f67 Merge branch 'MDL-69087-master' of git://github.com/sarjona/moodle 2020-10-01 23:43:01 +01:00
Víctor Déniz b39c286ea4 Merge branch 'MDL-69572-Master' of https://github.com/tuanngocnguyen/moodle 2020-10-01 23:29:22 +01:00
Eloy Lafuente (stronk7) 30fa4748f1 Merge branch 'MDL-69758-master' of https://github.com/sammarshallou/moodle into master 2020-10-01 23:44:05 +02:00
Claude Vervoort 80207a2ee1 MDL-57756 mod_lti: params change to text type 2020-10-01 17:37:29 -04:00
Sara Arjona 64fbd346ba MDL-69704 course: catch exception when calling get_course_content_items
When plugins are removed from disk, an exception is thrown when
calling component_callback_exists.
This exception should be catched here in order to load properly
the activity chooser (otherwise, the exception will be displayed
and no activity will appear).
2020-10-01 19:54:35 +02:00
Víctor Déniz 9ef727fec9 Merge branch 'MDL-69613-Master' of https://github.com/tuanngocnguyen/moodle 2020-10-01 17:44:31 +01:00
Tim Hunt 3c1416dcf3 MDL-69798 XML question export: excape special chars in idnumbers 2020-10-01 17:01:50 +01:00
Jamie Stamp 1343d84cc7 MDL-68665 assignfeedback_editpdf: Improve caching on stamps 2020-10-01 16:59:42 +01:00
Eloy Lafuente (stronk7) a8e6ddb20a Merge branch 'MDL-69672-master' of git://github.com/aanabit/moodle into master 2020-10-01 17:49:08 +02:00
Eloy Lafuente (stronk7) e47c357cc1 Merge branch 'MDL-69586' of https://github.com/paulholden/moodle into master 2020-10-01 17:12:24 +02:00
Sara Arjona f2e84d4da3 Merge branch 'MDL-69638' of https://github.com/stronk7/moodle into master 2020-10-01 15:01:47 +02:00
Sara Arjona 32f5dbbb80 Merge branch 'MDL-69050-master-allowlist' of git://github.com/mudrd8mz/moodle into master 2020-10-01 14:51:11 +02:00
David Mudrák 659e5282a4 MDL-69772 admin: Better validation for the allcountrycodes setting
The patch introduces a new admin_setting fiela type that can be used for
specifying comma separated list of countries. The field has inbuilt
validation so that only valid country codes can be inserted.
2020-10-01 13:39:46 +02:00
Sara Arjona a8d07a8737 MDL-69050 lang: Fix few remaining places spotted during integration 2020-10-01 13:02:48 +02:00
Sara Arjona 6bb0262ed8 Merge branch 'MDL-68098-master' of git://github.com/dpalou/moodle into master 2020-10-01 12:56:16 +02:00
Ferran Recio 757f832ffc MDL-69582 tool_customlang: fix options layout 2020-10-01 11:08:37 +02:00
Ferran Recio 55c0e80595 MDL-69582 tool_customlang: add label to textarea 2020-10-01 11:08:37 +02:00
Sara Arjona 0592e040b4 Merge branch 'MDL-67473-multipledeeplinking-squashed' of https://github.com/cengage/moodle into master 2020-10-01 10:28:03 +02:00
Jake Dallimore 0d0c8252d6 Merge branch 'MDL-69573-Master' of https://github.com/tuanngocnguyen/moodle 2020-10-01 12:19:16 +08:00
Adrian Greeve d3374e8865 Merge branch 'MDL-54956-master' of git://github.com/jleyva/moodle 2020-10-01 11:19:09 +08:00
willob99 b8ad9a1030 MDL-69192 mod_assign: replace grading confirmation popup 2020-09-30 10:42:12 -07:00
David Matamoros 84e9360c9d MDL-69805 mod_data: Freeze comment field if comments disabled 2020-09-30 15:47:16 +02:00
Matteo Scaramuccia 06cb9117d4 MDL-68536 core: Fix notice about undefined prop 'branch' in $CFG 2020-09-30 14:38:14 +02:00
Claude Vervoort 957da4b564 MDL-67473 mod_lti: deeplinking multiple support
AMOS BEGIN
 CPY [contentitem_help,mod_lti],[contentitem_deeplinking_help,mod_lti]
AMOS END
2020-09-30 08:03:59 -04:00
Nathan Nguyen 10db3a0b0a MDL-69573 core_course: Make MAX_COURSES_IN_CATEGORY configurable 2020-09-30 16:02:39 +10:00
Adrian Greeve 87e858e0df Merge branch 'MDL-37802' of https://github.com/paulholden/moodle 2020-09-30 13:52:26 +08:00
Brendan Heywood f3844e595e MDL-62678 core: Improve efficiency of notifications and avoid ajax call 2020-09-30 13:55:30 +10:00
Jake Dallimore 9d5e79dbac Merge branch 'MDL-68845-master' of git://github.com/jleyva/moodle 2020-09-30 11:45:06 +08:00
Adrian Greeve e682c64b25 Merge branch 'MDL-68562' of https://github.com/mkassaei/moodle 2020-09-30 11:10:30 +08:00
Eloy Lafuente (stronk7) 3cb767f04c MDL-69638 install: update the list of stale files for 3.10 2020-09-29 22:37:52 +02:00
Víctor Déniz 8787cfe6c5 Merge branch 'MDL-67841-master' of git://github.com/jleyva/moodle 2020-09-29 18:25:25 +01:00
Sara Arjona 0cd27ec8f7 Merge branch 'MDL-69342_profile_picture_deletion' of https://github.com/vtos/moodle into master 2020-09-29 19:00:54 +02:00
Amaia Anabitarte 97c0fa7286 MDL-69672 core_contentbank: is_context_allowed unit tests 2020-09-29 17:46:11 +02:00
Amaia Anabitarte 08687a5198 MDL-69672 core_contentbank: Check used context level 2020-09-29 17:46:10 +02:00
Jun Pataleta 83cf43b045 Merge branch 'MDL-69600-divertemails' of https://github.com/brendanheywood/moodle 2020-09-29 20:28:05 +08:00
Sara Arjona 76b5863917 Merge branch 'MDL-65976-master' of git://github.com/jleyva/moodle into master 2020-09-29 14:09:13 +02:00
Juan Leyva 417e5b9f84 MDL-65976 completion: New course completion message provider 2020-09-29 13:40:32 +02:00
Brendan Heywood 8c1c164e0a MDL-69707 session: Avoid redis writes if the session is unchanged 2020-09-29 20:45:38 +10:00
Brendan Heywood 0983a1c3d1 MDL-69600 core: Expose divertallemails config in UI 2020-09-29 20:29:32 +10:00
Martin Gauk 2355205ad8 MDL-69257 H5P: Check size of uploaded files and virus scan 2020-09-29 10:09:47 +00:00
Jun Pataleta 5f6177aba6 Merge branch 'MDL-41492-master' of https://github.com/peterburnett/moodle 2020-09-29 18:07:27 +08:00
Juan Leyva b4d2fc163d MDL-68845 calendar: New WS get_calendar_export_token 2020-09-29 10:52:13 +02:00
Juan Leyva ea9c822fc3 MDL-68845 calendar: Move duplicated code to function 2020-09-29 10:51:45 +02:00
Eloy Lafuente (stronk7) e049d30613 weekly release 4.0dev 2020-09-29 10:48:19 +02:00
Eloy Lafuente (stronk7) 1668e62ef6 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-09-29 10:48:16 +02:00
Jun Pataleta 620ec0e47f Merge branch 'MDL-69283-master' of git://github.com/jleyva/moodle 2020-09-29 13:53:42 +08:00
Claude Vervoort 7263f2855d MDL-68384 mod_lti: fix spec violations bo claim name and dl value type 2020-09-28 16:53:33 -04:00
Juan Leyva fada51aa32 MDL-67841 tool_mobile: Inform about last access with the app 2020-09-28 21:40:08 +02:00
Víctor Déniz 8512efb07e Merge branch 'MDL-69644' of https://github.com/paulholden/moodle 2020-09-28 20:33:35 +01:00
Shamim Rezaie 424e61d559 MDL-69649 form: Fix labels for defaultcustom form elements 2020-09-28 23:41:29 +10:00
Shamim Rezaie 2c93a1f53c MDL-69649 backup: Fix missing labels
- The backup details page uses a table to show a sumary of the backup
  content. Used role attribute to denote the tabular format of the
  summary.
- The backup details page displays activity name next to each activity
  icon. Therefore the icons are only decorative and do not need to have
  any title or even alt text.
- Form labels should be associated with form controls.  A div element is
  not a form control.
- The from attribute of the form labels should be equal to the id
  attribute of an element. Therefore, we first create a label and an
  input elements and associate them to each other, and then pass them to
  backup_detail_pair() when a label is needed.
2020-09-28 23:41:29 +10:00
Sara Arjona b1a2dd1681 Merge branch 'MDL-69695' of https://github.com/paulholden/moodle into master 2020-09-28 13:03:14 +02:00
sam marshall 131540c947 MDL-69759 Web services: app checks to token.php cause log errors 2020-09-28 11:54:29 +01:00
Sara Arjona 8223718081 Merge branch 'MDL-68935-master' of git://github.com/jleyva/moodle into master 2020-09-28 11:40:37 +02:00
Peter Burnett ba9fc5ed57 MDL-41492 cache: Added ability for alternate cache config 2020-09-28 15:12:33 +10:00
Nathan Nguyen 0b84fb7bec MDL-69572 mod_book : add bookid index to book_chapters 2020-09-28 10:43:06 +10:00
Nathan Nguyen ee1f0fb18a MDL-69613 gradereport: confirm message if override none is selected 2020-09-28 10:39:33 +10:00
AMOS bot 86289da23b Automatically generated installer lang files 2020-09-26 00:07:57 +00:00
Juan Leyva d2aa3e054f MDL-69283 webservice: New external setting for forcing timezone 2020-09-25 19:08:59 +02:00
Hittesh Ahuja 68110d352c MDL-65074 mod_quiz: Quiz navigation buttons shouldnt use btn-secondary
Removing .btn-secondary as plain.scss and default.scss in bootstrap hide the button from view.
2020-09-25 15:31:57 +01:00
Juan Leyva 94a0ee41e7 MDL-69776 files: New WS core_files_delete_draft_files 2020-09-25 10:37:16 +02:00
Paul Holden 582bb534c9 MDL-37802 repository: return error if unzipping files fails.
For instance, when a user tried to unzip a password protected zip
archive using the file manager.
2020-09-25 09:33:44 +01:00
Paul Holden 6a2720b0e6 MDL-69586 tool_usertours: use specified user in privacy prefs export. 2020-09-25 09:13:14 +01:00
Sara Arjona c68897b7e6 MDL-69087 core_h5p: add renderer to let personalize styles
Existing mod_hvp pluging has a renderer to let Moodle instances
alter styles, Javascript, semantics (fields in the editor) and
content: https://github.com/h5p/moodle-mod_hvp/blob/stable/renderer.php

The approach for core_h5p is exactly the same, to let people
to reuse their existing code.
2020-09-24 19:56:12 +02:00
David Mudrák 9ce768008c MDL-69050 lang: Stop using the term blacklist in mustache output engine 2020-09-24 19:41:58 +02:00
David Mudrák 7a079a890b MDL-69050 lang: Fix the variable name in the admin/cli/svgtool.php 2020-09-24 19:41:58 +02:00
David Mudrák cde6c9d4a8 MDL-69050 lang: Fix variable name and comment in core-notification YUI 2020-09-24 19:41:58 +02:00
David Mudrák 00b6772114 MDL-69050 lang: Rename and deprecate filetypes_util methods 2020-09-24 19:41:58 +02:00
David Mudrák 801ee23427 MDL-69050 lang: Improve the wording of the comments
Stop using the terms whitelist/blacklist when used to allow/deny things.
2020-09-24 19:41:58 +02:00
David Mudrák e2d54e6bd8 MDL-69050 lang: Fix the variable name in the Essay question type 2020-09-24 19:41:58 +02:00
David Mudrák f278c69c83 MDL-69050 lang: Rename the filetypesnotwhitelisted string
Rename the string identifier to filetypesnotallowed, copy all the
existing translations in AMOS and deprecate the original string to be
eventually removed.

AMOS BEGIN
 CPY [filetypesnotwhitelisted,core_form],[filetypesnotallowed,core_form]
AMOS END
2020-09-24 19:41:58 +02:00
David Mudrák e04e0c8cf8 MDL-69050 lang: Fix the variable name in the TeX filter library 2020-09-24 19:41:58 +02:00
David Mudrák 6bfc46802e MDL-69050 lang: Rename the whitelist variable in the Workshop locallib 2020-09-24 19:41:58 +02:00
David Mudrák dbaeeeb0ec MDL-69050 lang: Fix variables and methods names in curl_security_helper
The code has been using terms that were found exclusive and potentially
derogatory. Fixing the terms and making the variables and methods
consistent with the related admin settings.
2020-09-24 19:41:57 +02:00
David Mudrák d9dc9ae891 MDL-69050 lang: Fix placeholder in the err_wrongfileextension string
The name of the placeholder has been found exclusive and potentially
derogatory. Also the name of variable that was used to populate the
placeholder value. That was not the intention.
2020-09-24 19:41:57 +02:00
David Mudrák e7806fa918 MDL-69772 admin: Fix legacy coding style on Location settings admin page
No actual change here. Just polishing the coding style and adding
fulltree check.
2020-09-24 18:14:44 +02:00
David Mudrák 7bd57c30a1 MDL-69772 lang: Ignore misconfigured allcountrycodes filter
If the allcountrycodes filter contains only invalid values, ignore the
whole filter setting and make get_list_of_countries() return the full
list of all known countries, rather than empty list.
2020-09-24 18:14:43 +02:00
Víctor Déniz 5486b031ee weekly release 4.0dev 2020-09-24 16:27:09 +01:00
Víctor Déniz c25b0c3aa2 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2020-09-24 16:27:03 +01:00
Eloy Lafuente (stronk7) 98aadb040f Merge branch 'MDL-69698-master-licensecache' of git://github.com/mudrd8mz/moodle into master 2020-09-24 16:50:30 +02:00
Eloy Lafuente (stronk7) b583ce1826 Merge branch 'MDL-69718-display-size' of https://github.com/brendanheywood/moodle into master 2020-09-24 16:39:16 +02:00
Paul Holden 1315cc807e MDL-69644 tool_dataprivacy: fix focus outline of contact DPO link.
The link class attribute is a leftover from 7258bf0b, which was mostly
removed in 3b2f691f. It no longer serves a purpose and interferes with
the element focus outline.
2020-09-24 11:51:24 +01:00
Jun Pataleta 1d7781be53 Merge branch 'MDL-66587-master' of git://github.com/bmbrands/moodle 2020-09-24 11:11:20 +08:00
Eloy Lafuente (stronk7) c43dac4e36 Merge branch 'MDL-69454-master' of git://github.com/bmbrands/moodle into master 2020-09-23 17:10:35 +02:00
Eloy Lafuente (stronk7) dc187cd9c7 Merge branch 'MDL-68229-master' of git://github.com/jleyva/moodle into master 2020-09-23 11:51:09 +02:00
Dani Palou 703af2f91b MDL-68098 tests: Reset FILTERLIB_PRIVATE after tests 2020-09-23 11:18:41 +02:00
Dani Palou 25bc7a3d6b MDL-68098 ws: Add unit tests to test mathjax in WS 2020-09-23 11:18:41 +02:00
Eloy Lafuente (stronk7) 00ef6747f4 Merge branch 'MDL-69014' of https://github.com/paulholden/moodle into master 2020-09-22 22:42:55 +02:00
Juan Leyva ba2d9643e7 MDL-54956 quiz: Fix WS to support files submission 2020-09-22 18:03:23 +02:00
Juan Leyva 8bec429a98 MDL-54956 quiz: Return response files in attempts 2020-09-22 18:03:23 +02:00
Mahmoud Kassaei 9dea33e8d0 MDL-68562 Qtype_essay: Adding file-size limit to the attachment files 2020-09-22 14:50:35 +01:00
Eloy Lafuente (stronk7) 89c6402ba0 Merge branch 'MDL-66934-coursehistory' of https://github.com/cengage/moodle into master 2020-09-22 14:38:42 +02:00
Juan Leyva d6c289c5e3 MDL-64657 course: Return hidden section names when configured 2020-09-22 11:52:18 +02:00
Dani Palou 8c84eeeeac MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-22 09:43:03 +02:00
AMOS bot 242a712d65 Automatically generated installer lang files 2020-09-22 00:07:10 +00:00
Eloy Lafuente (stronk7) 57ec55328a Merge branch 'MDL-66648' of https://github.com/paulholden/moodle into master 2020-09-21 23:36:14 +02:00
comete-upn f86f0debd8 MDL-69667 competencies: fix competencies count always 0 in frameworks. 2020-09-21 23:19:52 +02:00
David Mudrák 0188cc2ed7 MDL-67275 forum: Fix language and accessibility issues with buttons
There were inconsistencies with the text shown on the submit button,
depending on the where the button was shown.

* Inline reply forum displayed general "Submit".
* Experimental nested discussion view reply form displayed "Post"
  (post/core string) which acts as a noun in other contexts and cannot
  be used as such in many non-English languages.
* Advanced reply form displayed "Post to forum".

The patch fixes this and starts to show "Post to forum" in all three
places consistently.

While working on this, two more issues were noticed and fixed:

* Inline reply textarea's title was hard-coded English "post" text.
  Changed to "Message" to provide advisory information related to the
  element.
* Buttons contained title attribute with the same value as the explicit
  button text. This goes against accessibility guidelines.
2020-09-21 22:48:33 +02:00
Vitaly 3a4af1eb4c MDL-69342 core_user: fixed user picture updating
When editing a user and checking the 'Delete picture' checkbox to delete
the old picture and uploading a new one at a time, the new one didn't appear
in the user profile. This happened due to the 'if/else' statement
in the 'core_user::update_picture()' method which allowed either to delete
the old picture or to upload a new one.
The fix removes the 'else' part of the 'if/else' statement to force
checking for a new uploaded picture no matter if a user checked
the 'Delete picture' checkbox or not.
2020-09-21 23:15:23 +03:00
sam marshall 2a15d7d3ea MDL-69758 Web services: core_get_course_contents PHP warnings
Calls to core_get_course_contents can cause PHP warnings in the server
log if there are any URL instances in the course with sketchy URLs.
This is because url_export_contents incorrectly returns null instead
of an empty array if there is an error.
2020-09-21 15:24:12 +01:00
Bas Brands eb9935c909 MDL-69454 core_search: consistent backup search 2020-09-21 13:41:05 +02:00
Bas Brands 702d1ed5f8 MDL-69454 core_search: consistent cohort search 2020-09-21 11:54:53 +02:00
Bas Brands a522ded1e3 MDL-69454 core_search: consistent content bank search 2020-09-21 11:54:53 +02:00
Bas Brands c549ca5d35 MDL-69454 core_search: consistent activity chooser search 2020-09-21 11:54:53 +02:00
Bas Brands 661d6d7dd3 MDL-69454 core_search: consistent template library search 2020-09-21 11:54:52 +02:00
Bas Brands 32d076a3a6 MDL-69454 core_search: consistent capability search 2020-09-21 11:54:52 +02:00
Bas Brands fb61341ca5 MDL-69454 core_search: consistent tag search 2020-09-21 11:54:51 +02:00
Bas Brands ae0f81f8d8 MDL-69454 core_search: message search 2020-09-21 11:54:51 +02:00
Bas Brands 4c71e1d0d0 MDL-69454 core_search: consistent mod searches 2020-09-21 11:54:51 +02:00
Bas Brands 411cf64738 MDL-69454 core_search: consistent block searches 2020-09-21 11:54:46 +02:00
Bas Brands d5593b18c2 MDL-69454 core_search: consistent course management search 2020-09-21 10:15:11 +02:00
Bas Brands 968cd48336 MDL-69454 core_search: consistent frontpage course search 2020-09-21 10:15:11 +02:00
Bas Brands ebfee99d90 MDL-69454 core_search: consistent admin search 2020-09-21 10:15:11 +02:00
Bas Brands 1a2a52d121 MDL-69454 core_search: consistent navbar search 2020-09-21 10:15:11 +02:00
Brendan Heywood 6e935cc29c MDL-69718 core: Added support for TB and PT to display_size 2020-09-21 11:02:16 +10:00
Claude Vervoort 5b8c646e68 MDL-66934 mod_lti: support context history param 2020-09-18 14:11:34 -04:00
Juan Leyva f96e58bd4d MDL-68229 tool_mobile: Add missing option to disable tags in the app 2020-09-18 15:25:22 +02:00
Sara Arjona c86699ecb2 MDL-69548 grunt: build ignorefiles 2020-09-18 09:55:57 +02:00
Sara Arjona 1752b44d4a Merge branch 'MDL-69548-master' of git://github.com/mickhawkins/moodle into master 2020-09-18 09:40:35 +02:00
Michael Hawkins 5dc3df0e0c MDL-69548 core: Adding the http-message library
This is a dependency of ZipStream
2020-09-18 10:01:09 +08:00
Eloy Lafuente (stronk7) f852aa8ad5 weekly release 4.0dev 2020-09-17 19:04:10 +02:00
Eloy Lafuente (stronk7) 4778d69273 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-09-17 19:04:07 +02:00
David Mudrák af30f18a19 MDL-69355 file: Do not attempt to set headers after output started
It was found out that in certain situations there may be some content
in to output handlers buffers. Let's allow that to happen given that:

* default handler's buffer is not sent as a part of the file and an
  error is reported into the server log.
* other handlers' buffer is sent with the assumption that it is required
  for the correct serving of the file.
2020-09-17 17:37:43 +02:00
Eloy Lafuente (stronk7) 8948440944 Merge branch 'MDL-69395' of github.com:stronk7/moodle into master 2020-09-17 17:00:49 +02:00
Eloy Lafuente (stronk7) 75f0ebd3fe MDL-69395 theme_classic: remove superfluous selector already in boost 2020-09-17 13:07:10 +02:00
Jun Pataleta 17ce464bd2 Merge branch 'MDL-69630-master' of git://github.com/mihailges/moodle 2020-09-17 08:43:51 +02:00
Eloy Lafuente (stronk7) 9efb64f9be Merge branch 'MDL-62387' of https://github.com/paulholden/moodle into master 2020-09-17 08:43:51 +02:00
Eloy Lafuente (stronk7) e390babcf9 Merge branch 'MDL-68909-master' of git://github.com/sarjona/moodle into master 2020-09-17 08:43:51 +02:00
Eloy Lafuente (stronk7) 5e124b9040 Merge branch 'MDL-69664-master' of git://github.com/junpataleta/moodle into master 2020-09-17 08:43:51 +02:00
Eloy Lafuente (stronk7) 6e6a1785df Merge branch 'MDL-69395-master' of git://github.com/bmbrands/moodle into master 2020-09-17 08:43:51 +02:00
Sara Arjona ee8f3266d2 Merge branch 'MDL-68688-master' of git://github.com/aanabit/moodle into master 2020-09-17 08:43:51 +02:00
Jun Pataleta 9e8e1002e8 Merge branch 'MDL-69663-master' of https://github.com/sammarshallou/moodle 2020-09-17 08:43:51 +02:00
Davo Smith 6ea01b6e99 MDL-68564 outputrenderers: extend before_footer hook to allow output 2020-09-17 08:43:51 +02:00
Michael Hawkins 8eee0f5e26 MDL-69548 core: Adding the php-enum library
This is a dependency of ZipStream
2020-09-17 14:16:59 +08:00
Michael Hawkins 6d3c27fe7f MDL-69548 core: Adding the ZipStream library
This allows downloading of zip files as a stream, and will be used by
the Download course content project (MDL-69540).
2020-09-17 14:16:59 +08:00
Mihail Geshoski 03838167cb MDL-69630 format_social: Fix behat tests 2020-09-17 12:22:30 +08:00
Bas Brands d910726704 MDL-66587 mod_quiz: visible quiz timer 2020-09-16 15:21:27 +02:00
Juan Leyva 35101a6a2c MDL-68935 course: Return context data in get_content WS 2020-09-16 12:32:22 +02:00
AMOS bot 8ac19f8549 Automatically generated installer lang files 2020-09-16 00:07:08 +00:00
David Mudrák be2015a176 MDL-69698 licenses: Improve the performance of the licenses cache
The cache uses a single simple key and there is no need to hash it.
2020-09-15 10:37:06 +02:00
David Mudrák 036c583800 MDL-69698 licenses: Do not cache the localised licenses fullnames
The localisation must happen only after loading the list of licenses
from cache so that the name is displayed in the current user's preferred
language, not in the language of the user who initiated the cache
rebuild.
2020-09-15 10:37:06 +02:00
Paul Holden 21a0008f58 MDL-62387 tool_lp: switch to core 'cohort' form element.
The autocomplete AJAX is identical to the version in tool_lp, but also
includes support for excluding suggestions (i.e. cohorts already
synced with the current learning plan).
2020-09-15 08:06:22 +01:00
Jun Pataleta 2bb6d2415f Merge branch 'MDL-68702-Master' of https://github.com/tuanngocnguyen/moodle 2020-09-15 11:57:11 +08:00
Jun Pataleta 5391d6b098 Merge branch 'MDL-42012-master-alt' of git://github.com/andrewnicols/moodle 2020-09-15 11:53:09 +08:00
Andrew Nicols 1c4b3ee262 MDL-42012 cache: Fix missing return value 2020-09-15 11:46:31 +08:00
Eloy Lafuente (stronk7) 6fea9b47d1 Merge branch 'MDL-42012-master-alt' of git://github.com/andrewnicols/moodle into master 2020-09-14 23:28:33 +02:00
Eloy Lafuente (stronk7) 1ab5d74983 Merge branch 'MDL-69658' of https://github.com/paulholden/moodle into master 2020-09-14 22:56:11 +02:00
Paul Holden 2aa48515db MDL-69695 mod_folder: use forcedownload setting during inline display. 2020-09-14 21:38:35 +01:00
Paul Holden 73c29aff59 MDL-69014 tool_usertours: clean up user preferences of deleted tours. 2020-09-14 20:36:30 +01:00
Paul Holden 2175216110 MDL-66648 user: consistent checks for linking to full profile.
The access checks for displaying a link to a users' full profile
now match the checks performed on the full profile page itself.
2020-09-14 20:22:07 +01:00
AMOS bot 3300221b6e Automatically generated installer lang files 2020-09-13 00:07:48 +00:00
AMOS bot 3ea93a0a90 Automatically generated installer lang files 2020-09-12 00:07:29 +00:00
Nathan Nguyen 65c847d8fd MDL-68702 core_backup: exclude legacy course files 2020-09-11 10:41:37 +10:00
Stephen Bourget 1a453e4d8d MDL-69630 format_social: Add ajax support 2020-09-10 19:04:34 -04:00
Sara Arjona 67a11150de MDL-68909 h5p: move temporary editor files to draft area 2020-09-10 13:42:16 +02:00
Sara Arjona 6d4e245b7c MDL-68909 h5p: upgrade step to remove files in editor filearea
As temporary editor files have been moved from core_h5p/editor to
user/draft, they can be removed (to clean unused DB entries).
2020-09-10 13:41:45 +02:00
Amaia Anabitarte 22da620a7c MDL-68688 core_contentbank: Empty content bank notification 2020-09-10 11:58:28 +02:00
sam marshall aa823d1c23 MDL-69663 Web services: override_webservice_execution not honoured
If two different plugin types (e.g. theme, local) implement
override_webservice_execution callbacks, then all of them except
the 'last' plugin type do not work correctly.
2020-09-10 09:48:31 +01:00
Sara Arjona d4d798e684 weekly release 4.0dev 2020-09-10 08:51:58 +02:00
Sara Arjona d18b18216a Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-09-10 08:51:56 +02:00
Jun Pataleta 46d4cf0c98 MDL-69664 mod_lti: Apply correct badge class to tool card 2020-09-09 23:34:04 +08:00
Sara Arjona de1b21a3bf Merge branch 'MDL-69466-master' of https://github.com/JBThong/moodle into master 2020-09-09 11:39:05 +02:00
Sara Arjona 14bb6b5103 Merge branch 'MDL-69645-master' of git://github.com/lucaboesch/moodle into master 2020-09-09 11:00:40 +02:00
Jun Pataleta 008b6410fd Merge branch 'MDL-57682-master-fix' of git://github.com/andrewnicols/moodle 2020-09-09 16:10:00 +08:00
Bas Brands 609d8b380e MDL-69395 theme_boost: improve colour contrast for form input fields
- for this issue the atto styles.css was moved into theme boost so
we can use our preset variable for $gray-500
2020-09-09 09:59:08 +02:00
Andrew Nicols 5f581ce9eb MDL-57682 mediaplayer_videojs: Improve in-page caching of lang strings 2020-09-09 15:36:46 +08:00
Andrew Nicols 36f90b454c MDL-57682 mediaplayer_videojs: Login not required for lang fetch 2020-09-09 15:14:09 +08:00
Thong Bui f5cb4b9b5e MDL-69466 Autocomplete widget: Improve keyboard accessibility 2020-09-09 13:47:19 +07:00
Sara Arjona 7c99f40d61 Merge branch 'MDL-69521' of https://github.com/stronk7/moodle into master 2020-09-09 08:08:06 +02:00
Andrew Nicols 7f7df727c2 MDL-42012 cache: Valid definitions are required even when disabled 2020-09-09 14:04:17 +08:00
Andrew Nicols d98bbcbbe6 MDL-42012 cache: Fully disable cache for disabled cache factory 2020-09-09 14:04:05 +08:00
Andrew Nicols 063c9ee94f MDL-42012 cache: Allow data sources to work when caching is disabled 2020-09-09 13:59:41 +08:00
Andrew Nicols e19c2a1e48 MDL-68797 tool_mobile: Version bump 2020-09-09 12:44:12 +08:00
Andrew Nicols 44124e453d Merge branch 'MDL-68797-master' of https://github.com/nguyenphuctien/moodle 2020-09-09 12:27:17 +08:00
Andrew Nicols 4285ebb455 Merge branch 'MDL-57682-master' of git://github.com/rezaies/moodle 2020-09-09 12:22:54 +08:00
Eloy Lafuente (stronk7) 3131766547 Merge branch 'MDL-69116-master' of git://github.com/rezaies/moodle into master 2020-09-08 23:14:19 +02:00
Paul Holden 416dd35832 MDL-69658 quizaccess_seb: progress bar on install only when necessary. 2020-09-08 19:31:36 +01:00
Eloy Lafuente (stronk7) 19070b2e01 MDL-69521 core: Move all comments in code from 4.4 to 4.2 2020-09-08 18:59:47 +02:00
Eloy Lafuente (stronk7) 432b9a9075 MDL-69521 core: Move all comments in code from 4.3 to 4.1 2020-09-08 18:59:46 +02:00
Eloy Lafuente (stronk7) 2b766e57b6 MDL-69521 core: Move all comments in code from 4.2 to 4.0 2020-09-08 18:59:46 +02:00
Eloy Lafuente (stronk7) 74ee34fd87 MDL-69521 core: Move all comments in code from 4.1 to 3.11 2020-09-08 18:59:30 +02:00
Eloy Lafuente (stronk7) fd0b332db3 Merge branch 'MDL-69510-master' of https://github.com/snake/moodle into master 2020-09-08 15:27:29 +02:00
Sara Arjona 3a66b4771f Merge branch 'MDL-69525-master-1' of git://github.com/mihailges/moodle into master 2020-09-08 14:21:37 +02:00
Sara Arjona 683539696a Merge branch 'MDL-28501-master' of https://github.com/mackensen/moodle into master 2020-09-08 13:27:55 +02:00
Michael Hawkins e8632a4ad0 MDL-69340 tag: Correct the filter input HTML in the tag manager 2020-09-08 08:54:26 +02:00
Mihail Geshoski 630078eb4a MDL-69048 book: Sanitize previous chapter value in add new chapter page 2020-09-08 08:54:26 +02:00
Andrew Nicols a35b0464b1 MDL-68974 calendar: Use page context for block check 2020-09-08 08:54:26 +02:00
Andrew Nicols 5c91f31d2e MDL-68974 blocks: Check permission before generating content 2020-09-08 08:54:26 +02:00
Mihail Geshoski cb72d845f5 MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:54:26 +02:00
Mihail Geshoski 09a55f952e MDL-65115 core_files: Add get_total_content_size() in stored_file class
New function get_total_content_size() is introduced in the stored_file
class. The puprose of this function is to calculate and return the
total size (in bytes) of the content of an archive file.
2020-09-08 08:54:26 +02:00
Andrew Nicols 303119ad5b MDL-68974 admin: Unit tests for context parent/child test 2020-09-08 08:54:26 +02:00
Andrew Nicols c8283518ad MDL-68974 admin: Unit tests for loginas 2020-09-08 08:54:26 +02:00
Andrew Nicols 81bb3a65b1 MDL-68974 admin: Prevent login as outside of the desired context 2020-09-08 08:54:26 +02:00
Sara Arjona bb0eafb014 Merge branch 'MDL-68344-master' of https://github.com/JBThong/moodle into master 2020-09-08 08:44:46 +02:00
Jun Pataleta 74470752ac Merge branch 'MDL-69492' of https://github.com/paulholden/moodle 2020-09-08 12:56:54 +08:00
AMOS bot a14305ef1e Automatically generated installer lang files 2020-09-08 00:07:46 +00:00
Eloy Lafuente (stronk7) afb05bf276 Merge branch 'MDL-69262-master-2' of git://github.com/junpataleta/moodle into master 2020-09-07 23:42:45 +02:00
Eloy Lafuente (stronk7) dfc09fc300 Merge branch 'MDL-69448' of https://github.com/paulholden/moodle into master 2020-09-07 23:25:49 +02:00
Eloy Lafuente (stronk7) 5ce5c38a51 Merge branch 'MDL-69577-master' of git://github.com/crazyserver/moodle into master 2020-09-07 22:58:39 +02:00
Luca Bösch 5423b68b08 MDL-69645 quizaccess: Set allowPreferencesWindow to false in manual conf
Signed-off-by: Luca Bösch <luca.boesch@bfh.ch>
2020-09-07 21:26:23 +02:00
Charles Fulton a0908df796 MDL-28501 mod_folder: make force downloading behavior configuable 2020-09-07 14:37:33 -04:00
Mathew May 5a5f95e843 MDL-69240 tool_moodlenet: Clean MoodleNet profile field
Amended by: Eloy Lafuente (stronk7) <stronk7@moodle.org>
- adjust versions for every branch.
- modify verify_webfinger->profileurl external to PARAM_NOTAGS.
2020-09-07 17:44:41 +02:00
Sara Arjona aa69bc8e4e Merge branch 'MDL-69632-master-adminserversettings' of git://github.com/mudrd8mz/moodle into master 2020-09-07 13:43:52 +02:00
Sara Arjona 358e1c6dd1 Merge branch 'MDL-67468-Master' of https://github.com/tuanngocnguyen/moodle into master 2020-09-07 13:19:46 +02:00
Mathew May eacead6176 MDL-62609 lang: Final removal of deprecated strings 2020-09-07 08:06:02 +02:00
Sara Arjona 348252a205 Merge branch 'MDL-63261-squashed' of https://github.com/Chocolate-lightning/moodle into master 2020-09-07 07:30:03 +02:00
Mathew May ee94aded30 MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:10:46 +08:00
Eloy Lafuente (stronk7) 6a60111199 MDL-69521 core: Move all comments in code from 4.0 to 3.10 2020-09-06 17:00:25 +02:00
Shamim Rezaie f10ba30bbd MDL-57682 media_videojs: Cache videojs languages in the localstorage 2020-09-04 18:49:28 +10:00
David Mudrák 082313fc40 MDL-69632 admin: Fix the legacy coding style at the server section
No actual changes to the file made, only reformatted and cleaned up to
follow the recent coding guidelines.
2020-09-04 10:39:36 +02:00
Shamim Rezaie 375ca114e2 MDL-57682 media_videojs: webservice to get the language pack of videojs 2020-09-04 18:39:12 +10:00
Shamim Rezaie e11cf31d53 MDL-57682 media_videojs: convert videojs loader to es6 2020-09-04 18:39:12 +10:00
Paul Holden ca742a2137 MDL-69492 auth_cas: normalise member distinguished name config. 2020-09-04 08:25:50 +01:00
Paul Holden 73e090e793 MDL-69492 auth_ldap: normalise member distinguished name config. 2020-09-04 08:25:50 +01:00
Paul Holden 404eabc7b5 MDL-69448 backup: fix capability checks when unable to copy user data.
When a given user doesn't have the capability to "Include user data"
during course copying, freeze the form element rather than not adding
it at all.

This caused problems as the element was required before preceding with
the course copy.
2020-09-04 08:19:53 +01:00
Nathan Nguyen 7a1a3ec9b2 MDL-67468 filter_activitynames: use MUC 2020-09-04 15:33:56 +10:00
Tien Nguyen ee5c5fbde3 MDL-68797 Administration: Setting for mobile file type exclusion list 2020-09-04 11:00:00 +07:00
Tien Nguyen 1049909097 MDL-68797 Administration: Add auto complete setting 2020-09-04 10:59:00 +07:00
Thong Bui fb75fd0396 MDL-68344 filepicker: File Picker focus lost on upload 2020-09-04 09:30:59 +07:00
Sara Arjona 99777d963f weekly release 4.0dev 2020-09-03 17:09:10 +02:00
Sara Arjona c7df56a84d NOBUG: Fixed SVG browser compatibility 2020-09-03 17:09:03 +02:00
Andrew Nicols 33f6c33357 MDL-69391 behat: Grammar correction in feature 2020-09-03 11:34:47 +08:00
Andrew Nicols f9c870e16f Merge branch 'MDL-69391-master' of git://github.com/junpataleta/moodle 2020-09-03 11:32:31 +08:00
Jun Pataleta 2c08e043e4 MDL-69391 calendar: Accessibility tests for calendar 2020-09-03 11:10:40 +08:00
Jun Pataleta bca6b83c97 MDL-69391 auth: Colour contrast accessibility test for login page 2020-09-03 11:10:36 +08:00
Jun Pataleta aca735cdbf MDL-69391 theme: Darken course selector text colour
Use $gray-600 for a darker text colour in the course select box.
This also makes the colour consistent with the view selector which
also uses $gray-600.
2020-09-03 11:04:04 +08:00
Jun Pataleta 338fd44c28 MDL-69391 theme: Darken navbar-light colour
Increase the opacity for the sass variable $navbar-light-color a
little bit in order to achieve an acceptable colour contrast against
the white background.
2020-09-03 11:04:03 +08:00
Andrew Nicols 00b731e9b8 Merge branch 'MDL-69418-master' of https://github.com/dmitriim/moodle 2020-09-03 10:56:56 +08:00
Andrew Nicols a4d1e0f597 Merge branch 'MDL-69360-master' of git://github.com/NoelDeMartin/moodle 2020-09-03 10:44:31 +08:00
Andrew Nicols aa3342bf99 Merge branch 'MDL-69246' of https://github.com/timhunt/moodle 2020-09-03 10:39:31 +08:00
Jake Dallimore 0d6e5f2bc2 MDL-69510 admin: make ldap configuration warnings clear 2020-09-03 10:21:07 +08:00
Andrew Nicols 0d1e8aa711 Merge branch 'MDL-55340-master' of git://github.com/sarjona/moodle 2020-09-03 10:05:21 +08:00
Andrew Nicols ce7b2f4a20 Merge branch 'MDL-69069-master' of git://github.com/bmbrands/moodle 2020-09-03 09:32:36 +08:00
Andrew Nicols 2f7792a0da MDL-69117 output: Correct remove_dir usage 2020-09-03 09:01:32 +08:00
Andrew Nicols 695a7f2ddf Merge branch 'MDL-69117-master-2' of git://github.com/bmbrands/moodle 2020-09-03 08:38:54 +08:00
Eloy Lafuente (stronk7) e02e90fa52 Merge branch 'MDL-55971' of https://github.com/paulholden/moodle into master 2020-09-03 00:50:39 +02:00
Peter Burnett 309f54bf81 MDL-67306 webservices: Added webservice for Grade category creation 2020-09-03 00:20:44 +02:00
Eloy Lafuente (stronk7) 1250e912c7 Merge branch 'MDL-69608' of https://github.com/marinaglancy/moodle into master 2020-09-02 23:45:15 +02:00
Sara Arjona cf4841cfdb Merge branch '67278-master-categories-selector' of https://github.com/DSI-Universite-Rennes2/moodle into master 2020-09-02 17:37:15 +02:00
Sara Arjona 52cccf7e77 Merge branch 'MDL-68680-Master' of https://github.com/tuanngocnguyen/moodle into master 2020-09-02 17:15:53 +02:00
Julien Boulen 93d7220587 MDL-67278 course: Use autocomplete widget for course category selector 2020-09-02 15:30:34 +02:00
Eloy Lafuente (stronk7) d25b7ebd86 Merge branch 'MDL-69174-master' of git://github.com/sarjona/moodle into master 2020-09-02 13:11:33 +02:00
Marina Glancy 88a3e647ac MDL-69608 core_form: frozen forms do not have form tag 2020-09-02 12:19:17 +02:00
Bas Brands a158714284 MDL-69117 theme_boost: themedesigner source maps 2020-09-02 12:14:13 +02:00
Bas Brands a262d674b4 MDL-69117 theme_boost: deprecate the autoprefixer 2020-09-02 12:14:11 +02:00
Sara Arjona 40f6a3a1d1 MDL-69174 mod_h5pactivity: component passed always
The $component = 'mod_h5pactivity' will be passed always to the H5P
player because it's required for being able to call these activities
from outside using embed code. The xAPI implementation checks whether
the information should be tracked or not.
2020-09-02 12:09:30 +02:00
Noel De Martin 7440ed4ebc MDL-69360 behat: Fix js ready checks for non-moodle sites 2020-09-02 10:19:51 +02:00
Andrew Nicols 7f31497fb4 Merge branch 'MDL-68892-master' of git://github.com/ferranrecio/moodle 2020-09-02 09:44:26 +08:00
Andrew Nicols b4b4e7ff7b Merge branch 'master_MDL-69190' of https://github.com/danmarsden/moodle 2020-09-02 09:30:43 +08:00
Andrew Nicols 39ae77ca65 Merge branch 'MDL-67419-master' of git://github.com/farhan6318/moodle 2020-09-02 08:54:27 +08:00
Eloy Lafuente (stronk7) c8e43286eb Merge branch 'wip_MDL-69491_master' of git://github.com/gjb2048/moodle into master 2020-09-02 00:27:15 +02:00
Eloy Lafuente (stronk7) 23af23965e Merge branch 'MDL-69174-master' of git://github.com/sarjona/moodle into master 2020-09-02 00:21:40 +02:00
Sara Arjona c9bd1a6652 Merge branch 'MDL-63387-2' of https://github.com/paulholden/moodle into master 2020-09-01 16:58:00 +02:00
Pau Ferrer Ocaña 150913d3e1 MDL-69577 forum: Add courseid, forumid on get_discussion_posts response 2020-09-01 14:25:10 +02:00
Sara Arjona 6e507bd3eb Merge branch 'MDL-64525' of https://github.com/NeillM/moodle into master 2020-09-01 14:17:48 +02:00
Paul Holden ad7d46ed2e MDL-63387 course: use renamed role names, update Behat tests.
Specify that we want both role names (renamed course role plus
original).
2020-09-01 12:05:20 +01:00
Paul Holden 0cfa744fd9 MDL-63387 user: show both role names on course participants page. 2020-09-01 12:05:20 +01:00
Paul Holden 25ef8d4926 MDL-63387 enrol_cohort: show both roles names in instance config form. 2020-09-01 12:05:20 +01:00
Paul Holden ee640d868a MDL-63387 enrol_manual: show both role names in enrol users dialog. 2020-09-01 12:05:20 +01:00
Paul Holden a9165e69b4 MDL-63387 access: add parameter to define how role names are returned. 2020-09-01 12:05:15 +01:00
Sara Arjona 3e88252bd2 Merge branch 'MDL-51709-master' of git://github.com/lucaboesch/moodle into master 2020-09-01 09:04:03 +02:00
Mihail Geshoski 775dea63e9 MDL-69525 core: Publish a single event when toggling slave checkboxes 2020-09-01 14:42:15 +08:00
Sara Arjona 92294c86e9 Merge branch 'MDL-69394-master' of git://github.com/junpataleta/moodle into master 2020-09-01 06:44:59 +02:00
Andrew Nicols 7df5b8ed1c Merge branch 'MDL-69507' of https://github.com/timhunt/moodle 2020-09-01 11:11:07 +08:00
Andrew Nicols dffdad1670 Merge branch 'MDL-69387-master-2' of git://github.com/junpataleta/moodle 2020-09-01 10:59:23 +08:00
Sara Arjona 124a368a11 Merge branch 'MDL-38350-master' of https://github.com/sammarshallou/moodle into master 2020-09-01 07:26:42 +08:00
Andrew Nicols 1b0bd27ae1 Merge branch 'MDL-69505-master' of https://github.com/snake/moodle 2020-09-01 07:26:02 +08:00
Andrew Nicols 805cca26fd Merge branch 'MDL-69270-master' of git://github.com/ferranrecio/moodle 2020-09-01 07:26:02 +08:00
Andrew Nicols e1f3746112 MDL-69269 contentbank: Fix issues identified in integration 2020-09-01 07:26:01 +08:00
Andrew Nicols 1b577426d9 Merge branch 'MDL-69269-master' of git://github.com/sarjona/moodle 2020-09-01 07:26:01 +08:00
Andrew Nicols ffd9bbe6c1 Merge branch 'MDL-68569' of https://github.com/paulholden/moodle 2020-09-01 07:26:01 +08:00
Andrew Nicols 87c83fca20 Merge branch 'MDL-56595' of https://github.com/paulholden/moodle 2020-09-01 07:26:01 +08:00
Luca Bösch b36ea08709 MDL-51709 gradebook: Name display in single view. 2020-08-31 17:50:18 +02:00
Shamim Rezaie 8739f218a9 MDL-69116 qtype_multichoice: accessibility improvement
- Screen-readers should not see 'clear my choice' when it is not visible
- 'clear my choice' option should only become visible when a choice is
selected
2020-08-31 23:51:29 +10:00
Shamim Rezaie b0af84698b MDL-69116 qtype_mutichoice: Use label for the "clear my choice" link 2020-08-31 22:47:41 +10:00
Bas Brands c5ae5aa1b3 MDL-69069 theme_boost: color contrast for custom alerts 2020-08-31 08:15:45 +02:00
Andrew Nicols 2eef2b2982 Merge branch 'MDL-33981-Master' of https://github.com/tuanngocnguyen/moodle 2020-08-31 10:39:29 +08:00
Jake Dallimore 9ccf833ec1 MDL-69505 core_form: fix js min/max date restriction in dateselector
This was using the yui2-calendar attribute, not the yui 3 attribute.
2020-08-31 08:03:33 +08:00
Ferran Recio bcea21d894 MDL-68892 mod_h5pactivity: add required to package 2020-08-28 17:44:38 +02:00
Gareth Barnard 68e5f006e9 MDL-69491 themes: No 'fontsize' setting in Boost causes unit conflict. 2020-08-28 14:12:08 +01:00
Sara Arjona 66455e02d8 MDL-69269 contentbank: add support to download content 2020-08-28 12:28:13 +02:00
Sara Arjona f5b4ac4d2e MDL-69174 h5p: add component to the embed H5P code
When the Moodle component is passed to the player, xAPI tracking
is enabled so, if the component implements required xAPI API methods
(for instance, mod_h5pactivity does), grades and responses are sent.
Adding this component to the embed code will help to add
the embed code from a mod_h5pactivity to any other place (such as label,
page or book), and being able to track the responses to the original
mod_h5pactivity.
2020-08-28 12:25:51 +02:00
Marina Glancy 5889858cc5 MDL-55340 mod_feedback: export question labels
This was present in export in 3.0 but got lost during export
refactoring in 3.1
2020-08-28 12:24:28 +02:00
Andrew Nicols 3d7fd2f42f Merge branch 'MDL-69112-master' of git://github.com/merrill-oakland/moodle 2020-08-28 13:25:27 +08:00
Dmitrii Metelkin f52114addb MDL-69418 backup: attach data to grade items 2020-08-28 09:36:12 +10:00
Nathan Nguyen 293760a4b5 MDL-68680 core_grades: check grade item before trigger delete event 2020-08-28 08:58:20 +10:00
Paul Holden 0514b5749c MDL-56595 tool_usertours: set page params when configuring tours/steps. 2020-08-27 23:08:27 +01:00
Tim Hunt de3d216c5a MDL-69246 questions: allow for float issues when validating manual marks
As well as fixing the bug, I also rewrote the test to use
data providers, which should lead to more useful failure messages.

And, I moved the magic number we used as the float tolerence to
be a named constant.
2020-08-27 17:37:31 +01:00
Sara Arjona 38abfb6a01 weekly release 4.0dev 2020-08-27 17:36:17 +02:00
Sara Arjona b8507a3c41 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install into master 2020-08-27 17:36:14 +02:00
Jun Pataleta 6d0a5559ee MDL-69262 core: Use core/action_menu_link in core/action_menu_trigger
* Introduce the "actionmenulinkclasses" block in the action_menu_link
template so other templates importing it can have the option to override
its classes.
* Have the action menu trigger template use the action menu link
template to reduce code duplication.
2020-08-27 13:29:40 +08:00
Jun Pataleta 7ef7aaecac MDL-69262 core: Make instance count variable as a static class variable
With the static function variable $instance, calls to
\action_menu_link::export_for_template() from its subclasses are stored
in different variables. This causes duplicate IDs when different
implementations of action menu links are rendered on the action menu
trigger/link template. (e.g. action_menu_link and
action_menu_link_secondary both rendered on the same page).
To make the incrementing uniform for the action_menu_link class and its
implementations, the $instance variable is moved out of the
export_to_template() method and is now made to a static class variable.
2020-08-27 13:24:42 +08:00
Andrew Nicols 517ac3f3bb Merge branch 'master-MDL-67211_v6' of https://github.com/golenkovm/moodle 2020-08-27 12:47:59 +08:00
Andrew Nicols 2830f39bc2 Merge branch 'MDL-69458-master' of git://github.com/mihailges/moodle 2020-08-27 12:42:31 +08:00
Adrian Greeve 134cdddfc4 Merge branch 'MDL-69479-master' of git://github.com/mihailges/moodle 2020-08-27 11:41:10 +08:00
Andrew Nicols 4ac58f8810 Merge branch 'MDL-69501-master-enfix' of git://github.com/mudrd8mz/moodle 2020-08-27 11:30:32 +08:00
eWallah d051b3fc19 MDL-67413 competencies: do nothing upon activity completion 2020-08-27 11:11:51 +08:00
Mikhail Golenkov 674f126d0b MDL-67211 phpunit: Do not test the order of the running adhoc tasks. 2020-08-27 13:02:36 +10:00
Andrew Nicols 2ccf106454 Merge branch 'master-MDL-69358' of https://github.com/golenkovm/moodle 2020-08-27 10:57:19 +08:00
Andrew Nicols fbf3ca0705 Merge branch 'MDL-66810-master' of git://github.com/peterRd/moodle 2020-08-27 10:21:30 +08:00
Justin Hunt 107a0c9874 MDL-66810 mod_lti: Reinstate deprecated default permissions on iframe
microphone, webcam, camera, midi, encrypted-media, geolocation
2020-08-27 09:43:26 +08:00
Andrew Nicols 08afc79a1f MDL-66222 report_antivirus: Correct version number 2020-08-27 09:43:12 +08:00
Andrew Nicols e471d82358 Merge branch 'MDL-66222-antivirus-reporting' of https://github.com/Peterburnett/moodle 2020-08-27 09:34:37 +08:00
Adrian Greeve 80326f90c4 Merge branch 'MDL-69419-master' of git://github.com/andrewnicols/moodle 2020-08-27 08:08:51 +08:00
AMOS bot 6c54a4c8b5 Automatically generated installer lang files 2020-08-27 00:07:02 +00:00
Sara Arjona 6d898a7cfa Merge branch 'MDL-69389-master' of git://github.com/junpataleta/moodle into master 2020-08-26 18:02:50 +02:00
Sara Arjona 97c980c319 Merge branch 'MDL-69114-master' of git://github.com/bmbrands/moodle into master 2020-08-26 16:26:52 +02:00
Ferran Recio c5a8469abb MDL-69270 contentbank: replace content with file 2020-08-26 12:36:27 +02:00
Andrew Nicols 068de8fb79 Merge branch 'master-MDL-69307_v4' of https://github.com/golenkovm/moodle 2020-08-26 14:48:36 +08:00
Mikhail Golenkov 39b65190e2 MDL-69307 restore: Add CLI script to restore a course.
Co-authored-by: Matt Porritt <mattp@catalyst-au.net>
2020-08-26 14:35:21 +10:00
Jun Pataleta cc7dd09630 MDL-69389 auth: Add wcag141 test for the login page accessibility test 2020-08-26 11:04:57 +08:00
Jun Pataleta 8fcc063acd MDL-69389 theme_classic: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:04:57 +08:00
Jun Pataleta b01c8490b6 MDL-69389 theme_boost: Make default body font colour darker
Links and normal text should have at least a colour contrast ratio
of 3:1. To achieve this, $body-color will be using the darker
shade of gray $gray-900 (#212529).
2020-08-26 11:04:57 +08:00
Jun Pataleta bb6df88c3c MDL-69387 pix: Create PNG versions of the darkened completion icons
Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
generating these PNG versions of the darkened completion icons!
2020-08-26 11:02:35 +08:00
Jun Pataleta 5f46b735fe MDL-69387 pix: Darken completion icons
Darkened the fills of completion icons in order to meet the required
minimum contrast ratio of 3:1.
* Changed gray fills (#999) to #949494.
* Changed blue fills (#76A1F0) to #6393ee
* Changed green fills (#9C3) to #79a128

Thanks to Barbara Ramiro <barbara@moodle.com> for the help in
updating the SVG icons!
2020-08-26 11:02:35 +08:00
Jun Pataleta 2a43ce5702 MDL-69394 calendar: Fix event colour indicator contrast
* Darkened the link and clickable icon colours inside coloured events.
* Added borders around event colour indicators inside the month-view of
  the calendar for better contrast against the white background.
2020-08-26 10:59:35 +08:00
Andrew Nicols 72616bfd46 MDL-69419 core: Task reset tests cannot use random test times
If a scheduled task which uses a 'R' field is picked, then the reset of
updated task times will not necessarily be correctly determined as the
randomisation is picked during reset.

This can lead to some random test failures.

Actively specifying a test which does not make use of the 'R' random
field time addresses this issue.
2020-08-26 09:57:47 +08:00
Andrew Nicols 23517d9034 Merge branch 'master-MDL-67211_v6' of https://github.com/golenkovm/moodle 2020-08-26 09:37:16 +08:00
AMOS bot c01ccb3c26 Automatically generated installer lang files 2020-08-26 00:07:22 +00:00
Paul Holden b670d3adb6 MDL-55971 dataformat: method to write exports to file storage. 2020-08-25 17:28:55 +01:00
Paul Holden 5f59a478bd MDL-68569 customfield_select: get field options via instance method.
Deprecate the previous static method, which was only called from
instantiated field classes.
2020-08-25 14:51:51 +01:00
Mikhail Golenkov d7342dc239 MDL-67211 Tasks: Add cron_enabled setting.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:57 +10:00
Mikhail Golenkov 45875f6f7b MDL-67211 Tasks: Front-end to display currently running tasks.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:47 +10:00
Mikhail Golenkov b465a541ae MDL-67211 Tasks: Record when a task is running.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:03 +10:00
Andrew Nicols 20c84b6cc2 MDL-69464 core_output: Whitespace fix 2020-08-25 13:21:26 +08:00
Andrew Nicols 55f863e012 Merge branch 'MDL-69464' of https://github.com/marinaglancy/moodle 2020-08-25 12:39:48 +08:00
Adrian Greeve 9b9ee2fac7 Merge branch 'MDL-68921-master' of git://github.com/vmdef/moodle 2020-08-25 10:39:28 +08:00
Victor Deniz Falcon 9aa9efbfda MDL-68921 core_h5p: Add H5P libraries metadata settings 2020-08-25 00:48:02 +01:00
Helen Foster 383d080b17 MDL-69501 lang: Import fixed English strings (en_fix) 2020-08-24 09:35:41 +02:00
Neill Magill 2987182e16 MDL-64525 comments: Should not be able to delete frozen comments
Before this change in a frozen context a user would be able to delete
their own comments.

After this change a user will only be able to delete their own comments
if they still have the capability to post new comments or the capability
to delete comments from any user.
2020-08-24 07:59:27 +01:00
Neill Magill 7603ca3080 MDL-64525 comments: Tests for deleting frozen comments 2020-08-24 07:59:27 +01:00
Mihail Geshoski debf4835bf MDL-69479 core: Change 4.0 to 3.10 in theme/upgrade.txt 2020-08-24 14:04:20 +08:00
Mihail Geshoski 0ca1792940 MDL-69458 report_insights: Respect perpage value in pagination bar 2020-08-24 09:29:01 +08:00
Nathan Nguyen 8bbee0c8f0 MDL-33981 repository_equella: support internal copy 2020-08-24 09:54:34 +10:00
Eloy Lafuente (stronk7) 1a3b04f3d3 Merge branch 'MDL-69493' of https://github.com/paulholden/moodle into master 2020-08-22 17:04:33 +02:00
AMOS bot 52ae39f3b1 Automatically generated installer lang files 2020-08-22 00:07:45 +00:00
Eloy Lafuente (stronk7) 9a79c34eb6 MDL-69479 upgrade: Change all 4.0 occurrences to 3.10
Under parallel development, when something is worth being commented
in upgrade.txt notes, it will be applied to all the development branches
using the "earliest" one to be released. So, if something changes
in 3.10 (and also is applied to master), the upgrade.txt notes will
show 3.10 in both branches.

Of course, if something only goes to one dev branch (say master), then the
master version will be used in the notes (4.0 in this case).
2020-08-21 23:57:17 +02:00
Eloy Lafuente (stronk7) a04309d40e weekly release 4.0dev 2020-08-21 20:42:56 +02:00
Andrew Nicols b0a28f3bbb MDL-66818 mod_forum: Use cap manager to check exportability 2020-08-21 11:33:30 +08:00
Andrew Nicols 70deb22747 MDL-42434 chat: Disable stylelint important check 2020-08-21 11:25:26 +08:00
Sara Arjona a42143da3d MDL-42434 mod_chat: styles for chat themes to view help-icon properly
The styles for the bubble and the compact themes have been reviewed
because there weren't enough contrast for the help icon.
2020-08-20 23:45:56 +01:00
Sara Arjona 69846652f1 MDL-42434 mod_chat: display the whole help text
When testing this issue was raised that the help text was cut-off.
This patch should fix this issue changing the placement from
right/left to top.
2020-08-20 23:45:56 +01:00
Andrew Nicols 5e60d77da1 MDL-68705 testing: New CLI args to disable composer features
This commit introduces the following new flags:

  --no-composer-self-update   Disable composer self-update of the
                              composer.phar utility

  --no-composer-upgrade       Disable upgrade of development
                              dependencies using Composer.

  --disable-composer          Disable both composer self-update and
                              composer upgrade
2020-08-20 20:12:54 +02:00
Andrew Nicols b430493ca8 MDL-68705 testing: Allow composer updates to be disabled 2020-08-20 20:11:13 +02:00
sam marshall 9538ba0d67 MDL-38350 Lib: Rename directory before removing it, to reduce races 2020-08-20 16:52:28 +01:00
Marina Glancy cd467644eb MDL-69464 core_output: allow to avoid formatting in page->set_heading 2020-08-20 14:56:08 +02:00
Tim Hunt 58b7986776 MDL-69507 duration form field: should return an int number of seconds 2020-08-20 11:30:41 +01:00
Tim Hunt e5a0f11b5e MDL-69507 duration form field: modernise coding style 2020-08-20 11:30:40 +01:00
Adrian Greeve ea1437df64 Merge branch 'MDL-69055-master' of git://github.com/sarjona/moodle 2020-08-20 12:00:51 +08:00
Andrew Nicols d726fc84cf Merge branch 'MDL-69486-grade-idnumber' of https://github.com/Peterburnett/moodle 2020-08-20 11:59:08 +08:00
Andrew Nicols 56e89da101 Merge branch 'MDL-69375' of https://github.com/Cvmcosta/moodle 2020-08-20 11:50:28 +08:00
Adrian Greeve 84d2d98c63 Merge branch 'MDL-68964-master' of git://github.com/ferranrecio/moodle 2020-08-20 11:37:32 +08:00
Adrian Greeve 528c73e050 Merge branch 'MDL-42434-master' of git://github.com/sarjona/moodle 2020-08-20 11:21:53 +08:00
Adrian Greeve 257b90d10c Merge branch 'MDL-68683-master-fix' of git://github.com/lameze/moodle 2020-08-20 09:54:48 +08:00
Andrew Nicols 6e116209db Merge branch 'MDL-69449' of https://github.com/paulholden/moodle 2020-08-20 09:23:39 +08:00
Andrew Nicols d8e035e932 Merge branch 'MDL-68889-master' of git://github.com/bmbrands/moodle 2020-08-20 09:12:43 +08:00
Simey Lameze f968aaf7c4 MDL-68683 competencies: fix query to delete stale files 2020-08-20 08:59:25 +08:00
Andrew Nicols ef73bfbeac Merge branch 'MDL-69170-adhoc-task-timestamp' of https://github.com/Peterburnett/moodle 2020-08-20 08:45:27 +08:00
Andrew Nicols f8e916d705 Merge branch 'MDL-68975-master' of git://github.com/sarjona/moodle 2020-08-20 08:40:37 +08:00
Andrew Nicols 1e18a38e95 Merge branch 'MDL-67415' of https://github.com/stronk7/moodle 2020-08-20 08:21:45 +08:00
Andrew Nicols 5c617d81e6 Merge branch 'MDL-66818-master' of git://github.com/lameze/moodle 2020-08-20 08:16:07 +08:00
Simey Lameze 7235771927 MDL-66818 mod_forum: remove unnecessary behat steps 2020-08-20 08:03:53 +08:00
Andrew Nicols 06f900daff Merge branch 'MDL-66900' of https://github.com/paulholden/moodle 2020-08-20 07:51:30 +08:00
gthomas2 4224b8e541 MDL-66818 mod_forum: hide portfolio export button based on caps 2020-08-20 07:46:09 +08:00
Andrew Nicols d606ed13bc Merge branch 'MDL-69473-master' of git://github.com/sarjona/moodle 2020-08-20 07:39:22 +08:00
Andrew Nicols 7d06558681 Merge branch 'MDL-69271' of https://github.com/stronk7/moodle 2020-08-20 07:34:18 +08:00
Andrew Nicols 0fe7780c2f Merge branch 'MDL-69054-master' of git://github.com/sarjona/moodle 2020-08-20 07:28:19 +08:00
Andrew Nicols d48a0a9a5d Merge branch 'MDL-61215-master' of git://github.com/sarjona/moodle 2020-08-20 07:14:15 +08:00
Andrew Nicols 575e4d3efd Merge branch 'MDL-69401-master' of git://github.com/mihailges/moodle 2020-08-20 07:00:55 +08:00
Victor Deniz Falcon ffbf74eeb3 Merge branch 'MDL-69297-master' of git://github.com/peterRd/moodle 2020-08-19 23:28:34 +01:00
Sam Hemelryk dfbf1ced5e MDL-68896 mod_scorm: improved sendBeacon use when unloading 2020-08-19 20:29:28 +12:00
Adrian Greeve fe7ef8a59d Merge branch 'MDL-66665-master-POC2' of git://github.com/peterRd/moodle 2020-08-19 14:26:50 +08:00
Peter Dias 0c6b705719 MDL-66665 assign: Check whether a modified user could actually grade 2020-08-19 13:39:18 +08:00
Adrian Greeve 93eb0e5402 Merge branch 'MDL-68683-master' of git://github.com/lameze/moodle 2020-08-19 12:51:23 +08:00
Peter Dias 6de93d2f29 MDL-69297 assign: Check whether there is content for a submission
Confirm there is some content to be submitted for an assignment when processing it.
2020-08-19 12:07:52 +08:00
Adrian Greeve 678660093e Merge branch 'MDL-69475' of https://github.com/stronk7/moodle 2020-08-19 10:37:51 +08:00
Andrew Nicols d8d05f04d9 Merge branch 'MDL-26401-master' of git://github.com/lameze/moodle 2020-08-19 08:50:37 +08:00
Andrew Nicols 1a5f0e6cd9 MDL-67735 theme_boost: Fix incorrect whitespace 2020-08-19 08:39:33 +08:00
Andrew Nicols f24aae4cad Merge branch 'MDL-67735-master' of git://github.com/bmbrands/moodle 2020-08-19 08:28:49 +08:00
Andrew Nicols 7cd63bde9f Merge branch 'MDL-69089-master' of git://github.com/aanabit/moodle 2020-08-19 08:18:16 +08:00
Eloy Lafuente (stronk7) dd844d9c5f Merge branch 'MDL-65847-auth_db_error_handling' of git://github.com/leonstr/moodle into master 2020-08-19 00:35:18 +02:00
Eloy Lafuente (stronk7) d66512d213 Merge branch 'MDL-69095-master' of git://github.com/jleyva/moodle into master 2020-08-19 00:19:43 +02:00
Eloy Lafuente (stronk7) 44c8fe38c7 Merge branch 'MDL-63375-master' of https://github.com/syxton/moodle into master 2020-08-19 00:13:02 +02:00
Eloy Lafuente (stronk7) a1b23984aa Merge branch 'MDL-68444-master' of git://github.com/rezaies/moodle into master 2020-08-18 19:12:59 +02:00
Eloy Lafuente (stronk7) 089a3ac4a1 Merge branch 'MDL-68928' of https://github.com/Chocolate-lightning/moodle into master 2020-08-18 19:01:52 +02:00
Victor Deniz Falcon 63364b9877 Merge branch 'MDL-69477' of https://github.com/stronk7/moodle 2020-08-18 13:03:40 +01:00
Eloy Lafuente (stronk7) b7100ae5b1 MDL-69475 backup: Proper handling of backup::RELEASE versions
1) Remove any floatval() casting. They are breaking / killing
   .10 versions (converting them to .1). Since Moodle 2.0 all the
   backup::RELEASE have been 100% numerical values.
2) Use version_compare() always to compare backup::RELEASE values.
   They are always versions and the function is aware of versions
   > .9, able to clean/ignore alpha chars... and everything else.

Note that I've also changed a couple of cases in formats (topics and
weeks) that were correct, but just added the same comment and used
the same version_compare() comparison parameters style, so all uses
in core are consistent (and safe to be copied out there).
2020-08-18 12:48:10 +02:00
Eloy Lafuente (stronk7) 7995d72daa Merge branch 'MDL-69273-master-2' of git://github.com/andrewnicols/moodle into master 2020-08-18 10:58:26 +02:00
Simey Lameze fcb899b9c8 MDL-68683 competencies: step to delete orphaned evidence files 2020-08-18 16:02:38 +08:00
Simey Lameze 629ea1f932 MDL-68683 core: fix DML exception on upgrade step 2020-08-18 16:02:04 +08:00
Andrew Nicols 819d10fc59 MDL-69273 travis: Use exttests for https too 2020-08-18 07:50:48 +08:00
Andrew Nicols a67cb58e00 MDL-69273 travis: Move exttests check to after_script
The result of the final command `script` phase determines the build
result.

The cleanup belongs in the `after_script` phase.
2020-08-18 07:40:15 +08:00
Andrew Nicols 3508f17417 Merge branch 'MDL-69414' of https://github.com/nadavkav/moodle 2020-08-18 00:47:48 +02:00
Andrew Nicols 7df38d0352 Merge branch 'MDL-67943-master-1' of git://github.com/mihailges/moodle 2020-08-18 00:47:48 +02:00
Adrian Greeve e287a78a2e Merge branch 'MDL-69475' of https://github.com/stronk7/moodle 2020-08-18 00:47:48 +02:00
Eloy Lafuente (stronk7) db17ce6628 MDL-69475 versions: main version bump 2020-08-18 00:47:47 +02:00
Eloy Lafuente (stronk7) fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
Paul Holden 1d4dbcde96 MDL-69493 cohort: remove escaping of return URL params. 2020-08-17 21:22:02 +01:00
Amaia Anabitarte dfd8f6b56e MDL-69089 core_contentbank: Tests for empty content names 2020-08-17 15:54:36 +02:00
Amaia Anabitarte 5ea98dc5b1 MDL-69089 core_contentbank: Empty content names are not allowed 2020-08-17 15:54:36 +02:00
Bas Brands 4394f9e358 MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00:00
Peter Burnett 1cdee63821 MDL-69486 webservices: Added user and grade idnumber to grade items 2020-08-17 16:08:43 +10:00
Mihail Geshoski cf29c355ec MDL-67943 core: Update timezone list in core_date 2020-08-17 09:06:30 +08:00
Mihail Geshoski 0a9bc0cdfe MDL-69401 book: Limit character length in chapter title 2020-08-17 09:03:13 +08:00
Eloy Lafuente (stronk7) b0c4d7b738 MDL-69475 versions: main version bump 2020-08-17 00:11:59 +02:00
Eloy Lafuente (stronk7) 45ce46f202 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in mater, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-17 00:11:41 +02:00
Eloy Lafuente (stronk7) 35c36d3ffb MDL-69475 install: Version, env. and minimal changes before branching
Note this doesn't aim to be a complete change-set, but just the
minimum to switch to 3-digit $branches and keep installation, checks
and tests running and passing.
2020-08-16 21:03:28 +02:00
carlos 3bc8dde3db MDL-69375 mod_lti: Fix Names and Roles Link header format
- Changed line 469 of memberships.php to build Link header according to the Web Linking specification RFC8288.
2020-08-14 17:07:30 -03:00
Eloy Lafuente (stronk7) e45ecaa0cc MDL-69477 install: Ensure CFG variables are set before using them
On installation (or also phpunit/behat unit) some CFG variables
were being used (on setting validation) before being set.

So this commit just verifies they are set before using them. Note that,
strictly speaking, only one of them ($CFG->searchenginequeryonly)
required the extra check, but I think it's better to apply it to all
them, as a reference and in case validations are run in any other order.
2020-08-14 17:48:57 +02:00
Sara Arjona 522b89ce54 MDL-42434 mod_chat: add again the usingchat help icon
In Moodle 2.4 the help icon displayed in the chat window was
removed. It has been added to gui_ajax and gui_basic in order to help users.
2020-08-14 17:12:48 +02:00
Sara Arjona 6a10b78e2e MDL-69055 core_badges: display password/oauth fields properly 2020-08-14 17:10:17 +02:00
Sara Arjona 705c94a98b MDL-69054 core_badges: allow editing OBv1.0 backpacks 2020-08-14 17:09:10 +02:00
Sara Arjona 489cae2601 MDL-61215 core_user: use the new optimised_image filetype group
For the user profile picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:23 +02:00
Sara Arjona 8eecd8a341 MDL-61215 core_badges: use the new optimised_image filetype group
For the badge picture (instead of the web_image which includes
SVG files).
2020-08-14 17:06:23 +02:00
Sara Arjona c6bd7bd0ab MDL-61215 core_files: add new optimised_image group
Currently, PHP getimagesize method doesn't support SVG images.
As some features, such as badges, processs and optimise the images
before using them, a new filetype group has been created to exclude
SVG from there: optimised_image.
SVG can't be removed from web_image because then users won't be
able to add SVG images to their courses using labels, pages...
2020-08-14 17:06:23 +02:00
Eloy Lafuente (stronk7) a59fc3fc56 MDL-69271 auth_ldap: Don't assume any ordering, just verify matches
Both ldap or the DB can return information in a non-consistent
ordering leading to events to be generated in different order.

And current tests are, right now, assuming a given order.

Note this is a rare random, but it's happening, so better
fix it, see the issue for some more details.

So we just do the tests ordering immune, verifying that all the
expected events have been triggered and done. Irrespectively of their order.
2020-08-14 13:40:06 +02:00
Sara Arjona 5028169b26 MDL-69473 contentbank: change incorrect ref to size in type column 2020-08-14 08:53:49 +02:00
Sara Arjona 15381c0b33 MDL-68975 contentbank: add author field to file details view 2020-08-13 19:10:15 +02:00
Eloy Lafuente (stronk7) d54d9110ce MDL-67415 environment: change requirements
- mysql requirement up to 5.7
- postgres requirement up to 9.6
2020-08-13 01:22:44 +02:00
Eloy Lafuente (stronk7) 9c9fe8741e MDL-67415 environment: 3.10 base information
This is a direct copy of the 3.9 branch to have
changes under control easier for next commits.
2020-08-13 01:20:41 +02:00
Ferran Recio ea5cc5b0cb MDL-68964 mod_chat: fix theme param 2020-08-12 17:32:36 +02:00
Bas Brands 4d0b02a50e MDL-68889 block_recentlyaccessedcourses: small viewport issues
- on small devices the recentlyaccessedcourses does not show any courses
2020-08-12 13:04:08 +02:00
Paul Holden b983f174d0 MDL-66900 course: don't clean category description when editing. 2020-08-12 11:48:18 +01:00
Simey Lameze f9cfa28338 MDL-26401 group: change import to use csv_import_reader class 2020-08-12 16:35:23 +08:00
Mikhail Golenkov 1931f95d99 MDL-69358 backup: Do not clean up records for incomplete adhoc tasks.
Co-authored-by: Heena Agheda <heenaagheda@catalyst-au.net>
2020-08-12 12:05:15 +10:00
Paul Holden ef8296c819 MDL-69449 block_timeline: use dayslimit context data in template.
Ensures the correct value is used when initially rendering the
course timeline.
2020-08-11 23:33:20 +01:00
Victor Deniz Falcon 42ec52d2dd MDL-52407 travis: use Travis default notifications(email) 2020-08-11 17:07:34 +01:00
Mathew May b4121975b1 MDL-68928 core_course: Select activity chooser footer 2020-08-11 09:25:50 +08:00
Simey Lameze 8668a5a536 MDL-26401 group: add delimiter and encoding fields to import 2020-08-11 08:35:25 +08:00
Farhan Karmali 470f94dc46 MDL-67419 admin: New admin setting for lang during user creation 2020-08-10 18:34:19 +05:30
Nadav Kavalerchik 77bdf2150b MDL-69414 qtype/ddimageortext: Fix dropzones display in RTL mode 2020-08-08 20:46:34 +03:00
Matt Davidson 66570e4c27 MDL-63375 workshop: fix rubric grid view 2020-08-07 08:47:27 -04:00
Peter Burnett e63b6b8665 MDL-69170 task: Added timecreated field to adhoc task table 2020-08-05 09:41:25 +10:00
Leon Stringer 5049102eb6 MDL-65847 auth_db: user_update() handle errors
The external database authentication plugin (auth_db) can update the
external database if mapped fields are set to Update external: On
update.  This change adds error handling in case this update fails.
2020-08-03 11:51:08 +01:00
Bas Brands d17a85c7d2 MDL-69114 theme_boost: improve the color contrast for .*-info classes 2020-08-03 11:33:53 +02:00
Eric Merrill 6ff0525a3f MDL-69112 assign: Improve parsing of uploaded feedback names 2020-07-31 19:06:49 -04:00
Juan Leyva d58b3df938 MDL-69095 tool_mobile: Display warning if not allowed to use qr login 2020-07-28 13:49:26 +02:00
Juan Leyva f575093bc4 MDL-69095 tool_mobile: Avoid non-https sites using qrlogin by default 2020-07-28 13:49:26 +02:00
Dan Marsden b70d584b67 MDL-69190 grade: fix slow query. 2020-07-16 12:49:39 +12:00
Shamim Rezaie 216c392ac1 MDL-68444 calendar: Improve how screenreaders say week titles
Also removed the scope attribute from the mini-calendar table
because according to https://www.w3.org/TR/WCAG20-TECHS/H63.html
it was not needed:
  Note 1: For simple tables that have the headers in the first row
  or column then it is sufficient to simply use the TH elements without
  scope.
2020-07-14 22:12:13 +10:00
Shamim Rezaie 7328144c9d MDL-68444 calendar: Improve how screenreaders read day titles
Screenreaders now know if each day has any event or not
2020-07-14 22:12:06 +10:00
8678 changed files with 539352 additions and 373804 deletions
+3 -2
View File
@@ -227,7 +227,7 @@
},
// We're using babel transpiling so use their parser
// for linting.
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
@@ -300,7 +300,8 @@
},
parserOptions: {
'ecmaVersion': 9,
'sourceType': 'module'
'sourceType': 'module',
'requireConfigFile': false,
}
}
]
+4 -3
View File
@@ -20,8 +20,9 @@ jobs:
uses: actions/checkout@v2
- name: Configuring node & npm
shell: bash -l {0}
run: nvm install
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
- name: Installing node stuff
run: npm install
@@ -78,7 +79,7 @@ jobs:
if: ${{ matrix.db == 'pgsql' }}
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 9.6
postgresql version: 10
postgresql db: test
postgresql user: test
postgresql password: test
+3
View File
@@ -51,3 +51,6 @@ moodle-plugin-ci.phar
.eslintignore
.stylelintignore
/jsdoc
/admin/tool/componentlibrary/docs
/admin/tool/componentlibrary/hugo/site/data/my-index.json
.hugo_build.lock
@@ -111,8 +111,22 @@ module.exports = ({template, types}) => {
if (!this.seenDefine && path.get('callee').isIdentifier({name: 'define'})) {
// We only want to modify the first instance of define that we find.
this.seenDefine = true;
// Get the Moodle component for the file being processed.
var moduleName = getModuleNameFromFileName(this.file.opts.filename);
// The function signature of `define()` is:
// define = function (name, deps, callback) {...}
// Ensure that if the moduel supplied its own name that it is replaced.
if (path.node.arguments.length > 0) {
// Ensure that there is only one name.
if (path.node.arguments[0].type === 'StringLiteral') {
// eslint-disable-next-line
console.log(`Replacing module name '${path.node.arguments[0].extra.rawValue}' with ${moduleName}`);
path.node.arguments.shift();
}
}
// Add the module name as the first argument to the define function.
path.node.arguments.unshift(types.stringLiteral(moduleName));
// Add a space after the define function in the built file so that previous versions
+140
View File
@@ -0,0 +1,140 @@
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/* jshint node: true, browser: false */
/* eslint-env node */
/**
* Component Library build tasks.
*
* @copyright 2021 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
module.exports = grunt => {
/**
* Get a child path of the component library.
*
* @param {string} path
* @returns {string}
*/
const getCLPath = path => `admin/tool/componentlibrary/${path}`;
/**
* Get a spawn handler.
*
* This is a generic function to write the spawn output, and then to exit if required and mark the async task as
* complete.
*
* @param {Promise} done
* @returns {function}
*/
const getSpawnHandler = done => (error, result, code) => {
grunt.log.write(result);
if (error) {
process.exit(code);
}
done();
};
/**
* Spawn a function against Node with the provided args.
*
* @param {array} args
* @returns {object}
*/
const spawnNodeCall = args => grunt.util.spawn({
cmd: 'node',
args,
}, getSpawnHandler(grunt.task.current.async()));
/**
* Build the docs using Hugo.
*
* @returns {Object} Reference to the spawned task
*/
const docsBuild = () => spawnNodeCall([
'node_modules/hugo-bin/cli.js',
'--config', getCLPath('config.yml'),
'--cleanDestinationDir',
]);
/**
* Build the docs index using the hugo-lunr-indexer.
*
* @returns {Object} Reference to the spawned task
*/
const indexBuild = () => spawnNodeCall([
'node_modules/hugo-lunr-indexer/bin/hli.js',
'-i', getCLPath('content/**'),
'-o', getCLPath('hugo/site/data/my-index.json'),
'-l', 'yaml',
'-d', '---',
]);
/**
* Build the hugo CSS.
*
* @returns {Object} Reference to the spawned task
*/
const cssBuild = () => spawnNodeCall([
'node_modules/node-sass/bin/node-sass',
'--output-style', 'expanded',
'--source-map', true,
'--source-map-contents', true,
'--precision', 6,
getCLPath('hugo/scss/docs.scss'),
'-o', getCLPath('hugo/dist/css/'),
]);
// Register the various component library tasks.
grunt.registerTask('componentlibrary:docsBuild', 'Build the component library', docsBuild);
grunt.registerTask('componentlibrary:cssBuild', 'Build the component library', cssBuild);
grunt.registerTask('componentlibrary:indexBuild', 'Build the component library', indexBuild);
grunt.registerTask('componentlibrary', 'Build the component library', [
'componentlibrary:docsBuild',
'componentlibrary:cssBuild',
'componentlibrary:indexBuild',
]);
grunt.config.merge({
watch: {
componentLibraryDocs: {
files: [
getCLPath('content/**/*.md'),
getCLPath('hugo'),
],
tasks: ['componentlibrary:docsBuild', 'componentlibrary:indexBuild'],
},
componentLibraryCSS: {
files: [
getCLPath('hugo/scss/**/*.scss'),
'hugo',
],
tasks: ['componentlibrary:cssBuild'],
},
},
});
// Add the 'componentlibrary' task as a startup task.
grunt.moodleEnv.startupTasks.push('componentlibrary');
return {
docsBuild,
cssBuild,
indexBuild,
};
};
+3
View File
@@ -85,5 +85,8 @@ module.exports = grunt => {
},
});
// Add the 'gherkinlint' task as a startup task.
grunt.moodleEnv.startupTasks.push('gherkinlint');
return handler;
};
+1
View File
@@ -50,6 +50,7 @@ module.exports = grunt => {
'theme/boost/style/moodle.css',
'theme/classic/style/moodle.css',
'jsdoc/styles/*.css',
'admin/tool/componentlibrary/hugo/dist/css/docs.css',
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n') + '\n');
};
+122 -44
View File
@@ -30,6 +30,7 @@
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
const babelRename = function(destPath, srcPath) {
destPath = srcPath.replace('src', 'build');
destPath = destPath.replace('.js', '.min.js');
@@ -53,65 +54,139 @@ module.exports = grunt => {
// Register JS tasks.
grunt.registerTask('yui', ['eslint:yui', 'shifter']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'babel']);
grunt.registerTask('amd', ['ignorefiles', 'eslint:amd', 'rollup']);
grunt.registerTask('js', ['amd', 'yui']);
// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-rollup');
// Load the Babel tasks and config.
grunt.loadNpmTasks('grunt-babel');
const babelTransform = require('@babel/core').transform;
const babel = (options = {}) => {
return {
name: 'babel',
transform: (code, id) => {
grunt.log.debug(`Transforming ${id}`);
options.filename = id;
const transformed = babelTransform(code, options);
return {
code: transformed.code,
map: transformed.map
};
}
};
};
// Note: We have to use a rate limit plugin here because rollup runs all tasks asynchronously and in parallel.
// When we kick off a full run, if we kick off a rollup of every file this will fork-bomb the machine.
// To work around this we use a concurrent Promise queue based on the number of available processors.
const rateLimit = () => {
const queue = [];
let queueRunner;
const startQueue = () => {
if (queueRunner) {
return;
}
queueRunner = setTimeout(() => {
const limit = Math.max(1, require('os').cpus().length / 2);
grunt.log.debug(`Starting rollup with queue size of ${limit}`);
runQueue(limit);
}, 100);
};
// The queue runner will run the next `size` items in the queue.
const runQueue = (size = 1) => {
queue.splice(0, size).forEach(resolve => {
resolve();
});
};
return {
name: 'ratelimit',
// The options hook is run in parallel.
// We can return an unresolved Promise which is queued for later resolution.
options: async() => {
return new Promise(resolve => {
queue.push(resolve);
startQueue();
});
},
// When an item in the queue completes, start the next item in the queue.
buildEnd: () => {
runQueue();
},
};
};
const terser = require('rollup-plugin-terser').terser;
grunt.config.merge({
babel: {
rollup: {
options: {
sourceMaps: true,
comments: false,
format: 'esm',
dir: 'output',
sourcemap: true,
treeshake: false,
context: 'window',
plugins: [
'transform-es2015-modules-amd-lazy',
'system-import-transformer',
// This plugin modifies the Babel transpiling for "export default"
// so that if it's used then only the exported value is returned
// by the generated AMD module.
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('.grunt/babel-plugin-add-module-to-define.js'),
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', {'loose': false}],
'@babel/plugin-proposal-json-strings'
rateLimit(),
babel({
sourceMaps: true,
comments: false,
compact: false,
plugins: [
'transform-es2015-modules-amd-lazy',
'system-import-transformer',
// This plugin modifies the Babel transpiling for "export default"
// so that if it's used then only the exported value is returned
// by the generated AMD module.
//
// It also adds the Moodle plugin name to the AMD module definition
// so that it can be imported as expected in other modules.
path.resolve('.grunt/babel-plugin-add-module-to-define.js'),
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', {'loose': false}],
'@babel/plugin-proposal-json-strings'
],
presets: [
['@babel/preset-env', {
targets: {
browsers: [
">0.3%",
"last 2 versions",
"not ie >= 0",
"not op_mini all",
"not Opera > 0",
"not dead"
]
},
modules: false,
useBuiltIns: false
}]
]
}),
terser({
// Do not mangle variables.
// Makes debugging easier.
mangle: false,
}),
],
presets: [
['minify', {
// This minification plugin needs to be disabled because it breaks the
// source map generation and causes invalid source maps to be output.
simplify: false,
builtIns: false
}],
['@babel/preset-env', {
targets: {
browsers: [
">0.25%",
"last 2 versions",
"not ie <= 10",
"not op_mini all",
"not Opera > 0",
"not dead"
]
},
modules: false,
useBuiltIns: false
}]
]
},
dist: {
files: [{
expand: true,
src: grunt.moodleEnv.files ? grunt.moodleEnv.files : grunt.moodleEnv.amdSrc,
rename: babelRename
}]
}
}],
},
},
});
@@ -126,13 +201,16 @@ module.exports = grunt => {
},
});
// Add the 'js' task as a startup task.
grunt.moodleEnv.startupTasks.push('js');
// On watch, we dynamically modify config to build only affected files. This
// method is slightly complicated to deal with multiple changed files at once (copied
// from the grunt-contrib-watch readme).
let changedFiles = Object.create(null);
const onChange = grunt.util._.debounce(function() {
const files = Object.keys(changedFiles);
grunt.config('babel.dist.files', [{expand: true, src: files, rename: babelRename}]);
grunt.config('rollup.dist.files', [{expand: true, src: files, rename: babelRename}]);
changedFiles = Object.create(null);
}, 200);
+2 -4
View File
@@ -34,10 +34,8 @@ module.exports = grunt => {
} else if (grunt.moodleEnv.inAMD) {
grunt.task.run('amd');
} else {
// Run them all!.
grunt.task.run('css');
grunt.task.run('js');
grunt.task.run('gherkinlint');
// Run all of the requested startup tasks.
grunt.moodleEnv.startupTasks.forEach(taskName => grunt.task.run(taskName));
}
};
+3
View File
@@ -29,4 +29,7 @@ module.exports = grunt => {
// Load the SASS tasks.
require('./sass')(grunt);
// Add the 'css' task as a startup task.
grunt.moodleEnv.startupTasks.push('css');
};
+1 -1
View File
@@ -1 +1 @@
v14.18.0
lts/gallium
+2 -2
View File
@@ -17,7 +17,7 @@ services:
- docker
addons:
postgresql: "9.6"
postgresql: "10"
branches:
except:
@@ -221,7 +221,7 @@ before_script:
# We need the official upstream for comparison
git remote add upstream https://github.com/moodle/moodle.git;
git fetch upstream MOODLE_311_STABLE;
git fetch upstream MOODLE_400_STABLE;
export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`";
export GIT_COMMIT="$TRAVIS_COMMIT";
export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD`
+3
View File
@@ -246,6 +246,8 @@ module.exports = function(grunt) {
require(path.resolve(`./.grunt/tasks/${name}.js`))(grunt);
};
// Startup tasks.
grunt.moodleEnv.startupTasks = [];
// Add Moodle task configuration.
addTask('gherkinlint', grunt);
@@ -253,6 +255,7 @@ module.exports = function(grunt) {
addTask('javascript', grunt);
addTask('style', grunt);
addTask('componentlibrary', grunt);
addTask('watch', grunt);
addTask('startup', grunt);
+14 -8
View File
@@ -54,18 +54,19 @@ if (!confirm_sesskey()) {
redirect($returnurl);
}
$needsupdate = false;
switch ($action) {
case 'disable':
// Remove from enabled list.
$key = array_search($antivirus, $activeantiviruses);
unset($activeantiviruses[$key]);
$class = \core_plugin_manager::resolve_plugininfo_class('antivirus');
$class::enable_plugin($antivirus, false);
break;
case 'enable':
// Add to enabled list.
if (!in_array($antivirus, $activeantiviruses)) {
$activeantiviruses[] = $antivirus;
$activeantiviruses = array_unique($activeantiviruses);
$class = \core_plugin_manager::resolve_plugininfo_class('antivirus');
$class::enable_plugin($antivirus, true);
}
break;
@@ -78,6 +79,7 @@ switch ($action) {
$fsave = $activeantiviruses[$key];
$activeantiviruses[$key] = $activeantiviruses[$key + 1];
$activeantiviruses[$key + 1] = $fsave;
$needsupdate = true;
}
}
break;
@@ -91,6 +93,7 @@ switch ($action) {
$fsave = $activeantiviruses[$key];
$activeantiviruses[$key] = $activeantiviruses[$key - 1];
$activeantiviruses[$key - 1] = $fsave;
$needsupdate = true;
}
}
break;
@@ -98,10 +101,13 @@ switch ($action) {
default:
break;
}
$new = implode(',', $activeantiviruses);
add_to_config_log('antiviruses', $CFG->antiviruses, $new, 'core');
set_config('antiviruses', $new);
core_plugin_manager::reset_caches();
if ($needsupdate) {
$new = implode(',', $activeantiviruses);
add_to_config_log('antiviruses', $CFG->antiviruses, $new, 'core');
set_config('antiviruses', $new);
core_plugin_manager::reset_caches();
}
redirect ($returnurl);
+6 -27
View File
@@ -40,34 +40,15 @@ if (!confirm_sesskey()) {
switch ($action) {
case 'disable':
// remove from enabled list
$key = array_search($auth, $authsenabled);
if ($key !== false) {
unset($authsenabled[$key]);
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
}
if ($auth == $CFG->registerauth) {
set_config('registerauth', '');
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
// Remove from enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('auth');
$class::enable_plugin($auth, false);
break;
case 'enable':
// add to enabled list
if (!in_array($auth, $authsenabled)) {
$authsenabled[] = $auth;
$authsenabled = array_unique($authsenabled);
$value = implode(',', $authsenabled);
add_to_config_log('auth', $CFG->auth, $value, 'core');
set_config('auth', $value);
}
\core\session\manager::gc(); // Remove stale sessions.
core_plugin_manager::reset_caches();
// Add to enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('auth');
$class::enable_plugin($auth, true);
break;
case 'down':
@@ -109,5 +90,3 @@ switch ($action) {
}
redirect($returnurl);
+16 -15
View File
@@ -30,26 +30,28 @@
$strprotect = get_string('blockprotect', 'admin');
$strunprotect = get_string('blockunprotect', 'admin');
/// If data submitted, then process and store.
// If data submitted, then process and store.
if (!empty($hide) && confirm_sesskey()) {
if (!$block = $DB->get_record('block', array('id'=>$hide))) {
print_error('blockdoesnotexist', 'error');
if (!$block = $DB->get_record('block', ['id' => $hide])) {
throw new \moodle_exception('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '0', array('id'=>$block->id)); // Hide block
add_to_config_log('block_visibility', $block->visible, '0', $block->name);
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
$class = \core_plugin_manager::resolve_plugininfo_class('block');
$class::enable_plugin($block->name, false);
// Settings not required - only pages.
admin_get_root(true, false);
}
if (!empty($show) && confirm_sesskey() ) {
if (!$block = $DB->get_record('block', array('id'=>$show))) {
print_error('blockdoesnotexist', 'error');
if (!$block = $DB->get_record('block', ['id' => $show])) {
throw new \moodle_exception('blockdoesnotexist', 'error');
}
$DB->set_field('block', 'visible', '1', array('id'=>$block->id)); // Show block
add_to_config_log('block_visibility', $block->visible, '1', $block->name);
core_plugin_manager::reset_caches();
admin_get_root(true, false); // settings not required - only pages
$class = \core_plugin_manager::resolve_plugininfo_class('block');
$class::enable_plugin($block->name, true);
// Settings not required - only pages.
admin_get_root(true, false);
}
if (!empty($protect) && confirm_sesskey()) {
@@ -67,6 +69,7 @@
echo $OUTPUT->header();
echo $OUTPUT->heading($strmanageblocks);
echo $OUTPUT->notification(get_string('noteunneededblocks', 'admin'), 'info');
/// Main display starts here
/// Get and sort the existing blocks
@@ -234,5 +237,3 @@
}
echo $OUTPUT->footer();
+10 -12
View File
@@ -48,6 +48,12 @@ if (!($settingspage->check_access())) {
print_error('accessdenied', 'admin');
}
$hassiteconfig = has_capability('moodle/site:config', $PAGE->context);
if ($hassiteconfig) {
$PAGE->add_header_action($OUTPUT->render_from_template('core_admin/header_search_input', [
'action' => new moodle_url('/admin/search.php'),
]));
}
$statusmsg = '';
$errormsg = '';
@@ -75,7 +81,7 @@ if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
$buttons = null;
if ($PAGE->user_allowed_editing()) {
if ($PAGE->user_allowed_editing() && !$PAGE->theme->haseditswitch) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
$caption = get_string('blockseditoff');
@@ -140,13 +146,7 @@ if ($errormsg !== '') {
echo $OUTPUT->notification($statusmsg, 'notifysuccess');
}
$path = array_reverse($settingspage->visiblepath);
if (is_array($path)) {
$visiblename = join(' / ', $path);
} else {
$visiblename = $path;
}
echo $OUTPUT->heading(get_string('admincategory', 'admin', $visiblename), 2);
echo $OUTPUT->heading(get_string('admincategory', 'admin', $settingspage->visiblename), 2);
echo html_writer::start_tag('form', array('action' => '', 'method' => 'post', 'id' => 'adminsettings'));
echo html_writer::start_tag('div');
@@ -158,9 +158,7 @@ echo $outputhtml;
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
$PAGE->requires->yui_module('moodle-core-formchangechecker', 'M.core_formchangechecker.init', [[
'formid' => 'adminsettings'
]]);
$PAGE->requires->string_for_js('changesmadereallygoaway', 'moodle');
// Add the form change checker.
$PAGE->requires->js_call_amd('core_form/changechecker', 'watchFormById', ['adminsettings']);
echo $OUTPUT->footer();
@@ -48,6 +48,17 @@ class testoutgoingmailconf_form extends \moodleform {
$mform->setType('recipient', PARAM_EMAIL);
$mform->addRule('recipient', get_string('required'), 'required');
// From user.
$options = ['maxlength' => '100', 'size' => '25'];
$mform->addElement('text', 'from', get_string('testoutgoingmailconf_fromemail', 'admin'), $options);
$mform->setType('from', PARAM_TEXT);
$mform->addHelpButton('from', 'testoutgoingmailconf_fromemail', 'admin');
// Additional subject text.
$options = ['size' => '25'];
$mform->addElement('text', 'additionalsubject', get_string('testoutgoingmailconf_subjectadditional', 'admin'), $options);
$mform->setType('additionalsubject', PARAM_TEXT);
$buttonarray = array();
$buttonarray[] = $mform->createElement('submit', 'send', get_string('testoutgoingmailconf_sendtest', 'admin'));
$buttonarray[] = $mform->createElement('cancel');
@@ -56,4 +67,26 @@ class testoutgoingmailconf_form extends \moodleform {
$mform->closeHeaderBefore('buttonar');
}
/**
* Validate Form field, should be a valid email format or a username that matches with a Moodle user.
*
* @param array $data
* @param array $files
* @return array
* @throws \dml_exception|\coding_exception
*/
public function validation($data, $files): array {
$errors = parent::validation($data, $files);
if (isset($data['from']) && $data['from']) {
$userfrom = \core_user::get_user_by_username($data['from']);
if (!$userfrom && !validate_email($data['from'])) {
$errors['from'] = get_string('testoutgoingmailconf_fromemail_invalid', 'admin');
}
}
return $errors;
}
}
+304
View File
@@ -0,0 +1,304 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_admin\local\entities;
use core_reportbuilder\local\filters\date;
use core_reportbuilder\local\filters\duration;
use core_reportbuilder\local\filters\select;
use core_reportbuilder\local\filters\text;
use core_reportbuilder\local\helpers\format;
use lang_string;
use core_reportbuilder\local\entities\base;
use core_reportbuilder\local\report\column;
use core_reportbuilder\local\report\filter;
use stdClass;
/**
* Task log entity class implementation
*
* @package core_admin
* @copyright 2021 David Matamoros <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_log extends base {
/** @var int Result success */
protected const SUCCESS = 0;
/** @var int Result failed */
protected const FAILED = 1;
/**
* Database tables that this entity uses and their default aliases
*
* @return array
*/
protected function get_default_table_aliases(): array {
return ['task_log' => 'tl'];
}
/**
* The default title for this entity in the list of columns/conditions/filters in the report builder
*
* @return lang_string
*/
protected function get_default_entity_title(): lang_string {
return new lang_string('entitytasklog', 'admin');
}
/**
* The default machine-readable name for this entity that will be used in the internal names of the columns/filters
*
* @return string
*/
protected function get_default_entity_name(): string {
return 'task_log';
}
/**
* Initialise the entity
*
* @return base
*/
public function initialise(): base {
$columns = $this->get_all_columns();
foreach ($columns as $column) {
$this->add_column($column);
}
$filters = $this->get_all_filters();
foreach ($filters as $filter) {
$this->add_filter($filter);
}
return $this;
}
/**
* Returns list of all available columns
*
* @return column[]
*/
protected function get_all_columns(): array {
$tablealias = $this->get_table_alias('task_log');
// Name column.
$columns[] = (new column(
'name',
new lang_string('name'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("$tablealias.classname")
->set_is_sortable(true)
->add_callback(static function(string $value): string {
$output = '';
if (class_exists($value)) {
$task = new $value;
if ($task instanceof \core\task\scheduled_task) {
$output = $task->get_name();
}
}
$output .= \html_writer::tag('div', "\\{$value}", [
'class' => 'task-class',
]);
return $output;
});
// Type column.
$columns[] = (new column(
'type',
new lang_string('tasktype', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_field("{$tablealias}.type")
->set_is_sortable(true)
->add_callback(static function(int $value): string {
if (\core\task\database_logger::TYPE_SCHEDULED === $value) {
return get_string('task_type:scheduled', 'admin');
}
return get_string('task_type:adhoc', 'admin');
});
// Start time column.
$columns[] = (new column(
'starttime',
new lang_string('task_starttime', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TIMESTAMP)
->add_field("{$tablealias}.timestart")
->set_is_sortable(true)
->add_callback([format::class, 'userdate'], get_string('strftimedatetimeshortaccurate', 'core_langconfig'));
// Duration column.
$columns[] = (new column(
'duration',
new lang_string('task_duration', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_FLOAT)
->add_field("{$tablealias}.timeend - {$tablealias}.timestart", 'duration')
->set_is_sortable(true)
->add_callback(static function(float $value): string {
$duration = round($value, 2);
if (empty($duration)) {
// The format_time function returns 'now' when the difference is exactly 0.
// Note: format_time performs concatenation in exactly this fashion so we should do this for consistency.
return '0 ' . get_string('secs', 'moodle');
}
return format_time($duration);
});
// Hostname column.
$columns[] = (new column(
'hostname',
new lang_string('hostname', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_TEXT)
->add_field("$tablealias.hostname")
->set_is_sortable(true);
// PID column.
$columns[] = (new column(
'pid',
new lang_string('pid', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_field("{$tablealias}.pid")
->set_is_sortable(true);
// Database column.
$columns[] = (new column(
'database',
new lang_string('task_dbstats', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_fields("{$tablealias}.dbreads, {$tablealias}.dbwrites")
->set_is_sortable(true)
->add_callback(static function(int $value, stdClass $row): string {
$output = '';
$output .= \html_writer::div(get_string('task_stats:dbreads', 'admin', $row->dbreads));
$output .= \html_writer::div(get_string('task_stats:dbwrites', 'admin', $row->dbwrites));
return $output;
});
// Result column.
$columns[] = (new column(
'result',
new lang_string('task_result', 'admin'),
$this->get_entity_name()
))
->add_joins($this->get_joins())
->set_type(column::TYPE_INTEGER)
->add_field("$tablealias.result")
->set_is_sortable(true)
->add_callback(static function(int $value): string {
if ($value) {
return get_string('task_result:failed', 'admin');
}
return get_string('success');
});
return $columns;
}
/**
* Return list of all available filters
*
* @return filter[]
*/
protected function get_all_filters(): array {
$filters = [];
$tablealias = $this->get_table_alias('task_log');
// Name filter (Filter by classname).
$filters[] = (new filter(
text::class,
'name',
new lang_string('classname', 'tool_task'),
$this->get_entity_name(),
"{$tablealias}.classname"
))
->add_joins($this->get_joins());
// Output filter (Filter by task output).
$filters[] = (new filter(
text::class,
'output',
new lang_string('task_logoutput', 'admin'),
$this->get_entity_name(),
"{$tablealias}.output"
))
->add_joins($this->get_joins());
// Result filter.
$filters[] = (new filter(
select::class,
'result',
new lang_string('task_result', 'admin'),
$this->get_entity_name(),
"{$tablealias}.result"
))
->add_joins($this->get_joins())
->set_options([
self::SUCCESS => get_string('success'),
self::FAILED => get_string('task_result:failed', 'admin'),
]);
// Start time filter.
$filters[] = (new filter(
date::class,
'timestart',
new lang_string('task_starttime', 'admin'),
$this->get_entity_name(),
"{$tablealias}.timestart"
))
->add_joins($this->get_joins())
->set_limited_operators([
date::DATE_ANY,
date::DATE_RANGE,
date::DATE_PREVIOUS,
date::DATE_CURRENT,
]);
// Duration filter.
$filters[] = (new filter(
duration::class,
'duration',
new lang_string('task_duration', 'admin'),
$this->get_entity_name(),
"${tablealias}.timeend - {$tablealias}.timestart"
))
->add_joins($this->get_joins());
return $filters;
}
}
+1 -1
View File
@@ -98,7 +98,7 @@ class filesize extends \admin_setting {
if (empty($bytes)) {
return get_string('none');
}
return display_size($bytes);
return display_size($bytes, 0);
}
/**
@@ -0,0 +1,37 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* A settings page which can be viewed with a link directly.
*
* @package core_admin
* @copyright 2021 Andrew Lyons <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
use moodle_url;
interface linkable_settings_page {
/**
* Get the URL to view this settings page.
*
* @return moodle_url
*/
public function get_settings_page_url(): moodle_url;
}
@@ -0,0 +1,121 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Admin setting to show current scheduled task's status.
*
* @package core
* @copyright 2021 Universitat Rovira i Virgili
* @author Jordi Pujol-Ahulló <jpahullo@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\local\settings;
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/moodlelib.php');
use admin_setting_description;
use core\task\manager;
use core\task\scheduled_task;
use html_writer;
use lang_string;
use moodle_url;
use stdClass;
/**
* This admin setting tells whether a given scheduled task is enabled, providing a link to its configuration page.
*
* The goal of this setting is to help contextualizing the configuration settings with related scheduled task status,
* providing the big picture of that part of the system.
*
* @package core
* @copyright 2021 Universitat Rovira i Virgili
* @author Jordi Pujol-Ahulló <jpahullo@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class setting_scheduled_task_status extends admin_setting_description {
/**
* @var string fully qualified class name of a scheduled task.
*/
private $classname;
/**
* @var string additional text to append to the description.
*/
private $extradescription;
/**
* setting_scheduled_task_status constructor.
* @param string $name unique setting name.
* @param string $scheduledtaskclassname full classpath class name of the scheduled task.
* @param string $extradescription extra detail to append to the scheduled task status to add context in the setting
* page.
*/
public function __construct(string $name, string $scheduledtaskclassname, string $extradescription = '') {
$visiblename = new lang_string('task_status', 'admin');
$this->classname = $scheduledtaskclassname;
$this->extradescription = $extradescription;
parent::__construct($name, $visiblename, '');
}
/**
* Calculates lazily the content of the description.
* @param mixed $data nothing expected in this case.
* @param string $query nothing expected in this case.
* @return string the HTML content to print for this setting.
*/
public function output_html($data, $query = ''): string {
if (empty($this->description)) {
$this->description = $this->get_task_description();
}
return parent::output_html($data, $query);
}
/**
* Returns the HTML to print as the description.
* @return string description to be printed.
*/
private function get_task_description(): string {
$task = manager::get_scheduled_task($this->classname);
if ($task->is_enabled()) {
$taskenabled = get_string('enabled', 'admin');
} else {
$taskenabled = get_string('disabled', 'admin');
}
$taskenabled = strtolower($taskenabled);
$gotourl = new moodle_url(
'/admin/tool/task/scheduledtasks.php',
[],
scheduled_task::get_html_id($this->classname)
);
if (!empty($this->extradescription)) {
$this->extradescription = '<br />' . $this->extradescription;
}
$taskdetail = new stdClass();
$taskdetail->class = $this->classname;
$taskdetail->name = $task->get_name();
$taskdetail->status = $taskenabled;
$taskdetail->gotourl = $gotourl->out(false);
$taskdetail->extradescription = $this->extradescription;
return html_writer::tag('p', get_string('task_status_desc', 'admin', $taskdetail));
}
}
@@ -0,0 +1,158 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_admin\local\systemreports;
use context_system;
use core_admin\local\entities\task_log;
use core_reportbuilder\local\entities\user;
use core_reportbuilder\local\report\action;
use lang_string;
use moodle_url;
use pix_icon;
use core_reportbuilder\system_report;
/**
* Task logs system report class implementation
*
* @package core_admin
* @copyright 2021 David Matamoros <davidmc@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_logs extends system_report {
/**
* Initialise report, we need to set the main table, load our entities and set columns/filters
*/
protected function initialise(): void {
// Our main entity, it contains all of the column definitions that we need.
$entitymain = new task_log();
$entitymainalias = $entitymain->get_table_alias('task_log');
$this->set_main_table('task_log', $entitymainalias);
$this->add_entity($entitymain);
// Any columns required by actions should be defined here to ensure they're always available.
$this->add_base_fields("{$entitymainalias}.id");
// We can join the "user" entity to our "main" entity and use the fullname column from the user entity.
$entityuser = new user();
$entituseralias = $entityuser->get_table_alias('user');
$this->add_entity($entityuser->add_join(
"LEFT JOIN {user} {$entituseralias} ON {$entituseralias}.id = {$entitymainalias}.userid"
));
// Now we can call our helper methods to add the content we want to include in the report.
$this->add_columns();
$this->add_filters();
$this->add_actions();
// Set if report can be downloaded.
$this->set_downloadable(true, get_string('tasklogs', 'admin'));
}
/**
* Validates access to view this report
*
* @return bool
*/
protected function can_view(): bool {
return has_capability('moodle/site:config', context_system::instance());
}
/**
* Get the visible name of the report
*
* @return string
*/
public static function get_name(): string {
return get_string('entitytasklog', 'admin');
}
/**
* Adds the columns we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
public function add_columns(): void {
$columns = [
'task_log:name',
'task_log:type',
'user:fullname',
'task_log:starttime',
'task_log:duration',
'task_log:hostname',
'task_log:pid',
'task_log:database',
'task_log:result',
];
$this->add_columns_from_entities($columns);
// It's possible to override the display name of a column, if you don't want to use the value provided by the entity.
if ($column = $this->get_column('user:fullname')) {
$column->set_title(new lang_string('user', 'admin'));
}
// It's possible to set a default initial sort direction for one column.
$this->set_initial_sort_column('task_log:starttime', SORT_DESC);
}
/**
* Adds the filters we want to display in the report
*
* They are all provided by the entities we previously added in the {@see initialise} method, referencing each by their
* unique identifier
*/
protected function add_filters(): void {
$filters = [
'task_log:name',
'task_log:output',
'task_log:result',
'task_log:timestart',
'task_log:duration',
];
$this->add_filters_from_entities($filters);
}
/**
* Add the system report actions. An extra column will be appended to each row, containing all actions added here
*
* Note the use of ":id" placeholder which will be substituted according to actual values in the row
*/
protected function add_actions(): void {
// Action to view individual task log on a popup window.
$this->add_action((new action(
new moodle_url('/admin/tasklogs.php', ['logid' => ':id']),
new pix_icon('e/search', ''),
[],
true,
new lang_string('view'),
)));
// Action to download individual task log.
$this->add_action((new action(
new moodle_url('/admin/tasklogs.php', ['logid' => ':id', 'download' => true]),
new pix_icon('t/download', ''),
[],
false,
new lang_string('download'),
)));
}
}
-293
View File
@@ -1,293 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Task log table.
*
* @package core_admin
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/tablelib.php');
/**
* Table to display list of task logs.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class task_log_table extends \table_sql {
/**
* Constructor for the task_log table.
*
* @param string $filter
* @param int $resultfilter
*/
public function __construct(string $filter = '', int $resultfilter = null) {
global $DB;
if (-1 === $resultfilter) {
$resultfilter = null;
}
parent::__construct('tasklogs');
$columnheaders = [
'classname' => get_string('name'),
'type' => get_string('tasktype', 'admin'),
'userid' => get_string('user', 'admin'),
'timestart' => get_string('task_starttime', 'admin'),
'duration' => get_string('task_duration', 'admin'),
'hostname' => get_string('hostname', 'tool_task'),
'pid' => get_string('pid', 'tool_task'),
'db' => get_string('task_dbstats', 'admin'),
'result' => get_string('task_result', 'admin'),
'actions' => '',
];
$this->define_columns(array_keys($columnheaders));
$this->define_headers(array_values($columnheaders));
// The name column is a header.
$this->define_header_column('classname');
// This table is not collapsible.
$this->collapsible(false);
// The actions class should not wrap. Use the BS text utility class.
$this->column_class('actions', 'text-nowrap');
// Allow pagination.
$this->pageable(true);
// Allow sorting. Default to sort by timestarted DESC.
$this->sortable(true, 'timestart', SORT_DESC);
// Add filtering.
$where = [];
$params = [];
if (!empty($filter)) {
$orwhere = [];
$filter = str_replace('\\', '\\\\', $filter);
// Check the class name.
$orwhere[] = $DB->sql_like('classname', ':classfilter', false, false);
$params['classfilter'] = '%' . $DB->sql_like_escape($filter) . '%';
$orwhere[] = $DB->sql_like('output', ':outputfilter', false, false);
$params['outputfilter'] = '%' . $DB->sql_like_escape($filter) . '%';
$where[] = "(" . implode(' OR ', $orwhere) . ")";
}
if (null !== $resultfilter) {
$where[] = 'tl.result = :result';
$params['result'] = $resultfilter;
}
$where = implode(' AND ', $where);
$this->set_sql('', '', $where, $params);
}
/**
* Query the db. Store results in the table object for use by build_table.
*
* @param int $pagesize size of page for paginated displayed table.
* @param bool $useinitialsbar do you want to use the initials bar. Bar
* will only be used if there is a fullname column defined for the table.
*/
public function query_db($pagesize, $useinitialsbar = true) {
global $DB;
// Fetch the attempts.
$sort = $this->get_sql_sort();
if ($sort) {
$sort = "ORDER BY $sort";
}
// TODO Does not support custom user profile fields (MDL-70456).
$userfieldsapi = \core_user\fields::for_identity(\context_system::instance(), false)->with_userpic();
$userfields = $userfieldsapi->get_sql('u', false, 'user', 'userid2', false)->selects;
$where = '';
if (!empty($this->sql->where)) {
$where = "WHERE {$this->sql->where}";
}
$sql = "SELECT
tl.id, tl.type, tl.component, tl.classname, tl.userid, tl.timestart, tl.timeend,
tl.hostname, tl.pid,
tl.dbreads, tl.dbwrites, tl.result,
tl.dbreads + tl.dbwrites AS db,
tl.timeend - tl.timestart AS duration,
{$userfields}
FROM {task_log} tl
LEFT JOIN {user} u ON u.id = tl.userid
{$where}
{$sort}";
$this->pagesize($pagesize, $DB->count_records_sql("SELECT COUNT('x') FROM {task_log} tl {$where}", $this->sql->params));
if (!$this->is_downloading()) {
$this->rawdata = $DB->get_records_sql($sql, $this->sql->params, $this->get_page_start(), $this->get_page_size());
} else {
$this->rawdata = $DB->get_records_sql($sql, $this->sql->params);
}
}
/**
* Format the name cell.
*
* @param \stdClass $row
* @return string
*/
public function col_classname($row) : string {
$output = '';
if (class_exists($row->classname)) {
$task = new $row->classname;
if ($task instanceof \core\task\scheduled_task) {
$output = $task->get_name();
}
}
$output .= \html_writer::tag('div', "\\{$row->classname}", [
'class' => 'task-class',
]);
return $output;
}
/**
* Format the type cell.
*
* @param \stdClass $row
* @return string
*/
public function col_type($row) : string {
if (\core\task\database_logger::TYPE_SCHEDULED == $row->type) {
return get_string('task_type:scheduled', 'admin');
} else {
return get_string('task_type:adhoc', 'admin');
}
}
/**
* Format the timestart cell.
*
* @param \stdClass $row
* @return string
*/
public function col_result($row) : string {
if ($row->result) {
return get_string('task_result:failed', 'admin');
} else {
return get_string('success');
}
}
/**
* Format the timestart cell.
*
* @param \stdClass $row
* @return string
*/
public function col_timestart($row) : string {
return userdate($row->timestart, get_string('strftimedatetimeshort', 'langconfig'));
}
/**
* Format the duration cell.
*
* @param \stdClass $row
* @return string
*/
public function col_duration($row) : string {
$duration = round($row->timeend - $row->timestart, 2);
if (empty($duration)) {
// The format_time function returns 'now' when the difference is exactly 0.
// Note: format_time performs concatenation in exactly this fashion so we should do this for consistency.
return '0 ' . get_string('secs', 'moodle');
}
return format_time($duration);
}
/**
* Format the DB details cell.
*
* @param \stdClass $row
* @return string
*/
public function col_db($row) : string {
$output = '';
$output .= \html_writer::div(get_string('task_stats:dbreads', 'admin', $row->dbreads));
$output .= \html_writer::div(get_string('task_stats:dbwrites', 'admin', $row->dbwrites));
return $output;
}
/**
* Format the actions cell.
*
* @param \stdClass $row
* @return string
*/
public function col_actions($row) : string {
global $OUTPUT;
$actions = [];
$url = new \moodle_url('/admin/tasklogs.php', ['logid' => $row->id]);
// Quick view.
$actions[] = $OUTPUT->action_icon(
$url,
new \pix_icon('e/search', get_string('view')),
new \popup_action('click', $url)
);
// Download.
$actions[] = $OUTPUT->action_icon(
new \moodle_url($url, ['download' => true]),
new \pix_icon('t/download', get_string('download'))
);
return implode('&nbsp;', $actions);
}
/**
* Format the user cell.
*
* @param \stdClass $row
* @return string
*/
public function col_userid($row) : string {
if (empty($row->userid)) {
return '';
}
$user = (object) [];
username_load_fields_from_object($user, $row, 'user');
return fullname($user);
}
}
+24
View File
@@ -74,6 +74,8 @@ Options:
--adminpass=PASSWORD Password for the moodle admin account,
required in non-interactive mode.
--adminemail=STRING Email address for the moodle admin account.
--sitepreset=STRING Admin site preset to be applied during the installation process.
--supportemail=STRING Email address for support and help.
--upgradekey=STRING The upgrade key to be set in the config.php, leave empty to not set it.
--non-interactive No interactive questions, installation fails if any
problem encountered.
@@ -254,6 +256,8 @@ list($options, $unrecognized) = cli_get_params(
'adminuser' => 'admin',
'adminpass' => '',
'adminemail' => '',
'sitepreset' => '',
'supportemail' => '',
'upgradekey' => '',
'non-interactive' => false,
'agree-license' => false,
@@ -276,6 +280,12 @@ if (array_key_exists($lang, $languages)) {
$CFG->lang = $lang;
}
// Set up site admin preset.
$sitepreset = clean_param($options['sitepreset'], PARAM_RAW);
if (!empty($sitepreset)) {
$CFG->setsitepresetduringinstall = $sitepreset;
}
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
@@ -731,6 +741,20 @@ if (!$skipdatabase) {
$a = (object)['option' => 'adminemail', 'value' => $options['adminemail']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
// Ask for the support email address.
if ($interactive) {
cli_separator();
cli_heading(get_string('clisupportemail', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['supportemail']);
$options['supportemail'] = cli_input($prompt, $options['supportemail']);
}
// Validate that the support email address provided is valid.
if (!empty($options['supportemail']) && !validate_email($options['supportemail'])) {
$a = (object)['option' => 'supportemail', 'value' => $options['supportemail']];
cli_error(get_string('cliincorrectvalueerror', 'admin', $a));
}
}
// Ask for the upgrade key.
-180
View File
@@ -1,180 +0,0 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* MySQL engine conversion tool.
*
* @package core
* @subpackage cli
* @copyright 2009 Petr Skoda (http://skodak.org)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php'); // cli only functions
if ($DB->get_dbfamily() !== 'mysql') {
cli_error('This function is designed for MySQL databases only!');
}
// now get cli options
list($options, $unrecognized) = cli_get_params(array('help'=>false, 'list'=>false, 'engine'=>false, 'available'=>false),
array('h'=>'help', 'l'=>'list', 'a'=>'available'));
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
cli_error(get_string('cliunknowoption', 'admin', $unrecognized));
}
$help =
"MySQL engine conversions script.
It is recommended to stop the web server before the conversion.
Do not use MyISAM if possible, because it is not ACID compliant
and does not support transactions.
Options:
--engine=ENGINE Convert MySQL tables to different engine
-l, --list Show table information
-a, --available Show list of available engines
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/cli/mysql_engine.php --engine=InnoDB
";
if (!empty($options['engine'])) {
$engines = mysql_get_engines();
$engine = clean_param($options['engine'], PARAM_ALPHA);
if (!isset($engines[strtoupper($engine)])) {
cli_error("Error: engine '$engine' is not available on this server!");
}
echo "Converting tables to '$engine' for $CFG->wwwroot:\n";
$prefix = $DB->get_prefix();
$prefix = str_replace('_', '\\_', $prefix);
$sql = "SHOW TABLE STATUS WHERE Name LIKE BINARY '$prefix%'";
$rs = $DB->get_recordset_sql($sql);
$converted = 0;
$skipped = 0;
$errors = 0;
foreach ($rs as $table) {
if (strtoupper($table->engine) === strtoupper($engine)) {
$newengine = mysql_get_table_engine($table->name);
echo str_pad($table->name, 40). " - NO CONVERSION NEEDED ($newengine)\n";
$skipped++;
continue;
}
echo str_pad($table->name, 40). " - ";
try {
$DB->change_database_structure("ALTER TABLE {$table->name} ENGINE = $engine");
$newengine = mysql_get_table_engine($table->name);
if (strtoupper($newengine) !== strtoupper($engine)) {
echo "ERROR ($newengine)\n";
$errors++;
continue;
}
echo "DONE ($newengine)\n";
$converted++;
} catch (moodle_exception $e) {
echo $e->getMessage()."\n";
$errors++;
continue;
}
}
$rs->close();
echo "Converted: $converted, skipped: $skipped, errors: $errors\n";
exit(0); // success
} else if (!empty($options['list'])) {
echo "List of tables for $CFG->wwwroot:\n";
$prefix = $DB->get_prefix();
$prefix = str_replace('_', '\\_', $prefix);
$sql = "SHOW TABLE STATUS WHERE Name LIKE BINARY '$prefix%'";
$rs = $DB->get_recordset_sql($sql);
$counts = array();
foreach ($rs as $table) {
if (isset($counts[$table->engine])) {
$counts[$table->engine]++;
} else {
$counts[$table->engine] = 1;
}
echo str_pad($table->engine, 10);
echo $table->name . "\n";
}
$rs->close();
echo "\n";
echo "Table engines summary for $CFG->wwwroot:\n";
foreach ($counts as $engine => $count) {
echo "$engine: $count\n";
}
exit(0); // success
} else if (!empty($options['available'])) {
echo "List of available MySQL engines for $CFG->wwwroot:\n";
$engines = mysql_get_engines();
foreach ($engines as $engine) {
echo " $engine\n";
}
die;
} else {
echo $help;
die;
}
// ========== Some functions ==============
function mysql_get_engines() {
global $DB;
$sql = "SHOW Engines";
$rs = $DB->get_recordset_sql($sql);
$engines = array();
foreach ($rs as $engine) {
if (strtoupper($engine->support) !== 'YES' and strtoupper($engine->support) !== 'DEFAULT') {
continue;
}
$engines[strtoupper($engine->engine)] = $engine->engine;
if (strtoupper($engine->support) === 'DEFAULT') {
$engines[strtoupper($engine->engine)] .= ' (default)';
}
}
$rs->close();
return $engines;
}
function mysql_get_table_engine($tablename) {
global $DB;
$engine = null;
$sql = "SHOW TABLE STATUS WHERE Name = '$tablename'"; // no special chars expected here
$rs = $DB->get_recordset_sql($sql);
if ($rs->valid()) {
$record = $rs->current();
$engine = $record->engine;
}
$rs->close();
return $engine;
}
+6 -3
View File
@@ -48,12 +48,14 @@ if (!isset($plugins[$name])) {
switch ($action) {
case 'disable':
if ($plugins[$name]->is_enabled()) {
set_config('disabled', 1, 'contentbank_'. $name);
$class = \core_plugin_manager::resolve_plugininfo_class('contenttype');
$class::enable_plugin($name, false);
}
break;
case 'enable':
if (!$plugins[$name]->is_enabled()) {
unset_config('disabled', 'contentbank_'. $name);
$class = \core_plugin_manager::resolve_plugininfo_class('contenttype');
$class::enable_plugin($name, true);
}
break;
case 'up':
@@ -63,6 +65,7 @@ switch ($action) {
$seq[$currentindex] = $seq[$currentindex - 1];
$seq[$currentindex - 1] = $name;
set_config('contentbank_plugins_sortorder', implode(',', $seq));
core_plugin_manager::reset_caches();
}
break;
case 'down':
@@ -72,10 +75,10 @@ switch ($action) {
$seq[$currentindex] = $seq[$currentindex + 1];
$seq[$currentindex + 1] = $name;
set_config('contentbank_plugins_sortorder', implode(',', $seq));
core_plugin_manager::reset_caches();
}
break;
}
core_plugin_manager::reset_caches();
$cache = cache::make('core', 'contentbank_enabled_extensions');
$cache->purge();
$cache = cache::make('core', 'contentbank_context_extensions');
+4 -7
View File
@@ -47,17 +47,14 @@ if (!isset($formatplugins[$formatname])) {
switch ($action) {
case 'disable':
if ($formatplugins[$formatname]->is_enabled()) {
if (get_config('moodlecourse', 'format') === $formatname) {
print_error('cannotdisableformat', 'error', $return);
}
set_config('disabled', 1, 'format_'. $formatname);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('format');
$class::enable_plugin($formatname, false);
}
break;
case 'enable':
if (!$formatplugins[$formatname]->is_enabled()) {
unset_config('disabled', 'format_'. $formatname);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('format');
$class::enable_plugin($formatname, true);
}
break;
case 'up':
+4 -4
View File
@@ -47,14 +47,14 @@ if (!isset($customfieldplugins[$customfieldname])) {
switch ($action) {
case 'disable':
if ($customfieldplugins[$customfieldname]->is_enabled()) {
set_config('disabled', 1, 'customfield_'. $customfieldname);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('customfield');
$class::enable_plugin($customfieldname, false);
}
break;
case 'enable':
if (!$customfieldplugins[$customfieldname]->is_enabled()) {
unset_config('disabled', 'customfield_'. $customfieldname);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('customfield');
$class::enable_plugin($customfieldname, true);
}
break;
}
+4 -5
View File
@@ -48,14 +48,14 @@ if (!isset($plugins[$name])) {
switch ($action) {
case 'disable':
if ($plugins[$name]->is_enabled()) {
set_config('disabled', 1, 'dataformat_'. $name);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('dataformat');
$class::enable_plugin($name, false);
}
break;
case 'enable':
if (!$plugins[$name]->is_enabled()) {
unset_config('disabled', 'dataformat_'. $name);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('dataformat');
$class::enable_plugin($name, true);
}
break;
case 'up':
@@ -78,4 +78,3 @@ switch ($action) {
break;
}
redirect($return);
+10 -17
View File
@@ -39,22 +39,19 @@ if (!confirm_sesskey()) {
redirect($returnurl);
}
$return = true;
switch ($action) {
case 'disable':
// remove from enabled list
$key = array_search($editor, $active_editors);
unset($active_editors[$key]);
add_to_config_log('editor_visibility', '1', '0', $editor);
// Remove from enabled list.
$class = \core_plugin_manager::resolve_plugininfo_class('editor');
$class::enable_plugin($editor, false);
break;
case 'enable':
// add to enabled list
// Add to enabled list.
if (!in_array($editor, $active_editors)) {
$active_editors[] = $editor;
$active_editors = array_unique($active_editors);
add_to_config_log('editor_visibility', '0', '1', $editor);
$class = \core_plugin_manager::resolve_plugininfo_class('editor');
$class::enable_plugin($editor, true);
}
break;
@@ -68,6 +65,8 @@ switch ($action) {
$active_editors[$key] = $active_editors[$key + 1];
$active_editors[$key + 1] = $fsave;
add_to_config_log('editor_position', $key, $key + 1, $editor);
set_config('texteditors', implode(',', $active_editors));
core_plugin_manager::reset_caches();
}
}
break;
@@ -82,6 +81,8 @@ switch ($action) {
$active_editors[$key] = $active_editors[$key - 1];
$active_editors[$key - 1] = $fsave;
add_to_config_log('editor_position', $key, $key - 1, $editor);
set_config('texteditors', implode(',', $active_editors));
core_plugin_manager::reset_caches();
}
}
break;
@@ -90,14 +91,6 @@ switch ($action) {
break;
}
// at least one editor must be active
if (empty($active_editors)) {
$active_editors = array('textarea');
}
set_config('texteditors', implode(',', $active_editors));
core_plugin_manager::reset_caches();
if ($return) {
redirect ($returnurl);
}
+5 -12
View File
@@ -43,25 +43,18 @@ $all = enrol_get_plugins(false);
$return = new moodle_url('/admin/settings.php', array('section'=>'manageenrols'));
$syscontext = context_system::instance();
switch ($action) {
case 'disable':
unset($enabled[$enrol]);
set_config('enrol_plugins_enabled', implode(',', array_keys($enabled)));
core_plugin_manager::reset_caches();
$syscontext->mark_dirty(); // resets all enrol caches
$class = \core_plugin_manager::resolve_plugininfo_class('enrol');
$class::enable_plugin($enrol, false);
break;
case 'enable':
if (!isset($all[$enrol])) {
break;
}
$enabled = array_keys($enabled);
$enabled[] = $enrol;
set_config('enrol_plugins_enabled', implode(',', $enabled));
core_plugin_manager::reset_caches();
$syscontext->mark_dirty(); // resets all enrol caches
$class = \core_plugin_manager::resolve_plugininfo_class('enrol');
$class::enable_plugin($enrol, true);
break;
case 'up':
@@ -129,4 +122,4 @@ switch ($action) {
}
redirect($return);
redirect($return);
+2
View File
@@ -3729,6 +3729,8 @@
<ON_CHECK message="iscustomadminwarnings" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_xmlrpc_usage" level="optional">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+43 -33
View File
@@ -31,14 +31,15 @@ $filterpath = optional_param('filterpath', '', PARAM_PLUGIN);
admin_externalpage_setup('managefilters');
// Clean up bogus filter states first.
/** @var core\plugininfo\filter[] $plugininfos */
$plugininfos = core_plugin_manager::instance()->get_plugins_of_type('filter');
$filters = array();
$filters = [];
$states = filter_get_global_states();
foreach ($states as $state) {
if (!isset($plugininfos[$state->filter]) and !get_config('filter_'.$state->filter, 'version')) {
// Purge messy leftovers after incorrectly uninstalled plugins and unfinished installs.
$DB->delete_records('filter_active', array('filter' => $state->filter));
$DB->delete_records('filter_config', array('filter' => $state->filter));
// Purge messy leftovers after incorrectly uninstalled plugins and unfinished installations.
$DB->delete_records('filter_active', ['filter' => $state->filter]);
$DB->delete_records('filter_config', ['filter' => $state->filter]);
error_log('Deleted bogus "filter_'.$state->filter.'" states and config data.');
} else {
$filters[$state->filter] = $state;
@@ -50,7 +51,6 @@ foreach ($plugininfos as $filter => $info) {
if (isset($filters[$filter])) {
continue;
}
/** @var \core\plugininfo\base $info */
if ($info->is_installed_and_upgraded()) {
filter_set_global_state($filter, TEXTFILTER_DISABLED);
$states = filter_get_global_states();
@@ -72,10 +72,9 @@ switch ($action) {
case 'setstate':
if (isset($filters[$filterpath]) and $newstate = optional_param('newstate', '', PARAM_INT)) {
filter_set_global_state($filterpath, $newstate);
if ($newstate == TEXTFILTER_DISABLED) {
filter_set_applies_to_strings($filterpath, false);
}
/** @var \core\plugininfo\filter $class */
$class = core_plugin_manager::resolve_plugininfo_class('filter');
$class::enable_plugin($filterpath, $newstate);
}
break;
@@ -83,12 +82,16 @@ switch ($action) {
if (isset($filters[$filterpath])) {
$applytostrings = optional_param('stringstoo', false, PARAM_BOOL);
filter_set_applies_to_strings($filterpath, $applytostrings);
reset_text_filters_cache();
core_plugin_manager::reset_caches();
}
break;
case 'down':
if (isset($filters[$filterpath])) {
filter_set_global_state($filterpath, $filters[$filterpath]->active, 1);
reset_text_filters_cache();
core_plugin_manager::reset_caches();
}
break;
@@ -96,14 +99,14 @@ switch ($action) {
if (isset($filters[$filterpath])) {
$oldpos = $filters[$filterpath]->sortorder;
filter_set_global_state($filterpath, $filters[$filterpath]->active, -1);
reset_text_filters_cache();
core_plugin_manager::reset_caches();
}
break;
}
// Reset caches and return.
// Return.
if ($action) {
reset_text_filters_cache();
core_plugin_manager::reset_caches();
redirect(new moodle_url('/admin/filters.php'));
}
@@ -115,12 +118,12 @@ $states = filter_get_global_states();
$stringfilters = filter_get_string_filters();
$table = new html_table();
$table->head = array(get_string('filter'), get_string('isactive', 'filters'),
get_string('order'), get_string('applyto', 'filters'), get_string('settings'), get_string('uninstallplugin', 'core_admin'));
$table->head = [get_string('filter'), get_string('isactive', 'filters'),
get_string('order'), get_string('applyto', 'filters'), get_string('settings'), get_string('uninstallplugin', 'core_admin')];
$table->colclasses = array ('leftalign', 'leftalign', 'centeralign', 'leftalign', 'leftalign', 'leftalign');
$table->attributes['class'] = 'admintable generaltable';
$table->id = 'filterssetting';
$table->data = array();
$table->data = [];
$lastactive = null;
foreach ($states as $state) {
@@ -157,15 +160,16 @@ die;
/**
* Return action URL.
*
* @param string $filterpath
* @param string $action
* @return moodle_url
* @param string $filterpath which filter to get the URL for.
* @param string $action which action to get the URL for.
* @return moodle_url|null the requested URL.
*/
function filters_action_url($filterpath, $action) {
function filters_action_url(string $filterpath, string $action): ?moodle_url {
if ($action === 'delete') {
return core_plugin_manager::instance()->get_uninstall_url('filter_'.$filterpath, 'manage');
}
return new moodle_url('/admin/filters.php', array('sesskey'=>sesskey(), 'filterpath'=>$filterpath, 'action'=>$action));
return new moodle_url('/admin/filters.php',
['sesskey' => sesskey(), 'filterpath' => $filterpath, 'action' => $action]);
}
/**
@@ -178,24 +182,25 @@ function filters_action_url($filterpath, $action) {
* @param bool $applytostrings
* @return array data
*/
function get_table_row(\core\plugininfo\filter $plugininfo, $state, $isfirstrow, $islastactive, $applytostrings) {
function get_table_row(\core\plugininfo\filter $plugininfo, stdClass $state,
bool $isfirstrow, bool $islastactive, bool $applytostrings): array {
global $OUTPUT;
$row = array();
$row = [];
$filter = $state->filter;
$active = $plugininfo->is_installed_and_upgraded();
static $activechoices;
static $applytochoices;
if (!isset($activechoices)) {
$activechoices = array(
$activechoices = [
TEXTFILTER_DISABLED => get_string('disabled', 'core_filters'),
TEXTFILTER_OFF => get_string('offbutavailable', 'core_filters'),
TEXTFILTER_ON => get_string('on', 'core_filters'),
);
$applytochoices = array(
];
$applytochoices = [
0 => get_string('content', 'core_filters'),
1 => get_string('contentandheadings', 'core_filters'),
);
];
}
// Filter name.
@@ -209,7 +214,7 @@ function get_table_row(\core\plugininfo\filter $plugininfo, $state, $isfirstrow,
// Disable/off/on.
$select = new single_select(filters_action_url($filter, 'setstate'), 'newstate', $activechoices, $state->active, null, 'active' . $filter);
$select->set_label(get_string('isactive', 'filters'), array('class' => 'accesshide'));
$select->set_label(get_string('isactive', 'filters'), ['class' => 'accesshide']);
$row[] = $OUTPUT->render($select);
// Re-order.
@@ -217,12 +222,14 @@ function get_table_row(\core\plugininfo\filter $plugininfo, $state, $isfirstrow,
$spacer = $OUTPUT->spacer();
if ($state->active != TEXTFILTER_DISABLED) {
if (!$isfirstrow) {
$updown .= $OUTPUT->action_icon(filters_action_url($filter, 'up'), new pix_icon('t/up', get_string('up'), '', array('class' => 'iconsmall')));
$updown .= $OUTPUT->action_icon(filters_action_url($filter, 'up'),
new pix_icon('t/up', get_string('up'), '', ['class' => 'iconsmall']));
} else {
$updown .= $spacer;
}
if (!$islastactive) {
$updown .= $OUTPUT->action_icon(filters_action_url($filter, 'down'), new pix_icon('t/down', get_string('down'), '', array('class' => 'iconsmall')));
$updown .= $OUTPUT->action_icon(filters_action_url($filter, 'down'),
new pix_icon('t/down', get_string('down'), '', ['class' => 'iconsmall']));
} else {
$updown .= $spacer;
}
@@ -230,20 +237,23 @@ function get_table_row(\core\plugininfo\filter $plugininfo, $state, $isfirstrow,
$row[] = $updown;
// Apply to strings.
$select = new single_select(filters_action_url($filter, 'setapplyto'), 'stringstoo', $applytochoices, $applytostrings, null, 'applyto' . $filter);
$select->set_label(get_string('applyto', 'filters'), array('class' => 'accesshide'));
$select = new single_select(filters_action_url($filter, 'setapplyto'),
'stringstoo', $applytochoices, $applytostrings, null, 'applyto' . $filter);
$select->set_label(get_string('applyto', 'filters'), ['class' => 'accesshide']);
$select->disabled = ($state->active == TEXTFILTER_DISABLED);
$row[] = $OUTPUT->render($select);
// Settings link, if required.
if ($active and filter_has_global_settings($filter)) {
$row[] = html_writer::link(new moodle_url('/admin/settings.php', array('section'=>'filtersetting'.$filter)), get_string('settings'));
$row[] = html_writer::link(new moodle_url('/admin/settings.php',
['section' => 'filtersetting'.$filter]), get_string('settings'));
} else {
$row[] = '';
}
// Uninstall.
$row[] = html_writer::link(filters_action_url($filter, 'delete'), get_string('uninstallplugin', 'core_admin'));
$row[] = html_writer::link(filters_action_url($filter, 'delete'),
get_string('uninstallplugin', 'core_admin'));
return $row;
}
+24 -1
View File
@@ -53,6 +53,12 @@ if (!extension_loaded('xml')) {
die();
}
// Make sure mbstring extension is available.
if (!extension_loaded('mbstring')) {
echo 'Moodle requires the mbstring PHP extension. Please install or enable the mbstring extension.';
die();
}
define('NO_OUTPUT_BUFFERING', true);
if (isset($_POST['upgradekey'])) {
@@ -719,6 +725,12 @@ if (during_initial_install()) {
set_config('rolesactive', 1); // after this, during_initial_install will return false.
set_config('adminsetuppending', 1);
set_config('registrationpending', 1); // Remind to register site after all other setup is finished.
// Apply default preset, if it is defined in $CFG and has a valid value.
if (!empty($CFG->setsitepresetduringinstall)) {
\core_adminpresets\helper::change_default_preset($CFG->setsitepresetduringinstall);
}
// we need this redirect to setup proper session
upgrade_finished("index.php?sessionstarted=1&amp;lang=$CFG->lang");
}
@@ -819,6 +831,7 @@ $insecuredataroot = is_dataroot_insecure(true);
$SESSION->admin_critical_warning = ($insecuredataroot==INSECURE_DATAROOT_ERROR);
$adminroot = admin_get_root();
$PAGE->set_primary_active_tab('siteadminnode');
// Check if there are any new admin settings which have still yet to be set
if (any_new_admin_settings($adminroot)) {
@@ -907,6 +920,15 @@ $showcampaigncontent = !isset($CFG->showcampaigncontent) || $CFG->showcampaignco
// Encourage admins to enable the user feedback feature if it is not enabled already.
$showfeedbackencouragement = empty($CFG->enableuserfeedback);
// Check if the service and support content setting is enabled or not.
$servicesandsupportcontent = !isset($CFG->showservicesandsupportcontent) || $CFG->showservicesandsupportcontent;
// Check whether the XML-RPC protocol is enabled or not.
require_once($CFG->libdir . '/environmentlib.php');
$result = new environment_results('custom_checks');
$result = check_xmlrpc_usage($result);
$xmlrpcwarning = !is_null($result) ? get_string($result->getFeedbackStr(), 'admin') : '';
admin_externalpage_setup('adminnotifications');
$output = $PAGE->get_renderer('core', 'admin');
@@ -915,4 +937,5 @@ echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisp
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings, $eventshandlers, $themedesignermode, $devlibdir,
$mobileconfigured, $overridetossl, $invalidforgottenpasswordurl, $croninfrequent,
$showcampaigncontent, $showfeedbackencouragement);
$showcampaigncontent, $showfeedbackencouragement, $servicesandsupportcontent,
$xmlrpcwarning);
+4 -2
View File
@@ -49,11 +49,13 @@ if (!array_key_exists($media, $plugins)) {
switch ($action) {
case 'disable':
$plugins[$media]->set_enabled(false);
$class = \core_plugin_manager::resolve_plugininfo_class('media');
$class::enable_plugin($media, false);
break;
case 'enable':
$plugins[$media]->set_enabled(true);
$class = \core_plugin_manager::resolve_plugininfo_class('media');
$class::enable_plugin($media, true);
break;
case 'up':
+38 -59
View File
@@ -48,69 +48,52 @@ if (($form = data_submitted()) && confirm_sesskey()) {
foreach ($providers as $provider) {
$componentproviderbase = $provider->component.'_'.$provider->name;
$disableprovidersetting = $componentproviderbase.'_disable';
$providerdisabled = false;
if (!isset($form->$disableprovidersetting)) {
$providerdisabled = true;
$newpreferences[$disableprovidersetting] = 1;
} else {
$newpreferences[$disableprovidersetting] = 0;
}
foreach (array('permitted', 'loggedin', 'loggedoff') as $setting) {
$value = null;
$componentprovidersetting = $componentproviderbase.'_'.$setting;
if ($setting == 'permitted') {
// If we deal with permitted select element, we need to create individual
// setting for each possible processor. Note that this block will
// always be processed first after entring parental foreach iteration
// so we can change form values on this stage.
foreach ($processors as $processor) {
$value = '';
if (isset($form->{$componentprovidersetting}[$processor->name])) {
$value = $form->{$componentprovidersetting}[$processor->name];
}
// Ensure that loggedin loggedoff options are set correctly for this permission.
if (($value == 'disallowed') || $providerdisabled) {
// It might be better to unset them, but I can't figure out why that cause error.
$form->{$componentproviderbase.'_loggedin'}[$processor->name] = 0;
$form->{$componentproviderbase.'_loggedoff'}[$processor->name] = 0;
} else if ($value == 'forced') {
$form->{$componentproviderbase.'_loggedin'}[$processor->name] = 1;
$form->{$componentproviderbase.'_loggedoff'}[$processor->name] = 1;
}
// Record the site preference.
$newpreferences[$processor->name.'_provider_'.$componentprovidersetting] = $value;
}
} else {
$newsettings = array();
if (property_exists($form, $componentprovidersetting)) {
// We must be processing loggedin or loggedoff checkboxes.
// Store defained comma-separated processors as setting value.
// Using array_filter eliminates elements set to 0 above.
$newsettings = array_keys(array_filter($form->{$componentprovidersetting}));
}
// Let's join existing setting values for disabled processors.
$property = 'message_provider_'.$componentprovidersetting;
if (property_exists($preferences, $property)) {
$existingsetting = $preferences->$property;
foreach ($disabledprocessors as $disable) {
if (strpos($existingsetting, $disable->name) > -1) {
$newsettings[] = $disable->name;
}
}
}
$value = join(',', $newsettings);
if (empty($value)) {
$value = null;
$componentprovidersetting = $componentproviderbase.'_locked';
foreach ($processors as $processor) {
$value = 0;
if (isset($form->{$componentprovidersetting}[$processor->name])) {
$value = $form->{$componentprovidersetting}[$processor->name];
if ($value == 'on') {
$value = 1;
}
}
if ($setting != 'permitted') {
// We have already recoded site preferences for 'permitted' type.
$newpreferences['message_provider_'.$componentprovidersetting] = $value;
// Record the site preference.
$newpreferences[$processor->name.'_provider_'.$componentprovidersetting] = $value;
}
$componentprovidersetting = $componentproviderbase.'_enabled';
$newsettings = [];
if (isset($form->$componentprovidersetting)) {
// Store defined comma-separated processors as setting value.
// Using array_filter eliminates elements set to 0 above.
$newsettings = array_keys(array_filter($form->{$componentprovidersetting}));
}
// Let's join existing setting values for disabled processors.
$property = 'message_provider_'.$componentprovidersetting;
if (property_exists($preferences, $property)) {
$existingsetting = $preferences->$property;
foreach ($disabledprocessors as $disable) {
if (strpos($existingsetting, $disable->name) > -1) {
$newsettings[] = $disable->name;
}
}
}
$value = join(',', $newsettings);
if (empty($value)) {
$value = null;
}
// Record the site preference.
$newpreferences['message_provider_'.$componentprovidersetting] = $value;
}
// Update database.
@@ -119,10 +102,8 @@ if (($form = data_submitted()) && confirm_sesskey()) {
// Save processors enabled/disabled status.
foreach ($allprocessors as $processor) {
$enabled = isset($form->{$processor->name});
if ($enabled != $processor->enabled) {
add_to_config_log($processor->name, $processor->enabled, $enabled, 'core');
}
\core_message\api::update_processor_status($processor, $enabled);
$class = \core_plugin_manager::resolve_plugininfo_class('message');
$class::enable_plugin($processor->name, $enabled);
}
foreach ($newpreferences as $name => $value) {
@@ -144,8 +125,6 @@ if (($form = data_submitted()) && confirm_sesskey()) {
// Page settings
$PAGE->set_context(context_system::instance());
$PAGE->requires->js_init_call('M.core_message.init_defaultoutputs');
$renderer = $PAGE->get_renderer('core', 'message');
// Display the page.
+1
View File
@@ -117,6 +117,7 @@ if ($form = data_submitted() and confirm_sesskey()) {
}
echo $OUTPUT->header();
echo $OUTPUT->render(mnet_get_deprecation_notice());
// Explain
echo $OUTPUT->box(get_string('ssoacldescr','mnet'));
+1
View File
@@ -81,6 +81,7 @@
$hosts = $DB->get_records_select('mnet_host', "id <> ? AND deleted = 0", array($CFG->mnet_localhost_id), 'wwwroot ASC');
echo $OUTPUT->header();
echo $OUTPUT->render(mnet_get_deprecation_notice());
?>
<form method="post" action="index.php">
<table align="center" width="635" class="generaltable" border="0" cellpadding="5" cellspacing="0">
+5
View File
@@ -51,6 +51,8 @@ if ($hostid && $DB->get_field('mnet_host', 'deleted', array('id' => $hostid)) !=
$PAGE->set_url('/admin/mnet/peers.php');
admin_externalpage_setup($adminsection);
$deprecatenotify = mnet_get_deprecation_notice();
if (!extension_loaded('openssl')) {
print_error('requiresopenssl', 'mnet');
}
@@ -90,6 +92,7 @@ if ($formdata = $simpleform->get_data()) {
$formdata->oldpublickey = $mnet_peer->public_key; // set this so we can confirm on form post without having to recreate the mnet_peer object
$reviewform->set_data($mnet_peer);
echo $OUTPUT->header();
echo $OUTPUT->render($deprecatenotify);
echo $OUTPUT->box_start();
$reviewform->display();
echo $OUTPUT->box_end();
@@ -177,6 +180,7 @@ if ($formdata = $reviewform->get_data()) {
}
} else if ($reviewform->is_submitted()) { // submitted, but errors
echo $OUTPUT->header();
echo $OUTPUT->render($deprecatenotify);
echo $OUTPUT->box_start();
$reviewform->display();
echo $OUTPUT->box_end();
@@ -187,6 +191,7 @@ if ($formdata = $reviewform->get_data()) {
// normal flow - just display all hosts with links
echo $OUTPUT->header();
echo $OUTPUT->render($deprecatenotify);
$hosts = mnet_get_hosts(true);
// print the table to display the register all hosts setting
+1
View File
@@ -44,4 +44,5 @@ if (isset($mnet_peer->id) && $mnet_peer->id > 0) {
} else {
$tabs[] = new tabobject('mnetdetails', '#', $strmnetedithost, $strmnetedithost, false);
}
echo $OUTPUT->render(mnet_get_deprecation_notice());
print_tabs(array($tabs), $currenttab);
+1
View File
@@ -1,5 +1,6 @@
<?php
echo $OUTPUT->header();
echo $OUTPUT->render(mnet_get_deprecation_notice());
?>
<div id="trustedhosts"><!-- See theme/standard/styles_layout.css #trustedhosts .generaltable for rules -->
<table cellspacing="0" cellpadding="5" class="generaltable generalbox" >
+7 -34
View File
@@ -30,42 +30,17 @@
/// If data submitted, then process and store.
if (!empty($hide) and confirm_sesskey()) {
if (!$module = $DB->get_record("modules", array("name"=>$hide))) {
print_error('moduledoesnotexist', 'error');
}
$DB->set_field("modules", "visible", "0", array("id"=>$module->id)); // Hide main module
// Remember the visibility status in visibleold
// and hide...
$sql = "UPDATE {course_modules}
SET visibleold=visible, visible=0
WHERE module=?";
$DB->execute($sql, array($module->id));
// Increment course.cacherev for courses where we just made something invisible.
// This will force cache rebuilding on the next request.
increment_revision_number('course', 'cacherev',
"id IN (SELECT DISTINCT course
FROM {course_modules}
WHERE visibleold=1 AND module=?)",
array($module->id));
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('mod');
$class::enable_plugin($hide, false);
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
if (!empty($show) and confirm_sesskey()) {
if (!$module = $DB->get_record("modules", array("name"=>$show))) {
print_error('moduledoesnotexist', 'error');
}
$DB->set_field("modules", "visible", "1", array("id"=>$module->id)); // Show main module
$DB->set_field('course_modules', 'visible', '1', array('visibleold'=>1, 'module'=>$module->id)); // Get the previous saved visible state for the course module.
// Increment course.cacherev for courses where we just made something visible.
// This will force cache rebuilding on the next request.
increment_revision_number('course', 'cacherev',
"id IN (SELECT DISTINCT course
FROM {course_modules}
WHERE visible=1 AND module=?)",
array($module->id));
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('mod');
$class::enable_plugin($show, true);
admin_get_root(true, false); // settings not required - only pages
redirect(new moodle_url('/admin/modules.php'));
}
@@ -100,7 +75,7 @@
$missing = true;
} else {
// took out hspace="\10\", because it does not validate. don't know what to replace with.
$icon = "<img src=\"" . $OUTPUT->image_url('icon', $module->name) . "\" class=\"icon\" alt=\"\" />";
$icon = "<img src=\"" . $OUTPUT->image_url('monologo', $module->name) . "\" class=\"icon\" alt=\"\" />";
$strmodulename = $icon.' '.get_string('modulename', $module->name);
$missing = false;
}
@@ -163,5 +138,3 @@
$table->print_html();
echo $OUTPUT->footer();
+2
View File
@@ -52,6 +52,8 @@ $pageurl = new moodle_url('/admin/plugins.php', $pageparams);
$pluginman = core_plugin_manager::instance();
$PAGE->set_primary_active_tab('siteadminnode');
if ($uninstall) {
if (!$confirmed) {
+3 -9
View File
@@ -102,20 +102,15 @@ if (($action == 'edit') || ($action == 'new')) {
require_sesskey();
$instance = portfolio_instance($portfolio);
$current = $instance->get('visible');
if (empty($current) && $instance->instance_sanity_check()) {
print_error('cannotsetvisible', 'portfolio', $baseurl);
}
$plugin = $instance->get('plugin');
if ($action == 'show') {
$visible = 1;
} else {
$visible = 0;
}
$instance->set('visible', $visible);
$instance->save();
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('portfolio');
$class::enable_plugin($plugin, $visible);
$return = true;
} else if ($action == 'delete') {
$instance = portfolio_instance($portfolio);
@@ -246,4 +241,3 @@ if ($return) {
}
echo $OUTPUT->footer();
+390
View File
@@ -0,0 +1,390 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets;
/**
* Admin presets helper class.
*
* @package core_adminpresets
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class helper {
/**
* Create an empty preset.
*
* @param array $data Preset data. Supported values:
* - name. To define the preset name.
* - comments. To change the comments field.
* - author. To update the author field.
* - iscore. Whether the preset is a core preset or not. Valid values on \core_adminpresets\manager class.
* @return int The identifier of the preset created.
*/
public static function create_preset(array $data): int {
global $CFG, $USER, $DB;
$name = array_key_exists('name', $data) ? $data['name'] : '';
$comments = array_key_exists('comments', $data) ? $data['comments'] : '';
$author = array_key_exists('author', $data) ? $data['author'] : fullname($USER);
$iscore = array_key_exists('iscore', $data) ? $data['iscore'] : manager::NONCORE_PRESET;
// Validate iscore value.
$allowed = [manager::NONCORE_PRESET, manager::STARTER_PRESET, manager::FULL_PRESET];
if (!in_array($iscore, $allowed)) {
$iscore = manager::NONCORE_PRESET;
}
$preset = [
'userid' => $USER->id,
'name' => $name,
'comments' => $comments,
'site' => $CFG->wwwroot,
'author' => $author,
'moodleversion' => $CFG->version,
'moodlerelease' => $CFG->release,
'iscore' => $iscore,
'timecreated' => time(),
'timeimported' => 0,
];
$presetid = $DB->insert_record('adminpresets', $preset);
return $presetid;
}
/**
* Helper method to add a setting item to a preset.
*
* @param int $presetid Preset identifier where the item will belong.
* @param string $name Item name.
* @param string $value Item value.
* @param string|null $plugin Item plugin.
* @param string|null $advname If the item is an advanced setting, the name of the advanced setting should be specified here.
* @param string|null $advvalue If the item is an advanced setting, the value of the advanced setting should be specified here.
* @return int The item identificator.
*/
public static function add_item(int $presetid, string $name, string $value, ?string $plugin = 'none',
?string $advname = null, ?string $advvalue = null): int {
global $DB;
$presetitem = [
'adminpresetid' => $presetid,
'plugin' => $plugin,
'name' => $name,
'value' => $value,
];
$itemid = $DB->insert_record('adminpresets_it', $presetitem);
if (!empty($advname)) {
$presetadv = [
'itemid' => $itemid,
'name' => $advname,
'value' => $advvalue,
];
$DB->insert_record('adminpresets_it_a', $presetadv);
}
return $itemid;
}
/**
* Helper method to add a plugin to a preset.
*
* @param int $presetid Preset identifier where the item will belong.
* @param string $plugin Plugin type.
* @param string $name Plugin name.
* @param int $enabled Whether the plugin will be enabled or not.
* @return int The plugin identificator.
*/
public static function add_plugin(int $presetid, string $plugin, string $name, int $enabled): int {
global $DB;
$pluginentry = [
'adminpresetid' => $presetid,
'plugin' => $plugin,
'name' => $name,
'enabled' => $enabled,
];
$pluginid = $DB->insert_record('adminpresets_plug', $pluginentry);
return $pluginid;
}
/**
* Apply the given preset. If it's a filename, the preset will be imported and then applied.
*
* @param string $presetnameorfile The preset name to be applied or a valid preset file to be imported and applied.
* @return int|null The preset identifier that has been applied or null if the given value was not valid.
*/
public static function change_default_preset(string $presetnameorfile): ?int {
global $DB;
$presetid = null;
// Check if the given variable points to a valid preset file to be imported and applied.
if (is_readable($presetnameorfile)) {
$xmlcontent = file_get_contents($presetnameorfile);
$manager = new manager();
list($xmlnotused, $preset) = $manager->import_preset($xmlcontent);
if (!is_null($preset)) {
list($applied) = $manager->apply_preset($preset->id);
if (!empty($applied)) {
$presetid = $preset->id;
}
}
} else {
// Check if the given preset exists; if that's the case, it will be applied.
$stringmanager = get_string_manager();
if ($stringmanager->string_exists($presetnameorfile . 'preset', 'core_adminpresets')) {
$params = ['name' => get_string($presetnameorfile . 'preset', 'core_adminpresets')];
} else {
$params = ['name' => $presetnameorfile];
}
if ($preset = $DB->get_record('adminpresets', $params)) {
$manager = new manager();
list($applied) = $manager->apply_preset($preset->id);
if (!empty($applied)) {
$presetid = $preset->id;
}
}
}
return $presetid;
}
/**
* Helper method to create default site admin presets and initialize them.
*/
public static function create_default_presets(): void {
// Create the "Starter" site admin preset.
$data = [
'name' => get_string('starterpreset', 'core_adminpresets'),
'comments' => get_string('starterpresetdescription', 'core_adminpresets'),
'iscore' => manager::STARTER_PRESET,
];
$presetid = static::create_preset($data);
// Add settings to the "Starter" site admin preset.
static::add_item($presetid, 'usecomments', '0');
static::add_item($presetid, 'usetags', '0');
static::add_item($presetid, 'enablenotes', '0');
static::add_item($presetid, 'enableblogs', '0');
static::add_item($presetid, 'enablebadges', '0');
static::add_item($presetid, 'enableanalytics', '0');
static::add_item($presetid, 'enabled', '0', 'core_competency');
static::add_item($presetid, 'pushcourseratingstouserplans', '0', 'core_competency');
static::add_item($presetid, 'showdataretentionsummary', '0', 'tool_dataprivacy');
static::add_item($presetid, 'forum_maxattachments', '3');
static::add_item($presetid, 'guestloginbutton', '0');
// Set Activity chooser tabs to "Starred, All, Recommended".
static::add_item($presetid, 'activitychoosertabmode', '1');
// Modules: Hide chat, database, external tool (lti), IMS content package (imscp), lesson, SCORM, survey, wiki, workshop.
static::add_plugin($presetid, 'mod', 'chat', false);
static::add_plugin($presetid, 'mod', 'data', false);
static::add_plugin($presetid, 'mod', 'lti', false);
static::add_plugin($presetid, 'mod', 'imscp', false);
static::add_plugin($presetid, 'mod', 'lesson', false);
static::add_plugin($presetid, 'mod', 'scorm', false);
static::add_plugin($presetid, 'mod', 'survey', false);
static::add_plugin($presetid, 'mod', 'wiki', false);
static::add_plugin($presetid, 'mod', 'workshop', false);
// Availability restrictions: Hide Grouping, User profile.
static::add_plugin($presetid, 'availability', 'grouping', false);
static::add_plugin($presetid, 'availability', 'profile', false);
// Blocks: Hide Activities, Blog menu, Blog tags, Comments, Course completion status, Courses, Flickr,
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Network servers, Online users,
// Private files, Recent blog entries, Recently accessed courses, Search forums, Section links, Social activities,
// Starred courses, Tags, YouTube.
// Hidden by default: Course/site summary, RSS feeds, Self completion, Feedback.
static::add_plugin($presetid, 'block', 'activity_modules', false);
static::add_plugin($presetid, 'block', 'blog_menu', false);
static::add_plugin($presetid, 'block', 'blog_tags', false);
static::add_plugin($presetid, 'block', 'comments', false);
static::add_plugin($presetid, 'block', 'completionstatus', false);
static::add_plugin($presetid, 'block', 'course_summary', false);
static::add_plugin($presetid, 'block', 'course_list', false);
static::add_plugin($presetid, 'block', 'tag_flickr', false);
static::add_plugin($presetid, 'block', 'globalsearch', false);
static::add_plugin($presetid, 'block', 'badges', false);
static::add_plugin($presetid, 'block', 'lp', false);
static::add_plugin($presetid, 'block', 'myprofile', false);
static::add_plugin($presetid, 'block', 'login', false);
static::add_plugin($presetid, 'block', 'site_main_menu', false);
static::add_plugin($presetid, 'block', 'mentees', false);
static::add_plugin($presetid, 'block', 'mnet_hosts', false);
static::add_plugin($presetid, 'block', 'private_files', false);
static::add_plugin($presetid, 'block', 'blog_recent', false);
static::add_plugin($presetid, 'block', 'rss_client', false);
static::add_plugin($presetid, 'block', 'search_forums', false);
static::add_plugin($presetid, 'block', 'section_links', false);
static::add_plugin($presetid, 'block', 'selfcompletion', false);
static::add_plugin($presetid, 'block', 'social_activities', false);
static::add_plugin($presetid, 'block', 'tags', false);
static::add_plugin($presetid, 'block', 'tag_youtube', false);
static::add_plugin($presetid, 'block', 'feedback', false);
static::add_plugin($presetid, 'block', 'online_users', false);
static::add_plugin($presetid, 'block', 'recentlyaccessedcourses', false);
static::add_plugin($presetid, 'block', 'starredcourses', false);
// Course formats: Disable Social format.
static::add_plugin($presetid, 'format', 'social', false);
// Data formats: Disable Javascript Object Notation (.json).
static::add_plugin($presetid, 'dataformat', 'json', false);
// Enrolments: Disable Cohort sync, Guest access.
static::add_plugin($presetid, 'enrol', 'cohort', false);
static::add_plugin($presetid, 'enrol', 'guest', false);
// Filter: Disable MathJax, Activity names auto-linking.
static::add_plugin($presetid, 'filter', 'mathjaxloader', TEXTFILTER_DISABLED);
static::add_plugin($presetid, 'filter', 'activitynames', TEXTFILTER_DISABLED);
// Question behaviours: Disable Adaptive mode (no penalties), Deferred feedback with CBM, Immediate feedback with CBM.
static::add_plugin($presetid, 'qbehaviour', 'adaptivenopenalty', false);
static::add_plugin($presetid, 'qbehaviour', 'deferredcbm', false);
static::add_plugin($presetid, 'qbehaviour', 'immediatecbm', false);
// Question types: Disable Calculated, Calculated multichoice, Calculated simple, Drag and drop markers,
// Drag and drop onto image, Embedded answers (Cloze), Numerical, Random short-answer matching.
static::add_plugin($presetid, 'qtype', 'calculated', false);
static::add_plugin($presetid, 'qtype', 'calculatedmulti', false);
static::add_plugin($presetid, 'qtype', 'calculatedsimple', false);
static::add_plugin($presetid, 'qtype', 'ddmarker', false);
static::add_plugin($presetid, 'qtype', 'ddimageortext', false);
static::add_plugin($presetid, 'qtype', 'multianswer', false);
static::add_plugin($presetid, 'qtype', 'numerical', false);
static::add_plugin($presetid, 'qtype', 'randomsamatch', false);
// Repositories: Disable Server files, URL downloader, Wikimedia.
static::add_plugin($presetid, 'repository', 'local', false);
static::add_plugin($presetid, 'repository', 'url', false);
static::add_plugin($presetid, 'repository', 'wikimedia', false);
// Text editors: Disable TinyMCE HTML editor.
static::add_plugin($presetid, 'editor', 'tinymce', false);
// Create the "Full" site admin preset.
$data = [
'name' => get_string('fullpreset', 'core_adminpresets'),
'comments' => get_string('fullpresetdescription', 'core_adminpresets'),
'iscore' => manager::FULL_PRESET,
];
$presetid = static::create_preset($data);
// Add settings to the "Full" site admin preset.
static::add_item($presetid, 'usecomments', '1');
static::add_item($presetid, 'usetags', '1');
static::add_item($presetid, 'enablenotes', '1');
static::add_item($presetid, 'enableblogs', '1');
static::add_item($presetid, 'enablebadges', '1');
static::add_item($presetid, 'enableanalytics', '1');
static::add_item($presetid, 'enabled', '1', 'core_competency');
static::add_item($presetid, 'pushcourseratingstouserplans', '1', 'core_competency');
static::add_item($presetid, 'showdataretentionsummary', '1', 'tool_dataprivacy');
static::add_item($presetid, 'forum_maxattachments', '9');
static::add_item($presetid, 'guestloginbutton', '1');
// Set Activity chooser tabs to the default value ("Starred, All, Activities, Resources, Recommended").
static::add_item($presetid, 'activitychoosertabmode', '0');
// Modules: Enable chat, database, external tool (lti), IMS content package (imscp), lesson, SCORM, survey, wiki, workshop.
static::add_plugin($presetid, 'mod', 'chat', true);
static::add_plugin($presetid, 'mod', 'data', true);
static::add_plugin($presetid, 'mod', 'lti', true);
static::add_plugin($presetid, 'mod', 'imscp', true);
static::add_plugin($presetid, 'mod', 'lesson', true);
static::add_plugin($presetid, 'mod', 'scorm', true);
static::add_plugin($presetid, 'mod', 'survey', true);
static::add_plugin($presetid, 'mod', 'wiki', true);
static::add_plugin($presetid, 'mod', 'workshop', true);
// Availability restrictions: Enable Grouping, User profile.
static::add_plugin($presetid, 'availability', 'grouping', true);
static::add_plugin($presetid, 'availability', 'profile', true);
// Blocks: Enable Activities, Blog menu, Blog tags, Comments, Course completion status, Courses, Flickr,
// Global search, Latest badges, Learning plans, Logged in user, Login, Main menu, Mentees, Network servers, Online users,
// Private files, Recent blog entries, Recently accessed courses, Search forums, Section links, Social activities,
// Starred courses, Tags, YouTube.
// Hidden by default: Course/site summary, RSS feeds, Self completion, Feedback.
static::add_plugin($presetid, 'block', 'activity_modules', true);
static::add_plugin($presetid, 'block', 'blog_menu', true);
static::add_plugin($presetid, 'block', 'blog_tags', true);
static::add_plugin($presetid, 'block', 'comments', true);
static::add_plugin($presetid, 'block', 'completionstatus', true);
static::add_plugin($presetid, 'block', 'course_list', true);
static::add_plugin($presetid, 'block', 'tag_flickr', true);
static::add_plugin($presetid, 'block', 'globalsearch', true);
static::add_plugin($presetid, 'block', 'badges', true);
static::add_plugin($presetid, 'block', 'lp', true);
static::add_plugin($presetid, 'block', 'myprofile', true);
static::add_plugin($presetid, 'block', 'login', true);
static::add_plugin($presetid, 'block', 'site_main_menu', true);
static::add_plugin($presetid, 'block', 'mentees', true);
static::add_plugin($presetid, 'block', 'mnet_hosts', true);
static::add_plugin($presetid, 'block', 'private_files', true);
static::add_plugin($presetid, 'block', 'blog_recent', true);
static::add_plugin($presetid, 'block', 'search_forums', true);
static::add_plugin($presetid, 'block', 'section_links', true);
static::add_plugin($presetid, 'block', 'social_activities', true);
static::add_plugin($presetid, 'block', 'tags', true);
static::add_plugin($presetid, 'block', 'online_users', true);
static::add_plugin($presetid, 'block', 'recentlyaccessedcourses', true);
static::add_plugin($presetid, 'block', 'starredcourses', true);
// Course formats: Enable Social format.
static::add_plugin($presetid, 'format', 'social', true);
// Data formats: Enable Javascript Object Notation (.json).
static::add_plugin($presetid, 'dataformat', 'json', true);
// Enrolments: Enable Cohort sync, Guest access.
static::add_plugin($presetid, 'enrol', 'cohort', true);
static::add_plugin($presetid, 'enrol', 'guest', true);
// Filter: Enable MathJax, Activity names auto-linking.
static::add_plugin($presetid, 'filter', 'mathjaxloader', TEXTFILTER_ON);
static::add_plugin($presetid, 'filter', 'activitynames', TEXTFILTER_ON);
// Question behaviours: Enable Adaptive mode (no penalties), Deferred feedback with CBM, Immediate feedback with CBM.
static::add_plugin($presetid, 'qbehaviour', 'adaptivenopenalty', true);
static::add_plugin($presetid, 'qbehaviour', 'deferredcbm', true);
static::add_plugin($presetid, 'qbehaviour', 'immediatecbm', true);
// Question types: Enable Calculated, Calculated multichoice, Calculated simple, Drag and drop markers,
// Drag and drop onto image, Embedded answers (Cloze), Numerical, Random short-answer matching.
static::add_plugin($presetid, 'qtype', 'calculated', true);
static::add_plugin($presetid, 'qtype', 'calculatedmulti', true);
static::add_plugin($presetid, 'qtype', 'calculatedsimple', true);
static::add_plugin($presetid, 'qtype', 'ddmarker', true);
static::add_plugin($presetid, 'qtype', 'ddimageortext', true);
static::add_plugin($presetid, 'qtype', 'multianswer', true);
static::add_plugin($presetid, 'qtype', 'numerical', true);
static::add_plugin($presetid, 'qtype', 'randomsamatch', true);
// Repositories: Enable Server files, URL downloader, Wikimedia.
static::add_plugin($presetid, 'repository', 'local', true);
static::add_plugin($presetid, 'repository', 'url', true);
static::add_plugin($presetid, 'repository', 'wikimedia', true);
// Text editors: Enable TinyMCE HTML editor.
static::add_plugin($presetid, 'editor', 'tinymce', true);
}
}
@@ -0,0 +1,57 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Select setting for blog's bloglevel setting.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_bloglevel extends adminpresets_admin_setting_configselect {
/**
* Extended to change the block visibility.
*
* @param bool $name Setting name to store.
* @param mixed $value Setting value to store.
* @return int|false config_log inserted id or false whenever the value has not been saved.
*/
public function save_value($name = false, $value = null) {
global $DB;
if (!$id = parent::save_value($name, $value)) {
return false;
}
// Object values if no arguments.
if ($value === null) {
$value = $this->value;
}
// Pasted from admin_setting_bloglevel (can't use write_config).
if ($value == 0) {
$DB->set_field('block', 'visible', 0, ['name' => 'blog_menu']);
} else {
$DB->set_field('block', 'visible', 1, ['name' => 'blog_menu']);
}
return $id;
}
}
@@ -0,0 +1,45 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Checkbox setting.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configcheckbox extends adminpresets_setting {
protected function set_value($value) {
$this->value = clean_param($value, PARAM_BOOL);
$this->set_visiblevalue();
return true;
}
protected function set_visiblevalue() {
if ($this->value) {
$str = get_string('yes');
} else {
$str = get_string('no');
}
$this->visiblevalue = $str;
}
}
@@ -0,0 +1,48 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
use admin_setting;
/**
* Checkbox with an advanced checkbox that controls an additional $name.'_adv' config setting.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configcheckbox_with_advanced extends adminpresets_admin_setting_configcheckbox {
public function __construct(admin_setting $settingdata, $dbsettingvalue) {
// To look for other values.
$this->attributes = ['adv' => $settingdata->name . '_adv'];
parent::__construct($settingdata, $dbsettingvalue);
}
/**
* Uses delegation
*/
protected function set_visiblevalue() {
parent::set_visiblevalue();
if (!is_null($this->attributesvalues) && array_key_exists($this->attributes['adv'], $this->attributesvalues)) {
$value = $this->attributesvalues[$this->attributes['adv']];
$this->visiblevalue .= $this->delegation->extra_set_visiblevalue($value, 'advanced');
}
}
}
@@ -0,0 +1,47 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
use admin_setting;
/**
* Checkbox with an advanced checkbox that controls an additional $name.'_locked' config setting.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configcheckbox_with_lock extends adminpresets_admin_setting_configcheckbox {
public function __construct(admin_setting $settingdata, $dbsettingvalue) {
// To look for other values.
$this->attributes = ['locked' => $settingdata->name . '_locked'];
parent::__construct($settingdata, $dbsettingvalue);
}
/**
* Uses delegation
*/
protected function set_visiblevalue() {
parent::set_visiblevalue();
if (!is_null($this->attributesvalues) && array_key_exists($this->attributes['locked'], $this->attributesvalues)) {
$value = $this->attributesvalues[$this->attributes['locked']];
$this->visiblevalue .= $this->delegation->extra_set_visiblevalue($value, 'locked');
}
}
}
@@ -0,0 +1,41 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Used to validate a textarea used for ip addresses.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configiplist extends adminpresets_admin_setting_configtext {
protected function set_value($value) {
// Check ip format.
if ($this->settingdata->validate($value) !== true) {
$this->value = false;
$this->set_visiblevalue();
return false;
}
$this->value = $value;
$this->set_visiblevalue();
return true;
}
}
@@ -0,0 +1,32 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Class to be extended by multicheckbox settings.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configmulticheckbox extends adminpresets_admin_setting_configmultiselect {
public function set_behaviors() {
$this->behaviors['loadchoices'] = &$this->settingdata;
}
}
@@ -0,0 +1,76 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Extends the base class and lists the selected values separated by comma.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configmultiselect extends adminpresets_setting {
/**
* Ensure that the $value values are setting choices.
*
* @param mixed $value Setting value
* @return mixed Returns false if wrong param value
*/
protected function set_value($value) {
if ($value) {
$options = explode(',', $value);
foreach ($options as $option) {
foreach ($this->settingdata->choices as $key => $choice) {
if ($key == $option) {
$this->value = $option;
$this->set_visiblevalue();
return true;
}
}
}
$value = implode(',', $options);
}
$this->value = $value;
$this->set_visiblevalue();
return true;
}
protected function set_visiblevalue() {
$values = explode(',', $this->value);
$visiblevalues = [];
foreach ($values as $value) {
if (!empty($this->settingdata->choices[$value])) {
$visiblevalues[] = $this->settingdata->choices[$value];
}
}
if (empty($visiblevalues)) {
$this->visiblevalue = '';
return false;
}
$this->visiblevalue = implode(', ', $visiblevalues);
}
}
@@ -0,0 +1,32 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Generalizes a configmultipleselect with load_choices().
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configmultiselect_with_loader extends adminpresets_admin_setting_configmultiselect {
public function set_behaviors() {
$this->behaviors['loadchoices'] = &$this->settingdata;
}
}
@@ -0,0 +1,65 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Select one value from list.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configselect extends adminpresets_setting {
/**
* Sets the setting value cleaning it.
*
* @param mixed $value must be one of the setting choices.
* @return bool true if the value one of the setting choices
*/
protected function set_value($value) {
// When we intantiate the class we need the choices.
if (empty($this->settindata->choices) && method_exists($this->settingdata, 'load_choices')) {
$this->settingdata->load_choices();
}
if (!is_null($this->settingdata->choices) and is_array($this->settingdata->choices)) {
foreach ($this->settingdata->choices as $key => $choice) {
if ($key == $value) {
$this->value = $value;
$this->set_visiblevalue();
return true;
}
}
}
$this->value = false;
$this->set_visiblevalue();
return false;
}
protected function set_visiblevalue() {
// Just to avoid heritage problems.
if (empty($this->settingdata->choices[$this->value])) {
$this->visiblevalue = '';
} else {
$this->visiblevalue = $this->settingdata->choices[$this->value];
}
}
}
@@ -0,0 +1,59 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
use admin_setting;
/**
* Adds support for the "advanced" attribute.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configselect_with_advanced extends adminpresets_admin_setting_configselect {
/** @var string Name of the advanced setting. **/
protected $advancedkey;
public function __construct(admin_setting $settingdata, $dbsettingvalue) {
// Getting the advanced defaultsetting attribute name.
if (is_array($settingdata->defaultsetting)) {
foreach ($settingdata->defaultsetting as $key => $defaultvalue) {
if ($key != 'value') {
$this->advancedkey = $key;
}
}
}
// To look for other values.
$this->attributes = [$this->advancedkey => $settingdata->name . '_adv'];
parent::__construct($settingdata, $dbsettingvalue);
}
/**
* Funcionality used by other _with_advanced settings
*/
protected function set_visiblevalue() {
parent::set_visiblevalue();
if (!is_null($this->attributesvalues)) {
$attribute = $this->attributes[$this->advancedkey];
$this->visiblevalue .= $this->delegation->extra_set_visiblevalue($this->attributesvalues[$attribute], 'advanced');
}
}
}
@@ -0,0 +1,58 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Basic text setting, cleans the param using the admin_setting paramtext attribute.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configtext extends adminpresets_setting {
/**
* Validates the value using paramtype attribute
*
* @param mixed $value
* @return boolean Cleaned or not, but always true.
*/
protected function set_value($value) {
$this->value = $value;
if (empty($this->settingdata->paramtype)) {
// For configfile, configpasswordunmask....
$this->settingdata->paramtype = 'RAW';
}
$paramtype = 'PARAM_' . strtoupper($this->settingdata->paramtype);
// Regexp.
if (!defined($paramtype)) {
$this->value = preg_replace($this->settingdata->paramtype, '', $this->value);
// Standard moodle param type.
} else {
$this->value = clean_param($this->value, constant($paramtype));
}
$this->set_visiblevalue();
return true;
}
}
@@ -0,0 +1,47 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
use admin_setting;
/**
* Adds the advanced attribute.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configtext_with_advanced extends adminpresets_admin_setting_configtext {
public function __construct(admin_setting $settingdata, $dbsettingvalue) {
// To look for other values.
$this->attributes = ['fix' => $settingdata->name . '_adv'];
parent::__construct($settingdata, $dbsettingvalue);
}
/**
* Delegates
*/
protected function set_visiblevalue() {
parent::set_visiblevalue();
if (!is_null($this->attributesvalues) && array_key_exists($this->attributes['fix'], $this->attributesvalues)) {
$value = $this->attributesvalues[$this->attributes['fix']];
$this->visiblevalue .= $this->delegation->extra_set_visiblevalue($value, 'advanced');
}
}
}
@@ -0,0 +1,67 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Time selector.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_configtime extends adminpresets_setting {
/**
* To check that the value is one of the options
*
* @param string $name
* @param mixed $value
*/
public function set_attribute_value($name, $value) {
for ($i = 0; $i < 60; $i = $i + 5) {
$minutes[$i] = $i;
}
if (!empty($minutes[$value])) {
$this->attributesvalues[$name] = $value;
} else {
$this->attributesvalues[$name] = $this->settingdata->defaultsetting['m'];
}
}
protected function set_value($value) {
$this->attributes = ['m' => $this->settingdata->name2];
for ($i = 0; $i < 24; $i++) {
$hours[$i] = $i;
}
if (empty($hours[$value])) {
$this->value = false;
}
$this->value = $value;
$this->set_visiblevalue();
}
protected function set_visiblevalue() {
if (!is_null($this->attributesvalues) && array_key_exists($this->settingdata->name2, $this->attributesvalues)) {
$this->visiblevalue = $this->value . ':' . $this->attributesvalues[$this->settingdata->name2];
}
}
}
@@ -0,0 +1,43 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Reimplementation to allow human friendly view of the selected regexps.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_devicedetectregex extends adminpresets_admin_setting_configtext {
public function set_visiblevalue() {
$values = json_decode($this->get_value());
if (!$values) {
parent::set_visiblevalue();
return;
}
$this->visiblevalue = '';
foreach ($values as $key => $value) {
$this->visiblevalue .= $key . ' = ' . $value . ', ';
}
$this->visiblevalue = rtrim($this->visiblevalue, ', ');
}
}
@@ -0,0 +1,61 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
use admin_setting;
/**
* A select with force and advanced options
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_gradecat_combo extends adminpresets_admin_setting_configselect {
/**
* One db value for two setting attributes
*
* @param admin_setting $settingdata
* @param mixed $dbsettingvalue
*/
public function __construct(admin_setting $settingdata, $dbsettingvalue) {
// The set_attribute_value() method will mod the VARNAME_flag value.
$this->attributes = ['forced' => $settingdata->name . '_flag', 'adv' => $settingdata->name . '_flag'];
parent::__construct($settingdata, $dbsettingvalue);
}
/**
* Special treatment! the value be extracted from the $value argument
*/
protected function set_visiblevalue() {
parent::set_visiblevalue();
if (!is_null($this->attributesvalues) && array_key_exists($this->settingdata->name . '_flag', $this->attributesvalues)) {
$flagvalue = $this->attributesvalues[$this->settingdata->name . '_flag'];
if (isset($flagvalue)) {
$forcedvalue = (($flagvalue % 2) == 1);
$advancedvalue = ($flagvalue >= 2);
$this->visiblevalue .= $this->delegation->extra_set_visiblevalue($forcedvalue, 'forced');
$this->visiblevalue .= $this->delegation->extra_set_visiblevalue($advancedvalue, 'advanced');
}
}
}
}
@@ -0,0 +1,67 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Reimplemented to store values in course table, not in config or config_plugins.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_sitesettext extends adminpresets_admin_setting_configtext {
/**
* Overwritten to store the value in the course table
*
* @param bool $name
* @param mixed $value
* @return int|false config_log inserted id or false whenever the new value is the same as old value.
*/
public function save_value($name = false, $value = null) {
global $DB;
// Object values if no arguments.
if ($value === null) {
$value = $this->value;
}
if (!$name) {
$name = $this->settingdata->name;
}
$sitecourse = $DB->get_record('course', ['id' => 1]);
$actualvalue = $sitecourse->{$name};
// If it's the same value skip.
if ($actualvalue == $value) {
return false;
}
// Plugin name or ''.
$plugin = $this->settingdata->plugin;
if ($plugin == 'none' || $plugin == '') {
$plugin = null;
}
// Updating mdl_course.
$sitecourse->{$name} = $value;
$DB->update_record('course', $sitecourse);
return $this->to_log($plugin, $name, $this->value, $actualvalue);
}
}
@@ -0,0 +1,53 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Special control for selecting days to backup.
*
* It doesn't specify loadchoices behavior because is set_visiblevalue who needs it.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_special_backupdays extends adminpresets_setting {
protected function set_value($value) {
$this->value = clean_param($value, PARAM_SEQUENCE);
$this->set_visiblevalue();
}
protected function set_visiblevalue() {
$this->settingdata->load_choices();
$days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
$selecteddays = [];
$week = str_split($this->value);
foreach ($week as $key => $day) {
if ($day) {
$index = $days[$key];
$selecteddays[] = $this->settingdata->choices[$index];
}
}
$this->visiblevalue = implode(', ', $selecteddays);
}
}
@@ -0,0 +1,44 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Special admin control for calendar weekend.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_special_calendar_weekend extends adminpresets_setting {
protected function set_visiblevalue() {
if (!$this->value) {
parent::set_visiblevalue();
return;
}
$days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
for ($i = 0; $i < 7; $i++) {
if ($this->value & (1 << $i)) {
$settings[] = get_string($days[$i], 'calendar');
}
}
$this->visiblevalue = implode(', ', $settings);
}
}
@@ -0,0 +1,39 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Extends configselect to reuse set_valuevisible.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_admin_setting_users_with_capability extends adminpresets_admin_setting_configmultiselect {
protected function set_behaviors() {
$this->behaviors['loadchoices'] = &$this->settingdata;
}
protected function set_value($value) {
// Dirty hack (the value stored in the DB is '').
$this->settingdata->choices[''] = $this->settingdata->choices['$@NONE@$'];
return parent::set_value($value);
}
}
@@ -0,0 +1,268 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
use admin_setting;
use moodle_exception;
use stdClass;
/**
* Admin tool presets plugin to load some settings.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class adminpresets_setting {
/**
* @var admin_setting
*/
protected $settingdata;
/**
* @var delegation
*/
protected $delegation;
/**
* The setting DB value
*
* @var mixed
*/
protected $value;
/**
* Stores the visible value of the setting DB value
*
* @var string
*/
protected $visiblevalue;
/**
* For multiple value settings, used to look for the other values
*
* @var string
*/
protected $attributes = false;
/**
* To store the setting attributes
*
* @var array
*/
protected $attributesvalues;
/**
* Stores the setting data and the selected value
*
* @param admin_setting $settingdata admin_setting subclass
* @param mixed $dbsettingvalue Actual value
*/
public function __construct(admin_setting $settingdata, $dbsettingvalue) {
$this->settingdata = $settingdata;
$this->delegation = new delegation();
if ($this->settingdata->plugin == '') {
$this->settingdata->plugin = 'none';
}
// Applies specific children behaviors.
$this->set_behaviors();
$this->apply_behaviors();
// Cleaning value.
$this->set_value($dbsettingvalue);
}
/**
* Each class can overwrite this method to specify extra processes
*/
protected function set_behaviors() {
}
/**
* Applies the children class specific behaviors
*
* See delegation class for the available extra behaviors
*/
protected function apply_behaviors() {
if (!empty($this->behaviors)) {
foreach ($this->behaviors as $behavior => $arguments) {
// The arguments of the behavior depends on the caller.
$methodname = 'extra_' . $behavior;
$this->delegation->{$methodname}($arguments);
}
}
}
/**
* Gets the setting value.
*
* @return mixed The setting value
*/
public function get_value() {
return $this->value;
}
/**
* Sets the setting value cleaning it
*
* Child classes should overwrite method to clean more acurately
*
* @param mixed $value Setting value
* @return mixed Returns false if wrong param value
*/
protected function set_value($value) {
$this->value = $value;
$this->set_visiblevalue();
}
public function get_visiblevalue() {
return $this->visiblevalue;
}
/**
* Sets the visible name for the setting selected value
*
* In most cases the child classes will overwrite
*/
protected function set_visiblevalue() {
$this->visiblevalue = $this->value;
}
public function get_attributes() {
return $this->attributes;
}
public function get_attributes_values() {
return $this->attributesvalues;
}
public function get_settingdata() {
return $this->settingdata;
}
public function set_attribute_value($name, $value) {
$this->attributesvalues[$name] = $value;
}
/**
* Saves the setting attributes values
*
* @return array Array of inserted ids (in config_log)
*/
public function save_attributes_values() {
// Plugin name or null.
$plugin = $this->settingdata->plugin;
if ($plugin == 'none' || $plugin == '') {
$plugin = null;
}
if (!$this->attributesvalues) {
return false;
}
// To store inserted ids.
$ids = [];
foreach ($this->attributesvalues as $name => $value) {
// Getting actual setting.
$actualsetting = get_config($plugin, $name);
// If it's the actual setting get off.
if ($value == $actualsetting) {
return false;
}
if ($id = $this->save_value($name, $value)) {
$ids[] = $id;
}
}
return $ids;
}
/**
* Stores the setting into database, logs the change and returns the config_log inserted id
*
* @param bool $name Setting name to store.
* @param mixed $value Setting value to store.
* @return int|false config_log inserted id or false whenever the new value is the same as old value.
* @throws dml_exception
* @throws moodle_exception
*/
public function save_value($name = false, $value = null) {
// Object values if no arguments.
if ($value === null) {
$value = $this->value;
}
if (!$name) {
$name = $this->settingdata->name;
}
// Plugin name or null.
$plugin = $this->settingdata->plugin;
if ($plugin == 'none' || $plugin == '') {
$plugin = null;
}
// Getting the actual value.
$actualvalue = get_config($plugin, $name);
// If it's the same it's not necessary.
if ($actualvalue == $value) {
return false;
}
set_config($name, $value, $plugin);
return $this->to_log($plugin, $name, $value, $actualvalue);
}
/**
* Copy of config_write method of the admin_setting class
*
* @param string $plugin
* @param string $name
* @param mixed $value
* @param mixed $actualvalue
* @return integer The stored config_log id
*/
protected function to_log($plugin, $name, $value, $actualvalue) {
global $DB, $USER;
// Log the change (pasted from admin_setting class).
$log = new stdClass();
$log->userid = during_initial_install() ? 0 : $USER->id; // 0 as user id during install.
$log->timemodified = time();
$log->plugin = $plugin;
$log->name = $name;
$log->value = $value;
$log->oldvalue = $actualvalue;
// Getting the inserted config_log id.
if (!$id = $DB->insert_record('config_log', $log)) {
throw new moodle_exception('errorinserting', 'core_adminpresets');
}
return $id;
}
}
@@ -0,0 +1,53 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
use admin_setting;
/**
* Cross-class methods
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class delegation {
/**
* Adds a piece of string to the $type setting
*
* @param boolean $value
* @param string $type Indicates the "extra" setting
* @return string
*/
public function extra_set_visiblevalue(bool $value, string $type): string {
// Adding the advanced value to the text string if present.
if ($value) {
$string = get_string('markedas' . $type, 'core_adminpresets');
} else {
$string = get_string('markedasnon' . $type, 'core_adminpresets');
}
// Adding the advanced state.
return ', ' . $string;
}
public function extra_loadchoices(admin_setting &$adminsetting) {
$adminsetting->load_choices();
}
}
File diff suppressed because it is too large Load Diff
+125
View File
@@ -0,0 +1,125 @@
<?php
// This file is part of The Course Module Navigation Block
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\privacy;
use core_privacy\local\metadata\collection;
use core_privacy\local\request\approved_contextlist;
use core_privacy\local\request\approved_userlist;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\userlist;
/**
* Admin presets this file handle privacy provider.
*
* @package core_adminpresets
* @copyright 2021 Pimenko <support@pimenko.com><pimenko.com>
* @author Jordan Kesraoui | Sylvain Revenu | Pimenko based on David Monllaó <david.monllao@urv.cat> code
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\subsystem\provider,
\core_privacy\local\request\core_userlist_provider {
/**
* Returns information about the user data stored in this component.
*
* @param collection $collection A list of information about this component
* @return collection The collection object filled out with information about this component.
*/
public static function get_metadata(collection $collection) : collection {
// These tables are really data about site configuration and not user data.
// The adminpresets includes information about which user performed a configuration change using the admin_presets
// tool.
// This is not considered to be user data.
$collection->add_database_table('adminpresets', [
'userid' => 'privacy:metadata:adminpresets:userid',
'name' => 'privacy:metadata:adminpresets:name',
'comments' => 'privacy:metadata:adminpresets:comments',
'site' => 'privacy:metadata:adminpresets:site',
'moodlerelease' => 'privacy:metadata:adminpresets:moodlerelease',
'timecreated' => 'privacy:metadata:adminpresets:timecreated',
], 'privacy:metadata:adminpresets');
// The adminpresets_app includes information about which user performed configuration change using the admin_presets
// tool.
// This is not considered to be user data.
$collection->add_database_table('adminpresets_app', [
'adminpresetid' => 'privacy:metadata:adminpresets_app:adminpresetid',
'userid' => 'privacy:metadata:adminpresets_app:userid',
'time' => 'privacy:metadata:adminpresets_app:time',
], 'privacy:metadata:adminpresets_app');
return $collection;
}
/**
* Get the list of contexts that contain user information for the specified user.
*
* @param int $userid The user to search.
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
*/
public static function get_contexts_for_userid(int $userid) : contextlist {
return new contextlist();
}
/**
* Get the list of users who have data within a context.
*
* @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
*/
public static function get_users_in_context(userlist $userlist) {
// Don't add any user.
}
/**
* Export all user data for the specified user, in the specified contexts.
*
* @param approved_contextlist $contextlist The approved contexts to export information for.
*/
public static function export_user_data(approved_contextlist $contextlist) {
// None of the core tables should be exported.
}
/**
* Delete all data for all users in the specified context.
*
* @param context $context The specific context to delete data for.
*/
public static function delete_data_for_all_users_in_context(\context $context) {
// None of the the data from these tables should be deleted.
}
/**
* Delete all user data for the specified user, in the specified contexts.
*
* @param approved_contextlist $contextlist The approved contexts and user information to delete information for.
*/
public static function delete_data_for_user(approved_contextlist $contextlist) {
// None of the the data from these tables should be deleted.
}
/**
* Delete multiple users within a single context.
*
* @param approved_userlist $userlist The approved context and user information to delete information for.
*/
public static function delete_data_for_users(approved_userlist $userlist) {
// None of the the data from these tables should be deleted.
}
}
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Imported preset</NAME>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Porfolios enabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced&lt;/p&gt;</COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
<MOODLE_VERSION>2021091100</MOODLE_VERSION>
<MOODLE_RELEASE>4.0dev (Build: 20210911)</MOODLE_RELEASE>
<ADMIN_SETTINGS>
<MOD_LESSON>
<SETTINGS>
<MAXANSWERS maxanswers_adv="">2</MAXANSWERS>
<MEDIAWIDTH>900</MEDIAWIDTH>
</SETTINGS>
</MOD_LESSON>
<NONE>
<SETTINGS>
<ALLOWEMOJIPICKER>1</ALLOWEMOJIPICKER>
<ENABLEPORTFOLIOS>1</ENABLEPORTFOLIOS>
</SETTINGS>
</NONE>
</ADMIN_SETTINGS>
</PRESET>
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Imported preset</NAME>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Porfolios enabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_chat plugins and enabled atto_html, block_activity_modules and mod_lesson.&lt;/p&gt;</COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
<MOODLE_VERSION>2021091100</MOODLE_VERSION>
<MOODLE_RELEASE>4.0dev (Build: 20210911)</MOODLE_RELEASE>
<ADMIN_SETTINGS>
<MOD_LESSON>
<SETTINGS>
<MAXANSWERS maxanswers_adv="">2</MAXANSWERS>
<MEDIAWIDTH>900</MEDIAWIDTH>
</SETTINGS>
</MOD_LESSON>
<NONE>
<SETTINGS>
<ALLOWEMOJIPICKER>1</ALLOWEMOJIPICKER>
<ENABLEPORTFOLIOS>1</ENABLEPORTFOLIOS>
</SETTINGS>
</NONE>
</ADMIN_SETTINGS>
<PLUGINS>
<ATTO>
<HTML>1</HTML>
</ATTO>
<BLOCK>
<HTML>0</HTML>
<ACTIVITY_MODULES>1</ACTIVITY_MODULES>
</BLOCK>
<MOD>
<CHAT>0</CHAT>
<DATA>0</DATA>
<LESSON>1</LESSON>
</MOD>
</PLUGINS>
</PRESET>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Imported preset</NAME>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Porfolios enabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced&lt;/p&gt;</COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
<MOODLE_VERSION>2021091100</MOODLE_VERSION>
<MOODLE_RELEASE>4.0dev (Build: 20210911)</MOODLE_RELEASE>
<ADMIN_SETTINGS>
<MOD_LESSON>
<SETTINGS>
<MAXANSWERS maxanswers_adv="">2</MAXANSWERS>
<MEDIAWIDTH>900</MEDIAWIDTH>
</SETTINGS>
</MOD_LESSON>
<NONE>
<SETTINGS>
<UNEXISTINGSETTING>0</UNEXISTINGSETTING>
<ALLOWEMOJIPICKER>1</ALLOWEMOJIPICKER>
<ENABLEPORTFOLIOS>1</ENABLEPORTFOLIOS>
</SETTINGS>
</NONE>
</ADMIN_SETTINGS>
</PRESET>
+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Starter</NAME>
<COMMENTS>&lt;p dir="ltr" style="text-align:left;"&gt;Badges disabled, Emojipicker enabled, Lesson media width set to 900 and maxanswers set to 2 and disabled advanced. Plugins: disabled block_html, mod_database and mod_chat plugins and enabled atto_html and block_activity_modules.&lt;/p&gt;</COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
<MOODLE_VERSION>2021091100</MOODLE_VERSION>
<MOODLE_RELEASE>4.0dev (Build: 20210911)</MOODLE_RELEASE>
<ADMIN_SETTINGS>
<MOD_LESSON>
<SETTINGS>
<MAXANSWERS maxanswers_adv="">2</MAXANSWERS>
<MEDIAWIDTH>900</MEDIAWIDTH>
</SETTINGS>
</MOD_LESSON>
<NONE>
<SETTINGS>
<ALLOWEMOJIPICKER>1</ALLOWEMOJIPICKER>
<ENABLEBADGES>0</ENABLEBADGES>
</SETTINGS>
</NONE>
</ADMIN_SETTINGS>
<PLUGINS>
<ATTO>
<HTML>1</HTML>
</ATTO>
<BLOCK>
<HTML>0</HTML>
<ACTIVITY_MODULES>1</ACTIVITY_MODULES>
</BLOCK>
<MOD>
<CHAT>0</CHAT>
<DATA>0</DATA>
<LESSON>1</LESSON>
</MOD>
</PLUGINS>
</PRESET>
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Imported preset - Invalid XML file</NAME>
<COMMENTS></COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
<MOODLE_VERSION>2021091100</MOODLE_VERSION>
<MOODLE_RELEASE>4.0dev (Build: 20210911)</MOODLE_RELEASE>
<ADMIN_SETTINGS>
<MOD_LESSON>
<SETTINGS>
<MAXANSWERS maxanswers_adv="">2</MAXANSWERS>
<MEDIAWIDTH>900</MEDIAWIDTH>
</SETTINGS>
</MOD_LESSON>
<NONE>
<SETTINGS>
<ALLOWEMOJIPICKER>1</ALLOWEMOJIPICKER>
<ENABLEPORTFOLIOS>1</ENABLEPORTFOLIOS>
</SETTINGS>
</NONE>
</PRESET>
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Imported preset with unexisting category</NAME>
<COMMENTS></COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
<MOODLE_VERSION>2021091100</MOODLE_VERSION>
<MOODLE_RELEASE>4.0dev (Build: 20210911)</MOODLE_RELEASE>
<ADMIN_SETTINGS>
<NONE>
<UNEXISTINGCATEGORY>
<ENABLEPORTFOLIOS>1</ENABLEPORTFOLIOS>
</UNEXISTINGCATEGORY>
</NONE>
</ADMIN_SETTINGS>
</PRESET>
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<PRESET>
<NAME>Imported preset with unexisting setting</NAME>
<COMMENTS></COMMENTS>
<PRESET_DATE>1631615985</PRESET_DATE>
<SITE_URL>http://demo.moodle</SITE_URL>
<AUTHOR>Ada Lovelace</AUTHOR>
<MOODLE_VERSION>2021091100</MOODLE_VERSION>
<MOODLE_RELEASE>4.0dev (Build: 20210911)</MOODLE_RELEASE>
<ADMIN_SETTINGS>
<NONE>
<SETTINGS>
<UNEXISTINGSETTING>0</UNEXISTINGSETTING>
</SETTINGS>
</NONE>
</ADMIN_SETTINGS>
</PRESET>
+254
View File
@@ -0,0 +1,254 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// 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_adminpresets\local\setting\adminpresets_setting;
use core_adminpresets\manager;
use core_adminpresets\helper;
global $CFG;
require_once($CFG->libdir . '/adminlib.php');
/**
* Data generator for adminpresets component.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_adminpresets_generator extends \component_generator_base {
/**
* Create a preset. This preset will have only 3 settings and 3 plugins.
* Settings:
* - none.enablebadges = 0
* - none.allowemojipicker = 1
* - mod_lesson.mediawidth = 900
* - mod_lesson.maxanswers = 2 with advanced disabled.
* Plugins:
* - enrol_guest = 0
* - mod_glossary = 0
* - qtype_truefalse = 1
*
* @param array $data Preset data. Supported values:
* - name. To define the preset name.
* - comments. To change the comments field.
* - author. To set the author.
* - applypreset. Whether the preset should be applied too or not.
* @return int Identifier of the preset created.
*/
public function create_preset(array $data = []): int {
global $DB, $USER, $CFG;
if (!isset($data['name'])) {
$data['name'] = 'Preset default name';
}
if (!isset($data['comments'])) {
$data['comments'] = 'Preset default comment';
}
if (!isset($data['author'])) {
$data['author'] = 'Default author';
}
if (!isset($data['iscore'])) {
$data['iscore'] = manager::NONCORE_PRESET;
}
// Validate iscore value.
$allowed = [manager::NONCORE_PRESET, manager::STARTER_PRESET, manager::FULL_PRESET];
if (!in_array($data['iscore'], $allowed)) {
$data['iscore'] = manager::NONCORE_PRESET;
}
$preset = [
'userid' => $USER->id,
'name' => $data['name'],
'comments' => $data['comments'],
'site' => $CFG->wwwroot,
'author' => $data['author'],
'moodleversion' => $CFG->version,
'moodlerelease' => $CFG->release,
'timecreated' => time(),
'timeimported' => 0,
'iscore' => $data['iscore'],
];
$presetid = $DB->insert_record('adminpresets', $preset);
$preset['id'] = $presetid;
// Setting: enablebadges = 0.
helper::add_item($presetid, 'enablebadges', '0');
// Setting: allowemojipicker = 1.
helper::add_item($presetid, 'allowemojipicker', '1');
// Setting: mediawidth = 900.
helper::add_item($presetid, 'mediawidth', '900', 'mod_lesson');
// Setting: maxanswers = 2 (with advanced disabled).
helper::add_item($presetid, 'maxanswers', '2', 'mod_lesson', 'maxanswers_adv', 0);
// Plugin: enrol_guest = 0.
helper::add_plugin($presetid, 'enrol', 'guest', 0);
// Plugin: mod_glossary = 0.
helper::add_plugin($presetid, 'mod', 'glossary', 0);
// Plugin: qtype_truefalse.
helper::add_plugin($presetid, 'qtype', 'truefalse', 1);
// Check if the preset should be created as applied preset too, to fill in the rest of the tables.
$applypreset = isset($data['applypreset']) && $data['applypreset'];
if ($applypreset) {
$presetapp = [
'adminpresetid' => $presetid,
'userid' => $USER->id,
'time' => time(),
];
$appid = $DB->insert_record('adminpresets_app', $presetapp);
$this->apply_setting($appid, 'enablebadges', '1', '0');
// The allowemojipicker setting shouldn't be applied because the value matches the current one.
$this->apply_setting($appid, 'mediawidth', '640', '900', 'mod_lesson');
$this->apply_setting($appid, 'maxanswers', '5', '2', 'mod_lesson');
$this->apply_setting($appid, 'maxanswers_adv', '1', '0', 'mod_lesson', 'maxanswers');
$this->apply_plugin($appid, 'enrol', 'guest', 1, 0);
$this->apply_plugin($appid, 'mod', 'glossary', 1, 0);
// The qtype_truefalse plugin shouldn't be applied because the value matches the current one.
}
return $presetid;
}
/**
* Helper method to create an applied setting item.
*
* @param int $appid The applied preset identifier.
* @param string $name The setting name.
* @param string $oldvalue The setting old value.
* @param string $newvalue The setting new value.
* @param string|null $plugin The setting plugin (or null if none).
* @param string|null $itemname Whether it should be treated as advanced item or not.
*
* @return bool|int true or new id.
*/
private function apply_setting(int $appid, string $name, string $oldvalue, string $newvalue, ?string $plugin = null,
?string $itemname = null) {
global $DB;
set_config($name, $newvalue, $plugin);
$configlogid = $this->add_to_config_log($name, $oldvalue, $newvalue, $plugin);
$presetappitem = [
'adminpresetapplyid' => $appid,
'configlogid' => $configlogid,
];
$table = 'adminpresets_app_it';
if (!is_null($itemname)) {
$table = 'adminpresets_app_it_a';
$presetappitem['itemname'] = $itemname;
}
$appitemid = $DB->insert_record($table, $presetappitem);
return $appitemid;
}
/**
* Helper method to create an applied plugin.
*
* @param int $appid The applied preset identifier.
* @param string $plugin The plugin type.
* @param string $name The plugin name.
* @param int $oldvalue The setting old value.
* @param int $newvalue The setting new value.
*
* @return bool|int true or new id.
*/
private function apply_plugin(int $appid, string $plugin, string $name, int $oldvalue, int $newvalue) {
global $DB;
// Change plugin visibility.
$pluginclass = \core_plugin_manager::resolve_plugininfo_class($plugin);
$pluginclass::enable_plugin($name, $newvalue);
// Create entry in applied plugins table.
$presetappplug = [
'adminpresetapplyid' => $appid,
'plugin' => $plugin,
'name' => $name,
'value' => $newvalue,
'oldvalue' => $oldvalue,
];
$appplugid = $DB->insert_record('adminpresets_app_plug', $presetappplug);
return $appplugid;
}
/**
* Helper method to add entry in config_log.
*
* @param string $name The setting name.
* @param string $oldvalue The setting old value.
* @param string $value The setting new value.
* @param string|null $plugin The setting plugin (or null if the setting doesn't belong to any plugin).
* @return int The id of the config_log entry created.
*/
private function add_to_config_log(string $name, string $oldvalue, string $value, ?string $plugin = null): int {
global $DB, $USER;
$log = new stdClass();
$log->userid = $USER->id;
$log->timemodified = time();
$log->name = $name;
$log->oldvalue = $oldvalue;
$log->value = $value;
$log->plugin = $plugin;
$id = $DB->insert_record('config_log', $log);
return $id;
}
/**
* Helper method to access to a protected property.
*
* @param string|object $object The class.
* @param string $property The private/protected property in $object to access.
* @return mixed The current value of the property.
*/
public function access_protected($object, string $property) {
$reflection = new ReflectionClass($object);
$property = $reflection->getProperty($property);
$property->setAccessible(true);
return $property->getValue($object);
}
/**
* Given a tree category and setting name, it gets the adminpresets_setting class.
*
* @param string $category Tree category name where the setting is located.
* @param string $settingname Setting name to get the class.
* @return adminpresets_setting
*/
public function get_admin_preset_setting(string $category, string $settingname): adminpresets_setting {
$adminroot = admin_get_root();
// Set method accessibility.
$method = new ReflectionMethod(manager::class, 'get_setting');
$method->setAccessible(true);
// Get the proper adminpresets_setting instance.
$settingpage = $adminroot->locate($category);
$settingdata = $settingpage->settings->$settingname;
return $method->invokeArgs(new manager(), [$settingdata, '']);
}
}
+236
View File
@@ -0,0 +1,236 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets;
/**
* Tests for the data generator.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass core_adminpresets_generator
*/
class generator_test extends \advanced_testcase {
/**
* Test the behaviour of create_preset() method.
*
* @covers ::create_preset
* @dataProvider create_preset_provider
*
* @param string|null $name Preset name field.
* @param string|null $comments Preset comments field.
* @param string|null $author Preset author field.
* @param bool $applypreset Whether the preset should be applied or not.
* @param int|null $iscore Whether the preset is a core preset or not.
* @param int|null $iscoreresult Expected iscore value for the result preset.
*/
public function test_create_preset(?string $name = null, ?string $comments = null, ?string $author = null,
bool $applypreset = false, ?int $iscore = null, ?int $iscoreresult = null): void {
global $CFG, $DB;
$this->resetAfterTest();
$data = [];
if (isset($name)) {
$data['name'] = $name;
} else {
// Set the default value used in the generator.
$name = 'Preset default name';
}
if (isset($comments)) {
// Set the default value used in the generator.
$data['comments'] = $comments;
} else {
// Set the default value used in the generator.
$comments = 'Preset default comment';
}
if (isset($author)) {
$data['author'] = $author;
} else {
$author = 'Default author';
}
if ($applypreset) {
$data['applypreset'] = $applypreset;
}
if (isset($iscore)) {
$data['iscore'] = $iscore;
}
if (!isset($iscoreresult)) {
$iscoreresult = manager::NONCORE_PRESET;
}
// Create a preset.
$presetid = $this->getDataGenerator()->get_plugin_generator('core_adminpresets')->create_preset($data);
// Check the preset data.
$preset = $DB->get_record('adminpresets', ['id' => $presetid]);
$this->assertEquals($name, $preset->name);
$this->assertEquals($comments, $preset->comments);
$this->assertEquals($author, $preset->author);
$this->assertEquals($iscoreresult, $preset->iscore);
$this->assertEquals($CFG->version, $preset->moodleversion);
$this->assertEquals($CFG->release, $preset->moodlerelease);
$this->assertEquals($CFG->wwwroot, $preset->site);
// Check the settings.
$settings = $DB->get_records('adminpresets_it', ['adminpresetid' => $presetid]);
$this->assertCount(4, $settings);
// These are the settings created in the generator. Check the results match them.
$expectedsettings = [
'enablebadges' => 0,
'allowemojipicker' => 1,
'mediawidth' => 900,
'maxanswers' => 2,
];
foreach ($settings as $setting) {
$this->assertArrayHasKey($setting->name, $expectedsettings);
$this->assertEquals($expectedsettings[$setting->name], $setting->value);
}
// Check the advanced settings (should be only one).
$settingsid = array_keys($settings);
list($insql, $inparams) = $DB->get_in_or_equal($settingsid);
$advsettings = $DB->get_records_select('adminpresets_it_a', 'itemid ' . $insql, $inparams);
$this->assertCount(1, $advsettings);
$advsetting = reset($advsettings);
$this->assertEquals('maxanswers_adv', $advsetting->name);
$this->assertEquals(0, $advsetting->value);
// Check the plugins.
$plugins = $DB->get_records('adminpresets_plug', ['adminpresetid' => $presetid]);
$this->assertCount(3, $plugins);
// These are the plugins created in the generator. Check the results match them.
$expectedplugins = [
'enrol' => [
'guest' => 0,
],
'mod' => [
'glossary' => 0,
],
'qtype' => [
'truefalse' => 1,
],
];
foreach ($plugins as $plugin) {
$this->assertArrayHasKey($plugin->plugin, $expectedplugins);
$this->assertArrayHasKey($plugin->name, $expectedplugins[$plugin->plugin]);
$this->assertEquals($expectedplugins[$plugin->plugin][$plugin->name], $plugin->enabled);
}
if ($applypreset) {
// Verify that the preset has been applied.
$apps = $DB->get_records('adminpresets_app', ['adminpresetid' => $presetid]);
$this->assertCount(1, $apps);
$app = reset($apps);
// Check the applied settings.
$appsettings = $DB->get_records('adminpresets_app_it', ['adminpresetapplyid' => $app->id]);
$this->assertCount(3, $appsettings);
// These are the settings created in the generator (all but the allowemojipicker because it hasn't changed).
$expectedappsettings = $expectedsettings;
unset($expectedappsettings['allowemojipicker']);
// Check the results match the expected settings applied.
foreach ($appsettings as $appsetting) {
$configlog = $DB->get_record('config_log', ['id' => $appsetting->configlogid]);
$this->assertArrayHasKey($configlog->name, $expectedappsettings);
$this->assertEquals($expectedappsettings[$configlog->name], $configlog->value);
}
$appsettings = $DB->get_records('adminpresets_app_it_a', ['adminpresetapplyid' => $app->id]);
$this->assertCount(1, $appsettings);
$appsetting = reset($appsettings);
$configlog = $DB->get_record('config_log', ['id' => $appsetting->configlogid]);
$this->assertEquals('maxanswers_adv', $configlog->name);
$this->assertEquals(0, $configlog->value);
// Check the applied plugins.
$appplugins = $DB->get_records('adminpresets_app_plug', ['adminpresetapplyid' => $app->id]);
$this->assertCount(2, $appplugins);
// These are the plugins created in the generator (all but the qtype_truefalse because it hasn't changed).
$expectedappplugins = $expectedplugins;
unset($expectedappplugins['qtype']);
// Check the results match the expected plugins applied.
foreach ($appplugins as $appplugin) {
$this->assertArrayHasKey($appplugin->plugin, $expectedappplugins);
$this->assertArrayHasKey($appplugin->name, $expectedappplugins[$appplugin->plugin]);
$this->assertEquals($expectedappplugins[$appplugin->plugin][$appplugin->name], $appplugin->value);
}
}
}
/**
* Data provider for test_create_preset().
*
* @return array
*/
public function create_preset_provider(): array {
return [
'Default values' => [
],
'Name not empty' => [
'name' => 'Preset xaxi name',
],
'Comment not empty' => [
'name' => null,
'comments' => 'This is a different comment',
],
'Author not empty' => [
'name' => null,
'comments' => null,
'author' => 'Ada Lovelace',
],
'No default values for all the fields' => [
'name' => 'Preset with a super-nice name',
'comments' => 'This is a comment different from the previous one',
'author' => 'Alejandro Sanz',
],
'Apply preset' => [
'name' => null,
'comments' => null,
'author' => null,
'applypreset' => true,
],
'Starter preset' => [
'name' => 'Starter',
'comments' => null,
'author' => null,
'applypreset' => false,
'iscore' => manager::STARTER_PRESET,
'iscoreresult' => manager::STARTER_PRESET,
],
'Full preset' => [
'name' => 'Full',
'comments' => null,
'author' => null,
'applypreset' => false,
'iscore' => manager::FULL_PRESET,
'iscoreresult' => manager::FULL_PRESET,
],
'Invalid iscore' => [
'name' => 'Invalid iscore value',
'comments' => null,
'author' => null,
'applypreset' => false,
'iscore' => -1,
'iscoreresult' => manager::NONCORE_PRESET,
],
];
}
}
+387
View File
@@ -0,0 +1,387 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets;
/**
* Tests for the helper class.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass helper
*/
class helper_test extends \advanced_testcase {
/**
* Test the behaviour of create_preset() method.
*
* @covers ::create_preset
* @dataProvider create_preset_provider
*
* @param string|null $name Preset name field.
* @param string|null $comments Preset comments field.
* @param int|null $iscore Preset iscore field.
* @param int|null $iscoreresult Expected iscore value for the result preset.
*/
public function test_create_preset(?string $name = null, ?string $comments = null, ?int $iscore = null,
?int $iscoreresult = null): void {
global $CFG, $DB, $USER;
$this->resetAfterTest();
$data = [];
if (isset($name)) {
$data['name'] = $name;
}
if (isset($comments)) {
$data['comments'] = $comments;
}
if (isset($iscore)) {
$data['iscore'] = $iscore;
}
if (!isset($iscoreresult)) {
$iscoreresult = manager::NONCORE_PRESET;
}
// Create a preset.
$presetid = helper::create_preset($data);
// Check the preset data.
$preset = $DB->get_record('adminpresets', ['id' => $presetid]);
$this->assertEquals($name, $preset->name);
$this->assertEquals($comments, $preset->comments);
$this->assertEquals(fullname($USER), $preset->author);
$this->assertEquals($iscoreresult, $preset->iscore);
$this->assertEquals($CFG->version, $preset->moodleversion);
$this->assertEquals($CFG->release, $preset->moodlerelease);
$this->assertEquals($CFG->wwwroot, $preset->site);
// Check the preset is empty and hasn't settings or plugins.
$settings = $DB->get_records('adminpresets_it', ['adminpresetid' => $presetid]);
$this->assertCount(0, $settings);
$plugins = $DB->get_records('adminpresets_plug', ['adminpresetid' => $presetid]);
$this->assertCount(0, $plugins);
}
/**
* Data provider for test_create_preset().
*
* @return array
*/
public function create_preset_provider(): array {
return [
'Default values' => [
],
'Name not empty' => [
'name' => 'Preset xaxi name',
],
'Comments not empty' => [
'name' => null,
'comments' => 'This is a different comment',
],
'Name and comments not empty' => [
'name' => 'Preset with a super-nice name',
'comments' => 'This is a comment different from the previous one',
],
'Starter preset' => [
'name' => 'Starter',
'comments' => null,
'iscore' => manager::STARTER_PRESET,
'iscoreresult' => manager::STARTER_PRESET,
],
'Full preset' => [
'name' => 'Full',
'comments' => null,
'iscore' => manager::FULL_PRESET,
'iscoreresult' => manager::FULL_PRESET,
],
'Invalid iscore' => [
'name' => 'Invalid iscore value',
'comments' => null,
'iscore' => -1,
'iscoreresult' => manager::NONCORE_PRESET,
],
];
}
/**
* Test the behaviour of add_item() method.
*
* @covers ::add_item
* @dataProvider add_item_provider
*
* @param string $name Item name.
* @param string $value Item value.
* @param string|null $plugin Item plugin.
* @param string|null $advname If the item is an advanced setting, the name of the advanced setting should be specified here.
* @param string|null $advvalue If the item is an advanced setting, the value of the advanced setting should be specified here.
*/
public function test_add_item(string $name, string $value, ?string $plugin = 'none', ?string $advname = null,
?string $advvalue = null): void {
global $DB;
$this->resetAfterTest();
// Create a preset.
$presetid = helper::create_preset([]);
$this->assertEquals(1, $DB->count_records('adminpresets', ['id' => $presetid]));
// Add items.
$itemid = helper::add_item($presetid, $name, $value, $plugin, $advname, $advvalue);
// Check settings have been created.
$settings = $DB->get_records('adminpresets_it', ['adminpresetid' => $presetid]);
$this->assertCount(1, $settings);
$setting = reset($settings);
$this->assertEquals($itemid, $setting->id);
$this->assertEquals($name, $setting->name);
$this->assertEquals($value, $setting->value);
$this->assertEquals($plugin, $setting->plugin);
if ($advname) {
// Check settings have been created.
$advsettings = $DB->get_records('adminpresets_it_a', ['itemid' => $itemid]);
$this->assertCount(1, $advsettings);
$advsetting = reset($advsettings);
$this->assertEquals($advname, $advsetting->name);
$this->assertEquals($advvalue, $advsetting->value);
} else {
// Check no advanced items have been created.
$this->assertEquals(0, $DB->count_records('adminpresets_it_a', ['itemid' => $itemid]));
}
// Check no plugins have been created.
$this->assertEquals(0, $DB->count_records('adminpresets_plug', ['adminpresetid' => $presetid]));
}
/**
* Data provider for test_add_item().
*
* @return array
*/
public function add_item_provider(): array {
return [
'Setting without plugin' => [
'name' => 'settingname',
'value' => 'thisisthevalue',
],
'Setting with plugin' => [
'name' => 'settingname',
'value' => 'thisisthevalue',
'plugin' => 'pluginname',
],
'Setting with advanced item' => [
'name' => 'settingname',
'value' => 'thevalue',
'plugin' => 'pluginname',
'advname' => 'advsettingname',
'advvalue' => 'advsettingvalue',
],
];
}
/**
* Test the behaviour of add_plugin() method.
*
* @covers ::add_plugin
* @dataProvider add_plugin_provider
*
* @param string $type Plugin type.
* @param string $name Plugin name.
* @param mixed $enabled Whether the plugin will be enabled or not.
*/
public function test_add_plugin(string $type, string $name, $enabled = 0): void {
global $DB;
$this->resetAfterTest();
// Create a preset.
$presetid = helper::create_preset([]);
$this->assertEquals(1, $DB->count_records('adminpresets', ['id' => $presetid]));
// Add plugin.
$pluginid = helper::add_plugin($presetid, $type, $name, $enabled);
// Check plugin has been created.
$pluggins = $DB->get_records('adminpresets_plug', ['adminpresetid' => $presetid]);
$this->assertCount(1, $pluggins);
$plugin = reset($pluggins);
$this->assertEquals($pluginid, $plugin->id);
$this->assertEquals($type, $plugin->plugin);
$this->assertEquals($name, $plugin->name);
$this->assertEquals((int) $enabled, $plugin->enabled);
// Check no settings have been created.
$this->assertEquals(0, $DB->count_records('adminpresets_it', ['adminpresetid' => $presetid]));
}
/**
* Data provider for test_add_plugin().
*
* @return array
*/
public function add_plugin_provider(): array {
return [
'Plugin: enabled (using int)' => [
'type' => 'plugintype',
'name' => 'pluginname',
'enabled' => 1,
],
'Plugin: enabled (using bool)' => [
'type' => 'plugintype',
'name' => 'pluginname',
'enabled' => true,
],
'Plugin: disabled (using int)' => [
'type' => 'plugintype',
'name' => 'pluginname',
'enabled' => 0,
],
'Plugin: disabled (using bool)' => [
'type' => 'plugintype',
'name' => 'pluginname',
'enabled' => false,
],
'Plugin: negative int value' => [
'type' => 'plugintype',
'name' => 'pluginname',
'enabled' => -9999,
],
];
}
/**
* Test the behaviour of change_default_preset() method.
*
* @covers ::change_default_preset
* @dataProvider change_default_preset_provider
*
* @param string $preset The preset name to apply or the path to the XML to be imported and applied.
* @param array|null $settings A few settings to check (with their expected values).
* @param array|null $plugins A few module plugins to check (with their expected values for the visibility).
*/
public function test_change_default_preset(string $preset, ?array $settings = null, ?array $plugins = null): void {
$this->resetAfterTest();
$this->setAdminUser();
// We need to change some of the default values; otherwise, the full preset won't be applied, because all the settings
// and plugins are the same.
set_config('enableanalytics', '0');
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$generator->create_preset(['name' => 'Preset 1']);
$presetid = helper::change_default_preset($preset);
if (empty($settings) && empty($plugins)) {
// The preset hasn't been applied.
$this->assertNull($presetid);
} else {
// The preset has been applied. Check the settings and plugins are the expected.
$this->assertNotEmpty($presetid);
// Check the setting values have changed accordingly with the ones defined in the preset.
foreach ($settings as $settingname => $settingvalue) {
$this->assertEquals($settingvalue, get_config('core', $settingname));
}
// Check the plugins visibility have changed accordingly with the ones defined in the preset.
$enabledplugins = \core\plugininfo\mod::get_enabled_plugins();
foreach ($plugins as $pluginname => $pluginvalue) {
if ($pluginvalue) {
$this->assertArrayHasKey($pluginname, $enabledplugins);
} else {
$this->assertArrayNotHasKey($pluginname, $enabledplugins);
}
}
}
}
/**
* Data provider for test_change_default_preset().
*
* @return array
*/
public function change_default_preset_provider(): array {
return [
'Starter preset' => [
'preset' => 'starter',
'settings' => [
'enablebadges' => 0,
'enableportfolios' => 0,
],
'plugins' => [
'assign' => 1,
'chat' => 0,
'data' => 0,
'lesson' => 0,
],
],
'Full preset' => [
'preset' => 'full',
'settings' => [
'enablebadges' => 1,
'enableportfolios' => 0,
],
'plugins' => [
'assign' => 1,
'chat' => 1,
'data' => 1,
'lesson' => 1,
],
],
'Preset 1, created manually' => [
'preset' => 'Preset 1',
'settings' => [
'enablebadges' => 0,
'allowemojipicker' => 1,
],
'plugins' => [
'assign' => 1,
'glossary' => 0,
],
],
'Unexisting preset name' => [
'preset' => 'unexisting',
],
'Valid XML file' => [
'preset' => __DIR__ . '/fixtures/import_settings_plugins.xml',
'settings' => [
'allowemojipicker' => 1,
'enableportfolios' => 1,
],
'plugins' => [
'assign' => 1,
'chat' => 0,
'data' => 0,
'lesson' => 1,
],
],
'Invalid XML file' => [
'preset' => __DIR__ . '/fixtures/invalid_xml_file.xml',
],
'Unexisting XML file' => [
'preset' => __DIR__ . '/fixtures/unexisting.xml',
],
];
}
}
@@ -0,0 +1,92 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Tests for the adminpresets_admin_setting_bloglevel class.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_bloglevel
*/
class adminpresets_admin_setting_bloglevel_test extends \advanced_testcase {
/**
* Test the behaviour of save_value() method.
*
* @covers ::save_value
* @dataProvider save_value_provider
*
* @param int $settingvalue Setting value to be saved.
* @param bool $expectedsaved Whether the setting will be saved or not.
*/
public function test_save_value(int $settingvalue, bool $expectedsaved): void {
global $DB;
$this->resetAfterTest();
// Login as admin, to access all the settings.
$this->setAdminUser();
// Set the config values (to confirm they change after applying the preset).
set_config('bloglevel', BLOG_SITE_LEVEL); // All site users can see all blog entries.
// Get the setting and save the value.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$setting = $generator->get_admin_preset_setting('blog', 'bloglevel');
$result = $setting->save_value(false, $settingvalue);
// Check the result is the expected (saved when it has a different value and ignored when the value is the same).
if ($expectedsaved) {
$this->assertCount(1, $DB->get_records('config_log', ['id' => $result]));
// Specific from the save_value in adminpresets_admin_setting_bloglevel.
if ($settingvalue != 0) {
$this->assertTrue((bool) $DB->get_field('block', 'visible', ['name' => 'blog_menu']));
} else {
$this->assertFalse((bool) $DB->get_field('block', 'visible', ['name' => 'blog_menu']));
}
} else {
$this->assertFalse($result);
}
$this->assertEquals($settingvalue, get_config('core', 'bloglevel'));
}
/**
* Data provider for test_save_value().
*
* @return array
*/
public function save_value_provider(): array {
return [
'Save the bloglevel and set blog_menu block visibility to true' => [
'setttingvalue' => BLOG_USER_LEVEL,
'expectedsaved' => true,
],
'Same value to bloglevel, so it will not be saved' => [
'setttingvalue' => BLOG_SITE_LEVEL,
'expectedsaved' => false,
],
'Save the bloglevel and set blog_menu block visibility to false' => [
'setttingvalue' => 0,
'expectedsaved' => true,
],
];
}
}
@@ -0,0 +1,94 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Tests for the adminpresets_admin_setting_sitesettext class.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_admin_setting_sitesettext
*/
class adminpresets_admin_setting_sitesettext_test extends \advanced_testcase {
/**
* Test the behaviour of save_value() method.
*
* @covers ::save_value
* @dataProvider save_value_provider
*
* @param string $settingname Setting name to save.
* @param string $settingvalue Setting value to be saved.
* @param bool $expectedsaved Whether the setting will be saved or not.
*/
public function test_save_value(string $settingname, string $settingvalue, bool $expectedsaved): void {
global $DB;
$this->resetAfterTest();
// Login as admin, to access all the settings.
$this->setAdminUser();
// Get the setting and save the value.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$setting = $generator->get_admin_preset_setting('frontpagesettings', $settingname);
$result = $setting->save_value(false, $settingvalue);
// Check the result is the expected (saved when it has a different value and ignored when the value is the same).
if ($expectedsaved) {
$this->assertCount(1, $DB->get_records('config_log', ['id' => $result]));
// Specific from the save_value in adminpresets_admin_setting_sitesettext.
$sitecourse = $DB->get_record('course', ['id' => 1]);
$this->assertEquals($settingvalue, $sitecourse->{$settingname});
} else {
$this->assertFalse($result);
}
}
/**
* Data provider for test_save_value().
*
* @return array
*/
public function save_value_provider(): array {
return [
'Fullname: different value' => [
'settingname' => 'fullname',
'setttingvalue' => 'New site fullname',
'expectedsaved' => true,
],
'Fullname: same value' => [
'settingname' => 'fullname',
'setttingvalue' => 'PHPUnit test site',
'expectedsaved' => false,
],
'Summary: different value' => [
'settingname' => 'summary',
'setttingvalue' => 'This is a new site summary.',
'expectedsaved' => true,
],
'Summary: same value' => [
'settingname' => 'summary',
'setttingvalue' => '',
'expectedsaved' => false,
],
];
}
}
@@ -0,0 +1,198 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\local\setting;
/**
* Tests for the adminpresets_setting class.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\local\setting\adminpresets_setting
*/
class adminpresets_setting_test extends \advanced_testcase {
/**
* Test the behaviour of save_value() method.
*
* @covers ::save_value
* @dataProvider save_value_provider
*
* @param string $category Admin tree where the setting belongs.
* @param string $settingplugin Plugin where the setting belongs.
* @param string $settingname Setting name.
* @param string $settingvalue Setting value to be saved.
* @param bool $expectedsaved Whether the setting will be saved or not.
*/
public function test_save_value(string $category, string $settingplugin, string $settingname, string $settingvalue,
bool $expectedsaved): void {
global $DB;
$this->resetAfterTest();
// Login as admin, to access all the settings.
$this->setAdminUser();
// Set the config values (to confirm they change after applying the preset).
set_config('enablebadges', 1);
set_config('mediawidth', '640', 'mod_lesson');
// The expected setting name in the admin tree is $plugin.$name when plugin is not core.
if ($settingplugin !== 'core') {
$name = $settingplugin . $settingname;
} else {
$name = $settingname;
}
// Get the setting and save the value.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$setting = $generator->get_admin_preset_setting($category, $name);
$result = $setting->save_value(false, $settingvalue);
// Check the result is the expected (saved when it has a different value and ignored when the value is the same).
if ($expectedsaved) {
$this->assertCount(1, $DB->get_records('config_log', ['id' => $result]));
} else {
$this->assertFalse($result);
}
$this->assertEquals($settingvalue, get_config($settingplugin, $settingname));
}
/**
* Data provider for test_save_value().
*
* @return array
*/
public function save_value_provider(): array {
return [
'Core setting with the same value is not saved' => [
'category' => 'optionalsubsystems',
'settingplugin' => 'core',
'settingname' => 'enablebadges',
'setttingvalue' => '1',
'expectedsaved' => false,
],
'Core setting with a different value is saved' => [
'category' => 'optionalsubsystems',
'settingplugin' => 'core',
'settingname' => 'enablebadges',
'setttingvalue' => '0',
'expectedsaved' => true,
],
'Plugin setting with the same value is not saved' => [
'category' => 'modsettinglesson',
'settingplugin' => 'mod_lesson',
'settingname' => 'mediawidth',
'setttingvalue' => '640',
'expectedsaved' => false,
],
'Plugin setting with different value is saved' => [
'category' => 'modsettinglesson',
'settingplugin' => 'mod_lesson',
'settingname' => 'mediawidth',
'setttingvalue' => '900',
'expectedsaved' => true,
],
];
}
/**
* Test the behaviour of save_attributes_values() method.
*
* @covers ::save_attributes_values
* @dataProvider save_attributes_values_provider
*
* @param string $category Admin tree where the setting belongs.
* @param string $settingplugin Plugin where the setting belongs.
* @param string $settingname Setting name.
* @param string|null $advsettingname Advanced setting name.
* @param string $advsettingvalue Advanced setting value to be saved.
* @param bool $expectedsaved Whether the setting will be saved or not.
*/
public function test_save_attributes_values(string $category, string $settingplugin, string $settingname,
?string $advsettingname, string $advsettingvalue, bool $expectedsaved): void {
global $DB;
$this->resetAfterTest();
// Login as admin, to access all the settings.
$this->setAdminUser();
// Set the config values (to confirm they change after applying the preset).
set_config('maxanswers_adv', '1', 'mod_lesson');
// The expected setting name in the admin tree is $plugin.$name when plugin is not core.
if ($settingplugin !== 'core') {
$name = $settingplugin . $settingname;
} else {
$name = $settingname;
}
// Get the setting and save the value.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$setting = $generator->get_admin_preset_setting($category, $name);
if ($advsettingname) {
$setting->set_attribute_value($advsettingname, $advsettingvalue);
}
$result = $setting->save_attributes_values();
// Check the result is the expected (saved when it has a different value and ignored when the value is the same).
if ($expectedsaved) {
$this->assertCount(1, $result);
$configlog = reset($result);
$this->assertCount(1, $DB->get_records('config_log', ['id' => $configlog]));
} else {
$this->assertFalse($result);
}
if ($advsettingname) {
$this->assertEquals($advsettingvalue, get_config($settingplugin, $advsettingname));
}
}
/**
* Data provider for test_save_attributes_values().
*
* @return array
*/
public function save_attributes_values_provider(): array {
return [
'Plugin setting with the same value is not saved' => [
'category' => 'modsettinglesson',
'settingplugin' => 'mod_lesson',
'settingname' => 'maxanswers',
'advsettingname' => 'maxanswers_adv',
'advsetttingvalue' => '1',
'expectedsaved' => false,
],
'Plugin setting with different value is saved' => [
'category' => 'modsettinglesson',
'settingplugin' => 'mod_lesson',
'settingname' => 'maxanswers',
'advsettingname' => 'maxanswers_adv',
'advsetttingvalue' => '0',
'expectedsaved' => true,
],
'Plugin setting without advanced attributes are not saved' => [
'category' => 'modsettinglesson',
'settingplugin' => 'mod_lesson',
'settingname' => 'maxanswers',
'advsettingname' => null,
'advsetttingvalue' => '0',
'expectedsaved' => false,
],
];
}
}
+771
View File
@@ -0,0 +1,771 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets;
use stdClass;
/**
* Tests for the manager class.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\manager
*/
class manager_test extends \advanced_testcase {
/**
* Test the behaviour of protected get_site_settings method.
*
* @covers ::get_site_settings
* @covers ::get_settings
*/
public function test_manager_get_site_settings(): void {
global $DB;
$this->resetAfterTest();
// Login as admin, to access all the settings.
$this->setAdminUser();
$manager = new manager();
$result = $manager->get_site_settings();
// Check fullname is set into the none category.
$this->assertInstanceOf(
'\core_adminpresets\local\setting\adminpresets_admin_setting_sitesettext',
$result['none']['fullname']
);
$this->assertEquals('PHPUnit test site', $result['none']['fullname']->get_value());
// Check some of the config setting is present (they should be stored in the "none" category).
$this->assertInstanceOf(
'\core_adminpresets\local\setting\adminpresets_admin_setting_configcheckbox',
$result['none']['enablecompletion']
);
$this->assertEquals(1, $result['none']['enablecompletion']->get_value());
// Check some of the plugin config settings is present.
$this->assertInstanceOf(
'\core_adminpresets\local\setting\adminpresets_admin_setting_configtext',
$result['folder']['maxsizetodownload']
);
$this->assertEquals(0, $result['folder']['maxsizetodownload']->get_value());
// Set some of these values.
$sitecourse = new stdClass();
$sitecourse->id = 1;
$sitecourse->fullname = 'New site fullname';
$DB->update_record('course', $sitecourse);
set_config('enablecompletion', 0);
set_config('maxsizetodownload', 101, 'folder');
// Check the new values are returned properly.
$result = $manager->get_site_settings();
// Site fullname.
$this->assertInstanceOf(
'\core_adminpresets\local\setting\adminpresets_admin_setting_sitesettext',
$result['none']['fullname']
);
$this->assertEquals($sitecourse->fullname, $result['none']['fullname']->get_value());
// Config setting.
$this->assertInstanceOf(
'\core_adminpresets\local\setting\adminpresets_admin_setting_configcheckbox',
$result['none']['enablecompletion']
);
$this->assertEquals(0, $result['none']['enablecompletion']->get_value());
// Plugin config settting.
$this->assertInstanceOf(
'\core_adminpresets\local\setting\adminpresets_admin_setting_configtext',
$result['folder']['maxsizetodownload']
);
$this->assertEquals(101, $result['folder']['maxsizetodownload']->get_value());
}
/**
* Test the behaviour of protected get_setting method.
*
* @covers ::get_setting
* @covers ::get_settings_class
*/
public function test_manager_get_setting(): void {
$this->resetAfterTest();
// Login as admin, to access all the settings.
$this->setAdminUser();
$adminroot = admin_get_root();
// Check the adminpresets_xxxxx class is created properly when it exists.
$settingpage = $adminroot->locate('optionalsubsystems');
$settingdata = $settingpage->settings->enablebadges;
$manager = new manager();
$result = $manager->get_setting($settingdata, '');
$this->assertInstanceOf('\core_adminpresets\local\setting\adminpresets_admin_setting_configcheckbox', $result);
$this->assertNotEquals('core_adminpresets\local\setting\adminpresets_setting', get_class($result));
// Check the mapped class is returned when no specific class exists and it exists in the mappings array.
$settingpage = $adminroot->locate('h5psettings');
$settingdata = $settingpage->settings->h5plibraryhandler;;
$result = $manager->get_setting($settingdata, '');
$this->assertInstanceOf('\core_adminpresets\local\setting\adminpresets_admin_setting_configselect', $result);
$this->assertNotEquals(
'core_adminpresets\local\setting\adminpresets_admin_settings_h5plib_handler_select',
get_class($result)
);
// Check the mapped class is returned when no specific class exists and it exists in the mappings array.
$settingpage = $adminroot->locate('modsettingquiz');
$settingdata = $settingpage->settings->quizbrowsersecurity;;
$result = $manager->get_setting($settingdata, '');
$this->assertInstanceOf('\mod_quiz\adminpresets\adminpresets_mod_quiz_admin_setting_browsersecurity', $result);
$this->assertNotEquals('core_adminpresets\local\setting\adminpresets_setting', get_class($result));
// Check the adminpresets_setting class is returned when no specific class exists.
$settingpage = $adminroot->locate('managecustomfields');
$settingdata = $settingpage->settings->customfieldsui;;
$result = $manager->get_setting($settingdata, '');
$this->assertInstanceOf('\core_adminpresets\local\setting\adminpresets_setting', $result);
$this->assertEquals('core_adminpresets\local\setting\adminpresets_setting', get_class($result));
}
/**
* Test the behaviour of apply_preset() method when the given presetid doesn't exist.
*
* @covers ::apply_preset
*/
public function test_apply_preset_unexisting_preset(): void {
$this->resetAfterTest();
$this->setAdminUser();
// Create some presets.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid = $generator->create_preset();
// Unexisting preset identifier.
$unexistingid = $presetid * 2;
$manager = new manager();
$this->expectException(\moodle_exception::class);
$manager->apply_preset($unexistingid);
}
/**
* Test the behaviour of apply_preset() method.
*
* @covers ::apply_preset
*/
public function test_apply_preset(): void {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
// Create a preset.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid = $generator->create_preset();
$currentpresets = $DB->count_records('adminpresets');
$currentitems = $DB->count_records('adminpresets_it');
$currentadvitems = $DB->count_records('adminpresets_it_a');
$currentplugins = $DB->count_records('adminpresets_plug');
$currentapppresets = $DB->count_records('adminpresets_app');
$currentappitems = $DB->count_records('adminpresets_app_it');
$currentappadvitems = $DB->count_records('adminpresets_app_it_a');
$currentappplugins = $DB->count_records('adminpresets_app_plug');
// Set the config values (to confirm they change after applying the preset).
set_config('enablebadges', 1);
set_config('allowemojipicker', 1);
set_config('mediawidth', '640', 'mod_lesson');
set_config('maxanswers', '5', 'mod_lesson');
set_config('maxanswers_adv', '1', 'mod_lesson');
set_config('enablecompletion', 1);
set_config('usecomments', 0);
// Call the apply_preset method.
$manager = new manager();
$manager->apply_preset($presetid);
// Check the preset applied has been added to database.
$this->assertCount($currentapppresets + 1, $DB->get_records('adminpresets_app'));
// Applied items: enablebadges@none, mediawitdh@mod_lesson and maxanswers@@mod_lesson.
$this->assertCount($currentappitems + 3, $DB->get_records('adminpresets_app_it'));
// Applied advanced items: maxanswers_adv@mod_lesson.
$this->assertCount($currentappadvitems + 1, $DB->get_records('adminpresets_app_it_a'));
// Applied plugins: enrol_guest and mod_glossary.
$this->assertCount($currentappplugins + 2, $DB->get_records('adminpresets_app_plug'));
// Check no new preset has been created.
$this->assertCount($currentpresets, $DB->get_records('adminpresets'));
$this->assertCount($currentitems, $DB->get_records('adminpresets_it'));
$this->assertCount($currentadvitems, $DB->get_records('adminpresets_it_a'));
$this->assertCount($currentplugins, $DB->get_records('adminpresets_plug'));
// Check the setting values have changed accordingly with the ones defined in the preset.
$this->assertEquals(0, get_config('core', 'enablebadges'));
$this->assertEquals(900, get_config('mod_lesson', 'mediawidth'));
$this->assertEquals(2, get_config('mod_lesson', 'maxanswers'));
$this->assertEquals(0, get_config('mod_lesson', 'maxanswers_adv'));
// These settings will never change.
$this->assertEquals(1, get_config('core', 'allowemojipicker'));
$this->assertEquals(1, get_config('core', 'enablecompletion'));
$this->assertEquals(0, get_config('core', 'usecomments'));
// Check the plugins visibility have changed accordingly with the ones defined in the preset.
$enabledplugins = \core\plugininfo\enrol::get_enabled_plugins();
$this->assertArrayNotHasKey('guest', $enabledplugins);
$this->assertArrayHasKey('manual', $enabledplugins);
$enabledplugins = \core\plugininfo\mod::get_enabled_plugins();
$this->assertArrayNotHasKey('glossary', $enabledplugins);
$this->assertArrayHasKey('assign', $enabledplugins);
$enabledplugins = \core\plugininfo\qtype::get_enabled_plugins();
$this->assertArrayHasKey('truefalse', $enabledplugins);
// Check the presetid has been also stored in the lastpresetapplied config setting.
$this->assertEquals($presetid, get_config('adminpresets', 'lastpresetapplied'));
// Call apply_preset as a simulation, so it shouldn't be applied and lastpresetapplied should still be $presetid.
$presetid2 = $generator->create_preset();
$manager->apply_preset($presetid2, true);
$this->assertEquals($presetid, get_config('adminpresets', 'lastpresetapplied'));
}
/**
* Test the behaviour of export_preset() method.
*
* @covers ::export_preset
* @dataProvider export_preset_provider
*
* @param bool $includesensible Whether the sensible settings should be exported too or not.
* @param string $presetname Preset name.
*/
public function test_export_preset(bool $includesensible = false, string $presetname = 'Export 1'): void {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
// Get current presets and items.
$currentpresets = $DB->count_records('adminpresets');
$currentadvitems = $DB->count_records('adminpresets_it_a');
// Initialise some settings (to compare their values have been exported as expected).
set_config('recaptchapublickey', 'abcde');
set_config('enablebadges', '0');
set_config('mediawidth', '900', 'mod_lesson');
set_config('maxanswers', '2', 'mod_lesson');
set_config('maxanswers_adv', '0', 'mod_lesson');
set_config('defaultfeedback', '0', 'mod_lesson');
set_config('defaultfeedback_adv', '1', 'mod_lesson');
// Prepare the data to export preset.
$data = [
'name' => $presetname,
'comments' => ['text' => 'This is a presets for testing export'],
'author' => 'Super-Girl',
'includesensiblesettings' => $includesensible,
];
// Call the method to be tested.
$manager = new manager();
list($presetid, $settingsfound, $pluginsfound) = $manager->export_preset((object) $data);
// Check the preset record has been created.
$presets = $DB->get_records('adminpresets');
$this->assertCount($currentpresets + 1, $presets);
$this->assertArrayHasKey($presetid, $presets);
$preset = $presets[$presetid];
$this->assertEquals($presetname, $preset->name);
$this->assertEquals(manager::NONCORE_PRESET, $preset->iscore);
// Check the preset includes settings and plugins.
$this->assertTrue($settingsfound);
$this->assertTrue($pluginsfound);
// Check the items, advanced attributes and plugins have been created.
$this->assertGreaterThan(0, $DB->count_records('adminpresets_it', ['adminpresetid' => $presetid]));
$this->assertGreaterThan($currentadvitems, $DB->count_records('adminpresets_it_a'));
$this->assertGreaterThan(0, $DB->count_records('adminpresets_plug', ['adminpresetid' => $presetid]));
// Check settings have been created with the expected values.
$params = ['adminpresetid' => $presetid, 'plugin' => 'none', 'name' => 'enablebadges'];
$setting = $DB->get_record('adminpresets_it', $params);
$this->assertEquals('0', $setting->value);
$params = ['adminpresetid' => $presetid, 'plugin' => 'mod_lesson', 'name' => 'mediawidth'];
$setting = $DB->get_record('adminpresets_it', $params);
$this->assertEquals('900', $setting->value);
$params = ['adminpresetid' => $presetid, 'plugin' => 'mod_lesson', 'name' => 'maxanswers'];
$setting = $DB->get_record('adminpresets_it', $params);
$this->assertEquals('2', $setting->value);
$params = ['itemid' => $setting->id, 'name' => 'maxanswers_adv'];
$setting = $DB->get_record('adminpresets_it_a', $params);
$this->assertEquals('0', $setting->value);
$params = ['adminpresetid' => $presetid, 'plugin' => 'mod_lesson', 'name' => 'defaultfeedback'];
$setting = $DB->get_record('adminpresets_it', $params);
$this->assertEquals('0', $setting->value);
$params = ['itemid' => $setting->id, 'name' => 'defaultfeedback_adv'];
$setting = $DB->get_record('adminpresets_it_a', $params);
$this->assertEquals('1', $setting->value);
// Check plugins have been created with the expected values.
$manager = \core_plugin_manager::instance();
$plugintype = 'enrol';
$plugins = $manager->get_present_plugins($plugintype);
$enabledplugins = $manager->get_enabled_plugins($plugintype);
foreach ($plugins as $pluginname => $unused) {
$params = ['adminpresetid' => $presetid, 'plugin' => $plugintype, 'name' => $pluginname];
$plugin = $DB->get_record('adminpresets_plug', $params);
$enabled = (!empty($enabledplugins) && array_key_exists($pluginname, $enabledplugins));
$this->assertEquals($enabled, (bool) $plugin->enabled);
}
// Check whether sensible settings have been exported or not.
$params = ['adminpresetid' => $presetid, 'plugin' => 'none', 'name' => 'recaptchapublickey'];
$recaptchasetting = $DB->get_record('adminpresets_it', $params);
$params = ['adminpresetid' => $presetid, 'plugin' => 'none', 'name' => 'cronremotepassword'];
$cronsetting = $DB->get_record('adminpresets_it', $params);
if ($includesensible) {
$this->assertEquals('abcde', $recaptchasetting->value);
$this->assertNotFalse($cronsetting);
} else {
$this->assertFalse($recaptchasetting);
$this->assertFalse($cronsetting);
}
}
/**
* Data provider for test_export_preset().
*
* @return array
*/
public function export_preset_provider(): array {
return [
'Export settings and plugins, excluding sensible' => [
'includesensible' => false,
],
'Export settings and plugins, including sensible' => [
'includesensible' => true,
],
'Export settings and plugins, with Starter name (it should not be marked as core)' => [
'includesensible' => false,
'presetname' => 'Starter',
],
'Export settings and plugins, with Full name (it should not be marked as core)' => [
'includesensible' => false,
'presetname' => 'Full',
],
];
}
/**
* Test the behaviour of download_preset() method, when the given presetid doesn't exist.
*
* @covers ::download_preset
*/
public function test_download_unexisting_preset(): void {
$this->resetAfterTest();
$this->setAdminUser();
// Create some presets.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid = $generator->create_preset();
// Unexisting preset identifier.
$unexistingid = $presetid * 2;
$manager = new manager();
$this->expectException(\moodle_exception::class);
$manager->download_preset($unexistingid);
}
/**
* Test the behaviour of import_preset() method.
*
* @dataProvider import_preset_provider
* @covers ::import_preset
*
* @param string $filecontents File content to import.
* @param bool $expectedpreset Whether the preset should be created or not.
* @param bool $expectedsettings Whether settings will be created or not.
* @param bool $expectedplugins Whether plugins will be created or not.
* @param bool $expecteddebugging Whether debugging message will be thrown or not.
* @param string|null $expectedexception Expected exception class (if that's the case).
* @param string|null $expectedpresetname Expected preset name.
*/
public function test_import_preset(string $filecontents, bool $expectedpreset, bool $expectedsettings = false,
bool $expectedplugins = false, bool $expecteddebugging = false, string $expectedexception = null,
string $expectedpresetname = 'Imported preset'): void {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
$currentpresets = $DB->count_records('adminpresets');
$currentitems = $DB->count_records('adminpresets_it');
$currentadvitems = $DB->count_records('adminpresets_it_a');
// Call the method to be tested.
$manager = new manager();
try {
list($xml, $preset, $settingsfound, $pluginsfound) = $manager->import_preset($filecontents);
} catch (\exception $e) {
if ($expectedexception) {
$this->assertInstanceOf($expectedexception, $e);
}
} finally {
if ($expecteddebugging) {
$this->assertDebuggingCalled();
}
if ($expectedpreset) {
// Check the preset record has been created.
$presets = $DB->get_records('adminpresets');
$this->assertCount($currentpresets + 1, $presets);
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$this->assertArrayHasKey($preset->id, $presets);
$preset = $presets[$preset->id];
$this->assertEquals($expectedpresetname, $preset->name);
$this->assertEquals('http://demo.moodle', $preset->site);
$this->assertEquals('Ada Lovelace', $preset->author);
$this->assertEquals(manager::NONCORE_PRESET, $preset->iscore);
if ($expectedsettings) {
// Check the items have been created.
$items = $DB->get_records('adminpresets_it', ['adminpresetid' => $preset->id]);
$this->assertCount(4, $items);
$presetitems = [
'none' => [
'enablebadges' => 0,
'enableportfolios' => 1,
'allowemojipicker' => 1,
],
'mod_lesson' => [
'mediawidth' => 900,
'maxanswers' => 2,
],
];
foreach ($items as $item) {
$this->assertArrayHasKey($item->name, $presetitems[$item->plugin]);
$this->assertEquals($presetitems[$item->plugin][$item->name], $item->value);
}
// Check the advanced attributes have been created.
$advitems = $DB->get_records('adminpresets_it_a');
$this->assertCount($currentadvitems + 1, $advitems);
$advitemfound = false;
foreach ($advitems as $advitem) {
if ($advitem->name == 'maxanswers_adv') {
$this->assertEmpty($advitem->value);
$advitemfound = true;
}
}
$this->assertTrue($advitemfound);
}
if ($expectedplugins) {
// Check the plugins have been created.
$plugins = $DB->get_records('adminpresets_plug', ['adminpresetid' => $preset->id]);
$this->assertCount(6, $plugins);
$presetplugins = [
'atto' => [
'html' => 1,
],
'block' => [
'html' => 0,
'activity_modules' => 1,
],
'mod' => [
'chat' => 0,
'data' => 0,
'lesson' => 1,
],
];
foreach ($plugins as $plugin) {
$this->assertArrayHasKey($plugin->name, $presetplugins[$plugin->plugin]);
$this->assertEquals($presetplugins[$plugin->plugin][$plugin->name], $plugin->enabled);
}
}
} else {
// Check the preset nor the items are not created.
$this->assertCount($currentpresets, $DB->get_records('adminpresets'));
$this->assertCount($currentitems, $DB->get_records('adminpresets_it'));
$this->assertCount($currentadvitems, $DB->get_records('adminpresets_it_a'));
}
}
}
/**
* Data provider for test_import_preset().
*
* @return array
*/
public function import_preset_provider(): array {
return [
'Import settings from an empty file' => [
'filecontents' => '',
'expectedpreset' => false,
],
'Import settings and plugins from a valid XML file' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_settings_plugins.xml'),
'expectedpreset' => true,
'expectedsettings' => true,
'expectedplugins' => true,
],
'Import only settings from a valid XML file' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_settings.xml'),
'expectedpreset' => true,
'expectedsettings' => true,
'expectedplugins' => false,
],
'Import settings and plugins from a valid XML file with Starter name, which will be marked as non-core' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_starter_name.xml'),
'expectedpreset' => true,
'expectedsettings' => true,
'expectedplugins' => true,
'expecteddebugging' => false,
'expectedexception' => null,
'expectedpresetname' => 'Starter',
],
'Import settings from an invalid XML file' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/invalid_xml_file.xml'),
'expectedpreset' => false,
'expectedsettings' => false,
'expectedplugins' => false,
'expecteddebugging' => false,
'expectedexception' => \Exception::class,
],
'Import unexisting settings category' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/unexisting_category.xml'),
'expectedpreset' => false,
'expectedsettings' => false,
'expectedplugins' => false,
],
'Import unexisting setting' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/unexisting_setting.xml'),
'expectedpreset' => false,
'expectedsettings' => false,
'expectedplugins' => false,
'expecteddebugging' => true,
],
'Import valid settings with one unexisting setting too' => [
'filecontents' => file_get_contents(__DIR__ . '/fixtures/import_settings_with_unexisting_setting.xml'),
'expectedpreset' => true,
'expectedsettings' => false,
'expectedplugins' => false,
'expecteddebugging' => true,
],
];
}
/**
* Test the behaviour of delete_preset() method when the preset id doesn't exist.
*
* @covers ::delete_preset
*/
public function test_delete_preset_unexisting_preset(): void {
$this->resetAfterTest();
$this->setAdminUser();
// Create some presets.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid = $generator->create_preset(['name' => 'Preset 1']);
// Unexisting preset identifier.
$unexistingid = $presetid * 2;
$manager = new manager();
$this->expectException(\moodle_exception::class);
$manager->delete_preset($unexistingid);
}
/**
* Test the behaviour of delete_preset() method.
*
* @covers ::delete_preset
*/
public function test_delete_preset(): void {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
// Create some presets.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid1 = $generator->create_preset(['name' => 'Preset 1', 'applypreset' => true]);
$presetid2 = $generator->create_preset(['name' => 'Preset 2']);
$currentpresets = $DB->count_records('adminpresets');
$currentitems = $DB->count_records('adminpresets_it');
$currentadvitems = $DB->count_records('adminpresets_it_a');
$currentplugins = $DB->count_records('adminpresets_plug');
// Only preset1 has been applied.
$this->assertCount(1, $DB->get_records('adminpresets_app'));
// Only the preset1 settings that have changed: enablebadges, mediawidth and maxanswers.
$this->assertCount(3, $DB->get_records('adminpresets_app_it'));
// Only the preset1 advanced settings that have changed: maxanswers_adv.
$this->assertCount(1, $DB->get_records('adminpresets_app_it_a'));
// Only the preset1 plugins that have changed: enrol_guest and mod_glossary.
$this->assertCount(2, $DB->get_records('adminpresets_app_plug'));
// Call the method to be tested.
$manager = new manager();
$manager->delete_preset($presetid1);
// Check the preset data has been removed.
$presets = $DB->get_records('adminpresets');
$this->assertCount($currentpresets - 1, $presets);
$preset = reset($presets);
$this->assertArrayHasKey($presetid2, $presets);
// Check preset items.
$this->assertCount($currentitems - 4, $DB->get_records('adminpresets_it'));
$this->assertCount(0, $DB->get_records('adminpresets_it', ['adminpresetid' => $presetid1]));
// Check preset advanced items.
$this->assertCount($currentadvitems - 1, $DB->get_records('adminpresets_it_a'));
// Check preset plugins.
$this->assertCount($currentplugins - 3, $DB->get_records('adminpresets_plug'));
$this->assertCount(0, $DB->get_records('adminpresets_plug', ['adminpresetid' => $presetid1]));
// Check preset applied tables are empty now.
$this->assertCount(0, $DB->get_records('adminpresets_app'));
$this->assertCount(0, $DB->get_records('adminpresets_app_it'));
$this->assertCount(0, $DB->get_records('adminpresets_app_it_a'));
$this->assertCount(0, $DB->get_records('adminpresets_app_plug'));
}
/**
* Test the behaviour of revert_preset() method when the preset applied id doesn't exist.
*
* @covers ::revert_preset
*/
public function test_revert_preset_unexisting_presetapp(): void {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
// Create a preset and apply it.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid = $generator->create_preset(['applypreset' => true]);
$presetappid = $DB->get_field('adminpresets_app', 'id', ['adminpresetid' => $presetid]);
// Unexisting applied preset identifier.
$unexistingid = $presetappid * 2;
$manager = new manager();
$this->expectException(\moodle_exception::class);
$manager->revert_preset($unexistingid);
}
/**
* Test the behaviour of revert_preset() method.
*
* @covers ::revert_preset
*/
public function test_revert_preset(): void {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
// Set the config values (to confirm they change after applying the preset).
set_config('enablebadges', 1);
set_config('allowemojipicker', 1);
set_config('mediawidth', '640', 'mod_lesson');
set_config('maxanswers', '5', 'mod_lesson');
set_config('maxanswers_adv', '1', 'mod_lesson');
set_config('enablecompletion', 1);
set_config('usecomments', 0);
// Create a preset and apply it.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$presetid = $generator->create_preset(['applypreset' => true]);
$presetappid = $DB->get_field('adminpresets_app', 'id', ['adminpresetid' => $presetid]);
$currentpresets = $DB->count_records('adminpresets');
$currentitems = $DB->count_records('adminpresets_it');
$currentadvitems = $DB->count_records('adminpresets_it_a');
$currentplugins = $DB->count_records('adminpresets_plug');
$this->assertCount(1, $DB->get_records('adminpresets_app'));
$this->assertCount(3, $DB->get_records('adminpresets_app_it'));
$this->assertCount(1, $DB->get_records('adminpresets_app_it_a'));
$this->assertCount(2, $DB->get_records('adminpresets_app_plug'));
// Check the setttings have changed accordingly after applying the preset.
$this->assertEquals(0, get_config('core', 'enablebadges'));
$this->assertEquals(900, get_config('mod_lesson', 'mediawidth'));
$this->assertEquals(2, get_config('mod_lesson', 'maxanswers'));
$this->assertEquals(1, get_config('core', 'allowemojipicker'));
$this->assertEquals(1, get_config('core', 'enablecompletion'));
$this->assertEquals(0, get_config('core', 'usecomments'));
// Check the plugins visibility have changed accordingly with the ones defined in the preset.
$enabledplugins = \core\plugininfo\enrol::get_enabled_plugins();
$this->assertArrayNotHasKey('guest', $enabledplugins);
$enabledplugins = \core\plugininfo\mod::get_enabled_plugins();
$this->assertArrayNotHasKey('glossary', $enabledplugins);
$enabledplugins = \core\plugininfo\qtype::get_enabled_plugins();
$this->assertArrayHasKey('truefalse', $enabledplugins);
// Call the method to be tested.
$manager = new manager();
list($presetapp, $rollback, $failures) = $manager->revert_preset($presetappid);
// Check the preset applied has been reverted (so the records in _appXX tables have been removed).
$this->assertNotEmpty($presetapp);
$this->assertNotEmpty($rollback);
$this->assertEmpty($failures);
$this->assertCount(0, $DB->get_records('adminpresets_app'));
$this->assertCount(0, $DB->get_records('adminpresets_app_it'));
$this->assertCount(0, $DB->get_records('adminpresets_app_it_a'));
$this->assertCount(0, $DB->get_records('adminpresets_app_plug'));
// Check the preset data hasn't changed.
$this->assertCount($currentpresets, $DB->get_records('adminpresets'));
$this->assertCount($currentitems, $DB->get_records('adminpresets_it'));
$this->assertCount($currentadvitems, $DB->get_records('adminpresets_it_a'));
$this->assertCount($currentplugins, $DB->get_records('adminpresets_plug'));
// Check the setting values have been reverted accordingly.
$this->assertEquals(1, get_config('core', 'enablebadges'));
$this->assertEquals(640, get_config('mod_lesson', 'mediawidth'));
$this->assertEquals(5, get_config('mod_lesson', 'maxanswers'));
$this->assertEquals(1, get_config('mod_lesson', 'maxanswers_adv'));
// These settings won't change, regardless if they are posted to the form.
$this->assertEquals(1, get_config('core', 'allowemojipicker'));
$this->assertEquals(1, get_config('core', 'enablecompletion'));
$this->assertEquals(0, get_config('core', 'usecomments'));
// Check the plugins visibility have been reverted accordingly.
$enabledplugins = \core\plugininfo\enrol::get_enabled_plugins();
$this->assertArrayHasKey('guest', $enabledplugins);
$enabledplugins = \core\plugininfo\mod::get_enabled_plugins();
$this->assertArrayHasKey('glossary', $enabledplugins);
// This plugin won't change (because it had the same value than before the preset was applied).
$enabledplugins = \core\plugininfo\qtype::get_enabled_plugins();
$this->assertArrayHasKey('truefalse', $enabledplugins);
}
}
@@ -0,0 +1,170 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
namespace core_adminpresets\privacy;
use context_system;
use context_user;
use core_privacy\local\metadata\collection;
use core_privacy\tests\provider_testcase;
/**
* Tests for the privacy provider class.
*
* @package core_adminpresets
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \core_adminpresets\privacy\provider
*/
class privacy_provider_test extends provider_testcase {
/**
* Test for provider::get_metadata().
* @covers ::get_metadata
*/
public function test_get_metadata() {
$collection = new collection('core_adminpresets');
$newcollection = provider::get_metadata($collection);
$itemcollection = $newcollection->get_collection();
$this->assertCount(2, $itemcollection);
// The expected metadata fields are covered by test_metadata_provider() in privacy/tests/provider_test.php.
}
/**
* Test for provider::get_contexts_for_userid() doesn't return any context.
* @covers ::get_contexts_for_userid
*/
public function test_get_contexts_for_userid() {
global $USER;
$this->resetAfterTest();
$this->setAdminUser();
// Create a preset.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$generator->create_preset();
$contextlist = provider::get_contexts_for_userid($USER->id);
$this->assertEmpty($contextlist);
}
/**
* Test for provider::get_users_in_context() doesn't return any user.
* @covers ::get_users_in_context
*/
public function test_get_users_in_context() {
global $USER;
$this->resetAfterTest();
$this->setAdminUser();
// Create a preset.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$generator->create_preset();
$usercontext = context_user::instance($USER->id);
$userlist = new \core_privacy\local\request\userlist($usercontext, 'core_adminpresets');
\core_message\privacy\provider::get_users_in_context($userlist);
$this->assertEmpty($userlist->get_userids());
}
/**
* Test for provider::export_user_data().
* @covers ::export_user_data
*/
public function test_export_user_data() {
global $USER;
$this->resetAfterTest();
$this->setAdminUser();
// Create a preset.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$generator->create_preset();
// Check data is not exported in user context.
$usercontext = context_user::instance($USER->id);
$this->export_context_data_for_user($USER->id, $usercontext, 'core_adminpresets');
$writer = \core_privacy\local\request\writer::with_context($usercontext);
$this->assertEmpty($writer->get_data([get_string('siteadminpresetspluginname', 'core_adminpresets')]));
$this->assertEmpty($writer->get_all_metadata([]));
$this->assertEmpty($writer->get_files([]));
// Check data is not exported in system context either.
$systemcontext = context_system::instance();
$this->export_context_data_for_user($USER->id, $systemcontext, 'core_adminpresets');
$writer = \core_privacy\local\request\writer::with_context($systemcontext);
$this->assertEmpty($writer->get_data([get_string('siteadminpresetspluginname', 'core_adminpresets')]));
$this->assertEmpty($writer->get_all_metadata([]));
$this->assertEmpty($writer->get_files([]));
}
/**
* Test for provider::delete_data_for_all_users_in_context().
* @covers ::delete_data_for_all_users_in_context
*/
public function test_delete_data_for_all_users_in_context() {
global $DB, $USER;
$this->resetAfterTest();
$this->setAdminUser();
$currentpresets = $DB->count_records('adminpresets');
// Create a preset.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$generator->create_preset();
$this->assertEquals($currentpresets + 1, $DB->count_records('adminpresets'));
$usercontext = context_user::instance($USER->id);
provider::delete_data_for_all_users_in_context($usercontext);
// Confirm the presets haven't been removed.
$this->assertEquals($currentpresets + 1, $DB->count_records('adminpresets'));
}
/**
* Test for provider::delete_data_for_user().
* @covers ::delete_data_for_user
*/
public function test_delete_data_for_user() {
global $DB, $USER;
$this->resetAfterTest();
$this->setAdminUser();
$currentpresets = $DB->count_records('adminpresets');
// Create a preset.
$generator = $this->getDataGenerator()->get_plugin_generator('core_adminpresets');
$generator->create_preset();
$this->assertEquals($currentpresets + 1, $DB->count_records('adminpresets'));
$usercontext = context_user::instance($USER->id);
$contextlist = new \core_privacy\local\request\approved_contextlist($USER, 'core_adminpresets', [$usercontext->id]);
provider::delete_data_for_user($contextlist);
// Confirm the presets haven't been removed.
$this->assertEquals($currentpresets + 1, $DB->count_records('adminpresets'));
}
}
+2 -3
View File
@@ -38,12 +38,11 @@ $form = new core_admin\form\purge_caches(null, ['returnurl' => $returnurl]);
if ($data = $form->get_data()) {
// Valid request. Purge, and redirect the user back to where they came from.
$selected = $data->purgeselectedoptions;
purge_caches($selected);
if (isset($data->all)) {
purge_caches();
$message = get_string('purgecachesfinished', 'admin');
} else {
purge_caches($data->purgeselectedoptions);
$message = get_string('purgeselectedcachesfinished', 'admin');
}
+72
View File
@@ -0,0 +1,72 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Question bank plugin settings.
*
* @package core
* @subpackage questionbank
* @copyright 2021 Catalyst IT Australia Pty Ltd
* @author Safat Shahin <safatshahin@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
use qbank_columnsortorder\column_manager;
$action = required_param('action', PARAM_ALPHANUMEXT);
$name = required_param('name', PARAM_PLUGIN);
$syscontext = context_system::instance();
$PAGE->set_url('/admin/qbankplugins.php');
$PAGE->set_context($syscontext);
require_admin();
require_sesskey();
$return = new moodle_url('/admin/settings.php', ['section' => 'manageqbanks']);
$plugins = core_plugin_manager::instance()->get_plugins_of_type('qbank');
$sortorder = array_flip(array_keys($plugins));
if (!isset($plugins[$name])) {
throw new moodle_exception('qbanknotfound', 'question', $return, $name);
}
$plugintypename = $plugins[$name]->type . '_' . $plugins[$name]->name;
$columnsortordermanager = new column_manager();
switch ($action) {
case 'disable':
if ($plugins[$name]->is_enabled()) {
$columnsortordermanager->disable_columns($plugintypename);
$class = \core_plugin_manager::resolve_plugininfo_class('qbank');
$class::enable_plugin($name, false);
set_config('disabled', 1, 'qbank_'. $name);
}
break;
case 'enable':
if (!$plugins[$name]->is_enabled()) {
$columnsortordermanager->enable_columns($plugintypename);
$class = \core_plugin_manager::resolve_plugininfo_class('qbank');
$class::enable_plugin($name, true);
}
break;
}
redirect($return);
+4 -7
View File
@@ -88,10 +88,9 @@ if (($disable = optional_param('disable', '', PARAM_PLUGIN)) && confirm_sesskey(
}
if (array_search($disable, $disabledbehaviours) === false) {
$disabledbehaviours[] = $disable;
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
$class = \core_plugin_manager::resolve_plugininfo_class('qbehaviour');
$class::enable_plugin($disable, false);
}
core_plugin_manager::reset_caches();
redirect($thispageurl);
}
@@ -106,10 +105,9 @@ if (($enable = optional_param('enable', '', PARAM_PLUGIN)) && confirm_sesskey())
}
if (($key = array_search($enable, $disabledbehaviours)) !== false) {
unset($disabledbehaviours[$key]);
set_config('disabledbehaviours', implode(',', $disabledbehaviours), 'question');
$class = \core_plugin_manager::resolve_plugininfo_class('qbehaviour');
$class::enable_plugin($enable, true);
}
core_plugin_manager::reset_caches();
redirect($thispageurl);
}
@@ -238,4 +236,3 @@ function question_behaviour_icon_html($action, $behaviour, $icon, $alt, $tip) {
new pix_icon($icon, $alt, 'moodle', array('title' => '', 'class' => 'iconsmall')),
null, array('title' => $tip));
}
+41 -11
View File
@@ -42,25 +42,54 @@ $qtypes = question_bank::get_all_qtypes();
$pluginmanager = core_plugin_manager::instance();
// Get some data we will need - question counts and which types are needed.
$counts = $DB->get_records_sql("
SELECT qtype, COUNT(1) as numquestions, SUM(hidden) as numhidden
FROM {question} GROUP BY qtype", array());
$needed = array();
$hiddenstatus = \core_question\local\bank\question_version_status::QUESTION_STATUS_HIDDEN;
$draftstatus = \core_question\local\bank\question_version_status::QUESTION_STATUS_DRAFT;
$sql = "SELECT result.qtype,
SUM(result.numquestions) AS numquestions,
SUM(result.numhidden) AS numhidden,
SUM(result.numdraft) AS numdraft
FROM (SELECT data.qtype,
data.versionid,
COUNT(data.numquestions) AS numquestions,
(SELECT COUNT(qv.id)
FROM {question_versions} qv
WHERE qv.id = data.versionid
AND qv.status = :hiddenstatus) AS numhidden,
(SELECT COUNT(qv.id)
FROM {question_versions} qv
WHERE qv.id = data.versionid
AND qv.status = :draftstatus) AS numdraft
FROM (SELECT q.qtype, qv.id AS versionid, 1 AS numquestions
FROM {question} q
JOIN {question_versions} qv ON qv.questionid = q.id
JOIN {question_bank_entries} qbe ON qbe.id = qv.questionbankentryid
AND qv.version = (SELECT MAX(v.version)
FROM {question_versions} v
JOIN {question_bank_entries} be ON be.id = v.questionbankentryid
WHERE be.id = qbe.id)) data
GROUP BY data.qtype, data.versionid) result
GROUP BY result.qtype";
$counts = $DB->get_records_sql($sql, ['hiddenstatus' => $hiddenstatus, 'draftstatus' => $draftstatus]);
$needed = [];
foreach ($qtypes as $qtypename => $qtype) {
if (!isset($counts[$qtypename])) {
$counts[$qtypename] = new stdClass;
$counts[$qtypename]->numquestions = 0;
$counts[$qtypename]->numhidden = 0;
$counts[$qtypename]->numdraft = 0;
}
$needed[$qtypename] = $counts[$qtypename]->numquestions > 0 ||
$pluginmanager->other_plugins_that_require($qtype->plugin_name());
$counts[$qtypename]->numquestions -= $counts[$qtypename]->numhidden;
$counts[$qtypename]->numquestions -= ($counts[$qtypename]->numhidden + $counts[$qtypename]->numdraft);
}
$needed['missingtype'] = true; // The system needs the missing question type.
foreach ($counts as $qtypename => $count) {
if (!isset($qtypes[$qtypename])) {
$counts['missingtype']->numquestions += $count->numquestions - $count->numhidden;
$counts['missingtype']->numquestions += $count->numquestions - ($count->numhidden + $count->numdraft);
$counts['missingtype']->numhidden += $count->numhidden;
$counts['missingtype']->numdraft += $count->numdraft;
}
}
@@ -80,7 +109,8 @@ if (($disable = optional_param('disable', '', PARAM_PLUGIN)) && confirm_sesskey(
print_error('unknownquestiontype', 'question', $thispageurl, $disable);
}
set_config($disable . '_disabled', 1, 'question');
$class = \core_plugin_manager::resolve_plugininfo_class('qtype');
$class::enable_plugin($disable, false);
redirect($thispageurl);
}
@@ -94,7 +124,8 @@ if (($enable = optional_param('enable', '', PARAM_PLUGIN)) && confirm_sesskey())
print_error('cannotenable', 'question', $thispageurl, $enable);
}
unset_config($enable . '_disabled', 'question');
$class = \core_plugin_manager::resolve_plugininfo_class('qtype');
$class::enable_plugin($enable, true);
redirect($thispageurl);
}
@@ -151,8 +182,8 @@ foreach ($sortedqtypes as $qtypename => $localname) {
$row[] = $icon . ' ' . $localname;
// Number of questions of this type.
if ($counts[$qtypename]->numquestions + $counts[$qtypename]->numhidden > 0) {
if ($counts[$qtypename]->numhidden > 0) {
if ($counts[$qtypename]->numquestions + $counts[$qtypename]->numhidden + $counts[$qtypename]->numdraft > 0) {
if ($counts[$qtypename]->numhidden + $counts[$qtypename]->numdraft > 0) {
$strcount = get_string('numquestionsandhidden', 'question', $counts[$qtypename]);
} else {
$strcount = $counts[$qtypename]->numquestions;
@@ -251,4 +282,3 @@ function question_type_icon_html($action, $qtypename, $icon, $alt, $tip) {
new pix_icon($icon, $alt, 'moodle', array('title' => '', 'class' => 'iconsmall')),
null, array('title' => $tip));
}
+48
View File
@@ -0,0 +1,48 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Endpoint to get the Moodle version
*
* Moodle linkchecker will check this endpoint when it cannot get the Moodle version otherwise.
*
* @package core
* @copyright 2022 Victor Deniz <victor@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../config.php');
require_once($CFG->libdir . '/filelib.php');
// Get public key.
$key = download_file_content(HUB_STATSPUBLICKEY);
// Check $key is a valid public key.
$publickey = openssl_pkey_get_public($key);
if ($publickey !== false) {
$publickeystr = openssl_pkey_get_details($publickey)['key'];
} else {
die('Error getting a valid public key');
}
// Encrypt data.
$message = $CFG->release;
$success = openssl_public_encrypt(utf8_encode($message), $encrypteddata, $publickeystr);
if ($success) {
echo base64_encode($encrypteddata);
} else {
die ('Error encrypting the data');
}
+76 -17
View File
@@ -15,20 +15,13 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Renderer for core_admin subsystem
* Standard HTML output renderer for core_admin subsystem.
*
* @package core
* @subpackage admin
* @copyright 2011 David Mudrak <david@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Standard HTML output renderer for core_admin subsystem
*/
class core_admin_renderer extends plugin_renderer_base {
/**
@@ -284,6 +277,8 @@ class core_admin_renderer extends plugin_renderer_base {
* @param bool $croninfrequent If true, warn that cron hasn't run in the past few minutes
* @param bool $showcampaigncontent Whether the campaign content should be visible or not.
* @param bool $showfeedbackencouragement Whether the feedback encouragement content should be displayed or not.
* @param bool $showservicesandsupport Whether the services and support content should be displayed or not.
* @param string $xmlrpcwarning XML-RPC deprecation warning message.
*
* @return string HTML to output.
*/
@@ -292,12 +287,14 @@ class core_admin_renderer extends plugin_renderer_base {
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0,
$themedesignermode = false, $devlibdir = false, $mobileconfigured = false,
$overridetossl = false, $invalidforgottenpasswordurl = false, $croninfrequent = false,
$showcampaigncontent = false, bool $showfeedbackencouragement = false) {
$showcampaigncontent = false, bool $showfeedbackencouragement = false, bool $showservicesandsupport = false,
$xmlrpcwarning = '') {
global $CFG;
$output = '';
$output .= $this->header();
$output .= $this->output->heading(get_string('notifications', 'admin'));
$output .= $this->maturity_info($maturity);
$output .= $this->legacy_log_store_writing_error();
$output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
@@ -316,7 +313,9 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->registration_warning($registered);
$output .= $this->mobile_configuration_warning($mobileconfigured);
$output .= $this->forgotten_password_url_warning($invalidforgottenpasswordurl);
$output .= $this->mnet_deprecation_warning($xmlrpcwarning);
$output .= $this->userfeedback_encouragement($showfeedbackencouragement);
$output .= $this->services_and_support_content($showservicesandsupport);
$output .= $this->campaign_content($showcampaigncontent);
//////////////////////////////////////////////////////////////////////////////////////////////////
@@ -895,7 +894,35 @@ class core_admin_renderer extends plugin_renderer_base {
return '';
}
return $this->render_from_template('core/campaign_content', ['lang' => current_language()]);
$lang = current_language();
$url = "https://campaign.moodle.org/current/lms/{$lang}/install/";
$params = [
'url' => $url,
'iframeid' => 'campaign-content'
];
return $this->render_from_template('core/external_content_banner', $params);
}
/**
* Display services and support content.
*
* @param bool $showservicesandsupport Whether the services and support content should be visible or not.
* @return string the campaign content raw html.
*/
protected function services_and_support_content(bool $showservicesandsupport): string {
if (!$showservicesandsupport) {
return '';
}
$lang = current_language();
$url = "https://campaign.moodle.org/current/lms/{$lang}/servicesandsupport/";
$params = [
'url' => $url,
'iframeid' => 'services-support-content'
];
return $this->render_from_template('core/external_content_banner', $params);
}
/**
@@ -1053,12 +1080,21 @@ class core_admin_renderer extends plugin_renderer_base {
$plugintyperows = array();
foreach ($plugins as $name => $plugin) {
$component = "{$plugin->type}_{$plugin->name}";
$sumtotal++;
$row = new html_table_row();
$row->attributes['class'] = 'type-' . $plugin->type . ' name-' . $plugin->type . '_' . $plugin->name;
$row->attributes['class'] = "type-{$plugin->type} name-{$component}";
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name, null)) {
$icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'smallicon pluginicon'));
$iconidentifier = 'icon';
if ($plugin->type === 'mod') {
$iconidentifier = 'monologo';
}
if ($this->page->theme->resolve_image_location($iconidentifier, $component, null)) {
$icon = $this->output->pix_icon($iconidentifier, '', $component, [
'class' => 'smallicon pluginicon',
]);
} else {
$icon = '';
}
@@ -1771,11 +1807,20 @@ class core_admin_renderer extends plugin_renderer_base {
}
foreach ($plugins as $name => $plugin) {
$row = new html_table_row();
$row->attributes['class'] = 'type-' . $plugin->type . ' name-' . $plugin->type . '_' . $plugin->name;
$component = "{$plugin->type}_{$plugin->name}";
if ($this->page->theme->resolve_image_location('icon', $plugin->type . '_' . $plugin->name, null)) {
$icon = $this->output->pix_icon('icon', '', $plugin->type . '_' . $plugin->name, array('class' => 'icon pluginicon'));
$row = new html_table_row();
$row->attributes['class'] = "type-{$plugin->type} name-{$component}";
$iconidentifier = 'icon';
if ($plugin->type === 'mod') {
$iconidentifier = 'monologo';
}
if ($this->page->theme->resolve_image_location($iconidentifier, $component, null)) {
$icon = $this->output->pix_icon($iconidentifier, '', $component, [
'class' => 'icon pluginicon',
]);
} else {
$icon = $this->output->spacer();
}
@@ -2208,4 +2253,18 @@ class core_admin_renderer extends plugin_renderer_base {
return $output;
}
/**
* Display a warning about the deprecation of Mnet.
*
* @param string $xmlrpcwarning The warning message
* @return string HTML to output.
*/
protected function mnet_deprecation_warning($xmlrpcwarning) {
if (empty($xmlrpcwarning)) {
return '';
}
return $this->warning($xmlrpcwarning);
}
}
+10 -12
View File
@@ -142,6 +142,8 @@ if (($action == 'edit') || ($action == 'new')) {
$success = true;
if (!$repoid = $type->create()) {
$success = false;
} else {
add_to_config_log('repository_visibility', '', (int)$visible, $plugin);
}
$data = data_submitted();
}
@@ -183,23 +185,15 @@ if (($action == 'edit') || ($action == 'new')) {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', '', $baseurl);
}
$repositorytype = repository::get_type_by_typename($repository);
if (empty($repositorytype)) {
print_error('invalidplugin', 'repository', '', $repository);
}
$repositorytype->update_visibility(true);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('repository');
$class::enable_plugin($repository, 1);
$return = true;
} else if ($action == 'hide') {
if (!confirm_sesskey()) {
print_error('confirmsesskeybad', '', $baseurl);
}
$repositorytype = repository::get_type_by_typename($repository);
if (empty($repositorytype)) {
print_error('invalidplugin', 'repository', '', $repository);
}
$repositorytype->update_visibility(false);
core_plugin_manager::reset_caches();
$class = \core_plugin_manager::resolve_plugininfo_class('repository');
$class::enable_plugin($repository, 0);
$return = true;
} else if ($action == 'delete') {
$repositorytype = repository::get_type_by_typename($repository);
@@ -210,6 +204,8 @@ if (($action == 'edit') || ($action == 'new')) {
}
if ($repositorytype->delete($downloadcontents)) {
// Include this information into config changes table.
add_to_config_log('repository_visibility', $repositorytype->get_visible(), '', $repository);
core_plugin_manager::reset_caches();
redirect($baseurl);
} else {
@@ -390,6 +386,7 @@ if (($action == 'edit') || ($action == 'new')) {
}
$table->data[] = array($i->get_readablename(), $OUTPUT->render($select), $updown, $settings, $uninstall);
$table->rowclasses[] = '';
if (!in_array($typename, $alreadyplugins)) {
$alreadyplugins[] = $typename;
@@ -410,6 +407,7 @@ if (($action == 'edit') || ($action == 'new')) {
$uninstall = html_writer::link($uninstallurl, $struninstall);
}
$table->data[] = array(get_string('pluginname', 'repository_'.$plugin), $OUTPUT->render($select), '', '', $uninstall);
$table->rowclasses[] = 'dimmed_text';
}
}
}
+3
View File
@@ -49,6 +49,9 @@ if (optional_param('submit', false, PARAM_BOOL) && data_submitted() && confirm_s
redirect($baseurl);
}
$PAGE->set_secondary_active_tab('users');
$PAGE->set_primary_active_tab('siteadminnode');
$controller->load_current_settings();
// Display the editing form.
+34 -11
View File
@@ -61,6 +61,7 @@ if ($returnurl) {
}
$PAGE->set_url($pageurl);
$PAGE->set_context($context);
$PAGE->activityheader->disable();
$contextname = $context->get_context_name();
$courseid = $course->id;
@@ -164,7 +165,7 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading($SITE->fullname);
core_course_category::page_setup();
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
@@ -182,8 +183,35 @@ switch ($context->contextlevel) {
break;
}
$PAGE->set_navigation_overflow_state(false);
// Within a course context we need to explicitly set active tab as there isn't a reference in the nav tree.
if ($context->contextlevel == CONTEXT_COURSE) {
$PAGE->set_secondary_active_tab('participants');
}
echo $OUTPUT->header();
$backurl = null;
// We are looking at a particular role. The page URL has been set correctly.
if ($roleid) {
$backurl = $pageurl;
} else if ($context->contextlevel == CONTEXT_COURSE && !$isfrontpage) {
// Return to the intermediary page when within the course context.
$backurl = new moodle_url('/enrol/otherusers.php', ['id' => $course->id]);
} else if ($returnurl) {
// Factor in for $returnurl being passed.
$backurl = new moodle_url($returnurl);
}
if ($backurl) {
$backbutton = new single_button($backurl, get_string('back'), 'get');
$backbutton->class = 'singlebutton navitem';
echo html_writer::tag('div', $OUTPUT->render($backbutton), ['class' => 'tertiary-navigation']);
} else if (in_array($context->contextlevel, [CONTEXT_COURSE, CONTEXT_MODULE, CONTEXT_COURSECAT])) {
// The front page doesn't have an intermediate page 'other users' but needs similar tertiary nav like a standard course.
echo $OUTPUT->render_participants_tertiary_nav($course);
}
// Print heading.
echo $OUTPUT->heading_with_help($title, 'assignroles', 'core_role');
@@ -245,7 +273,6 @@ if ($roleid) {
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('assignanotherrole', 'core_role');
echo $OUTPUT->render($select);
echo '<p><a href="' . $url . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '</div>';
} else if (empty($assignableroles)) {
@@ -314,17 +341,13 @@ if ($roleid) {
echo html_writer::table($table);
if ($context->contextlevel > CONTEXT_USER) {
if ($returnurl) {
$url = new moodle_url($returnurl);
} else {
if (!$PAGE->has_secondary_navigation() && $context->contextlevel > CONTEXT_USER) {
if (!$returnurl) {
$url = $context->get_url();
echo html_writer::start_tag('div', array('class' => 'backlink'));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href' => $url));
echo html_writer::end_tag('div');
}
echo html_writer::start_tag('div', array('class'=>'backlink'));
echo html_writer::tag('a', get_string('backto', '', $contextname), array('href' => $url));
echo html_writer::end_tag('div');
}
}
+8 -2
View File
@@ -87,6 +87,7 @@ if ($context->contextlevel == CONTEXT_BLOCK) {
$PAGE->blocks->show_only_fake_blocks(true);
}
$PAGE->set_title($title);
$PAGE->activityheader->disable();
switch ($context->contextlevel) {
case CONTEXT_SYSTEM:
@@ -99,7 +100,7 @@ switch ($context->contextlevel) {
$showroles = 1;
break;
case CONTEXT_COURSECAT:
$PAGE->set_heading($SITE->fullname);
core_course_category::page_setup();
break;
case CONTEXT_COURSE:
if ($isfrontpage) {
@@ -125,7 +126,12 @@ if (!is_null($reportuser)) {
$rolenames = role_get_names($context);
}
$PAGE->set_navigation_overflow_state(false);
echo $OUTPUT->header();
if (in_array($context->contextlevel, [CONTEXT_COURSE, CONTEXT_MODULE, CONTEXT_COURSECAT])) {
echo $OUTPUT->render_participants_tertiary_nav($course);
}
// Print heading.
echo $OUTPUT->heading($title);
@@ -180,7 +186,7 @@ echo '</form>';
echo $OUTPUT->box_end();
// Appropriate back link.
if ($context->contextlevel > CONTEXT_USER) {
if (!$PAGE->has_secondary_navigation() && $context->contextlevel > CONTEXT_USER) {
echo html_writer::start_tag('div', array('class'=>'backlink'));
if ($returnurl) {
$backurl = new moodle_url($returnurl);
@@ -57,7 +57,10 @@ class core_role_admins_existing_selector extends user_selector_base {
list($sort, $sortparams) = users_order_by_sql('', $search, $this->accesscontext);
$params = array_merge($params, $sortparams);
$order = ' ORDER BY ' . $sort;
// Sort first by email domain and then by normal name order.
$order = " ORDER BY " . $DB->sql_substr('email', $DB->sql_position("'@'", 'email'),
$DB->sql_length('email') ) . ", $sort";
$availableusers = $DB->get_records_sql($fields . $sql . $order, $params);
@@ -80,10 +83,15 @@ class core_role_admins_existing_selector extends user_selector_base {
if ($availableusers) {
if ($search) {
$groupname = get_string('extusersmatching', 'core_role', $search);
$result[$groupname] = $availableusers;
} else {
$groupname = get_string('extusers', 'core_role');
$groupnameprefix = get_string('extusers', 'core_role');
foreach ($availableusers as $user) {
$domain = substr($user->email, strpos($user->email, '@'));
$groupname = "$groupnameprefix $domain";
$result[$groupname][] = $user;
}
}
$result[$groupname] = $availableusers;
}
return $result;
@@ -45,6 +45,7 @@ abstract class core_role_assign_user_selector_base extends user_selector_base {
$this->context = context::instance_by_id($options['contextid']);
}
$options['accesscontext'] = $this->context;
$options['includecustomfields'] = true;
parent::__construct($name, $options);
$this->roleid = $options['roleid'];
require_once($CFG->dirroot . '/group/lib.php');
+7 -2
View File
@@ -46,6 +46,7 @@ class core_role_check_users_selector extends user_selector_base {
if (!isset($options['multiselect'])) {
$options['multiselect'] = false;
}
$options['includecustomfields'] = true;
parent::__construct($name, $options);
$coursecontext = $this->accesscontext->get_course_context(false);
@@ -61,8 +62,9 @@ class core_role_check_users_selector extends user_selector_base {
global $DB;
list($wherecondition, $params) = $this->search_sql($search, 'u');
$params = array_merge($params, $this->userfieldsparams);
$fields = 'SELECT ' . $this->required_fields_sql('u');
$fields = 'SELECT u.id, ' . $this->userfieldsselects;
$countfields = 'SELECT COUNT(1)';
$coursecontext = $this->accesscontext->get_course_context(false);
@@ -74,6 +76,7 @@ class core_role_check_users_selector extends user_selector_base {
JOIN {user_enrolments} ue ON (ue.userid = subu.id)
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid1)
) subq ON subq.id = u.id
$this->userfieldsjoin
WHERE $wherecondition";
$params['courseid1'] = $coursecontext->instanceid;
@@ -83,6 +86,7 @@ class core_role_check_users_selector extends user_selector_base {
$sql2 = " FROM {user} u
LEFT JOIN ({user_enrolments} ue
JOIN {enrol} e ON (e.id = ue.enrolid AND e.courseid = :courseid2)) ON (ue.userid = u.id)
$this->userfieldsjoin
WHERE $wherecondition
AND ue.id IS NULL";
$params['courseid2'] = $coursecontext->instanceid;
@@ -95,12 +99,13 @@ class core_role_check_users_selector extends user_selector_base {
}
$sql1 = null;
$sql2 = " FROM {user} u
$this->userfieldsjoin
WHERE $wherecondition";
}
$params['contextid'] = $this->accesscontext->id;
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext);
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext, $this->userfieldsmappings);
$order = ' ORDER BY ' . $sort;
$result = array();
@@ -35,17 +35,18 @@ class core_role_existing_role_holders extends core_role_assign_user_selector_bas
list($wherecondition, $params) = $this->search_sql($search, 'u');
list($ctxcondition, $ctxparams) = $DB->get_in_or_equal($this->context->get_parent_context_ids(true), SQL_PARAMS_NAMED, 'ctx');
$params = array_merge($params, $ctxparams);
$params = array_merge($params, $ctxparams, $this->userfieldsparams);
$params['roleid'] = $this->roleid;
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext);
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext, $this->userfieldsmappings);
$params = array_merge($params, $sortparams);
$fields = "SELECT ra.id AS raid," . $this->required_fields_sql('u') . ",ra.contextid,ra.component ";
$fields = "SELECT ra.id AS raid, u.id, " . $this->userfieldsselects . ", ra.contextid, ra.component ";
$countfields = "SELECT COUNT(1) ";
$sql = "FROM {role_assignments} ra
JOIN {user} u ON u.id = ra.userid
JOIN {context} ctx ON ra.contextid = ctx.id
$this->userfieldsjoin
WHERE $wherecondition
AND ctx.id $ctxcondition
AND ra.roleid = :roleid";
+1 -1
View File
@@ -51,7 +51,7 @@ class core_role_permissions_table extends core_role_capability_table_base {
$this->overridableroles = $overridableroles;
$roles = get_all_roles($context);
$this->roles = role_fix_names(array_reverse($roles, true), $context, ROLENAME_ALIAS, true);
$this->roles = role_fix_names(array_reverse($roles, true), $context, ROLENAME_BOTH, true);
}
@@ -39,25 +39,26 @@ class core_role_potential_assignees_below_course extends core_role_assign_user_s
// Now we have to go to the database.
list($wherecondition, $params) = $this->search_sql($search, 'u');
$params = array_merge($params, $eparams);
$params = array_merge($params, $eparams, $this->userfieldsparams);
if ($wherecondition) {
$wherecondition = ' AND ' . $wherecondition;
}
$fields = 'SELECT ' . $this->required_fields_sql('u');
$fields = 'SELECT u.id, ' . $this->userfieldsselects;
$countfields = 'SELECT COUNT(u.id)';
$sql = " FROM ($enrolsql) enrolled_users_view
JOIN {user} u ON u.id = enrolled_users_view.id
LEFT JOIN {role_assignments} ra ON (ra.userid = enrolled_users_view.id AND
ra.roleid = :roleid AND ra.contextid = :contextid)
$this->userfieldsjoin
WHERE ra.id IS NULL
$wherecondition";
$params['contextid'] = $this->context->id;
$params['roleid'] = $this->roleid;
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext);
list($sort, $sortparams) = users_order_by_sql('u', $search, $this->accesscontext, $this->userfieldsmappings);
$order = ' ORDER BY ' . $sort;
// Check to see if there are too many to show sensibly.

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