Compare commits

...

2071 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 01acb1ea90 Moodle release 3.6beta 2018-11-18 12:38:48 +01:00
Jun Pataleta 9d10c33989 Merge branch 'MDL-64066' of git://github.com/stronk7/moodle 2018-11-18 01:02:24 +08:00
Eloy Lafuente (stronk7) 85ad2e6dff MDL-64066 behat: increase data export sizes, we were hitting them
With MDL-63660 we changed to a bundled moodle.css approach, that
made dowloaded exports size to increase. Although the expected
sizes already were raised in the issue, it seems that some of
them were not enough, so increasing a little bit more.

Side note, we have MDL-63399 about to try to change these tests...
2018-11-17 12:41:26 +01:00
Eloy Lafuente (stronk7) 6905c1c3fe MDL-64066 behat: more fixes to dialog names, old "add" steps 2018-11-17 12:10:37 +01:00
Eloy Lafuente (stronk7) 1a82729734 MDL-64066 behat: fix missing quote preventing jobs to complete 2018-11-17 00:16:18 +01:00
Eloy Lafuente (stronk7) 8907290a46 on-demand release 3.6dev+ 2018-11-16 12:03:18 +01:00
Eloy Lafuente (stronk7) 303d597523 NOBUG: Fixed SVG browser compatibility 2018-11-16 12:03:16 +01:00
Jun Pataleta bf3c9536ac Merge branch 'MDL-63999-master' of git://github.com/lameze/moodle 2018-11-16 14:36:14 +08:00
Andrew Nicols e151cbd971 Merge branch 'MDL-63303-master' of git://github.com/ryanwyllie/moodle 2018-11-16 14:15:16 +08:00
Ryan Wyllie d3d95d5dc2 MDL-63303 message: fix bugs in message drawer part 4
* Add clarification to delete messages lang strings
* Stop message polling when sending a message to fix UI bug
* Publish update last message event when polling finds more messages
* Remove logged in user from group conversation participants list
* Use user object to fetch user preferences to reduce DB calls
* Remove animated slide transitions because the browser breaks when
  showing some conversations
2018-11-16 14:10:10 +08:00
Simey Lameze b8c0534515 MDL-63999 calendar: double escape event name on templates 2018-11-16 13:56:54 +08:00
Jun Pataleta 30538dc9c1 Merge branch 'MDL-63660-master' of git://github.com/junpataleta/moodle 2018-11-16 10:54:25 +08:00
Damyon Wiese ba88292a3d Merge branch 'wip-MDL-63854-master' of https://github.com/kwiliarty/moodle 2018-11-16 10:35:37 +08:00
Jun Pataleta 223e1a6f73 MDL-63660 tool_dataprivacy: Increase expected export file size 2018-11-16 10:30:14 +08:00
Eloy Lafuente (stronk7) 75bedeafe4 Merge branch 'MDL-64012' of https://github.com/timhunt/moodle 2018-11-16 01:02:44 +01:00
Eloy Lafuente (stronk7) 246149f059 Merge branch 'MDL-53035-master' of git://github.com/vmdef/moodle 2018-11-16 00:35:33 +01:00
Kevin Wiliarty cadec24c48 MDL-63854 competencies, themes: misplaced dropdown arrows 2018-11-15 15:37:15 -05:00
Jun Pataleta b51b0c6682 Merge branch 'MDL-63832-master' of git://github.com/jleyva/moodle 2018-11-15 23:12:14 +08:00
Eloy Lafuente (stronk7) 9ca803a86d Merge branch 'MDL-63303_master-deleteduserfix' of https://github.com/markn86/moodle 2018-11-15 11:20:36 +01:00
Mark Nelson 52beee65b2 MDL-63303 core_message: dont check online status for deleted users 2018-11-15 18:08:12 +08:00
Eloy Lafuente (stronk7) 7a9717f614 Merge branch 'MDL-63303-master' of git://github.com/ryanwyllie/moodle 2018-11-15 11:04:12 +01:00
Eloy Lafuente (stronk7) 6a7ee95231 Merge branch 'MDL-63303-master-fix' of git://github.com/andrewnicols/moodle 2018-11-15 11:01:24 +01:00
Ryan Wyllie 132626720c MDL-63303 message: add member formatting to conversation
Make sure the members are formatted when adding to the state in
a conversation so that any missing data is normalised.
2018-11-15 17:57:44 +08:00
Andrew Nicols 5e47224a62 MDL-63303 message: Stop WS from removing optional keys 2018-11-15 17:56:31 +08:00
Jun Pataleta ac6cdcea06 Merge branch 'MDL-62287-master' of git://github.com/andrewnicols/moodle 2018-11-15 17:10:54 +08:00
Jun Pataleta 7a99ff70b9 Merge branch 'MDL-63811' of git://github.com/aolley/moodle 2018-11-15 17:09:28 +08:00
Damyon Wiese f4ccea6f52 Merge branch 'MDL-64009-master' of git://github.com/abgreeve/moodle 2018-11-15 16:30:20 +08:00
Andrew Nicols 705003beae MDL-63303 behat: Behat fixes 2018-11-15 16:26:16 +08:00
Andrew Nicols f42e85cc86 Merge branch 'MDL-63303-master' of git://github.com/ryanwyllie/moodle 2018-11-15 16:25:20 +08:00
Andrew Nicols 5d0abf9df6 MDL-63303 behat: Behat fixes 2018-11-15 16:24:00 +08:00
Damyon Wiese 47dc7eb8a4 Merge branch 'MDL-64011-master' of git://github.com/abgreeve/moodle 2018-11-15 16:10:21 +08:00
Ryan Wyllie c75559cfff MDL-63303 message: move message drawer to end of <body>
Fix some of the behat tests that are looking for generic button
names that match some of the buttons in the message drawer which
happen to appear earlier in the DOM.
2018-11-15 14:43:22 +08:00
Ryan Wyllie 663ccd58ed MDL-63303 message: fix bugs in message drawer part 3
* Fix bug for newly created conversations being added to overview page
* Fixed bug with use enter to send preference not updating correctly
* Fix unit tests
* Fix race condition loading new messages while conversation resetting
* Fix ordering and rendering of messages with same timestamp
* Fix missing privacy info in get_conversation web service
* Fix linting errors
* Improve bulk message rendering
2018-11-15 14:43:21 +08:00
Ryan Wyllie a111ab44af MDL-63303 message: fix bugs in message drawer part 2
* Added missing icon mappings for font-awesome
* Fixed focus on dialogue button when it opens
* Fixed UI updates on user block / unblock
* Fix jQuery syntax error when sending message with quotes
* Fix message/index.php opening drawer when no conversation found
* Fix placeholders rendered for new requests
2018-11-15 14:43:21 +08:00
Ryan Wyllie 1d3535f95c MDL-63303 message: fix bugs in message drawer
* Fix navigation from view_contact to view_conversation on an action
  such as blocking
* Fix default open message section on overview page depending on which
  section has conversations
* Fix message/index.php for users who haven't yet started a
  conversation
2018-11-15 14:43:21 +08:00
Ryan Wyllie 8c8939c1ae MDL-63303 message: add enter to send user preference 2018-11-15 14:43:21 +08:00
Ryan Wyllie f074d6f086 MDL-63303 message: remove behat tests for messaging 2018-11-15 14:43:21 +08:00
Ryan Wyllie 142b042c5c MDL-63303 message: message/index.php open conversation in message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie 17d982d751 MDL-63303 message: message/edit.php opens setttings in message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie 1e3453b7c7 MDL-63303 message: change nav popover to toggle message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie 6f96c06374 MDL-63303 theme_bootstrapbase: add message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie 5005d8cfb4 MDL-63303 message: add message drawer (boost only) 2018-11-15 14:43:21 +08:00
Ryan Wyllie 3ea46c8e31 MDL-63303 message: add functions to message_repository.js 2018-11-15 14:40:12 +08:00
Ryan Wyllie 0802c38a2f MDL-63303 message: add lastmessagedate to messagearea contact 2018-11-15 14:40:12 +08:00
Ryan Wyllie ecb4755c91 MDL-63303 message: add count_contacts api function 2018-11-15 14:40:12 +08:00
Ryan Wyllie b3bbd4a0e1 MDL-63303 message: fix get_conversations external func 2018-11-15 14:40:12 +08:00
Ryan Wyllie 569c0bae9c MDL-63303 message: add get_conversation_between_users external func 2018-11-15 14:40:12 +08:00
Ryan Wyllie 4e3130269c MDL-63303 message: add get_conversation to message api 2018-11-15 14:40:12 +08:00
Ryan Wyllie 6399c7ef14 MDL-63303 message: add count_conversations to api 2018-11-15 14:40:12 +08:00
Ryan Wyllie 886b01783b MDL-63303 message: add fields to send_instant_message 2018-11-15 14:40:12 +08:00
Ryan Wyllie 0866b33635 MDL-63303 message: add fields to contact requests 2018-11-15 14:40:12 +08:00
Ryan Wyllie 8350978aa1 MDL-63303 message: add get_member_info external function 2018-11-15 14:40:12 +08:00
Ryan Wyllie 38004e777f MDL-63303 message: fix get_member_info iscontact check 2018-11-15 14:40:12 +08:00
Ryan Wyllie c61353ae41 MDL-63303 message: fix mark_all_conversation_messages_as_read ext func 2018-11-15 14:40:12 +08:00
Ryan Wyllie 32b4212e50 MDL-63303 message: fix get_conversation_messages 2018-11-15 14:40:12 +08:00
Ryan Wyllie 9e189a914d MDL-63303 core_favourites: add get and count functions 2018-11-15 14:40:11 +08:00
Ryan Wyllie c2fc2c25ad MDL-63303 theme_bootstrapbase: add bs4 compat classes 2018-11-15 14:40:11 +08:00
Ryan Wyllie a69193fa70 MDL-63303 theme_boost: add switch styling for checkbox 2018-11-15 14:40:11 +08:00
Ryan Wyllie 7b91dcf264 MDL-63303 core: add new icons for messaging 2018-11-15 14:40:11 +08:00
Ryan Wyllie 456e6d8145 MDL-63303 core: allow subsystems to add nav bar and top of body content 2018-11-15 14:40:11 +08:00
Ryan Wyllie c912cd7324 MDL-63303 core: add debug info to exceptions 2018-11-15 14:40:11 +08:00
Ryan Wyllie 9d199fd2e7 MDL-63303 javascript: fix bug in auto_rows.js allowing it to shrink 2018-11-15 14:40:11 +08:00
Adrian Greeve 750f1588fa MDL-64011 badges: Changed the date format of endorsements. 2018-11-15 14:32:15 +08:00
Adrian Greeve c693beb3fc MDL-64009 badges: Removed additional badge information when null.
On the badge display page if the badge does not have an endorsement,
related badges, or competency allignments, then these sections are
not shown.
2018-11-15 14:04:51 +08:00
Jun Pataleta 91194bfd9f Merge branch 'MDL-63974-master' of https://github.com/snake/moodle 2018-11-15 11:22:16 +08:00
Damyon Wiese 02c4de86ea Merge branch 'MDL-63283-master-2' of https://github.com/snake/moodle 2018-11-15 10:43:03 +08:00
Jake Dallimore 267b4f03e7 MDL-63283 core_message: skip processors in non-individual conversations
Disable the processor for messages being sent to conversation types
other than individual.
2018-11-15 10:37:33 +08:00
Jake Dallimore 41485be2c8 MDL-63974 core_message: fix logic for non-contacts in user search
This should depend on the messagingallusers setting and, if false,
should only return those users having a profile the searcher can see.
If true, then any user can be returned. There is no requirement to
have a conversation with the user.
2018-11-15 09:59:39 +08:00
Jake Dallimore 9acb8b3574 MDL-63974 core_message: restore legacy behaviour for search_users() 2018-11-15 09:58:02 +08:00
Jun Pataleta 4aa05a81fd Merge branch 'MDL-53566-master-fix' of git://github.com/andrewnicols/moodle 2018-11-15 09:49:56 +08:00
Andrew Nicols 46b9a5c49c MDL-53566 core: Make context freeze test compat with clean 2018-11-15 07:39:23 +08:00
Tim Hunt 0f98afefdf MDL-64012 filters: activity name autolinking fails for names with () 2018-11-14 16:04:31 +00:00
Juan Leyva df3d877656 MDL-63832 assign: Check current user can view submission 2018-11-14 16:53:34 +01:00
Eloy Lafuente (stronk7) 0d8c3b7a0e Merge branch 'MDL-63653-master' of https://github.com/lucaboesch/moodle 2018-11-14 16:22:44 +01:00
Eloy Lafuente (stronk7) 79c4c80f2b Merge branch 'MDL-63842-master' of git://github.com/andrewnicols/moodle 2018-11-14 16:03:16 +01:00
Mark Johnson 80aff7db49 MDL-63660 privacy: Include CSS locally for data export 2018-11-14 14:53:27 +00:00
David Monllao f2d83f50e1 Merge branch 'MDL-61990' of https://github.com/timhunt/moodle 2018-11-14 12:09:34 +01:00
David Monllao 03d9f4cda4 Merge branch 'MDL-63991-master' of git://github.com/crazyserver/moodle 2018-11-14 11:57:57 +01:00
David Monllao e15203d011 Merge branch 'MDL-63488-master' of git://github.com/peterRd/moodle 2018-11-14 11:22:06 +01:00
Damyon Wiese 54869cdeac Merge branch 'MDL-64005-master' of git://github.com/abgreeve/moodle 2018-11-14 16:00:14 +08:00
Damyon Wiese 89ffc1ee0e Merge branch 'MDL-53566-master' of git://github.com/andrewnicols/moodle 2018-11-14 15:04:01 +08:00
Jun Pataleta 0a0f70c1ec Merge branch 'MDL-63926-master' of git://github.com/mickhawkins/moodle 2018-11-14 14:23:06 +08:00
Andrew Nicols 3a6463fc8c MDL-62287 tool_usertours: Pull v0.12.3 for background click fix 2018-11-14 14:13:32 +08:00
Andrew Nicols 9d76566ffc MDL-53566 core: Rename locking to freezing in UI 2018-11-14 12:37:56 +08:00
Damyon Wiese 8043762c80 Merge branch 'MDL-63868-master' of git://github.com/abgreeve/moodle 2018-11-14 12:11:12 +08:00
Michael Hawkins af6df0fab6 MDL-63926 block_recentlyaccesseditems: Add privacy provider unit tests 2018-11-14 11:14:57 +08:00
Michael Hawkins 8adf5d94b2 MDL-63926 block_recentlyaccesseditems: Support user removal by context
Also fixed the provider interface type. This is self contained, so is
not a subsystem provider. It was also already set up as a plugin
provider, just not defined as such.
2018-11-14 11:14:57 +08:00
Damyon Wiese 462fc2abcd Merge branch 'MDL-63901-master' of git://github.com/sarjona/moodle 2018-11-14 11:14:18 +08:00
Michael Hawkins 13bd038912 MDL-63926 block_recentlyaccesseditems: Improved get_contexts_for_userid
Updated the provider::get_contexts_for_userid method, to prevent false
positives. Previously, the user context would always be returned, now
the method checks data exists for the block first.
2018-11-14 11:13:00 +08:00
Adrian Greeve 9fcfecbf15 MDL-64005 gradebook: Fix to remove debugging message.
The progress bar is being used when there are a large amount
of grades being recalculated. This was throwing a debugging message
about NO_OUTPUT_BUFFERING being unset.
2018-11-14 10:39:57 +08:00
Andrew Nicols e77cae1330 Merge branch 'MDL-63923-master' of git://github.com/bmbrands/moodle 2018-11-14 09:54:40 +08:00
Peter a1e8c6d497 MDL-63488 core_grade: Use the rewrite_pluginurls to handle files
* Use the rewrite_plugin_urls to handled embedded files
* Add phpunit tests for default and updated functionality of format_text
2018-11-14 09:44:18 +08:00
Andrew Nicols faa673e36a MDL-63488 grade: Add tests for format_feedback
Signed-off-by: Peter <peter@moodle.com>
2018-11-14 09:28:16 +08:00
Eloy Lafuente (stronk7) b4c33348ff MDL-53566 core: add back upgrade code removed @ 0616f04 by mistake 2018-11-14 01:04:46 +01:00
Eloy Lafuente (stronk7) d27e49448f Merge branch 'MDL-53566-master' of git://github.com/andrewnicols/moodle 2018-11-13 23:55:38 +01:00
Luca Bösch 3a7117bb5b MDL-63653 tool_xmldb: style form elements 2018-11-13 18:18:45 +01:00
Tim Hunt 166c43d86c MDL-61990 outputrequirementslib: improve debug message 2018-11-13 17:11:17 +00:00
David Monllao 50d37636b6 Merge branch 'MDL-63882-master' of git://github.com/damyon/moodle 2018-11-13 16:07:14 +01:00
Pau Ferrer Ocaña f687f1459e MDL-63991 badges: Translate notification on endorsement 2018-11-13 15:58:47 +01:00
Pau Ferrer Ocaña 65ffd0a33a MDL-63991 badges: Fix links on badge render 2018-11-13 14:19:51 +01:00
Andrew Nicols bfbd733452 MDL-53566 tool_monitor: Fix context preload 2018-11-13 21:17:40 +08:00
Andrew Nicols bb41db9ce0 MDL-53566 core: Allow admins more control over locking
This change allows sites to configure locking such that it does not
apply to administrators at all.
2018-11-13 21:17:40 +08:00
Andrew Nicols 6a89b6c8f0 MDL-53566 core: Move managecontextlocking to module
This will allow the capability to be applied at a range of contexts and
not just the system, making the system much more definable to a range of
users.
2018-11-13 21:17:40 +08:00
Andrew Nicols 56db1a2d7c MDL-53566 core: Remove unused ancestorlocked field
This was originalyl intended as a performance improvement, but the
parent is already stored, and once calculated the value of locked is
already returned.
2018-11-13 21:17:40 +08:00
Andrew Nicols 0333213585 MDL-53566 core: Add behat test for context loking 2018-11-13 21:17:40 +08:00
Andrew Nicols 4ba4bc9acd MDL-53566 mod_forum: Correct captype for writeable capabilities 2018-11-13 21:17:40 +08:00
Andrew Nicols 3a8cf5e67d MDL-53566 core: Add UI for context locking 2018-11-13 21:17:40 +08:00
Andrew Nicols 0616f045c3 MDL-53566 core: Add support for context locking
This chagne adds support for a new feature known as Context Locking.
This allows a context to be locked, thereby removing all write
capabilities for all users (including admin) for that context, and all
child contexts.
2018-11-13 21:17:40 +08:00
David Monllao dccda6546b on-demand release 3.6dev+ 2018-11-13 13:11:07 +01:00
David Monllao 98469de445 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-11-13 13:11:05 +01:00
David Monllao 6101744b07 Merge branch 'MDL-63729-master' of git://github.com/dpalou/moodle 2018-11-13 11:13:37 +01:00
dpalou ce908f76a6 MDL-63729 badges: Fix course badge test 2018-11-13 10:40:27 +01:00
Sara Arjona 8105af9d6b MDL-63901 core_message: Avoid duplicate last message 2018-11-13 10:38:38 +01:00
Adrian Greeve 055312708d MDL-63868 core_calendar: Clicking link leads to events.
The mini calendar did not link to the daily events properly.
2018-11-13 15:30:09 +08:00
Damyon Wiese bed93cff28 Merge branch 'MDL-63927' of git://github.com/stronk7/moodle 2018-11-13 11:57:12 +08:00
Andrew Nicols ba20486ffe Merge branch 'MDL-63716-master' of git://github.com/damyon/moodle 2018-11-13 11:20:54 +08:00
Damyon Wiese bb650761c5 MDL-63882 core_message: Use validate_parameters
external_api::validate_parameters() sets defaults, and does cleaning and sanitisation of the
inputs. It returns the cleaned params. We can't be re-using the arguments to this function
instead of the results, because they have not been cleaned.
2018-11-13 10:54:05 +08:00
Jun Pataleta 657c74416d Merge branch 'MDL-63834_master' of git://github.com/markn86/moodle 2018-11-13 09:35:23 +08:00
Mark Nelson 869eac8204 MDL-63834 core_message: validate conversation type before creating 2018-11-13 08:41:26 +08:00
AMOS bot dce0a6dfb0 Automatically generated installer lang files 2018-11-13 00:07:31 +00:00
Andrew Nicols 951000c250 Merge branch 'master_MDL-63953' of https://github.com/danmarsden/moodle 2018-11-13 07:47:45 +08:00
David Monllao 06a0161ad1 Merge branch 'MDL-63729-master' of git://github.com/dpalou/moodle 2018-11-12 17:44:18 +01:00
David Monllao e1266eaf4b MDL-63724 messaging: Prefix field with the table alias 2018-11-12 16:26:14 +01:00
David Monllao 388628823e Merge branch 'MDL-63855-master' of git://github.com/bmbrands/moodle 2018-11-12 13:27:08 +01:00
Eloy Lafuente (stronk7) 49971e66f7 Merge branch 'MDL-63907-master' of git://github.com/cescobedo/moodle 2018-11-12 12:07:45 +01:00
Eloy Lafuente (stronk7) 610883c007 Merge branch 'MDL-63929-master' of git://github.com/jleyva/moodle 2018-11-12 12:02:51 +01:00
David Monllao 754ff36d1d Merge branch 'MDL-63925-master' of git://github.com/mickhawkins/moodle 2018-11-12 11:57:42 +01:00
David Monllao f04e51cfca Merge branch 'MDL-63940-master-recaptchaurl' of git://github.com/mudrd8mz/moodle 2018-11-12 10:42:36 +01:00
Sara Arjona d9552c3c33 MDL-63901 core_message: Fix error when the conversation does not exist
Create a conversation instead of throwing an exception to get the
behaviour working as it was before.
The string lang 'conversationdoesntexist' can be removed because
it was added in MDL-63466 and it's not used anywhere more.
2018-11-12 10:15:59 +01:00
David Monllao c83676101f Merge branch 'MDL-63823-master' of git://github.com/lameze/moodle 2018-11-12 10:09:33 +01:00
Bas Brands a6501e9694 MDL-63855 core_my: no vertical scroll card blocks
card desks using class .dashboard-card-deck.one-row should not
show a vertical scrollbar
2018-11-12 10:03:34 +01:00
David Monllao 623995e589 Merge branch 'MDL-63968-master' of git://github.com/andrewnicols/moodle 2018-11-12 10:02:17 +01:00
Damyon Wiese eac24f2b71 Merge branch 'MDL-63945_master' of git://github.com/markn86/moodle 2018-11-12 16:36:57 +08:00
Damyon Wiese 160e77f9d0 MDL-63716 course: less user_accesstime_log() calls
We should only call this function when a user actually views a course. It is not called
automatically when a course context is validated from a webservice. It is called directly
from the core_course_view_course webservice.
2018-11-12 16:11:15 +08:00
Bas Brands c412ddc829 MDL-63923: core_my: card sizes clean and boost
Cards should have a minimum size of 250px wide
2018-11-12 09:04:56 +01:00
Mark Nelson d15c1e77b0 MDL-63945 core_message: fixed discrepancy between helpers 2018-11-12 15:30:30 +08:00
Damyon Wiese b0f45a8b8f Merge branch 'MDL-63724-master-3' of https://github.com/snake/moodle 2018-11-12 14:16:31 +08:00
Damyon Wiese 75e6661940 Merge branch 'MDL-63909_master' of git://github.com/markn86/moodle 2018-11-12 14:01:01 +08:00
Damyon Wiese 6cfba4a1c6 MDL-63864 message: Contact request fix
The contactrequestid was removed from the api, so now we search by both
the userid from and the userid to.
2018-11-12 13:38:33 +08:00
Andrew Nicols 6d0a43deb9 Merge branch 'MDL-63763-master' of https://github.com/nwp90/moodle 2018-11-12 10:32:32 +08:00
Andrew Nicols e926b4d046 MDL-63968 message: Correct use of get_in_or_equal 2018-11-12 10:32:06 +08:00
Jake Dallimore 2553e9db8e MDL-63724 core_message: add send_messages_to_conversation() web service 2018-11-12 10:09:27 +08:00
Jake Dallimore 86e274d929 MDL-63724 core_message: move message redirection into helper function 2018-11-12 10:09:27 +08:00
Jake Dallimore 52f9cf205e MDL-63724 core_message: add send_message_to_conversation() to api 2018-11-12 10:09:27 +08:00
Jake Dallimore b30f4d6d58 MDL-63724 core_message: buffering support for conv messages in manager
We need to be able to delay calling all member processors with localised
event data if a DB transaction is taking place. This code treats a
conversation message as a single item of work to be buffered, and stores
all localised eventdata, and processorlists for later reference. When
processing the buffer, we pass off all localised eventdata items to
their respective member's processors, before firing a single event.
2018-11-12 10:09:27 +08:00
Jake Dallimore 0eddf920be MDL-63724 core_message: add conversation support to message_send()
Added a test confirming that processors are called for each member
and that a single event is fired.
2018-11-12 10:09:27 +08:00
Jake Dallimore 9581bc3c00 MDL-63724 core_message: add send_message_to_conversation() to manager 2018-11-12 10:09:27 +08:00
Jake Dallimore aa083ab95f MDL-63724 core_message: add new group_message_sent event 2018-11-12 10:09:27 +08:00
Jake Dallimore 947d32895e MDL-63724 core_message: split up event and processor code in the manager
This was couple before, but we're going to want this to be separate for
group conversation messages, where we'll call many users' processors,
but only create a single 'group_message_sent' event.
2018-11-12 10:09:27 +08:00
Jake Dallimore 9f82758c01 MDL-63724 core_message: fix method signature for can_contact_user()
This method required objects, but only used their ids, so has been
changed to require only ids.
2018-11-12 10:09:27 +08:00
Jake Dallimore 8e3bf150d9 MDL-63724 core_message: add can_send_message_to_conversation() to api 2018-11-12 10:09:27 +08:00
Damyon Wiese 080cc5b671 Merge branch 'MDL-63864_master' of git://github.com/markn86/moodle 2018-11-12 10:02:25 +08:00
Andrew Nicols fa54c160f9 Merge branch 'MDL-63838-master' of git://github.com/vmdef/moodle 2018-11-12 09:54:59 +08:00
Simey Lameze 2d18a4a89f MDL-63823 tool_lpimportcsv: supress progress bar debugging 2018-11-12 09:53:07 +08:00
Andrew Nicols e2a8ebddb5 Merge branch 'MDL-63850_master' of git://github.com/markn86/moodle 2018-11-12 07:53:09 +08:00
Dan Marsden 93bddb2734 MDL-63953 mod_scorm: Use correct value for first attempt. 2018-11-12 09:51:15 +13:00
Eloy Lafuente (stronk7) 208950cff0 on-demand release 3.6dev+ 2018-11-10 12:53:31 +01:00
Eloy Lafuente (stronk7) 3b1e59e3e1 NOBUG: Fixed SVG browser compatibility 2018-11-10 12:53:29 +01:00
Eloy Lafuente (stronk7) 42155e2501 Merge branch 'MDL-63960-master' of git://github.com/andrewnicols/moodle 2018-11-10 10:27:35 +01:00
Andrew Nicols c083d1ad1e MDL-63960 dataprivacy: Do not perform strict type checks for id
When inherit is specified in the data registry it is stored as a
string and we cannot perform a strict comparison with it.

We should still compare strict comparison checks against null, or false,
but not for the NOTSET (0) or INHERIT values (-1).
2018-11-10 15:34:21 +08:00
Andrew Nicols 35afa11801 Merge branch 'MDL-63919' of git://github.com/stronk7/moodle 2018-11-10 10:59:25 +08:00
Eloy Lafuente (stronk7) d01d9e2c0e Merge branch 'MDL-63596-master' of git://github.com/andrewnicols/moodle 2018-11-10 03:49:14 +01:00
Andrew Nicols 2986a99153 MDL-63596 backup: Add missing include 2018-11-10 10:46:38 +08:00
Eloy Lafuente (stronk7) baf3fd4177 MDL-63919 tool_dataprivacy: admin & notify fixes
This includes the following:

1) Replace $ADMIN->id by get_admin()->id. The former doesn't exist.
2) Only change the notify parameter when it has not been specified
   at creation time (null). If specified, observe it.
3) Set the current user in tests to admin, able to create those
   requests.
2018-11-10 02:22:12 +01:00
Eloy Lafuente (stronk7) 5c0f8dcddf Merge branch 'MDL-63596-master' of git://github.com/andrewnicols/moodle 2018-11-09 19:32:23 +01:00
dpalou 5bb1889f43 MDL-63729 badges: Return new DB tables data in WS 2018-11-09 12:39:53 +01:00
dpalou 18d27ac2eb MDL-63729 badges: Return new fields in badge table in WS 2018-11-09 12:11:04 +01:00
dpalou c776e1dd40 MDL-63729 badges: Create an exporter for badge info 2018-11-09 12:09:45 +01:00
Andrew Nicols 56c2b941df MDL-63919 tool_dataprivacy: Notify by default 2018-11-09 18:39:42 +08:00
Eloy Lafuente (stronk7) 8ecff96216 Merge branch 'MDL-63884-master-fix' of https://github.com/snake/moodle 2018-11-09 11:19:02 +01:00
Jake Dallimore d76029110b MDL-63884 core_message: fix for get_conversations legacy adapter code
This code also tries to adapt other conversation types, but it should
only support individual conversations, where we know members exist.
2018-11-09 17:59:55 +08:00
Jake Dallimore 9cef5491fb MDL-63884 core_message: fix for groups without images
If we don't have an image for the group, leave this extra field empty.
2018-11-09 17:59:53 +08:00
Eloy Lafuente (stronk7) ba999160b4 Merge branch 'MDL-62564-master-fix' of git://github.com/andrewnicols/moodle 2018-11-09 10:59:04 +01:00
Damyon Wiese f1f7d45bc7 MDL-63596 backup: Deal with controller types
For privacy requests, deal with all 3 controller types.
2018-11-09 17:55:23 +08:00
Andrew Nicols b26c5e031b MDL-62564 tool_dataprivacy: Do not delete deleted user
This also ensures that we do not call delete_user on an already deleted
user.
2018-11-09 17:34:47 +08:00
Juan Leyva 2979ca1175 MDL-63929 user: Support unsetting prefs in update_user_preferences WS 2018-11-09 09:28:23 +01:00
Mihail Geshoski fc9bde4bc3 MDL-63596 core_backup: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-11-09 16:09:22 +08:00
Jun Pataleta 012fa6abc3 Merge branch 'MDL-63867-master' of git://github.com/mickhawkins/moodle 2018-11-09 15:31:28 +08:00
Michael Hawkins 95a3f78058 MDL-63867 tool_dataprivacy: Add site purpose checks to tasks
If a site purpose is not defined, requests cannot be processed.
2018-11-09 15:20:12 +08:00
Michael Hawkins 0646c8514b MDL-63867 tool_dataprivacy: Fix context expired/unprotected user check
It now checks the system context has been defined, since that is
required for data privacy to be set up correctly, and the check
to be valid. This also fixes an error being thrown when checking
pending delete requests in cron.
2018-11-09 14:19:31 +08:00
Jun Pataleta 3adcfb0518 Merge branch 'MDL-63946-master' of git://github.com/andrewnicols/moodle 2018-11-09 13:41:44 +08:00
Mark Nelson b3ce575e63 MDL-63864 core_message: added unit tests 2018-11-09 13:28:39 +08:00
Mark Nelson accd64827d MDL-63864 core_message: can now specify limit for contact requests 2018-11-09 13:28:38 +08:00
Andrew Nicols 9c89103a63 MDL-63946 plagirism: Filename typo fix 2018-11-09 13:25:33 +08:00
Mark Nelson daa33803cd MDL-63864 core_message: get_contact_requests now uses helper 2018-11-09 12:12:17 +08:00
Jun Pataleta a954485ef5 Merge branch 'MDL-63830-master' of git://github.com/bmbrands/moodle 2018-11-09 12:07:05 +08:00
Jun Pataleta 1d2adca39b Merge branch 'MDL-63924-master' of git://github.com/andrewnicols/moodle 2018-11-09 11:57:38 +08:00
Jun Pataleta 66e83fc0cc Merge branch 'MDL-63942-master' of git://github.com/andrewnicols/moodle 2018-11-09 11:44:02 +08:00
Jun Pataleta 2acbd44883 Merge branch 'MDL-63897-master' of git://github.com/andrewnicols/moodle 2018-11-09 11:30:28 +08:00
Andrew Nicols 8bb3c0d0c5 fixup! MDL-63897 dataprivacy: Kill the preprocess stage 2018-11-09 11:26:21 +08:00
Andrew Nicols 03acfa408a MDL-63897 tool_dataprivacy: Send notifications for new requests 2018-11-09 11:25:57 +08:00
Andrew Nicols b838d85cbc MDL-63897 dataprivacy: Kill the preprocess stage 2018-11-09 11:08:07 +08:00
Damyon Wiese 3dc6208961 Merge branch 'MDL-62415-master' of git://github.com/peterRd/moodle 2018-11-09 10:54:35 +08:00
Andrew Nicols b627565e9b Merge branch 'MDL-63919-master' of git://github.com/mihailges/moodle 2018-11-09 10:51:48 +08:00
Jun Pataleta 120edbe65f Merge branch 'MDL-62589-master' of git://github.com/andrewnicols/moodle 2018-11-09 10:36:52 +08:00
Damyon Wiese ba3b0cc6ac Merge branch 'wip-MDL-63894-master' of https://github.com/kwiliarty/moodle 2018-11-09 09:48:39 +08:00
Andrew Nicols a10b512021 MDL-63942 dataprivacy: Disable deleted user task by default 2018-11-09 09:29:13 +08:00
Peter 29cfe7a527 MDL-62415 repo_filepicker: Display search results in tree view
Disable overriding call to list all files in tree view and show search results instead
2018-11-09 09:28:28 +08:00
Damyon Wiese d3fdd7442b Merge branch 'MDL-63671-master-2' of git://github.com/mihailges/moodle 2018-11-09 09:12:49 +08:00
David Mudrák b207af3b48 MDL-63940 recaptcha: Use www.recaptcha.net in the service endpoint URL
There are countries where www.google.com is a being blocked and
recaptcha does not work there. As shown at
https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally
it is enough to simply use www.recaptcha.net in the service endpoint
URL.
2018-11-08 22:55:33 +01:00
Jun Pataleta 3bc9a0b2e2 Merge branch 'MDL-63836-master' of git://github.com/damyon/moodle 2018-11-09 00:21:19 +08:00
Eloy Lafuente (stronk7) 3aa0cfe33e Merge branch 'MDL-62564-integration-master-1' of git://github.com/mihailges/moodle 2018-11-08 16:38:38 +01:00
Víctor Déniz Falcón fe2e696ed7 MDL-63838 block_recentlyaccesseditems: add placeholder during loading 2018-11-08 14:12:40 +00:00
Andrew Nicols c96cd71102 MDL-63924 privacy: Add shared user providers to subsytsems 2018-11-08 21:26:18 +08:00
Mark Nelson 4461288dfa MDL-63909 core_message: undeprecated still used functions by old UI
A note has been made to remove these and other functions once we
remove the old UI.
2018-11-08 18:43:17 +08:00
Mark Nelson a6049a7960 MDL-63909 core_message: deprecated web services not used in new UI 2018-11-08 18:22:00 +08:00
Víctor Déniz Falcón e26d40e343 MDL-53035 mod_assign: add course_module_viewed event 2018-11-08 09:54:55 +00:00
Eloy Lafuente (stronk7) 5b3f4bbb12 MDL-63927 performance: Update the plan to support the new login token 2018-11-08 10:25:08 +01:00
Mark Nelson cef1d977c3 MDL-63850 core_message: get_conversations returns privacy and requests 2018-11-08 16:24:29 +08:00
Mihail Geshoski a128601eb3 MDL-63671 tool_cohortroles: Limit data to the system context in provider 2018-11-08 16:06:43 +08:00
Mark Nelson 82e0973c96 MDL-63850 core_message: helper now returns privacy information 2018-11-08 16:05:25 +08:00
Mark Nelson 5c675c5076 MDL-63850 core_message: '$referenceuserid' used when returning requests 2018-11-08 16:05:25 +08:00
Mark Nelson 054834b00c MDL-63850 core_message: moved contact request logic to helper 2018-11-08 16:05:25 +08:00
Mark Nelson 6981de1080 MDL-63850 core_message: prevent exception being thrown with empty array 2018-11-08 16:05:25 +08:00
Andrew Nicols 44e56956c6 MDL-63924 core_privacy: Add shared_userlist provider 2018-11-08 15:39:56 +08:00
Michael Hawkins e49b73e35e MDL-63925 privacy: Fixed Moodle URL in template 2018-11-08 15:36:40 +08:00
Mihail Geshoski f39b579de1 MDL-63919 privacy: Store the creation method of the data request 2018-11-08 14:13:31 +08:00
Mihail Geshoski 77c21518f2 MDL-63919 privacy: Disable notifications for auto created data requests 2018-11-08 14:08:43 +08:00
Andrew Nicols 308eb72448 Merge branch 'MDL-63903-master' of https://github.com/snake/moodle 2018-11-08 14:02:10 +08:00
Damyon Wiese bc8584193a Merge branch 'MDL-63282_master' of git://github.com/markn86/moodle 2018-11-08 14:00:00 +08:00
Jun Pataleta 67bceccd4a Merge branch 'MDL-63902-master' of git://github.com/andrewnicols/moodle 2018-11-08 13:39:05 +08:00
Amaia Anabitarte 36e23989b0 MDL-63282 core_message: Setting messagingallusers = 1 for behat tests
Default setting value for new instances is 0
Default setting value for existing instances is 1
to get same search results than before this setting exists

Setting messagingallusers = 1 for behat tests to simulate old versions functionality

Followup: MDL-63911
2018-11-08 13:11:28 +08:00
Amaia Anabitarte 548cac7dbf MDL-63282 core_message: New Search API function 2018-11-08 13:11:28 +08:00
Kevin Wiliarty 13e3206910 MDL-63894 themes: adds flex-wrap to boost inline date_time_selector 2018-11-07 23:48:34 -05:00
Andrew Nicols 50208b5ca5 MDL-62589 dataprivacy: Add ability to resubmit a request 2018-11-08 11:45:36 +08:00
Jun Pataleta ba8c81ba4a Merge branch 'MDL-63840-master' of https://github.com/lucaboesch/moodle 2018-11-08 11:32:12 +08:00
Damyon Wiese c338d6487c Merge branch 'MDL-63875' of https://github.com/timhunt/moodle 2018-11-08 09:41:16 +08:00
Mihail Geshoski 673d2c58fb MDL-62564 privacy: Create request for deleted users when setting enabled 2018-11-08 09:29:38 +08:00
Mihail Geshoski b4ecfa38c2 MDL-62564 privacy: Improve bulk deletion 2018-11-08 09:28:36 +08:00
Andrew Nicols 66a47d23fa MDL-63902 dataprivacy: Check course children not the course
When checking the expiry and protected state of a context, we need to do
so knowing what kind of use that context has.

If it is used in the user context, then only the user context matters.
If it is used within a course, then that child context must be checked
in relation to the course.
2018-11-08 09:13:15 +08:00
Damyon Wiese f41207400b MDL-63836 course: No course header images
This feature may be added in future, but for now we are not going to include it.
2018-11-08 08:59:35 +08:00
Mihail Geshoski 4bd598cbc9 MDL-62564 privacy: Add unit tests 2018-11-08 08:59:31 +08:00
Luca Bösch 181b12a6bd MDL-63840 theme: block menu cog size. 2018-11-07 17:57:55 +01:00
Jun Pataleta 5160567c5f MDL-62294 lib: Take note of cherry-picked upstream commit
* Make a note of the applied upstream patch in
  lib/lessphp/moodle_readme.txt which fixes the PHP 7.2 compatibility
  issue when counting ruleset rules.

* Amended on integration to put together all the local modifications.
2018-11-07 17:25:03 +01:00
Michaël Marinetti cde2530c54 MDL-62294 lessphp: Fix for PHP 7.2 compatibility
From upstream commit:
https://github.com/oyejorge/less.php/commit/669acc51817a8da162b5f1b7137e79f0e4acc636
2018-11-07 17:21:39 +01:00
cescobedo 4cdc9f73b8 MDL-63907 core_message: Pass user object to show_online_status.
Fix create_contact() to pass user object as parameter in show_online_status.
2018-11-07 17:05:12 +01:00
David Monllao e0d7266379 Merge branch 'MDL-63888-master' of git://github.com/jleyva/moodle 2018-11-07 13:03:34 +01:00
David Monllao d33a22c037 Merge branch 'MDL-63740-master' of git://github.com/jleyva/moodle 2018-11-07 12:56:10 +01:00
Juan Leyva b9508423b4 MDL-63740 webservice: Add new dashboard functions to mobile service
- core_course_get_enrolled_courses_by_timeline_classification
- core_course_get_recent_courses
- core_course_set_favourite_courses
- block_starredcourses_get_starred_courses
2018-11-07 12:37:43 +01:00
Juan Leyva 2b6a0c6a68 MDL-63888 webservice: Return new global setting "messagingallusers" 2018-11-07 12:37:17 +01:00
Andrew Nicols 4c1fc0b6d6 MDL-62589 dataprivacy: Correct not in sql 2018-11-07 19:24:07 +08:00
Bas Brands f457cb862d MDL-63830 block_myoverview: shorten card titles 2018-11-07 11:47:23 +01:00
Bas Brands 7ba8c72781 MDL-63830 block_myoverview: menu icon position summary 2018-11-07 11:47:23 +01:00
Bas Brands 44b549260d MDL-63830 block_myoverview: reuse css for dashboard blocks
target block content only
use same html accross blocks
add one-row class for scrolling cards
2018-11-07 11:47:04 +01:00
Bas Brands f1b1f3804e MDL-63830 block_myoverview: rounded images for summary view 2018-11-07 11:23:27 +01:00
Bas Brands 97593c37d8 MDL-63830 block_myoverview: text colour course names
Using same card HTMl for recently accessed courses
2018-11-07 11:23:26 +01:00
Bas Brands 1a97254201 MDL-63830 block_myoverview: move course menu button up 2018-11-07 11:23:26 +01:00
Bas Brands 95acd7b1b4 MDL-63830 block_myoverview: remove margin card title 2018-11-07 11:23:19 +01:00
Jake Dallimore cd07b3b5cb MDL-63903 core_message: fix bug with shim code in index.php
On backend render (not via js loading), the following bugs were
introduced:
- Message ordering was wrong
- Message blocktimes were wrong
This patches the above to restore legacy behaviour.
2018-11-07 18:19:07 +08:00
Eloy Lafuente (stronk7) 3c577cb583 Merge branch 'MDL-63883-master' of https://github.com/snake/moodle 2018-11-07 10:48:12 +01:00
David Monllao b6816ed2ca Merge branch 'MDL-63675-master' of git://github.com/bmbrands/moodle 2018-11-07 10:44:57 +01:00
Bas Brands 78c06a660b MDL-63830 block_myoverview: star icon updates
Change the star icon from being in a button and allow it to be
inline using spans instead of divs.
Add the option to passes css classed to the template.
2018-11-07 09:48:00 +01:00
Bas Brands aba5b89c7a MDL-63830 block_myoverview: card footer styles 2018-11-07 09:00:18 +01:00
Bas Brands 2b311e7689 MDL-63830 block_myoverview: progressbar styles boost
using bg-white and border
allow collapsing of list view content
removed obsolete styles for old progress circles bootstrapbase
2018-11-07 08:59:29 +01:00
Damyon Wiese d4035711f9 Merge branch 'MDL-63898-master' of https://github.com/snake/moodle 2018-11-07 15:30:52 +08:00
Jun Pataleta 134f262ee3 Merge branch 'master_MDL-63800' of https://github.com/danmarsden/moodle 2018-11-07 15:27:27 +08:00
Damyon Wiese da151c9b75 Merge branch 'MDL-63839_master' of git://github.com/markn86/moodle 2018-11-07 14:29:02 +08:00
Jake Dallimore 74fc14e5b2 MDL-63898 core_message: fix for get_conversations message formatting
This used to return a text version of the message, but needs to return
the message formatted with message_format_message_text().
2018-11-07 14:23:54 +08:00
Damyon Wiese 8313f552b6 Merge branch 'MDL-63451' of https://github.com/peterspicer-catalyst/moodle 2018-11-07 12:05:27 +08:00
Damyon Wiese eb935dab5b Merge branch 'MDL-63884-master' of https://github.com/snake/moodle 2018-11-07 11:00:41 +08:00
Juan Leyva c1720141fd MDL-63708 tool_mobile: Add options for disabling blocks
Now that we are supporting the new dashboard and site home blocks on the mobile app,
we need options to allow admin to forbid certain blocks to be displayed on the app.
2018-11-07 00:32:32 +01:00
Jun Pataleta e862985a69 MDL-63183 auth_shibboleth: Don't render page when already logged in 2018-11-07 00:14:48 +01:00
Jun Pataleta 5f9955b5a0 MDL-63183 auth_shibboleth: Add hidden login token in guest login form 2018-11-07 00:14:48 +01:00
Damyon Wiese 6dfe428363 MDL-63183 auth: Login protection
CSRF protection for the login form. The authenticate_user_login function was
extended to validate the token (in \core\session\manager) but by default it
does not perform the extra validation. Existing uses of this function from
auth plugins and features like "change password" will continue to work without
changes. New config value $CFG->disablelogintoken can bypass this check.
2018-11-07 00:14:48 +01:00
Eloy Lafuente (stronk7) ef79de12ee Merge branch 'm36_MDL-63789_Search_SOLR_Fixes_Proxy_Auth' of https://github.com/scara/moodle 2018-11-07 00:08:12 +01:00
Eloy Lafuente (stronk7) 08c51ff080 on-demand release 3.6dev+ 2018-11-06 19:06:54 +01:00
Eloy Lafuente (stronk7) fca12fd991 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-11-06 19:06:52 +01:00
Damyon Wiese 1c7288e79b Merge branch 'MDL-58454-master-fix' of git://github.com/junpataleta/moodle 2018-11-06 15:48:31 +01:00
Jun Pataleta e75860caea MDL-58454 badges: Use correct function for fetching badge issuer 2018-11-06 15:48:31 +01:00
Andrew Nicols 6d47156f75 Merge branch 'MDL-63711-master-fix' of git://github.com/junpataleta/moodle 2018-11-06 15:48:30 +01:00
Jun Pataleta 5c145757a8 MDL-58454 core: Fix savepoint in upgrade.php 2018-11-06 15:48:30 +01:00
Jun Pataleta ad2737c9c9 MDL-63711 core_grade: Use canonicalize for checking userlist IDs 2018-11-06 15:48:30 +01:00
David Monllao 2bdc254cd2 Merge branch 'MDL-58454-master' of git://github.com/junpataleta/moodle 2018-11-06 15:48:23 +01:00
Damyon Wiese d769d7c2db Merge branch 'MDL-63297' of https://github.com/timhunt/moodle 2018-11-06 15:45:23 +01:00
Jake Dallimore 003cdcce15 MDL-63884 core_message: add imageurl support for linked conversations
This is an extra field specific to linked conversations, so the helper
method has been extended to encompass this alongside the subname field.
2018-11-06 16:51:44 +08:00
Jake Dallimore 19237383f3 MDL-63884 core: allow tests to set group pictures when creating groups 2018-11-06 16:42:46 +08:00
Jake Dallimore 741376f3e7 MDL-63883 core_message: fix random externnallib_test phpunit failure
Users created by the test generator could have the same name as one
another, so trying to assert names NOT in an array would clash. Fix
is to remove those assertions - there were superfluous anyway.
2018-11-06 14:17:51 +08:00
Jun Pataleta 9639cb487e MDL-58454 badges: Fix related badge deletion
* When deleting a badge, delete badge_related records where this badge
is also set as the related badge.
2018-11-06 11:47:20 +08:00
Jun Pataleta eea49debc8 Merge branch 'MDL-63062-master-renamed' of https://github.com/vmdef/moodle 2018-11-06 10:32:18 +08:00
Andrew Nicols 74238c1c18 Merge branch 'MDL-62563-master-3' of git://github.com/mihailges/moodle 2018-11-06 09:37:23 +08:00
Bas Brands 4edd1bb089 MDL-63863 block_myoverview: remove superfluous div
So the clean suite in behat will be back to pass.
2018-11-06 01:18:37 +01:00
AMOS bot a36021e293 Automatically generated installer lang files 2018-11-06 00:07:16 +00:00
Víctor Déniz Falcón 4f6680a1e9 MDL-63062 block_recentlyaccessedcourses: add starred icon 2018-11-05 23:51:49 +00:00
Víctor Déniz Falcón 41f6129358 MDL-63062 block_recentlyaccessedcourses: add block and styles 2018-11-05 23:46:57 +00:00
Victor Deniz 98a52c80bb MDL-63062 block_recentlyaccessedcourses: add web service 2018-11-05 23:46:43 +00:00
Dan Marsden e6a93dc215 MDL-63800 mod_assign: don't show grade if not set. 2018-11-06 10:04:15 +13:00
Tim Hunt ad89de38eb MDL-63875 qtype_ddmarker: fix layout with multi-line markers 2018-11-05 17:45:05 +00:00
Sara Arjona 5a1ea82835 MDL-58454 badges: Fix some minor errors for Open Badges v2 2018-11-05 18:41:54 +01:00
David Monllao 6e90098e7b Merge branch 'MDL-63711-master' of git://github.com/abgreeve/moodle 2018-11-05 16:35:34 +01:00
Tung Thai d363a5c2e6 MDL-58454 badges: Open Badges Specification Version 2.0 Changes 2018-11-05 14:20:46 +01:00
Bas Brands 4f42ca11ff MDL-63675 block_myoverview: IE11 card size issues 2018-11-05 13:43:52 +01:00
Eloy Lafuente (stronk7) e572007248 Merge branch 'MDL-63748-master' of git://github.com/jleyva/moodle 2018-11-05 13:11:17 +01:00
David Monllao 0422a13c90 Merge branch 'MDL-63764-master' of git://github.com/mickhawkins/moodle 2018-11-05 12:46:12 +01:00
David Monllao 83868e1416 Merge branch 'MDL-63739-master' of git://github.com/jleyva/moodle 2018-11-05 11:19:32 +01:00
David Monllao d9c54de37f Merge branch 'MDL-63700-master' of git://github.com/mickhawkins/moodle 2018-11-05 11:13:51 +01:00
Mihail Geshoski c13c4569a9 MDL-62563 privacy: Create delete data request for existing deleted users 2018-11-05 16:20:37 +08:00
Mihail Geshoski 9fade7ff13 MDL-62563 privacy: Add unit tests 2018-11-05 16:20:06 +08:00
Damyon Wiese 17af25ce92 MDL-44137 group: fix stdClass name
Fix only for new core_group_update_groups webservice.
2018-11-05 15:09:47 +08:00
Damyon Wiese f6ca9ca691 Merge branch 'MDL-44137_add_update-groups_webservice' of https://github.com/TheVirtualLtd/moodle 2018-11-05 15:07:26 +08:00
Andrew Nicols 19716edd9c Merge branch 'MDL-63689-master-workshopprivacy' of git://github.com/mudrd8mz/moodle 2018-11-05 14:54:09 +08:00
Damyon Wiese 4f26d21886 Merge branch 'MDL-63717-master' of git://github.com/jleyva/moodle 2018-11-05 13:45:25 +08:00
Andrew Nicols 5b2856864d Merge branch 'MDL-63564-master' of git://github.com/mihailges/moodle 2018-11-05 12:57:48 +08:00
Mark Nelson 27024d830c MDL-63839 core_message: use component name for Behat tag 2018-11-05 10:35:51 +08:00
Damyon Wiese 842138a7cb Merge branch 'MDL-63827' of https://github.com/timhunt/moodle 2018-11-05 10:28:11 +08:00
Andrew Nicols 5aed9a4e26 Merge branch 'MDL-63772' of https://github.com/timhunt/moodle 2018-11-05 09:36:09 +08:00
Andrew Nicols e4384a6a56 Merge branch 'MDL-63712-master' of git://github.com/mickhawkins/moodle 2018-11-05 09:33:42 +08:00
Eloy Lafuente (stronk7) 65c8a8a899 Merge branch 'MDL-63818-master-2' of git://github.com/andrewnicols/moodle 2018-11-05 00:02:56 +01:00
Matteo Scaramuccia 13719f2ebb MDL-63789 search_solr: use proxy creds, if any
Also use proxy port, IF any.
2018-11-02 23:13:15 +01:00
Eloy Lafuente (stronk7) bebef89174 on-demand release 3.6dev+ 2018-11-02 21:08:46 +01:00
Eloy Lafuente (stronk7) ef9073bb66 NOBUG: Fixed file access permissions 2018-11-02 21:08:46 +01:00
Eloy Lafuente (stronk7) 0a33e41562 NOBUG: Fixed SVG browser compatibility 2018-11-02 21:08:44 +01:00
Adrian Greeve d5f8687a92 MDL-63711 core_grades: Delete data for specified users in a context. 2018-11-03 02:26:24 +08:00
Juan Leyva d9714b1ff9 MDL-63748 core_auth: Fix redirect parameter being ignored 2018-11-02 15:16:02 +01:00
Juan Leyva 818d40a922 MDL-63717 tool_mobile: Ensure URLs are valid
We need to clean the URLs returned by the get_public_config WS because some old plugins didn't validate the stored data.
2018-11-02 14:37:29 +01:00
Juan Leyva 8e7b8cf08f MDL-63739 core_enrol: Add completion criteria, hiden and favourited data 2018-11-02 12:10:57 +01:00
Mihail Geshoski 076288307f MDL-63564 core_question: Avoid using UNION in get_users_in_context() 2018-11-02 14:14:19 +08:00
Shamim Rezaie 6cd2de3ceb MDL-63564 mod_quiz: Added delete_quizaccess_data_for_users to polyfill
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:04:25 +08:00
Shamim Rezaie 0db66dcf5d MDL-63564 mod_quiz: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-11-02 14:04:23 +08:00
Shamim Rezaie 92d26b3940 MDL-63564 mod_quiz: Added quizaccess_user_provider interface
This issue is a part of the MDL-62560 Epic.
2018-11-02 13:56:02 +08:00
Shamim Rezaie bdba3b97fd MDL-63564 question: Add helper to fetch users in context
This issue is a part of the MDL-62560 Epic.
2018-11-02 13:56:01 +08:00
Shamim Rezaie c8aff683cb MDL-63564 core_question: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-11-02 13:56:01 +08:00
Andrew Nicols d1d7d1396a Merge branch 'MDL-63701-master-1' of git://github.com/mihailges/moodle 2018-11-02 12:02:58 +08:00
Andrew Nicols 91071ad785 Merge branch 'MDL-63666-master' of git://github.com/mihailges/moodle 2018-11-02 10:46:33 +08:00
Peter 645cb7dd0f MDL-63457 block_myoverview: Bug fixes
* Updated bootstrap theme to match boost
* Fix up logical errors in js
2018-11-02 10:44:32 +08:00
Damyon Wiese fb3ab37a67 Merge branch 'MDL-63549-master' of https://github.com/snake/moodle 2018-11-02 10:17:54 +08:00
Jake Dallimore aa74835164 MDL-63549 core_message: exclude conversations where all messages deleted
If there are no recent messages for an individual conversation for the
user, then we exclude that conversation from the results.
2018-11-02 10:10:37 +08:00
Mihail Geshoski d638ab7c50 MDL-63666 logging: Rename delete_data_for_all_users() function 2018-11-02 09:17:24 +08:00
Andrew Nicols 3dd49ad738 MDL-63842 core_user: Remove unnecessary DB fetch 2018-11-02 09:07:18 +08:00
Adrian Greeve ac7d086d1d MDL-63666 logging: Add support for removal of context users.
This creates a new interface for the logging subplugins to
implement for the users to be deleted separately.
2018-11-02 08:57:43 +08:00
Andrew Nicols ec859d9f4b Merge branch 'MDL-63703-master-1' of git://github.com/mihailges/moodle 2018-11-02 08:56:40 +08:00
Andrew Nicols 08a3564f93 Merge branch 'MDL-63738' of https://github.com/timhunt/moodle 2018-11-02 08:43:53 +08:00
Andrew Nicols dc2e54696b MDL-63702 core_block: Correct phpdoc for get_users 2018-11-02 08:34:20 +08:00
Andrew Nicols 4dbae58e87 MDL-63422 blog: Correct phpdoc for get_users 2018-11-02 08:34:20 +08:00
Andrew Nicols f8e364e31a Merge branch 'MDL-63422' of git://github.com/stronk7/moodle 2018-11-02 08:22:33 +08:00
Andrew Nicols bdccab4769 Merge branch 'MDL-63816-master' of git://github.com/mickhawkins/moodle 2018-11-02 08:00:32 +08:00
Eloy Lafuente (stronk7) 8037dd6c15 Merge branch 'MDL-63746-master' of git://github.com/damyon/moodle 2018-11-01 15:38:08 +01:00
Andrew Nicols 74a938c353 MDL-63818 core: Add all relevant module context caps
This change ensures that all capabilities at module context level are
shown within a module, only filtering out those which belong to another
module or the subplugins of another module.

This has the effect that module-level capabilities are included
providing they relate to
- the module being queried
- any subplugin of that module
- any capability at module level which does not belong to another module
  or its subplugin
- any other explicitly included capability

This allows permissions to be defined on a capability at a context
level.
2018-11-01 20:51:18 +08:00
Tim Hunt f4ef234544 MDL-63772 atto_recordrtc: capabilities to control who can record what 2018-11-01 09:53:17 +00:00
Michael Hawkins b8bbef0a9b MDL-63712 core_message: Unit test improvements for fetching context/user
This issue is part of the MDL-62560 Epic.
2018-11-01 16:51:12 +08:00
Jun Pataleta d0b05c8d05 Merge branch 'MDL-63725_master' of git://github.com/markn86/moodle 2018-11-01 16:11:06 +08:00
Mark Nelson bc667050a4 MDL-63725 core_message: do not allow access to all conversation members 2018-11-01 15:56:07 +08:00
Damyon Wiese c3e419e4dc MDL-63063 block_recentlyaccesseditems: CSS
Only show more than one row of items when the block is displayed in a narrow column.

Fix for boost theme only because of the second block region on the dashboard.
2018-11-01 15:31:32 +08:00
Andrew Nicols 033adb0242 MDL-63457 block_myoverview: Whitespace fix 2018-11-01 15:10:10 +08:00
Andrew Nicols f3d077d0a7 Merge branch 'MDL-63457-master' of git://github.com/peterRd/moodle 2018-11-01 15:03:34 +08:00
Mihail Geshoski 0a1c6cbacf MDL-63701 editor_atto: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-11-01 14:20:04 +08:00
Peter fd955097e4 MDL-63457 block_myoverview: JS update to avoid constant network requests
* Expose paged content factory to trigger last page updates
* Remove repetitive network requests on hide/show courses
* Manually do paged dataset modification
2018-11-01 13:36:52 +08:00
Damyon Wiese bbbf9667c0 Merge branch 'MDL-63063-master-block' of https://github.com/vmdef/moodle 2018-11-01 12:57:55 +08:00
Shamim Rezaie ba81c26c79 MDL-63712 core_message: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-11-01 12:43:21 +08:00
Shamim Rezaie 5233429642 MDL-63712 core_message: Data should be in user context, not system
This issue is a part of the MDL-62560 Epic.
2018-11-01 12:43:14 +08:00
Jun Pataleta 67d2082849 Merge branch 'MDL-63725_master' of git://github.com/markn86/moodle 2018-11-01 12:39:43 +08:00
Mihail Geshoski 8420c3bbc2 MDL-63703 core_role: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-11-01 12:12:49 +08:00
Mark Nelson 5584c48a33 MDL-63725 core_message: added get_conversation_members web service 2018-11-01 11:18:20 +08:00
Mark Nelson 6ecd6e5ba8 MDL-63725 core_message: added api::get_conversation_members 2018-11-01 11:18:20 +08:00
Damyon Wiese f9efe1bb10 MDL-63746 boost: Dropdown menu styles
Remove btn styling from menu buttons as the additional padding makes things not line up.
2018-11-01 11:03:13 +08:00
Andrew Nicols e146e1133b Merge branch 'MDL-63566-master' of git://github.com/mickhawkins/moodle 2018-11-01 10:11:33 +08:00
Adrian Greeve 7a35413d16 MDL-63566 tool_dataprivacy: New interface check for userlist.
This adds another check to see if the plugins are implementing the
new core_userlist_provider.
2018-11-01 10:06:45 +08:00
Jun Pataleta 3beb545baf Merge branch 'MDL-63826' of git://github.com/stronk7/moodle 2018-11-01 09:28:45 +08:00
Andrew Nicols 2badbd52a0 Merge branch 'MDL-63064-master' of git://github.com/lameze/moodle 2018-11-01 09:16:39 +08:00
Damyon Wiese 1becffad44 Merge branch 'MDL-63549-master' of https://github.com/snake/moodle 2018-11-01 09:03:06 +08:00
Eloy Lafuente (stronk7) 9c0e123af0 MDL-63826 tests: Don't rely on random array keys for testing 2018-11-01 00:28:35 +01:00
Andrew Nicols 7b70c6bc48 Merge branch 'm36_MDL-63727_Wrong_SCO_Launched_Link' of https://github.com/scara/moodle 2018-11-01 07:01:13 +08:00
Robynstar 474dd887d0 MDL-44137 group: add update_groups webservice function 2018-11-01 11:52:03 +13:00
Matteo Scaramuccia f9df004724 MDL-63727 mod_scorm: Fixed typo in test_launch_sco() 2018-10-31 21:47:45 +01:00
Davo Smith 54a5cc6187 MDL-63727 mod_scorm: fix typo in sco_launched URL 2018-10-31 21:39:34 +01:00
Bas Brands 0ec602615d MDL-63064 block_starredcourses: horizontal scroll, load all courses 2018-10-31 13:51:13 -04:00
Tim Hunt 3a8cde29a4 MDL-63827 qformat_gift: fix notice when importing categories 2018-10-31 15:14:51 +00:00
lameze bdde16014d MDL-63064 block_starredcourses: fix linting issues 2018-10-31 10:51:05 -04:00
Bas Brands 5c6db8d956 MDL-63064 block_starredcourses: move lang strings to core_course
AMOS BEGIN
 MOV [aria:courseimage,block_myoverview],[aria:courseimage,core_course]
 MOV [aria:coursename,block_myoverview],[aria:coursename,core_course]
 MOV [aria:favourite,block_myoverview],[aria:favourite,core_course]
 MOV [favourite,block_myoverview],[favourite,core_course]
 MOV [notfavourite,block_myoverview],[notfavourite,core_course]
AMOS END
2018-10-31 10:44:30 -04:00
Bas Brands f6c6f215be MDL-63064 block_starredcourses: move favouriteicon template 2018-10-31 10:44:20 -04:00
lameze 51437e5f6d MDL-63064 block_starredcourses: make starred block style consistent
This commit remove an unused template and some custom css that has been added
previously and now is no longer necessary.
2018-10-31 10:44:16 -04:00
lameze 8730c0619c MDL-63064 block_starredcourses: remove pagination from main module
This commit also removes the userid attribute handling on templates, JS and from the webservices
setting the logged user as user id on the webservice side.
2018-10-31 10:44:13 -04:00
lameze 07fdb5a0a3 MDL-63064 block_starredcourses: change events to use pubsub 2018-10-31 10:44:08 -04:00
lameze d5d7699b87 MDL-63064 block_starredcourses: reload the content when a course is starred 2018-10-31 10:44:05 -04:00
lameze 0bb6f0b719 MDL-63064 block_myoverview: trigger event when course is starred 2018-10-31 10:44:03 -04:00
lameze 115ce6babf MDL-63064 core: add starred courses block to plugin list 2018-10-31 10:44:01 -04:00
lameze b9c56f82a1 MDL-63064 block_starredcourses: implement null provider 2018-10-31 10:43:59 -04:00
lameze 0e033f6ee1 MDL-63064 block_starredcourses: block functionality 2018-10-31 10:43:56 -04:00
lameze e1a35e19d3 MDL-63064 block_starredcourses: create block structure 2018-10-31 10:43:36 -04:00
Víctor Déniz Falcón 78e07cbcf0 MDL-63063 recentlyaccesseditems: fully contained block 2018-10-31 11:53:02 +00:00
David Monllao 8aae5e1a31 Merge branch 'MDL-63815-master' of git://github.com/bmbrands/moodle 2018-10-31 11:42:46 +01:00
David Monllao 30916022ca Merge branch 'MDL-59454-master' of https://github.com/lucaboesch/moodle 2018-10-31 11:40:08 +01:00
David Monllao 07a64c681a Merge branch 'MDL-63726-master' of https://github.com/lucaboesch/moodle 2018-10-31 10:17:29 +01:00
Bas Brands 1b1a29532d MDL-63815 core_my: transparent bg for my page header 2018-10-31 09:07:39 +01:00
Jun Pataleta 52d575b396 Merge branch 'MDL-63820' of git://github.com/albertgasset/moodle 2018-10-31 16:01:40 +08:00
Andrew Nicols 07b420a39f Merge branch 'MDL-63684-master-1' of git://github.com/mihailges/moodle 2018-10-31 15:02:24 +08:00
Damyon Wiese 554c7916c0 Merge branch 'MDL-58943-master-revised' of github.com:damyon/moodle 2018-10-31 14:39:36 +08:00
Damyon Wiese e8da9f7fdf MDL-58943 repository_nextcloud: Remove return types
FILE_EXTERNAL and FILE_REFERENCE are not supported at this time.

Minor php coding style changes.
2018-10-31 14:38:28 +08:00
Mihail Geshoski 77134a08b2 MDL-63684 core_calendar: Fix test_get_contexts_for_userid() test
This issue is part of the MDL-62560 Epic.
2018-10-31 14:10:47 +08:00
Mihail Geshoski c844eafd6f MDL-63684 core_calendar: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-31 14:10:08 +08:00
Andrew Nicols cac50a5cba Merge branch 'MDL-63702-master' of git://github.com/mihailges/moodle 2018-10-31 14:04:08 +08:00
David Monllao 57c2400b07 Merge branch 'MDL-62601-master' of git://github.com/andrewnicols/moodle 2018-10-31 06:47:16 +01:00
Andrew Nicols 5efa9f4653 MDL-62601 core_privacy: Ensure providers can handle deleted users 2018-10-31 13:45:00 +08:00
Andrew Nicols 801c6bcfca MDL-62601 editor_atto: Do not use context_user 2018-10-31 13:45:00 +08:00
Michael Hawkins 1170b1e0aa MDL-63700 core_analytics: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-31 13:40:51 +08:00
David Monllao df9813c25b Merge branch 'MDL-63582-master' of https://github.com/lucaboesch/moodle 2018-10-31 06:09:07 +01:00
Jun Pataleta 3841786272 Merge branch 'MDL-63690-master-integration' of git://github.com/mihailges/moodle 2018-10-31 12:54:24 +08:00
Michael Hawkins b16a3388bb MDL-63816 privacy: Corrected provider get_users_in_context descriptions 2018-10-31 12:13:30 +08:00
Michael Hawkins 52e5c8b739 MDL-63816 privacy: Corrected interface get_users_in_context description 2018-10-31 12:11:21 +08:00
Mihail Geshoski 4acdbe5d0b MDL-63690 core_blog: Handle when user blog posts are not being returned 2018-10-31 11:44:09 +08:00
Jun Pataleta 3b0dbe2b64 Merge branch 'MDL-60897-master' of git://github.com/junpataleta/moodle 2018-10-31 11:34:54 +08:00
Andrew Nicols 7f56f4bfba Merge branch 'MDL-63624-master' of git://github.com/mihailges/moodle 2018-10-31 11:15:24 +08:00
Mihail Geshoski 3c0290a9fb MDL-63624 tool_cohortroles: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-31 11:08:49 +08:00
Jake Dallimore eb35e0b176 MDL-63549 core_message: deprecate data_for_messagearea_conversations 2018-10-31 10:55:34 +08:00
Jan Dageförde 4354a4286a MDL-58943 nextcloud: translatable exception messages 2018-10-31 10:42:58 +08:00
Jan Dageförde daef88213b MDL-58943 oauth2: use standard way of URL validation 2018-10-31 10:42:58 +08:00
Tobias Reischmann 3e3e120d3a MDL-58943 oauth2: Added nextcloud to standard issuers
* New button allows to create standard issuer for nextcloud
* Since the endpoints url has to be https and nextcloud relys on the
baseurl to create the endpoints, the baseurl of issuers has now to be
https as well (or empty).
* Google's baseurl was changed to https (there was no reason not to),
whereas Facebook and Microsoft baseurls remain empty.
* In case of the creation of a nextcloud issuer, the baseurl is
required.
* Nextcloud requires the baseurl, therefore a parameter is added to
create_standard_issuer($type, $baseurl = false). That parameter not
required (or used) for anything but Nextcloud.
2018-10-31 10:42:58 +08:00
Tobias Reischmann fa6cd89b24 MDL-58943 oauth2: Split issuer initialization from endpoint creation
* Splitted the initialization of default values for issuers, the
creation of the issuer, and the creation of its endpoints. This is
a fix for following use case:
 1. A user creates a standard issuer.
 2. She cancels the form.
 3. However, the issuer was already created. Thus, the cancel had no
effect.
* The function create_standard_issuer($type) can still be used to create
issuers programmatically if all required data is known beforehand (e.g.,
during upgrade or in tests).
2018-10-31 10:42:57 +08:00
Jan Dageförde f6df2a884e MDL-58943 repository: Add repository_nextcloud to core plugins 2018-10-31 10:42:57 +08:00
Nina Herrmann b4e24a82db MDL-58943 repository: Add repository_nextcloud
Based on repository_owncloud from
https://github.com/learnweb/moodle-repository_owncloud at 5b5fdbb.
Differences to the original:

* Renamed to repository_nextcloud
* Updated version.php for core
* Removed compatibility polyfills (webdav, privacy)
* Removed boilerplate files (e.g. README, CI config)
* Implement null_provider for privacy API as personal data is neither
  stored nor transmitted to the external system
2018-10-31 10:42:57 +08:00
Adrian Greeve 98f8c082de MDL-63702 core_block: Update to use new userlist interface.
This allows user data to be deleted on a role basis.
2018-10-31 10:01:44 +08:00
Jun Pataleta 6ffeabfdff MDL-60897 qtype_multianswer: Code style fixes
And Behat steps improvement, too!
2018-10-31 09:33:23 +08:00
Jean-Michel Vedrine 09fc929e13 MDL-60897 qtype_multianswer: Invalid cloze-questions saved to db 2018-10-31 09:29:53 +08:00
Andrew Nicols 244c0e10f9 Merge branch 'MDL-63530-master-2' of git://github.com/mihailges/moodle 2018-10-31 09:02:08 +08:00
Andrew Nicols 4b7418d3b0 Merge branch 'MDL-63606-master-2' of git://github.com/mihailges/moodle 2018-10-31 08:51:35 +08:00
Andrew Nicols 17109340cc Merge branch 'MDL-63690-master' of git://github.com/mihailges/moodle 2018-10-31 08:20:31 +08:00
Jake Dallimore 6f31927af8 MDL-63549 core_message: add get_conversations web service 2018-10-31 08:16:32 +08:00
Jake Dallimore eb5865da8b MDL-63549 core_message: add group support to api::get_conversations
- Added support for returning group conversations
- Added support for conversation type filtering
- Added support for NO favourites, or ONLY favourites restrictions.
2018-10-31 08:16:31 +08:00
Andrew Nicols de49fdb774 Merge branch 'MDL-63781' of https://github.com/timhunt/moodle 2018-10-31 08:15:43 +08:00
Eloy Lafuente (stronk7) f3507f5982 Merge branch 'MDL-61197-master' of git://github.com/jleyva/moodle 2018-10-31 00:22:30 +01:00
Eloy Lafuente (stronk7) b702dbf6dd MDL-63422 lib: lessphp - review core loop / switch / case / continue 2018-10-31 00:17:59 +01:00
Eloy Lafuente (stronk7) 77331aed27 MDL-63422 lib: horde - review core loop / switch / case / continue 2018-10-31 00:17:59 +01:00
Eloy Lafuente (stronk7) ed24d21b78 MDL-63422 lib: tcpdf - review core loop / switch / case / continue 2018-10-31 00:17:59 +01:00
Eloy Lafuente (stronk7) 0d2d2b9886 MDL-63422 auth_cas: review core loop / switch / case / continue
Created https://github.com/apereo/phpCAS/pull/278 upstream, applied locally.
2018-10-31 00:17:59 +01:00
Eloy Lafuente (stronk7) bd5fdcfccd MDL-63422 general: review core loop / switch / case / continue
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:

- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.

The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
  change to continue 2
- When it was not clear, keep old behavior switching to break, no
  matter how weird the behavior may be.
2018-10-31 00:17:59 +01:00
Luca Bösch e5abe2afbf MDL-59454 core_user: Download user table in the available formats. 2018-10-30 22:55:51 +01:00
Luca Bösch abc469dd3b MDL-63726 tool_dataprivacy: En-/disable 'Data retention summary' link 2018-10-30 22:52:54 +01:00
Luca Bösch 2eec5251af MDL-63582 theme_boost: Fix the license field in the file picker width. 2018-10-30 22:42:47 +01:00
Eloy Lafuente (stronk7) 8b019fb709 on-demand release 3.6dev+ 2018-10-30 18:24:14 +01:00
Eloy Lafuente (stronk7) 4ea6f848fa NOBUG: Fixed file access permissions 2018-10-30 18:24:14 +01:00
Eloy Lafuente (stronk7) 3f32559999 Merge branch 'MDL-63522-master' of git://github.com/jleyva/moodle 2018-10-30 18:01:10 +01:00
Juan Leyva 716c103d49 MDL-63522 course: Restore config and static cache 2018-10-30 17:35:46 +01:00
Albert Gasset 577fdc3438 MDL-63820 assignfeedback_comments: Implement get_file_areas 2018-10-30 15:25:58 +01:00
David Mudrák 6c999842af MDL-63689 workshop: Add support for removal of multiple context users
The mod_workshop\privacy\provider now implements the new
core_userlist_provider interface. Deleting (erasing) data follows the
same principles as in other existing methods - we do not actually delete
data that might affect other users. Instead, we only erase the sensitive
owned personal information such as provided content.
2018-10-30 14:29:40 +01:00
Tim Hunt a6c2bc5474 MDL-63781 qtype_ddmarker: fix changing shape type on editing form in IE 2018-10-30 10:32:09 +00:00
Juan Leyva 6f89b33bdb MDL-61197 core_group: Fix groupings not being filtered 2018-10-30 10:22:58 +01:00
Juan Leyva b8a3567407 MDL-61197 core_group: Refactor get_course_user_groups to get all groups
This is a refactor of the function to be able to get all the user
course groups in just one call
2018-10-30 10:22:58 +01:00
Mihail Geshoski 541982c01e MDL-63606 core_badges: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-30 16:41:44 +08:00
Mihail Geshoski fd45ae4566 MDL-63530 core_notes: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-30 16:18:24 +08:00
Jun Pataleta a78e94257a Merge branch 'MDL-63813-master' of git://github.com/andrewnicols/moodle 2018-10-30 15:32:32 +08:00
Andrew Nicols 98f65cf665 MDL-63813 theme_bootstrapbase: Give page buttons height+width
Elements iwth an inline display type have no height, or width, which
makes it impossible for behat to interact with them.
2018-10-30 13:04:24 +08:00
Andrew Nicols 5bfa505fba Merge branch 'MDL-63634-master' of git://github.com/rezaies/moodle 2018-10-30 12:00:18 +08:00
Andrew Nicols e538fc1549 Merge branch 'MDL-63626-master' of git://github.com/rezaies/moodle 2018-10-30 10:57:42 +08:00
Jun Pataleta ae29ec8d13 Merge branch 'MDL-63531-master' of git://github.com/andrewnicols/moodle 2018-10-30 10:50:52 +08:00
Adrian Greeve d2148f32ca MDL-63531 privacy: Update to comments provider to simplfy sql.
This updates the get_users_in_context_from_sql query to include
the context id to simplify the calls made from other components.
2018-10-30 09:47:14 +08:00
Adrian Greeve 6592598f71 MDL-63531 assignfeedback: Update to use the new privacy interface.
This now uses the new interface to allow the deletion of users based
on a context.
2018-10-30 09:47:14 +08:00
Adrian Greeve d8cd86e1b1 MDL-63531 assignsubmission: Update to use the new interface.
This updates the plugins to use the new inteface for deleting
data for users in a context.
2018-10-30 09:47:14 +08:00
Andrew Nicols e974de337d Merge branch 'MDL-63796-master' of git://github.com/ryanwyllie/moodle 2018-10-30 09:38:46 +08:00
Adrian Greeve b96e7fa6b2 MDL-63531 mod_assign: Update mod assign to use new interface.
This introduces a new interface for assign sub-plugins and
updates the mod_assign provider to implement the new general
interface for deleting data for users in a context.
2018-10-30 09:06:12 +08:00
Andrew Nicols e22214b965 Merge branch 'MDL-63656-master' of git://github.com/mickhawkins/moodle 2018-10-30 08:49:56 +08:00
Andrew Nicols 1ac8ae517d Merge branch 'MDL-63742-master' of git://github.com/jleyva/moodle 2018-10-30 07:46:00 +08:00
Eloy Lafuente (stronk7) 038645591a Merge branch 'MDL-63522-master' of git://github.com/jleyva/moodle 2018-10-30 00:00:12 +01:00
Adam Olley edd51eb245 MDL-63811 phpunit: Fix typo in new allowed config variable
Without this, phpunit doesn't allow the pathtophp unit config setting to be set
in config.php as intended.
2018-10-30 09:15:59 +10:30
Eloy Lafuente (stronk7) 82bd1fa000 Merge branch 'MDL-63396-master' of git://github.com/jleyva/moodle 2018-10-29 23:35:31 +01:00
David Monllao 77ac4d8c31 Merge branch 'MDL-63445-master' of git://github.com/bmbrands/moodle 2018-10-29 16:47:45 +01:00
Eloy Lafuente (stronk7) f3d80b483b Merge branch 'MDL-63730-master-enfix' of git://github.com/mudrd8mz/moodle 2018-10-29 13:23:53 +01:00
David Monllao 95a4d796fe Merge branch 'MDL-63698-master' of https://github.com/lucaboesch/moodle 2018-10-29 12:20:52 +01:00
Luca Bösch 9452bddedc MDL-63698 block_myoverview: Summary view course images eq height/width. 2018-10-29 11:43:23 +01:00
Tim Hunt ebf91776d7 MDL-63297 qtype_ddimageortext: re-implement JavaScript in AMD
this kills of a bunch of old YUI code.

Should also make this question type work a bit mroe robustly.
2018-10-29 10:40:51 +00:00
Tim Hunt 616442a2fa MDL-63738 question bank: a link to download a single question 2018-10-29 10:38:24 +00:00
David Monllao 707668287d Merge branch 'MDL-63042-master' of git://github.com/peterRd/moodle 2018-10-29 11:27:16 +01:00
Juan Leyva 2ced73f636 MDL-63396 grade_report: Return locked and overridden info 2018-10-29 11:26:59 +01:00
David Monllao beb86abdff Merge branch 'MDL-63528-master' of git://github.com/junpataleta/moodle 2018-10-29 11:18:02 +01:00
Juan Leyva 1de51367f7 MDL-63522 course: Return completion info in get_course_content WS 2018-10-29 11:11:38 +01:00
Juan Leyva 1206a4878c MDL-63522 course: Return more fields in get_course_content WS
We need those fields on the mobile app to be able to render the course view properly.
2018-10-29 11:10:51 +01:00
David Monllao 4af7cf6bdb Merge branch 'MDL-63698-master' of https://github.com/lucaboesch/moodle 2018-10-29 11:06:41 +01:00
Juan Leyva 6f79370531 MDL-63742 auth: New WS core_auth_resend_confirmation_email 2018-10-29 11:04:02 +01:00
David Monllao 4bd78d79a8 Merge branch 'MDL-63040-master' of git://github.com/peterRd/moodle 2018-10-29 10:42:51 +01:00
Andrew Nicols fca51b97ed Merge branch 'MDL-63043-master' of git://github.com/peterRd/moodle 2018-10-29 14:42:09 +08:00
Michael Hawkins f9d06ed7c9 MDL-63656 tool_messageinbound: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-29 14:13:45 +08:00
Ryan Wyllie 1f3d92c443 MDL-63796 theme_boost: reduce padding of blocks
Reduce the padding of the blocks and revert the margin changes
from MDL-63102.
2018-10-29 14:07:35 +08:00
Michael Hawkins cabea2fc04 MDL-63764 core_competency: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-29 12:59:55 +08:00
Michael Hawkins b03e9322bf MDL-63764 core_competency: Support bulk user delete course competencies
This issue is a part of the MDL-62560 Epic.
Also made user IDs optional, so user course competencies can be deleted by course ID only.
2018-10-29 12:59:55 +08:00
Andrew Nicols 89689e64f4 Merge branch 'MDL-40695-master' of https://github.com/HuongNV13/moodle 2018-10-29 12:28:58 +08:00
Jun Pataleta 5c52b9686f Merge branch 'MDL-63622-master' of git://github.com/andrewnicols/moodle 2018-10-29 11:36:20 +08:00
Andrew Nicols 65c0e336b1 Merge branch 'MDL-63665-master' of git://github.com/rezaies/moodle 2018-10-29 08:42:50 +08:00
Peter 7dcb274c9e MDL-63457 block_myoverview: Update getters for enrolled courses
* Update the enrol courses getter to accept an 'exclude course' id array
* Use the db query to filter hidden courses
2018-10-29 08:36:59 +08:00
Bas Brands fd68f5a9e0 MDL-63457 block_myoverview: Rerender the paged content and jump
Jump to the page the user was last on after hiding
2018-10-29 08:36:59 +08:00
Peter c896546ce7 MDL-63457 block_myoverview: Functionality and test updates
* Add identifiers for each card in the view
* Update js to hide instead of reload block
* Behat test updates
2018-10-29 08:36:59 +08:00
Peter e6f03948d7 MDL-63457 block_myoverview: Hide courses from individual overview blocks
* add new preferences for hidden courses
* Modified course filter to use the user preference
* Behat test
* Regex update
* Toggle hide/show
* Update enrolled_course getter to pass hidden value
* provider
* unit tests
2018-10-29 08:32:05 +08:00
Andrew Nicols d9e56517ca Merge branch 'MDL-63680-master' of git://github.com/mihailges/moodle 2018-10-29 08:21:27 +08:00
Andrew Nicols d4274bd951 Merge branch 'MDL-60520_master' of git://github.com/dmonllao/moodle 2018-10-29 07:39:58 +08:00
Adrian Greeve 980425022b MDL-63622 core_grading: Add support for removal of context users.
Core grading now implements the new core_userlist_provider
interface to allow for deletion of specific users in a context.
2018-10-29 07:37:44 +08:00
Luca Bösch fe149a996a MDL-63698 block_myoverview: Summary view course images eq height/width. 2018-10-27 11:43:58 +02:00
Eloy Lafuente (stronk7) 448bd578d8 on-demand release 3.6dev+ 2018-10-26 18:06:00 +02:00
Eloy Lafuente (stronk7) 6728c963f3 NOBUG: Fixed SVG browser compatibility 2018-10-26 18:05:58 +02:00
David Mudrák 8743cade5b MDL-63730 quiz: Fix unit tests to use the new way of percents display
As agreed in MDL-63186, the English language pack has no space
separating the number and the percents. This patch removes the
regressions from the unit tests.
2018-10-26 14:26:12 +02:00
David Mudrák f5d98e6173 MDL-63730 lang: Update Behat scenarios to use the new strings 2018-10-26 13:25:56 +02:00
Helen Foster 0c19b2c8fa MDL-63730 lang: Merge English strings from the en_fix language pack
Significant string changes:

* withselectedusers_help, core - removing mention of 'Add a common note'
  as the option no longer exists
* considereddigitalminor and digitalminor_desc, core - more
  child-friendly wording
* configmessagingallusers, core_admin - clearer explanation
* auth_dbtype, auth_db - fixed broken link
2018-10-26 12:48:40 +02:00
Shamim Rezaie c0bafa2777 MDL-63634 enrol_paypal: Improve query performance
This issue is a part of the MDL-62560 Epic.
2018-10-26 19:35:57 +11:00
Shamim Rezaie cb21486c66 MDL-63634 enrol_paypal: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-26 19:35:47 +11:00
Eloy Lafuente (stronk7) 51da48f193 Merge branch 'MDL-63765-master' of git://github.com/damyon/moodle 2018-10-26 10:21:43 +02:00
Damyon Wiese cfd390ee94 MDL-63765 behat: Fix behat tests opening a menu
If javascript is disabled, we don't need to open the menus at all. If it is enabled
we should use the custom step where possible.

In some tests (user profile) we have to use link_or_button because
the element that opens the menu will be a link or a button in different themes.
2018-10-26 16:14:41 +08:00
Shamim Rezaie e38dc3d604 MDL-63634 enrol_paypal: Fix a typo in unit tests
This issue is a part of the MDL-62560 Epic.
2018-10-26 18:54:07 +11:00
Shamim Rezaie 8839feb90e MDL-63665 mod_choice: no exception when course_modules doesn't exist
This issue is a part of the MDL-62560 Epic.
2018-10-26 18:48:10 +11:00
Shamim Rezaie b96446f3af MDL-63665 mod_choice: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-26 18:48:02 +11:00
Andrew Nicols 74138e927c Revert "MDL-63466 core_message: rename cache for last message time"
This reverts commit f978593d6c.
2018-10-26 14:54:01 +08:00
Andrew Nicols 4699b8bc41 Revert "MDL-63466 core_message: removed get_last_message_time_created_cache_key"
This reverts commit 4f22d7f23b.
2018-10-26 14:53:58 +08:00
Andrew Nicols 621e7eb022 Merge branch 'MDL-63466-master' of https://github.com/snake/moodle 2018-10-26 12:33:13 +08:00
Jake Dallimore b95e4c786c MDL-63466 core_message: don't reorder messages when formatting
- Removed the reordering code from helper::get_conversation_messages()
- Added unit test confirming sort param behaviour for the
api::get_conversations_messages() method.
2018-10-26 12:26:23 +08:00
Mihail Geshoski 2d64b4154c MDL-63680 report_stats: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-26 12:17:30 +08:00
Andrew Nicols b272efb460 Merge branch 'MDL-63673-master' of git://github.com/mihailges/moodle 2018-10-26 11:40:46 +08:00
Andrew Nicols b8e9448a2c Merge branch 'MDL-63281_master' of git://github.com/markn86/moodle 2018-10-26 11:24:52 +08:00
Andrew Nicols 00fd35a916 Merge branch 'MDL-60514-master-fix' of git://github.com/junpataleta/moodle 2018-10-26 11:06:44 +08:00
Jun Pataleta 96b9975b4b MDL-60514 tool_task: Remove run_task_now.feature
This test cannot be run on Behat anymore as the "Run now" feature
depends on $CFG->pathtophp. Even if it's set, the task executed via
"Run now" will be executed for the installed site itself and not on the
Behat test site.
2018-10-26 11:03:07 +08:00
Andrew Nicols 6f63531458 Merge branch 'MDL-63682-master' of git://github.com/mihailges/moodle 2018-10-26 11:01:28 +08:00
cescobedo 9eba829ae3 MDL-63281 core_message: Sync course group members with conversations 2018-10-26 10:55:59 +08:00
Mihail Geshoski bdf1b47550 MDL-63682 mnetservice_enrol: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-26 10:22:53 +08:00
Andrew Nicols ab2443cdc0 Merge branch 'MDL-63688-master-1' of git://github.com/mihailges/moodle 2018-10-26 10:16:08 +08:00
Mihail Geshoski ed69d0aef1 MDL-63690 core_privacy: Handle when add_users() receives an empty array 2018-10-26 09:16:10 +08:00
Andrew Nicols 79b5095f28 Merge branch 'MDL-63280_master-fix' of git://github.com/markn86/moodle 2018-10-26 09:07:30 +08:00
Adrian Greeve 799d32fd2d MDL-63690 core_blog: Update providers for userlist deletion. 2018-10-26 09:07:01 +08:00
Mark Nelson 06cdb82d23 MDL-63280 core: correct index on upgrade vs install 2018-10-26 08:52:27 +08:00
Andrew Nicols 56076d5991 Merge branch 'MDL-63280_master' of git://github.com/markn86/moodle 2018-10-26 07:49:13 +08:00
Eloy Lafuente (stronk7) 513bb61301 Merge branch 'MDL-62904-master' of git://github.com/junpataleta/moodle 2018-10-26 00:03:43 +02:00
Juan Leyva cde3dc05bc MDL-63694 core_block: Return block contents via WS 2018-10-25 23:42:48 +02:00
Juan Leyva a9732b8977 MDL-63694 block_html: Implement get_content_for_external 2018-10-25 23:42:42 +02:00
Juan Leyva 96d9a6e430 MDL-63694 core_block: New block class method for external content
New method added block_base::get_content_for_external().
It will return all the block contents rendered for external functions.
If your block is returning formatted content or provide files for download,
you should override this method to use the external_format_text,
external_format_string functions for formatting or
external_util::get_area_files for files.
See block_html as example.
2018-10-25 23:41:26 +02:00
Eloy Lafuente (stronk7) da73189b84 Merge branch 'wip-MDL-62411-master' of https://github.com/timhunt/moodle 2018-10-25 12:23:53 +02:00
Tim Hunt 8951e8b970 MDL-62411 qtype_ddmarkers: fix drop-zone editing in IE 2018-10-25 11:08:04 +01:00
Mark Nelson 76540bec52 MDL-63280 core: removed 'message_conversation_area' table
These new fields have been added to the 'message_conversations'
table.
2018-10-25 18:05:20 +08:00
Mark Nelson 5571af1614 MDL-63280 core_message: added constants for enabled/disabled 2018-10-25 17:51:34 +08:00
Mark Nelson f0e137c539 MDL-63280 core: minor changes after review
- Fixed reference to non-existent column 'timeread'.
- Fixed alignment issues.
- Fixed inconsistencies between upgrade.php and install.xml.
- Cleaned unit tests of unnecessary DB calls.
- Renamed 'get_does_conversation_area_enabled' to
  'is_conversation_area_enabled' and moved to api.php.
- Replaced "$mform->elementExists('enablemessaging')"
  check with a capability check.
- Removed the change of [] to array() in unrelated to upgrade code.
- Updated conversation 'timemodified' field when updating name.
- Bumped version based on latest master.
2018-10-25 17:51:04 +08:00
Andrew Nicols 9d4a9e515f Merge branch 'MDL-63552-master' of git://github.com/mickhawkins/moodle 2018-10-25 15:43:12 +08:00
Andrew Nicols 37ef65d47a Merge branch 'MDL-63752' of https://github.com/timhunt/moodle 2018-10-25 15:14:57 +08:00
Andrew Nicols fbf4eaeec0 Merge branch 'MDL-63679-master' of git://github.com/mihailges/moodle 2018-10-25 15:12:50 +08:00
Andrew Nicols c31ac0f5e2 Merge branch 'MDL-63678-master' of git://github.com/mihailges/moodle 2018-10-25 15:11:30 +08:00
Jun Pataleta 35b76161b3 Merge branch 'MDL-60514-master-new-cron-execution' of https://github.com/tonibarbera/moodle 2018-10-25 15:06:47 +08:00
Andrew Nicols c3d1878ff3 Merge branch 'MDL-63655' of git://github.com/stronk7/moodle 2018-10-25 14:53:18 +08:00
Andrew Nicols c7be63a45d MDL-63058 block_myoverview: Whitespace fixes 2018-10-25 14:44:35 +08:00
Andrew Nicols 7583dd6902 MDL-63058 block_myoverview: Whitespace fixes 2018-10-25 14:32:59 +08:00
Toni Barberà Melià c759ae5d55 MDL-60514 tasks: added new config parameter. changes in cron execution 2018-10-25 08:02:44 +02:00
cescobedo e7f467143f MDL-63280 core_message: Create group conversation from group edit page
Allows linking of course groups with conversations when group messaging feature is enabled.
2018-10-25 12:20:00 +08:00
cescobedo 55fda006e3 MDL-63280 core_message: Create conversation area 2018-10-25 12:20:00 +08:00
Andrew Nicols 2263bbdfce Merge branch 'MDL-63058-master' of git://github.com/bmbrands/moodle 2018-10-25 11:49:45 +08:00
Michael Hawkins fc087fd29e MDL-63552 search_solr: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-25 11:41:08 +08:00
Michael Hawkins 4cef924482 MDL-63552 search_simpledb: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
Also added test_get_contexts_for_userid unit test.
2018-10-25 11:41:08 +08:00
Nick Phillips 2070142f46 MDL-63763 javascript: don't have define( in AMD comments at top of files 2018-10-25 16:21:35 +13:00
Damyon Wiese 1524c4d66c Merge branch 'MDL-63755-master' of git://github.com/andrewnicols/moodle 2018-10-25 08:36:49 +08:00
Eloy Lafuente (stronk7) 980ed5424d Merge branch 'MDL-62145-master' of git://github.com/damyon/moodle 2018-10-25 01:35:09 +02:00
Eloy Lafuente (stronk7) 3d18697115 Merge branch 'MDL-63153_master' of https://github.com/aanabit/moodle 2018-10-25 01:11:36 +02:00
Eloy Lafuente (stronk7) 19dbce00a1 Merge branch 'MDL-63714-master' of git://github.com/andrewnicols/moodle 2018-10-25 00:10:45 +02:00
Bas Brands 099049b6ad MDL-63058 block_myoverview: behat fixes and summary view check 2018-10-24 15:02:19 +02:00
Andrew Nicols c7120f7805 MDL-63755 theme_boost: Behat selector fix 2018-10-24 20:16:22 +08:00
Tim Hunt 2d696f8f2b MDL-63752 question import: duplicate key error when idnumbers blank
And extra checks to head off possible idnumber='' issues in two other places.
2018-10-24 11:38:31 +01:00
David Monllao fcc50ccbc3 Merge branch 'MDL-63277' of https://github.com/timhunt/moodle 2018-10-24 10:22:16 +02:00
David Monllao f560f3669e Merge branch 'MDL-63619-master' of git://github.com/andrewnicols/moodle 2018-10-24 09:48:16 +02:00
Andrew Nicols eb514bb3e5 MDL-63714 javascript: Add new core/pending module 2018-10-24 12:49:09 +08:00
Andrew Nicols f0bfedf348 MDL-63714 theme_boost: Fix aria focus behat issues 2018-10-24 12:45:13 +08:00
Andrew Nicols 66de50c366 Merge branch 'wip-MDL-62411-master' of https://github.com/timhunt/moodle 2018-10-24 10:21:42 +08:00
Mark Nelson d1e8e69d85 MDL-63466 core_message: deprecated methods and services 2018-10-24 09:40:07 +08:00
Mark Nelson 4f22d7f23b MDL-63466 core_message: removed get_last_message_time_created_cache_key 2018-10-24 09:39:59 +08:00
Mark Nelson f978593d6c MDL-63466 core_message: rename cache for last message time 2018-10-24 09:39:42 +08:00
Sara Arjona fb04293bb1 MDL-63466 core_message: Add conversation support to get_messages
- The get_conversation_messages has been added to the API and the WS
with the conversation identifier (convid) instead of the userto,
to let get conversation messages and the members involved.
- The cache has been also reviewed, to use the convid instead of the
[userfrom, userto] keys.
- The get_most_recent_conversation_messages has been added to the API
to update the cache when needed.
2018-10-24 09:39:05 +08:00
Sara Arjona d89d0d6593 MDL-63466 core_message: Added format_conversation_messages helper
The format_conversation_messages function has been added. It returns
the messages and the array of users who have sent any of these
messages.
2018-10-24 09:38:10 +08:00
Sara Arjona ecf7567a89 MDL-63466 core_message: Add conversationid to message class 2018-10-24 09:38:01 +08:00
Mihail Geshoski 1d3d4c66df MDL-63688 core_tag: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-24 09:31:19 +08:00
Jake Dallimore 042d804453 MDL-63466 core_message: added a test helper class
Providing util methods for api and externallib testing.
2018-10-24 09:27:34 +08:00
Jake Dallimore 2a2b86f123 MDL-63466 core_message: add helper method for fetching member info
The aim is to use this to standardise the member information we return
from several methods in the API, such as get_conversations,
get_conversation_messages, get_conversation_members, and in search
methods.
2018-10-24 09:23:30 +08:00
Andrew Nicols d95ad08f85 MDL-63619 tool_dataprivacy: Cache purposes in form 2018-10-24 08:48:18 +08:00
Andrew Nicols 3b002c86eb MDL-63619 tool_dataprivacy: Performance improvement 2018-10-24 08:48:18 +08:00
Andrew Nicols d2aed78933 MDL-63619 tool_dataprivacy: Fix inheritance from parent contexts
Inheritance should behave such that all contexts inherit from their
parent context.

Prior to this fix, if the value was not set on a context, then it was
getting a default of 'Inherit', but instead of inheritting from the
parent context, it was inheritting from its parent context _level_ which
is just wrong.
2018-10-24 08:48:18 +08:00
Andrew Nicols 4b7ad8845c MDL-63714 core: Wrap doRender in pendingjs 2018-10-24 08:12:10 +08:00
Andrew Nicols dc39d0cf39 MDL-63714 javascript: Improve docs for pendingjs 2018-10-24 08:00:00 +08:00
Mihail Geshoski 8171cd7f3c MDL-63673 fileconverter_googledrive: Support removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-24 07:02:16 +08:00
David Monllao daf0b4f08b on-demand release 3.6dev+ 2018-10-23 16:42:13 +02:00
David Monllao c45159318c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-10-23 16:42:12 +02:00
Andrew Nicols 8b5e087fc9 Merge branch 'MDL-63408_master-fix' of git://github.com/dmonllao/moodle 2018-10-23 21:23:47 +08:00
David Monllao 4abe3d250f MDL-63408 messaging: Remove duplicated field 2018-10-23 13:44:52 +02:00
David Monllao ccd8a102c7 Merge branch 'MDL-62139-master-fix3' of git://github.com/damyon/moodle 2018-10-23 11:16:47 +02:00
Damyon Wiese 3ed1cec01e MDL-62139 behat: Invalid test
If javascript is disabled, we can't open the menu.
2018-10-23 16:47:20 +08:00
Damyon Wiese a3d57af872 MDL-62139 output: Revert template changes
Revert accessibility changes for menus in standard themes.
2018-10-23 10:14:19 +02:00
Bas Brands a7712a9851 MDL-63445 core_renderer: display course image in context header 2018-10-23 09:41:26 +02:00
Damyon Wiese c8cd967f48 MDL-62139 output: Revert template changes
Revert accessibility changes for menus in standard themes.
2018-10-23 15:40:31 +08:00
Damyon Wiese ff3fc0566c MDL-62139 output: Menus fixes
Change the boost custom behat step to click on a button.

Revert the clean templates to unchanged versions.
2018-10-23 15:27:13 +08:00
Mihail Geshoski cc2b9d6683 MDL-63679 ltiservice_memberships: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 13:33:48 +08:00
Mihail Geshoski 0c088088de MDL-63678 ltiservice_gradebookservices: Support removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 13:04:30 +08:00
Andrew Nicols 5c77966881 MDL-63657 completion: Coding style fix 2018-10-23 11:32:43 +08:00
Andrew Nicols 33a007c4b4 Merge branch 'MDL-63668-master' of git://github.com/mickhawkins/moodle 2018-10-23 11:29:29 +08:00
Andrew Nicols 4b3ca0ebf2 MDL-63657 core_files: Coding style fix 2018-10-23 11:26:02 +08:00
Andrew Nicols 2612cf5673 Merge branch 'MDL-63640-master' of git://github.com/mihailges/moodle 2018-10-23 11:25:21 +08:00
Andrew Nicols e1cc780d90 MDL-63657 tool_mobile: Coding style fix 2018-10-23 11:21:51 +08:00
Andrew Nicols 38259438dd Merge branch 'MDL-63657-master' of git://github.com/mickhawkins/moodle 2018-10-23 11:19:46 +08:00
Andrew Nicols 6a91cc80c9 MDL-63535 core_rss: Coding style fix 2018-10-23 11:15:04 +08:00
Andrew Nicols e186fb407e Merge branch 'MDL-63535-master' of git://github.com/mihailges/moodle 2018-10-23 11:11:22 +08:00
Andrew Nicols 33368fb6d5 MDL-63664 tool_policy: Whitespace fix 2018-10-23 10:54:15 +08:00
Michael Hawkins 1139481e58 MDL-63657 tool_mobile: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:54:14 +08:00
Mihail Geshoski 16ec426a4f MDL-63640 core_files: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-23 10:48:12 +08:00
Mihail Geshoski c61132c6bf MDL-63535 core_userkey: Add method that returns users in context
This issue is part of the MDL-62560 Epic.
2018-10-23 10:46:25 +08:00
Mihail Geshoski cee33e0229 MDL-63535 core_rss: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 10:46:25 +08:00
Andrew Nicols dfb151b2d9 Merge branch 'MDL-63664-master' of git://github.com/mickhawkins/moodle 2018-10-23 10:42:48 +08:00
Andrew Nicols 0ff384dbf1 Merge branch 'MDL-63548_master' of git://github.com/markn86/moodle 2018-10-23 10:25:54 +08:00
Andrew Nicols 1a3fde832a Merge branch 'MDL-63649-master' of git://github.com/rezaies/moodle 2018-10-23 10:14:08 +08:00
Andrew Nicols 34fa5ec414 Merge branch 'MDL-63713-master' of git://github.com/rezaies/moodle 2018-10-23 10:08:32 +08:00
Michael Hawkins 01723da4eb MDL-63668 core_course: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:06:26 +08:00
Michael Hawkins 543c465579 MDL-63668 core_completion: Add get and delete by approved userlist.
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:06:26 +08:00
Michael Hawkins f6843ac966 MDL-63664 tool_policy: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-23 10:02:58 +08:00
Mark Nelson 09ec501781 MDL-63548 core_message: added mark_all_conversation_messages_as_read WS 2018-10-23 09:52:43 +08:00
Mark Nelson abf7a261a9 MDL-63548 core_message: added api::can_mark_all_messages_as_read 2018-10-23 09:52:14 +08:00
Mark Nelson e4c3099444 MDL-63548 core_message: deprecated mark_all_messages_as_read web service 2018-10-23 09:52:05 +08:00
Jun Pataleta fc915d6150 Merge branch 'MDL-62560-master-fix' of git://github.com/andrewnicols/moodle 2018-10-23 09:22:14 +08:00
Shamim Rezaie c37407ba9d MDL-63713 core: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-23 11:55:49 +11:00
Shamim Rezaie 9f8a30c27c MDL-63649 enrol_lti: support removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-23 11:54:41 +11:00
Andrew Nicols 67b813514c Merge branch 'MDL-63408_master' of git://github.com/markn86/moodle 2018-10-23 08:50:40 +08:00
Andrew Nicols e1121c2ed5 MDL-62560 tool_dataprivacy: Behat fix for protected check 2018-10-23 08:17:28 +08:00
Damyon Wiese 59f31c84eb MDL-61391 forum: Improve semantics for permalinks
Replace the anchor tags in forum posts containing the postid but no href with
an id on the element containing the post. Use rel="bookmark" for perma links
and update the styling so they look visually the same.
2018-10-23 08:17:28 +08:00
Tim Hunt 00f09d8f5c MDL-62411 qtype_ddmarker: fix issues found during review
* Editing the coordinate string now correctly updates the image only if
  the coordinates are valid.
* ... and does the right thing if the number of handles has changed.
* Dragging the shape handles is now constrained so that you cannot
  create a shape that goes beyond the edge of the image.
* The PHP validation that the shape is within the imagehas also been
  fixed.
* For Mac users, CMD+Click duplicates the handle like CTRL+Click.
* Ensure the shape being edited is always on top of the otehrs.
2018-10-22 18:40:02 +01:00
Bas Brands 4fd6b77043 MDL-63058 block_myoverview: allowing reuse of css classes 2018-10-22 19:28:23 +02:00
David Monllao 72e72dd93f Merge branch 'MDL-61391-master' of git://github.com/damyon/moodle 2018-10-22 16:50:47 +02:00
David Monllao 64a00dffbd Merge branch 'MDL-61388-master' of git://github.com/damyon/moodle 2018-10-22 16:48:56 +02:00
David Monllao 7e5f0fa66a Merge branch 'MDL-62144-master' of git://github.com/damyon/moodle 2018-10-22 16:33:17 +02:00
David Monllao 14f70eda28 Merge branch 'MDL-62309-master-optionalpolicies' of git://github.com/mudrd8mz/moodle 2018-10-22 16:28:41 +02:00
David Monllao d10643fbe6 Merge branch 'MDL-63625-master' of git://github.com/marinaglancy/moodle 2018-10-22 14:41:12 +02:00
David Monllao 57846fd010 Merge branch 'MDL-61052-master' of git://github.com/damyon/moodle 2018-10-22 14:36:23 +02:00
David Monllao ba0a68e254 MDL-60520 analytics: Set predictor at model level during testing 2018-10-22 13:58:33 +02:00
David Monllao d44ce97fe1 MDL-60520 analytics: Do not block model updates if the backend is down 2018-10-22 13:58:33 +02:00
David Monllao ed12ba6ba8 MDL-60520 analytics: Per-model ml backend 2018-10-22 13:58:33 +02:00
David Monllao f7642bebc5 Merge branch 'MDL-62560-master' 2018-10-22 12:52:58 +02:00
Andrew Nicols 9e217d8441 MDL-62560 tool_dataprivacy: Add a purpose override cache 2018-10-22 12:50:16 +02:00
Andrew Nicols b519dab3bd MDL-62560 tool_dataprivacy: Fetch user purpose once 2018-10-22 12:50:16 +02:00
Andrew Nicols a1d51ad8c6 MDL-62560 tool_dataprivacy: Add status logging 2018-10-22 12:50:16 +02:00
Andrew Nicols efbb82ac31 MDL-62560 tool_dataprivacy: Add unit test for filtered userlist 2018-10-22 12:50:15 +02:00
Mihail Geshoski 82264289c5 MDL-63636 block_recent_activity: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:15 +02:00
Mihail Geshoski 0395106340 MDL-63621 core_cohort: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:14 +02:00
Mihail Geshoski eff881a41b MDL-63633 block_comments: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:14 +02:00
Mihail Geshoski 4fc10f50fa MDL-63635 block_community: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:14 +02:00
Mihail Geshoski 8b9c13ed5c MDL-63593 auth_mnet: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:13 +02:00
Mihail Geshoski 60f3eec644 MDL-63592 auth_oauth2: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:13 +02:00
Mihail Geshoski 5038a863e7 MDL-63637 block_rss_client: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:12 +02:00
Mihail Geshoski 380860c0a9 MDL-63638 block_tag_flickr: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:12 +02:00
Mihail Geshoski 1ba1fcf838 MDL-63639 core_fileconverter: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:11 +02:00
Shamim Rezaie acaacb6c49 MDL-63647 enrol_flatfile: Improving existing unit tests
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:50:11 +02:00
Shamim Rezaie e4290b4945 MDL-63647 enrol_flatfile: support removal of multiple users in context
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:50:11 +02:00
Michael Hawkins 46bb823e04 MDL-63659 tool_monitor: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:50:10 +02:00
Mihail Geshoski 325d9b50e2 MDL-63615 message_airnotifier: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:10 +02:00
Mihail Geshoski 99ed2697bd MDL-63616 message_email: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:09 +02:00
Mihail Geshoski cb5ba9b873 MDL-63617 message_jabber: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:09 +02:00
Adrian Greeve 64d1b61a4c MDL-63618 core_plagiarism: Added support to remove users in a context.
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:43 +02:00
Mihail Geshoski 7c3a60bc25 MDL-63572 profilefield_checkbox: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:43 +02:00
Mihail Geshoski 86b5b2f980 MDL-63575 profilefield_datetime: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:42 +02:00
Mihail Geshoski 150156af9e MDL-63586 profilefield_menu: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:42 +02:00
Mihail Geshoski 67280a7658 MDL-63587 profilefield_text: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:42 +02:00
Mihail Geshoski 36d0fd839d MDL-63588 profilefield_textarea: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:41 +02:00
Michael Hawkins 6bd65daa5c MDL-63538 repository_onedrive: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:41 +02:00
Michael Hawkins 589d2bd4cb MDL-63538 repository_youtube: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:40 +02:00
Michael Hawkins d7eaf03898 MDL-63538 repository_wikimedia: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:40 +02:00
Michael Hawkins 3d743dfad3 MDL-63538 repository_picasa: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:39 +02:00
Michael Hawkins 9db4768abe MDL-63538 repository_merlot: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:39 +02:00
Michael Hawkins 580d1449d7 MDL-63538 repository_googledocs: Support removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:38 +02:00
Michael Hawkins a80212142e MDL-63538 repository_flickr_public: Support removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:38 +02:00
Michael Hawkins 42c742eb2e MDL-63538 repository_flickr: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:38 +02:00
Michael Hawkins 6116a831c9 MDL-63538 repository_dropbox: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:37 +02:00
Michael Hawkins 2d15655c47 MDL-63538 repository_boxnet: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:37 +02:00
Mihail Geshoski 3952ace59f MDL-63536 core_repository: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:36 +02:00
Mihail Geshoski d4d28485c7 MDL-63534 core_user: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:36 +02:00
Mihail Geshoski 44a0a2bd66 MDL-63532 core_portfolio: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:35 +02:00
Mihail Geshoski e5c749deed MDL-63529 core_enrol: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:35 +02:00
Michael Hawkins e9ebae7e2a MDL-63514 mod_wiki: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:35 +02:00
Michael Hawkins bd0b6d8693 MDL-63510 mod_survey: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:34 +02:00
Michael Hawkins 6d6e4b7a51 MDL-63501 mod_scorm: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:34 +02:00
Michael Hawkins 630a05c2aa MDL-63497 mod_lesson: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:33 +02:00
Michael Hawkins e917288971 MDL-63497 mod_feedback: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:33 +02:00
Michael Hawkins 55d1ef377c MDL-63497 mod_glossary: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
Also added missing ratings include and test to mod_glossary unit tests.
2018-10-22 12:48:33 +02:00
Michael Hawkins dcdd4f1053 MDL-63497 tool_dataprivacy: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:32 +02:00
Michael Hawkins 7b5fcbd883 MDL-63497 block_html: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-22 12:48:32 +02:00
Michael Hawkins 464b17b79b MDL-63497 mod_chat: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:31 +02:00
Shamim Rezaie 19fc6012cf MDL-63554 cachestore_session: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:31 +02:00
Shamim Rezaie 936c06f8bb MDL-63554 cachestore_redis: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:30 +02:00
Shamim Rezaie a42c9a71bb MDL-63554 cachestore_mongodb: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:30 +02:00
Shamim Rezaie 81684f7c8b MDL-63554 cachestore_memcached: Support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:30 +02:00
Shamim Rezaie b36687b5e2 MDL-63500 enrol_cohort: refactoring get_contexts_for_userid
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:29 +02:00
Shamim Rezaie e66a60b9c0 MDL-63500 enrol_meta: refactoring get_contexts_for_userid
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:29 +02:00
Shamim Rezaie 89d468eb39 MDL-63500 core_group: get_contexts_for_userid should respect component
The get_contexts_for_userid method should not return contexts for all group memberships.
It should only return the contexts in where there is manual group
membership.

This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:28 +02:00
Shamim Rezaie 882c53dc14 MDL-63500 enrol_cohort: Support for removal of multiple context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:28 +02:00
Shamim Rezaie 8091629306 MDL-63500 enrol_meta: Support for removal of multiple context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:27 +02:00
Shamim Rezaie e114ac6ec0 MDL-63500 core_group: support removal of multiple users in a context
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:27 +02:00
Mihail Geshoski bb65ee165c MDL-63533 core_webservice: Unit tests for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:27 +02:00
Mihail Geshoski 9960e8694d MDL-63533 core_webservice: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:26 +02:00
Adrian Greeve 424976e9d1 MDL-63513 mod_assignment: Add removal of context users.
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:25 +02:00
Michael Hawkins 3b0a3604dc MDL-63498 mod_lti: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:25 +02:00
Michael Hawkins cea5338780 MDL-63495 comment: Added provider::get_users_in_context_from_sql
This issue is part of the MDL-62560 Epic.
2018-10-22 12:48:13 +02:00
Amaia Anabitarte f765fb380a MDL-63153 admin: Adding Moodle services page to Site Administration 2018-10-22 11:08:27 +02:00
David Mudrák aa7e539c6f MDL-62309 tool_policy: Add Behat scenarios for the optional policies 2018-10-22 08:49:36 +02:00
David Mudrák 222c378870 MDL-62309 tool_policy: Amend behaviour of handler's accept() method
When accepting the policies via the sitepolicy handler, only compulsory
policies are to be marked as accepted. Optional policies will be left as
pending. Users must express their consent explicitly for them.

As a side product of the change, unit tests are added for the whole
handler class.
2018-10-22 08:49:36 +02:00
David Mudrák ad5e2135c5 MDL-62309 tool_policy: Improve permission evaluation methods
Please refer to the unit tests for the specification of the expected
behaviour.
2018-10-22 08:49:36 +02:00
David Mudrák 4a742e4f94 MDL-62309 tool_policy: Update user acceptances reports
This adds support for optional policies to the user acceptance reports.
Distinguished are "Pending" acceptances (we did not hear yet) from
"Declined" (user did not agree). The status workflow updated to support
new transitions: pending -> declined and declined -> accepted.
2018-10-22 08:49:36 +02:00
David Mudrák 56390aa246 MDL-62309 tool_policy: New icons for user acceptances report
There was an accessibility issue with the previous icons that we used
the same "checked" shape just in different colours for different
meanings. New icons added for the new statuses:

* partial - a warning icon for the overall status column that the user
  has only some policies accepted, not all.
* pending - that we did not hear yet from the user - whcih is different
  from a declined policy.
2018-10-22 08:49:36 +02:00
David Mudrák 5348b1eef5 MDL-62309 tool_policy: Optional policies can be declined by the user
For optional policies, we provide a radio selector to let the user
choose the acceptance status on the consent page. For policies displayed
on their own page, we display a link to decline the policy.

The way how we pass the list of policy version ids to index.php has
changed so that we can now not only pass the list of ids, but also the
actual acceptance status (accepted / declined).
2018-10-22 08:49:36 +02:00
David Mudrák faf4222edc MDL-62309 tool_policy: Add api::get_agreement_optional() method
This method allows to quickly check if the given policy version is
marked as optional or compulsory. This will be needed in other places
such as permissions check.
2018-10-22 08:49:36 +02:00
David Mudrák 1617fde9a8 MDL-62309 tool_policy: New API method to decline a policy
Policy can be declined. Optional policies do not need to be accepted to
use the site. But we still want to hear explicitly from the user.
2018-10-22 08:49:36 +02:00
David Mudrák f98cd91a13 MDL-62309 tool_policy: Improve api::is_user_version_accepted() return
The method now returns three-state logic. A bool value true/false is
returned if the user has accepted/rejected the policy, respectively. A
null value is returned if the user did not express their agreement in
either way yet.

This allows to distinguish between "rejected the policy" and "did not
say anything about it yet" cases.
2018-10-22 08:49:36 +02:00
David Mudrák 9011d394ab MDL-62309 tool_policy: Add new field to hold the optional policy flag
The patch adds a new column to the database table to hold the
information if giving agreement to the policy is compulsory or optional.
The flag can be defined via the policy editing form and is displayed at
the policies management screen.

The last modified time merged with the version column at the policies
management screen to save a bit of horizontal space - needed as we
display more information now at the first column.
2018-10-22 08:49:36 +02:00
Jun Pataleta 53f14eef37 Merge branch 'MDL-62777-master' of git://github.com/junpataleta/moodle 2018-10-22 12:26:14 +08:00
Jun Pataleta 0aacc90bbe MDL-62777 administration: Remove unnecessary whitespace 2018-10-22 12:24:58 +08:00
Damyon Wiese efacf3a099 MDL-61052 assign: Do not queue conversions
Identical submissions do not require individual conversions from the document converter. Text passing through
format_text cannot be trusted and is likely to be unique each time, even for the same text.
2018-10-22 11:56:57 +08:00
Zig Tan 888d7b585f MDL-61052 assign: Improve strip_images() to avoid HTML5 tags errors 2018-10-22 11:56:33 +08:00
Matt Porritt d5adb60fa3 MDL-62777 Administration: CLI upgrade new setting notification
During a CLI upgrade when there are new settings in core or in
a plugin, the settings are set to the defined defaults
automatically. There is no ouput shown on the CLI about which
new settings have been introduced or what default values the
setting are set to.

This patch outputs the name of the new setting and what the
default value being is set is to the CLI during an upgrade.
Objects and arrays are expanded into a human readable format.
This plugin also makes the function that sets the defaults to
be more robust so it isno longer required to be called multiple
times to ensure all settings are set.
2018-10-22 14:28:06 +11:00
Damyon Wiese 805f078b19 MDL-62145 theme_boost: Custom menu fixes
Make sure the site navigation element is labelled, actionmenu items
have correct role and actionmenu trigger controls the menu.
2018-10-22 10:57:50 +08:00
Damyon Wiese 934ee47b0d MDL-61391 forum: Improve semantics for permalinks
Replace the anchor tags in forum posts containing the postid but no href with
an id on the element containing the post. Use rel="bookmark" for perma links
and update the styling so they look visually the same.
2018-10-22 10:55:32 +08:00
Andrew Nicols 9c6ccfd93b Merge branch 'MDL-63213-master-2' of https://github.com/snake/moodle 2018-10-22 10:54:56 +08:00
Damyon Wiese ede1e4a186 MDL-61388 output: Use alertdialog role for confirm 2018-10-22 10:53:32 +08:00
Damyon Wiese 9f83272207 MDL-61388 forum: accessibility
Show success alert to confirm the last action.
2018-10-22 10:53:32 +08:00
Damyon Wiese addb26acbb MDL-61388 boost: accessibility
Dynamically show and focus on an alert that was written on page load. This ensures JAWS will read it
as soon as the page is ready, otherwise JAWS would choose to ignore it as per

https://www.w3.org/TR/wai-aria-practices/#alert.
2018-10-22 10:53:31 +08:00
Andrew Nicols 7b73fd183c Merge branch 'MDL-63691_master' of git://github.com/markn86/moodle 2018-10-22 10:52:13 +08:00
Damyon Wiese a986cb4ba1 MDL-62144 user menu: Accessibility
Ensure user menu passes the accessibility tests.
2018-10-22 10:42:28 +08:00
Damyon Wiese 191a1c7c23 MDL-62139 output: Accessible action menus
Add label on the "gear" menu and default keyboard and focus controls.
2018-10-22 10:35:21 +08:00
Mark Nelson d9a25f397d MDL-63408 core_message: removed usage of deprecated method in tests
Also, added tests to ensure exception is thrown if you try to
add or remove members to/from an individual conversation.
2018-10-22 10:26:37 +08:00
Mark Nelson cbf9e41c2d MDL-63408 core_message: remove no longer needed code
We only allow the functionality of adding/removing
members on group conversations, which will never have
a conversation hash.
2018-10-22 10:26:30 +08:00
Mark Nelson 83e3a4fe26 MDL-63408 core_message: add check to ensure it is a group conversation 2018-10-22 10:26:21 +08:00
Amaia Anabitarte 623048af81 MDL-63408 core_message: New functions to manage conversation members
New functions created to add, remove and count conversation members
2018-10-22 10:26:10 +08:00
Mark Nelson f2ac0a3e5b MDL-63691 core_message: added api::create_conversation 2018-10-22 10:21:28 +08:00
Mark Nelson e66b915c40 MDL-63691 core_message: added api::can_create_group_conversation 2018-10-22 10:21:27 +08:00
Mark Nelson a66ae84911 MDL-63691 core_message: deprecate create_conversation_between_users 2018-10-22 10:21:27 +08:00
Mark Nelson 59f98779fb MDL-63691 core: added capability for creating group conversations 2018-10-22 10:21:27 +08:00
Jake Dallimore 5b367baef8 MDL-63213 core_message: add web services for set/unset favourites 2018-10-22 09:56:06 +08:00
Amaia Anabitarte e2a687f689 MDL-63691 core: Column 'convhash' now accepts null
Index 'convhash' also changed to non-unique.
2018-10-22 09:47:19 +08:00
Jake Dallimore b8ff2c4481 MDL-63213 core_message: update get_conversations to support favourites
Added the type param here, which will be used in MDL-63549.
2018-10-22 09:43:33 +08:00
Andrew Nicols c3918bfee9 MDL-63289 message: Remove unused global 2018-10-22 08:31:04 +08:00
Andrew Nicols d139f45a0a Merge branch 'MDL-63289-master' of git://github.com/sarjona/moodle 2018-10-22 08:19:59 +08:00
AMOS bot f7704b703b Automatically generated installer lang files 2018-10-22 00:07:13 +00:00
Bas Brands 3cfff88516 MDL-63058 block_myoverview: starring and storing preferences 2018-10-20 17:53:35 +02:00
Tim Hunt b51f4f2ece MDL-63277 qtype_ddwtos: removed unneeded qtype_classname method 2018-10-20 15:25:04 +01:00
Tim Hunt c28d0aa113 MDL-63277 qtype_ddwtos: further improvements to the JavaScript 2018-10-20 15:24:49 +01:00
M Kassaei 68943aff09 MDL-63277 qtype_ddwtos: Re-implement old YUI JS in AMD
In the rewrite is one improvement: drag items now animate when they
are moved, for example out of a drop place and back home. Other than
that, the functionality is unchanged. Also, as far as possible, the
HTML structure has not been changed (althought with changes to the HTML,
further JS improvements would be possible. However, those have been left
for a future issue).
2018-10-20 15:22:12 +01:00
Tim Hunt ed7e30fa5c MDL-62411 qtype_ddmarker: further improvements following code review 2018-10-20 15:18:17 +01:00
John Beedell 5d4b342107 MDL-62411 qtype_ddmarker: graphical editing of drop zones
Also, all the JavaScript in this plugin has been updated from YUI to
jQuery.
2018-10-20 15:15:28 +01:00
John Beedell 0b1cc2890f MDL-62411 qtype_ddmarker: add dragdrop helper libarary
This was created by the Open University a couple of years ago, and is
very helpful for making dragging work reliably on a range of browsers
and with both mouse and touch-screens.

Sadly, HTML5 drag-drop is not yet ready for prime-time.
2018-10-20 15:15:23 +01:00
Jake Dallimore b81722e22f MDL-63058 core_favourites: add existence checks to the service layer
This allows someone using the user_favourite_service to check whether
an item is already marked as a favourite.
2018-10-20 12:19:10 +02:00
Sara Arjona e5eba802d5 MDL-63289 message: Deprecate is_user_non_contact_blocked method
This function has been deprecated and no other function has been
added to replace it. It was only called from can_post_message, so
its code has been moved there.
2018-10-20 08:36:24 +02:00
Sara Arjona 7983fb830e MDL-63289 message: Bypass privacy user preferences for teachers
Created capability 'moodle/site:messageanyuser' to allow
bypass user privacy preferences for messaging participants in a course,
even when some of them has blocked the teacher.
2018-10-20 08:35:17 +02:00
Mark Nelson 59fa0137b2 MDL-63691 core: updated 'message_conversations' table 2018-10-20 13:36:29 +08:00
Eloy Lafuente (stronk7) cc486e6125 on-demand release 3.6dev+ 2018-10-19 17:11:15 +02:00
Eloy Lafuente (stronk7) 755d8758ce Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-10-19 17:11:13 +02:00
Marina Glancy 97372ec17d MDL-63648 tool_xmldb: missing capability check 2018-10-19 11:36:40 +02:00
AMOS bot d619aa6e04 Automatically generated installer lang files 2018-10-19 00:08:01 +00:00
Eloy Lafuente (stronk7) 1845a5bbaa Merge branch 'MDL-63648-master' of git://github.com/marinaglancy/moodle 2018-10-18 23:54:06 +02:00
Eloy Lafuente (stronk7) d6d5ea5d04 Merge branch 'MDL-62920-master' of https://github.com/aanabit/moodle 2018-10-18 23:47:37 +02:00
Eloy Lafuente (stronk7) 456a7e4b36 Merge branch 'MDL-27520_master-fix' of https://github.com/markn86/moodle 2018-10-18 22:03:43 +02:00
Eloy Lafuente (stronk7) e38e2cde4e Merge branch 'MDL-60145-master' of https://github.com/snake/moodle 2018-10-18 18:56:34 +02:00
Mark Nelson 66b5036805 MDL-27520 assignfeedback_comments: fix Behat failures 2018-10-18 18:32:59 +08:00
Eloy Lafuente (stronk7) a2d2ed90c2 Merge branch 'MDL-63465-master' of git://github.com/jleyva/moodle 2018-10-18 12:22:42 +02:00
Eloy Lafuente (stronk7) 2205ecc2b6 Merge branch 'MDL-63658-master-2' of https://github.com/snake/moodle 2018-10-18 11:15:11 +02:00
Jake Dallimore 21b50ebe19 MDL-63658 core_favourites: fix errors discovered on oracle db
- Assuming 1 would be a record that didn't exist. should be using 0.
- Missing space before AND in sql in provider.
2018-10-18 17:11:07 +08:00
Andrew Nicols 78f6d5196d Merge branch 'MDL-63658-master-2' of https://github.com/snake/moodle 2018-10-18 15:48:47 +08:00
Jake Dallimore 68eaa3150e MDL-63658 core_favourites: properly define interface methods and cleanup
This gets rid of specific repo functions which were unused, and makes
sure the following methods are defined on the interface, implemented
and tested:
- exists_by($criteria)
- find_by($criteria)
- delete_by($crtieria)
Also, added missing tests for find_favourite() repo method.
2018-10-18 15:39:57 +08:00
Juan Leyva 0f8b26043f MDL-63465 blocks: New WS core_blocks_get_dashboard_blocks 2018-10-18 09:17:24 +02:00
Jun Pataleta de632063af Merge branch 'MDL-63667-master-fix2' of git://github.com/damyon/moodle 2018-10-18 14:37:13 +08:00
Peter 34ef8466d0 MDL-63042 core_theme: Change the background color 2018-10-18 12:05:57 +08:00
Andrew Nicols 61e0f58ca3 MDL-63667 amd: Check for parent template recursion 2018-10-18 12:04:19 +08:00
Huong Nguyen 8b0a933d21 MDL-40695 Quiz: Move manual grading report display to renderer 2018-10-18 10:06:45 +07:00
Damyon Wiese b51c5b929f MDL-63667 output: Fix for recursive templates
A template can include itself - e.g. by looping over the context children and rendering a tree.

Ensure this promise still resolves.

Example: admin/tool/lp/templates/competencies_tree.mustache.
2018-10-18 10:48:01 +08:00
Andrew Nicols 3212e7aaef Merge branch 'MDL-63658-master-2' of https://github.com/snake/moodle 2018-10-18 10:06:14 +08:00
Jake Dallimore 1f3c76f0ec MDL-63658 core_favourites: fix differences between install and upgrade 2018-10-18 09:40:07 +08:00
Andrew Nicols 2ac4ea89d9 Merge branch 'MDL-63658-master-2' of https://github.com/snake/moodle 2018-10-18 09:08:22 +08:00
Eloy Lafuente (stronk7) 4658eefa13 Merge branch 'MDL-63632-master' of git://github.com/andrewnicols/moodle 2018-10-18 02:38:57 +02:00
Jake Dallimore 8d9cd27b02 MDL-63658 core_favourites: let service object use get_component_names
This was using a helper, but now we have the function in core to achieve
the same thing, so use this instead.
2018-10-18 08:22:08 +08:00
Jake Dallimore 3a1ece149f MDL-63658 core: new method get_component_names() added to core 2018-10-18 08:22:07 +08:00
Jake Dallimore b7a3ec6f8d MDL-63658 core_favourites: consolidate interfaces and rename
Let's worry about reuse of the crud code later, when that requirement
arises, so moved that into the ifavourite_repository interface, and then
renamed it favourite_repository_interface.
2018-10-18 08:22:07 +08:00
Jake Dallimore 0551ed3569 MDL-63658 core_favourites: rename user_favourites_service and services
Now: user_favourite_service (singular) and service_factory
2018-10-18 08:22:07 +08:00
Jake Dallimore cb90b549b6 MDL-63658 core_favourites: singularise the repository class types
Instead of favourites_repository we now have favourite_repository,
which is more in line with other implementations of this pattern.
2018-10-18 08:22:07 +08:00
Jake Dallimore cfaf86b059 MDL-63658 core_favourites: make favourite a first class object
This patch adds several things:
- favourite entity class under local/entity
- refactoring of repository and service to use the new class instead
of stdClass.
- update repository unit tests to use the object instead of stdClass.
- update service_test so that the mock repo requires the object for
the add operation.
- remove unnecessary constructor from favourites_repository class.
2018-10-18 08:22:07 +08:00
Jake Dallimore 8ffbe9c163 MDL-63658 core_favourites: adding paging support to the service layer 2018-10-18 08:22:07 +08:00
Jake Dallimore ac9138db1c MDL-63658 core_favourites: implement privacy API for favourites 2018-10-18 08:22:06 +08:00
Jake Dallimore 4a02aae5f5 MDL-63658 core_favourites: namespace the repositories and services 2018-10-18 08:22:06 +08:00
Jake Dallimore 771051325b MDL-63658 core_favourites: add business logic aware service layer 2018-10-18 08:22:06 +08:00
Jake Dallimore d4e98ee580 MDL-63658 core_favourites: add a user favourites repository 2018-10-18 08:22:06 +08:00
Jake Dallimore 1cb94eabb4 MDL-63658 core_favourites: add tables to the subsystem 2018-10-18 08:22:05 +08:00
AMOS bot 6e0a04313d Automatically generated installer lang files 2018-10-18 00:07:17 +00:00
Andrew Nicols 7148f47f56 MDL-63632 forum: Delete where not discussion author 2018-10-18 07:20:29 +08:00
Eloy Lafuente (stronk7) 0f943d26bf Merge branch 'MDL-63068_master' of https://github.com/aanabit/moodle 2018-10-18 00:39:45 +02:00
Eloy Lafuente (stronk7) d2a2b9c45a Merge branch 'MDL-63523-master' of git://github.com/jleyva/moodle 2018-10-17 23:22:52 +02:00
David Monllao 32b01d2b02 Merge branch 'MDL-63214-master' of git://github.com/sarjona/moodle 2018-10-17 15:55:44 +02:00
David Monllao a9bbbd7a50 Merge branch 'MDL-27520_master' of git://github.com/markn86/moodle 2018-10-17 15:42:55 +02:00
Sara Arjona f7dfa9ba3e MDL-63214 message: Add privacy preferences to filter who can message
Add new messaging profile preferences to allow users to choose who
can message them:
- By default, users can select between 'My contacts only' and 'My
contacts and anyone in my courses'
- When $CFG->messagingallusers is enabled, a new option is displayed
also: 'Anyone on the site'. For users who have selected this option,
if $CFG->messagingallusers is disabled, the behaviour will be changed
to 'My contacts and anyone in my courses'
2018-10-17 11:52:57 +02:00
Sara Arjona 327914160f MDL-63214 message: Add setting to force enabling messagingallusers 2018-10-17 11:52:57 +02:00
Jun Pataleta 500dc0b134 MDL-62904 tool_dataprivacy: Add data request links in profile page 2018-10-17 16:40:55 +08:00
Mark Nelson 464a9dc556 MDL-27520 assignfeedback_comments: is_feedback_modified considers files 2018-10-17 15:57:27 +08:00
Mark Nelson ec8471c966 MDL-27520 core_grades: add methods to grade_object for feedback files 2018-10-17 15:57:27 +08:00
Mark Nelson 80b6fb7a79 MDL-27520 core_grades: make constant names clearer
Also using them in more locations.
2018-10-17 15:57:27 +08:00
Mark Nelson b7a9b6f872 MDL-27520 assignfeedback_comments: updated privacy provider 2018-10-17 15:57:27 +08:00
Damyon Wiese c98e9fbae1 MDL-27520 core: Rewrite pluginfile URLs 2018-10-17 15:57:26 +08:00
Jun Pataleta 077a1a2080 Merge branch 'MDL-63667-master' of git://github.com/damyon/moodle 2018-10-17 15:06:29 +08:00
Andrew Nicols f2d9a66240 Merge branch 'MDL-63547_master' of git://github.com/markn86/moodle 2018-10-17 14:53:23 +08:00
Ryan Wyllie 0015f5b8f1 MDL-63667 javascript: fix failed to pre-fetch the template error 2018-10-17 13:49:25 +08:00
Damyon Wiese dd882ba035 MDL-27520 backup: Backup for feedback files 2018-10-17 13:15:49 +08:00
Mark Nelson 95ed603361 MDL-27520 core_grades: create grade history filearea and copy files 2018-10-17 13:15:49 +08:00
Mark Nelson 0e732f5d33 MDL-27520 assignfeedback_comments: added backup/restore of files 2018-10-17 13:15:49 +08:00
Mark Nelson 3672775931 MDL-27520 assignfeedback_comments: copy files to feedback
This respects the setting 'Comment inline' where the content
of a submission is copied into the feedback form.
2018-10-17 13:15:49 +08:00
Mark Nelson c9f6ca1142 MDL-27520 core: allow retrieval of files from grade files areas
Also added 'history' filearea for the history report where files
will be copied to if the site has enabled this feature.

We will also be storing files in the module context, not course,
so that check was removed.
2018-10-17 13:15:45 +08:00
Michael Hawkins d744b15bc6 MDL-63495 comment: Added provider::delete_comments_for_users
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols 8c3124cef0 MDL-63495 mod_forum: Add intial support for removal of multiple context users
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols e2ca4224f2 MDL-63495 core_rating: Add helper to fetch users in context
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols bf347c4d2b MDL-63496 tool_dataprivacy: Add configuration for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols b107016c88 MDL-63496 tool_dataprivacy: Respect expiry with protected flag
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols 8c634d6d4f MDL-63496 tool_dataprivacy: Support for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Michael Hawkins 3c0c280882 MDL-63497 mod_data: Add support for removal of context users
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols 8ba35e317c MDL-63495 privacy: Add support for removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Mark Nelson 60b67bbcf7 MDL-63547 core_message: web service can delete multiple conversations 2018-10-17 12:05:16 +08:00
Mark Nelson 26f39c8861 MDL-63547 core_message: added delete_conversation_by_id web service 2018-10-17 12:05:16 +08:00
Mark Nelson fa024820f2 MDL-63547 core_message: deprecate delete_conversation web service 2018-10-17 12:05:16 +08:00
Mark Nelson 15663b0bec MDL-63547 core_message: can_delete_conversation expects a conversationid 2018-10-17 12:05:16 +08:00
Mark Nelson 263ad98436 MDL-63547 core_message: deprecated api::delete_conversation() 2018-10-17 12:05:16 +08:00
Mark Nelson 08cb8a34f9 MDL-63547 core_message: updated api::can_delete_message 2018-10-17 12:05:16 +08:00
Mark Nelson 14de10c463 MDL-63547 core_message: updated message_deleted event to support groups 2018-10-17 12:05:16 +08:00
Jake Dallimore 4fca5dabb2 MDL-63658 core_favourites: introduce the favourites subsystem to core 2018-10-17 10:16:18 +08:00
Eloy Lafuente (stronk7) c2f1dbcf49 on-demand release 3.6dev+ 2018-10-16 16:20:23 +02:00
Eloy Lafuente (stronk7) 01f6529b8c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-10-16 16:20:21 +02:00
Juan Leyva b36ee81ea6 MDL-63523 enrol: Return extra fields for new dashboard
WebService core_enrol_get_users_courses should return extra information for the app
so we can display all the new dashboard information without having to do extra WS requests.
2018-10-16 13:45:07 +02:00
Mark Nelson ea241998e6 MDL-27520 assignfeedback_comments: allow files in the comments feedback
Also use new API to add files to gradebook.
2018-10-16 13:06:58 +08:00
Mark Nelson faa438bad6 MDL-27520 mod_assign: added API for feedback plugins 2018-10-16 13:06:58 +08:00
Mark Nelson 5d7a9ea6f9 MDL-27520 core_grades: accept feedback files via grade_update() 2018-10-16 12:32:44 +08:00
Damyon Wiese 54697072a6 Merge branch 'MDL-62960-master' of git://github.com/rezaies/moodle 2018-10-16 11:43:24 +08:00
Jun Pataleta 34c2fe1f91 Merge branch 'MDL-63337-master' of git://github.com/damyon/moodle 2018-10-16 10:31:26 +08:00
Damyon Wiese 7e1ca773bb MDL-63337 enrol: Fix behat test
The link to the course homepage now requires javascript, by directly navigating to the course page
we can still avoid the need for javascript in this test.
2018-10-16 10:15:25 +08:00
Shamim Rezaie b0e5f22961 MDL-62960 calendar: Visuall indicator for valid course event drop zones 2018-10-16 12:58:25 +11:00
Shamim Rezaie 084d5ee46c MDL-62960 calendar: Rename get_module_timestamp_min/max_limit methods
The methods get_module_timestamp_min_limit() and get_module_timestamp_max_limit()
are doing generic stuff and can be used for other calendar event types as well.
I have renamed them to get_timestamp_min_limit() and get_timestamp_max_limit() respectively.
2018-10-16 12:58:25 +11:00
Shamim Rezaie 586886b346 MDL-62960 calendar: Implementing course events validity check callback 2018-10-16 12:58:25 +11:00
Shamim Rezaie 5974bfebb9 MDL-62960 calendar: Added range check callback for course events
Added core_calendar_get_valid_event_timestart_range callback for course events
2018-10-16 12:58:25 +11:00
Andrew Nicols 5266994547 Merge branch 'MDL-63421' of git://github.com/stronk7/moodle 2018-10-16 08:49:34 +08:00
Andrew Nicols 4c8569e0bf Merge branch 'MDL-63603-INR' of https://github.com/danielneis/moodle 2018-10-16 08:34:58 +08:00
Eloy Lafuente (stronk7) 1a51deaf69 Merge branch 'MDL-63583-master' of git://github.com/jleyva/moodle 2018-10-16 00:29:02 +02:00
Eloy Lafuente (stronk7) d9446c0ff7 Merge branch 'MDL-63456-master' of git://github.com/merrill-oakland/moodle 2018-10-16 00:15:46 +02:00
Eloy Lafuente (stronk7) bbfda3b9db Merge branch 'MDL-62319-master' of git://github.com/damyon/moodle 2018-10-15 23:54:51 +02:00
Eloy Lafuente (stronk7) 12752c72d1 Merge branch 'MDL-63102-master' of git://github.com/peterRd/moodle 2018-10-15 23:34:45 +02:00
Eloy Lafuente (stronk7) 77d7f5e0dd Merge branch 'MDL-63337-master-fix' of https://github.com/junpataleta/moodle 2018-10-15 16:24:49 +02:00
Jun Pataleta c99b10368f MDL-63337 block_myoverview: Fix illegal whitespaces 2018-10-15 22:06:55 +08:00
Jun Pataleta 6bcf1e76c4 Merge branch 'MDL-63337-master' of git://github.com/bmbrands/moodle 2018-10-15 21:03:16 +08:00
David Monllao 4bc3f503fd MDL-63431 atto_media: Shorten line length 2018-10-15 10:23:48 +02:00
David Monllao 7ba798c01d Merge branch 'MDL-63431-master' of https://github.com/kabalin/moodle 2018-10-15 09:13:53 +02:00
Damyon Wiese 2debe416c6 Merge branch 'MDL-63352-master' of git://github.com/peterRd/moodle 2018-10-15 14:50:10 +08:00
Peter 9e95193e9f MDL-63352 block_timeline: Persist user preference on timeline
* Persist sort preference to the user table
* Persist filter preferences to the user table
* Add behat tests to test persistence
* Add the gdpr exports for the user preferences as well as unit tests for the same
* Updated view_nav.min
2018-10-15 14:46:12 +08:00
Bas Brands 6481a21fc3 MDL-63337 block_myoverview: enrol_get_my_courses sort ul.timeaccess 2018-10-15 08:42:08 +02:00
Bas Brands e4b4b9e7da MDL-63337 block_myoverview: add improved block myoverview 2018-10-15 08:42:08 +02:00
Damyon Wiese 283acb8b22 Merge branch 'MDL-63041-master' of git://github.com/bmbrands/moodle 2018-10-15 13:29:31 +08:00
Andrew Nicols 489dd14569 Merge branch 'MDL-63542-master' of git://github.com/jleyva/moodle 2018-10-15 10:57:38 +08:00
AMOS bot ecafc74651 Automatically generated installer lang files 2018-10-15 00:07:11 +00:00
Eloy Lafuente (stronk7) 040360468c MDL-63655 core: Fix miss-placed parenthesis 2018-10-15 01:02:25 +02:00
Marina Glancy ced982cf15 MDL-63648 tool_xmldb: drag and drop sorting 2018-10-13 14:03:46 +02:00
Ruslan Kabalin 0030362e4c MDL-63431 atto_media: Fix non-unique id issues and extend tests. 2018-10-12 12:20:34 +01:00
Ruslan Kabalin cb6941685e MDL-63431 atto_media: Add title global attribute support. 2018-10-12 12:20:34 +01:00
Peter 970bb713b3 MDL-63102 core_block: Reduced spacing between blocks
Reduce the calculated bottom margin between blocks to half
2018-10-12 10:13:36 +08:00
Peter f9d156ca5a MDL-63040 core_my: Remove page header
* Remove user name and image from the page header
* Modify header template to accept new fields
2018-10-12 08:12:46 +08:00
Amaia Anabitarte 856c51a80b MDL-63068 user: Allow underscore for profile custom fields shortname 2018-10-11 16:39:57 +02:00
Amaia Anabitarte 5e4aaa886c MDL-62920 user: Uploading deleted user and adding to a cohort 2018-10-11 16:27:07 +02:00
Shamim Rezaie 44b30f9ced MDL-63626 mod_quiz: Fixed a bug when there was no attempt on the quiz 2018-10-12 01:03:39 +11:00
Marina Glancy d8c50267b9 MDL-63625 core: sortable_list iOS scrolling
For iOS we need to register non passive events not only for touchstart but also for touchmove
and touchend. Also iOS could open two move dialogue windows instead of one
2018-10-11 15:08:46 +02:00
Eloy Lafuente (stronk7) 3cced42eb3 weekly release 3.6dev 2018-10-11 13:22:36 +02:00
Eloy Lafuente (stronk7) 51b066f9b8 NOBUG: Fixed SVG browser compatibility 2018-10-11 13:22:34 +02:00
Eloy Lafuente (stronk7) a8d67b3685 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-10-11 13:22:33 +02:00
Damyon Wiese a0b009115e MDL-62319 assignfeedback_editpdf: Disable touch scrolling
Assignment editpdf canvas provides it's own scroll tool and the native browser one breaks
the rest of the tools for the canvas. Turn it off.
2018-10-11 13:28:01 +08:00
Nathan Nguyen 923641f71c MDL-62319 Assign: Grading interface is broken when using iOS 11.3 devices 2018-10-11 13:27:56 +08:00
AMOS bot b8764e3ae4 Automatically generated installer lang files 2018-10-11 00:07:10 +00:00
Eloy Lafuente (stronk7) 19456c3956 Merge branch 'MDL-62891-master-callable_name' of git://github.com/mudrd8mz/moodle 2018-10-10 23:29:40 +02:00
Eloy Lafuente (stronk7) 23a7374b02 Merge branch 'MDL-63225-master' of git://github.com/jleyva/moodle 2018-10-10 23:24:27 +02:00
David Monllao e9659a17ba Merge branch 'MDL-51803-master-handle' of https://github.com/marinaglancy/moodle 2018-10-10 14:27:17 +02:00
Peter Spicer 9eac857649 MDL-63451 core_message: Properly escape URLs for notification popup 2018-10-10 13:05:05 +01:00
David Monllao 398d4ef03e Merge branch 'MDL-63373' of git://github.com/stronk7/moodle 2018-10-10 12:56:38 +02:00
Marina Glancy f7d1a24eee MDL-51803 core: sortable list not passive touch events
Some browsers do not support options passed to the event browsers. Check if browser
supports it before adding options.
2018-10-10 12:34:46 +02:00
Marina Glancy 5c170231dd MDL-51803 core: encourage use drag handle in sortable list 2018-10-10 11:32:32 +02:00
Eloy Lafuente (stronk7) 6db31715b3 Merge branch 'MDL-61245-master' of git://github.com/jleyva/moodle 2018-10-10 11:14:57 +02:00
David Monllao a169745489 MDL-60710 course: Fix incorrect reference to role 2018-10-10 10:57:47 +02:00
Juan Leyva ca48cc915b MDL-61245 core_blog: New Web Service core_blog_view_entries 2018-10-10 09:58:08 +02:00
Jun Pataleta 3151c3b98b Merge branch 'MDL-46415-master' of https://github.com/lucaboesch/moodle 2018-10-10 12:05:44 +08:00
Jake Dallimore de60737dd7 MDL-60145 course: fix bug with group restictions button during mod edit
If a mod doesn't support groups, then we remove the grouping element,
and now also the 'add group/group restriction' helper button too.
2018-10-10 08:40:07 +08:00
AMOS bot 428c82f54f Automatically generated installer lang files 2018-10-10 00:07:07 +00:00
Eloy Lafuente (stronk7) 89957b6c34 Merge branch 'MDL-63439-master' of git://github.com/damyon/moodle 2018-10-10 00:47:40 +02:00
Eloy Lafuente (stronk7) 609c73be26 Merge branch 'MDL-29895' of https://github.com/enovation/moodle 2018-10-10 00:29:16 +02:00
Daniel Neis Araujo c8dcecf3f3 MDL-63603 enrol: Add Indian Rupee to paypal enrolment currencies 2018-10-09 18:19:14 -03:00
Eloy Lafuente (stronk7) 25fe592cf0 Merge branch 'MDL-62395-master' of git://github.com/junpataleta/moodle 2018-10-09 23:06:28 +02:00
Andreas Grähn b80f15efca MDL-46415 tinymce: SVG emoticons size 2018-10-09 22:19:39 +02:00
Marina Glancy 261a3a3085 MDL-51803 core: sortable list, fix for touch devices 2018-10-09 16:05:39 +02:00
David Monllao b43f926b44 MDL-51803 autoscroll: Fix incorrect reference to function 2018-10-09 13:58:51 +02:00
David Monllao ce49b96586 Merge branch 'MDL-51803-master-mouse' of git://github.com/marinaglancy/moodle 2018-10-09 13:53:29 +02:00
Marina Glancy e3c2a1bb3a MDL-51803 core: fix for touchstart 2018-10-09 13:28:39 +02:00
Marina Glancy e134ad7b38 MDL-51803 core: sortable list singleton 2018-10-09 13:28:33 +02:00
Eloy Lafuente (stronk7) fac3c7ff4c Merge branch 'MDL-63427-master' of git://github.com/mihailges/moodle 2018-10-09 13:21:11 +02:00
Andreas Grähn 748bb77266 MDL-46415 atto: SVG emoticons size 2018-10-09 12:09:44 +02:00
Andreas Grähn c77c036c4d MDL-46415 pix: SVG emoticons 2018-10-09 11:43:42 +02:00
Eloy Lafuente (stronk7) bf0072e6c3 Merge branch 'MDL-63401-master' of git://github.com/andrewnicols/moodle 2018-10-09 11:35:29 +02:00
David Monllao f79460dafa Merge branch 'MDL-62738_master' of https://github.com/mfabriczy/moodle 2018-10-09 09:23:57 +02:00
David Monllao b52e22dccb Merge branch 'MDL-51969-master' of https://github.com/dmitriim/moodle 2018-10-09 09:19:53 +02:00
Peter 63d0d9b472 MDL-63043 core_blocks: Increase the fixed width to 360
Increase the fixed width of the column to 360. Already does the realign below centre column

Compiled css file
2018-10-09 15:01:21 +08:00
David Monllao bbb2141084 Merge branch 'MDL-60710-master' of git://github.com/abias/moodle 2018-10-09 09:00:42 +02:00
David Monllao e2f8547acf Merge branch 'MDL-61378-master' of git://github.com/damyon/moodle 2018-10-09 08:57:49 +02:00
Jun Pataleta 14719185b0 Merge branch 'MDL-62491-master-fix' of git://github.com/abgreeve/moodle 2018-10-09 14:09:28 +08:00
Jun Pataleta 6a28761848 Merge branch 'MDL-63241-master-take2' of https://github.com/lucaboesch/moodle 2018-10-09 12:49:07 +08:00
Damyon Wiese 2015327b28 MDL-61378 forum: Upgrade notes
Tell developers to correctly nest calls to forum_print_post
2018-10-09 09:35:02 +08:00
Damyon Wiese 1bf3a76a59 MDL-61378 forum: Standardize HTML output for posts
Improve the format of the HTML representing a forum post.

1. Use <article> tag to mark it correctly.
2. Use <time> tag to include the real datetime information.
3. Use <address> tag to specify who and when the post came from.
4. Use heading level tags to mark the subject of each post.
5. Properly nest reply posts within their parent <article>
6. Use a header tab for each article to split the metadata from the content.
7. Use CSS to separate links, not text content.

Because posts are now nested properly, the heading for each one refers to it's own article
and we don't need to generate arbitrary heading level tags depending on how deep the post
is nested.
2018-10-09 09:34:57 +08:00
Adrian Greeve ea81e783ef MDL-62491 privacy: Fix running the download script.
Previously running the code to generate the download file
was very fagile. Now the code can be run anywhere without
problems occuring copying files.
2018-10-09 09:31:13 +08:00
Damyon Wiese 490e48a4df MDL-63439 assign: Unicode charsets for pdf
Prefer to use freesans font for generated pdfs as it has the biggest charset support.
2018-10-09 09:28:06 +08:00
Jun Pataleta f849b0faa9 Merge branch 'MDL-63194' of https://github.com/timhunt/moodle 2018-10-09 08:56:02 +08:00
Andrew Nicols 751b5e8b92 MDL-63401 tool_dataprivacy: Change default for require end date
We should preserve the existing behaviour.
2018-10-09 08:31:59 +08:00
Andrew Nicols 9a8944c52d MDL-63401 tool_dataprivacy: Simplify where processing 2018-10-09 08:21:38 +08:00
Andrew Nicols 7200ab20cd MDL-63401 tool_dataprivacy: Move final cap check to endpoint 2018-10-09 08:21:25 +08:00
Mihail Geshoski e3b53ef1f4 MDL-63427 block_myprofile: My profile block UI improvements 2018-10-09 08:09:11 +08:00
Alexander Bias da4d17313d MDL-60710 course: Overhaul of Behat tests 2018-10-08 22:49:36 +02:00
Alexander Bias 3ebba90a6b MDL-60710 course: Refine strings 2018-10-08 22:49:13 +02:00
Eric Merrill 1ddf3b6a0f MDL-63456 qtype_multichoice: Return a default options object if missing 2018-10-08 15:50:02 -04:00
Eric Merrill efea324715 MDL-63456 question: Improve Aiken error handling and multichoice errors 2018-10-08 15:50:02 -04:00
Tim Hunt 7a8782c4ae MDL-63194 quiz editing: subtle drag-drop bug if moving between sections 2018-10-08 17:37:11 +01:00
Bas Brands faff02ae6b MDL-63041 theme boost: remove region main border padding for dashboard 2018-10-08 17:07:30 +02:00
Juan Leyva bd4a6a7060 MDL-63583 course: Include course/lib.php always
core_course_get_courses_by_field WS must include always course/lib.php to not depend on functions including it.
2018-10-08 16:32:15 +02:00
Andrew Nicols 65f77d319e MDL-63401 tool_dataprivacy: Allow expiriration of users without end date 2018-10-08 20:49:59 +08:00
Andrew Nicols 2136ec3da3 MDL-63401 tool_dataprivacy: Rewrite expired deletion handling
This change rewrites the way in which expiry is calculated and addresses
a number of closely related issues:

Users can customise, and add blocks with data to, their dashboard.  When
a user had done so, the user could be flagged for deletion, but the
blocks in their Dashboard were subject to the default block retention
policy. In addition there is no way to override the retention policy for
user blocks.

This change modifies the structure of the expiry mechanism:
- to consider any subcontext of the user context to be a part of the user
  context during calculation. User child contexts are not the property
  of the system, and should not be treated separately.
- the way in which the context expiry mechanism worked was to select
  use a multiple different managers based solely on the context level.
  Because of the use of user blocks, this proved to be unreliable as
  blocks has been attributed purely to courses.
  This has been changed to a single manager which is aware of hierarchy
  and deletions as a whole.
- to prepare for upcoming work relating to more detailed expiry
  mechanisms, a new expiry_info class is introduced and used to
  merge the expiry of child contexts into a working in-memory view.

This changeset includes extensive unit tests.
2018-10-08 20:49:55 +08:00
Andrew Nicols 204abd3c97 MDL-63401 core: Do not delete the user context
As long as we have a user record, we should not delete the context which
relates to it.
2018-10-08 20:49:17 +08:00
Andrew Nicols cbae8dcd57 MDL-63401 tool_dataprivacy: Move cap checks to endpoints from API 2018-10-08 20:49:17 +08:00
David Monllao 4e725169f9 MDL-60425 blog: Remove empty line 2018-10-08 12:52:04 +02:00
David Monllao 92adfa3cd2 Merge branch 'MDL-60425-master' of git://github.com/jleyva/moodle 2018-10-08 12:51:05 +02:00
Marina Glancy dbe5689ef1 MDL-51803 core: integration review 2018-10-08 11:50:47 +02:00
Marina Glancy 6b9cb2481c MDL-51803 core: integration review 2018-10-08 11:50:47 +02:00
Marina Glancy 539cb25050 MDL-51803 core: reusable element for sorting lists 2018-10-08 11:50:47 +02:00
Marina Glancy a21d34776b MDL-51803 core: autoscroll module from OU 2018-10-08 11:50:47 +02:00
David Monllao de0d394192 Merge branch 'MDL-63323-wrong-classes-attribute-into-activity_navigation' of https://github.com/davidherney/moodle 2018-10-08 11:30:15 +02:00
Adrian Greeve ff40c7d374 MDL-62491 navigation: Update to tree.js to allow callbacks. 2018-10-08 09:00:08 +08:00
Adrian Greeve 812c409203 MDL-62491 mod_assign: Fill in the rewrite plugin urls properly. 2018-10-08 09:00:08 +08:00
Adrian Greeve e90a0a7415 MDL-62491 core_privacy: Add html files to the user data export.
This adds html to the data export that allows for easier navigation
and reading of data.
2018-10-08 09:00:08 +08:00
Luca Bösch 7294f412fc MDL-63241 calendar: Add missing table alias in SQL query. 2018-10-07 21:43:47 +02:00
Marcus Fabriczy db25ea5a96 MDL-62738: editor_tinymce: Fix call stack size bug on Safari
The call stack size was being exceeded via a recursive loop brought
by MDL-61189.

To fix, this item removes MDL-36803 and MDL-41328 as the iOS keyboard works
nicely on Safari with TinyMCE.
2018-10-06 17:21:51 +09:30
Juan Leyva 10b88bf2c7 MDL-63542 core_course: Support stealth activities in WS 2018-10-05 14:51:01 +02:00
Eloy Lafuente (stronk7) 8a95de6bcc MDL-63421 env: Moodle 3.4.x and 3.5.x do not support PHP 7.3 2018-10-05 13:36:26 +02:00
Eloy Lafuente (stronk7) b08cdad21a MDL-63373 install: update the list of stale files for 3.6 2018-10-05 12:37:10 +02:00
David Mudrák 75ab4d2eb7 MDL-62891 core: Stop using var_export() to describe callables
Make use of the newly added function get_callable_name() when reporting
that an exception happened during shutdown.
2018-10-05 09:10:16 +02:00
David Mudrák 905d02f458 MDL-62891 core: Introduce new get_callable_name() function 2018-10-05 09:10:16 +02:00
Dmitrii Metelkin f9ec2496f8 MDL-51969 mod_lti: Fixed missing tool proxy GUID 2018-10-05 15:14:15 +10:00
Jun Pataleta 129783b98c weekly release 3.6dev 2018-10-05 10:29:01 +08:00
Jun Pataleta 5ce76aa2b6 NOBUG: Fixed SVG browser compatibility 2018-10-05 10:29:00 +08:00
Jun Pataleta 360c9681bc Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-10-05 10:28:59 +08:00
Jun Pataleta 7216596760 MDL-62395 tool_dataprivacy: Purpose name and description in one column
* Show the purpose's name and description under one column.
2018-10-05 09:20:02 +08:00
Alexander Bias 63044a2391 MDL-60710 course: Refine setting name and description 2018-10-04 08:32:30 +02:00
Jun Pataleta 6cd50cb215 Merge branch 'MDL-35788-master' of git://github.com/andrewnicols/moodle 2018-10-04 12:45:09 +08:00
Jun Pataleta 428a47fcbf MDL-63528 auth: Behat scenario for "Remember username" display 2018-10-04 12:22:35 +08:00
Jun Pataleta 36d7b587cb MDL-63528 auth: Show "Remember username" on login form only when needed 2018-10-04 11:39:53 +08:00
Andrew Nicols 94df729b92 MDL-35788 mod_forum: Move post creation fetch 2018-10-04 11:15:17 +08:00
Jun Pataleta 86abaf31c8 Merge branch 'MDL-63442-master' of git://github.com/abias/moodle 2018-10-04 11:02:34 +08:00
AMOS bot bf5e1b2a77 Automatically generated installer lang files 2018-10-04 00:07:14 +00:00
Eloy Lafuente (stronk7) 83c249a665 Merge branch 'MDL-63141-master' of git://github.com/rezaies/moodle 2018-10-04 00:20:02 +02:00
Eloy Lafuente (stronk7) c6e19d9cfa Merge branch 'MDL-63142-master' of git://github.com/rezaies/moodle 2018-10-04 00:18:35 +02:00
Eloy Lafuente (stronk7) 57aaa0c423 Merge branch 'MDL-63143-master' of git://github.com/rezaies/moodle 2018-10-04 00:02:21 +02:00
Eloy Lafuente (stronk7) 2f46cab80d MDL-62610 tests: fix Gherkin lint problem 2018-10-03 23:56:31 +02:00
Eloy Lafuente (stronk7) 95f82860d5 Merge branch 'MDL-62610-master' of git://github.com/lameze/moodle 2018-10-03 18:00:08 +02:00
David Monllao 1ef89ad49c Merge branch 'mdl63334-master' of https://github.com/tlock/moodle 2018-10-03 17:19:18 +02:00
David Monllao d6946bb0f9 Merge branch 'MDL-62558-master' of git://github.com/abgreeve/moodle 2018-10-03 11:17:06 +02:00
Jun Pataleta 7c137e7845 Merge branch 'MDL-63426-master' of https://github.com/lucaboesch/moodle 2018-10-03 15:25:22 +08:00
Jun Pataleta 941b90a509 Merge branch 'MDL-63211_master' of git://github.com/markn86/moodle 2018-10-03 13:45:52 +08:00
Mark Nelson 0d203bbf8d MDL-63211 core_message: respect new setting 'messagingallusers' 2018-10-03 11:58:39 +08:00
Mark Nelson c886e2c94d MDL-63211 core_message: deprecated api::is_user_blocked 2018-10-03 11:58:39 +08:00
Damyon Wiese b8dad795f7 MDL-63211 message: update behat
Approve the contact requests in the behat test.
2018-10-03 11:58:39 +08:00
Mark Nelson be016b0144 MDL-63211 core: added notification when contact request is made 2018-10-03 11:58:39 +08:00
Mark Nelson 892aad5185 MDL-63211 core_message: add temporary pending contact requests page 2018-10-03 11:51:29 +08:00
Mark Nelson f219eac7b4 MDL-63211 core: update core to use new APIs 2018-10-03 11:51:29 +08:00
Mark Nelson beeadbf783 MDL-63211 core: updated upgrade.txt files 2018-10-03 11:51:29 +08:00
Mark Nelson 742c27b3e8 MDL-63211 core_message: updated privacy provider 2018-10-03 11:51:29 +08:00
Mark Nelson 522841861f MDL-63211 core_message: added new web services 2018-10-03 11:35:26 +08:00
Mark Nelson 0b3eadcd96 MDL-63211 core_message: deprecated functions and added new API 2018-10-03 11:35:26 +08:00
Mark Nelson bacebf3738 MDL-63211 core: created new events for blocking/unblocking users 2018-10-03 11:35:25 +08:00
Adrian Greeve edbdeb6315 MDL-62558 tool_dataprivacy: Create a summary page for users. 2018-10-03 10:16:25 +08:00
Jun Pataleta 850707a0bb Merge branch 'MDL-35788-master' of git://github.com/andrewnicols/moodle 2018-10-03 10:13:40 +08:00
Eloy Lafuente (stronk7) 682357004f Merge branch 'MDL-60685-master' of git://github.com/damyon/moodle 2018-10-03 00:23:10 +02:00
Eloy Lafuente (stronk7) b18df698e7 Merge branch 'MDL-63435-master' of https://github.com/lucaboesch/moodle 2018-10-02 23:47:52 +02:00
Eloy Lafuente (stronk7) ca2ac0c1a3 Merge branch 'MDL-58000-master' of https://github.com/mackensen/moodle 2018-10-02 23:39:27 +02:00
Juan Leyva bb96ff716d MDL-60425 core_blog: New WS core_blog_get_entries 2018-10-02 14:49:48 +02:00
Juan Leyva 9de4402112 MDL-60425 core_blog: Move access validation to API 2018-10-02 14:49:48 +02:00
Juan Leyva 27190655b0 MDL-63225 webservice: Return proper debuginfo on WS exceptions
In order to make developers easy, we should give some clues about the type of the data generating exceptions.
2018-10-02 13:14:33 +02:00
Andrew Nicols 13976bcf83 Merge branch 'MDL-63493-master' of git://github.com/junpataleta/moodle 2018-10-02 11:40:20 +08:00
Jun Pataleta b79482f5d7 MDL-63493 core_question: Fix field parameters for the index definitions
* The fields for the ID number-related indexes that were created for
  the question and question_categories tables in MDL-62708 should not
  be in comma-separated strings.
2018-10-02 11:31:36 +08:00
Jun Pataleta 0410cee69e MDL-63493 core_message: Fix field parameters for the index definitions
* The fields for the ID number-related indexes that were created for
  the messages and message_user_actions tables in MDL-36941 should not
  be in comma-separated strings.
2018-10-02 11:31:36 +08:00
David Knuplesch a487a3edf2 MDL-60710 course: setting to show/hide duplicate coursecontact 2018-10-01 13:39:17 +02:00
Simey Lameze 484b179d06 MDL-62610 mod_quiz: fix behat failure 2018-10-01 09:53:34 +08:00
Simey Lameze 73aefa6bfc MDL-62610 mod_quiz: fix CiBoT issues 2018-10-01 08:27:28 +08:00
Andrew Nicols 424920f8fb MDL-35788 forum: Show post creation time not modified 2018-10-01 08:16:42 +08:00
Shamim Rezaie 0ce3fef70a MDL-63390 quiz_statistics: Remove Min/Median/Maximum rows
Part of MDL-62610
2018-10-01 07:53:10 +08:00
Shamim Rezaie 422d78648c MDL-63390 quiz_statistics: Make the summary row more distinguishable 2018-10-01 07:52:59 +08:00
Shamim Rezaie 24c28f3c9b MDL-63390 Quiz: Use lang rules to format quiz summark as a percentage
Part of MDL-62610
2018-10-01 07:52:50 +08:00
Shamim Rezaie bef224c6e4 MDL-63390 quiz_statistics: Added formating functions
Refactored quiz_statistics_table class to remove some duplications by defining and using
format_range(), format_percentage() and format_percentage_range() methods.

Part of MDL-62610
2018-10-01 07:52:42 +08:00
Shamim Rezaie 84140b9137 MDL-63390 quiz_statistics, question: Handling variants as well
Variants should also be treated like random questions in the sense that
a summary row
should be displayed for them as well.
This commit deals with handling variants.
Also the name of the calculated_random_question_summary class has
changed to
calculated_question_summary to be more generic as the summary row is not
specific to random questions only.
Also removed the protected function too_many_subq_and_or_variant_rows
and the const SUBQ_AND_VARIANT_ROW_LIMIT as they were not being used
anymore.

Part of MDL-62610
2018-10-01 07:52:31 +08:00
Shamim Rezaie f4bc55871c MDL_63390 question: Fixed get_min_max_of and get_min_max_of_sd
Fixed calculated_random_question_summary:get_min_max_of and calculated_random_question_summary:get_min_max_of_sd
functions and added unit tests

Part of MDL-62610
2018-10-01 07:52:18 +08:00
Tim Hunt c5499edaef MDL-63185 mod_quiz: more fixes to new behat code
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze 9b1fc262d8 MDL-63185 mod_quiz: make CiBoT happy again
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze bd92cfc6f9 MDL-63185 mod_quiz: add behat coverage for statistics report
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze df48d3cc71 MDL-63185 mod_quiz: replace user session handling to use set_user()
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze a190910595 MDL-63185 core_test: add set_user function to behat
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze 6e4fe9afe0 MDL-63185 mod_quiz: convert responses report behat to use new step
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze 90ef250d52 MDL-63185 mod_quiz: create steps to handle diferent behaviours
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze 71fc74cee5 MDL-63185 core_question: add callback to some question types
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze 3c4ff02e41 MDL-63185 mod_quiz: replace existing tests to use new step
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze 5c0654d7ff MDL-63185 mod_quiz: change APIs to handle attempts on behat
Thanks to Tim Hunt for all the help.

Part of MDL-62610
2018-09-28 11:07:21 +08:00
Simey Lameze 35aa9ade76 MDL-63185 mod_quiz: add custom behat step to create user attempts
Thanks to Tim Hunt for all the help.

Part of MDL-62610
2018-09-28 11:07:21 +08:00
Shamim Rezaie b5fff70bdd MDL-63186 quiz_statistics: Highlight the summary row if is dubious
The summary row should be highlighted if any of the summarised rows are dubious.

Part of MDL-62610
2018-09-28 11:07:21 +08:00
Shamim Rezaie 666889f0f8 MDL-63186 quiz_statistics: Show each columns min,max in the summary row
The statistics table have been modified so that the summary row shows the minimum and maximum
values of each column for the set of questions that are being summarised.

Part of MDL-62610
2018-09-28 11:07:21 +08:00
Shamim Rezaie 6a966ea8d4 MDL-63186 workshopform_numerrors: Move percents lang string to core
Moved 'percents' lang string from workshopform_numerrors to core_moodle.

AMOS BEGIN
 MOV [percents,workshopform_numerrors],[percents,core_moodle]
AMOS END

Part of MDL-62610
2018-09-28 11:07:21 +08:00
Shamim Rezaie d79fef2ab5 MDL-63186 question: Calculate extremums of summarised questions
Modified calculated_random_question_summary class so that it can return minimum and maximum
of each attribute of the sub questions it is summarising.

Part of MDL-62610
2018-09-28 11:07:21 +08:00
Shamim Rezaie 6ee2b972c9 MDL-63186 quiz_statistics: Remove q number from the summary row
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Ryan Wyllie 29cc55079a MDL-63186 question: include random questions in statistics calculator
Part of MDL-62610
2018-09-28 11:07:21 +08:00
Jun Pataleta 74844ced9d MDL-62395 bootstrapbase: Add more w-XX classes for BS4 compatibility
I added w-25, w-50 and w-75.
2018-09-28 10:25:59 +08:00
Jun Pataleta 526d2aa58e MDL-62395 tool_dataprivacy: Use BS4 table classes
* Use standard Bootstrap4 table classes for the categories and purposes
  tables.
* Set w-25 for the name and description columns of the purposes table.
* Set w-50 for the description column of the categories table.
* Set a minimum width for the actions column of these tables.
2018-09-28 10:25:58 +08:00
Mark Nelson b393296311 MDL-63211 core: deprecated events for blocking/unblocking contacts
The message_contact_blocked and message_contact_unblocked
events were deprecated. The reason being that you will be
able to block and unblock any user, regardless if they are
a contact or not. This information is also now stored in a
separate DB table.
2018-09-28 10:19:57 +08:00
Mark Nelson b65bfc8ab4 MDL-63211 core: upgrade to remove duplicate contacts
Remove any duplicate rows - from now on adding contacts just requires 1 row.
The person who made the contact request (userid) and the person who approved
it (contactid). Upgrade the table so that the first person to add the contact
was the one who made the request.
2018-09-28 10:19:57 +08:00
Mark Nelson 3ec5c7701c MDL-63211 core: upgrade to remove non-mutual contacts 2018-09-28 10:19:56 +08:00
Andrew Nicols 0b4c5e7706 Merge branch 'MDL-63477-master' of https://github.com/ryanwyllie/moodle 2018-09-28 09:47:49 +08:00
Ryan Wyllie 52b7845553 MDL-63477 blocks_timeline: fix behat test in clean theme 2018-09-28 09:40:57 +08:00
Mark Nelson 4428b042cb MDL-63211 core: upgrade to move blocked contacts to new table 2018-09-28 09:16:31 +08:00
Mark Nelson d842d9a90a MDL-63211 core: added new database tables
Allow NULL values for timecreated in both message_contacts
and message_users_blocked because there is existing data
that has no timecreated value associated with it.
2018-09-28 09:15:52 +08:00
David Herney 97fd2fb575 MDL-63323 course: Fixed wrong classes key in activity_navigation class
Replaced "classes" by "class" attribute, when the prev and next links are builded into the activity navigation.
2018-09-27 18:40:46 -05:00
Luca Bösch 1876162315 MDL-63435 gradebook: let activity icons re-appear. 2018-09-27 18:12:08 +02:00
Luca Bösch c789dd4f55 MDL-63426 repository_dropbox: Use post 2017 icon 2018-09-27 18:12:00 +02:00
Eloy Lafuente (stronk7) 81bbf426f6 weekly release 3.6dev 2018-09-27 15:17:37 +02:00
Andrew Nicols 1b80703e6c MDL-63044 blocks_timeline: Remove old minified JS 2018-09-27 14:25:25 +08:00
Andrew Nicols b8ecdc4896 MDL-63044 blocks_timeline: Fixes in integration 2018-09-27 14:16:49 +08:00
Andrew Nicols 20f9b981f9 Merge branch 'dashboard-split-overview-block' of https://github.com/ryanwyllie/moodle 2018-09-27 14:08:55 +08:00
Ryan Wyllie 1e44de35b3 MDL-63044 block_timeline: add timeline block 2018-09-27 13:10:45 +08:00
Ryan Wyllie 44eb44e415 MDL-63044 block_myoverview: remove timeline view 2018-09-27 13:10:45 +08:00
Ryan Wyllie bbe6eadda7 MDL-63044 block_myoverview: remove tab preference 2018-09-27 13:10:45 +08:00
Ryan Wyllie 2c13ae01d9 MDL-63044 javascript: improve paged content widget 2018-09-27 13:10:45 +08:00
Ryan Wyllie 2c1d19fde6 MDL-63044 course: add get_enrolled_courses_by_timeline_classification 2018-09-27 13:10:44 +08:00
Ryan Wyllie 296ff0a768 MDL-63044 theme_boost: add dir-ltr-hide and dir-rtl-hide classes 2018-09-27 13:09:24 +08:00
Ryan Wyllie 916c0ded83 MDL-63044 theme_boost: fix secondary outline button styling 2018-09-27 13:09:23 +08:00
Ryan Wyllie 2d41f5b2fa MDL-63044 theme_boost: add line-height classes 2018-09-27 13:09:23 +08:00
Ryan Wyllie edd7fa33d0 MDL-63044 theme: add background pulse grey class 2018-09-27 13:09:23 +08:00
Ryan Wyllie 9d1d5ae05c MDL-63044 theme_boost: add icon class 2018-09-27 13:09:23 +08:00
Ryan Wyllie 40a14ef345 MDL-63044 icon: add next and previous icons 2018-09-27 13:09:23 +08:00
Ryan Wyllie 119c0124c4 MDL-63044 javascript: add getUserMidnightForTimestamp to user_date 2018-09-27 13:09:23 +08:00
Ryan Wyllie 6e403eb62f MDL-63044 javascript: add global helper for dropdowns 2018-09-27 13:09:23 +08:00
Ryan Wyllie d4e8e94025 MDL-63044 javascript: add simple pubsub implementation 2018-09-27 13:09:23 +08:00
Eloy Lafuente (stronk7) d6b71d7923 Merge branch 'MDL-54035_master-fix' of git://github.com/dmonllao/moodle 2018-09-26 23:28:34 +02:00
Eloy Lafuente (stronk7) 659d9fe942 Merge branch 'MDL-63013-master-prioritypolicy' of git://github.com/mudrd8mz/moodle 2018-09-26 23:21:09 +02:00
David Monllao e8ce6ca306 MDL-54035 accesslib: Check if the user can switch role before switching 2018-09-26 13:03:08 +02:00
Eloy Lafuente (stronk7) 201d21edad Merge branch 'MDL-63113-master' of git://github.com/bmbrands/moodle 2018-09-26 10:57:20 +02:00
David Monllao 0e79528704 Merge branch 'MDL-61161-master' of https://github.com/mackensen/moodle 2018-09-26 10:23:39 +02:00
Bas Brands a81e6914d7 MDL-63113 theme boost: initialsbar wrapping 2018-09-26 10:18:11 +02:00
Eloy Lafuente (stronk7) d813c9e745 Merge branch 'MDL-61981-master_nestedmath' of git://github.com/Mankro/moodle 2018-09-25 23:36:17 +02:00
Eloy Lafuente (stronk7) 51181541ab Merge branch 'MDL-62279-master' of git://github.com/damyon/moodle 2018-09-25 23:25:10 +02:00
Eloy Lafuente (stronk7) a649a3a120 Merge branch 'MDL-62714-boost_course_visibility_in_navbar' of https://github.com/fskandalis/moodle 2018-09-25 23:17:52 +02:00
Eloy Lafuente (stronk7) de7c685e52 Merge branch 'MDL-63253-master-adminsearchresults' of git://github.com/mudrd8mz/moodle 2018-09-25 22:56:11 +02:00
Eloy Lafuente (stronk7) 0ddc272116 Merge branch 'MDL-62334-master' of https://github.com/danielneis/moodle 2018-09-25 22:50:41 +02:00
Charles Fulton 3b31d8c92c MDL-61161 course: grace period for classifying in progress courses 2018-09-25 14:11:32 -04:00
Daniel Neis Araujo 28af88f364 MDL-62334 admin: add a new course link on admin/search 2018-09-25 14:31:50 -03:00
Eloy Lafuente (stronk7) b687205e27 Merge branch 'MDL-60028' of https://github.com/paulholden/moodle 2018-09-25 16:57:58 +02:00
Eloy Lafuente (stronk7) b8749c6208 Merge branch 'wip-MDL-62708-master' of https://github.com/Beedell/moodle 2018-09-25 16:52:50 +02:00
Charles Fulton 49b464f814 MDL-58000 badges: use large image when baking 2018-09-25 10:46:05 -04:00
Eloy Lafuente (stronk7) fc008d6769 MDL-57610 assignfeedback_editpdf: add missing UK to install.xml 2018-09-25 15:21:42 +02:00
Eloy Lafuente (stronk7) 4f06a97702 Merge branch 'MDL-57610' of git://github.com/aolley/moodle 2018-09-25 14:46:09 +02:00
David Monllao 8199e69b47 Merge branch 'MDL-63119-master' of git://github.com/lameze/moodle 2018-09-25 12:36:08 +02:00
David Monllao cebb7ba17c Merge branch 'MDL-62930-master' of git://github.com/damyon/moodle 2018-09-25 12:28:10 +02:00
David Monllao 9d4c8d45ef Merge branch 'MDL-62717-master' of https://github.com/lucaboesch/moodle 2018-09-25 12:18:36 +02:00
Alexander Bias 3e24741d0a MDL-63442 login: Show MOODLEID cookie note only if needed
AMOS BEGIN
 CPY [cookiesenabled,core],[cookiesenabledonlysession,core]
AMOS END
2018-09-25 12:16:47 +02:00
David Monllao 85d4b77cd3 Merge branch 'MDL-61967-master' of git://github.com/sarjona/moodle 2018-09-25 11:08:53 +02:00
Andrew Nicols 1a9fc39277 Merge branch 'MDL-63346' of https://github.com/stronk7/moodle 2018-09-25 08:35:08 +08:00
Adam Olley 1afbb97b6b MDL-57610 assignfeedback_editpdf: integration cleanup
* Add a note to upgrade.php to notify devs/admins of the new setting.
* Replace update_record with set_field.
* Add missing phpdoc.
2018-09-25 09:54:39 +09:30
Sara Arjona 5290d0604b MDL-61967 core_user: Allow filtering by No groups on participants page
A new optional parameter $context has been added to the
core_group::groups_get_members_join() function.
Besides, some core_group methods now accept -1 (USERSWITHOUTHGROUP) for
the groupid field.
2018-09-24 18:33:45 +02:00
Eloy Lafuente (stronk7) 0de29dbf35 MDL-63020 tests: ensure that searching for is null values also works ok 2018-09-24 17:38:10 +02:00
Eloy Lafuente (stronk7) 985b6b75c2 Merge branch 'MDL-63020' of git://github.com/timhunt/moodle 2018-09-24 16:01:21 +02:00
Tim Hunt eb6c769a8c MDL-63020 dml: improve the unit tests 2018-09-24 11:41:25 +01:00
David Monllao bac1731614 Merge branch 'MDL-61573-master' of https://github.com/Kathrin84/moodle 2018-09-24 11:24:49 +02:00
John Beedell dfa85ad002 MDL-62708 qformat_xml: phpunit test correction. 2018-09-24 09:37:12 +01:00
David Monllao 6ef77520cd MDL-47962 upgrade.txt: Update commit reference 2018-09-24 09:50:05 +02:00
David Monllao ccff34bf07 Merge branch 'MDL-47962' of git://github.com/timhunt/moodle 2018-09-24 09:45:47 +02:00
David Monllao bdc511364c MDL-54035 upgrade.txt: Limit comments to relevant info for upgrades 2018-09-24 09:41:18 +02:00
Jonathan Champ d2a98f89bd MDL-54035 course: Test reset roles in reset_course_userdata()
Previously, reset_course_userdata() was deleting the role_capabilities
directly, but has_capability() checks the local capabilities cache
which was still returning the previous value.
2018-09-21 09:17:43 -04:00
Jonathan Champ 1113e34675 MDL-54035 accesslib: Add context->get_parent_context_paths()
Returns full context paths for parent contexts. Useful for exact
matches, such as when checking dirtycontexts.
2018-09-21 09:17:43 -04:00
Jonathan Champ 1d049e08e5 MDL-54035 accesslib: add mark_user_dirty helper
Instead of marking an entire context dirty and affecting all users
of those contexts, mark the user as dirty when the change only
affects that user.
2018-09-21 09:17:43 -04:00
Jonathan Champ 34dd57053d MDL-54035 accesslib: only modify role_capabilities in accesslib
Whenever the role_capabilities table is changed, we need to remember
to clear the cache for the role(s) being modified. This is far simpler
when all of those changes happen in a single file, i.e. accesslib.php,
allowing other parts of the application to use the public functions
without requiring knowledge of the cache internals.
2018-09-21 09:17:43 -04:00
Jonathan Champ b2f349a433 MDL-54035 accesslib: separate role definition cache clear
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
2018-09-21 09:17:42 -04:00
John Beedell 6189fda47f MDL-62708 question: Add idnumbers to question and question category 2018-09-21 12:26:24 +01:00
Paul Holden f56e695883 MDL-60028 enrol: fix counting of enrolled users in a given context.
Previously users enrolled in a course via multiple enrolment methods
would be counted multiple times.
2018-09-21 10:14:55 +01:00
Markku Riekkinen a776169ee9 MDL-61981 filter_mathjaxloader: add unit tests 2018-09-21 09:58:42 +03:00
Markku Riekkinen 194ffa2344 MDL-61981 filter_mathjaxloader: nested math environments
The MathJax filter used to break mathematics if inline math was
used inside display math. Nolink spans were added around
the inline math even though it was nested inside another math
environment. This fix is aware of the nesting so that the spans
may be inserted only at the outer math environment. No regular
expressions are used because they do not support detecting
arbitrary, unlimited nesting of parentheses in the text, which
is now needed.
2018-09-21 09:58:27 +03:00
Tim Hunt 3923151a1a MDL-47962 filter_glossary: changes made during integration review 2018-09-20 17:58:01 +01:00
Tim Hunt 5a8c44d000 MDL-47962 filter_glossary: only create replacement HTML if needed 2018-09-20 17:58:01 +01:00
Tim Hunt 1d8d00d91d MDL-47962 filter_glossary: only prepare the replacement if used 2018-09-20 17:58:00 +01:00
Tim Hunt ac66652078 MDL-47962 filter_glossary: clean up filterobject class
This is another preliminary commit, rationalising the ->work... fields
and also moving the code that sets them up into a separate function.
This is also to prepare for the next commit.
2018-09-20 17:58:00 +01:00
Tim Hunt c01503de75 MDL-47962 filter_glossary: only prepare_phrases_for_filtering once 2018-09-20 17:58:00 +01:00
Tim Hunt 2abf8fbf86 MDL-47962 filter_glossary: use preg features for fullmatch
This eliminates a lot of necessary string manipulation for something
that preg can just do with the \b assertion.

The change also extracts all the work to prepare ->work_phrase (renamed
->regexp) into a separate function. This is to pave the way for future
efficiency gains, but for now I have not done them, so it is easier to
verify by inspection that this commit does not change behaviour.

Also, some tidy-ups to the filterobject structure, to eliminate some
redundant fields.
2018-09-20 17:58:00 +01:00
Tim Hunt d22699af7f MDL-47962 filter_glossary: cache concept list in a MUC static cache
This is a slight improvement on a suggestion by David Monllaó
2018-09-20 17:58:00 +01:00
Tim Hunt b0a3b52fe9 MDL-47962 filter_glossary: Fix lang string concatenation 2018-09-20 17:58:00 +01:00
Tim Hunt c633345265 MDL-47962 filter_glossary: $GLOSSARY_EXCLUDEENTRY shouldn't stop caching
Also, greatly improved unit tests, to test more cases of how the filter
should work.
2018-09-20 17:58:00 +01:00
Tim Hunt 43d270e4ef MDL-47962 filterlib: Fix lots of coding style 2018-09-20 17:58:00 +01:00
Tim Hunt 5abc431335 MDL-63020 ddl: fix nullable unique indexes in OCI and MS SQL
This works-around the default non-standard behaviour of these DB engines.
2018-09-20 17:41:22 +01:00
Tim Hunt 54b2b1d27f MDL-63020 xmldb: Improve PHPdoc comments for better IDE autocomplete 2018-09-20 17:41:22 +01:00
Luca Bösch 490476a118 MDL-62717 forum: Create announcements forum with HTML format intro. 2018-09-20 17:47:35 +02:00
Eloy Lafuente (stronk7) 6902f39141 weekly release 3.6dev 2018-09-20 12:11:53 +02:00
Eloy Lafuente (stronk7) ef10e7db4c MDL-63346 nodejs: Bump to created from scratch shrinkwrap file
Steps:

- remove node_modules & npm-shrinkwrap.json
- npm cache clear --force
- npm install
- npm shrinkwrap
2018-09-20 11:00:02 +02:00
Eloy Lafuente (stronk7) 5bd0dc6483 MDL-23545 question: fix remaining sizes leading to failures 2018-09-19 23:07:20 +02:00
Eloy Lafuente (stronk7) 881f451bf0 Merge branch 'MDL-23545-phpunit-fixes' of https://github.com/timhunt/moodle 2018-09-19 18:10:37 +02:00
Eloy Lafuente (stronk7) dd3508df5b MDL-59227 course: Use low level early renaming to avoid dupes
Instead of using set_coursemodule_name() to proceed with the name
change we perform the change earlier in the process, both to avoid
duplicate events caused by the renaming function and also to get the new
name used by all proper generated events.
2018-09-19 17:20:23 +02:00
David Monllao 4453613767 Merge branch 'MDL-63140-master' of git://github.com/rezaies/moodle 2018-09-19 13:30:43 +02:00
Tim Hunt 59ffae414c MDL-23545 qformat_xml: fix another Behat test 2018-09-19 12:18:59 +01:00
David Monllao 25561b3751 Merge branch 'MDL-63135-master' of git://github.com/rezaies/moodle 2018-09-19 13:12:40 +02:00
David Mudrák 7fb0e8a260 MDL-63013 tool_policy: Add Behat tests for the new style of agreements
The tests make sure that both existing users as well as signing up users
can accept policies with "on their own page" style of agreement prior
reaching the consent page.
2018-09-19 09:55:42 +02:00
David Mudrák 362ae1b443 MDL-63013 tool_policy: Change acceptance flow for policies with own page
The idea of the patch is to check the list of policies that are shown
before and on the consent page. If that list contains a policy that is
supposed to be accepted on its own page, the existing flow is
interrupted and the user is redirected to a view.php to display that
particular policy.

The view template for such a policy contains a button for getting the
user agreement. When pressed, the policy is marked as accepted and we
can go to start again.

To make this working during the signup, we need to extend the existing
logic and start tracking which particular policies the visitor accepted
prior reaching the signup form. Similarly, we need to start track which
particular policies were displayed and use that list when evaluating
which policies were unchecked on the consent page.
2018-09-19 09:55:42 +02:00
David Mudrák 23b663ed55 MDL-63013 tool_policy: Policy agreement style can be defined now
The patch introduces a new property of a policy document called
"Agreement style". It allows the admin to define if the policy should be
accepted together with all others on the consent page (legacy and
default behaviour) or on its page before the consent page is reached
(the new optional behaviour).
2018-09-19 09:55:42 +02:00
Eloy Lafuente (stronk7) 61367994bd Merge branch 'MDL-23545-phpunit-fixes' of https://github.com/timhunt/moodle 2018-09-19 00:26:25 +02:00
Eloy Lafuente (stronk7) 4cde0a5212 Merge branch 'MDL-63116-master-1' of git://github.com/mihailges/moodle 2018-09-18 23:26:51 +02:00
Eloy Lafuente (stronk7) ead7a5393e Merge branch 'MDL-59227' of https://github.com/rlorenzo/moodle 2018-09-18 23:11:34 +02:00
Mihail Geshoski 457047de6c MDL-61908 privacy: Fix heading in data privacy pages 2018-09-18 18:49:04 +02:00
Eloy Lafuente (stronk7) ddf86f9930 Merge branch 'MDL-63109-master' of git://github.com/mihailges/moodle 2018-09-18 17:50:13 +02:00
David Monllao 542201d547 Merge branch 'MDL-63138-master' of git://github.com/rezaies/moodle 2018-09-18 16:39:58 +02:00
David Monllao 11decdb19c Merge branch 'MDL-63139-master' of git://github.com/rezaies/moodle 2018-09-18 16:36:55 +02:00
David Monllao 6302d4cf64 Merge branch 'MDL-63117-master' of git://github.com/rezaies/moodle 2018-09-18 16:32:58 +02:00
Tim Hunt f19c6f60cd MDL-23545 qformat_xml: don't allow irrelevant DB differences to break tests
Also slightly improve formatting of the exported file.
2018-09-18 13:52:51 +01:00
David Monllao 0e5144fe24 Merge branch 'MDL-63333_master' of git://github.com/markn86/moodle 2018-09-18 12:17:46 +02:00
Mihail Geshoski 85de6d525d MDL-63109 privacy: Add behat tests 2018-09-18 15:06:23 +08:00
Kathrin Osswald df8eec5206 MDL-61573 user: Changes to pix path for better support of fa mapping 2018-09-18 08:28:23 +02:00
Jun Pataleta 58e529e0c0 Merge branch 'm36_MDL-63319_MySQL_MSSQL_Rename_Field_Reserved_Word' of https://github.com/scara/moodle 2018-09-18 14:10:11 +08:00
Mihail Geshoski 2b85015b83 MDL-63109 privacy: Fix the initialisation of the policy acceptance modal 2018-09-18 12:55:35 +08:00
Adam Olley bc32547da9 MDL-57610 assignfeedback_editpdf: Add test coverage for conversion task
Without this, we have no coverage of the convert_submissions task. This test
validates it both works normally, and that it also skips queued items that have
exceeded the conversion attempt limit introduced in this improvement.
2018-09-18 14:14:24 +09:30
Tim Schroeder d2111dbccf MDL-63119 calendar: now showing event end in modal
When clicking on an event in the month view, a modal opens with
    information about it. That modal did previously only show the start time
    of the event. It now also shows the end (if the event has one).
2018-09-18 11:40:07 +08:00
Jun Pataleta 902ec3d0f8 Merge branch 'MDL-23545-master-fix' of git://github.com/junpataleta/moodle 2018-09-18 10:07:56 +08:00
Jun Pataleta 73311d3157 MDL-23545 question_format: Replace tabs with spaces in upgrade.txt 2018-09-18 10:04:03 +08:00
Jun Pataleta 3d2659097e Merge branch 'wip-MDL-23545-master' of https://github.com/Beedell/moodle 2018-09-18 09:47:38 +08:00
Damyon Wiese 14ae3b74aa MDL-62930 theme_boost: Remove custom-select styles
These styles cause the custom select fields to overlap their containers. See the license field in the file picker single file info dialogue for an example.
2018-09-18 08:41:38 +08:00
Rohan Khajuria e372389251 MDL-59227 course: add (copy) to duplicated modules 2018-09-17 15:14:12 -07:00
Eloy Lafuente (stronk7) 044e343bbd Merge branch 'MDL-63279_master' of https://github.com/aanabit/moodle 2018-09-17 23:56:37 +02:00
Eloy Lafuente (stronk7) d20250ab3e Merge branch 'MDL-58781_master' of https://github.com/aanabit/moodle 2018-09-17 23:39:35 +02:00
Eloy Lafuente (stronk7) 4ab33be074 Merge branch 'MDL-63009-master' of git://github.com/mickhawkins/moodle 2018-09-17 23:30:13 +02:00
Eloy Lafuente (stronk7) 01d7b4b6dd Merge branch 'MDL-63184-master-2' of git://github.com/junpataleta/moodle 2018-09-17 23:10:39 +02:00
Eloy Lafuente (stronk7) 8d6892167b Merge branch 'MDL-63371' of git://github.com/timhunt/moodle 2018-09-17 23:09:20 +02:00
Eloy Lafuente (stronk7) 7c5a9faf41 Merge branch 'MDL-63354-master' of https://github.com/HuongNV13/moodle 2018-09-17 23:05:31 +02:00
David Mudrák 8b8b9a9415 MDL-63253 admin: Show location of the found items at search results page
The search results page showed just the titles of the found matching
pages / sections but not their location within the admin tree. In
certain cases, we even have multiple admin pages with the same title -
making it impossible to distinguish which is which.

The patch makes it so that the path of the found admin page / section is
displayed below the title.
2018-09-17 20:34:31 +02:00
Jun Pataleta 302089f52b MDL-63184 tool_dataprivacy: Ensure PO roles have correct capability 2018-09-17 22:12:34 +08:00
David Monllao 79e321cbc4 Merge branch 'MDL-62554-master' of git://github.com/junpataleta/moodle 2018-09-17 13:44:49 +02:00
Eloy Lafuente (stronk7) 771665a2a0 Merge branch 'MDL-63215-master' of https://github.com/lucaboesch/moodle 2018-09-17 10:40:41 +02:00
Eloy Lafuente (stronk7) ba03ff5d32 Merge branch 'MDL-63379-master' of git://github.com/junpataleta/moodle 2018-09-17 09:54:31 +02:00
Jun Pataleta 8420b61c25 MDL-63379 user: Fix Behat tests for participants filtering 2018-09-17 11:25:37 +08:00
Mark Nelson cbc3833d27 MDL-63333 core: removed unused setting 'messaginghidereadnotifications' 2018-09-17 10:02:37 +08:00
Mihail Geshoski 19bad13a55 MDL-63116 privacy: Add bulk actions to the privacy request table 2018-09-17 08:13:06 +08:00
Mihail Geshoski 99496e35ae MDL-63116 privacy: Add behat tests 2018-09-17 08:13:06 +08:00
Mihail Geshoski 598160ef4c MDL-63116 privacy: Add unit tests 2018-09-17 08:13:06 +08:00
Adam Olley b722a457ad MDL-57610 assignfeedback_editpdf: remove queued jobs that keep failing
Without this, its possible to get a document in the editpdf conversion queue
that keeps failing - and in some cases completely crashing the PHP script
despite exception handling - which ends up blocking the processing of the queue
entirely.

This change allows for a configurable number of attempts the conversion
task will perform before removing the item from the queue.
2018-09-17 09:30:43 +09:30
Michelle Melton 29ec0d5543 MDL-63215 block_rss_client: Escaping tags in RSS entries 2018-09-16 23:49:15 +02:00
Matteo Scaramuccia 211d04f43e MDL-63319 ddl: Added getRenameFieldSQL() coverage 2018-09-14 22:41:18 +02:00
Matteo Scaramuccia 66c34d3578 MDL-63319 ddl: Improved rename_field() coverage
DB API should allow to rename fields, including renaming
those columns named using a reserved word.
2018-09-14 22:41:18 +02:00
Matteo Scaramuccia 12b6041aac MDL-63319 ddl: MSSQL should rename reserved words 2018-09-14 22:31:39 +02:00
Matteo Scaramuccia 0fb34e9108 MDL-63319 ddl: MySQL should rename reserved words 2018-09-14 22:31:39 +02:00
John Beedell 1dab8faafd MDL-23545 question: XML import/export add category description 2018-09-14 16:54:25 +01:00
Tim Hunt 802ff4c933 MDL-63371 question: USE_RAW_DATA case in check_qt_var_name_restrictions 2018-09-14 16:43:41 +01:00
Amaia Anabitarte fdb45f7943 MDL-63279 messaging: Add admin setting for toggling site-wide messaging 2018-09-14 13:20:18 +02:00
Amaia Anabitarte b0af7093cf MDL-58781 mod_feedback: Inconsistency in analysis exported to excel 2018-09-14 12:47:56 +02:00
Shamim Rezaie 8ce2f61789 MDL-63143 mod_lesson: Check if the module is visible to the user 2018-09-14 20:34:10 +10:00
Shamim Rezaie e56833ca06 MDL-63143 mod_lesson: Add userid param to mod_lesson calendar callbacks 2018-09-14 20:34:00 +10:00
Eloy Lafuente (stronk7) 83a548c1d2 MDL-63346 travis: GRUNT job immune to npm-shrinkwrap.json changes
When upgrading nodejs/npm versions, there are modifications to
different packages or to the format of the npm-shrinkwrap.json
file. Usually that leads to failed jobs untill the bundled file
is updated.

To avoid that, we just ignore the npm-shrinkwrap.json file, so
just the REAL modifications in css/js/ignore stuff are considered.
2018-09-14 11:55:23 +02:00
Eloy Lafuente (stronk7) 674ef9baac weekly release 3.6dev 2018-09-14 11:06:32 +02:00
Eloy Lafuente (stronk7) 3741c59c14 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-09-14 11:06:29 +02:00
Shamim Rezaie 50f347214e MDL-63140 mod_glossary: Check if the module is visible to the user 2018-09-14 17:43:23 +10:00
Shamim Rezaie cbeb3995dc MDL-63142 mod_label: Check if the module is visible to the user 2018-09-14 17:39:21 +10:00
Shamim Rezaie a7da4c5fc8 MDL-63142 mod_label: Add userid param to mod_label calendar callbacks 2018-09-14 17:22:35 +10:00
Huong Nguyen 83f9f83a55 MDL-63354 Group: Rollover text on long group names is not consistent 2018-09-14 09:41:06 +07:00
Eloy Lafuente (stronk7) f71c8d96bd MDL-61169 iplookup: Change to another block still remaining to SF 2018-09-13 19:01:09 +02:00
Jun Pataleta ac61871ebe Merge branch 'MDL-51177-master' of git://github.com/andrewnicols/moodle 2018-09-13 16:17:02 +08:00
Andrew Nicols 11cd7c89d4 MDL-51177 atto_html: Check isHTML before hiding editor 2018-09-13 15:38:14 +08:00
Jun Pataleta 01f098afaa MDL-62554 tool_dataprivacy: Integration review fixes 2018-09-13 14:07:25 +08:00
Eloy Lafuente (stronk7) 0e05bac861 Merge branch 'MDL-60630-master' of git://github.com/andrewnicols/moodle 2018-09-12 23:14:54 +02:00
Andrew Nicols 666196271f MDL-60630 cachestore: Remove memcache plugin 2018-09-12 21:07:01 +08:00
Michael Hawkins 0971131a78 MDL-63009 tool_dataprivacy: Added site name/link to request emails 2018-09-12 17:41:58 +08:00
Eloy Lafuente (stronk7) 79e2d710d3 Merge branch 'MDL-63329-master' of git://github.com/andrewnicols/moodle 2018-09-12 10:19:19 +02:00
Jun Pataleta d1ae9c72c6 Merge branch 'mdl63321-master' of https://github.com/tlock/moodle 2018-09-12 15:34:59 +08:00
Jun Pataleta 19d8da7561 Merge branch 'MDL-51177-master' of git://github.com/andrewnicols/moodle 2018-09-12 13:30:39 +08:00
Andrew Nicols 3951d50a89 MDL-51177 core: Ignore built files in stylelint 2018-09-12 12:36:19 +08:00
Andrew Nicols 6e1008ddd0 MDL-51177 atto_html: Import htmlplus functionality 2018-09-12 10:12:15 +08:00
Jun Pataleta d784584243 Merge branch 'MDL-63231-set-default-value-for-int-param-MOODLE_Master' of https://github.com/guillalva06/moodle 2018-09-12 10:00:01 +08:00
Jun Pataleta 82585098f8 Merge branch 'MDL-50314_master' of git://github.com/do-you-even-curl/moodle 2018-09-12 09:44:36 +08:00
Andrew Nicols 89aff0d828 MDL-63329 core: Remove memcache session support 2018-09-12 08:15:35 +08:00
Eloy Lafuente (stronk7) db5057d7bd Merge branch 'MDL-63130_master' of git://github.com/markn86/moodle 2018-09-11 23:55:00 +02:00
Eloy Lafuente (stronk7) 6625cff604 Merge branch 'MDL-63136-master' of git://github.com/rezaies/moodle 2018-09-11 23:52:02 +02:00
Eloy Lafuente (stronk7) cbfc6b3f3f Merge branch 'MDL-62528-master' of git://github.com/bmbrands/moodle 2018-09-11 23:02:40 +02:00
Guillermo Alvarez e0dac0f4d7 MDL-63231 filepicker: Skype validation for null values
In file_get_all_files_in_draftarea function an integer could get
a null value so it is necessary to execute this function only
when is called with a valid integer value.
2018-09-11 09:03:23 -05:00
Shamim Rezaie 52c9bbbfae MDL-63141 mod_imscp: Check if the module is visible to the user 2018-09-11 15:35:21 +10:00
Shamim Rezaie 06800b5414 MDL-63141 mod_imscp: Add userid param to mod_imscp calendar callbacks 2018-09-11 15:14:47 +10:00
Tim Lock 394d0f15d9 MDL-63334 tool_privacy: Handle modules without privacy support. 2018-09-11 12:49:31 +09:30
Fotis Skandalis 8665cc33e0 MDL-62714 theme_boost: Course visibility in navigation bar
Added check in navbar.mustache to add dimmed_text class if needed.
Added is_hidden() in navigationlib.php to return if the class needs
to be added.
2018-09-10 16:51:35 +03:00
Charles YVANES 458453cee0 MDL-29895 core: removed require_login() when not needed 2018-09-10 11:22:50 +02:00
Jun Pataleta f239f97d34 Merge branch 'wip-MDL-62520_MASTER' of https://github.com/jason-platts/moodle 2018-09-10 16:22:48 +08:00
Jun Pataleta 48eb55a1e5 MDL-62554 tool_dataprivacy: Bump version for new WS functions 2018-09-10 12:16:20 +08:00
Jun Pataleta e547ba1de5 MDL-62554 tool_dataprivacy: Fix display of activity options 2018-09-10 12:16:20 +08:00
Jun Pataleta 40e4e99186 MDL-62554 tool_dataprivacy: Fix template for Bootstrapbase compatibility 2018-09-10 12:16:20 +08:00
Jun Pataleta 28c1b4138c MDL-62554 tool_dataprivacy: Remove defaults form
With the changes in this issue, this form is no longer being used.
2018-09-10 12:16:20 +08:00
Jun Pataleta 4e0d2064bb MDL-62554 tool_dataprivacy: Behat tests for managing registry defaults
* Also new step definitions and generator for:
  - Creating categories and purposes
  - Assigning category and purpose to context instances.
2018-09-10 12:16:20 +08:00
Jun Pataleta 08248c30a7 MDL-62554 tool_dataprivacy: Unit tests for new WS/API functions 2018-09-10 12:16:20 +08:00
Jun Pataleta a1af857354 MDL-62554 tool_dataprivacy: Fix fetching of default contexts
* We also need to handle default contexts for activities. If defaults
  for an activity is set, fetch that. If not, fetch the defaults for
  the context level.
2018-09-10 12:16:20 +08:00
Jun Pataleta f7bcdf61c5 MDL-62554 tool_dataprivacy: Allow setting of activity defaults
* Allow the setting of data registry defaults for activity modules.
* Rewrite the defaults page so that it uses templates.
* Use a tabbed layout for the defaults page that shows the default
  category and purpose per context level.
* New API and web service functions that enables the setting of the
  defaults.
2018-09-10 12:16:12 +08:00
Tim Lock 9790093d1a MDL-63321 block: Fix warning in Calendar month block after MDL-60587 2018-09-10 07:43:41 +09:30
AMOS bot 4dc9cf5b84 Automatically generated installer lang files 2018-09-08 00:07:23 +00:00
Tim Schroeder 3a33d51497 MDL-50314 mod_quiz: removed hardcoded export columns
* The columns 'institution', 'department' and 'email' are no longer
  automatically included in all quiz result exports.
* These columns can still be used, but have to be configured under
  'showuseridentity'.
2018-09-07 14:18:25 +02:00
Shamim Rezaie 00aa8d3f32 MDL-63140 mod_glossary: Add userid param to glossary calendar callbacks 2018-09-07 18:20:03 +10:00
Shamim Rezaie eb4c801cef MDL-63136 mod_data: Check if the module is visible to the user 2018-09-07 17:40:29 +10:00
Shamim Rezaie 362f9e7c61 MDL-63136 mod_data: Add userid param to mod_data calendar callbacks 2018-09-07 17:40:16 +10:00
Shamim Rezaie 46b29219e3 MDL-63139 mod_forum: Check if the module is visible to the user 2018-09-07 16:55:19 +10:00
Shamim Rezaie d46da4aadc MDL-63139 mod_forum: Add userid param to mod_forum calendar callbacks 2018-09-07 16:47:56 +10:00
Shamim Rezaie ac0f38b1d8 MDL-63138 mod_folder: Check if the module is visible to the user 2018-09-07 14:58:35 +10:00
Shamim Rezaie a0e19ccf32 MDL-63138 mod_folder: Add userid param to mod_folder calendar callback 2018-09-07 14:58:16 +10:00
Jun Pataleta 6e2e63457e weekly release 3.6dev 2018-09-07 11:10:02 +08:00
Jun Pataleta 0fb5aa730c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-09-07 11:09:47 +08:00
Mark Nelson 8a261177f7 MDL-63130 core_message: add unit test 2018-09-06 18:16:33 +08:00
Pavel Sokolov f88cc4ccae MDL-63130 message: message_count_unread_message counts sent messages 2018-09-06 18:16:06 +08:00
Shamim Rezaie a8df987e07 MDL-63135 mod_choice: Check if the module is visible to the user 2018-09-06 20:14:04 +10:00
Shamim Rezaie 1b82088f98 MDL-63135 mod_choice: Add userid param to mod_choice calendar callback 2018-09-06 20:09:50 +10:00
Shamim Rezaie 0ec076ef34 MDL-63135 mod_choice: Added choice_get_user_response function
A new function to return choice answers records of a given user in a given choice activity.
2018-09-06 20:01:05 +10:00
Shamim Rezaie dd1ba60f30 MDL-63117 mod_book: Check if the module is visible to the user 2018-09-06 17:41:06 +10:00
Shamim Rezaie a4fd6c07ba MDL-63117 mod_book: Add userid param to mod_book calendar callbacks 2018-09-06 15:54:36 +10:00
David Mudrák 5e2236a2f0 MDL-60820 workshop: Fix default value of submissiontypefile 2018-09-05 11:29:53 +02:00
Jake Dallimore c96c9601af MDL-62947 mod_feedback: fix feedback so it correctly uses forms API
Feedback code was doing the following, which is incompatible with the
sec-patched quickforms lib:
- appending '[0]' to non-group element names, meaning type checks in
getCleanType() were falling back to PARAM_RAW instead of PARAM_INT,
and meaning _findValue() was comparing elements it thought to be arrays
with scalar submit values (worked with eval() implementation as the 0th
element of a string was the character, but not working when patched).
- external unit tests incorrectly testing multichoice questions in the
process_page tests - patched lib highlighted failures.

It was also doing the following:
- actively setting null as default element values instead of 0 for
radio buttons and dropdowns (for 'not selected'). This is incompatible
with more recent quickforms lib (see MDL-63070).
- creating groups using addElement instead of addGroup - not recommended

This patch addresses the above.
2018-09-05 12:12:20 +08:00
Jake Dallimore c87010baca MDL-62947 core_form: fix remote code execution exploit in QuickForms
Applies the patch found upstream:
https://github.com/pear/HTML_QuickForm/commit/
d3a6d5c44dedf3c164c6c79198e4ef479bcedcd2 and make util methods static
for php7 compatibility.
2018-09-05 12:12:19 +08:00
AMOS bot fba3372009 Automatically generated installer lang files 2018-09-05 00:07:20 +00:00
Damyon Wiese 7c05d8a3d2 MDL-62748 course: maxsections is a limit
For course formats shipped with core, maxsections should be a limit to the number of sections
allowed in the course.
2018-09-04 22:44:45 +02:00
Mihail Geshoski f468f6d02a MDL-62857 theme_boost: Better filtering on navbar / breadcrumbs 2018-09-04 22:44:45 +02:00
Tim Hunt cb8aefa658 MDL-62880 qtype_ddwtos: drop support for legacy import format
It was more than 8 years since we wrote in that format.
2018-09-04 22:44:45 +02:00
Eloy Lafuente (stronk7) f6cafe495e Merge branch 'MDL-63249-master-enfix' of git://github.com/mudrd8mz/moodle 2018-09-04 22:34:51 +02:00
Jun Pataleta d58fd3dcbb Merge branch 'MDL-60578-master' of git://github.com/jleyva/moodle 2018-09-04 21:18:02 +08:00
David Monllao acfdb84f3c Merge branch 'MDL-62342-master' of git://github.com/mihailges/moodle 2018-09-04 14:33:50 +02:00
Juan Leyva f39d43af41 MDL-60578 mod_feedback: Handle correctly site feedbacks 2018-09-04 14:18:41 +02:00
Marina Glancy 38fefb5cdf MDL-60578 mod_feedback: pass courseid to WS 2018-09-04 14:18:39 +02:00
David Monllao 3db611ec31 MDL-62347 output: Fix phpdoc param name 2018-09-04 14:08:53 +02:00
David Monllao 72621d23ae Merge branch 'MDL-62347-master' of git://github.com/bmbrands/moodle 2018-09-04 14:05:41 +02:00
David Monllao 6a98671916 Merge branch 'MDL-60820-master-workshopsubmissiontypes' of git://github.com/mudrd8mz/moodle 2018-09-04 13:07:00 +02:00
David Monllao ffc4cc9a25 Merge branch 'MDL-62944' of https://github.com/NeillM/moodle 2018-09-04 12:15:36 +02:00
David Monllao adb8eb9c9c Merge branch 'MDL-55993-master' of https://github.com/albertolarah/moodle 2018-09-04 10:51:28 +02:00
Helen Foster 24a29d720c MDL-63249 lang: Merge English strings from the en_fix language pack
Significant string changes:

* completionpass_help, gradetopassnotset in mod_quiz - grade to pass set
  in quiz settings not gradebook
* namecolumnmissing,core_cohort - fixing incorrect message about adding
  users to a cohort
2018-09-04 08:40:48 +02:00
Jun Pataleta 8a03a5cba1 Merge branch 'MDL-60901' of git://github.com/stronk7/moodle 2018-09-04 10:17:23 +08:00
Eloy Lafuente (stronk7) 6b4a2b0ea1 Merge branch 'MDL-48846-master' of git://github.com/sarjona/moodle 2018-09-03 23:39:07 +02:00
Eloy Lafuente (stronk7) 4941d2d97d Merge branch 'MDL-63255-master' of git://github.com/vmdef/moodle 2018-09-03 23:31:00 +02:00
Eloy Lafuente (stronk7) cf2fea1d25 Merge branch 'MDL-61742-master-inactiveproviders' of git://github.com/mudrd8mz/moodle 2018-09-03 23:23:12 +02:00
Eloy Lafuente (stronk7) ced7e0efff Merge branch 'MDL-62848-master-placeholderwidth' of git://github.com/mudrd8mz/moodle 2018-09-03 22:52:31 +02:00
David Monllao dfc6f782e1 Merge branch 'MDL-38301-master' of git://github.com/junpataleta/moodle 2018-09-03 12:44:50 +02:00
David Monllao c4aa41ca2f Merge branch 'MDL-55744-master_atto_should_not_autosave_on_not_loggedin_users' of https://github.com/dravek/moodle 2018-09-03 12:27:25 +02:00
Alberto Lara Hernández c60f5ae136 Merge branch 'MDL-55993-master' of https://github.com/albertolarah/moodle into MDL-55993-master 2018-09-03 12:18:58 +02:00
Alberto Lara Hernández 96a037f755 MDL-55993 mod_assign: web services don´t set a URL. 2018-09-03 12:18:41 +02:00
David Monllao f3b4a63f91 Merge branch 'MDL-63238-master' of git://github.com/bmbrands/moodle 2018-09-03 10:36:16 +02:00
Eloy Lafuente (stronk7) 9b92642cf1 MDL-60901 environment: 3.6 requirements
Changes include:
- MySQL 5.6 is required.
- PostgreSQL 8.4 is required.
- Oracle 11.2 is required.
- 64bits architecture is recommended.
2018-09-03 10:15:26 +02:00
Víctor Déniz Falcón b93767f3ee MDL-63255 core_user: fix harcoded sql table aliases 2018-09-03 06:53:40 +01:00
Mihail Geshoski 2e72392bbf MDL-62342 privacy: Fix strings used in the consent on behalf modal 2018-09-03 12:53:19 +08:00
Mihail Geshoski c106d489c5 MDL-62342 privacy: Use singular/plural form in labels 2018-09-03 12:53:19 +08:00
Mihail Geshoski c69a43f2fc MDL-56998 blog: Remove associated blog posts when module is deleted 2018-09-03 08:33:38 +08:00
AMOS bot 029b3a923d Automatically generated installer lang files 2018-09-02 00:07:18 +00:00
AMOS bot 607958a1b3 Automatically generated installer lang files 2018-09-01 00:07:18 +00:00
David Mudrák c261ada88b MDL-62848 form: Fix width of the autocomplete input field
Make sure that the autcomplete input field is wide enough to display the
placeholder text.
2018-08-31 14:51:05 +02:00
David Mudrák 5cdf8d49c7 MDL-62848 form: Fix missing support for {{#js}} helper in autocomplete
The form-autocomplete module uses three Mustache templates
core/form_autocomplete_input, core/form_autocomplete_suggestions and
core/form_autocomplete_selection. However, it did not support executing
the JS that is eventually part of those templates.
2018-08-31 14:51:05 +02:00
Mark Johnson 7d2ad716dd MDL-60820 workshop: Allow teacher to specify submission types
This allows the teacher to define what students are supposed to submit
(online text and/or attachment) and if the given submission part is
required or optional.
2018-08-31 14:48:29 +02:00
Dan Poltawski 292df9f613 MDL-48846 filter: Stop reffering to invalid moodle.org/download/mimetex 2018-08-31 12:37:14 +02:00
David Mudrák 39d2c68856 MDL-61742 messaging: Do not send messages from inactive providers
Before this patch, we only checked that the given provider has been
configured in the user or system preferences. However, if the provider's
component is disabled, it does not even appear in these preferences.
Additionally, there was no check that the message / notification
provider is among providers allowed to be consumed by the recipient.

The patch checks that the message origin is among providers returned by
the message_get_providers_for_user() so disabled plugins can't act as
sources of messages and users can't receive messages from providers they
do not have capability for. This mitigates the risk of abusing a plugin
as a source of spam, for example.

Unit test is fixed and extended. When the $CFG->messaging is disabled,
no messages between users should be sent (I can't understand why the
unit test was written in an opposite way). Added assertions for the
raised debugging message.
2018-08-31 12:15:30 +02:00
Neill Magill 656837d65f MDL-62944 calendar: Clarify the intended use of $checkcapability 2018-08-31 10:15:37 +01:00
Simey Lameze baedf0662a MDL-62944 calendar: Fix actionevent logic on template
During the calendar work, we have added the feature of
drag and drop activity event or "action events".

The problem at that time was, action events could not be
editable through the calendar UI, but should be allowed
to drag and drop. So, we couldn't use the return of
calendar_edit_event_allowed() because it can return true
(in case of teachers, that have permission to change the
activity) and the attribute isactionevent was created to
control on the UI if the user is viewing an action event.

So what my patch does is just add the check if we are
viewing an action event, and in this case, it won't display
the cog to edit that event.
2018-08-31 10:15:37 +01:00
Neill Magill bbf1fde412 MDL-62944 activities: Activities should not require capability
Activities should not require the user manipulating them to have
calendar capabilities for their events to be added to the Moodle
calendar
2018-08-31 10:15:37 +01:00
Neill Magill 196aa50489 MDL-62944 activities: Test adding activities with no calendar capability 2018-08-31 10:15:36 +01:00
Neill Magill 2363b99e69 MDL-62944 completion: Calendar capabilities should not be required
The completion API should not require a user to have the capability to
add calendar events for it to function correctly.
2018-08-31 10:15:36 +01:00
Neill Magill 3f560e80ed MDL-62944 completion: Test that completion dates add events to calendar
When a user does not have calendar capabilities completion dates should
still be created correctly.
2018-08-31 10:15:35 +01:00
Neill Magill 0b673d9714 MDL-62944 mod_data: Action menu missing from database pages
The action menu was missing from many of the database activity pages,
which meant that it could not be accessed until enough had been done to
the activity to make the editing tabs that used view.php accessible.
2018-08-31 10:15:32 +01:00
Eloy Lafuente (stronk7) 175b3708c9 weekly release 3.6dev 2018-08-30 19:03:58 +02:00
Eloy Lafuente (stronk7) 9bbef5bcf1 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-08-30 19:03:55 +02:00
Andrew Nicols 6950592fcd Merge branch 'MDL-62535-master-fix' of github.com:abgreeve/moodle 2018-08-30 13:49:15 +08:00
Adrian Greeve dfc5e6d10e MDL-62535 grading methods: Unit test update for fix. 2018-08-30 13:19:21 +08:00
Adrian Greeve fe7d6e31f9 MDL-62535 grading methods: Fix for multiple intances.
We were only exporting the one instance per item id.
Instead we should have been exporting all instances for each
item id.
2018-08-30 11:35:52 +08:00
AMOS bot 29bfe883de Automatically generated installer lang files 2018-08-30 00:07:55 +00:00
Eloy Lafuente (stronk7) cf76059eda Merge branch 'MDL-62535-master' of git://github.com/abgreeve/moodle 2018-08-30 01:19:57 +02:00
Eloy Lafuente (stronk7) 12ef47cd99 MDL-63165 question: Bump expected size of question exports (take II) 2018-08-29 14:38:40 +02:00
Jake Dallimore 9e85412247 Merge branch 'MDL-63165-master-fix' of https://github.com/andrewnicols/moodle 2018-08-29 12:33:29 +08:00
Andrew Nicols dab0f9aae7 MDL-63165 question: Bump expected size of question exports 2018-08-29 10:43:21 +08:00
Jake Dallimore 8981ac0197 Merge branch 'MDL-62657-master' of git://github.com/junpataleta/moodle 2018-08-29 09:30:07 +08:00
Andrew Nicols e36019c2f3 Merge branch 'wip-MDL-62742-master' of git://github.com/marinaglancy/moodle 2018-08-29 08:31:08 +08:00
Eloy Lafuente (stronk7) 1766184e97 Merge branch 'MDL-63094-master' of git://github.com/andrewnicols/moodle 2018-08-28 23:53:58 +02:00
Eloy Lafuente (stronk7) 770fc03ef6 Merge branch 'MDL-62914-master' of git://github.com/lameze/moodle 2018-08-28 23:15:36 +02:00
David Monllao 4f855defce Merge branch 'wip-MDL-63165-master' of https://github.com/Beedell/moodle 2018-08-28 12:28:25 +02:00
Marina Glancy 442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
Jake Dallimore efbbbf3373 Merge branch 'MDL-63101-master' of git://github.com/andrewnicols/moodle 2018-08-28 16:55:07 +08:00
Jake Dallimore 240f437a4d Merge branch 'MDL-63086-master' of git://github.com/andrewnicols/moodle 2018-08-28 08:47:43 +08:00
Andrew Nicols 75ad50cba0 Merge branch 'MDL-62782-master' of git://github.com/damyon/moodle 2018-08-28 07:06:22 +08:00
Eloy Lafuente (stronk7) ed0d19e7b9 Merge branch 'MDL-62989-master' of git://github.com/mihailges/moodle 2018-08-27 17:51:20 +02:00
Jun Pataleta 1b070cfe41 MDL-63187 tool_dataprivacy: Behat fixes for confirmation lang strings 2018-08-27 22:34:33 +08:00
David Monllao 76e9e2f9c0 Merge branch 'MDL-63174-master-emptyusername' of git://github.com/mudrd8mz/moodle 2018-08-27 15:06:55 +02:00
David Monllao c682ea4fd1 Merge branch 'MDL-63179-master' of https://github.com/lucaboesch/moodle 2018-08-27 12:21:00 +02:00
David Monllao 0d9ddf210c MDL-63187 tool_dataprivacy: Update delete purpose and category lang strings 2018-08-27 12:11:53 +02:00
David Monllao b8122ba333 Merge branch 'MDL-63187-master' of git://github.com/junpataleta/moodle 2018-08-27 11:54:24 +02:00
David Monllao ed20d9dbe9 Merge branch 'MDL-63210_master' of git://github.com/markn86/moodle 2018-08-27 11:46:27 +02:00
David Monllao 39d5bf09eb Merge branch 'MDL-63234-master' of git://github.com/andrewnicols/moodle 2018-08-27 11:32:09 +02:00
David Monllao 12f767820a Merge branch 'MDL-62867-missing_colon_in_query' of https://github.com/bitumin/moodle 2018-08-27 11:22:27 +02:00
Bas Brands 8e1a1c26be MDL-63238 theme boost: set background for #region-main 2018-08-27 10:50:49 +02:00
Andrew Nicols 111c6a5661 MDL-63086 block_rss_client: Move skip time calculation to task 2018-08-27 15:49:27 +08:00
Andrew Nicols fdab90a7d4 Merge branch 'MDL-53024-master' of git://github.com/damyon/moodle 2018-08-27 15:45:57 +08:00
Zig Tan 8f7d07fa7d MDL-38301 mod_assign: Fix date validation logic & message consistency 2018-08-27 15:26:22 +08:00
Andrew Nicols 0a197875df MDL-63101 cache: Improve accuracy of cache event invalidation 2018-08-27 14:43:42 +08:00
Andrew Nicols 16159f2223 Merge branch 'MDL-59169-master' of https://github.com/nwp90/moodle 2018-08-27 09:43:30 +08:00
Andrew Nicols 1a5a0b9b5f MDL-63234 blocks_recent_activity; Ensure courselib is loaded 2018-08-25 08:39:03 +08:00
Alberto Lara Hernández 52c9bf79b7 MDL-55993 mod_assign: web services don´t set a URL. 2018-08-24 16:42:13 +02:00
John Beedell d0a60444a1 MDL-63165 Question: xml import of question categories 2018-08-24 15:20:18 +01:00
Mitxel Moriana d2029eff28 MDL-62867 tags: Fix missing colon in sql placeholder
Due to a missing colon in an sql query field value placeholder
the calculation of the ordering field for a newly added tag
was ignoring itemid.
2018-08-24 14:59:13 +02:00
Luca Bösch 2711941cb9 MDL-63179 enrol_self: String and @return tag corrected. 2018-08-24 13:38:19 +02:00
Mihail Geshoski d6e8841313 MDL-62989 privacy: Improve data request order for users 2018-08-24 15:32:34 +08:00
Jake Dallimore 8df868e9e0 weekly release 3.6dev 2018-08-24 13:08:47 +08:00
Mark Nelson ce1db1f7db MDL-63210 core: convert for loop to forEach in JS 2018-08-24 11:31:32 +08:00
Eloy Lafuente (stronk7) a20ff7089c Merge branch 'MDL-63028-master' of git://github.com/bmbrands/moodle 2018-08-23 12:48:41 +02:00
Bas Brands 4a5ceb215f MDL-63028 Theme boost: fix footer maintenance page 2018-08-23 10:55:26 +02:00
Jun Pataleta e477bed27b MDL-63187 tool_dataprivacy: Improve confirm message lang strings
* Updated the delete confirmation messages so that the category/purpose
names are shown in italics. This makes it easier for the privacy officer
to see the category/purpose that is being deleted.
2018-08-23 16:53:03 +08:00
Andrew Nicols 2c6771d793 Merge branch 'MDL-57281-master-fix' of https://github.com/andrewnicols/moodle 2018-08-23 15:47:28 +08:00
Andrew Nicols 67984597fb MDL-57281 question: Correct path to Quiz admin in test 2018-08-23 15:44:23 +08:00
Jake Dallimore a37a616213 Merge branch 'MDL-57281-master-fix' of https://github.com/andrewnicols/moodle 2018-08-23 08:20:13 +08:00
Andrew Nicols e8449116ef MDL-57281 enrol_lti: Nav to Published as LTI tools 2018-08-23 08:08:59 +08:00
Víctor Déniz Falcón 5a4b4c06ec MDL-57281 behat: Fix some goutte tests (cannot click on li)
Simply they are not needed, without JS everything is expanded.
2018-08-22 18:34:50 +02:00
Jake Dallimore 7e93539cf6 MDL-36255 core_grade: fix to ensure correct context used for filters
Some grade object (outcomes,scales) can be created at site or course
context, so this patch just makes sure we use the respective context
when applying format_string to the name in the get_name() function.
2018-08-22 17:55:50 +08:00
Damyon Wiese 334db37769 MDL-53024 assign: Remove incorrect logic in query
We are simplifying this query so it will return grades if the attempt matches
the submission attempt, or there is no submission. The case where there is a grade
but no submission can happen only for group assignments.
2018-08-22 12:59:10 +08:00
Andrew Nicols 5ab0e8aae3 MDL-63094 tool_policy: Fix the cookie banner to the bottom
Floating banners cause issues with clickability in Behat as it is unable
to understand that it cannot interact with the elements underneath the
floating banner, or that it needs to scroll the page so that the
required content is no longer beneath the floating banner.

Changing the banner to be fixed to the bottom of the page during Behat
runes is a reliable fix.
2018-08-22 11:00:08 +08:00
Andrew Nicols 4d1a42fb7c MDL-63094 js: Do not check visibility before hiding backdrop
It's possible for the backdrop to be created during the show, before the
modal is actually fully shown.

This check is unnecessary because the getBackdrop() function always
returns a value and will always succeed.
2018-08-22 10:23:30 +08:00
Andrew Nicols 4b6780417e MDL-63094 tool_policy: Fix race condition in modal display
The way in which the modal was displayed meant that there were no
pending JS items, whilst the modal was rendered, causing random behat
fails.

This JS has been restructured to create the Modal and pass it a set of
Promises for both the title, and body.
2018-08-22 10:23:30 +08:00
Henning Bostelmann 0e141964e0 MDL-62914 Calendar: handle TZURL iCal property 2018-08-22 10:07:41 +08:00
Andrew Nicols d5bf22ecd1 Merge branch 'MDL-62660' of https://github.com/stronk7/moodle 2018-08-22 08:02:47 +08:00
Eloy Lafuente (stronk7) 726c0ab9a3 MDL-62660 xmldb: fix tool_dataprivacy_request_>status to int(2)
So the new defined statuses fit in the column for all databases.
2018-08-21 23:57:35 +02:00
Eloy Lafuente (stronk7) 3a6f371640 Merge branch 'MDL-63028-master' of git://github.com/bmbrands/moodle 2018-08-21 19:23:37 +02:00
Jun Pataleta 9193226522 MDL-63187 tool_dataprivacy: Behat tests for purposes/categories CRUD 2018-08-21 16:34:29 +08:00
Jun Pataleta bcff8dfb3f MDL-63187 tool_dataprivacy: Fix delete button text
* No need to add the purpose/category name for the delete button itself
* Fix delete confirmation lang strings.
* Add button titles to Add purpose/category buttons so they can be
  clicked on when running Behat tests.
2018-08-21 16:18:55 +08:00
Jake Dallimore 805ce3de79 Merge branch 'MDL-36255-master' of https://github.com/lucaboesch/moodle 2018-08-21 16:04:17 +08:00
Jun Pataleta 69781cdae1 MDL-62657 user: More users fields for creation/update WS functions 2018-08-21 12:08:20 +08:00
Jake Dallimore e9f1946ca1 Merge branch 'MDL-62534-master' of https://github.com/mackensen/moodle 2018-08-21 11:43:56 +08:00
Andrew Nicols 440dad627f Merge branch 'MDL-62660-master' of git://github.com/junpataleta/moodle 2018-08-21 11:09:33 +08:00
Andrew Nicols 9adf5f0595 Merge branch 'MDL-57281-master' of https://github.com/vmdef/moodle 2018-08-21 10:49:10 +08:00
Jun Pataleta 4ecb1c6221 MDL-62660 tool_dataprivacy: Behat fix for data deletion 2018-08-21 10:27:21 +08:00
Jun Pataleta 237c85d303 MDL-62660 tool_dataprivacy: CI fixes 2018-08-21 09:28:48 +08:00
Andrew Nicols 13b4a1f4bb Merge branch 'MDL-63131-master' of https://github.com/sammarshallou/moodle 2018-08-21 08:57:17 +08:00
sam marshall b5311ce466 MDL-63131 Web services: Callback to allow web service overrides 2018-08-20 15:32:34 +01:00
Charles Fulton 4a34a26aa9 MDL-62534 course formats: do not purge empty sections on upgrade 2018-08-20 09:11:01 -04:00
Víctor Déniz Falcón 02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
Michael Hawkins a1e1cf63fd MDL-62660 tool_dataprivacy: Behat additions for deletion and data expiry 2018-08-20 15:31:20 +08:00
Michael Hawkins 95a844ebdc MDL-62660 tool_dataprivacy: Add and update PHPUnit tests
Updated tests with latest statuses.
Added testing for request download expiry functionality and method.
Added assign_site_dpo within a parent class for unit tests.
2018-08-20 15:31:20 +08:00
Michael Hawkins 5f9a31ee79 MDL-62660 tool_dataprivacy: Add scheduled task to expire data requests 2018-08-20 15:31:20 +08:00
Michael Hawkins 693f690c18 MDL-62660 tool_dataprivacy: Add ability to expire data requests
Also replaced Completed status with situation specific statuses.
Also improved UX on request pages in line with expiries and the aadditional statuses.
2018-08-20 15:31:20 +08:00
Andrew Nicols 7bd269e82d MDL-62660 tool_dataprivacy: Add method for unit tests to run adhoc tasks 2018-08-20 15:31:20 +08:00
Luca Bösch 8ad225b431 MDL-36255 grades: allow multilang filters in grades 2018-08-20 08:29:36 +02:00
Jake Dallimore 4638819780 Merge branch 'MDL-63097' of git://github.com/stronk7/moodle 2018-08-20 13:51:50 +08:00
Adrian Greeve 4905daf497 MDL-62535 tool_dataprivacy: Registry shows deprecated interfaces. 2018-08-20 11:32:01 +08:00
Adrian Greeve 4c6781f009 MDL-62535 privacy: Create deprecated provider interface.
Any interfaces that have become deprecated should extend
this interface.
2018-08-20 11:32:01 +08:00
Adrian Greeve 0aedccc973 MDL-62535 core_grading: Unit test for new methods. 2018-08-20 11:32:01 +08:00
Adrian Greeve 620dbfbe89 MDL-62535 mod_assign: Update to providers to include adv grading. 2018-08-20 11:32:01 +08:00
Adrian Greeve f3a6d9bb76 MDL-62535 core_grading: Update to providers and interface.
The previous interface was inadequate for retrieving user
information stored in the sub-plugins.

A new interface and methods have been added to successfully
deal with user data.
2018-08-20 11:32:01 +08:00
Andrew Nicols a4c596cb00 Merge branch 'MDL-63176' of https://github.com/spvickers/moodle 2018-08-20 11:15:35 +08:00
Jake Dallimore 88dc63c335 Merge branch 'MDL-57741-master' of git://github.com/cescobedo/moodle 2018-08-20 10:11:49 +08:00
Eloy Lafuente (stronk7) a9428fab11 weekly release 3.6dev 2018-08-17 17:37:15 +02:00
Eloy Lafuente (stronk7) beaff3f103 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-08-17 17:37:12 +02:00
David Mudrák 784883e1ee MDL-63174 user: user_create_user to throw exception on empty username
The core API function user_create_user() did not check the case when the
given username was empty.

Also adding a missing string 'usernamelowercase' for the existing lower
case check and unit tests.
2018-08-17 13:24:31 +02:00
David Mudrák 0e99d58c35 MDL-63174 user: core_user_create_users to throw exception on empty names
To be consistent with the web administration UI, we should not allow to
create invalid user records with empty username, lastname or firstname
via the web services.
2018-08-17 13:24:31 +02:00
Jake Dallimore 215ecb017a Merge branch 'MDL-62884-master' of git://github.com/damyon/moodle 2018-08-17 16:02:05 +08:00
Damyon Wiese a3124b15dc MDL-62884 privacy: Additional fix for popper.js
For a table with action menus inside a scrollable region, we need to ensure
the table is at least big enough.
2018-08-17 15:12:05 +08:00
Stephen Vickers 1272a926d5 MDL-63176 enrol_lti: Add $COURSE to global
Ensure that capabilities using $COURSE can be parsed.
2018-08-16 22:41:57 +01:00
cescobedo ea3c5ba14b MDL-57741 enrol_lti: Add Launch URL to Published as LTI tools 2018-08-16 09:08:38 +02:00
Nick Phillips 9a2da73753 MDL-59169 gradebook: Add groupid to gpr tracking & use
Added groupid to grade_plugin_return tracking, modified constructor
to use query params as defaults if passed-in params not supplied,
used groupid tracking in core reports.

grade_get_graded_users_select also fixed to use gpr (otherwise using
it breaks when course current group has changed between render and
submit).

Fixed coding style issue in gpr constructor & documented properties.

Added upgrade.txt noting gpr changes.
2018-08-16 04:03:51 +02:00
AMOS bot e28bc33b19 Automatically generated installer lang files 2018-08-16 00:08:08 +00:00
Bas Brands 0e202eca75 MDL-62528 forum: Fixed vertical position when loading permalinks 2018-08-15 11:37:21 +02:00
Jake Dallimore 71926adb0d Merge branch 'MDL-63050-master' of git://github.com/andrewnicols/moodle 2018-08-15 10:59:37 +08:00
Andrew Nicols 6cf24801a9 Merge branch 'MDL-62600-master' of git://github.com/mickhawkins/moodle 2018-08-15 08:53:30 +08:00
AMOS bot 21b1892843 Automatically generated installer lang files 2018-08-15 00:07:31 +00:00
Luke Carrier 6b6fd4b0b7 MDL-61238 cohort: require_once all libraries 2018-08-15 00:12:38 +02:00
Eloy Lafuente (stronk7) 92af6a3998 Merge branch 'MDL-62341-master' of git://github.com/mihailges/moodle 2018-08-15 00:03:18 +02:00
Eloy Lafuente (stronk7) 326792694e Merge branch 'MDL-58409-master_needs_clean_in_autocomplete_element' of https://github.com/dravek/moodle 2018-08-14 17:29:48 +02:00
Eloy Lafuente (stronk7) 9c1c0de78c Merge branch 'MDL-61650-master' of git://github.com/damyon/moodle 2018-08-14 16:49:44 +02:00
David Monllao 8e6c2ce300 Merge branch 'MDL-36754-master' of git://github.com/andrewnicols/moodle 2018-08-14 10:18:55 +02:00
Andrew Nicols 2e8d476165 MDL-36754 core_files: Add back missing baseurl line 2018-08-14 15:54:12 +08:00
David Monllao 3ff9233a18 Merge branch 'MDL-36754-master' of git://github.com/andrewnicols/moodle 2018-08-14 08:49:45 +02:00
Jake Dallimore ed9d61ef4a Merge branch 'MDL-63031-master' of https://github.com/prg3/moodle 2018-08-14 12:11:25 +08:00
Paul Greidanus 05f6ed0034 MDL-63031 administration: Allow plugins to define trace storage
This will allow the use of other storage systems implemented
in plugins.
It also allows for disabling the built in DB based profiling, which
will be useful when using an external target to not waste DB storage.
2018-08-13 21:54:48 -06:00
Michael Hawkins 161a5c8ab9 MDL-62600 tool_dataprivacy: Corrected availability of PO pages to admins 2018-08-14 11:28:31 +08:00
Andrew Nicols bc51085174 Merge branch 'MDL-62643-master' of git://github.com/damyon/moodle 2018-08-14 09:04:17 +08:00
Andrew Nicols b426a2840f Merge branch 'MDL-62896-master' of git://github.com/k-holland/moodle 2018-08-14 07:44:04 +08:00
Andrew Nicols 7fa3089753 MDL-36754 mod_forum: Use token for emailed pictures 2018-08-14 07:08:29 +08:00
Andrew Nicols 88d89512e4 MDL-36754 output: Support token pluginfiles in userpic 2018-08-14 07:08:29 +08:00
Andrew Nicols 883f655552 MDL-36754 output: Support token pluginfiles in group pic 2018-08-14 07:06:09 +08:00
Andrew Nicols 8af75f08e8 MDL-36754 tests: Move moodle_url tests to own file 2018-08-14 07:06:09 +08:00
Andrew Nicols 91f1f28233 MDL-36754 core_files: Support tokens when rewriting text
Support use of a token for access to pluginfile.php when rewriting text
content.

This is primarily intended for notifications where the user is unlikely
to be logged into Moodle when receiving the notification.
2018-08-14 06:57:32 +08:00
Andrew Nicols 4a74ab0200 MDL-36754 core_files: Add a token version of pluginfile 2018-08-14 06:57:32 +08:00
David Monllao 49a973014c Merge branch 'MDL-62761-master' of https://github.com/jmvedrine/moodle 2018-08-13 15:29:34 +02:00
David Monllao bf19506dfb Merge branch 'MDL-62886-master' of https://github.com/lucaboesch/moodle 2018-08-13 14:25:26 +02:00
Bas Brands 4f9d62835a MDL-62347 course: pagination phpunit updates 2018-08-13 13:45:33 +02:00
David Monllao 93e0b1593c Merge branch 'MDL-59015-master' of git://github.com/mihailges/moodle 2018-08-13 12:19:13 +02:00
David Monllao 66be962523 Merge branch 'MDL-62994-master' of git://github.com/mihailges/moodle 2018-08-13 12:12:09 +02:00
Bas Brands f3df9f9f62 MDL-62347 course: move boost pagination renderer in core 2018-08-13 11:58:25 +02:00
Bas Brands c8d5001f9a MDL-62347 course: use standard pagination renderer 2018-08-13 11:58:25 +02:00
Karen Holland 179a9f24db MDL-62896 Privacy: External plugin Additional label update. 2018-08-13 08:32:21 +00:00
Jake Dallimore e99564e51b Merge branch 'MDL-60114_master_radio-option-choose' of https://github.com/awagner/moodle 2018-08-13 16:02:54 +08:00
Mihail Geshoski 4e829d2d75 MDL-59015 blocks: Confusing View more button in course overview block 2018-08-13 08:53:19 +08:00
Mihail Geshoski be38df119d MDL-62341 privacy: Add behat test 2018-08-13 07:52:09 +08:00
Mihail Geshoski e55e9df388 MDL-62341 privacy: Add link to previous page in viewall policies page 2018-08-13 07:52:09 +08:00
Jean-Michel Vedrine a4ffdbf3f0 MDL-62761 lesson: wrong deadlines on index with overrides 2018-08-12 07:44:41 +02:00
Andreas Wagner 288cbbf2d5 MDL-60114 mod_data: adding db activity lost radio field choose option 2018-08-11 07:41:40 +02:00
Luca Bösch fba3c3be8e MDL-62886 boost: radio form element required icon 2018-08-10 17:11:28 +02:00
Eloy Lafuente (stronk7) 6e445671c1 weekly release 3.6dev 2018-08-10 13:21:51 +02:00
Eloy Lafuente (stronk7) cd69396ab4 NOBUG: Fixed SVG browser compatibility 2018-08-10 13:21:49 +02:00
Andrew Nicols 89db4cc26e Merge branch 'MDL-62619' of git://github.com/stronk7/moodle 2018-08-10 08:43:43 +08:00
Eloy Lafuente (stronk7) 2bf974e7ef MDL-63097 phpunit: decouple user lastping and session start in tests
Previously the test was assuming that the user last ping, when
accessing to a chat should match the first (enter) system message
sent to the chat. And that's ok 99% of times but, if seconds advance
between the creation of the chat_users record and the chat_messages
one, then they don't match.

So now, the assumption is not used anymore and the expectation
is the timestamp of that first (enter) system message, explicitly.
2018-08-10 02:32:37 +02:00
Eloy Lafuente (stronk7) c9840c0144 MDL-62619 privacy: Prevent action when boolean queries are involved
Before the patch, queries like:

SELECT 1 FROM dual UNION SELECT 2 FROM dual

were failing badly, with everything but the first numeric element
being ignored by the optimization.

So, being conservative, now we reduce the query being analysed,
ignoring any subquery, inline view (anything within parenthesis
in general) and, in the remaining query, if a boolean query (UNION,
MINUS, INTERSECT...) is found, we don't apply any optimization.
2018-08-09 16:05:55 +02:00
Eloy Lafuente (stronk7) b76d8da4a6 Merge branch 'MDL-62581-master' of git://github.com/damyon/moodle 2018-08-09 00:09:12 +02:00
Jun Pataleta 2454ddb6ef Merge branch 'MDL-45170-master' of git://github.com/junpataleta/moodle 2018-08-08 16:27:55 +08:00
Jun Pataleta c353ad20c3 MDL-45170 core: Integration review fixes
* Pass $forcehttps parameter to call extract_draft_file_urls_from_text()
 call in \core_weblib_testcase::test_extract_draft_file_urls_from_text()
* Style fixes
2018-08-08 16:17:32 +08:00
Charles Fulton 7d7d3b1731 MDL-45170 files: check other draftfile areas when processing 2018-08-08 16:15:23 +08:00
Andrew Nicols f89f6cf04e Merge branch 'MDL-62899-search-icons-master' of https://github.com/dmitriim/moodle 2018-08-08 13:17:34 +08:00
Andrew Nicols 0c759ba614 Merge branch 'MDL-56335-master' of git://github.com/mihailges/moodle 2018-08-08 13:14:00 +08:00
Andrew Nicols 1718a59ee2 Merge branch 'MDL-62993_master' of git://github.com/markn86/moodle 2018-08-08 13:10:41 +08:00
Andrew Nicols 03655bb050 Merge branch 'MDL-50225_master' of git://github.com/markn86/moodle 2018-08-08 08:14:55 +08:00
Eloy Lafuente (stronk7) bc7ee099ae Merge branch 'MDL-62619-master-privacycontexts' of git://github.com/mudrd8mz/moodle 2018-08-08 01:02:16 +02:00
Eloy Lafuente (stronk7) 6760a7e3e9 Merge branch 'MDL-43334-master' of git://github.com/damyon/moodle 2018-08-08 00:11:16 +02:00
Eloy Lafuente (stronk7) 43ae41a100 Merge branch 'MDL-50325_inconsistent_check_missing_module' of http://github.com/enovation/moodle 2018-08-08 00:06:09 +02:00
Eloy Lafuente (stronk7) ff4bab999b Merge branch 'MDL-61839-master' of git://github.com/mihailges/moodle 2018-08-07 23:52:08 +02:00
Eloy Lafuente (stronk7) 521ebb76b0 Merge branch 'MDL-61870-master' of git://github.com/damyon/moodle 2018-08-07 23:48:31 +02:00
Eloy Lafuente (stronk7) 54635fdee8 Merge branch 'MDL-62750_master' of https://github.com/aanabit/moodle 2018-08-07 17:10:14 +02:00
Eloy Lafuente (stronk7) 937a608d71 Merge branch 'MDL-63026_master' of git://github.com/dmonllao/moodle 2018-08-07 15:59:51 +02:00
Eloy Lafuente (stronk7) c8bea6ae57 Merge branch 'MDL-53297-master' of git://github.com/cescobedo/moodle 2018-08-07 15:57:00 +02:00
Eloy Lafuente (stronk7) 925d1dc60e Merge branch 'MDL-62065-master' of git://github.com/cescobedo/moodle 2018-08-07 15:51:34 +02:00
David Matamoros 2ee47aeca5 MDL-55744 EDITOR_ATTO: Now atto does not autosave for not loggedin user 2018-08-07 15:29:53 +02:00
David Matamoros 18e2f40377 MDL-58409 core_form: needs clean in autocomplete element 2018-08-07 10:59:34 +02:00
Dmitrii Metelkin 66f145efd1 MDL-62899 search: add document icons 2018-08-07 17:40:57 +10:00
Andrew Nicols 6acae5165c Merge branch 'MDL-62975_master' of git://github.com/markn86/moodle 2018-08-07 14:38:00 +08:00
Andrew Nicols dcb2d4bfcf Merge branch 'MDL-62798-master' of git://github.com/mihailges/moodle 2018-08-07 13:07:31 +08:00
Andrew Nicols 4af25b000f Merge branch 'MDL-54741-master' of git://github.com/mihailges/moodle 2018-08-07 12:19:44 +08:00
Andrew Nicols 7b4dbb05e3 Merge branch 'MDL-55449-master' of git://github.com/abgreeve/moodle 2018-08-07 11:44:38 +08:00
Adrian Greeve cc4952e997 MDL-55449 messages: Remove support for stdClass messages.
This also makes message_sent::create_from_ids() $courseid
parameter required.
2018-08-07 11:04:22 +08:00
Andrew Nicols 19d5c416e0 Merge branch 'MDL-63012-master' of https://github.com/jobyh/moodle 2018-08-07 09:32:55 +08:00
Andrew Nicols 2a8830379f Merge branch 'wip-MDL-61424-master' of git://github.com/marinaglancy/moodle 2018-08-07 08:18:58 +08:00
Andrew Nicols 89763f5226 Merge branch 'MDL-62945-master' of https://github.com/HuongNV13/moodle 2018-08-07 08:08:18 +08:00
Eloy Lafuente (stronk7) 90bdc5be4b Merge branch 'MDL-62237-master' of https://github.com/lucaboesch/moodle 2018-08-06 14:22:21 +02:00
Amaia Anabitarte 23c2316697 MDL-62750 lang: Trim langlist setting values 2018-08-06 09:38:14 +01:00
Andrew Nicols 75f23dc80f MDL-61515 theme: Pre-compile boost 2018-08-06 15:21:11 +08:00
Andrew Nicols 3e7c330bda Merge branch 'MDL-61515-master' of git://github.com/bmbrands/moodle 2018-08-06 13:55:04 +08:00
Andrew Nicols e980f89a4f Merge branch 'MDL-62996-master' of git://github.com/junpataleta/moodle 2018-08-06 12:10:51 +08:00
Mihail Geshoski 02de9f2014 MDL-62798 repositories: Report sections by name in server repository 2018-08-06 09:55:35 +08:00
Mihail Geshoski 9d98033ff9 MDL-61839 glossary: One letter search in glossary returns all entries 2018-08-06 09:45:34 +08:00
Mihail Geshoski 216b89475d MDL-54741 general: 3.2 final deprecation in lib/deprecatedlib.php 2018-08-06 09:29:54 +08:00
Mihail Geshoski f2cdf99382 MDL-56335 behat: prefixed_tablenode_transformations final deprecation 2018-08-06 09:27:08 +08:00
Andrew Nicols b4463cf9a7 Merge branch 'MDL-62969_master' of git://github.com/markn86/moodle 2018-08-06 09:21:14 +08:00
Luca Bösch ce3c772677 MDL-62237 repositories: Add SVG icons for built-in repositories 2018-08-03 14:20:55 +02:00
Jason Platts e52856bc9a MDL-62520 user: User identity fields not searchable in Participants list 2018-08-03 10:35:24 +01:00
Damyon Wiese 8cee90e3bf MDL-61650 assign: More consistent empty text
Consistently check for empty submissions with count_words(trim($text)).
2018-08-03 16:52:31 +08:00
Huong Nguyen 4889d6ac23 MDL-62945 Quiz: Increase max group of Question type Gap Select 2018-08-03 14:26:45 +07:00
Damyon Wiese cc9384f121 MDL-62279 assign: Properly set the defaults
Before an assignment has been created, we need to use the site defaults,
not the per instance defaults for the settings.
2018-08-03 15:03:53 +08:00
Andrew Nicols 6e020b161a weekly release 3.6dev 2018-08-03 11:30:11 +08:00
Andrew Nicols 5a5fbdb248 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-08-03 11:30:09 +08:00
Eloy Lafuente (stronk7) 5114d1168b Merge branch 'MDL-57244-master-text' of git://github.com/abgreeve/moodle 2018-08-02 19:16:58 +02:00
Damyon Wiese 851b5c7f2a MDL-60685 assign: Do not falsely use admin user
When an assign_grades record is automatically populated, do not use the admin user as the default grader.

This would generate false information on the assignment summary screen and send false notifications from
the admin user.
2018-08-02 14:19:34 +08:00
Damyon Wiese 192e48bb90 MDL-61870 mod_assign: Conditionally backup groups
When group info is not backed up, do not backup assignment submissions or overrides that related to a specific group.
We are already correctly not restoring them, but it is more robust not to include them in the backup file at all.
2018-08-02 12:55:13 +08:00
Zig Tan 8ea4df50c9 MDL-61870 mod_assign: Fix/clean up imported group override duedates
Applying patch supplied from Damyon Wiese to address the root-cause
of this issue in the backup/restore logic.
2018-08-02 12:55:13 +08:00
Zig Tan 6bcc6f877a MDL-61870 mod_assign: Fix/clean up imported group override duedates
- Prevent group override duedate events from being imported when groups are excluded
- Clean up any existing group override duedate events when editing assignment in upgradelib.php
- Updated lib.php unit tests
2018-08-02 12:55:12 +08:00
Andrew Nicols aa75f70280 Merge branch 'MDL-59847-master' of https://github.com/snake/moodle 2018-08-02 11:39:50 +08:00
Andrew Nicols d7978b1740 Merge branch 'MDL-62983-master' of git://github.com/sarjona/moodle 2018-08-02 11:17:13 +08:00
Andrew Nicols 31b02f6ef5 MDL-63050 cachestore_redis: Update hExists to check empty 2018-08-02 10:59:53 +08:00
Andrew Nicols ed3ff719f2 MDL-63050 redis: Make session check compatible with Redis 4.0 2018-08-02 10:57:53 +08:00
Adrian Greeve eb8dfd5bf8 MDL-57244 lib: Update to upgrade.txt files about renamed classes. 2018-08-02 10:34:18 +08:00
David Mudrák afa3e0ff32 MDL-59847 core: Stop supporting custom identity fields in user selectors
The user_selector classes supported custom list of extra identity
fields. But they should obey the configured user policy and respect the
privacy setting made by site administrators. So the list of user
identifiers should never be hard-coded, but the setting
$CFG->showuseridentity should be always respected.
2018-08-02 10:22:07 +08:00
David Mudrák ef65e09af0 MDL-59847 core: Fix display of hidden identity fields in user selectors
User selectors now respect the user's permission to view other users'
hidden profile fields.
2018-08-02 10:22:05 +08:00
Eloy Lafuente (stronk7) d8971be88f Merge branch 'MDL-57666-master' of git://github.com/mihailges/moodle 2018-08-02 01:27:41 +02:00
Eloy Lafuente (stronk7) bac049773f Merge branch 'MDL-62965-master-userprofilesignup' of git://github.com/mudrd8mz/moodle 2018-08-02 00:37:40 +02:00
Eloy Lafuente (stronk7) 20c7822f6d Merge branch 'MDL-57244-master' of git://github.com/abgreeve/moodle 2018-08-02 00:24:14 +02:00
Eloy Lafuente (stronk7) c965349aad Merge branch 'MDL-59595-master-2' of git://github.com/snake/moodle 2018-08-02 00:21:23 +02:00
Eloy Lafuente (stronk7) 3578f04762 Merge branch 'MDL-51883-master' of git://github.com/mihailges/moodle 2018-08-01 16:39:45 +02:00
Eloy Lafuente (stronk7) d2ba6eea3b Merge branch 'MDL-62977_master' of git://github.com/markn86/moodle 2018-08-01 16:36:25 +02:00
Eloy Lafuente (stronk7) 1ffa22bbc7 Merge branch 'MDL-61041-master' of git://github.com/damyon/moodle 2018-08-01 16:36:12 +02:00
Jonathon Fowler 89e27d9999 MDL-62983 core_user: Hold multiple filters when clicking any link 2018-08-01 09:33:34 +02:00
Mihail Geshoski 5ab8824394 MDL-51883 libraries: 3.1 final deprecation in lib/deprecatedlib.php 2018-08-01 10:32:37 +08:00
Eloy Lafuente (stronk7) 8c76cf65e8 Merge branch 'MDL-62344-master-final' of https://github.com/Tsheke/moodle 2018-07-31 23:53:52 +02:00
Eloy Lafuente (stronk7) c121e849c1 Merge branch 'MDL-41847-master' of git://github.com/sarjona/moodle 2018-07-31 23:50:43 +02:00
David Monllao 77f9983189 Merge branch 'MDL-61290_master' of https://github.com/aanabit/moodle 2018-07-31 17:18:17 +02:00
Amaia Anabitarte 4a6cd05ae1 MDL-61290 mod_feedback: adding groups to csv download
Thanks Christine LEGEMBLE for your proposal
2018-07-31 15:32:43 +01:00
Bas Brands bf45d7eba3 MDL-63028 Theme boost: flexbox for Boost footer 2018-07-31 15:24:36 +02:00
David Monllao f967e6795d Merge branch 'MDL-63001_master' of git://github.com/markn86/moodle 2018-07-31 13:52:49 +02:00
David Monllao 834ee94fe3 Merge branch 'master_MDL-58015' of https://github.com/danmarsden/moodle 2018-07-31 13:36:21 +02:00
David Monllao f3e240e7e0 Merge branch 'MDL-59611-master' of git://github.com/damyon/moodle 2018-07-31 13:30:41 +02:00
David Monllao a1b2d95092 Merge branch 'MDL-44538-master' of https://github.com/lucaboesch/moodle 2018-07-31 11:18:39 +02:00
Jun Pataleta 77b6d458e5 Merge branch 'MDL-58768-master-2' of git://github.com/rezaies/moodle 2018-07-31 16:18:44 +08:00
David Monllao 7afa724cb5 MDL-63026 course: Fix reference to unexisting capability 2018-07-31 08:31:16 +02:00
Andrew Nicols ea08da4613 Merge branch 'MDL-61960-master' of git://github.com/farhan6318/moodle 2018-07-31 07:23:50 +08:00
Eloy Lafuente (stronk7) 060277a401 Merge branch 'MDL-57977-master' of git://github.com/vmdef/moodle 2018-07-30 21:09:55 +02:00
David Monllao a50b8a438a Merge branch 'MDL-56712-master' of git://github.com/mihailges/moodle 2018-07-30 17:47:51 +02:00
David Monllao c5c618fe10 Merge branch 'MDL-54858-master' of git://github.com/mihailges/moodle 2018-07-30 17:41:06 +02:00
David Monllao 627d9aa6c8 Merge branch 'MDL-55188-master' of git://github.com/abgreeve/moodle 2018-07-30 17:33:21 +02:00
Eloy Lafuente (stronk7) e32fe4339a Merge branch 'MDL-63002_master' of git://github.com/markn86/moodle 2018-07-30 16:15:16 +02:00
Marina Glancy 9991670ff9 MDL-61424 admin: reset registration if token is rejected 2018-07-30 16:12:05 +02:00
Mark Nelson 8bfe908209 MDL-63002 core: fixed incorrect calls to non-existent delete_record() 2018-07-30 20:59:42 +08:00
Adrian Perez ac33483290 MDL-63002 core_grade: fixed deletion of overriden letters 2018-07-30 20:47:21 +08:00
David Monllao af0671c218 Merge branch 'MDL-60435_master' of git://github.com/markn86/moodle 2018-07-30 13:37:12 +02:00
Jun Pataleta a7870910ea Merge branch 'MDL-62931-master' of git://github.com/rezaies/moodle 2018-07-30 16:34:57 +08:00
Jun Pataleta a5d3d98bf9 Merge branch 'MDL-62943-master' of git://github.com/mihailges/moodle 2018-07-30 16:05:03 +08:00
Claude Vervoort 29acede1f0 MDL-62993 ltiservice_memberships: make message an array per spec
Also added resultSourcedId to member for BC.
2018-07-30 10:05:46 +08:00
Mark Nelson f8d15c66c3 MDL-62975 core_form: deprecate the htmleditor element 2018-07-30 10:01:01 +08:00
Mark Nelson 4d67fe6161 MDL-50225 core: replace usages of print_textarea() 2018-07-30 09:57:01 +08:00
Mark Nelson dc4dea0e40 MDL-50225 core: removed unused message bulk action files
In core we now use a modal to perform these actions. I
initially thought these were kept because they were a fall
back if JS was disabled. However, the functionality is
broken and doesn't work. Since we do not have to support
non-JS anymore these files have simply been removed as well
as relevant strings deprecated.
2018-07-30 09:57:01 +08:00
Mark Nelson c1f7cf67f4 MDL-50225 mod_wiki: removed unused file wiki/editors/html.php 2018-07-30 09:55:12 +08:00
Mark Nelson 350d7b0686 MDL-50225 core: properly deprecate print_textarea 2018-07-30 09:55:11 +08:00
Mihail Geshoski d8e8734291 MDL-62943 core_output: Final deprecation of update_module_button 2018-07-30 09:43:49 +08:00
Mihail Geshoski b4d5080892 MDL-57666 repositories: Error when copying file from Dropbox repository 2018-07-30 09:28:48 +08:00
Mihail Geshoski d77b5db55f MDL-56712 media: Remove 3.2 deprecated functions and classes 2018-07-30 09:25:34 +08:00
Adrian Greeve b41e1d7c55 MDL-55188 events: Final deprecation of part of events 1 API. 2018-07-30 09:25:06 +08:00
Adrian Greeve 5454e72c21 MDL-55188 events: First deprecation of eventslib.php 2018-07-30 09:23:54 +08:00
cescobedo 2769bf315b MDL-55188 events: Final deprecation events_trigger. 2018-07-30 09:21:21 +08:00
Mihail Geshoski f6094cd9f7 MDL-54858 user: Final deprecation of useredit_update_picture
Credit to Ankit Agarwal.
2018-07-30 09:13:20 +08:00
cescobedo df536ab17d MDL-62065 core_access: First deprecation of get roles on exact context 2018-07-29 22:43:06 +02:00
Joby Harding fbd1877f20 MDL-63012 grunt: Update Node version check message 2018-07-29 21:06:52 +01:00
AMOS bot 04638845a5 Automatically generated installer lang files 2018-07-29 00:07:10 +00:00
Shamim Rezaie fda4374a67 MDL-58768 mod_assign: Added userid param to calendar callbacks
The mod_assign_core_calendar_is_event_visible and mod_assign_core_calendar_provide_event_action
functions now accept a new parameter ($userid) so they are not always dependet to the logged in user.
2018-07-28 07:51:33 +10:00
Shamim Rezaie 907b175c05 MDL-58768 core: Fix a typo for callback name 2018-07-28 07:51:33 +10:00
Shamim Rezaie faa5d173cc MDL-58768 mod_assign: Add $user param to assign::can_grade 2018-07-28 07:51:32 +10:00
Shamim Rezaie 95ae74a7bc MDL-58768 calendar: Add $requestinguser to the container class
The requesting user is not always the same as the current user. The container class now allows a different user
to be set as the requesting user. All capability checks are done against the requesting user.

Also, the $requestinguser is passed to core_calendar_provide_event_action and core_calendar_is_event_visible
callback functions. These callback functions need to be updated in all activity modules to accept a $user parameter.
2018-07-28 07:51:32 +10:00
Shamim Rezaie f7115c2e80 MDL-58768 coursecat: coursecat::get to accept a $user parameter 2018-07-28 07:51:32 +10:00
Shamim Rezaie 7385ee37f9 MDL-58768 Calendar: Update get_raw_events_legacy_implementation
Update get_raw_events_legacy_implementation to work with the passed $users parameter instead of the logged in user.
Also, fixed a bug where get_raw_events_legacy_implementation was failing when $users was set to true, and a list of
$groups was given.
2018-07-28 07:51:32 +10:00
Shamim Rezaie d8c6c21c95 MDL-58768 Calendar: Added user param to calendar_set_filters
Decoupled calendar_set_filters from $USER.
Also removed the backward compatibility bit from the function because it was a left over.
2018-07-28 07:41:50 +10:00
Shamim Rezaie bd8705732d MDL-58768 Calendar: Added userid param to calendar_get_default_courses 2018-07-28 07:41:50 +10:00
Johnny Tsheke 155bf1dd2f MDL-62344 mod_label: ID number feature support 2018-07-27 06:03:24 -04:00
David Mudrák 06db58b787 MDL-62965 core_user: Fix missing user profile fields on signup page 2018-07-27 10:37:03 +02:00
Jun Pataleta 1d4eecffc6 Merge branch 'MDL-62950-master' of git://github.com/andrewnicols/moodle 2018-07-27 16:19:22 +08:00
David Mudrák c4e7c3cac4 MDL-62619 privacy: Fix a missing alias in the blog provider class
The new implementation revealed another existing bug that did not expose
before due to coincidently same named table alias in the outer query.
2018-07-27 10:14:43 +02:00
David Mudrák cea03cbd43 MDL-62619 privacy: Fix some bits of performance improvements
* We need to use is_numeric() in this case as is_int() would never
  return true.
* Extend the supported cases, add support for SQL consisting just of
  numerical value or selectinga numerical constant.
* Do not rely on any particulat letter case in provided SQL.
* Add unit tests for the new method. Even when it is a protected one, it
  is an essential unit to be tested on its own.
2018-07-27 10:14:43 +02:00
Andrew Nicols d7cb7550c7 MDL-62619 privacy: Improve performance of contexts loading
When possible, we want to use JOIN over WHERE IN. It is known that the
later performs badly in MySQL.
2018-07-27 10:14:43 +02:00
Mark Nelson 2dd3384083 MDL-63001 core_form: final deprecation of the submitlink element 2018-07-27 16:05:28 +08:00
Jun Pataleta b1cc8171c0 MDL-62996 tool_dataprivacy: Add 3.4/3.3 upgrade steps to 3.5+
This is to ensure that sites that have the early dev version of the tool
can upgrade smoothly to 3.5 and up.
2018-07-27 15:56:37 +08:00
David Mudrák 6808227b1f MDL-59847 core: Fix display of hidden identity fields in user lists
Places that display list of users (such as course participants page)
with additional identifier fields now respect the user's permission to
view other users' hidden profile fields.
2018-07-27 09:55:22 +02:00
Sara Arjona b6e594b1b9 MDL-41847 core_user: Add preferred lang field to the user creation form
The preferred language has been added only to the user creation form.
For existing users, you should access to the user profile, click over
Preferences and go to the Preferred language page.
2018-07-27 09:01:33 +02:00
Sara Arjona 0b979a6083 MDL-41847 core_user: Add lang to login URL email for new user accounts 2018-07-27 09:01:33 +02:00
Mihail Geshoski db03bff7df MDL-62994 course: Final deprecation of add_modchoosertoggle() 2018-07-27 11:33:17 +08:00
Mark Nelson 1b722e3c31 MDL-62977 mod_wiki: style buttons appropriately 2018-07-27 10:46:35 +08:00
Andrew Nicols 3f068cf381 MDL-62950 behat: Disable editing for boost test 2018-07-27 10:05:17 +08:00
Dan Marsden 7c75e02730 MDL-58015 mod_scorm: set orgidentifier correctly for popup. 2018-07-27 10:36:09 +12:00
Eloy Lafuente (stronk7) 6e8235c7d3 weekly release 3.6dev 2018-07-26 19:56:33 +02:00
Eloy Lafuente (stronk7) 7e7732e8e7 NOBUG: Fixed file access permissions 2018-07-26 19:56:32 +02:00
Vadim Tabunshchik d5f47f8f39 MDL-62871 quiz: incorrect foreign key declaration 2018-07-26 11:36:43 +02:00
Andrew Nicols cc806faf18 MDL-62950 behat: Correct navbar references 2018-07-26 15:29:05 +08:00
Andrew Nicols 49f427de13 MDL-62950 behat: Correct use of nav 2018-07-26 14:56:35 +08:00
Andrew Nicols d80fbaaca6 MDL-62950 behat: Correct path to P&P 2018-07-26 14:49:04 +08:00
Andrew Nicols 739b7bcf9f Merge branch 'MDL-54742-master-integration' of https://github.com/mihailges/moodle 2018-07-26 10:34:15 +08:00
Mihail Geshoski 8ba04d4565 MDL-54742 general: Remove 'revealpassword' string deprecated in 3.2 2018-07-26 10:19:36 +08:00
Eloy Lafuente (stronk7) e270bf92a1 Merge branch 'MDL-62771-master_move_plag_disclosure' of https://github.com/jmcgettrick/moodle 2018-07-26 00:34:37 +02:00
Eloy Lafuente (stronk7) b562240b61 Merge branch 'MDL-57622-master' of git://github.com/mihailges/moodle 2018-07-26 00:22:37 +02:00
Jun Pataleta 6830ae12c7 Merge branch 'MDL-62852-master' of git://github.com/sarjona/moodle 2018-07-25 16:38:47 +08:00
Sara Arjona 7b3a113776 MDL-62852 policy: Display policy audience in the viewall.php page 2018-07-25 10:20:01 +02:00
Damyon Wiese 3412b12c22 MDL-61041 assign: Remove assignment 2.2 upgrader 2018-07-25 14:11:10 +08:00
Jun Pataleta a77beeb245 Merge branch 'MDL-62807-master' of git://github.com/damyon/moodle 2018-07-25 13:48:15 +08:00
Andrew Nicols 59d072a81a Merge branch 'MDL-60826-master-fix' of https://github.com/lameze/moodle 2018-07-25 13:40:25 +08:00
Andrew Nicols dc45b688b3 Merge branch 'MDL-55259_master' of git://github.com/markn86/moodle 2018-07-25 13:35:53 +08:00
Simey Lameze f8a95c3df6 MDL-60826 calendar: fix group event type logic 2018-07-25 12:43:37 +08:00
Andrew Nicols 5ecca25603 Merge branch 'MDL-62897-master' of git://github.com/rezaies/moodle 2018-07-25 12:42:31 +08:00
Tony Butler 9ed5b0c1f6 MDL-59611 mod_assign: Move help icons for subplugin types out of labels 2018-07-25 12:23:08 +08:00
Damyon Wiese 459c2d909d MDL-62884 privacy: Fix styles
An action menu displayed inside a table needs to be tested on every theme. It is
required to ensure that the menu displays correctly, even when it would display outside
the scrollable region for the table.
2018-07-25 12:09:11 +08:00
Cory Buecker 520c5e080b MDL-62969 mod_lti: fix parsed value for LtiLink.memberships.url
Fixes a typo in the function that replaces the LTI placeholder variable
LtiLink.memberships.url with the actual endpoint. Without this change,
the placeholder variable, "$LtiLink.memberships.url" is not replaced in
the LTI launch parameters.
2018-07-25 11:59:36 +08:00
Shamim Rezaie 3f0a60e33d MDL-62897 Questions: Find duplicate top cats per context and fix them 2018-07-25 12:26:08 +10:00
Andrew Nicols 834054ee06 Merge branch 'MDL-60826-master' of git://github.com/lameze/moodle 2018-07-25 09:18:53 +08:00
Simey Lameze 687112af22 MDL-60826 calendar: further performance improvements
This commit does few tweaks and other performance improvements to
calendar_get_allowed_event_types to be more efficient. Also some minor
queries optimizations on the event form to fetch the list of courses
without groups.
2018-07-25 08:54:59 +08:00
Andrew Nicols c46919aa91 Merge branch 'MDL-61652-master' of git://github.com/mihailges/moodle 2018-07-25 08:32:22 +08:00
Eloy Lafuente (stronk7) 193a3aa9d7 Merge branch 'MDL-62961_master' of git://github.com/markn86/moodle 2018-07-25 01:24:34 +02:00
Eloy Lafuente (stronk7) cbbbdf27b1 Merge branch 'MDL-62935-master' of git://github.com/bmbrands/moodle 2018-07-25 01:16:38 +02:00
Eloy Lafuente (stronk7) 6c48428f37 Merge branch 'MDL-55365-master' of git://github.com/cescobedo/moodle 2018-07-25 01:02:33 +02:00
Eloy Lafuente (stronk7) e3f3c41252 Merge branch 'MDL-62653-master' of git://github.com/andrewnicols/moodle 2018-07-25 00:37:05 +02:00
Eloy Lafuente (stronk7) 75d4e6c4f1 Merge branch 'MDL-54551_master' of git://github.com/markn86/moodle 2018-07-25 00:26:16 +02:00
cescobedo 605354de50 MDL-53297 core_course: Final deprecation of xxx_delete_course callback 2018-07-24 23:09:47 +02:00
Eloy Lafuente (stronk7) 252905427c Merge branch 'MDL-60874-master-enrolautocomplete' of git://github.com/mudrd8mz/moodle 2018-07-24 19:03:32 +02:00
Amaia Anabitarte 9c7b226579 MDL-55778 enrol_self: New string for 'Notify before..' options
AMOS BEGIN
 CPY [expirynotifyall,core_enrol],[expirynotifyall,enrol_self]
 CPY [expirynotifyenroller,core_enrol],[expirynotifyenroller,enrol_self]
AMOS END
2018-07-24 18:41:00 +02:00
Eloy Lafuente (stronk7) 402d1c538a Merge branch 'MDL-62925_master' of git://github.com/markn86/moodle 2018-07-24 18:31:48 +02:00
Jun Pataleta f7497ace8a Merge branch 'MDL-62919-master' of git://github.com/cescobedo/moodle 2018-07-24 16:24:39 +08:00
Bas Brands 1deead46cc MDL-62935 boost: slideshow view page overflow 2018-07-24 10:22:13 +02:00
sam marshall 635c7b29a0 MDL-61652 tool_dataprivacy: Add capabilities to control data downloads 2018-07-24 14:23:16 +08:00
Jun Pataleta 07249cbb3a Merge branch 'MDL-62939-master-cleanhtmluserdesc' of git://github.com/mudrd8mz/moodle 2018-07-24 11:58:38 +08:00
Jake Dallimore 7d91564204 MDL-59595 admin: Make sure $ADMIN is properly unset when changing users 2018-07-24 08:25:30 +08:00
Jake Dallimore dbf66238b7 MDL-59595 admin: unit test covering the adminroot cache reset scenario
The adminroot cache should be reset when the current user is changed,
which can occur during cron or during unit tests.
2018-07-24 08:25:30 +08:00
Simey Lameze e2b7dca006 MDL-60826 groups: deprecate groups_get_all_groups_for_courses function 2018-07-24 07:58:35 +08:00
Simey Lameze 0f1e7ec906 MDL-60826 calendar: restrict course fields to be retrieved 2018-07-24 07:58:34 +08:00
Simey Lameze cf2df6199d MDL-60826 calendar: update manage subscription page to use new function 2018-07-24 07:58:34 +08:00
Simey Lameze 375b15a346 MDL-60826 calendar: deprecate calendar_get_all_allowed_types 2018-07-24 07:58:34 +08:00
Simey Lameze dfc609e55d MDL-60826 calendar: lazy load groups on event form 2018-07-24 07:58:34 +08:00
Simey Lameze 633c5ffbfe MDL-60826 calendar: tests for calendar_get_allowed_event_types 2018-07-24 07:58:34 +08:00
Simey Lameze 4be55b06da MDL-60826 calendar: introduce calendar_get_allowed_event_types function 2018-07-24 07:58:34 +08:00
Victor Deniz 10505522fc MDL-57977 search: GlobalSearch by alternate name fields
Enable support for searching all name fields in search
2018-07-23 10:10:05 +01:00
Damyon Wiese 2660e38faf MDL-62581 backup: CSS fixes
Sanitise the CSS for backup and restore. Main fixes are to sanitise the form-inline styles and set a fixed
width for the search forms within the restore form.
2018-07-23 16:19:30 +08:00
Adrian Greeve 3714fe7e6e MDL-57244 general: Remove old class renames. 2018-07-23 15:54:13 +08:00
Mark Nelson 0089fc929e MDL-62961 mod_feedback: style buttons appropriately 2018-07-23 15:47:38 +08:00
Andrew Nicols 9266d24827 Merge branch 'MDL-35977-master' of git://github.com/mihailges/moodle 2018-07-23 15:30:51 +08:00
Jun Pataleta 60bf79ac88 Merge branch 'MDL-62948-master' of git://github.com/andrewnicols/moodle 2018-07-23 15:20:47 +08:00
Jun Pataleta 6ab64dde9c Merge branch 'MDL-62949-master' of git://github.com/andrewnicols/moodle 2018-07-23 14:55:18 +08:00
Andrew Nicols 1f16daa4cf Merge branch 'MDL-62962-master' of git://github.com/junpataleta/moodle 2018-07-23 14:51:18 +08:00
Andrew Nicols a6034c9611 Merge branch 'MDL-54742-master' of git://github.com/mihailges/moodle 2018-07-23 14:29:55 +08:00
Mihail Geshoski 10bd37fabd MDL-54742 general: Remove strings deprecated in 3.2 2018-07-23 14:25:14 +08:00
Jun Pataleta f0ccce9af7 MDL-62962 tool_dataprivacy: Move user generation within the test 2018-07-23 13:35:50 +08:00
Shamim Rezaie 94fe904ed6 MDL-62897 Questions: Fix multi top cats in question_save_from_deletion 2018-07-23 14:37:40 +10:00
Shamim Rezaie 30dd3c5d0f MDL-62897 restore: Fix component name in get_string() 2018-07-23 14:37:40 +10:00
Shamim Rezaie 32338e7bda MDL-62931 Questions: Escaping lang strings properly 2018-07-23 14:24:29 +10:00
Andrew Nicols 653c30708d Merge branch 'MDL-61707-master' of git://github.com/mihailges/moodle 2018-07-23 11:33:20 +08:00
Farhan Karmali fad9dc9290 MDL-61960 blocks: Standard block plugins use legacy cron 2018-07-23 08:53:04 +05:30
Andrew Nicols 311199f52e Merge branch 'MDL-29701-master' of https://github.com/phuchau1509/moodle 2018-07-23 09:42:24 +08:00
Mihail Geshoski 204178d646 MDL-61707 authentication: Remove presignup session upon user signup 2018-07-23 09:33:08 +08:00
Mihail Geshoski 5f2628c517 MDL-57622 behat: Remove behat steps deprecated in 3.2 2018-07-23 09:25:59 +08:00
Mihail Geshoski 329a84b489 MDL-35977 comments: Missing label in blog and assignment comment area 2018-07-23 08:55:14 +08:00
cescobedo 8d2432f543 MDL-55365 behat: Remove deprecated api's in behat_config_mananger.php 2018-07-20 09:34:26 +02:00
Andrew Nicols 0180369b27 weekly release 3.6dev 2018-07-20 15:09:02 +08:00
Andrew Nicols 5794a467e2 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-07-20 15:09:00 +08:00
Andrew Nicols 2585f77a11 MDL-62949 calendar: Fix behat nav to calendar 2018-07-20 11:48:15 +08:00
Andrew Nicols e06f0c44ea MDL-62948 tool_policy: Increase window size
In the default window size the floating footer detaling the privacy
policies covers the "Login as guest" button.
2018-07-20 11:10:49 +08:00
Jake Hau b6976f1a87 MDL-29701 editor: mform disableif doesn't work on editor element 2018-07-19 11:38:26 +07:00
Jun Pataleta a766f5dc00 Merge branch 'MDL-62811' of git://github.com/timhunt/moodle 2018-07-19 08:46:51 +08:00
Jun Pataleta 432e755f2b Merge branch 'MDL-62769' of https://github.com/timhunt/moodle 2018-07-19 08:46:50 +08:00
Jun Pataleta 76ca5c61d0 Merge branch 'MDL-62781-master' of git://github.com/junpataleta/moodle 2018-07-19 08:46:49 +08:00
David Monllao 3ffb8d2317 Merge branch 'MDL-59447-master' of https://github.com/nwp90/moodle 2018-07-19 08:46:48 +08:00
David Monllao 810f12c25b Merge branch 'MDL-53972-master' of git://github.com/mihailges/moodle 2018-07-19 08:46:48 +08:00
David Monllao 1f9964a6e0 Merge branch 'MDL-54830-master' of https://github.com/snake/moodle 2018-07-19 08:46:47 +08:00
David Monllao 98b5b9d8a5 Merge branch 'MDL-61355' of git://github.com/danmarsden/moodle 2018-07-19 08:46:46 +08:00
David Monllao 7485089c91 Merge branch 'MDL-61351_master' of git://github.com/markn86/moodle 2018-07-19 08:46:45 +08:00
David Monllao 523704d9ec Merge branch 'MDL-62868-master' of https://github.com/snake/moodle 2018-07-19 08:46:44 +08:00
David Monllao a02f330b5d Merge branch 'MDL-62663' of https://github.com/andrewhancox/moodle 2018-07-19 08:46:43 +08:00
Tomasz Muras 7cdd97b252 MDL-50325 core: Use plugins API to check module status. 2018-07-18 16:54:31 +02:00
David Mudrák 067d0efe85 MDL-62939 user: Fix field type of the user profile description
As this is an editor element field, the it is supposed to be PARAM_RAW.
Otherwise it cleans-up certain non-HTML syntax such as Markdown
blockquote characters.
2018-07-18 14:27:14 +02:00
Mark Nelson feb6a52035 MDL-54551 core: touch-up after review
1. Reworded the string.
2. Removed logic handling form data.
3. Do not use window.location.replace.
2018-07-18 18:08:37 +08:00
Thom Rawson acf94de6d5 MDL-54551 core: AJAX call redirects to login page when session expired 2018-07-18 18:07:16 +08:00
Mark Nelson 512a1d310f MDL-55259 core: removed lib/password_compat/lib/password.php 2018-07-18 16:18:48 +08:00
Jun Pataleta 061e9f4b11 MDL-62781 core_question: Remove unnecessary assertion 2018-07-18 09:57:49 +08:00
Tim Hunt 7ca1b32808 MDL-62781 question/privacy: fix tests with CodeRunner is installed
The tests were assuming that no plugin ever created questions on
install.

Also change the tests to do the counting in the DB. That is more
efficient.
2018-07-18 09:57:49 +08:00
AMOS bot 7c66d04911 Automatically generated installer lang files 2018-07-18 00:07:26 +00:00
cescobedo 9de1a91532 MDL-62919 auth_shibboleth: Use the right shibboleth_auth_instructions
Change $CFG->auth_instructions by shibboleth/auth_instructions in the index_form.html
2018-07-17 21:06:44 +02:00
Tim Schroeder 0f1dffe6af MDL-61351 auth_shibboleth: removed redundant session handler class check 2018-07-17 16:45:20 +08:00
Tim Schroeder 81f55e41a7 MDL-61351 core: added \core\session\manager\get_handler_class()
* This is needed e.g. by the shibboleth logout handler to check which
type of sessions are used.
2018-07-17 16:45:20 +08:00
Mark Nelson 4beca90f3d MDL-61351 auth_shibboleth: move new functions to separate class
This reduces the amount of code to an already confusing logout.php
file and prevents conflicts if someone else happens to be using
the same function name in a file.
2018-07-17 16:45:20 +08:00
David Monllao e385230046 Merge branch 'MDL-60924-master' of git://github.com/sarjona/moodle 2018-07-17 09:38:04 +02:00
Tim Schroeder 1e737e38f9 MDL-61351 shibboleth: Logout: fix session handler class not being used
* use $CFG->session_handler_class to determine which type of session is
  used
* if not set, use $CFG->dbsession instead
2018-07-17 15:27:26 +08:00
Andrew Nicols 9e52f4adc2 Merge branch 'MDL-62889_master' of git://github.com/markn86/moodle 2018-07-17 12:11:34 +08:00
Mark Nelson b77e5841f8 MDL-62889 message_popup: redirect using moodle_url
Without this relative URLs passed (like /message/index.php)
were being redirected to HOST/message/index.php rather than
$CFG->wwwroot/message/index.php.
2018-07-17 11:54:52 +08:00
Mark Nelson c5fcbd1081 MDL-62889 message_popup: redirect to notification page if url is empty
If you pass a URL that is not a valid URL (for example
';') it is cleaned to an empty string which redirects to
$CFG->wwwroot/message/output/popup/ which is not a valid
page.
2018-07-17 11:54:52 +08:00
Mark Nelson 7d5b9da80c MDL-62889 message_popup: allow redirects to external URLs
Many institutions create notifications that link to an
external service. We need to allow redirects to these
systems.
2018-07-17 11:44:41 +08:00
Mark Nelson d2eb1ca91e MDL-62889 message_popup: only add redirecturl if it exists
We allow notifications to have a null value for the 'contexturl'.
In this case we should not be appending a 'redirecturl' param to
the URL when it is going to be empty.
2018-07-17 11:44:41 +08:00
Andrew Nicols affd85ce24 Merge branch 'MDL-53697-master' of git://github.com/abgreeve/moodle 2018-07-17 11:36:44 +08:00
Andrew Nicols 38036e73c2 Merge branch 'MDL-53808-master' of git://github.com/cescobedo/moodle 2018-07-17 11:34:59 +08:00
Mark Nelson 94a1861c84 MDL-62925 mod_wiki: style 'Search wikis' button 2018-07-17 11:31:20 +08:00
Andrew Nicols 4a91bd6f62 Merge branch 'MDL-62849-master' of git://github.com/abgreeve/moodle 2018-07-17 10:31:29 +08:00
Adrian Greeve f38766e166 MDL-62849 files lib: Add method to return all files.
Added a function which returns all the files from all directories
in the draftarea.
2018-07-17 10:25:11 +08:00
AMOS bot e575ad38c8 Automatically generated installer lang files 2018-07-17 00:08:09 +00:00
David Mudrák 3dbda9f846 MDL-60874 enrol_manual: Improve searching of users in quick enrol UI
* The maximum of users to be displayed raised from 30 to 100. This is
  consistent with the legacy users selector available via enrolment
  methods page.
* If there are more users found matching the search criteria, notify the
  user instead of displaying them. This is to prevent false impression
  that there are only that many users.
* Added behat tests for the new behaviour.
2018-07-16 21:27:26 +02:00
David Mudrák 9411beb384 MDL-60874 core_form: allow autocomplete AJAX handlers return a string
Custom AJAX handlers for the form autocomplete fields can now optionally
return string in their processResults() callback. If a string is
returned, it is displayed instead of the list of suggested items.

The string is displayed same way as we inform about no available
suggestions.
2018-07-16 21:27:25 +02:00
sarjona 7fde83584f MDL-60924 core_user: Hold participant filters when clicking some link 2018-07-16 18:03:12 +02:00
David Monllao c6f64c217d Merge branch 'MDL-52953-master' of git://github.com/abgreeve/moodle 2018-07-16 14:17:56 +02:00
David Monllao aa59fb2ea2 Merge branch 'MDL-49025' of https://github.com/NeillM/moodle 2018-07-16 13:34:57 +02:00
David Monllao 011c1a4291 Merge branch 'MDL-61019-master' of https://github.com/lucaboesch/moodle 2018-07-16 13:25:06 +02:00
Mark Nelson c61a4a9d21 MDL-60435 auth_shibboleth: changed accepted image types 2018-07-16 18:31:57 +08:00
Mark Nelson 87647c07fb MDL-60435 auth_shibboleth: dont display button if not configured 2018-07-16 18:31:57 +08:00
Mark Nelson 4826b1e42b MDL-60435 auth_shibboleth: removed usage of deprecated loginhttps 2018-07-16 18:31:57 +08:00
fabmen c637d96786 MDL-60435 auth_shibboleth: Display IDPs for Authentication Shibboleth.
Using Identity Providers for Authentication Shibboleth, instead of a manual link.
2018-07-16 18:31:52 +08:00
Mihail Geshoski 98f9db0d63 MDL-53972 feedback: Final deprecation in mod/feedback/lib.php 2018-07-16 14:21:18 +08:00
Damyon Wiese 6a621b0ce7 MDL-62807 output: Support .list-unstyled class
Category management lists should not have bullets.

We support this class in "boost" theme but not in bootstrapbase and there are uses of it in core.
2018-07-16 14:03:42 +08:00
Andrew Nicols bfeef10af0 Merge branch 'MDL-45851' of git://github.com/timhunt/moodle 2018-07-16 13:10:24 +08:00
Jake Dallimore bdd410a6f4 MDL-54830 core_course: fix maxbytes logic in course_update web service
The service should allow the special value of 0 (site limit) to be set.
2018-07-16 10:41:17 +08:00
Jake Dallimore fd6d98cc90 MDL-62868 core_group: clear group_grouping cache when changing grouping 2018-07-16 10:34:52 +08:00
Jake Dallimore c6150f1104 Merge branch 'MDL-45389-master' of https://github.com/lucaboesch/moodle 2018-07-16 10:11:40 +08:00
Neill Magill 650779d609 MDL-49025 assign: Submissions of an empty directory should not save
Before this change if only a folder was submitted the submission_is_empty
check would return true. This meant that the draft area would be saved.
The is_empty check would then be called which would return false. This
caused the submission form to indicate to the user that the submission
had failed.

Now is_empty and submission_is_empty should both return false if only
folders are submitted.
2018-07-13 14:03:42 +01:00
Neill Magill 3ebfab9810 MDL-49025 assign: Test than an empty directory will not submit 2018-07-13 14:03:41 +01:00
Luca Bösch 9004441b7b MDL-61019 Theme boost: lesson display issues with buttons/progress bar. 2018-07-13 09:27:06 +02:00
Luca Bösch 5cb24d2299 MDL-45389 theme_bootstrapbase: Forum index page alignment in clean. 2018-07-13 09:26:47 +02:00
Luca Bösch 41a7fec75f MDL-44538 action_menu: rounded corner of highlights only where needed. 2018-07-13 09:26:41 +02:00
Andrew Nicols df95c479fc MDL-62653 behat: Ensure that tasks run properly from behat 2018-07-13 13:54:42 +08:00
Jake Dallimore 8c51626841 weekly release 3.6dev 2018-07-13 12:26:07 +08:00
Jake Dallimore 856602d992 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-07-13 12:26:05 +08:00
Nick Phillips b6efeb4730 MDL-59447 question: GIFT import to respect multichoice defaults
Fix GIFT import to respect default answernumbering for new multichoice
questions (introduced in MDL-50011). Default for shuffleanswers is still
ignored, as this is a rather coarse-grained way to do it, and the wrong
setting for shuffleanswers would irreversibly alter the meaning of some
questions.

This is not an ideal long-term fix, but will save significant effort
for anyone who needs to be able to set answernumbering style for
questions imported in GIFT format.
2018-07-13 13:33:33 +12:00
Adrian Greeve 4bebed4011 MDL-53697 mod: Final deprecation of xxx_get_types(). 2018-07-12 10:19:09 +08:00
Christian Lawson-Perfect 7dcbe6a983 MDL-61355 SCORM: fix correct_response prefix check
The regexes to detect the optional prefixes at the start of some
interaction types are constructed to optionally match the prefix, so we
need to ensure that the matched group is really there when trying to
strip it from the given value in CRCheckValueNodes.

also remove "check for prefix" from CRcheckValueNodes

prefixes on correct responses patterns are removed in the section above
by CRremovePrefixes, so this block was redundant.
The `.pre` property for each correct_response is not used anywhere
else, so this removes their definitions too.
2018-07-12 10:44:30 +12:00
David Monllao 2a021ac3a0 Merge branch 'MDL-62618-master' of git://github.com/mickhawkins/moodle 2018-07-11 18:47:57 +02:00
David Monllao c2164bff0d Merge branch 'MDL-47899-master' of https://github.com/lucaboesch/moodle 2018-07-11 12:29:23 +02:00
David Monllao fd2b5d5c63 MDL-59599 navigation: Respect previous activity-level navigation
The original patch was overwriting grading methods navigation.

All credit goes to Andrew Nicols.
2018-07-11 12:01:08 +02:00
Luca Bösch aab977e0ce MDL-47899 forms: course search form info list bullet points alignment.
AMOS BEGIN
    MOV [searchhelp,moodle],[coursesearch_help,moodle]
AMOS END
2018-07-11 11:58:14 +02:00
cescobedo 437ffc9f46 MDL-53808 external_api: Remove external_function_info 2018-07-11 11:11:33 +02:00
Adrian Greeve 28d0d12f5f MDL-52953 tool_log: Deprecation of the legacy log store. 2018-07-11 09:45:52 +08:00
Jake Dallimore 98a09721d7 Merge branch 'MDL-62712-master' of https://github.com/HuongNV13/moodle 2018-07-11 09:02:15 +08:00
Andrew Nicols 034e9ce5cd Merge branch 'MDL-52318-master' of https://github.com/snake/moodle 2018-07-11 08:33:13 +08:00
Andrew Nicols 124cd929fb Merge branch 'MDL-62026-master' of git://github.com/junpataleta/moodle 2018-07-11 08:13:11 +08:00
Andrew Hancox 7068dd3990 MDL-62663 core_user: Enforce viewalldetails capability when editing user 2018-07-10 13:28:24 +01:00
David Monllao 76dbb5884d Merge branch 'MDL-62262-master' of https://github.com/lucaboesch/moodle 2018-07-10 13:30:17 +02:00
David Monllao e7941ae3e9 Merge branch 'MDL-62823' of https://github.com/NeillM/moodle 2018-07-10 11:43:37 +02:00
David Monllao 58b987282e Merge branch 'MDL-42818-master' of git://github.com/zig-moodle/moodle 2018-07-10 11:31:24 +02:00
Andrew Nicols 5a0a8686e3 Merge branch 'MDL-61578-master' of git://github.com/mickhawkins/moodle 2018-07-10 16:45:55 +08:00
Huong Nguyen 0b245bf390 MDL-62712 Filepicker: Improve upload process
Lost the uploading file when user press Submit before upload process has done
2018-07-10 15:18:45 +07:00
David Monllao 147b4f3dee Merge branch 'MDL-61110_master' of https://github.com/nadavkav/moodle 2018-07-10 09:59:06 +02:00
David Monllao debbed03ed Merge branch 'MDL-62814-master' of https://github.com/HuongNV13/moodle 2018-07-10 07:50:45 +02:00
David Monllao cbc67cba73 Merge branch 'MDL-62533-master' of git://github.com/zig-moodle/moodle 2018-07-10 07:37:19 +02:00
Jun Pataleta 0433707f7b MDL-62026 tool_dataprivacy: Behat tests for contacting PO 2018-07-10 12:31:08 +08:00
Jun Pataleta ef7f7cfdf8 MDL-62026 tool_dataprivacy: Allow manual completion of general enquiries 2018-07-10 12:30:56 +08:00
Andrew Hancox 820f28c61b MDL-61578 backup: Added unit test for is_course_modified check. 2018-07-10 10:50:30 +08:00
Michael Hawkins 4b9c2928d4 MDL-61578 backup: Prevent backup logging triggering fresh backups.
Thanks to Renaat Debleu for their contribution to this solution.
2018-07-10 10:50:30 +08:00
Andrew Nicols 39650bc12f Merge branch 'MDL-62746-master' of git://github.com/junpataleta/moodle 2018-07-10 09:33:05 +08:00
Jake Dallimore 793fe5fc4c Merge branch 'MDL-62772-master_always_show_disclosure' of https://github.com/jmcgettrick/moodle 2018-07-10 08:59:34 +08:00
David Monllao 1ef11d5182 Merge branch 'MDL-62753' of https://github.com/OdyX/moodle 2018-07-09 15:15:40 +02:00
David Monllao 6ce50554ee Merge branch 'MDL-56881-master' of https://github.com/snake/moodle 2018-07-09 14:38:19 +02:00
David Monllao 5edfece170 Merge branch 'MDL-62037-master' of https://github.com/lethevinh/moodle 2018-07-09 13:48:47 +02:00
David Monllao 381bb72153 Merge branch 'MDL-62831-master' of git://github.com/damyon/moodle 2018-07-09 13:36:05 +02:00
David Monllao 6af4e08333 MDL-59599 navigation: Strict zero-position comparision 2018-07-09 12:27:25 +02:00
David Monllao 727592291b Merge branch 'MDL-59599-master' of https://github.com/Kathrin84/moodle 2018-07-09 11:58:53 +02:00
John McGettrick 9481cc0e06 MDL-62772 mod_assign: Show disclosure for all submitters 2018-07-09 09:26:38 +01:00
Jake Dallimore 3143160204 Merge branch 'MDL-62180-master' of https://github.com/lucaboesch/moodle 2018-07-09 15:46:25 +08:00
Andrew Nicols 8dfafebc13 Merge branch 'MDL-33509-master' of git://github.com/mihailges/moodle 2018-07-09 13:52:31 +08:00
Andrew Nicols a31b3cf30b Merge branch 'MDL-62808_master' of git://github.com/markn86/moodle 2018-07-09 13:29:29 +08:00
Damyon Wiese 6fea9dc4b3 MDL-43334 backup: Fix cancel JS
The cancel button is a form element within a div that has the confirmcancel class. When we
accept a cancel modal, we should attempt to click the most specific form element of the
div, not the entire div.
2018-07-09 12:17:23 +08:00
Damyon Wiese ddd7ff1827 MDL-43334 backup: Lanuage for cancel
Cancel backup buttons need clear lang strings.
2018-07-09 12:17:18 +08:00
Andrew Nicols 2f6f156a8f MDL-56093 auth_db: Remove issue no. from comment 2018-07-09 12:14:17 +08:00
Andrew Nicols 33d2796f0a Merge branch 'MDL_56093' of https://github.com/eledia/moodle 2018-07-09 12:13:58 +08:00
Jake Dallimore 545a1382aa Merge branch 'MDL-61359-master' of git://github.com/mickhawkins/moodle 2018-07-09 12:10:33 +08:00
Mark Nelson c57fadcc64 MDL-62808 core_message: fixed 'useridto' being incorrectly set to 0 2018-07-09 12:00:06 +08:00
Jake Dallimore 1c1d738ba0 MDL-52318 core_form: allow multiple filepicker-enabled url elements
In cases when filepicker support is enabled, this patch adds a wrapper
div around the url element and includes the filepicker id in its id.
This allows the js callback code to target the specific input field
with which it is associated.
2018-07-09 11:29:23 +08:00
Jake Dallimore 5a8791336a MDL-56881 mod_choice: add unit tests for choice_user_submit_response
Tests cover option limits and multiple option responses.
2018-07-09 11:02:50 +08:00
Jake Dallimore 03577962ef MDL-56881 mod_choice: clarify lang string for limit-reached scenarios 2018-07-09 11:02:50 +08:00
Jake Dallimore a039751aee MDL-56881 mod_choice: fix bug with limits when saving existing choice
The check determining whether a choice option's limit was exceeded was
including the user's existing answers in its checks, meaning a user
couldn't save an existing choice answer, or select further options,
if all a choice option limit was reached. This patch fixes that.
2018-07-09 11:02:45 +08:00
AMOS bot 10fcb75876 Automatically generated installer lang files 2018-07-07 00:08:17 +00:00
Nadav Kavalerchik 3cac3a8590 MDL-61110 LTIProvider: Store 'lis_course_section_sourcedid' value in DB 2018-07-07 00:50:02 +03:00
Luca Bösch 4a73ecc654 MDL-62262 quiz: quiz index page showing wrong dates. 2018-07-06 14:37:07 +02:00
Luca Bösch a494830c28 MDL-62180 course: Add distinctive class to activity navigation
Having a distinguishable class "activity-navigation" added to the activity
navigation allows that part to be easily styled. It could for example be
excluded from printing. Furthermore, this is providing consistency. Other
navigation elements have proper own classes as well.
2018-07-06 14:32:54 +02:00
vinhle 4dbc8c30a3 MDL-62037 Filepicker: Review image not change when overwrite same 2018-07-06 17:49:10 +07:00
John McGettrick 707dfd0c39 MDL-62771 mod_forum: Reformat for modern coding style 2018-07-06 09:32:14 +01:00
John McGettrick f3bf0ed5fc MDL-62771 mod_forum: Fix to move print_disclosure 2018-07-06 09:30:34 +01:00
Andrew Nicols c7d148dc20 weekly release 3.6dev 2018-07-06 14:05:06 +08:00
Andrew Nicols 21a59c3ff3 NOBUG: Fixed SVG browser compatibility 2018-07-06 14:05:04 +08:00
Andrew Nicols 55ececc04c Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-07-06 14:05:03 +08:00
Jun Pataleta 65cac80088 MDL-62746 tag: Convert YUI modals to AMD modals 2018-07-06 12:34:23 +08:00
Huong Nguyen 9d7ccae2d5 MDL-62814 Question: Improve column base display_header
Column base does not support custom tip if sortable is an array
2018-07-06 10:56:34 +07:00
Jun Pataleta d7ae1a92b1 MDL-62746 tag: Make forms in tag modals use proper BS classes 2018-07-06 10:14:04 +08:00
Tim Hunt b116f8b9ad MDL-62811 question bank: rendering shouldn't load individual questions 2018-07-05 17:00:45 +01:00
Benjamin Wolf c19ef03f71 MDL-56093 auth_db: Save custom profile fields in auth_db 2018-07-05 11:11:41 +02:00
Didier 'OdyX' Raboud 90ae1b90f1 MDL-62753 shibboleth: Logout: fix DB sessions kill
* Use the Moodle 2+ {sessions} table, and decode the session
  correctly using session_decode (adodb_unserialize is deprecated).
* Kill all user sessions using \core\session\manager's
  kill_user_sessions.
2018-07-05 08:57:03 +02:00
Michael Hawkins c157e137ee MDL-62618 user: Display full names consistently on users page 2018-07-05 10:08:33 +08:00
Michael Hawkins 26cee43786 MDL-62618 forum: Made full names displayed consistent 2018-07-05 10:03:18 +08:00
Jake Dallimore 523662f141 Merge branch 'MDL-62670-master' of git://github.com/sarjona/moodle 2018-07-05 09:25:41 +08:00
AMOS bot 2a5aa4eee7 Automatically generated installer lang files 2018-07-05 00:08:15 +00:00
Kathrin Osswald f37c3ec832 MDL-59599 navigation: Improve activity status for nav nodes. 2018-07-04 19:57:10 +02:00
Tim Hunt 3511063252 MDL-45851 restore: random questions must always be created
They are really a pointer from a particular quiz to a question category.
They should never be shared, because if they are, unexpected things
happend when they are edited.
2018-07-04 16:33:30 +01:00
Sara Arjona 8502f02ae0 MDL-62670 policy: viewall.php must display always all active policies
The viewall.php page is called from the mobile app to display the policies
to the users before agree them. That's why it must display all the active
policies (even for guests), to guarantee the users agree all current
policies from the app.
2018-07-04 12:04:41 +02:00
Jake Dallimore f84e9c4ead Merge branch 'MDL-37624-master-fix' of git://github.com/junpataleta/moodle 2018-07-04 16:40:29 +08:00
Jun Pataleta d180b40066 MDL-37624 pix: Use updated location icons for Clean
Credits to Barbara Ramiro
2018-07-04 16:26:53 +08:00
Jun Pataleta f327168f44 MDL-37624 theme_boost: Rebuild moodle.css 2018-07-04 16:26:07 +08:00
Tim Hunt 0b18d0c960 MDL-62820 question import: properly escape output 2018-07-04 15:40:50 +08:00
Jun Pataleta a746b6e840 Merge branch 'MDL-37624-master' of git://github.com/mickhawkins/moodle 2018-07-04 15:33:43 +08:00
Michael Hawkins 4c838be5bb MDL-37624 calendar: Updated location db comment 2018-07-04 14:52:44 +08:00
Jake Dallimore 9dc7f25f9f Merge branch 'wip-nolink-bug' of https://gitlab.di.unito.it/rabellino/moodle 2018-07-04 14:37:14 +08:00
Damyon Wiese 166fa40a98 MDL-62782 assign: viewgrades allows files
Grade viewer role should be able to see feedback files for an assignment submission.
2018-07-04 14:17:28 +08:00
Sara Arjona 0138ad60b0 MDL-62670 policy: Remove footer link when there are not active policies 2018-07-04 07:52:47 +02:00
Jake Dallimore a2e64810d4 Merge branch 'MDL-41463-master' of https://github.com/lucaboesch/moodle 2018-07-04 12:59:00 +08:00
Damyon Wiese e655cbb857 MDL-62831 mod_assign: Download as folders help
The help string for the download as folders setting should not mention the number of files
submitted by the student. It is not related to that, it is only dependant on the value of this setting.
2018-07-04 12:20:24 +08:00
Jake Dallimore bbaab1bae7 Merge branch 'MDL-44081-master' of git://github.com/zig-moodle/moodle 2018-07-04 10:50:25 +08:00
Jake Dallimore 7eb7e4b9ea Merge branch 'MDL-62834-master' of git://github.com/andrewnicols/moodle 2018-07-04 10:44:51 +08:00
Andrew Nicols 481548f580 MDL-62834 behat: Move include to function 2018-07-04 10:29:15 +08:00
Eloy Lafuente (stronk7) ab044c6cd5 Merge branch 'wip-MDL-62526-master' of git://github.com/marinaglancy/moodle 2018-07-04 04:19:12 +02:00
Adrian Greeve 720d5b3b85 MDL-62616 tool_log: Add a setting to disable exporting logs. 2018-07-04 09:58:49 +08:00
Eloy Lafuente (stronk7) a101b25863 Merge branch 'MDL-62288_master' of https://bitbucket.org/ujiapps/moodle-uji 2018-07-04 01:20:08 +02:00
Eloy Lafuente (stronk7) 37c6bd9bed Merge branch 'wip-MDL-59259-master' of git://github.com/marinaglancy/moodle 2018-07-04 01:09:47 +02:00
Eloy Lafuente (stronk7) 6b82c53bf3 Merge branch 'MDL-62792' of https://github.com/timhunt/moodle 2018-07-04 00:54:44 +02:00
Eloy Lafuente (stronk7) c475c97b45 Merge branch 'MDL-62838' of git://github.com/timhunt/moodle 2018-07-04 00:49:23 +02:00
Eloy Lafuente (stronk7) 7fb95a9d2d Merge branch 'MDL-62834' of git://github.com/timhunt/moodle 2018-07-04 00:46:33 +02:00
Eloy Lafuente (stronk7) af0202c5c2 Merge branch 'MDL-62211-master' of git://github.com/junpataleta/moodle 2018-07-03 23:33:02 +02:00
David Monllao 6d57e23197 Merge branch 'MDL-61296-master' of git://github.com/cescobedo/moodle 2018-07-03 23:33:02 +02:00
David Monllao b596cdda82 Merge branch 'MDL-62656-master' of git://github.com/mihailges/moodle 2018-07-03 23:33:01 +02:00
David Monllao 2af5c8e7ef Merge branch 'MDL-60014-master-catcherror-nopermission-annotatepdfcron' of https://github.com/Eva-Dv/moodle 2018-07-03 23:33:01 +02:00
David Monllao 772ae9d4fd Merge branch 'MDL-62691-master' of git://github.com/bmbrands/moodle 2018-07-03 23:33:00 +02:00
David Monllao f8839747ce Merge branch 'MDL-62813-master' of git://github.com/lameze/moodle 2018-07-03 23:33:00 +02:00
David Monllao de0b684c38 Merge branch 'MDL-62654-master' of git://github.com/bmbrands/moodle 2018-07-03 15:19:18 +02:00
David Monllao 3a0e92cd6a Merge branch 'MDL-32232-master' of https://github.com/lucaboesch/moodle 2018-07-03 13:59:57 +02:00
David Mudrák dd808ec6b9 MDL-62796 tool_policy: Fix a regression in Behat test
We now correctly show the popup with links to policies that apply to
anonymous visitors of the site. So the name of the guests only policy
became visible in this popup in more cases and it caused false failures.

The point of the lines affected by this patch is to make sure that the
policy does / does not appear in the list of policies to be accepted. So
I am making it more specific of where the text is / is not supposed to
be seen.
2018-07-03 10:58:29 +02:00
Jake Dallimore 83e2051845 Merge branch 'MDL-59261-master' of git://github.com/ryanwyllie/moodle 2018-07-03 14:44:32 +08:00
Bas Brands af9edb2e6a MDL-59261 theme_boost: compiled css fallback 2018-07-03 14:14:52 +08:00
Michael Hawkins a990e4faff MDL-62767 theme: Remove old localcaches when clearing/updating theme cache 2018-07-03 14:00:29 +08:00
Michael Hawkins 9af6a71c70 MDL-62801 themes: Added missing filelib include 2018-07-03 13:07:27 +08:00
Marina Glancy d80533be40 MDL-62790 course: cap check in core_course_get_categories 2018-07-03 12:01:15 +08:00
Mihail Geshoski daa31a0491 MDL-33509 forms: Change button type in url resource editing page 2018-07-03 11:53:09 +08:00
Jake Dallimore 25a592ff5f Merge branch 'MDL-62715-master' of git://github.com/andrewnicols/moodle 2018-07-03 08:49:35 +08:00
Eloy Lafuente (stronk7) d34b408d98 Merge branch 'MDL-62763-master-enfix' of git://github.com/mudrd8mz/moodle 2018-07-02 20:09:07 +02:00
Eloy Lafuente (stronk7) b197a1d4cb Merge branch 'MDL-62621-master-ixcomment' of git://github.com/mudrd8mz/moodle 2018-07-02 20:00:29 +02:00
David Monllao 3f3d7fec0c Merge branch 'wip-MDL-62796-master' of git://github.com/marinaglancy/moodle 2018-07-02 12:21:42 +02:00
Helen Foster 9722f6a25e MDL-62763 lang: Merge English strings from the en_fix language pack
Significant string changes:

* various strings in tool_dataprivacy and tool_policy - 'Data Protection
  Officer' changed to 'privacy officer'
* idnumbermod_help,core - mentioning resource and custom reporting
2018-07-02 11:15:26 +02:00
David Monllao e460c95893 Merge branch 'MDL-62713-master' of https://github.com/sammarshallou/moodle 2018-07-02 10:40:40 +02:00
Eloy Lafuente (stronk7) 744a9de339 Merge branch 'MDL-61244-master-fix' of git://github.com/junpataleta/moodle 2018-07-02 10:36:30 +02:00
Jake Dallimore 221a79361a Merge branch 'MDL-62801-master' of git://github.com/mickhawkins/moodle 2018-07-02 16:18:23 +08:00
David Mudrák 82b7ad70b1 MDL-62621 comments: Add missing indexes on comments table
The composite index over the fields contextid, commentarea and itemid
helps the comments API to load all comments for the given area
effectively.

The index over the userid field helps the privacy API to load all
comments by the given user.
2018-07-02 10:04:26 +02:00
Jun Pataleta 26ffa8e4d3 MDL-61244 core_admin: Fix Behat navigation to purge caches page 2018-07-02 14:56:42 +08:00
Mihail Geshoski c3c42514a1 MDL-62656 course: Align elements in course and category management 2018-07-02 08:25:01 +08:00
Eloy Lafuente (stronk7) aedd74c610 Merge branch 'MDL-61244_master' of https://gitlab.com/marxjohnson/moodle 2018-07-02 01:42:00 +02:00
Tim Hunt 1146659db4 MDL-62838 filters: dont use statics inside functions. Use MUC 2018-06-29 17:24:41 +01:00
Tim Hunt 8aedf6d478 MDL-62834 behat: new step for enabling filters 2018-06-29 11:26:41 +01:00
sam marshall 23f6a88341 MDL-62713 core_search: Cron error indexing sections in some cases 2018-06-29 10:48:16 +01:00
Neill Magill e69ea0ea5d MDL-62823 filter: Save changes button should be styled 2018-06-29 08:40:41 +01:00
Michael Hawkins 3f2ed99d26 MDL-62801 themes: Remove old mustache caches when new one generated 2018-06-29 10:49:21 +08:00
Michael Hawkins 9a3ee0c396 MDL-37624 calendar: string and behat testing fixes 2018-06-29 10:46:57 +08:00
Michael Hawkins ef4e04ee26 MDL-37624 calendar: Added location support 2018-06-29 10:46:54 +08:00
Jun Pataleta 4c72ffa5ef MDL-62211 tool_dataprivacy: Request filtering and pagination
* Make data requests page use table_sql to make it sortable
* Also, add an autocomplete element that enables filtering by
  status and request type.
2018-06-29 10:32:04 +08:00
Michael Hawkins 6924e32e4a MDL-61359 message: Updated sender contact text to text node content 2018-06-29 10:26:07 +08:00
Zig Tan a8f7818beb MDL-62533 assign: Show assign hidden status on grading summary page 2018-06-29 09:37:57 +08:00
Zig Tan bc87f6a2e3 MDL-44081 assign: Fix Grader annotation button accessibility ordering 2018-06-29 09:26:58 +08:00
Luca Bösch 4f2e193eb6 MDL-41463 course: Reset remove groups section advanced toggle. 2018-06-28 23:06:45 +02:00
Luca Bösch 73e571aae1 MDL-32232 lesson: changing a page type chooser option for consistency 2018-06-28 23:06:34 +02:00
Sergio Rabellino adeff60562 MDL-61403 filter: Fix for the nolink tag ignored
Fix for the nolink tag ignored if there are some other attributes defined in the same span
2018-06-28 11:01:26 +02:00
Marina Glancy a589b992f8 MDL-59259 tool_uploadcourse: apply course format options 2018-06-28 16:37:27 +08:00
Simey Lameze 23b05f1841 MDL-62813 calendar: add behat test for form validation 2018-06-28 14:04:46 +08:00
Jake Dallimore f61ee4e857 weekly release 3.6dev 2018-06-28 14:02:55 +08:00
Simey Lameze c20ac98869 MDL-62813 calendar: fix dmlreadexception on event form 2018-06-28 13:22:20 +08:00
Marina Glancy 6e40d1edfe MDL-62526 admin: ask privacy policy agreement for moodle.net 2018-06-28 11:43:48 +08:00
Eloy Lafuente (stronk7) ce514b08ee Merge branch 'MDL-62325-master' of git://github.com/rezaies/moodle 2018-06-28 02:05:50 +02:00
Eloy Lafuente (stronk7) b66476d15d Merge branch 'wip-MDL-62755-master' of git://github.com/abgreeve/moodle 2018-06-28 01:55:53 +02:00
Eloy Lafuente (stronk7) d7a10f5746 Merge branch 'MDL-61889-master' of git://github.com/junpataleta/moodle 2018-06-28 01:44:26 +02:00
Eloy Lafuente (stronk7) 8f63202014 Merge branch 'MDL-62747' of https://github.com/timhunt/moodle 2018-06-28 00:30:38 +02:00
Eloy Lafuente (stronk7) d451152b7e Merge branch 'MDL-62783' of https://github.com/timhunt/moodle 2018-06-28 00:25:33 +02:00
Eloy Lafuente (stronk7) 9d05da3f6d Merge branch 'm36_MDL-51080_MAriaDB_Wrong_DB_Type' of https://github.com/scara/moodle 2018-06-27 23:25:03 +02:00
Jake Dallimore 2bffba3cb6 Merge branch 'MDL-61732-master' of https://github.com/Dagefoerde/moodle 2018-06-27 12:17:48 +08:00
Eloy Lafuente (stronk7) ef0a8b99b2 Merge branch 'MDL-45088-master' of https://github.com/lucaboesch/moodle 2018-06-27 03:21:53 +02:00
Eloy Lafuente (stronk7) 242b8fc0f3 Merge branch 'MDL-62703-master' of git://github.com/bmbrands/moodle 2018-06-27 03:17:31 +02:00
Eloy Lafuente (stronk7) e872f93325 Merge branch 'MDL-41265-master' of git://github.com/mihailges/moodle 2018-06-27 03:06:47 +02:00
Eloy Lafuente (stronk7) d77104e28c Merge branch 'MDL-62471_master' of git://github.com/dmonllao/moodle 2018-06-27 02:38:27 +02:00
Eloy Lafuente (stronk7) 0eac61de66 Merge branch 'MDL-62735-master-refactor' of https://github.com/snake/moodle 2018-06-26 10:44:08 +02:00
Juan Pablo de Castro 6aa8a3b6d0 MDL-14274 lib/evalmath: support of conditional math in formulas.
- Comparison operators >, ==, <, <=, >=
- "if(condition, valueiftrue, valueif false)" function.

(amended to keep non-related lines unmodified - whitespace & indent)
2018-06-26 10:25:44 +02:00
Jake Dallimore decd90e2a3 Merge branch 'MDL-62698' of git://github.com/timhunt/moodle 2018-06-26 15:26:21 +08:00
Juan Segarra Montesinos 77e17113a1 MDL-62288 mod_glossary: Add links to glossary entries for all users 2018-06-26 09:03:10 +02:00
Marina Glancy e2029b8387 MDL-62796 tool_policy: show popup for users who are not logged in 2018-06-26 13:24:44 +08:00
Jun Pataleta dd26f1be12 MDL-61889 tool_dataprivacy: Fix CI errors 2018-06-26 13:20:31 +08:00
Eloy Lafuente (stronk7) 01911b9f1f Merge branch 'MDL-59047-master' of git://github.com/bmbrands/moodle 2018-06-26 03:04:35 +02:00
Eloy Lafuente (stronk7) cb6ba9b1be Merge branch 'MDL-62730-master' of https://github.com/snake/moodle 2018-06-26 02:53:42 +02:00
Eloy Lafuente (stronk7) 8e059bc39f Merge branch 'MDL-51419-master' of https://github.com/snake/moodle 2018-06-26 02:41:43 +02:00
Eva Davitasvili 88c77c8ea3 MDL-60014 assign: Annotate PDF - catch no permission error 2018-06-25 14:11:24 -04:00
Tim Hunt 9f38628abc MDL-62792 filters: fix some bad PHPdocs 2018-06-25 15:50:15 +01:00
Tim Hunt 20482f9d41 MDL-62792 filter_mathjaxloader: don't use statics for once-only items 2018-06-25 15:05:33 +01:00
Shamim Rezaie d6e821294e MDL-62325 enrol_paypal: Added some keys and indexes to enrol_paypal.
- Added these keys to the enrol_paypal db: courseid, userid, instanceid
- Added these indexes to the enrol_paypal db: business, receiver_email
2018-06-25 11:57:26 +10:00
Adrian Greeve 11d828ef6f MDL-62755 mod_assign: Update to unit tests.
Overrides are now checked to be exported properly.
2018-06-25 09:49:13 +08:00
Adrian Greeve ea24047619 MDL-62755 mod_assign: Fix override export problem.
The cutoffdate and allowsubmissionsfromdate were not
being exported.
2018-06-25 09:49:13 +08:00
Mihail Geshoski f721ac68d4 MDL-41265 resource: Page resource option to show/hide last modified 2018-06-25 09:13:04 +08:00
Tim Hunt f4e18a0ae7 MDL-62783 XMLDB: Generate PHP with [] arrays 2018-06-22 13:58:27 +01:00
Tim Hunt bc6687bab3 MDL-62698 quiz_overview: new index should not be unique 2018-06-22 13:32:04 +01:00
Christian Glahn 4e715dd69d MDL-61732 filters: Have emoticons respect nolink
Also extracts static emoticon cache to a field in order to increases
testability of filter_emoticon, because we are now able to reset the
static emoticon cache before tests, particularly for observing the
response to changing $CFG->emoticons.
2018-06-22 10:30:55 +02:00
Jake Dallimore 4d5046b0eb MDL-51419 core_files: Support for utf8 in file names in MS Edge 2018-06-22 10:29:23 +08:00
Jake Dallimore 548c260d82 MDL-62730 themes: Fix calendar icon alignment for datetime in Boost 2018-06-22 10:16:28 +08:00
Jake Dallimore 692e22f9ed MDL-62735 core_search: searchareas page now respects indexing support 2018-06-22 10:14:09 +08:00
Luca Bösch 2846038ed1 MDL-45088 xmldb: Fix table alignment 2018-06-21 19:38:41 +02:00
Eloy Lafuente (stronk7) 6153be6850 weekly release 3.6dev 2018-06-21 14:00:54 +02:00
Tim Hunt db421d4d52 MDL-62769 quiz statistics: graph should show all, not last, variant 2018-06-21 12:55:43 +01:00
Bas Brands 4226e45d16 MDL-61515 Theme boost: add disabled carousel transitions back in 2018-06-21 10:09:47 +02:00
Andrew Nicols de06b63344 MDL-62715 mod_assign: Bump submissions back when grading in tests 2018-06-21 08:40:39 +08:00
Jun Pataleta 2a969f3cd6 Merge branch 'MDL-62017-master' of https://github.com/lucaboesch/moodle 2018-06-20 19:40:39 +08:00
David Monllao 62dc3fde0a Merge branch 'MDL-61482-master' of git://github.com/zig-moodle/moodle 2018-06-20 13:29:17 +02:00
David Monllao 130ab46d37 Merge branch 'MDL-44646-master' of https://github.com/lucaboesch/moodle 2018-06-20 13:07:32 +02:00
David Monllao 88b4c9d260 MDL-62471 tool_dataprivacy: Test compatible with 32 bits OS 2018-06-20 12:48:28 +02:00
cescobedo a282b0f51d MDL-61296 auth_ldap: remove PHP notices when field does not exist. 2018-06-20 11:39:16 +02:00
Luca Bösch 936e9c82b2 MDL-62017 tool_customlang: format language customisation buttons. 2018-06-20 10:53:23 +02:00
Luca Bösch 78f6d02b8c MDL-44646 administration: Users can be filtered by course enrollment 2018-06-20 06:48:59 +02:00
Andrew Nicols e3037af566 Merge branch 'master_MDL-62705_results_order_no_context' of https://github.com/mattporritt/moodle 2018-06-20 08:35:59 +08:00
Andrew Nicols 7febc1e3d8 Merge branch 'wip-MDL-62391-master' of git://github.com/abgreeve/moodle 2018-06-20 08:33:32 +08:00
Eloy Lafuente (stronk7) cb57d12d01 Merge branch 'mdl57404' of https://github.com/egiles/moodle 2018-06-20 01:02:30 +02:00
Eloy Lafuente (stronk7) b7dcb575d2 Merge branch 'MDL-62014-master' of git://github.com/nashtechdev01/moodle 2018-06-20 00:57:21 +02:00
Eloy Lafuente (stronk7) 61a9f8d147 Merge branch 'MDL-36424-master' of https://github.com/lucaboesch/moodle 2018-06-19 19:19:59 +02:00
Eloy Lafuente (stronk7) 77eee742f0 Merge branch 'wip-MDL-61786-master' of git://github.com/abgreeve/moodle 2018-06-19 19:14:43 +02:00
Eloy Lafuente (stronk7) cb461375a8 Merge branch 'MDL-62358-master' of https://github.com/HuongNV13/moodle 2018-06-19 19:05:26 +02:00
Eloy Lafuente (stronk7) 706898c83e Merge branch 'MDL-44791-master' of https://github.com/lucaboesch/moodle 2018-06-19 18:59:41 +02:00
Eloy Lafuente (stronk7) 3a55517a53 Merge branch 'MDL-62449-master' of git://github.com/sarjona/moodle 2018-06-19 18:18:51 +02:00
Tim Hunt a1bc8928cc MDL-62747 accesslib: rdef caching should handle roles with no caps 2018-06-19 16:26:00 +01:00
Zig Tan 8be71d396b MDL-61482 mod_assign: Clean html in offline grading CSV 2018-06-19 23:19:13 +08:00
Bas Brands c8c595e6d0 MDL-62691 Theme boost: editpdf hide dropdown close btn 2018-06-19 16:57:10 +02:00
Bas Brands d7dbf65770 MDL-62703 Themes: remove hover styles in course listings 2018-06-19 16:32:08 +02:00
Bas Brands 7605e3899f MDL-59047 question type: short answer boost styles 2018-06-19 14:32:35 +02:00
David Monllao fa6f911fc5 Merge branch 'MDL-62588-master' of git://github.com/rezaies/moodle 2018-06-19 12:52:15 +02:00
David Monllao c85a3823b8 Merge branch 'MDL-44859-master' of https://github.com/lucaboesch/moodle 2018-06-19 12:06:48 +02:00
Jun Pataleta ec4d05c6b6 Merge branch 'MDL-61894-master' of https://github.com/lucaboesch/moodle 2018-06-19 17:57:31 +08:00
David Monllao fca5c2de05 Merge branch 'MDL-58702-master' of git://github.com/zig-moodle/moodle 2018-06-19 11:53:21 +02:00
Adrian Greeve 373a09a86a MDL-62391 tool_dataprivacy: Added more detail about data requests.
This adds the detail about who requested the data request to the
tables and data request information page.
2018-06-19 14:50:29 +08:00
Huong Nguyen 430241eb4b MDL-62597 Privacy: Request date column should include time 2018-06-19 14:50:00 +08:00
Zig Tan fcb7d2a976 MDL-42818 assign: Add grading UI indicator about followup submission 2018-06-19 14:06:17 +08:00
Andrew Nicols 67196d5080 Merge branch 'MDL-60950-master' of git://github.com/damyon/moodle 2018-06-19 11:36:59 +08:00
Damyon Wiese 994d0da35e MDL-60950 assign: Update incompatible unit test
Maintain compatibility with unit test changes after MDL-55609.
2018-06-19 10:56:53 +08:00
Damyon Wiese c957707106 MDL-60950 assign: Rename class
testable_assign was renamed to mod_assign_testable_assign
2018-06-19 10:53:51 +08:00
Andrew Nicols 68a482e167 Merge branch 'MDL-62283-master' of https://github.com/Kathrin84/moodle 2018-06-19 10:36:37 +08:00
Andrew Nicols 2ffb5ea5e9 Merge branch 'MDL-62519_master' of git://github.com/markn86/moodle 2018-06-19 10:33:52 +08:00
Damyon Wiese 07d237840e MDL-60950 assign: Robust filtering of grading table
For assignments with gradetype set to none, we need special handling when generating the query to filter submissions that need grading.
2018-06-19 10:09:42 +08:00
Damyon Wiese a5ff898f90 MDL-60950 assign: Test for the requires grading filter
This test covers when the requires grading filter is applied, but the
assignment has no grade and the feedbackcomments plugin is disabled.
2018-06-19 10:09:42 +08:00
Andrew Nicols 29532b3758 Merge branch 'MDL-62597-master' of https://github.com/HuongNV13/moodle 2018-06-19 09:42:36 +08:00
Eloy Lafuente (stronk7) f3611eabc8 Merge branch 'MDL-59429-master' of git://github.com/mickhawkins/moodle 2018-06-19 02:06:54 +02:00
Eloy Lafuente (stronk7) 9153d6ea05 Merge branch 'MDL-62638-master' of git://github.com/bmbrands/moodle 2018-06-19 02:03:08 +02:00
Eloy Lafuente (stronk7) eeb0597493 Merge branch 'MDL-62571_master' of git://github.com/markn86/moodle 2018-06-19 01:49:05 +02:00
Sara Arjona 1d76dd714c MDL-62449 scorm: Move related data to data in the privacy export 2018-06-18 10:42:26 +02:00
Sara Arjona cd3ef1fbc4 MDL-62449 scorm: Add SCORM data to privacy export (name, description) 2018-06-18 10:42:26 +02:00
Jun Pataleta 0197ac313c Merge branch 'MDL-62614-master' of git://github.com/zig-moodle/moodle 2018-06-18 16:12:40 +08:00
Jun Pataleta d2b1d001bb Merge branch 'MDL-62709_master' of git://github.com/markn86/moodle 2018-06-18 15:16:18 +08:00
Jun Pataleta 35f5be26ae Merge branch 'MDL-62658_master' of git://github.com/markn86/moodle 2018-06-18 14:36:54 +08:00
Jun Pataleta 4fb6f0b5ce Merge branch 'wip-MDL-62474-master' of git://github.com/abgreeve/moodle 2018-06-18 14:32:42 +08:00
Mark Nelson 4f6cb2ee77 MDL-62658 message_popup: fixed issue with malformed URL being generated 2018-06-18 14:27:54 +08:00
Adrian Greeve f43ed74cb0 MDL-62474 theme_boost: Update to provider and unit test.
Theme boost contains a user preference which was not reported
before. Unit tests have been added to test the update.
2018-06-18 14:03:38 +08:00
Andrew Nicols 3b6811a113 Merge branch 'MDL-62320-master' of git://github.com/vmdef/moodle 2018-06-18 13:47:21 +08:00
Willian Mano dfcbcfc319 MDL-62474 theme_boost: Fix Boost privacy provider 2018-06-18 13:33:41 +08:00
Shamim Rezaie f84df305c0 MDL-62588 enrol_paypal: Add missing instanceid field 2018-06-18 15:14:04 +10:00
Huong Nguyen af2e8ed947 MDL-62614 Privacy: Core tag provider delete_item_tags function not work 2018-06-18 12:59:13 +08:00
Andrew Nicols dcb2cea690 Merge branch 'MDL-62234-master' of git://github.com/bmbrands/moodle 2018-06-18 09:51:18 +08:00
Andrew Nicols b885f0bf60 Merge branch 'MDL-57968-master' of git://github.com/cescobedo/moodle 2018-06-18 08:57:13 +08:00
Evan Giles 53007faad1 MDL-57404 admin_settings: Allow comments in ip block
This adds the ability to to add comments to ip lists in moodle.

Currently, the configiplist textentry box does not allow the user to annotate
the IP addresses defined.  For example, I'd like to be able to define:
 192.168.1.1     # London office
 10.1.1.1        # New york office
 118.209.246.240 # My home IP

This would allow me to revisit this list after a few months, and remove
IP addresses that are no longer required - without having to manually confirm
each IP address
2018-06-16 21:08:46 +10:00
Victor Deniz 046dd892c7 MDL-62320 mimetypes: Add JSON to the default mime types list 2018-06-15 12:54:23 +01:00
Kathrin Osswald c449fbcf72 MDL-62283 theme Boost: No nav drawer pref on small screens 2018-06-15 13:14:28 +02:00
Damyon Wiese 43c8e1f596 MDL-62643 assign: Skip empty online text files
Online text assignment submissions with no text entered into the editor should not
create a blank html document for providing feedback.
2018-06-15 14:07:08 +08:00
HungTran d2d82a9d7d MDL-62014 course: Add title to activity completion button 2018-06-15 10:18:26 +07:00
Michael Hawkins 0be294c005 MDL-59429 roles: Log add/remove admin users. 2018-06-15 10:22:54 +08:00
Zig Tan e689e4d446 MDL-58702 backup: Fix restoration of role mappings labels
Changes:
- Add logic to retrieve all the existing current roles.
- Apply the backup's role shortname by matching on the archetype.
- Added backup lang string 'undefinedrolemapping'.
2018-06-15 09:55:53 +08:00
Matt Porritt 784ed31ea0 MDL-62705 Global Search: results order selection does not display
As of 3.5 a search plugin can define the result orders it supports.
When a search plugin defines multiple sort orders and the search is
conducted without a context (no context query param in the URL),
the code to load the available sort orders from the enabled search
backend is never called.

This patch gets the supported search orders for the enabled search
engine regardless of context being provided or not. As prior, the
search order selection will not display if the only result order
option is relevance.
2018-06-15 11:31:36 +10:00
Matteo Scaramuccia 09ca972877 MDL-51080 env: warn when running MariaDB w/ wrong dbtype 2018-06-14 23:54:35 +02:00
Luca Bösch e6914883ed MDL-61894 tag: Modal buttons style. 2018-06-14 17:34:29 +02:00
Luca Bösch df24fb7172 MDL-44859 grade: Inverse the order of the add category and item buttons 2018-06-14 17:33:41 +02:00
Luca Bösch b1a8a5052c MDL-44791 admin: Open server check doc links in new window. 2018-06-14 17:33:35 +02:00
Ed Basset 1764defb5a MDL-36424 wiki: set group so subwiki tabs/pages display correctly 2018-06-14 17:33:18 +02:00
Mark Johnson e3389c83b2 MDL-61244 caching: Allow granular purging of caches 2018-06-14 15:04:42 +01:00
Huong Nguyen 628b4c86af MDL-62358 Question: Improve number function
Support all 'question numbers' that might be needed
2018-06-14 19:43:55 +07:00
Huong Nguyen cf9b6587c0 MDL-62597 Privacy: Request date column should include time 2018-06-14 19:40:31 +07:00
Eloy Lafuente (stronk7) 9e7c397889 weekly release 3.6dev 2018-06-14 10:55:47 +02:00
Eloy Lafuente (stronk7) 7fb9a2550e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-06-14 10:55:44 +02:00
Mark Nelson cd9ecbd81c MDL-62709 core_message: convert NULL format types in task 2018-06-14 13:18:46 +08:00
David M Penner 8791c50d64 MDL-62709 core_message: fix for silently ignored errors in task 2018-06-14 12:20:42 +08:00
Jun Pataleta 3662898b7c Merge branch 'MDL-60207-master' of git://github.com/andrewnicols/moodle 2018-06-14 10:29:11 +08:00
Andrew Nicols 460dc37184 MDL-60207 modal: Fix close modal behat for clean 2018-06-14 10:19:45 +08:00
Mark Nelson 0c34cc5a93 MDL-31443 core_backup: change review heading to 'Restore settings' 2018-06-13 17:49:38 +02:00
Luca Bösch 2e8491a5be MDL-31443 core_backup: revert changes to util/ui/renderer.php 2018-06-13 17:49:38 +02:00
Bas Brands 1b21702511 MDL-62234 Theme boost: Improve atto dialogue styling 2018-06-13 11:34:41 +02:00
Jun Pataleta 398e912054 Merge branch 'MDL59980_block_bug' of git://github.com/kristian-94/moodle 2018-06-13 10:00:00 +08:00
Andrew Nicols 0e75d337ee Merge branch 'MDL-60207-master' of git://github.com/ryanwyllie/moodle 2018-06-13 09:41:45 +08:00
Andrew Nicols c3f13f534d Merge branch 'MDL-6074-master' of git://github.com/mihailges/moodle 2018-06-13 09:38:55 +08:00
Mihail Geshoski 5226999dd7 MDL-6074 blocks: Hide user in online users block 2018-06-13 09:02:24 +08:00
AMOS bot 33866de211 Automatically generated installer lang files 2018-06-13 00:07:55 +00:00
Kristian Ringer c0bc8d38a5 MDL-59980 core_admin: Fix bug preventing block modification in settings 2018-06-13 09:36:27 +10:00
Eloy Lafuente (stronk7) a9f6dd075a Merge branch 'MDL-62651-master' of git://github.com/andrewnicols/moodle 2018-06-12 18:38:05 +02:00
Eloy Lafuente (stronk7) d0f9d0ef4d Merge branch 'MDL-62446-master' of git://github.com/lameze/moodle 2018-06-12 18:21:40 +02:00
David Monllao 4a47a69519 Merge branch 'MDL-58063-master' of git://github.com/mihailges/moodle 2018-06-12 11:05:37 +02:00
David Monllao bcb4a27dd6 Merge branch 'MDL-55609-master' of git://github.com/andrewnicols/moodle 2018-06-12 10:07:35 +02:00
Mark Nelson 6ffd66f350 MDL-62519 atto_recordrtc: detach click listener when recording again 2018-06-12 14:35:03 +08:00
Jun Pataleta d495276134 Merge branch 'wip-MDL-62574-master' of git://github.com/abgreeve/moodle 2018-06-12 11:57:01 +08:00
Adrian Greeve 666aae9deb MDL-62574 core_privacy: Unit tests to check the context base.
This now tests the possibility of a context being deleted.
2018-06-12 11:24:38 +08:00
Adrian Greeve c84cb13cd4 MDL-62574 core_privacy: Check the contextlist for real contexts.
There are situations when contexts will be deleted in the provider.
The context list is not updated and so we have introduced a try
catch.
2018-06-12 11:24:38 +08:00
Andrew Nicols 7ab9d0aedf Merge branch 'wip_MDL-62576_master' of git://github.com/gjb2048/moodle 2018-06-12 10:25:01 +08:00
Andrew Nicols 01d0c0cb49 Merge branch 'MDL-62628-master' of git://github.com/mihailges/moodle 2018-06-12 09:49:18 +08:00
Andrew Nicols 6f38bb9bdc Merge branch 'MDL-60819-master' of https://github.com/snake/moodle 2018-06-12 08:58:49 +08:00
Eloy Lafuente (stronk7) e692de3e58 Merge branch 'MDL-62649-master' of git://github.com/mihailges/moodle 2018-06-12 01:45:13 +02:00
Eloy Lafuente (stronk7) 3036620e0b Merge branch 'MDL-62460-master' of git://github.com/junpataleta/moodle 2018-06-12 01:41:37 +02:00
Eloy Lafuente (stronk7) 3afd0a2523 Merge branch 'MDL-31443-master' of https://github.com/lucaboesch/moodle 2018-06-12 01:35:19 +02:00
Eloy Lafuente (stronk7) d157f8774e Merge branch 'MDL-62577-m' of https://github.com/micaherne/moodle 2018-06-12 00:07:43 +02:00
Mark Nelson 4626c848c2 MDL-62571 mod_forum: fixed redirection URLs 2018-06-11 18:29:58 +08:00
David Monllao 009ab16689 Merge branch 'MDL-61484-master' of git://github.com/junpataleta/moodle 2018-06-11 10:33:52 +02:00
Jun Pataleta 64818f403d MDL-61484 mod_chat: Add CHAT_SESSION_GAP constant 2018-06-11 15:59:13 +08:00
Jun Pataleta d7b236fa5e MDL-61484 mod_chat: Fix chat_get_sessions logic 2018-06-11 15:59:06 +08:00
Jun Pataleta 70175dbe8f MDL-61484 mod_chat: More unit tests for chat
* For chat_get_sessions()
* Fix externallib test
2018-06-11 15:48:41 +08:00
Leon Stringer 6bdccc7438 MDL-61786 auth: Changed strings for Test Settings to lang strings
The output strings for the Test Settings function were hard-coded English
strings. They've been changed to standard language strings which can be
translated and maintained via AMOS.
2018-06-11 14:14:26 +08:00
Jun Pataleta 15b3d284f3 Merge branch 'MDL-62594-master' of git://github.com/bmbrands/moodle 2018-06-11 13:55:43 +08:00
Jake Dallimore 28c3f6e4d8 MDL-60819 core_files: fix exception thrown from generate_image_thumbnail
This function now requires gdlib.php.
2018-06-11 10:44:51 +08:00
Andrew Nicols 5e12ab5ef2 Merge branch 'MDL-62270-MASTER-Cron-task-fails-on-data-privacy-related-task' of https://github.com/adamtppaw/moodle 2018-06-11 09:32:59 +08:00
Luca Bösch f55b45e473 MDL-31443 backup: Title and cancel messages stating import and restore 2018-06-08 11:35:02 +02:00
Bas Brands dad7b51e5f MDL-62654 Theme Boost: update readme on @supports prefixer issues 2018-06-08 10:14:17 +02:00
Simey Lameze 424441471d MDL-62446 mod_glossary: optimize provider code 2018-06-08 10:25:45 +08:00
Simey Lameze 98d24a4824 MDL-62446 mod_glossary: improve privacy unit tests 2018-06-08 10:04:38 +08:00
Mihail Geshoski 6f48461344 MDL-62628 resource: Folder name formatting issue when displayed inline 2018-06-08 08:35:29 +08:00
Mihail Geshoski 5b97c08412 MDL-58063 blocks: Cannot access manage files in HTML block in clean 2018-06-08 08:25:53 +08:00
Gareth J Barnard 76721ad65b MDL-62576 theme_boost: Course jump to menu not centred 2018-06-07 20:41:39 +01:00
Eloy Lafuente (stronk7) 50e48a8f2d weekly release 3.6dev 2018-06-07 16:59:48 +02:00
Bas Brands ab17aad569 MDL-62638 Theme boost: remove broken css 2018-06-07 16:44:27 +02:00
Bas Brands f2b71ab281 MDL-62594 question type: cloze question theme boost 2018-06-07 13:58:43 +02:00
Eloy Lafuente (stronk7) 3d371e6971 Merge branch 'MDL-17943_master' of git://github.com/markn86/moodle 2018-06-06 20:23:57 +02:00
David Monllao a7fb68f27f Merge branch 'MDL-62273-master' of https://github.com/sammarshallou/moodle 2018-06-06 11:16:41 +02:00
Jun Pataleta 054900f5ed Merge branch 'MDL-61826-master' of git://github.com/junpataleta/moodle 2018-06-06 11:16:38 +02:00
Jun Pataleta 959d5fadc6 Merge branch 'MDL-46513_master' of git://github.com/markn86/moodle 2018-06-06 11:16:34 +02:00
Jun Pataleta 43cc39bbc2 Merge branch 'MDL-62225-master' of https://github.com/lucisgit/moodle 2018-06-06 11:16:31 +02:00
Jun Pataleta d585953dfe Merge branch 'MDL-62586-master' of git://github.com/bmbrands/moodle 2018-06-06 11:16:28 +02:00
Andrew Nicols f32a9acadf Merge branch 'm36_MDL-61702_MariaDB_InnoDB10d3d1_Params_Removed' of https://github.com/scara/moodle 2018-06-06 11:16:25 +02:00
Orzu Ionut 403f553623 MDL-61670 assign: show uploaded files timestamp
Amended to fix commit message. Rename variable to lower.
2018-06-06 11:16:22 +02:00
Eloy Lafuente (stronk7) b1e700747a Merge branch 'MDL-39486-master' of git://github.com/mihailges/moodle 2018-06-06 11:16:19 +02:00
David Monllao 01dc21198f Merge branch 'MDL-46344-master' of https://github.com/lucaboesch/moodle 2018-06-06 11:16:16 +02:00
David Monllao 75ebfbdf99 Merge branch 'MDL-50812-master' of https://github.com/nashtechdev01/moodle 2018-06-06 11:16:13 +02:00
Jun Pataleta ae061649d4 Merge branch 'MDL-62336_master' of git://github.com/markn86/moodle 2018-06-06 11:16:09 +02:00
David Monllao c051057058 Merge branch 'wip-MDL-61694_Check_Password_Callback' of https://github.com/Spudley/moodle 2018-06-06 11:16:06 +02:00
Jun Pataleta 5870677fd4 Merge branch 'MDL-61778-master' of git://github.com/mickhawkins/moodle 2018-06-06 11:16:03 +02:00
Jun Pataleta dce622fba9 Merge branch 'MDL-62605-master' of https://github.com/lucaboesch/moodle 2018-06-06 11:16:00 +02:00
Mark Nelson cf24ef0279 MDL-17943 core: adjusted the 'mustconfirm' string 2018-06-06 13:04:43 +08:00
Mark Nelson e4f7841370 MDL-17943 core: send email when user has forgotten their password
If a user is unconfirmed and attempts to reset their password
they receive the message 'Your registration has not yet been
confirmed!' which means they can never reset their password,
and therefore can not log-in to have their confirmation email
resent.

This patch adjusts the message to mention they should check their
mailbox and attempts to send them the confirmation email.
2018-06-06 13:01:53 +08:00
Mark Nelson 81c1e2036b MDL-17943 core_admin: added 'Resend email' link to user list 2018-06-06 12:47:20 +08:00
Mark Nelson 08c69a1456 MDL-17943 core: added button to resend confirmation email
This button is shown when a user logs in but has not yet
been confirmed.
2018-06-06 12:47:20 +08:00
Jun Pataleta 7766dbed5d MDL-61826 auth: Make Facebook endpoints more maintainable 2018-06-06 12:44:24 +08:00
Łukasz Szeremeta ac45c16544 MDL-61826 auth: Facebook OAuth2 - getting a better-quality profile photo
Get 200x200 px instead of 50x50 px user profile picture from Facebook OAuth2.
2018-06-06 12:09:09 +08:00
Andrew Nicols 31bef9bdc8 MDL-62651 tool_task: Add adhoc CLI runner 2018-06-06 11:48:37 +08:00
Mihail Geshoski 89e78fd094 MDL-62649 course: Course and category management items displayed wrongly 2018-06-06 11:36:44 +08:00
cescobedo 84e03ed859 MDL-57968 core_message: Remove multiple unnecessary AJAX requests
Remove AJAX requests core_message_get_unread_conversations_count and
message_popup_get_unread_popup_notification_count and
render the unread messages and notifications into mustache template.
2018-06-06 01:02:00 +02:00
Luca Bösch 4a42d3decd MDL-62605 core_user: course name filter in unenrol modal. 2018-06-05 07:55:58 +02:00
Eloy Lafuente (stronk7) 2ace1fb16b Merge branch 'fix/MDL-52666' of https://github.com/mikr0/moodle 2018-06-04 17:36:19 +02:00
David Monllao e812df2260 Merge branch 'MDL-62620' of git://github.com/stronk7/moodle 2018-06-04 14:28:15 +02:00
David Monllao 995457b8cf Merge branch 'wip-MDL-37977-master' of git://github.com/marinaglancy/moodle 2018-06-04 14:22:01 +02:00
David Monllao b321d231ff Merge branch 'MDL-42366-master' of https://github.com/lucisgit/moodle 2018-06-04 13:17:07 +02:00
adamtppaw c6363e8c23 MDL-62270 Privacy: Cron task fails when admin directory renamed 2018-06-03 22:12:43 +02:00
Eloy Lafuente (stronk7) 9a89adcb98 MDL-62620 behat: Update master to use 3.36.0 behat extension tag 2018-06-01 12:16:04 +02:00
Luca Bösch d8343b5432 MDL-46344 outputrenderers: Localize 'This page is'. 2018-06-01 11:41:30 +02:00
sam marshall bef86c669c MDL-62273 Profile: Callback allows plugins to control profile access
Adds a new callback, <plugin>_control_view_profile. Plugins may
return core_user::VIEWPROFILE_PREVENT to prevent access,
core_user::VIEWPROFILE_DO_NOT_PREVENT to make no change, or
core_user::VIEWPROFILE_FORCE_ALLOW to allow access even when Moodle
would normally prevent it.

This allows third-party plugins to restrict (or allow) access to
profile pages in response to arbitrary business logic.
2018-06-01 09:59:01 +01:00
Jun Pataleta 9e76aac08e MDL-62460 tool_dataprivacy: Render selected user properly on validation 2018-06-01 16:08:36 +08:00
Marina Glancy dcce35754c MDL-37977 frontpage: Move html from index.php to renderer 2018-06-01 11:32:08 +08:00
Marina Glancy a400dd2d85 MDL-37977 frontpage: renderer method for frontpage section1 2018-06-01 11:32:06 +08:00
Michael Hawkins d0f3b5f083 MDL-61778 message: Renamed online status icon and replaced Boost icon 2018-06-01 10:15:11 +08:00
Andrew Nicols b762445485 MDL-55609 mod_assign: Deprecate base_test 2018-06-01 07:31:50 +08:00
Andrew Nicols a6b8fc7830 MDL-55609 assignfeedback_comments: Remove shared setUp 2018-06-01 07:30:32 +08:00
Andrew Nicols a41bf00517 MDL-55609 mod_assign: Move fixture to folder 2018-06-01 07:30:32 +08:00
Andrew Nicols 757d5b7cdc MDL-55609 mod_assign: Remove shared setUp for all tests 2018-06-01 07:30:32 +08:00
Andrew Nicols e984917db8 MDL-55609 testing: Add a create_and_enrol helper 2018-06-01 07:30:32 +08:00
Matteo Scaramuccia 82c2d98fa2 MDL-61702 dml: MariaDB 10.3 supports only the Barracuda file format.
More details about this change also in https://tracker.moodle.org/browse/MDL-59099

Ref.: https://mariadb.com/kb/en/library/mariadb-1031-release-notes/#other-variables
2018-05-31 22:55:00 +02:00
David Monllao 5b4ca9eb5b weekly release 3.6dev 2018-05-31 08:39:27 +02:00
Tim Hunt a266ae30fa MDL-50812 core_useragent: <body> classes for Chrome and Edge 2018-05-31 09:42:07 +07:00
Tony Butler 8e64242131 MDL-62225 assignfeedback_editpdf: Add alt text for nav button shortcuts 2018-05-30 15:58:18 +01:00
Tony Butler 166ac972c3 MDL-42366 assignfeedback_editpdf: Improve meaningfulness of cursor image
Various improvements to make the cursor image more accurately reflect
the currently selected editing tool or action:
 * Replace crosshair with default cursor for read-only student view
 * Use currently selected stamp image as cursor when using stamp tool
 * Use text cursor for text higlighter tool and improve its accuracy
 * Use default cursor for select tool (as indicated by its button icon)
2018-05-30 14:50:34 +01:00
David Monllao 8cb2821928 Merge branch 'MDL-62532-master' of git://github.com/rezaies/moodle 2018-05-30 10:20:02 +02:00
Andrew Nicols 5a38bc90a8 Merge branch 'MDL-57486-master-fix' of git://github.com/junpataleta/moodle 2018-05-30 13:20:42 +08:00
Jun Pataleta 95c2e43008 MDL-57486 tool_recyclebin: Close the files recordset properly 2018-05-30 13:15:30 +08:00
Andrew Nicols f77bb2834c Merge branch 'MDL-57600-master' of git://github.com/lameze/moodle 2018-05-30 09:16:57 +08:00
Andrew Nicols b3475a6874 MDL-57486 tool_recyclebin: Coding style fix 2018-05-30 08:35:08 +08:00
Andrew Nicols 3d579187e9 Merge branch 'master_MDL-57486' of https://github.com/danmarsden/moodle 2018-05-30 08:31:12 +08:00
David Monllao 4069f62436 MDL-62381 editor_tinymce: Rearrange style modification 2018-05-29 16:36:26 +02:00
David Monllao 060884dfd6 Merge branch 'MDL-62381_master' of https://github.com/Syxton/moodle 2018-05-29 16:34:40 +02:00
Matt Davidson 197e714dfd MDL-62381 editor: Fix tinymce icons
Icon sizing is being overwritten on images.
2018-05-29 09:04:08 -04:00
Jun Pataleta f1b701e6ce Merge branch 'MDL-62544-master' of git://github.com/Dagefoerde/moodle 2018-05-29 16:24:59 +08:00
Bas Brands b1a74e40ff MDL-62586 Themes: use Boostrap media compontent for author display 2018-05-29 09:27:04 +02:00
Dan Marsden 5efcb522b1 MDL-57486 tool_recyclebin: Delete items when context already deleted. 2018-05-29 14:24:50 +12:00
Ryan Wyllie 7e0305be70 MDL-60207 javascript: remove click handler in YUI modal initialiser 2018-05-29 10:05:00 +08:00
Treu Quan 30e1f5a023 MDL-60207 javascript: close modal when user touch/click outside it 2018-05-29 10:04:37 +08:00
Jun Pataleta f9be03432a Merge branch 'MDL-56498-master' of git://github.com/mickhawkins/moodle 2018-05-29 09:37:16 +08:00
David Monllao 77e7c45487 Merge branch 'MDL-62316_oauth_guess_image_fix' of https://github.com/leonstr/moodle 2018-05-28 16:46:30 +02:00
David Monllao c89b495650 Merge branch 'wip-MDL-62584-master' of git://github.com/marinaglancy/moodle 2018-05-28 16:31:00 +02:00
Eloy Lafuente (stronk7) 00977e984e MDL-62478 upgrade: add 3.5.0 separation line to all upgrade scripts 2018-05-28 13:15:48 +02:00
David Monllao d5010fb5e2 MDL-42779 course: Update line jump so it equals 35 2018-05-28 11:46:38 +02:00
David Monllao 4a34457ea7 Merge branch 'MDL-42779-master' of https://github.com/lucaboesch/moodle 2018-05-28 11:42:44 +02:00
Mark Nelson 273e0a822a MDL-62336 media_videojs: ensure videos have unique IDs 2018-05-28 16:43:57 +08:00
David Monllao 1d6dd4388d Merge branch 'MDL-57742_master' of git://github.com/markn86/moodle 2018-05-28 09:13:53 +02:00
Mark Nelson 88e16674b2 MDL-46513 mod_chat: pass has_capability result to fullname function 2018-05-28 15:11:25 +08:00
David Monllao 17ed12eb17 Merge branch 'm35_MDL-59596_DDL_Issues_With_MariaDB_10p2_SQLMode' of https://github.com/scara/moodle 2018-05-28 08:15:09 +02:00
Jun Pataleta 8a930e444b Merge branch 'wip-MDL-62493-master' of git://github.com/marinaglancy/moodle 2018-05-28 13:01:09 +08:00
Mark Nelson 6d32804f8a MDL-57742 core_lib: Updated readme_moodle.txt 2018-05-28 12:55:25 +08:00
David Balch 528060a1a9 MDL-57742 core_lib: Make tool_consumer_instance_guid optional
In the specification, tool_consumer_instance_guid is only listed
as recommended. However, the library was requiring it.

https://www.imsglobal.org/specs/ltiv2p0/implementation-guide#toc-42
2018-05-28 12:47:05 +08:00
Andrew Nicols 87095d1405 Merge branch 'MDL-62515-master' of git://github.com/junpataleta/moodle 2018-05-28 12:27:45 +08:00
Marina Glancy 024ede2c6b MDL-62584 xmlrpc: return correct content-length 2018-05-28 11:14:42 +08:00
Simey Lameze 4834d388da MDL-57600 course: fix typo on courselib test 2018-05-28 09:38:16 +08:00
Alex a91437a3c1 MDL-57600 format: Fix spelling errors 2018-05-28 09:35:35 +08:00
Jun Pataleta 6a7a11a7b3 Merge branch 'MDL-61832-master' of https://github.com/lucaboesch/moodle 2018-05-28 09:21:48 +08:00
Shamim Rezaie 3722c7d697 MDL-62532 core_question: Include standard tags in the tags autocomplete 2018-05-28 10:53:57 +10:00
Andrew Nicols 407f5d053c MDL-62543 mod_forum: Add RSS Unit tests 2018-05-28 08:53:45 +08:00
Andrew Nicols daad84d150 Merge branch 'MDL-62543-master' of git://github.com/tobiasreischmann/moodle 2018-05-28 08:53:41 +08:00
Eloy Lafuente (stronk7) 4a0c770372 Merge branch 'MDL-62408_master' of https://github.com/marxjohnson/moodle 2018-05-28 01:40:07 +02:00
Michael Aherne e99a39624e MDL-62577 unit tests: Quote class name in re-run command. 2018-05-25 16:46:45 +01:00
Marina Glancy 7115c32949 MDL-62493 tool_policy: correct redirection
do not override session->wantsurl
do not redirect guests to user.php, they get an error there
2018-05-25 14:29:40 +08:00
Marina Glancy deaf67147d MDL-62493 tool_policy: allow guests to sign up 2018-05-25 14:29:40 +08:00
Mihail Geshoski 57c888c0fa MDL-39486 lesson: Length of label text too narrow in matching questions 2018-05-25 10:01:25 +08:00
Jan Dageförde df751f0040 MDL-62544 privacy: error notification type 2018-05-24 16:44:17 +02:00
Jan Dageförde 97009b73cf MDL-62544 privacy: Allow data requests on behalf of a user by admin/DPO 2018-05-24 16:43:06 +02:00
Luca Bösch ed38521b1d MDL-61832 lesson: don't hide lesson page editing options 2018-05-24 15:45:30 +02:00
Luca Bösch d29bde5943 MDL-42779 course: Pagination in management page preserves view action 2018-05-24 15:44:35 +02:00
David Monllao 6b2e04676a weekly on-sync release 3.6dev 2018-05-24 10:47:52 +02:00
David Monllao 3399860ee8 NOBUG: Fixed SVG browser compatibility 2018-05-24 10:47:51 +02:00
David Monllao 59cc07ae99 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2018-05-24 10:47:50 +02:00
Tobias Reischmann 82b50d3187 MDL-62543 forum: Switched the usage of the deleted flag for rss
The deleted flag was introduced through the Privacy API and was used
for post selection for the rss feed. In there it was used in the
wrong way, which lead to the exclusion of all non deleted posts instead
of excluding all deleted ones.
This commit fixes this problem.
2018-05-23 14:05:28 +02:00
Simey Lameze 1bcc54ef25 MDL-61189 editor_tinymce: save data before submitting 2018-05-23 10:48:27 +08:00
Jake Dallimore b345895a9d Merge branch 'MDL-61932-master' of git://github.com/junpataleta/moodle 2018-05-23 10:01:08 +08:00
Leon Stringer 02cc1ecd77 MDL-62316 OAuth 2: Only guess image if base URL set.
If you added an OAuth 2 service with no base URL guess_image() would try to
parse this empty value looking for a favicon.ico.  We now check if the base
URL is empty beforehand and skip this if so.
2018-05-22 17:43:05 +01:00
Jun Pataleta d980528873 MDL-61932 mod_glossary: Fetch the correct front page section 1 ID 2018-05-22 17:15:58 +08:00
Jun Pataleta 7e603553d5 Merge branch 'wip-MDL-62239-master' of https://github.com/Beedell/moodle 2018-05-22 10:05:13 +08:00
Andrew Nicols f94aaed80b Merge branch 'MDL-62482' of git://github.com/timhunt/moodle 2018-05-22 09:37:57 +08:00
Andrew Nicols 227d6d68a3 Merge branch 'MDL-62488_master' of https://github.com/marxjohnson/moodle 2018-05-22 09:29:47 +08:00
Andrew Nicols f979e2d418 Merge branch 'MDL-62477' of git://github.com/stronk7/moodle 2018-05-22 09:20:06 +08:00
Jake Dallimore 6ef703d8a6 Merge branch 'MDL-61015-master' of https://github.com/lucaboesch/moodle 2018-05-22 08:14:52 +08:00
Eloy Lafuente (stronk7) 6b47d8066a Merge branch 'MDL-62500-master' of git://github.com/andrewnicols/moodle 2018-05-21 13:37:16 +02:00
John Beedell 2d55b0b736 MDL-62239 QTYPE: iOS 11.3 broke Moodle drag-drop question types 2018-05-21 11:13:09 +01:00
David Monllao a765519a42 Merge branch 'm36_MDL-61893_Accept_Any_Node_Carbon_Version' of https://github.com/scara/moodle 2018-05-21 12:04:44 +02:00
Luca Bösch 398ed46942 MDL-61015 course: consistently display hidden sections
This commit moves the availability info on top.
2018-05-21 11:33:35 +02:00
David Monllao 30f61e4d30 Merge branch 'MDL-62516-master' of git://github.com/andrewnicols/moodle 2018-05-21 11:15:02 +02:00
Jun Pataleta 5c334275df Merge branch 'MDL-62229-master' of git://github.com/jleyva/moodle 2018-05-21 17:04:08 +08:00
Andrew Nicols 94d55c0041 Merge branch 'wip-MDL-62481-master' of git://github.com/marinaglancy/moodle 2018-05-21 15:49:41 +08:00
Jake Dallimore ed00590ad8 Merge branch 'MDL-62440' of git://github.com/timhunt/moodle 2018-05-21 14:55:16 +08:00
Andrew Nicols 630081dd91 MDL-62516 mod_forum: Only delete files for requested user 2018-05-21 14:12:17 +08:00
Jun Pataleta 3f3f914d46 MDL-62515 templates: Remove unnecessary button role for submit button 2018-05-21 09:32:56 +08:00
Andrew Nicols 4396a8f241 Merge branch 'MDL-62386-master' of git://github.com/bmbrands/moodle 2018-05-21 09:10:50 +08:00
AMOS bot 3f2168dcb9 Automatically generated installer lang files 2018-05-21 00:06:14 +00:00
Andrew Nicols 39e14b2325 MDL-62500 tag: Update checkbox label when updating tag 2018-05-20 15:14:50 +08:00
Matteo Scaramuccia 495a5c5a73 MDL-61893 JavaScript: Bumped npm packages
Performed by removing the current 'npm-shrinkwrap.json' file:
$ rm -Rf node_modules
$ rm -f npm-shrinkwrap.json
$ npm install
$ npm shrinkwrap
2018-05-18 00:36:44 +02:00
Matteo Scaramuccia 22d032301b MDL-61893 JavaScript: Accept any node version but Carbon (LTS) 2018-05-18 00:36:43 +02:00
Mark Johnson 3bc65933cf MDL-62488 filebrowser: Stop unit tests assuming number of categories 2018-05-17 16:01:26 +01:00
Tim Hunt 27d625a863 MDL-62482 file_storage: may have many files with same content hash 2018-05-17 11:24:33 +01:00
Tim Hunt 5359c517d0 MDL-62440 participants: out-of-memory is many site-wide role assigns 2018-05-17 10:42:31 +01:00
Jun Pataleta 266eccfde6 MDL-61932 mod_glossary: Display site-level glossaries on section 1
* Glossary activities created on the front page by importing
entries are being added to section 0, but the front page only shows
activities on section 1.
2018-05-17 16:02:36 +08:00
Marina Glancy 08ef342aba MDL-62481 atto_recordrtc: add svg icons 2018-05-17 14:43:43 +08:00
Marina Glancy 3b29978c8e MDL-61015 course: consistently display hidden sections
When section is hidden but the course setting says to show hidden sections display the hidden
sections consistently with how we display the sections with access restriction.

The only difference is that we didn't previously display the summary of the hidden section
in this case, the new logic repeats this behavior
2018-05-17 08:01:24 +02:00
Eloy Lafuente (stronk7) 5798aee926 MDL-62477 backup: Bump release to 3.6 2018-05-17 01:53:43 +02:00
Eloy Lafuente (stronk7) 22744b745b weekly back-to-dev release 3.6dev 2018-05-16 19:03:03 +02:00
Eloy Lafuente (stronk7) cf6825cc43 NOBUG: Change travis.yml back to master 2018-05-16 18:44:30 +02:00
Michael Hawkins 105974cd08 MDL-56498 message: Ensure clicked notifications are marked read 2018-05-16 14:59:06 +08:00
Mark Johnson 104fc7fd0d MDL-62408 behat: Correct PHPUNIT_TEST checks in behat_config_util 2018-05-15 09:09:25 +01:00
Bas Brands 881098f39c MDL-62386 theme: Fix audio playback display for HTML audio
Fixed for boost
Fixed for bootstrapbase
2018-05-11 14:51:04 +02:00
Juan Leyva d808c2202f MDL-62229 tool_mobile: Add missing supported module
The Workshop module it’s been supported since Moodle 3.4 so it
should’ve been included here.
2018-04-26 19:11:43 +02:00
Simon Champion 99405aa7e2 MDL-61694 core: Add callback to allow additional password check.
The standard password validation does some basic strength checks, but
there are a number of other ways to validate a password, such as
checking that it doesn't contain common words. Adding a plugin hook
here allows us to keep up with changes in best practice in this area
as it evolves over time.
2018-04-16 13:40:54 +01:00
Charles YVANES a0db02bf7f MDL-52666 performance: added REQUEST_METHOD in performance_info 2018-04-13 10:25:48 +02:00
Matteo Scaramuccia 1f8d943461 MDL-59596 ddl: Support MariaDB 10.2.4+ SQL_MODE new default value. 2018-03-26 23:12:36 +02:00
Matteo Scaramuccia f6b16e95a8 MDL-59596 ddl: Added has_breaking_change_sqlmode() 2018-03-26 23:12:36 +02:00
2627 changed files with 214940 additions and 44910 deletions
+2
View File
@@ -9,6 +9,8 @@ auth/cas/CAS/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
lib/editor/atto/plugins/html/yui/src/codemirror/
lib/editor/atto/plugins/html/yui/src/beautify/
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
+4
View File
@@ -1,7 +1,9 @@
# Generated by "grunt ignorefiles"
**/yui/build/*
theme/bootstrapbase/style/
theme/clean/style/custom.css
theme/more/style/custom.css
theme/boost/style/moodle.css
node_modules/
vendor/
admin/tool/policy/amd/src/jquery-eu-cookie-law-popup.js
@@ -10,6 +12,8 @@ auth/cas/CAS/
enrol/lti/ims-blti/
filter/algebra/AlgParser.pm
filter/tex/mimetex.*
lib/editor/atto/plugins/html/yui/src/codemirror/
lib/editor/atto/plugins/html/yui/src/beautify/
lib/editor/atto/yui/src/rangy/js/*.*
lib/editor/tinymce/plugins/pdw/tinymce/
lib/editor/tinymce/plugins/spellchecker/rpc.php
+4 -2
View File
@@ -56,7 +56,7 @@ matrix:
include:
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7.2
env: DB=none TASK=GRUNT NVM_VERSION='8.9'
env: DB=none TASK=GRUNT NVM_VERSION='lts/carbon'
exclude:
# MySQL - it's just too slow.
@@ -207,7 +207,7 @@ before_script:
# We need the official upstream for comparison
git remote add upstream https://github.com/moodle/moodle.git;
git fetch upstream MOODLE_35_STABLE;
git fetch upstream master;
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`
@@ -263,7 +263,9 @@ script:
grunt ;
# Add all files to the git index and then run diff --cached to see all changes.
# This ensures that we get the status of all files, including new files.
# We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
git add . ;
git reset -- npm-shrinkwrap.json ;
git diff --cached --exit-code ;
fi
+16 -3
View File
@@ -37,7 +37,7 @@ module.exports = function(grunt) {
var expected = semver.validRange(grunt.file.readJSON('package.json').engines.node);
var actual = semver.valid(process.version);
if (!semver.satisfies(actual, expected)) {
grunt.fail.fatal('Node version too old. Require ' + expected + ', version installed: ' + actual);
grunt.fail.fatal('Node version not satisfied. Require ' + expected + ', version installed: ' + actual);
}
// Windows users can't run grunt in a subdirectory, so allow them to set
@@ -137,6 +137,16 @@ module.exports = function(grunt) {
}
}
},
sass: {
dist: {
files: {
"theme/boost/style/moodle.css": "theme/boost/scss/preset/default.scss"
}
},
options: {
includePaths: ["theme/boost/scss/"]
}
},
watch: {
options: {
nospawn: true // We need not to spawn so config can be changed dynamically.
@@ -212,9 +222,11 @@ module.exports = function(grunt) {
// Generate .stylelintignore.
var stylelintIgnores = [
'# Generated by "grunt ignorefiles"',
'**/yui/build/*',
'theme/bootstrapbase/style/',
'theme/clean/style/custom.css',
'theme/more/style/custom.css'
'theme/more/style/custom.css',
'theme/boost/style/moodle.css'
].concat(thirdPartyPaths);
grunt.file.write('.stylelintignore', stylelintIgnores.join('\n'));
};
@@ -362,6 +374,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-stylelint');
@@ -374,7 +387,7 @@ module.exports = function(grunt) {
grunt.registerTask('js', ['amd', 'yui']);
// Register CSS taks.
grunt.registerTask('css', ['stylelint:scss', 'stylelint:less', 'less:bootstrapbase', 'stylelint:css']);
grunt.registerTask('css', ['stylelint:scss', 'sass', 'stylelint:less', 'less:bootstrapbase', 'stylelint:css']);
// Register the startup task.
grunt.registerTask('startup', 'Run the correct tasks for the current directory', tasks.startup);
+75
View File
@@ -0,0 +1,75 @@
<?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/>.
/**
* Form for selective purging of caches.
*
* @package core
* @copyright 2018 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_admin\form;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
/**
* Form for selecting which caches to purge on admin/purgecaches.php
*
* @package core
* @copyright 2018 The Open University
* @author Mark Johnson <mark.johnson@open.ac.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class purge_caches extends \moodleform {
/**
* Define a "Purge all caches" button, and a fieldset with checkboxes for selectively purging separate caches.
*/
public function definition() {
$mform = $this->_form;
$mform->addElement('hidden', 'returnurl', $this->_customdata['returnurl']);
$mform->setType('returnurl', PARAM_LOCALURL);
$mform->addElement('submit', 'all', get_string('purgecaches', 'admin'));
$mform->addElement('header', 'purgecacheheader', get_string('purgeselectedcaches', 'admin'));
$checkboxes = [
$mform->createElement('advcheckbox', 'theme', '', get_string('purgethemecache', 'admin')),
$mform->createElement('advcheckbox', 'lang', '', get_string('purgelangcache', 'admin')),
$mform->createElement('advcheckbox', 'js', '', get_string('purgejscache', 'admin')),
$mform->createElement('advcheckbox', 'filter', '', get_string('purgefiltercache', 'admin')),
$mform->createElement('advcheckbox', 'muc', '', get_string('purgemuc', 'admin')),
$mform->createElement('advcheckbox', 'other', '', get_string('purgeothercaches', 'admin'))
];
$mform->addGroup($checkboxes, 'purgeselectedoptions');
$mform->addElement('submit', 'purgeselectedcaches', get_string('purgeselectedcaches', 'admin'));
}
/**
* If the "Purge selected caches" button was pressed, ensure at least one cache was selected.
*
* @param array $data
* @param array $files
* @return array Error messages
*/
public function validation($data, $files) {
$errors = [];
if (isset($data['purgeselectedcaches']) && empty(array_filter($data['purgeselectedoptions']))) {
$errors['purgeselectedoptions'] = get_string('purgecachesnoneselected', 'admin');
}
return $errors;
}
}
+27 -6
View File
@@ -28,7 +28,16 @@ define('CLI_SCRIPT', true);
require(__DIR__.'/../../config.php');
require_once($CFG->libdir.'/clilib.php');
list($options, $unrecognized) = cli_get_params(array('help' => false), array('h' => 'help'));
$longoptions = [
'help' => false,
'muc' => false,
'theme' => false,
'lang' => false,
'js' => false,
'filter' => false,
'other' => false
];
list($options, $unrecognized) = cli_get_params($longoptions, ['h' => 'help']);
if ($unrecognized) {
$unrecognized = implode("\n ", $unrecognized);
@@ -36,20 +45,32 @@ if ($unrecognized) {
}
if ($options['help']) {
$help =
"Invalidates all Moodle internal caches
// The indentation of this string is "wrong" but this is to avoid a extra whitespace in console output.
$help = <<<EOF
Invalidates Moodle internal caches
Specific caches can be defined (alone or in combination) using arguments. If none are specified,
all caches will be purged.
Options:
-h, --help Print out this help
--muc Purge all MUC caches (includes lang cache)
--theme Purge theme cache
--lang Purge language string cache
--js Purge JavaScript cache
--filter Purge text filter cache
--other Purge all file caches and other miscellaneous caches (may include MUC
if using cachestore_file).
Example:
\$sudo -u www-data /usr/bin/php admin/cli/purge_caches.php
";
\$ sudo -u www-data /usr/bin/php admin/cli/purge_caches.php
EOF;
echo $help;
exit(0);
}
purge_all_caches();
purge_caches(array_filter($options));
exit(0);
+23 -4
View File
@@ -51,7 +51,8 @@ list($options, $unrecognized) = cli_get_params(
'non-interactive' => false,
'allow-unstable' => false,
'help' => false,
'lang' => $lang
'lang' => $lang,
'verbose-settings' => false
),
array(
'h' => 'help'
@@ -84,6 +85,9 @@ Options:
site language if not set. Defaults to 'en' if the lang
parameter is invalid or if the language pack is not
installed.
--verbose-settings Show new settings values. By default only the name of
new core or plugin settings are displayed. This option
outputs the new values as well as the setting name.
-h, --help Print out this help
Example:
@@ -184,9 +188,24 @@ upgrade_noncore(true);
// log in as admin - we need doanything permission when applying defaults
\core\session\manager::set_user(get_admin());
// apply all default settings, just in case do it twice to fill all defaults
admin_apply_default_settings(NULL, false);
admin_apply_default_settings(NULL, false);
// Apply default settings and output those that have changed.
cli_heading(get_string('cliupgradedefaultheading', 'admin'));
$settingsoutput = admin_apply_default_settings(null, false);
foreach ($settingsoutput as $setting => $value) {
if ($options['verbose-settings']) {
$stringvlaues = array(
'name' => $setting,
'defaultsetting' => var_export($value, true) // Expand objects.
);
echo get_string('cliupgradedefaultverbose', 'admin', $stringvlaues) . PHP_EOL;
} else {
echo get_string('cliupgradedefault', 'admin', $setting) . PHP_EOL;
}
}
// This needs to happen at the end to ensure it occurs after all caches
// have been purged for the last time.
+183
View File
@@ -2097,6 +2097,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
<RESTRICT function="restrict_php_version_73" message="unsupportedphpversion73" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2273,6 +2274,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
<RESTRICT function="restrict_php_version_73" message="unsupportedphpversion73" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2435,4 +2437,185 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.6" requires="3.1">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.6" />
<VENDOR name="postgres" version="9.4" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_sixtyfour_bits" level="optional">
<FEEDBACK>
<ON_CHECK message="sixtyfourbitswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
-4
View File
@@ -28,10 +28,6 @@ require_once($CFG->libdir . '/adminlib.php');
$action = optional_param('action', '', PARAM_ALPHA);
$filterpath = optional_param('filterpath', '', PARAM_PLUGIN);
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/site:config', $systemcontext);
admin_externalpage_setup('managefilters');
// Clean up bogus filter states first.
+96
View File
@@ -0,0 +1,96 @@
<?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/>.
/**
* This file is used to display a categories sub categories, external pages, and settings.
*
* @package admin
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once('../config.php');
require_once("{$CFG->libdir}/adminlib.php");
$contextid = required_param('id', PARAM_INT);
$confirm = optional_param('confirm', null, PARAM_INT);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
$PAGE->set_url('/admin/lock.php', ['id' => $contextid]);
list($context, $course, $cm) = get_context_info_array($contextid);
$parentcontext = $context->get_parent_context();
if ($parentcontext && !empty($parentcontext->locked)) {
// Can't make changes to a context whose parent is locked.
throw new \coding_exception('Not sure how you got here');
}
if ($course) {
$isfrontpage = ($course->id == SITEID);
} else {
$isfrontpage = false;
$course = $SITE;
}
require_login($course, false, $cm);
require_capability('moodle/site:managecontextlocks', $context);
$PAGE->set_pagelayout('admin');
$PAGE->navigation->clear_cache();
$a = (object) [
'contextname' => $context->get_context_name(),
];
if (null !== $confirm && confirm_sesskey()) {
$context->set_locked(!empty($confirm));
if ($context->locked) {
$lockmessage = get_string('managecontextlocklocked', 'admin', $a);
} else {
$lockmessage = get_string('managecontextlockunlocked', 'admin', $a);
}
if (empty($returnurl)) {
$returnurl = $context->get_url();
} else {
$returnurl = new moodle_url($returnurl);
}
redirect($returnurl, $lockmessage);
}
$heading = get_string('managecontextlock', 'admin');
$PAGE->set_title($heading);
$PAGE->set_heading($heading);
echo $OUTPUT->header();
if ($context->locked) {
$confirmstring = get_string('confirmcontextunlock', 'admin', $a);
$target = 0;
} else {
$confirmstring = get_string('confirmcontextlock', 'admin', $a);
$target = 1;
}
$confirmurl = new \moodle_url($PAGE->url, ['confirm' => $target]);
if (!empty($returnurl)) {
$confirmurl->param('returnurl', $returnurl);
}
echo $OUTPUT->confirm($confirmstring, $confirmurl, $context->get_url());
echo $OUTPUT->footer();
-3
View File
@@ -28,9 +28,6 @@ require_once($CFG->libdir.'/adminlib.php');
// This is an admin page
admin_externalpage_setup('managemessageoutputs');
// Require site configuration capability
require_capability('moodle/site:config', context_system::instance());
// Get the submitted params
$disable = optional_param('disable', 0, PARAM_INT);
$enable = optional_param('enable', 0, PARAM_INT);
-2
View File
@@ -12,8 +12,6 @@ $page = optional_param('page', 0, PARAM_INT);
$perpage = optional_param('perpage', 30, PARAM_INT);
$action = trim(strtolower(optional_param('action', '', PARAM_ALPHA)));
require_login();
admin_externalpage_setup('ssoaccesscontrol');
if (!extension_loaded('openssl')) {
-2
View File
@@ -34,10 +34,8 @@ $step = optional_param('step', 'verify', PARAM_ALPHA);
$hostid = required_param('hostid', PARAM_INT);
require_login();
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
$mnet = get_mnet_environment();
-2
View File
@@ -6,12 +6,10 @@
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
admin_externalpage_setup('net');
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
$site = get_site();
$mnet = get_mnet_environment();
-4
View File
@@ -32,10 +32,6 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot.'/mnet/lib.php');
require_once($CFG->dirroot.'/'.$CFG->admin.'/mnet/peer_forms.php');
require_login();
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, 'nopermissions');
/// Initialize variables.
$hostid = optional_param('hostid', 0, PARAM_INT);
-4
View File
@@ -29,14 +29,10 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin .'/mnet/profilefields_form.php');
$mnet = get_mnet_environment();
require_login();
$hostid = required_param('hostid', PARAM_INT);
$mnet_peer = new mnet_peer();
$mnet_peer->set_id($hostid);
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, 'nopermissions');
admin_externalpage_setup('mnetpeers');
$form = new mnet_profile_form(null, array('hostid' => $hostid));
-3
View File
@@ -30,11 +30,8 @@ require_once($CFG->libdir.'/adminlib.php');
require_once($CFG->dirroot . '/' . $CFG->admin . '/mnet/services_form.php');
$mnet = get_mnet_environment();
require_login();
admin_externalpage_setup('mnetpeers');
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
$hostid = required_param('hostid', PARAM_INT);
-4
View File
@@ -21,12 +21,8 @@ if ($CFG->mnet_dispatcher_mode === 'off') {
print_error('mnetdisabled', 'mnet');
}
require_login();
admin_externalpage_setup('mnettestclient');
$context = context_system::instance();
require_capability('moodle/site:config', $context);
error_reporting(DEBUG_ALL);
echo $OUTPUT->header();
-4
View File
@@ -5,12 +5,8 @@
require_once($CFG->libdir.'/adminlib.php');
include_once($CFG->dirroot.'/mnet/lib.php');
require_login();
admin_externalpage_setup('trustedhosts');
$context = context_system::instance();
require_capability('moodle/site:config', $context, $USER->id, true, "nopermissions");
if (!extension_loaded('openssl')) {
echo $OUTPUT->header();
+6 -2
View File
@@ -87,9 +87,13 @@
$table->set_attribute('class', 'admintable generaltable');
$table->setup();
foreach ($modules as $module) {
$pluginmanager = core_plugin_manager::instance();
if (!file_exists("$CFG->dirroot/mod/$module->name/lib.php")) {
foreach ($modules as $module) {
$plugininfo = $pluginmanager->get_plugin_info('mod_'.$module->name);
$status = $plugininfo->get_status();
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
$strmodulename = '<span class="notifyproblem">'.$module->name.' ('.get_string('missingfromdisk').')</span>';
$missing = true;
} else {
-2
View File
@@ -35,8 +35,6 @@ if ($action == 'newon') {
admin_externalpage_setup($pagename);
require_capability('moodle/site:config', context_system::instance());
$baseurl = "$CFG->wwwroot/$CFG->admin/portfolio.php";
$sesskeyurl = "$CFG->wwwroot/$CFG->admin/portfolio.php?sesskey=" . sesskey();
$configstr = get_string('manageportfolios', 'portfolio');
+20 -13
View File
@@ -27,36 +27,43 @@ require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
$returnurl = optional_param('returnurl', '/admin/purgecaches.php', PARAM_LOCALURL);
$returnurl = new moodle_url($returnurl);
admin_externalpage_setup('purgecaches');
$form = new core_admin\form\purge_caches(null, ['returnurl' => $returnurl]);
// If we have got here as a confirmed aciton, do it.
if ($confirm && confirm_sesskey()) {
if ($data = $form->get_data()) {
// Valid request. Purge, and redirect the user back to where they came from.
purge_all_caches();
$selected = $data->purgeselectedoptions;
purge_caches($selected);
if ($returnurl) {
$returnurl = $CFG->wwwroot . $returnurl;
if (isset($data->all)) {
$message = get_string('purgecachesfinished', 'admin');
} else {
$returnurl = new moodle_url('/admin/purgecaches.php');
$message = get_string('purgeselectedcachesfinished', 'admin');
}
redirect($returnurl, get_string('purgecachesfinished', 'admin'));
} else if ($confirm && confirm_sesskey()) {
purge_caches();
$message = get_string('purgecachesfinished', 'admin');
}
// Otherwise, show a button to actually purge the caches.
$actionurl = new moodle_url('/admin/purgecaches.php', array('sesskey'=>sesskey(), 'confirm'=>1));
if ($returnurl) {
$actionurl->param('returnurl', $returnurl);
if (isset($message)) {
redirect($returnurl, $message);
}
// Otherwise, show a form to actually purge the caches.
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('purgecaches', 'admin'));
echo $OUTPUT->heading(get_string('purgecachespage', 'admin'));
echo $OUTPUT->box_start('generalbox', 'notice');
echo html_writer::tag('p', get_string('purgecachesconfirm', 'admin'));
echo $OUTPUT->single_button($actionurl, get_string('purgecaches', 'admin'), 'post');
echo $form->render();
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
-1
View File
@@ -31,7 +31,6 @@ require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->libdir . '/tablelib.php');
// Check permissions.
require_login();
$systemcontext = context_system::instance();
require_capability('moodle/question:config', $systemcontext);
$canviewreports = has_capability('report/questioninstances:view', $systemcontext);
+3 -2
View File
@@ -40,8 +40,9 @@ if ($unregistration && \core\hub\registration::is_registered()) {
if ($siteunregistrationform->is_cancelled()) {
redirect(new moodle_url('/admin/registration/index.php'));
} else if ($data = $siteunregistrationform->get_data()) {
if (\core\hub\registration::unregister($data->unpublishalladvertisedcourses,
$data->unpublishalluploadedcourses)) {
\core\hub\registration::unregister($data->unpublishalladvertisedcourses,
$data->unpublishalluploadedcourses);
if (!\core\hub\registration::is_registered()) {
redirect(new moodle_url('/admin/registration/index.php'));
}
}
+1 -1
View File
@@ -1990,7 +1990,7 @@ class core_admin_renderer extends plugin_renderer_base {
if (empty($CFG->docroot) or $environment_result->plugin) {
$report = get_string($stringtouse, 'admin', $rec);
} else {
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec));
$report = $this->doc_link(join($linkparts, '/'), get_string($stringtouse, 'admin', $rec), true);
}
// Enclose report text in div so feedback text will be displayed underneath it.
$report = html_writer::div($report);
-1
View File
@@ -47,7 +47,6 @@ if ($action == 'newon') {
$visible = false;
}
require_capability('moodle/site:config', context_system::instance());
admin_externalpage_setup($pagename);
$sesskeyurl = $CFG->wwwroot.'/'.$CFG->admin.'/repository.php?sesskey=' . sesskey();
-1
View File
@@ -42,7 +42,6 @@ if ($edit){
}
admin_externalpage_setup($pagename, '', null, new moodle_url('/admin/repositoryinstance.php'));
require_capability('moodle/site:config', $context);
$baseurl = new moodle_url("/$CFG->admin/repositoryinstance.php", array('sesskey'=>sesskey()));
+23
View File
@@ -80,9 +80,16 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
}
if (isset($admins[$newmain])) {
$logstringold = implode(', ', $admins);
unset($admins[$newmain]);
array_unshift($admins, $newmain);
$logstringnew = implode(', ', $admins);
set_config('siteadmins', implode(',', $admins));
add_to_config_log('siteadmins', $logstringold, $logstringnew, null);
redirect($PAGE->url);
}
}
@@ -95,8 +102,16 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
$admins[$admin] = $admin;
}
}
$logstringold = implode(', ', $admins);
$admins[$confirmadd] = $confirmadd;
$logstringnew = implode(', ', $admins);
set_config('siteadmins', implode(',', $admins));
add_to_config_log('siteadmins', $logstringold, $logstringnew, 'core');
redirect($PAGE->url);
} else if ($confirmdel and confirm_sesskey() and $confirmdel != $USER->id) {
@@ -107,8 +122,16 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
$admins[$admin] = $admin;
}
}
$logstringold = implode(', ', $admins);
unset($admins[$confirmdel]);
$logstringnew = implode(', ', $admins);
set_config('siteadmins', implode(',', $admins));
add_to_config_log('siteadmins', $logstringold, $logstringnew, 'core');
redirect($PAGE->url);
}
-1
View File
@@ -46,7 +46,6 @@ $controller = new $classformode[$mode]();
if (optional_param('submit', false, PARAM_BOOL) && data_submitted() && confirm_sesskey()) {
$controller->process_submission();
$syscontext->mark_dirty();
$event = null;
// Create event depending on mode.
switch ($mode) {
@@ -123,9 +123,6 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
assign_capability($changedcap, $this->permissions[$changedcap],
$this->roleid, $this->context->id, true);
}
// Force accessinfo refresh for users visiting this context.
$this->context->mark_dirty();
}
public function display() {
@@ -434,7 +434,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
}
public function save_changes() {
global $DB, $CFG;
global $DB;
if (!$this->roleid) {
// Creating role.
@@ -448,8 +448,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
// the UI. It would be better to do this only when we know that fields affected are
// updated. But thats getting into the weeds of the coursecat cache and role edits
// should not be that frequent, so here is the ugly brutal approach.
require_once($CFG->libdir . '/coursecatlib.php');
coursecat::role_assignment_changed($this->role->id, context_system::instance());
core_course_category::role_assignment_changed($this->role->id, context_system::instance());
}
// Assignable contexts.
+85 -5
View File
@@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for core_role.
*
@@ -20,7 +21,9 @@
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_role\privacy;
defined('MOODLE_INTERNAL') || die();
use \core_privacy\local\metadata\collection;
@@ -28,6 +31,8 @@ use \core_privacy\local\request\contextlist;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\transform;
use \core_privacy\local\request\writer;
use \core_privacy\local\request\userlist;
use \core_privacy\local\request\approved_userlist;
/**
* Privacy provider for core_role.
@@ -39,7 +44,8 @@ class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\subsystem\provider,
\core_privacy\local\request\subsystem\plugin_provider,
\core_privacy\local\request\user_preference_provider {
\core_privacy\local\request\user_preference_provider,
\core_privacy\local\request\core_userlist_provider {
/**
* Get information about the user data stored by this plugin.
@@ -151,6 +157,50 @@ class provider implements
return $contextlist;
}
/**
* Get the list of users within a specific 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) {
if (empty($userlist)) {
return;
}
$context = $userlist->get_context();
// Include users who created or modified role capabilities.
$sql = "SELECT modifierid as userid
FROM {role_capabilities}
WHERE contextid = :contextid";
$params = [
'contextid' => $context->id
];
$userlist->add_from_sql('userid', $sql, $params);
// Include users that have a role assigned to them.
$sql = "SELECT userid
FROM {role_assignments}
WHERE contextid = :contextid";
$userlist->add_from_sql('userid', $sql, $params);
// Include users who created or modified the role assignment.
// Differentiate and exclude special cases where tool_cohortroles adds records through the
// "Assign user roles to cohort" feature into the role_assignments table.
// These records should be separately processed in tool_cohortroles.
$sql = "SELECT modifierid as userid
FROM {role_assignments}
WHERE contextid = :contextid
AND component != 'tool_cohortroles'";
$userlist->add_from_sql('userid', $sql, $params);
}
/**
* Export all user data for the specified user, in the specified contexts.
*
@@ -315,6 +365,32 @@ class provider implements
// Remove data from role_assignments.
$DB->delete_records('role_assignments', ['contextid' => $context->id]);
}
/**
* 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) {
global $DB;
// Don't remove data from role_capabilities.
// Because this data affects the whole Moodle, there are override capabilities.
// Don't belong to the modifier user.
$context = $userlist->get_context();
$userids = $userlist->get_userids();
if (empty($userids)) {
return;
}
list($usersql, $userparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);
$params = ['contextid' => $context->id] + $userparams;
// Remove data from role_assignments.
$DB->delete_records_select('role_assignments',
"contextid = :contextid AND userid {$usersql}", $params);
}
/**
* Delete all user data for this user only.
*
@@ -332,10 +408,14 @@ class provider implements
return;
}
$userid = $contextlist->get_user()->id;
foreach ($contextlist->get_contexts() as $context) {
// Only delete the roles assignments where the user is assigned in all contexts.
$DB->delete_records('role_assignments', ['userid' => $userid, 'contextid' => $context->id]);
}
$contextids = $contextlist->get_contextids();
list($contextsql, $contextparams) = $DB->get_in_or_equal($contextids, SQL_PARAMS_NAMED);
$params = ['userid' => $userid] + $contextparams;
// Only delete the roles assignments where the user is assigned in all contexts.
$DB->delete_records_select('role_assignments',
"userid = :userid AND contextid {$contextsql}", $params);
}
/**
* Delete user entries in role_assignments related to the feature
-1
View File
@@ -54,7 +54,6 @@ if ($return === 'manage') {
// Check access permissions.
$systemcontext = context_system::instance();
require_login();
require_capability('moodle/role:manage', $systemcontext);
admin_externalpage_setup('defineroles', '', array('action' => $action, 'roleid' => $roleid), new moodle_url('/admin/roles/define.php'));
+1 -4
View File
@@ -48,7 +48,6 @@ $defineurl = $CFG->wwwroot . '/' . $CFG->admin . '/roles/define.php';
// Check access permissions.
$systemcontext = context_system::instance();
require_login();
require_capability('moodle/role:manage', $systemcontext);
admin_externalpage_setup('defineroles');
@@ -85,12 +84,10 @@ switch ($action) {
die;
}
if (!delete_role($roleid)) {
// The delete failed, but mark the context dirty in case.
$systemcontext->mark_dirty();
// The delete failed.
print_error('cannotdeleterolewithid', 'error', $baseurl, $roleid);
}
// Deleted a role sitewide...
$systemcontext->mark_dirty();
redirect($baseurl);
break;
+270
View File
@@ -13,6 +13,7 @@
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy test for core_role
*
@@ -21,13 +22,16 @@
* @copyright 2018 Carlos Escobedo <carlos@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
use \core_role\privacy\provider;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\writer;
use \core_privacy\tests\provider_testcase;
use \core_privacy\local\request\transform;
use \tool_cohortroles\api;
use \core_privacy\local\request\approved_userlist;
/**
* Privacy test for core_role
@@ -54,6 +58,7 @@ class core_role_privacy_testcase extends provider_testcase {
$this->assertEquals(get_string('privacy:metadata:preference:showadvanced', 'core_role'),
$prefs->definerole_showadvanced->description);
}
/**
* Check all contexts are returned if there is any user data for this user.
*/
@@ -231,6 +236,7 @@ class core_role_privacy_testcase extends provider_testcase {
}
}
}
/**
* Test for provider::delete_data_for_all_users_in_context().
*/
@@ -316,6 +322,7 @@ class core_role_privacy_testcase extends provider_testcase {
$count = $DB->count_records('role_assignments', ['contextid' => $usercontext2->id]);
$this->assertEquals(0, $count);
}
/**
* Test for provider::delete_data_for_user().
*/
@@ -373,6 +380,7 @@ class core_role_privacy_testcase extends provider_testcase {
$count = $DB->count_records('role_assignments', ['modifierid' => $user->id]);
$this->assertEquals(2, $count);
}
/**
* Export for a user with a key against a script where no instance is specified.
*/
@@ -426,6 +434,7 @@ class core_role_privacy_testcase extends provider_testcase {
$exported = $writer->get_related_data($subcontextteacher, 'cohortroles');
$this->assertEquals($user2->id, reset($exported)->userid);
}
/**
* Test for provider::delete_user_role_to_cohort().
*/
@@ -460,6 +469,267 @@ class core_role_privacy_testcase extends provider_testcase {
$count = $DB->count_records('role_assignments', ['userid' => $user->id, 'component' => 'tool_cohortroles']);
$this->assertEquals(0, $count);
}
/**
* Test that only users within a course context are fetched.
*/
public function test_get_users_in_context() {
global $DB;
$this->resetAfterTest();
$component = 'core_role';
$this->setAdminUser();
$admin = \core_user::get_user_by_username('admin');
// Create user1.
$user1 = $this->getDataGenerator()->create_user();
$usercontext1 = \context_user::instance($user1->id);
// Create user2.
$user2 = $this->getDataGenerator()->create_user();
$usercontext2 = \context_user::instance($user2->id);
// Create course1.
$course1 = $this->getDataGenerator()->create_course();
$coursecontext1 = \context_course::instance($course1->id);
// Create course category.
$coursecat = $this->getDataGenerator()->create_category();
$coursecatcontext = \context_coursecat::instance($coursecat->id);
// Create chat module.
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course1->id]);
$cmcontext = \context_module::instance($cm->cmid);
$systemcontext = \context_system::instance();
// Create a block.
$block = $this->getDataGenerator()->create_block('online_users');
$blockcontext = \context_block::instance($block->id);
$studentrole = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
$managerrole = $DB->get_record('role', array('shortname' => 'manager'), '*', MUST_EXIST);
// Role assignments CONTEXT_COURSE.
role_assign($studentrole->id, $user1->id, $coursecontext1->id);
role_assign($studentrole->id, $user2->id, $coursecontext1->id);
// Role assignments CONTEXT_COURSECAT.
role_assign($studentrole->id, $user2->id, $coursecatcontext->id);
// Role assignments CONTEXT_SYSTEM.
role_assign($studentrole->id, $user1->id, $systemcontext->id);
// Role assignments CONTEXT_MODULE.
role_assign($studentrole->id, $user2->id, $cmcontext->id);
// Role assigments CONTEXT_BLOCK.
role_assign($studentrole->id, $user1->id, $blockcontext->id);
// Role assigments CONTEXT_USER.
role_assign($managerrole->id, $user1->id, $usercontext2->id);
// Role capabilities.
$this->setUser($user1);
assign_capability('moodle/backup:backupcourse', CAP_ALLOW, $studentrole->id, $cmcontext->id);
// The user list for usercontext1 should not return any users.
$userlist1 = new \core_privacy\local\request\userlist($usercontext1, $component);
provider::get_users_in_context($userlist1);
$this->assertCount(0, $userlist1);
// The user list for usercontext2 should user1 and admin (role creator).
$userlist2 = new \core_privacy\local\request\userlist($usercontext2, $component);
provider::get_users_in_context($userlist2);
$this->assertCount(2, $userlist2);
$expected = [
$user1->id,
$admin->id
];
$this->assertEquals($expected, $userlist2->get_userids(), '', 0.0, 10, true);
// The user list for coursecontext1 should user1, user2 and admin (role creator).
$userlist3 = new \core_privacy\local\request\userlist($coursecontext1, $component);
provider::get_users_in_context($userlist3);
$this->assertCount(3, $userlist3);
$expected = [
$user1->id,
$user2->id,
$admin->id
];
$this->assertEquals($expected, $userlist3->get_userids(), '', 0.0, 10, true);
// The user list for coursecatcontext should user2 and admin (role creator).
$userlist4 = new \core_privacy\local\request\userlist($coursecatcontext, $component);
provider::get_users_in_context($userlist4);
$this->assertCount(2, $userlist4);
$expected = [
$user2->id,
$admin->id
];
$this->assertEquals($expected, $userlist4->get_userids(), '', 0.0, 10, true);
// The user list for systemcontext should user1 and admin (role creator).
$userlist6 = new \core_privacy\local\request\userlist($systemcontext, $component);
provider::get_users_in_context($userlist6);
$this->assertCount(2, $userlist6);
$expected = [
$user1->id,
$admin->id
];
$this->assertEquals($expected, $userlist6->get_userids(), '', 0.0, 10, true);
// The user list for cmcontext should user1, user2 and admin (role creator).
$userlist7 = new \core_privacy\local\request\userlist($cmcontext, $component);
provider::get_users_in_context($userlist7);
$this->assertCount(3, $userlist7);
$expected = [
$user1->id,
$user2->id,
$admin->id
];
$this->assertEquals($expected, $userlist7->get_userids(), '', 0.0, 10, true);
// The user list for blockcontext should user1 and admin (role creator).
$userlist8 = new \core_privacy\local\request\userlist($blockcontext, $component);
provider::get_users_in_context($userlist8);
$this->assertCount(2, $userlist8);
$expected = [
$user1->id,
$admin->id
];
$this->assertEquals($expected, $userlist8->get_userids(), '', 0.0, 10, true);
}
/**
* Test that data for users in approved userlist is deleted.
*/
public function test_delete_data_for_users() {
global $DB;
$this->resetAfterTest();
$component = 'core_role';
$this->setAdminUser();
$admin = \core_user::get_user_by_username('admin');
// Create user1.
$user1 = $this->getDataGenerator()->create_user();
// Create user2.
$user2 = $this->getDataGenerator()->create_user();
$usercontext2 = \context_user::instance($user2->id);
// Create course1.
$course1 = $this->getDataGenerator()->create_course();
$coursecontext1 = \context_course::instance($course1->id);
// Create course category.
$coursecat = $this->getDataGenerator()->create_category();
$coursecatcontext = \context_coursecat::instance($coursecat->id);
// Create chat module.
$cm = $this->getDataGenerator()->create_module('chat', ['course' => $course1->id]);
$cmcontext = \context_module::instance($cm->cmid);
$systemcontext = \context_system::instance();
// Create a block.
$block = $this->getDataGenerator()->create_block('online_users');
$blockcontext = \context_block::instance($block->id);
$studentrole = $DB->get_record('role', array('shortname' => 'student'), '*', MUST_EXIST);
$managerrole = $DB->get_record('role', array('shortname' => 'manager'), '*', MUST_EXIST);
// Role assignments CONTEXT_COURSE.
role_assign($studentrole->id, $user1->id, $coursecontext1->id);
role_assign($studentrole->id, $user2->id, $coursecontext1->id);
// Role assignments CONTEXT_COURSECAT.
role_assign($studentrole->id, $user2->id, $coursecatcontext->id);
// Role assignments CONTEXT_SYSTEM.
role_assign($studentrole->id, $user1->id, $systemcontext->id);
// Role assignments CONTEXT_MODULE.
role_assign($studentrole->id, $user2->id, $cmcontext->id);
// Role assigments CONTEXT_BLOCK.
role_assign($studentrole->id, $user1->id, $blockcontext->id);
// Role assigments CONTEXT_USER.
role_assign($managerrole->id, $user1->id, $usercontext2->id);
// Role capabilities.
$this->setUser($user1);
assign_capability('moodle/backup:backupcourse', CAP_ALLOW, $studentrole->id, $cmcontext->id);
// The user list for usercontext2 should user1 and admin (role creator).
$userlist1 = new \core_privacy\local\request\userlist($usercontext2, $component);
provider::get_users_in_context($userlist1);
$this->assertCount(2, $userlist1);
// The user list for coursecontext1 should user1, user2 and admin (role creator).
$userlist2 = new \core_privacy\local\request\userlist($coursecontext1, $component);
provider::get_users_in_context($userlist2);
$this->assertCount(3, $userlist2);
// The user list for coursecatcontext should user2 and admin (role creator).
$userlist3 = new \core_privacy\local\request\userlist($coursecatcontext, $component);
provider::get_users_in_context($userlist3);
$this->assertCount(2, $userlist3);
// The user list for systemcontext should user1 and admin (role creator).
$userlist4 = new \core_privacy\local\request\userlist($systemcontext, $component);
provider::get_users_in_context($userlist4);
$this->assertCount(2, $userlist4);
// The user list for cmcontext should user1, user2 and admin (role creator).
$userlist5 = new \core_privacy\local\request\userlist($cmcontext, $component);
provider::get_users_in_context($userlist5);
$this->assertCount(3, $userlist5);
// The user list for blockcontext should user1 and admin (role creator).
$userlist6 = new \core_privacy\local\request\userlist($blockcontext, $component);
provider::get_users_in_context($userlist6);
$this->assertCount(2, $userlist6);
// Convert $userlist1 into an approved_contextlist.
$approvedlist1 = new approved_userlist($usercontext2, $component, $userlist1->get_userids());
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist1);
// Re-fetch users in usercontext2.
$userlist1 = new \core_privacy\local\request\userlist($usercontext2, $component);
provider::get_users_in_context($userlist1);
$this->assertCount(0, $userlist1);
// Convert $userlist2 into an approved_contextlist.
$approvedlist2 = new approved_userlist($coursecontext1, $component, $userlist2->get_userids());
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist2);
// Re-fetch users in coursecontext1.
$userlist2 = new \core_privacy\local\request\userlist($coursecontext1, $component);
provider::get_users_in_context($userlist2);
$this->assertCount(0, $userlist2);
// Convert $userlist3 into an approved_contextlist.
$approvedlist3 = new approved_userlist($coursecatcontext, $component, $userlist3->get_userids());
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist3);
// Re-fetch users in coursecatcontext.
$userlist3 = new \core_privacy\local\request\userlist($coursecatcontext, $component);
provider::get_users_in_context($userlist3);
$this->assertCount(0, $userlist3);
// Convert $userlist4 into an approved_contextlist.
$approvedlist4 = new approved_userlist($systemcontext, $component, $userlist4->get_userids());
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist4);
// Re-fetch users in systemcontext.
$userlist4 = new \core_privacy\local\request\userlist($systemcontext, $component);
provider::get_users_in_context($userlist4);
// The data from role_capabilities should still be present. The user list should return the admin user.
$this->assertCount(1, $userlist4);
$expected = [$admin->id];
$this->assertEquals($expected, $userlist4->get_userids());
// Convert $userlist5 into an approved_contextlist.
$approvedlist5 = new approved_userlist($cmcontext, $component, $userlist5->get_userids());
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist5);
// Re-fetch users in cmcontext.
$userlist5 = new \core_privacy\local\request\userlist($cmcontext, $component);
provider::get_users_in_context($userlist5);
// The data from role_capabilities should still be present. The user list should return user1.
$this->assertCount(1, $userlist5);
$expected = [$user1->id];
$this->assertEquals($expected, $userlist5->get_userids());
// Convert $userlist6 into an approved_contextlist.
$approvedlist6 = new approved_userlist($blockcontext, $component, $userlist6->get_userids());
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist6);
// Re-fetch users in blockcontext.
$userlist6 = new \core_privacy\local\request\userlist($blockcontext, $component);
provider::get_users_in_context($userlist6);
$this->assertCount(0, $userlist6);
}
/**
* Supoort function to get all the localised roles name
* in a simple array for testing.
+111 -84
View File
@@ -28,113 +28,139 @@ admin_externalpage_setup('searchareas');
$areaid = optional_param('areaid', null, PARAM_ALPHAEXT);
$action = optional_param('action', null, PARAM_ALPHA);
$indexingenabled = \core_search\manager::is_indexing_enabled(); // This restricts many of the actions on this page.
// Get a search manager instance, which we'll need for display and to handle some actions.
try {
$searchmanager = \core_search\manager::instance();
} catch (core_search\engine_exception $searchmanagererror) {
// Continue, we return an error later depending on the requested action.
// In action cases, we'll throw this exception below. In non-action cases, we produce a lang string error.
}
// Handle all the actions.
if ($action) {
// If dealing with an areaid, we need to check that the area exists.
if ($areaid) {
// We need to check that the area exists.
$area = \core_search\manager::get_search_area($areaid);
if ($area === false) {
throw new moodle_exception('invalidrequest');
}
}
if ($action !== 'enable' && $action !== 'disable') {
// All actions but enable/disable need the search engine to be ready.
if (!empty($searchmanagererror)) {
throw $searchmanagererror;
}
// All the indexing actions.
if (in_array($action, ['delete', 'indexall', 'reindexall', 'deleteall'])) {
// Show confirm prompt for all these actions as they may be inadvisable, or may cause
// an interruption in search functionality, on production systems.
if (!optional_param('confirm', 0, PARAM_INT)) {
// Display confirmation prompt.
$a = null;
if ($areaid) {
$a = html_writer::tag('strong', $area->get_visible_name());
// All of these actions require that indexing is enabled.
if ($indexingenabled) {
// For all of these actions, we strictly need a manager instance.
if (isset($searchmanagererror)) {
throw $searchmanagererror;
}
$actionparams = ['sesskey' => sesskey(), 'action' => $action, 'confirm' => 1];
if ($areaid) {
$actionparams['areaid'] = $areaid;
}
$actionurl = new moodle_url('/admin/searchareas.php', $actionparams);
$cancelurl = new moodle_url('/admin/searchareas.php');
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('confirm_' . $action, 'search', $a),
// Show confirm prompt for all these actions as they may be inadvisable, or may cause
// an interruption in search functionality, on production systems.
if (!optional_param('confirm', 0, PARAM_INT)) {
// Display confirmation prompt.
$a = null;
if ($areaid) {
$a = html_writer::tag('strong', $area->get_visible_name());
}
$actionparams = ['sesskey' => sesskey(), 'action' => $action, 'confirm' => 1];
if ($areaid) {
$actionparams['areaid'] = $areaid;
}
$actionurl = new moodle_url('/admin/searchareas.php', $actionparams);
$cancelurl = new moodle_url('/admin/searchareas.php');
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('confirm_' . $action, 'search', $a),
new single_button($actionurl, get_string('continue'), 'post', true),
new single_button($cancelurl, get_string('cancel'), 'get'));
echo $OUTPUT->footer();
exit;
echo $OUTPUT->footer();
exit;
} else {
// Confirmed, so run the required action.
require_sesskey();
switch ($action) {
case 'delete':
$searchmanager->delete_index($areaid);
\core\notification::success(get_string('searchindexdeleted', 'admin'));
break;
case 'indexall':
$searchmanager->index();
\core\notification::success(get_string('searchindexupdated', 'admin'));
break;
case 'reindexall':
$searchmanager->index(true);
\core\notification::success(get_string('searchreindexed', 'admin'));
break;
case 'deleteall':
$searchmanager->delete_index();
\core\notification::success(get_string('searchalldeleted', 'admin'));
break;
default:
break;
}
// Redirect back to the main page after taking action.
redirect(new moodle_url('/admin/searchareas.php'));
}
}
} else if (in_array($action, ['enable', 'disable'])) {
// Toggling search areas requires no confirmation.
require_sesskey();
switch ($action) {
case 'enable':
$area->set_enabled(true);
\core\notification::success(get_string('searchareaenabled', 'admin'));
break;
case 'disable':
$area->set_enabled(false);
core\notification::success(get_string('searchareadisabled', 'admin'));
break;
default:
break;
}
redirect(new moodle_url('/admin/searchareas.php'));
} else {
// Invalid action.
throw new moodle_exception('invalidaction');
}
}
// We are now taking an actual action, so require sesskey.
require_sesskey();
switch ($action) {
case 'enable':
$area->set_enabled(true);
\core\notification::add(get_string('searchareaenabled', 'admin'), \core\output\notification::NOTIFY_SUCCESS);
break;
case 'disable':
$area->set_enabled(false);
\core\notification::add(get_string('searchareadisabled', 'admin'), \core\output\notification::NOTIFY_SUCCESS);
break;
case 'delete':
$search = \core_search\manager::instance();
$search->delete_index($areaid);
\core\notification::add(get_string('searchindexdeleted', 'admin'), \core\output\notification::NOTIFY_SUCCESS);
break;
case 'indexall':
$searchmanager->index();
\core\notification::add(get_string('searchindexupdated', 'admin'), \core\output\notification::NOTIFY_SUCCESS);
break;
case 'reindexall':
$searchmanager->index(true);
\core\notification::add(get_string('searchreindexed', 'admin'), \core\output\notification::NOTIFY_SUCCESS);
break;
case 'deleteall':
$searchmanager->delete_index();
\core\notification::add(get_string('searchalldeleted', 'admin'), \core\output\notification::NOTIFY_SUCCESS);
break;
default:
throw new moodle_exception('invalidaction');
break;
}
// Redirect back to the main page after taking action.
redirect(new moodle_url('/admin/searchareas.php'));
// Display.
if (isset($searchmanager) && $indexingenabled) {
\core\notification::info(get_string('indexinginfo', 'admin'));
} else if (isset($searchmanager)) {
$params = (object) [
'url' => (new moodle_url("/admin/settings.php?section=manageglobalsearch#admin-searchindexwhendisabled"))->out(false)
];
\core\notification::error(get_string('indexwhendisabledfullnotice', 'search', $params));
} else {
// In non-action cases, init errors are translated and displayed to the user as error notifications.
$errorstr = get_string($searchmanagererror->errorcode, $searchmanagererror->module, $searchmanagererror->a);
\core\notification::error($errorstr);
}
echo $OUTPUT->header();
$searchareas = \core_search\manager::get_search_areas_list();
if (empty($searchmanagererror)) {
$areasconfig = $searchmanager->get_areas_config($searchareas);
} else {
$areasconfig = false;
}
if (!empty($searchmanagererror)) {
$errorstr = get_string($searchmanagererror->errorcode, $searchmanagererror->module, $searchmanagererror->a);
echo $OUTPUT->notification($errorstr, \core\output\notification::NOTIFY_ERROR);
} else {
echo $OUTPUT->notification(get_string('indexinginfo', 'admin'), \core\output\notification::NOTIFY_INFO);
}
$table = new html_table();
$table->id = 'core-search-areas';
$table->head = [
get_string('searcharea', 'search'),
get_string('enable'),
get_string('newestdocindexed', 'admin'),
get_string('searchlastrun', 'admin'),
get_string('searchindexactions', 'admin')
];
$table->head = array(get_string('searcharea', 'search'), get_string('enable'), get_string('newestdocindexed', 'admin'),
get_string('searchlastrun', 'admin'), get_string('searchindexactions', 'admin'));
$searchareas = \core_search\manager::get_search_areas_list();
$areasconfig = isset($searchmanager) ? $searchmanager->get_areas_config($searchareas) : false;
foreach ($searchareas as $area) {
$areaid = $area->get_area_id();
$columns = array(new html_table_cell($area->get_visible_name()));
@@ -144,7 +170,7 @@ foreach ($searchareas as $area) {
new pix_icon('t/hide', get_string('disable'), 'moodle', array('title' => '', 'class' => 'iconsmall')),
null, array('title' => get_string('disable')));
if ($areasconfig) {
if ($areasconfig && $indexingenabled) {
$columns[] = $areasconfig[$areaid]->lastindexrun;
if ($areasconfig[$areaid]->indexingstart) {
@@ -173,7 +199,11 @@ foreach ($searchareas as $area) {
$columns[] = html_writer::alist($actions, ['class' => 'unstyled list-unstyled']);
} else {
$blankrow = new html_table_cell(get_string('searchnotavailable', 'admin'));
if (!$areasconfig) {
$blankrow = new html_table_cell(get_string('searchnotavailable', 'admin'));
} else {
$blankrow = new html_table_cell(get_string('indexwhendisabledshortnotice', 'search'));
}
$blankrow->colspan = 3;
$columns[] = $blankrow;
}
@@ -192,10 +222,7 @@ foreach ($searchareas as $area) {
}
// Cross-search area tasks.
$options = array();
if (!empty($searchmanagererror)) {
$options['disabled'] = true;
}
$options = (isset($searchmanager) && $indexingenabled) ? [] : ['disabled' => true];
echo $OUTPUT->box_start('search-areas-actions');
echo $OUTPUT->single_button(admin_searcharea_action_url('indexall'), get_string('searchupdateindex', 'admin'), 'get', $options);
echo $OUTPUT->single_button(admin_searcharea_action_url('reindexall'), get_string('searchreindexindex', 'admin'), 'get', $options);
@@ -204,7 +231,7 @@ echo $OUTPUT->box_end();
echo html_writer::table($table);
if (empty($searchmanagererror)) {
if (isset($searchmanager)) {
// Show information about queued index requests for specific contexts.
$searchrenderer = $PAGE->get_renderer('core_search');
echo $searchrenderer->render_index_requests_info($searchmanager->get_index_requests_info());
+2 -1
View File
@@ -38,7 +38,8 @@ if (!($settingspage->check_access())) {
$statusmsg = '';
$errormsg = '';
if ($data = data_submitted() and confirm_sesskey()) {
// Form is submitted with changed settings. Do not want to execute when modifying a block.
if ($data = data_submitted() and confirm_sesskey() and isset($data->action) and $data->action == 'save-settings') {
$count = admin_write_settings($data);
// Regardless of whether any setting change was written (a positive count), check validation errors for those that didn't.
+2 -2
View File
@@ -37,8 +37,8 @@ if ($hassiteconfig) {
$predictors[$fullclassname] = new lang_string('pluginname', $pluginname);
}
$settings->add(new \core_analytics\admin_setting_predictor('analytics/predictionsprocessor',
new lang_string('predictionsprocessor', 'analytics'), new lang_string('predictionsprocessor_help', 'analytics'),
'\mlbackend_php\processor', $predictors)
new lang_string('defaultpredictionsprocessor', 'analytics'), new lang_string('predictionsprocessor_help', 'analytics'),
\core_analytics\manager::default_mlbackend(), $predictors)
);
// Log store.
+10 -4
View File
@@ -32,9 +32,9 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) { // sp
'customusermenuitems',
new lang_string('customusermenuitems', 'admin'),
new lang_string('configcustomusermenuitems', 'admin'),
'grades,grades|/grade/report/mygrades.php|grades
messages,message|/message/index.php|message
preferences,moodle|/user/preferences.php|preferences',
'grades,grades|/grade/report/mygrades.php|t/grades
messages,message|/message/index.php|t/message
preferences,moodle|/user/preferences.php|t/preferences',
PARAM_RAW,
'50',
'10'
@@ -218,6 +218,9 @@ preferences,moodle|/user/preferences.php|preferences',
// coursecontact is the person responsible for course - usually manages enrolments, receives notification, etc.
$temp = new admin_settingpage('coursecontact', new lang_string('courses'));
$temp->add(new admin_setting_special_coursecontact());
$temp->add(new admin_setting_configcheckbox('coursecontactduplicates',
new lang_string('coursecontactduplicates', 'admin'),
new lang_string('coursecontactduplicates_desc', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('courselistshortnames',
new lang_string('courselistshortnames', 'admin'),
new lang_string('courselistshortnames_desc', 'admin'), 0));
@@ -227,6 +230,10 @@ preferences,moodle|/user/preferences.php|preferences',
new lang_string('configcourseoverviewfileslimit', 'admin'), 1, PARAM_INT));
$temp->add(new admin_setting_configtext('courseoverviewfilesext', new lang_string('courseoverviewfilesext'),
new lang_string('configcourseoverviewfilesext', 'admin'), '.jpg,.gif,.png'));
$temp->add(new admin_setting_configtext('coursegraceperiodbefore', new lang_string('coursegraceperiodbefore', 'admin'),
new lang_string('configcoursegraceperiodbefore', 'admin'), 0, PARAM_INT));
$temp->add(new admin_setting_configtext('coursegraceperiodafter', new lang_string('coursegraceperiodafter', 'admin'),
new lang_string('configcoursegraceperiodafter', 'admin'), 0, PARAM_INT));
$ADMIN->add('appearance', $temp);
$temp = new admin_settingpage('ajax', new lang_string('ajaxuse'));
@@ -252,4 +259,3 @@ preferences,moodle|/user/preferences.php|preferences',
$ADMIN->add('appearance', $temp);
} // end of speedup
+6 -1
View File
@@ -43,6 +43,12 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
array('moodle/category:manage')
)
);
$ADMIN->add('courses',
new admin_externalpage('addnewcourse', new lang_string('addnewcourse'),
new moodle_url('/course/edit.php', array('category' => 0)),
array('moodle/category:manage')
)
);
$ADMIN->add('courses',
new admin_externalpage('restorecourse', new lang_string('restorecourse', 'admin'),
new moodle_url('/backup/restorefile.php', array('contextid' => context_system::instance()->id)),
@@ -149,7 +155,6 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
$ADMIN->add('courses', $temp);
// "courserequests" settingpage.
$temp = new admin_settingpage('courserequest', new lang_string('courserequest'));
$temp->add(new admin_setting_configcheckbox('enablecourserequests', new lang_string('enablecourserequests', 'admin'), new lang_string('configenablecourserequests', 'admin'), 0));
+12 -1
View File
@@ -16,6 +16,16 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$temp->add(new admin_setting_configexecutable('pathtosassc', new lang_string('pathtosassc', 'admin'), new lang_string('pathtosassc_help', 'admin'), ''));
$temp->add(new admin_setting_configcheckbox('contextlocking', new lang_string('contextlocking', 'core_admin'),
new lang_string('contextlocking_desc', 'core_admin'), 0));
$temp->add(new admin_setting_configcheckbox(
'contextlockappliestoadmin',
new lang_string('contextlockappliestoadmin', 'core_admin'),
new lang_string('contextlockappliestoadmin_desc', 'core_admin'),
1
));
$temp->add(new admin_setting_configcheckbox('forceclean', new lang_string('forceclean', 'core_admin'),
new lang_string('forceclean_desc', 'core_admin'), 0));
@@ -83,7 +93,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$ADMIN->add('development', new admin_externalpage('mnettestclient', new lang_string('testclient', 'mnet'), "$CFG->wwwroot/$CFG->admin/mnet/testclient.php"));
}
$ADMIN->add('development', new admin_externalpage('purgecaches', new lang_string('purgecaches','admin'), "$CFG->wwwroot/$CFG->admin/purgecaches.php"));
$ADMIN->add('development', new admin_externalpage('purgecaches', new lang_string('purgecachespage', 'admin'),
"$CFG->wwwroot/$CFG->admin/purgecaches.php"));
$ADMIN->add('development', new admin_externalpage('thirdpartylibs', new lang_string('thirdpartylibs','admin'), "$CFG->wwwroot/$CFG->admin/thirdpartylibs.php"));
} // end of speedup
+53
View File
@@ -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/>.
/**
* This file gives information about Moodle Services
*
* @package core
* @copyright 2018 Amaia Anabitarte <amaia@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
if ($hassiteconfig) {
// Create Moodle Services information.
$moodleservices->add(new admin_setting_heading('moodleservicesintro', '',
new lang_string('moodleservices_help', 'admin')));
// Moodle Partners information.
if (empty($CFG->disableserviceads_partner)) {
$moodleservices->add(new admin_setting_heading('moodlepartners',
new lang_string('moodlepartners', 'admin'),
new lang_string('moodlepartners_help', 'admin')));
}
// Moodle app information.
$moodleservices->add(new admin_setting_heading('moodleapp',
new lang_string('moodleapp', 'admin'),
new lang_string('moodleapp_help', 'admin')));
// Branded Moodle app information.
if (empty($CFG->disableserviceads_branded)) {
$moodleservices->add(new admin_setting_heading('moodlebrandedapp',
new lang_string('moodlebrandedapp', 'admin'),
new lang_string('moodlebrandedapp_help', 'admin')));
}
}
+2 -1
View File
@@ -7,7 +7,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// "systempaths" settingpage
$temp = new admin_settingpage('systempaths', new lang_string('systempaths','admin'));
$temp->add(new admin_setting_configexecutable('pathtophp', new lang_string('pathtophp', 'admin'),
new lang_string('configpathtophp', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('pathtodu', new lang_string('pathtodu', 'admin'), new lang_string('configpathtodu', 'admin'), ''));
$temp->add(new admin_setting_configexecutable('aspellpath', new lang_string('aspellpath', 'admin'), new lang_string('edhelpaspellpath'), ''));
$temp->add(new admin_setting_configexecutable('pathtodot', new lang_string('pathtodot', 'admin'), new lang_string('pathtodot_help', 'admin'), ''));
+5 -1
View File
@@ -15,7 +15,11 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$optionalsubsystems->add(new admin_setting_configcheckbox('messaging', new lang_string('messaging', 'admin'), new lang_string('configmessaging','admin'), 1));
$optionalsubsystems->add(new admin_setting_configcheckbox('messaginghidereadnotifications', new lang_string('messaginghidereadnotifications', 'admin'), new lang_string('configmessaginghidereadnotifications','admin'), 0));
$optionalsubsystems->add(new admin_setting_configcheckbox('messagingallusers',
new lang_string('messagingallusers', 'admin'),
new lang_string('configmessagingallusers', 'admin'),
0)
);
$options = array(DAYSECS=>new lang_string('secondstotime86400'), WEEKSECS=>new lang_string('secondstotime604800'), 2620800=>new lang_string('nummonths', 'moodle', 1), 15724800=>new lang_string('nummonths', 'moodle', 6),0=>new lang_string('never'));
$optionalsubsystems->add(new admin_setting_configselect('messagingdeletereadnotificationsdelay', new lang_string('messagingdeletereadnotificationsdelay', 'admin'), new lang_string('configmessagingdeletereadnotificationsdelay', 'admin'), 604800, $options));
+5
View File
@@ -15,6 +15,11 @@ $ADMIN->add('root', new admin_externalpage('registrationmoodleorg', new lang_str
// hidden upgrade script
$ADMIN->add('root', new admin_externalpage('upgradesettings', new lang_string('upgradesettings', 'admin'), "$CFG->wwwroot/$CFG->admin/upgradesettings.php", 'moodle/site:config', true));
// Adding Moodle Services information page.
$moodleservices = new admin_settingpage('moodleservices', new lang_string('moodleservices',
'admin'));
$ADMIN->add('root', $moodleservices);
if ($hassiteconfig) {
$optionalsubsystems = new admin_settingpage('optionalsubsystems', new lang_string('advancedfeatures', 'admin'));
$ADMIN->add('root', $optionalsubsystems);
@@ -0,0 +1,45 @@
{{!
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/>.
}}
{{!
@template core_admin/setting_description
Admin setting description template.
Context variables required for this template:
* labelfor - id of the form element
* title - Setting title
* name - Setting name
Example context (json):
{
"title": "Setting title",
"name": "Name",
"description": "Description goes here"
}
}}
{{!
Setting description.
}}
<div class="form-item form-horizontal clearfix">
<div class="form-label">
<label>
{{{title}}}
</label>
<span class="form-shortname ">{{{name}}}</span>
</div>
<div class="controls felement fstatic">{{{description}}}</div>
</div>
+1
View File
@@ -40,6 +40,7 @@
<div class="settingsform clearfix">
{{#params}}
<input type="hidden" name="{{name}}" value="{{value}}">
<input type="hidden" name="action" value="save-settings">
{{/params}}
<input type="hidden" name="sesskey" value="{{sesskey}}">
<input type="hidden" name="return" value="{{return}}">
@@ -22,7 +22,7 @@
Context variables required for this template:
* actionurl - Url to post to
* hasresults - True if there are results
* results - List of results containing url, title, settings (array of raw html)
* results - List of results containing url, title, path (array of strings), settings (array of raw html)
* showsave - Show save buttons
Example context (json):
@@ -30,7 +30,7 @@
"actionurl": "/",
"hasresults": true,
"results": [
{ "url": "/", "title": "Match!", "settings": [ "blah blah blah" ] }
{ "url": "/", "title": "Match!", "path": ["Administration", "Match!"], "settings": [ "blah blah blah" ] }
]
}
}}
@@ -41,9 +41,15 @@
</div>
<fieldset>
<div class="clearer"></div>
<h2 class="main">{{#str}}searchresults, admin{{/str}}</h2>
{{#hasresults}}
{{#results}}
<h2 class="main">{{#str}}searchresults, admin{{/str}} - <a href="{{url}}">{{{title}}}</a></h2>
<h3 class="adminpagetitle"><a href="{{url}}">{{{title}}}</a></h3>
<ul class="adminpagepath" aria-label="{{#str}} pagepath, core {{/str}}">
{{#path}}
<li>{{.}}</li>
{{/path}}
</ul>
<fieldset class="adminsettings">
{{#settings}}
<div class="clearer"></div>
@@ -10,7 +10,7 @@ Feature: Enable multiple accounts to have the same email address
Scenario: Enable registration of multiple accounts with the same email address
Given the following config values are set as admin:
| allowaccountssameemail | 1 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
When I navigate to "Users > Accounts > Add a new user" in site administration
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
@@ -35,7 +35,7 @@ Feature: Enable multiple accounts to have the same email address
Scenario: Disable registration of multiple accounts with the same email address
Given the following config values are set as admin:
| allowaccountssameemail | 0 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts"
When I navigate to "Users > Accounts > Add a new user" in site administration
And I set the following fields to these values:
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
+17
View File
@@ -65,3 +65,20 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
And I should not see "User Two"
And I should not see "User Three"
And I should not see "User Four"
Scenario: Filter user accounts by enrolled in any course
When I set the following fields to these values:
| id_anycourses | Yes |
And I press "Add filter"
Then I should see "User One"
And I should see "User Two"
And I should see "User Three"
And I should not see "User Four"
And I press "Remove all filters"
And I set the following fields to these values:
| id_anycourses | No |
And I press "Add filter"
And I should not see "User One"
And I should not see "User Two"
And I should not see "User Three"
And I should see "User Four"
+34
View File
@@ -0,0 +1,34 @@
@core @core_admin
Feature: Purge caches
In order to see changes to cached data
As a Moodle administrator
I want manually purge different data and file caches
Background:
Given I log in as "admin"
And I navigate to "Development > Purge caches" in site administration
Scenario: Purge all caches
Given I should not see "All caches were purged"
When I press "Purge all caches"
Then I should see "All caches were purged"
Scenario: Purge selected caches
Given I should not see "Selected caches were purged"
When I set the field "Themes" to "1"
And I press "Purge selected caches"
Then I should see "The selected caches were purged"
Scenario: Purge selected caches without selecting any caches
Given I should not see "Select one or more caches to purge"
When I press "Purge selected caches"
Then I should not see "The selected caches were purged"
And I should see "Select one or more caches to purge"
Scenario: Redirect back to the original page after following a Purge all caches link
Given I am on site homepage
And I should see "Available courses"
And I should not see "All caches were purged"
When I follow "Purge all caches"
Then I should see "All caches were purged"
And I should see "Available courses"
@@ -72,6 +72,22 @@ class edit_model extends \moodleform {
$mform->addElement('select', 'timesplitting', get_string('timesplittingmethod', 'analytics'), $timesplittings);
$mform->addHelpButton('timesplitting', 'timesplittingmethod', 'analytics');
$defaultprocessor = \core_analytics\manager::get_predictions_processor_name(
\core_analytics\manager::get_predictions_processor()
);
$predictionprocessors = ['' => get_string('defaultpredictoroption', 'analytics', $defaultprocessor)];
foreach ($this->_customdata['predictionprocessors'] as $classname => $predictionsprocessor) {
if ($predictionsprocessor->is_ready() !== true) {
continue;
}
$optionname = \tool_analytics\output\helper::class_to_option($classname);
$predictionprocessors[$optionname] = \core_analytics\manager::get_predictions_processor_name($predictionsprocessor);
}
$mform->addElement('select', 'predictionsprocessor', get_string('predictionsprocessor', 'analytics'),
$predictionprocessors);
$mform->addHelpButton('predictionsprocessor', 'predictionsprocessor', 'analytics');
$mform->addElement('hidden', 'id', $this->_customdata['id']);
$mform->setType('id', PARAM_INT);
+5 -2
View File
@@ -110,7 +110,8 @@ switch ($action) {
'id' => $model->get_id(),
'model' => $model,
'indicators' => $model->get_potential_indicators(),
'timesplittings' => \core_analytics\manager::get_enabled_time_splitting_methods()
'timesplittings' => \core_analytics\manager::get_enabled_time_splitting_methods(),
'predictionprocessors' => \core_analytics\manager::get_all_prediction_processors()
);
$mform = new \tool_analytics\output\form\edit_model(null, $customdata);
@@ -126,7 +127,8 @@ switch ($action) {
$indicators[] = \core_analytics\manager::get_indicator($indicatorclass);
}
$timesplitting = \tool_analytics\output\helper::option_to_class($data->timesplitting);
$model->update($data->enabled, $indicators, $timesplitting);
$predictionsprocessor = \tool_analytics\output\helper::option_to_class($data->predictionsprocessor);
$model->update($data->enabled, $indicators, $timesplitting, $predictionsprocessor);
redirect(new \moodle_url('/admin/tool/analytics/index.php'));
}
@@ -137,6 +139,7 @@ switch ($action) {
$callable = array('\tool_analytics\output\helper', 'class_to_option');
$modelobj->indicators = array_map($callable, json_decode($modelobj->indicators));
$modelobj->timesplitting = \tool_analytics\output\helper::class_to_option($modelobj->timesplitting);
$modelobj->predictionsprocessor = \tool_analytics\output\helper::class_to_option($modelobj->predictionsprocessor);
$mform->set_data($modelobj);
$mform->display();
break;
@@ -1,72 +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/>.
/**
* Script to show all the assignments that have not been upgraded after the main upgrade.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true);
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
require_sesskey();
// This calls require_login and checks moodle/site:config.
admin_externalpage_setup('assignmentupgrade', '', array(), tool_assignmentupgrade_url('batchupgrade'));
$PAGE->set_pagelayout('maintenance');
$PAGE->navbar->add(get_string('batchupgrade', 'tool_assignmentupgrade'));
$renderer = $PAGE->get_renderer('tool_assignmentupgrade');
$confirm = required_param('confirm', PARAM_BOOL);
if (!$confirm) {
print_error('invalidrequest');
die();
}
raise_memory_limit(MEMORY_EXTRA);
// Release session.
\core\session\manager::write_close();
echo $renderer->header();
echo $renderer->heading(get_string('batchupgrade', 'tool_assignmentupgrade'));
$current = 0;
if (optional_param('upgradeall', false, PARAM_BOOL)) {
$assignmentids = tool_assignmentupgrade_load_all_upgradable_assignmentids();
} else {
$assignmentids = explode(',', optional_param('selected', '', PARAM_TEXT));
}
$total = count($assignmentids);
foreach ($assignmentids as $assignmentid) {
list($summary, $success, $log) = tool_assignmentupgrade_upgrade_assignment($assignmentid);
$current += 1;
$params = array('current'=>$current, 'total'=>$total);
echo $renderer->heading(get_string('upgradeprogress', 'tool_assignmentupgrade', $params), 3);
echo $renderer->convert_assignment_result($summary, $success, $log);
}
echo $renderer->continue_button(tool_assignmentupgrade_url('listnotupgraded'));
echo $renderer->footer();
@@ -1,73 +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/>.
/**
* Privacy Subsystem implementation for tool_assignmentupgrade.
*
* @package tool_assignmentupgrade
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_assignmentupgrade\privacy;
use core_privacy\local\metadata\collection;
use core_privacy\local\request\writer;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for tool_assignmentupgrade implementing metadata, plugin, and user_preference providers.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @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\user_preference_provider {
/**
* Returns meta data about this system.
*
* @param collection $collection The initialised collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $collection) : collection {
$collection->add_user_preference(
'tool_assignmentupgrade_perpage',
'privacy:metadata:preference:perpage'
);
return $collection;
}
/**
* Export all user preferences for the plugin.
*
* @param int $userid The userid of the user whose data is to be exported.
*/
public static function export_user_preferences(int $userid) {
$perpage = get_user_preferences('tool_assignmentupgrade_perpage', null, $userid);
if ($perpage !== null) {
writer::export_user_preference(
'tool_assignmentupgrade',
'perpage',
$perpage,
get_string('privacy:metadata:preference:perpage', 'tool_assignmentupgrade')
);
}
}
}
-50
View File
@@ -1,50 +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/>.
/**
* This tool can upgrade old assignment activities to the new assignment activity type
*
* The upgrade can be done on any old assignment instance providing it is using one of the core
* assignment subtypes (online text, single upload, etc).
* The new assignment module was introduced in Moodle 2.3 and although it completely reproduces
* the features of the existing assignment type it wasn't designed to replace it entirely as there
* are many custom assignment types people use and it wouldn't be practical to try to convert them.
* Instead the existing assignment type will be left in core and people will be encouraged to
* use the new assignment type.
*
* This screen is the main entry-point to the plugin, it gives the admin a list
* of options available to them.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
// This calls require_login and checks moodle/site:config.
admin_externalpage_setup('assignmentupgrade');
$renderer = $PAGE->get_renderer('tool_assignmentupgrade');
$actions = array();
$header = get_string('pluginname', 'tool_assignmentupgrade');
$actions[] = tool_assignmentupgrade_action::make('listnotupgraded');
echo $renderer->index_page($header, $actions);
@@ -1,61 +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/>.
/**
* Strings for the assignment upgrade tool
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['areyousure'] = 'Are you sure?';
$string['areyousuremessage'] = 'Are you sure you want to upgrade the assignment "{$a->name}"?';
$string['assignmentid'] = 'Assignment ID';
$string['assignmentnotfound'] = 'Assignment could not be found (id={$a})';
$string['assignmentsperpage'] = 'Assignments per page';
$string['assignmenttype'] = 'Assignment type';
$string['backtoindex'] = 'Back to index';
$string['batchoperations'] = 'Batch operations';
$string['batchupgrade'] = 'Upgrade multiple assignments';
$string['confirmbatchupgrade'] = 'Confirm batch upgrade assignments';
$string['conversioncomplete'] = 'Assignment converted';
$string['conversionfailed'] = 'The assignment conversion was not successful. The log from the upgrade was: <br />{$a}';
$string['listnotupgraded'] = 'List assignments that have not been upgraded';
$string['listnotupgraded_desc'] = 'You can upgrade individual assignments from here';
$string['noassignmentsselected'] = 'No assignments selected';
$string['noassignmentstoupgrade'] = 'There are no assignments that require upgrading';
$string['notsupported'] = '';
$string['notupgradedintro'] = 'This page lists the assignments created with an older version of Moodle that have not been upgraded to the new assignment module in Moodle 2.3. Not all assignments can be upgraded - if they were created with a custom assignment subtype, then that subtype will need to be upgraded to the new assignment plugin format in order to complete the upgrade.';
$string['notupgradedtitle'] = 'Assignments not upgraded';
$string['pluginname'] = 'Assignment upgrade helper';
$string['select'] = 'Select';
$string['submissions'] = 'Submissions';
$string['supported'] = 'Upgrade';
$string['updatetable'] = 'Update table';
$string['unknown'] = 'Unknown';
$string['upgradeassignmentsummary'] = 'Upgrade assignment: {$a->name} (Course: {$a->shortname})';
$string['upgradeassignmentsuccess'] = 'Result: Upgrade successful';
$string['upgradeassignmentfailed'] = 'Result: Upgrade failed. The log from the upgrade was: <br/><div class="tool_assignmentupgrade_upgradelog">{$a->log}</div>';
$string['upgradable'] = 'Upgradable';
$string['upgradeselected'] = 'Upgrade selected assignments';
$string['upgradeselectedcount'] = 'Upgrade {$a} selected assignments?';
$string['upgradeall'] = 'Upgrade all assignments';
$string['upgradeallconfirm'] = 'Upgrade all assignments?';
$string['upgradeprogress'] = 'Upgrade assignment {$a->current} of {$a->total}';
$string['upgradesingle'] = 'Upgrade single assignment';
$string['viewcourse'] = 'View the course with the converted assignment';
$string['privacy:metadata:preference:perpage'] = 'The assignment upgrade records per page preference set for the user.';
@@ -1,59 +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/>.
/**
* Script to show all the assignments that have not been upgraded after the main upgrade.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentstable.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/upgradableassignmentsbatchform.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/paginationform.php');
// This calls require_login and checks moodle/site:config.
admin_externalpage_setup('assignmentupgrade', '', array(), tool_assignmentupgrade_url('listnotupgraded'));
$PAGE->navbar->add(get_string('listnotupgraded', 'tool_assignmentupgrade'));
$renderer = $PAGE->get_renderer('tool_assignmentupgrade');
$perpage = optional_param('perpage', 0, PARAM_INT);
if (!$perpage) {
$perpage = get_user_preferences('tool_assignmentupgrade_perpage', 100);
} else {
set_user_preference('tool_assignmentupgrade_perpage', $perpage);
}
$assignments = new tool_assignmentupgrade_assignments_table($perpage);
$batchform = new tool_assignmentupgrade_batchoperations_form();
$data = $batchform->get_data();
if ($data && $data->selectedassignments != '' || $data && isset($data->upgradeall)) {
require_sesskey();
echo $renderer->confirm_batch_operation_page($data);
} else {
$paginationform = new tool_assignmentupgrade_pagination_form();
$pagedata = new stdClass();
$pagedata->perpage = $perpage;
$paginationform->set_data($pagedata);
echo $renderer->assignment_list_page($assignments, $batchform, $paginationform);
}
-234
View File
@@ -1,234 +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/>.
/**
* Assignment upgrade tool library functions
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Get the URL of a script within this plugin.
* @param string $script the script name, without .php. E.g. 'index'
* @param array $params URL parameters (optional)
* @return moodle_url
*/
function tool_assignmentupgrade_url($script, $params = array()) {
return new moodle_url('/admin/tool/assignmentupgrade/' . $script . '.php', $params);
}
/**
* Class to encapsulate the continue / cancel for batch operations
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_assignmentupgrade_batchoperationconfirm implements renderable {
/** @var string $continuemessage The message to show above the continue cancel buttons */
public $continuemessage = '';
/** @var string $continueurl The url to load if the user clicks continue */
public $continueurl;
/**
* Constructor for this class
* @param stdClass $data - The data from the previous batch form
*/
public function __construct($data) {
if (isset($data->upgradeselected)) {
$this->continuemessage = get_string('upgradeselectedcount',
'tool_assignmentupgrade',
count(explode(',', $data->selectedassignments)));
$urlparams = array('upgradeselected'=>'1',
'confirm'=>'1',
'sesskey'=>sesskey(),
'selected'=>$data->selectedassignments);
$this->continueurl = new moodle_url('/admin/tool/assignmentupgrade/batchupgrade.php', $urlparams);
} else if (isset($data->upgradeall)) {
if (!tool_assignmentupgrade_any_upgradable_assignments()) {
$this->continuemessage = get_string('noassignmentstoupgrade', 'tool_assignmentupgrade');
$this->continueurl = '';
} else {
$this->continuemessage = get_string('upgradeallconfirm', 'tool_assignmentupgrade');
$urlparams = array('upgradeall'=>'1', 'confirm'=>'1', 'sesskey'=>sesskey());
$this->continueurl = new moodle_url('/admin/tool/assignmentupgrade/batchupgrade.php', $urlparams);
}
}
}
}
/**
* Class to encapsulate one of the functionalities that this plugin offers.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_assignmentupgrade_action {
/** @var string the name of this action. */
public $name;
/** @var moodle_url the URL to launch this action. */
public $url;
/** @var string a description of this aciton. */
public $description;
/**
* Constructor to set the fields.
*
* In order to create a new tool_assignmentupgrade_action instance you must use
* the tool_assignmentupgrade_action::make
* method.
*
* @param string $name the name of this action.
* @param moodle_url $url the URL to launch this action.
* @param string $description a description of this aciton.
*/
protected function __construct($name, moodle_url $url, $description) {
$this->name = $name;
$this->url = $url;
$this->description = $description;
}
/**
* Make an action with standard values.
* @param string $shortname internal name of the action. Used to get strings and build a URL.
* @param array $params any URL params required.
* @return tool_assignmentupgrade_action
*/
public static function make($shortname, $params = array()) {
return new self(
get_string($shortname, 'tool_assignmentupgrade'),
tool_assignmentupgrade_url($shortname, $params),
get_string($shortname . '_desc', 'tool_assignmentupgrade'));
}
}
/**
* Determine if there are any assignments that can be upgraded
* @return boolean - Are there any assignments that can be upgraded
*/
function tool_assignmentupgrade_any_upgradable_assignments() {
global $DB, $CFG;
require_once($CFG->dirroot . '/mod/assign/locallib.php');
// First find all the unique assignment types.
$types = $DB->get_records_sql('SELECT plugin AS assignmenttype,
value AS version
FROM {config_plugins}
WHERE
name = ? AND
plugin LIKE ?', array('version', 'assignment_%'));
$upgradabletypes = array();
foreach ($types as $assignment) {
$shorttype = substr($assignment->assignmenttype, strlen('assignment_'));
if (assign::can_upgrade_assignment($shorttype, $assignment->version)) {
$upgradabletypes[] = $shorttype;
}
}
list($sql, $params) = $DB->get_in_or_equal($upgradabletypes);
$count = $DB->count_records_sql('SELECT COUNT(id) FROM {assignment} WHERE assignmenttype ' . $sql, $params);
return $count > 0;
}
/**
* Load a list of all the assignmentids that can be upgraded
* @return array of assignment ids
*/
function tool_assignmentupgrade_load_all_upgradable_assignmentids() {
global $DB, $CFG;
require_once($CFG->dirroot . '/mod/assign/locallib.php');
// First find all the unique assignment types.
$types = $DB->get_records_sql('SELECT
plugin AS assignmenttype,
value AS version
FROM {config_plugins}
WHERE
name = ? AND
plugin LIKE ?', array('version', 'assignment_%'));
$upgradabletypes = array();
foreach ($types as $assignment) {
$shorttype = substr($assignment->assignmenttype, strlen('assignment_'));
if (assign::can_upgrade_assignment($shorttype, $assignment->version)) {
$upgradabletypes[] = $shorttype;
}
}
list($sql, $params) = $DB->get_in_or_equal($upgradabletypes);
$records = $DB->get_records_sql('SELECT id from {assignment} where assignmenttype ' . $sql, $params);
$ids = array();
foreach ($records as $record) {
$ids[] = $record->id;
}
return $ids;
}
/**
* Upgrade a single assignment. This is used by both upgrade single and upgrade batch
*
* @param int $assignmentid - The assignment id to upgrade
* @return array(string, boolean, string) -
* The array contains
* - the assignment summary (returned by tool_assignmentupgrade_get_assignment)
* - success
* - the upgrade log
*/
function tool_assignmentupgrade_upgrade_assignment($assignmentid) {
global $CFG;
require_once($CFG->dirroot . '/mod/assign/upgradelib.php');
$assignment_upgrader = new assign_upgrade_manager();
$info = tool_assignmentupgrade_get_assignment($assignmentid);
if ($info) {
$log = '';
$success = $assignment_upgrader->upgrade_assignment($assignmentid, $log);
} else {
$success = false;
$log = get_string('assignmentnotfound', 'tool_assignmentupgrade', $assignmentid);
$info = new stdClass();
$info->name = get_string('unknown', 'tool_assignmentupgrade');
$info->shortname = get_string('unknown', 'tool_assignmentupgrade');
}
return array($info, $success, $log);
}
/**
* Get the information about a assignment to be upgraded.
* @param int $assignmentid the assignment id.
* @return stdClass the information about that assignment.
*/
function tool_assignmentupgrade_get_assignment($assignmentid) {
global $DB;
return $DB->get_record_sql("
SELECT a.id, a.name, c.shortname, c.id AS courseid
FROM {assignment} a
JOIN {course} c ON c.id = a.course
WHERE a.id = ?", array($assignmentid));
}
-70
View File
@@ -1,70 +0,0 @@
M.tool_assignmentupgrade = {
init_upgrade_table: function(Y) {
Y.use('node', function(Y) {
checkboxes = Y.all('td.c0 input');
checkboxes.each(function(node) {
node.on('change', function(e) {
rowelement = e.currentTarget.get('parentNode').get('parentNode');
if (e.currentTarget.get('checked')) {
rowelement.setAttribute('class', 'selectedrow');
} else {
rowelement.setAttribute('class', 'unselectedrow');
}
});
rowelement = node.get('parentNode').get('parentNode');
if (node.get('checked')) {
rowelement.setAttribute('class', 'selectedrow');
} else {
rowelement.setAttribute('class', 'unselectedrow');
}
});
});
var selectall = Y.one('th.c0 input');
selectall.on('change', function(e) {
if (e.currentTarget.get('checked')) {
checkboxes = Y.all('td.c0 input');
checkboxes.each(function(node) {
rowelement = node.get('parentNode').get('parentNode');
node.set('checked', true);
rowelement.setAttribute('class', 'selectedrow');
});
} else {
checkboxes = Y.all('td.c0 input');
checkboxes.each(function(node) {
rowelement = node.get('parentNode').get('parentNode');
node.set('checked', false);
rowelement.setAttribute('class', 'unselectedrow');
});
}
});
var upgradeselectedbutton = Y.one('#id_upgradeselected');
upgradeselectedbutton.on('click', function(e) {
checkboxes = Y.all('td.c0 input');
var selectedassignments = [];
checkboxes.each(function(node) {
if (node.get('checked')) {
selectedassignments[selectedassignments.length] = node.get('value');
}
});
operation = Y.one('#id_operation');
assignmentsinput = Y.one('input.selectedassignments');
assignmentsinput.set('value', selectedassignments.join(','));
if (selectedassignments.length == 0) {
alert(M.util.get_string('noassignmentsselected', 'tool_assignmentupgrade'));
e.preventDefault();
}
});
var perpage = Y.one('#id_perpage');
perpage.on('change', function(e) {
window.onbeforeunload = null;
Y.one('.tool_assignmentupgrade_paginationform form').submit();
});
}
}
@@ -1,57 +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/>.
/**
* This file contains the forms to create and edit an instance of this module
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
require_once($CFG->libdir.'/formslib.php');
/**
* Assignment upgrade table display options
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_assignmentupgrade_pagination_form extends moodleform {
/**
* Define this form - called from the parent constructor
*/
public function definition() {
$mform = $this->_form;
$instance = $this->_customdata;
$mform->addElement('header', 'general', get_string('assignmentsperpage', 'tool_assignmentupgrade'));
// Visible elements.
$options = array(10=>'10', 20=>'20', 50=>'50', 100=>'100');
$mform->addElement('select', 'perpage', get_string('assignmentsperpage', 'assign'), $options);
// Hidden params.
$mform->addElement('hidden', 'action', 'saveoptions');
$mform->setType('action', PARAM_ALPHA);
// Buttons.
$this->add_action_buttons(false, get_string('updatetable', 'tool_assignmentupgrade'));
}
}
-249
View File
@@ -1,249 +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/>.
/**
* Defines the renderer for the assignment upgrade helper plugin.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Renderer for the assignment upgrade helper plugin.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_assignmentupgrade_renderer extends plugin_renderer_base {
/**
* Render the index page.
* @param string $detected information about what sort of site was detected.
* @param array $actions list of actions to show on this page.
* @return string html to output.
*/
public function index_page($detected, array $actions) {
$output = '';
$output .= $this->header();
$output .= $this->heading(get_string('pluginname', 'tool_assignmentupgrade'));
$output .= $this->box($detected);
$output .= html_writer::start_tag('ul');
foreach ($actions as $action) {
$output .= html_writer::tag('li',
html_writer::link($action->url, $action->name) . ' - ' .
$action->description);
}
$output .= html_writer::end_tag('ul');
$output .= $this->footer();
return $output;
}
/**
* Render a page that is just a simple message.
* @param string $message the message to display.
* @return string html to output.
*/
public function simple_message_page($message) {
$output = '';
$output .= $this->header();
$output .= $this->heading($message);
$output .= $this->back_to_index();
$output .= $this->footer();
return $output;
}
/**
* Render the confirm batch operation page
* @param stdClass $data Submitted form data with list of assignments to upgrade
* @return string html to output.
*/
public function confirm_batch_operation_page(stdClass $data) {
$output = '';
$output .= $this->header();
$output .= $this->heading(get_string('confirmbatchupgrade', 'tool_assignmentupgrade'));
$output .= $this->output->spacer(array(), true);
$output .= $this->container_start('tool_assignmentupgrade_confirmbatch');
$output .= $this->render(new tool_assignmentupgrade_batchoperationconfirm($data));
$output .= $this->container_end();
$output .= $this->back_to_index();
$output .= $this->footer();
return $output;
}
/**
* Render the confirm batch continue / cancel links
* @param tool_assignmentupgrade_batchoperationconfirm $confirm Wrapper class to determine the continue message and url
* @return string html to output.
*/
public function render_tool_assignmentupgrade_batchoperationconfirm(tool_assignmentupgrade_batchoperationconfirm $confirm) {
$output = '';
if ($confirm->continueurl) {
$output .= $this->output->confirm($confirm->continuemessage,
$confirm->continueurl,
tool_assignmentupgrade_url('listnotupgraded'));
} else {
$output .= $this->output->box($confirm->continuemessage);
$output .= $this->output->continue_button(tool_assignmentupgrade_url('listnotupgraded'));
}
return $output;
}
/**
* Render the list of assignments that still need to be upgraded page.
* @param tool_assignmentupgrade_assignments_table $assignments of data about assignments.
* @param tool_assignmentupgrade_batchoperations_form $batchform Submitted form with list of assignments to upgrade
* @param tool_assignmentupgrade_pagination_form $paginationform Form which contains the preferences for paginating the table
* @return string html to output.
*/
public function assignment_list_page(tool_assignmentupgrade_assignments_table $assignments,
tool_assignmentupgrade_batchoperations_form $batchform,
tool_assignmentupgrade_pagination_form $paginationform) {
$output = '';
$output .= $this->header();
$this->page->requires->js_init_call('M.tool_assignmentupgrade.init_upgrade_table', array());
$this->page->requires->string_for_js('noassignmentsselected', 'tool_assignmentupgrade');
$output .= $this->heading(get_string('notupgradedtitle', 'tool_assignmentupgrade'));
$output .= $this->box(get_string('notupgradedintro', 'tool_assignmentupgrade'));
$output .= $this->output->spacer(array(), true);
$output .= $this->container_start('tool_assignmentupgrade_upgradetable');
$output .= $this->container_start('tool_assignmentupgrade_paginationform');
$output .= $this->moodleform($paginationform);
$output .= $this->container_end();
$output .= $this->flexible_table($assignments, $assignments->get_rows_per_page(), true);
$output .= $this->container_end();
if ($assignments->anyupgradableassignments) {
$output .= $this->container_start('tool_assignmentupgrade_batchform');
$output .= $this->moodleform($batchform);
$output .= $this->container_end();
}
$output .= $this->back_to_index();
$output .= $this->footer();
return $output;
}
/**
* Render the result of an assignment conversion
* @param stdClass $assignmentsummary data about the assignment to upgrade.
* @param bool $success Set to true if the outcome of the conversion was a success
* @param string $log The log from the conversion
* @return string html to output.
*/
public function convert_assignment_result($assignmentsummary, $success, $log) {
$output = '';
$output .= $this->container_start('tool_assignmentupgrade_result');
$output .= $this->container(get_string('upgradeassignmentsummary', 'tool_assignmentupgrade', $assignmentsummary));
if (!$success) {
$output .= $this->container(get_string('conversionfailed', 'tool_assignmentupgrade', $log));
} else {
$output .= $this->container(get_string('upgradeassignmentsuccess', 'tool_assignmentupgrade'));
$url = new moodle_url('/course/view.php', array('id'=>$assignmentsummary->courseid));
$output .= $this->container(html_writer::link($url, get_string('viewcourse', 'tool_assignmentupgrade')));
}
$output .= $this->container_end();
return $output;
}
/**
* Render the are-you-sure page to confirm a manual upgrade.
* @param stdClass $assignmentsummary data about the assignment to upgrade.
* @return string html to output.
*/
public function convert_assignment_are_you_sure($assignmentsummary) {
$output = '';
$output .= $this->header();
$output .= $this->heading(get_string('areyousure', 'tool_assignmentupgrade'));
$params = array('id' => $assignmentsummary->id, 'confirmed' => 1, 'sesskey' => sesskey());
$output .= $this->confirm(get_string('areyousuremessage', 'tool_assignmentupgrade', $assignmentsummary),
new single_button(tool_assignmentupgrade_url('upgradesingle', $params), get_string('yes')),
tool_assignmentupgrade_url('listnotupgraded'));
$output .= $this->footer();
return $output;
}
/**
* Helper method dealing with the fact we can not just fetch the output of flexible_table
*
* @param flexible_table $table
* @param int $rowsperpage
* @param bool $displaylinks Show links in the table
* @return string HTML
*/
protected function flexible_table(flexible_table $table, $rowsperpage, $displaylinks) {
$o = '';
ob_start();
$table->out($rowsperpage, $displaylinks);
$o = ob_get_contents();
ob_end_clean();
return $o;
}
/**
* Helper method dealing with the fact we can not just fetch the output of moodleforms
*
* @param moodleform $mform
* @return string HTML
*/
protected function moodleform(moodleform $mform) {
$o = '';
ob_start();
$mform->display();
$o = ob_get_contents();
ob_end_clean();
return $o;
}
/**
* Render a link in a div, such as the 'Back to plugin main page' link.
* @param string|moodle_url $url the link URL.
* @param string $text the link text.
* @return string html to output.
*/
public function end_of_page_link($url, $text) {
return html_writer::tag('div', html_writer::link($url, $text), array('class' => 'mdl-align'));
}
/**
* Output a link back to the plugin index page.
* @return string html to output.
*/
public function back_to_index() {
return $this->end_of_page_link(tool_assignmentupgrade_url('index'), get_string('backtoindex', 'tool_assignmentupgrade'));
}
}
-23
View File
@@ -1,23 +0,0 @@
#page-admin-tool-assignmentupgrade-listnotupgraded .tool_assignmentupgrade_upgradetable .c0 {
display: none;
}
#page-admin-tool-assignmentupgrade-listnotupgraded.jsenabled .tool_assignmentupgrade_upgradetable .c0 {
display: table-cell;
}
/*
.gradingbatchoperationsform { display: none; }
.jsenabled .gradingbatchoperationsform { display: block; }
*/
#page-admin-tool-assignmentupgrade-listnotupgraded .tool_assignmentupgrade_upgradetable tr.selectedrow td {
background-color: #fec;
}
#page-admin-tool-assignmentupgrade-listnotupgraded .tool_assignmentupgrade_upgradetable tr.unselectedrow td {
background-color: white;
}
#page-admin-tool-assignmentupgrade-listnotupgraded .tool_assignmentupgrade_paginationform .hidden {
display: none;
}
@@ -1,75 +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/>.
/**
* Privacy tests for tool_assignmentupgrade.
*
* @package tool_assignmentupgrade
* @category test
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
use \core_privacy\tests\provider_testcase;
use \core_privacy\local\request\writer;
use \tool_assignmentupgrade\privacy\provider;
/**
* Unit tests for tool_assignmentupgrade/classes/privacy/policy
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_assignmentupgrade_privacy_testcase extends provider_testcase {
/**
* Overriding setUp() function to always reset after tests.
*/
public function setUp() {
$this->resetAfterTest(true);
}
/**
* Test for provider::test_export_user_preferences().
*/
public function test_export_user_preferences() {
// Test setup.
$user = $this->getDataGenerator()->create_user();
$this->setUser($user);
// Add a user home page preference for the User.
set_user_preference('tool_assignmentupgrade_perpage', '100', $user);
// Test the user preference exists.
$params = [
'userid' => $user->id,
'name' => 'tool_assignmentupgrade_perpage'
];
// Test the user preferences export contains 1 user preference record for the User.
provider::export_user_preferences($user->id);
$contextuser = context_user::instance($user->id);
$writer = writer::with_context($contextuser);
$this->assertTrue($writer->has_any_data());
$exportedpreferences = $writer->get_user_preferences('tool_assignmentupgrade');
$this->assertCount(1, (array) $exportedpreferences);
$this->assertEquals('100', $exportedpreferences->perpage->value);
}
}
@@ -1,54 +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/>.
/**
* This file contains the forms to create and edit an instance of this module
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
require_once($CFG->libdir.'/formslib.php');
/**
* Assignment upgrade batch operations form.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_assignmentupgrade_batchoperations_form extends moodleform {
/**
* Define this form - is called from parent constructor.
*/
public function definition() {
$mform = $this->_form;
$instance = $this->_customdata;
$mform->addElement('header', 'general', get_string('batchoperations', 'tool_assignmentupgrade'));
// Visible elements.
$mform->addElement('hidden', 'selectedassignments', '', array('class'=>'selectedassignments'));
$mform->setType('selectedassignments', PARAM_SEQUENCE);
$mform->addElement('submit', 'upgradeselected', get_string('upgradeselected', 'tool_assignmentupgrade'));
$mform->addElement('submit', 'upgradeall', get_string('upgradeall', 'tool_assignmentupgrade'));
}
}
@@ -1,182 +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/>.
/**
* This file contains the definition for the grading table which subclassses easy_table
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/tablelib.php');
require_once($CFG->libdir.'/gradelib.php');
require_once($CFG->dirroot.'/mod/assign/locallib.php');
/**
* Extends table_sql to provide a table of assignment submissions
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot {@link http://www.netspot.com.au}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_assignmentupgrade_assignments_table extends table_sql implements renderable {
/** @var int $perpage */
private $perpage = 10;
/** @var int $rownum (global index of current row in table) */
private $rownum = -1;
/** @var renderer_base for getting output */
private $output = null;
/** @var boolean anyupgradableassignments - True if there is one or more assignments that can upgraded */
public $anyupgradableassignments = false;
/**
* This table loads a list of the old assignment instances and tests them to see
* if they can be upgraded
*
* @param int $perpage How many per page
* @param int $rowoffset The starting row for pagination
*/
public function __construct($perpage, $rowoffset=0) {
global $PAGE;
parent::__construct('tool_assignmentupgrade_assignments');
$this->perpage = $perpage;
$this->output = $PAGE->get_renderer('tool_assignmentupgrade');
$this->define_baseurl(new moodle_url('/admin/tool/assignmentupgrade/listnotupgraded.php'));
$this->anyupgradableassignments = tool_assignmentupgrade_any_upgradable_assignments();
// Do some business - then set the sql.
if ($rowoffset) {
$this->rownum = $rowoffset - 1;
}
$fields = 'a.id as id,
a.name as name,
a.assignmenttype as type,
c.shortname as courseshortname,
c.id as courseid,
COUNT(s.id) as submissioncount';
$from = '{assignment} a JOIN {course} c ON a.course = c.id ' .
' LEFT JOIN {assignment_submissions} s ON a.id = s.assignment';
$where = '1 = 1';
$where .= ' GROUP BY a.id, a.name, a.assignmenttype, c.shortname, c.id ';
$this->set_sql($fields, $from, $where, array());
$this->set_count_sql('SELECT COUNT(*) FROM {assignment} a JOIN {course} c ON a.course = c.id', array());
$columns = array();
$headers = array();
$columns[] = 'select';
$headers[] = get_string('select', 'tool_assignmentupgrade') .
'<div class="selectall">' .
'<input type="checkbox" name="selectall" title="' . get_string('selectall') . '"/>' .
'</div>';
$columns[] = 'upgradable';
$headers[] = get_string('upgradable', 'tool_assignmentupgrade');
$columns[] = 'id';
$headers[] = get_string('assignmentid', 'tool_assignmentupgrade');
$columns[] = 'courseshortname';
$headers[] = get_string('course');
$columns[] = 'name';
$headers[] = get_string('name');
$columns[] = 'type';
$headers[] = get_string('assignmenttype', 'tool_assignmentupgrade');
$columns[] = 'submissioncount';
$headers[] = get_string('submissions', 'tool_assignmentupgrade');
// Set the columns.
$this->define_columns($columns);
$this->define_headers($headers);
$this->no_sorting('upgradable');
$this->no_sorting('select');
}
/**
* Return the number of rows to display on a single page
*
* @return int The number of rows per page
*/
public function get_rows_per_page() {
return $this->perpage;
}
/**
* Format a link to the assignment instance
*
* @param stdClass $row
* @return string
*/
public function col_name(stdClass $row) {
$url = new moodle_url('/mod/assignment/view.php', array('a' => $row->id));
return html_writer::link($url, $row->name);
}
/**
* Format a link to the upgrade single tool
*
* @param stdClass $row (contains cached result from previous upgradable check)
* @return string
*/
public function col_upgradable(stdClass $row) {
if ($row->upgradable) {
$urlparams = array('id' => $row->id, 'sesskey' => sesskey());
$url = new moodle_url('/admin/tool/assignmentupgrade/upgradesingleconfirm.php', $urlparams);
return html_writer::link($url, get_string('supported', 'tool_assignmentupgrade'));
} else {
return get_string('notsupported', 'tool_assignmentupgrade');
}
}
/**
* Insert a checkbox for selecting the current row for batch operations
*
* @param stdClass $row
* @return string
*/
public function col_select(stdClass $row) {
global $CFG;
$version = get_config('assignment_' . $row->type, 'version');
require_once($CFG->dirroot . '/mod/assign/locallib.php');
if (assign::can_upgrade_assignment($row->type, $version)) {
$row->upgradable = true;
return '<input type="checkbox" name="selectedassignment" value="' . $row->id . '"/>';
}
$row->upgradable = false;
return '';
}
/**
* Override the table show_hide_link to not show for select column
*
* @param string $column the column name, index into various names.
* @param int $index numerical index of the column.
* @return string HTML fragment.
*/
protected function show_hide_link($column, $index) {
if ($index > 0) {
return parent::show_hide_link($column, $index);
}
return '';
}
}
@@ -1,49 +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/>.
/**
* Script to show all the assignments that have not been upgraded after the main upgrade.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_sesskey();
$assignmentid = required_param('id', PARAM_INT);
// This calls require_login and checks moodle/site:config.
admin_externalpage_setup('assignmentupgrade',
'',
array(),
tool_assignmentupgrade_url('upgradesingle', array('id' => $assignmentid)));
$PAGE->navbar->add(get_string('upgradesingle', 'tool_assignmentupgrade'));
$renderer = $PAGE->get_renderer('tool_assignmentupgrade');
$log = '';
list($summary, $success, $log) = tool_assignmentupgrade_upgrade_assignment($assignmentid);
echo $renderer->header();
echo $renderer->heading(get_string('conversioncomplete', 'tool_assignmentupgrade'));
echo $renderer->convert_assignment_result($summary, $success, $log);
echo $renderer->continue_button(tool_assignmentupgrade_url('listnotupgraded'));
echo $renderer->footer();
@@ -1,44 +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/>.
/**
* Script to show all the assignments that have not been upgraded after the main upgrade.
*
* @package tool_assignmentupgrade
* @copyright 2012 NetSpot
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../config.php');
require_once($CFG->libdir . '/adminlib.php');
require_once($CFG->dirroot . '/'.$CFG->admin.'/tool/assignmentupgrade/locallib.php');
require_sesskey();
$assignmentid = required_param('id', PARAM_INT);
// This calls require_login and checks moodle/site:config.
admin_externalpage_setup('assignmentupgrade',
'',
array(),
tool_assignmentupgrade_url('upgradesingle', array('id' => $assignmentid)));
$PAGE->navbar->add(get_string('upgradesingle', 'tool_assignmentupgrade'));
$renderer = $PAGE->get_renderer('tool_assignmentupgrade');
$assignmentinfo = tool_assignmentupgrade_get_assignment($assignmentid);
echo $renderer->convert_assignment_are_you_sure($assignmentinfo);
@@ -20,7 +20,7 @@ Feature: Manage availability conditions
And the following config values are set as admin:
| enableavailability | 1 |
And I am on homepage
And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
And I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
# Having clicked on it, I should also see the list of plugins.
And I should see "Restriction by date"
@@ -34,7 +34,7 @@ Feature: Manage availability conditions
| Course 1 | C1 | topics |
And I log in as "admin"
And I am on site homepage
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions"
When I navigate to "Plugins > Availability restrictions > Manage restrictions" in site administration
# Check the icon is there (it should be a Hide icon, meaning is currently visible).
Then "Hide" "icon" should exist in the "Restriction by date" "table_row"
+6 -6
View File
@@ -23,29 +23,29 @@
*/
$string['aim'] = 'This administration tool helps developers and test writers to create .feature files describing Moodle\'s functionalities and run them automatically. Step definitions available for use in .feature files are listed below.';
$string['allavailablesteps'] = 'All the available steps definitions';
$string['allavailablesteps'] = 'All available step definitions';
$string['errorbehatcommand'] = 'Error running behat CLI command. Try running "{$a} --help" manually from CLI to find out more about the problem.';
$string['errorcomposer'] = 'Composer dependencies are not installed.';
$string['errordataroot'] = '$CFG->behat_dataroot is not set or is invalid.';
$string['errorsetconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot need to be set in config.php.';
$string['erroruniqueconfig'] = '$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot values need to be different than $CFG->dataroot, $CFG->prefix, $CFG->wwwroot, $CFG->phpunit_dataroot and $CFG->phpunit_prefix values.';
$string['fieldvalueargument'] = 'Field value arguments';
$string['fieldvalueargument_help'] = 'This argument should be completed by a field value, there are many field types, simple ones like checkboxes, selects or textareas or complex ones like date selectors. You can check <a href="http://docs.moodle.org/dev/Acceptance_testing#Providing_values_to_steps" target="_blank">Field values</a> to see the expected field value depending on the field type you provide.';
$string['fieldvalueargument_help'] = 'This argument should be completed by a field value. There are many field types, including simple ones like checkboxes, selects or textareas, or complex ones like date selectors. See the dev documentation <a href="http://docs.moodle.org/dev/Acceptance_testing" target="_blank">Acceptance_testing</a> for details of expected field values.';
$string['giveninfo'] = 'Given. Processes to set up the environment';
$string['infoheading'] = 'Info';
$string['installinfo'] = 'Read {$a} for installation and tests execution info';
$string['newstepsinfo'] = 'Read {$a} for info about how to add new steps definitions';
$string['newstepsinfo'] = 'Read {$a} for info about how to add new step definitions';
$string['newtestsinfo'] = 'Read {$a} for info about how to write new tests';
$string['nostepsdefinitions'] = 'There aren\'t steps definitions matching this filters';
$string['nostepsdefinitions'] = 'There aren\'t any step definitions matching this filter';
$string['pluginname'] = 'Acceptance testing';
$string['stepsdefinitionscomponent'] = 'Area';
$string['stepsdefinitionscontains'] = 'Contains';
$string['stepsdefinitionsfilters'] = 'Steps definitions';
$string['stepsdefinitionsfilters'] = 'Step definitions';
$string['stepsdefinitionstype'] = 'Type';
$string['theninfo'] = 'Then. Checkings to ensure the outcomes are the expected ones';
$string['unknownexceptioninfo'] = 'There was a problem with Selenium or your browser. Please ensure you are using the latest version of Selenium. Error:';
$string['viewsteps'] = 'Filter';
$string['wheninfo'] = 'When. Actions that provokes an event';
$string['wheninfo'] = 'When. Action that provokes an event';
$string['wrongbehatsetup'] = 'Something is wrong with the behat setup and so step definitions cannot be listed: <b>{$a->errormsg}</b><br/><br/>Please check:<ul>
<li>$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot are set in config.php with different values from $CFG->dataroot, $CFG->prefix and $CFG->wwwroot.</li>
<li>You ran "{$a->behatinit}" from your Moodle root directory.</li>
@@ -286,7 +286,7 @@ Feature: Set up contextual data for tests
| student1 | CHSB |
| student1 | CHC |
When I log in as "admin"
And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
And I navigate to "Users > Accounts > Cohorts" in site administration
Then the following should exist in the "cohorts" table:
| Name | Cohort size |
| System cohort A | 1 |
@@ -34,7 +34,7 @@ Feature: Verify that all form fields values can be get and set
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I am on "Course 1" course homepage
And I navigate to "Reset" node in "Course administration"
And I navigate to "Reset" in current page administration
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
And the "Unenrol users" select box should contain "No roles"
@@ -131,12 +131,12 @@ Feature: Verify that all form fields values can be get and set
And the field "two" matches value ""
# Check if field xpath set/match works.
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I navigate to "Edit settings" in current page administration
And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number"
And the field with xpath "//input[@name='idnumber']" matches value "Course id number"
And the field with xpath "//input[@name='idnumber']" does not match value ""
And I press "Save and display"
And I navigate to "Edit settings" node in "Course administration"
And I navigate to "Edit settings" in current page administration
And the field "Course ID number" matches value "Course id number"
Scenario: with JS disabled all form fields getters and setters works as expected
@@ -7,11 +7,11 @@ Feature: List the system steps definitions
Background:
Given I am on homepage
And I log in as "admin"
And I navigate to "Acceptance testing" node in "Site administration > Development"
And I navigate to "Development > Acceptance testing" in site administration
@javascript
Scenario: Accessing the list
Then I should see "Steps definitions"
Then I should see "Step definitions"
And I should not see "There aren't steps definitions matching this filter"
@javascript
-199
View File
@@ -1,199 +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/>.
/**
* Unit tests for behat manager.
*
* @package tool_behat
* @copyright 2012 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/' . $CFG->admin .'/tool/behat/locallib.php');
require_once($CFG->libdir . '/behat/classes/util.php');
require_once($CFG->libdir . '/behat/classes/behat_config_manager.php');
/**
* Behat manager tests.
*
* @package tool_behat
* @copyright 2012 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_behat_manager_testcase extends advanced_testcase {
/**
* behat_config_manager tests.
*/
public function test_merge_configs() {
// Simple default config.
$array1 = array(
'the' => 'same',
'simple' => 'value',
'array' => array(
'one' => 'arrayvalue1',
'two' => 'arrayvalue2'
)
);
// Simple override.
$array2 = array(
'simple' => 'OVERRIDDEN1',
'array' => array(
'one' => 'OVERRIDDEN2'
),
'newprofile' => array(
'anotherlevel' => array(
'andanotherone' => array(
'list1',
'list2'
)
)
)
);
$array = testable_behat_config_manager::merge_config($array1, $array2);
$this->assertDebuggingCalled("Use of merge_config is deprecated, please see behat_config_util");
// Overrides are applied.
$this->assertEquals('OVERRIDDEN1', $array['simple']);
$this->assertEquals('OVERRIDDEN2', $array['array']['one']);
// Other values are respected.
$this->assertNotEmpty($array['array']['two']);
// Completely new nodes are added.
$this->assertNotEmpty($array['newprofile']);
$this->assertNotEmpty($array['newprofile']['anotherlevel']['andanotherone']);
$this->assertEquals('list1', $array['newprofile']['anotherlevel']['andanotherone'][0]);
$this->assertEquals('list2', $array['newprofile']['anotherlevel']['andanotherone'][1]);
// Complex override changing vectors to scalars and scalars to vectors.
$array2 = array(
'simple' => array(
'simple' => 'should',
'be' => 'overridden',
'by' => 'this-array'
),
'array' => 'one'
);
$array = testable_behat_config_manager::merge_config($array1, $array2);
$this->assertDebuggingCalled("Use of merge_config is deprecated, please see behat_config_util");
// Overrides applied.
$this->assertNotEmpty($array['simple']);
$this->assertNotEmpty($array['array']);
$this->assertTrue(is_array($array['simple']));
$this->assertFalse(is_array($array['array']));
// Other values are maintained.
$this->assertEquals('same', $array['the']);
}
/**
* behat_config_manager tests.
*/
public function test_config_file_contents() {
global $CFG;
$this->resetAfterTest(true);
// Skip tests if behat is not installed.
$vendorpath = $CFG->dirroot . '/vendor';
if (!file_exists($vendorpath . '/autoload.php') || !is_dir($vendorpath . '/behat')) {
$this->markTestSkipped('Behat not installed.');
}
// Add some fake test url.
$CFG->behat_wwwroot = 'http://example.com/behat';
// To avoid user value at config.php level.
unset($CFG->behat_config);
// List.
$features = array(
'feature1',
'feature2',
'feature3'
);
// Associative array.
$stepsdefinitions = array(
'micarro' => '/me/lo/robaron',
'anoche' => '/cuando/yo/dormia'
);
$contents = testable_behat_config_manager::get_config_file_contents($features, $stepsdefinitions);
$this->assertDebuggingCalled("Use of get_config_file_contents is deprecated, please see behat_config_util");
// YAML decides when is is necessary to wrap strings between single quotes, so not controlled
// values like paths should not be asserted including the key name as they would depend on the
// directories values.
$this->assertContains($CFG->dirroot,
$contents['default']['extensions']['Moodle\BehatExtension']['moodledirroot']);
// Not quoted strings.
$this->assertEquals('/me/lo/robaron',
$contents['default']['extensions']['Moodle\BehatExtension']['steps_definitions']['micarro']);
// YAML uses single quotes to wrap URL strings.
$this->assertEquals($CFG->behat_wwwroot, $contents['default']['extensions']['Behat\MinkExtension']['base_url']);
// Lists.
$this->assertEquals('feature1', $contents['default']['suites']['default']['paths'][0]);
$this->assertEquals('feature3', $contents['default']['suites']['default']['paths'][2]);
unset($CFG->behat_wwwroot);
}
}
/**
* Allows access to internal methods without exposing them.
*
* @package tool_behat
* @copyright 2012 David Monllaó
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class testable_behat_config_manager extends behat_config_manager {
/**
* Allow access to protected method
* @see parent::merge_config()
* @param mixed $config
* @param mixed $localconfig
* @return mixed
*/
public static function merge_config($config, $localconfig) {
return parent::merge_config($config, $localconfig);
}
/**
* Allow access to protected method
* @see parent::get_config_file_contents()
* @param array $features
* @param array $stepsdefinitions
* @return string
*/
public static function get_config_file_contents($features, $stepsdefinitions) {
return parent::get_config_file_contents($features, $stepsdefinitions);
}
}
@@ -30,6 +30,8 @@ use core_privacy\local\request\context;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\transform;
use core_privacy\local\request\writer;
use core_privacy\local\request\userlist;
use \core_privacy\local\request\approved_userlist;
defined('MOODLE_INTERNAL') || die();
@@ -39,7 +41,10 @@ defined('MOODLE_INTERNAL') || die();
* @copyright 2018 Zig Tan <zig@moodle.com>
* @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\plugin\provider {
class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\core_userlist_provider,
\core_privacy\local\request\plugin\provider {
/**
* Returns meta data about this system.
@@ -75,15 +80,25 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
public static function get_contexts_for_userid(int $userid) : contextlist {
$contextlist = new contextlist();
// Retrieve the User context associated with tool_cohortroles records.
$sql = "SELECT DISTINCT c.id
FROM {context} c
JOIN {tool_cohortroles} cr ON cr.userid = c.instanceid AND c.contextlevel = :contextuser
WHERE cr.userid = :userid";
// When we process user deletions and expiries, we always delete from the user context.
// As a result the cohort role assignments would be deleted, which has a knock-on effect with courses
// as roles may change and data may be removed earlier than it should be.
// Retrieve the context associated with tool_cohortroles records.
$sql = "SELECT DISTINCT c.contextid
FROM {tool_cohortroles} tc
JOIN {cohort} c
ON tc.cohortid = c.id
JOIN {context} ctx
ON ctx.id = c.contextid
WHERE tc.userid = :userid
AND (ctx.contextlevel = :contextlevel1
OR ctx.contextlevel = :contextlevel2)";
$params = [
'contextuser' => CONTEXT_USER,
'userid' => $userid
'userid' => $userid,
'contextlevel1' => CONTEXT_SYSTEM,
'contextlevel2' => CONTEXT_COURSECAT
];
$contextlist->add_from_sql($sql, $params);
@@ -91,6 +106,40 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
return $contextlist;
}
/**
* Get the list of users within a specific 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) {
$context = $userlist->get_context();
// When we process user deletions and expiries, we always delete from the user context.
// As a result the cohort role assignments would be deleted, which has a knock-on effect with courses
// as roles may change and data may be removed earlier than it should be.
$allowedcontextlevels = [
CONTEXT_SYSTEM,
CONTEXT_COURSECAT
];
if (!in_array($context->contextlevel, $allowedcontextlevels)) {
return;
}
$sql = "SELECT tc.userid as userid
FROM {tool_cohortroles} tc
JOIN {cohort} c
ON tc.cohortid = c.id
WHERE c.contextid = :contextid";
$params = [
'contextid' => $context->id
];
$userlist->add_from_sql('userid', $sql, $params);
}
/**
* Export all user data for the specified user, in the specified contexts.
*
@@ -99,24 +148,28 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
public static function export_user_data(approved_contextlist $contextlist) {
global $DB;
// If the user has tool_cohortroles data, then only the User context should be present so get the first context.
$contexts = $contextlist->get_contexts();
if (count($contexts) == 0) {
return;
}
$context = reset($contexts);
// Remove contexts different from SYSTEM or COURSECAT.
$contextids = array_reduce($contextlist->get_contexts(), function($carry, $context) {
if ($context->contextlevel == CONTEXT_SYSTEM || $context->contextlevel == CONTEXT_COURSECAT) {
$carry[] = $context->id;
}
return $carry;
}, []);
// Sanity check that context is at the User context level, then get the userid.
if ($context->contextlevel !== CONTEXT_USER) {
if (empty($contextids)) {
return;
}
$userid = $context->instanceid;
$userid = $contextlist->get_user()->id;
list($contextsql, $contextparams) = $DB->get_in_or_equal($contextids, SQL_PARAMS_NAMED);
// Retrieve the tool_cohortroles records created for the user.
$sql = 'SELECT cr.id as cohortroleid,
$sql = "SELECT cr.id as cohortroleid,
c.name as cohortname,
c.idnumber as cohortidnumber,
c.description as cohortdescription,
c.contextid as contextid,
r.shortname as roleshortname,
cr.userid as userid,
cr.timecreated as timecreated,
@@ -124,13 +177,13 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
FROM {tool_cohortroles} cr
JOIN {cohort} c ON c.id = cr.cohortid
JOIN {role} r ON r.id = cr.roleid
WHERE cr.userid = :userid';
WHERE cr.userid = :userid
AND c.contextid {$contextsql}";
$params = [
'userid' => $userid
];
$params = ['userid' => $userid] + $contextparams;
$cohortroles = $DB->get_records_sql($sql, $params);
foreach ($cohortroles as $cohortrole) {
// The tool_cohortroles data export is organised in:
// {User Context}/Cohort roles management/{cohort name}/{role shortname}/data.json.
@@ -150,6 +203,8 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
'timemodified' => transform::datetime($cohortrole->timemodified)
];
$context = \context::instance_by_id($cohortrole->contextid);
writer::with_context($context)->export_data($subcontext, $data);
}
}
@@ -162,14 +217,70 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
public static function delete_data_for_all_users_in_context(\context $context) {
global $DB;
// Sanity check that context is at the User context level, then get the userid.
if ($context->contextlevel !== CONTEXT_USER) {
// When we process user deletions and expiries, we always delete from the user context.
// As a result the cohort role assignments would be deleted, which has a knock-on effect with courses
// as roles may change and data may be removed earlier than it should be.
$allowedcontextlevels = [
CONTEXT_SYSTEM,
CONTEXT_COURSECAT
];
if (!in_array($context->contextlevel, $allowedcontextlevels)) {
return;
}
$userid = $context->instanceid;
// Delete the tool_cohortroles records created for the userid.
$DB->delete_records('tool_cohortroles', ['userid' => $userid]);
$cohortids = $DB->get_fieldset_select('cohort', 'id', 'contextid = :contextid',
['contextid' => $context->id]);
// Delete the tool_cohortroles records created in the specific context.
$DB->delete_records_list('tool_cohortroles', 'cohortid', $cohortids);
}
/**
* 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) {
global $DB;
// When we process user deletions and expiries, we always delete from the user context.
// As a result the cohort role assignments would be deleted, which has a knock-on effect with courses
// as roles may change and data may be removed earlier than it should be.
$userids = $userlist->get_userids();
if (empty($userids)) {
return;
}
$context = $userlist->get_context();
$allowedcontextlevels = [
CONTEXT_SYSTEM,
CONTEXT_COURSECAT
];
if (!in_array($context->contextlevel, $allowedcontextlevels)) {
return;
}
$cohortids = $DB->get_fieldset_select('cohort', 'id', 'contextid = :contextid',
['contextid' => $context->id]);
if (empty($cohortids)) {
return;
}
list($cohortsql, $cohortparams) = $DB->get_in_or_equal($cohortids, SQL_PARAMS_NAMED);
list($usersql, $userparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);
$params = $cohortparams + $userparams;
$select = "cohortid {$cohortsql} AND userid {$usersql}";
// Delete the tool_cohortroles records created in the specific context for an approved list of users.
$DB->delete_records_select('tool_cohortroles', $select, $params);
}
/**
@@ -180,21 +291,38 @@ class provider implements \core_privacy\local\metadata\provider, \core_privacy\l
public static function delete_data_for_user(approved_contextlist $contextlist) {
global $DB;
// If the user has tool_cohortroles data, then only the User context should be present so get the first context.
$contexts = $contextlist->get_contexts();
if (count($contexts) == 0) {
return;
}
$context = reset($contexts);
// When we process user deletions and expiries, we always delete from the user context.
// As a result the cohort role assignments would be deleted, which has a knock-on effect with courses
// as roles may change and data may be removed earlier than it should be.
// Sanity check that context is at the User context level, then get the userid.
if ($context->contextlevel !== CONTEXT_USER) {
// Remove contexts different from SYSTEM or COURSECAT.
$contextids = array_reduce($contextlist->get_contexts(), function($carry, $context) {
if ($context->contextlevel == CONTEXT_SYSTEM || $context->contextlevel == CONTEXT_COURSECAT) {
$carry[] = $context->id;
}
return $carry;
}, []);
if (empty($contextids)) {
return;
}
$userid = $context->instanceid;
$userid = $contextlist->get_user()->id;
list($contextsql, $contextparams) = $DB->get_in_or_equal($contextids, SQL_PARAMS_NAMED);
$selectcontext = "contextid {$contextsql}";
// Get the cohorts in the specified contexts.
$cohortids = $DB->get_fieldset_select('cohort', 'id', $selectcontext, $contextparams);
if (empty($cohortids)) {
return;
}
list($cohortsql, $cohortparams) = $DB->get_in_or_equal($cohortids, SQL_PARAMS_NAMED);
$selectcohort = "cohortid {$cohortsql} AND userid = :userid";
$params = ['userid' => $userid] + $cohortparams;
// Delete the tool_cohortroles records created for the userid.
$DB->delete_records('tool_cohortroles', ['userid' => $userid]);
$DB->delete_records_select('tool_cohortroles', $selectcohort, $params);
}
}
@@ -43,10 +43,10 @@ $string['selectusers'] = 'Select users to assign role';
$string['taskname'] = 'Sync cohort role assignments';
$string['thisuserroles'] = 'Roles assigned relative to this user';
$string['privacy:metadata:tool_cohortroles'] = 'The Cohort roles management plugin stores user cohort role mappings.';
$string['privacy:metadata:tool_cohortroles:id'] = 'The ID of the cohort role mapping record.';
$string['privacy:metadata:tool_cohortroles:cohortid'] = 'The ID of the cohort.';
$string['privacy:metadata:tool_cohortroles:roleid'] = 'The ID of the role.';
$string['privacy:metadata:tool_cohortroles:userid'] = 'The ID of the user.';
$string['privacy:metadata:tool_cohortroles:timecreated'] = 'The date/time of when the cohort role mapping was created.';
$string['privacy:metadata:tool_cohortroles:timemodified'] = 'The date/time of when the cohort role mapping was modified.';
$string['privacy:metadata:tool_cohortroles:usermodified'] = 'The ID of the user who last modified the cohort role mapping.';
$string['privacy:metadata:tool_cohortroles:id'] = 'The ID of the cohort role mapping record';
$string['privacy:metadata:tool_cohortroles:cohortid'] = 'The ID of the cohort';
$string['privacy:metadata:tool_cohortroles:roleid'] = 'The ID of the role';
$string['privacy:metadata:tool_cohortroles:userid'] = 'The ID of the user';
$string['privacy:metadata:tool_cohortroles:timecreated'] = 'The time when the cohort role mapping was created';
$string['privacy:metadata:tool_cohortroles:timemodified'] = 'The time when the cohort role mapping was modified';
$string['privacy:metadata:tool_cohortroles:usermodified'] = 'The ID of the user who last modified the cohort role mapping';
+219 -46
View File
@@ -30,6 +30,7 @@ use \core_privacy\local\request\writer;
use \core_privacy\local\request\approved_contextlist;
use \tool_cohortroles\api;
use \tool_cohortroles\privacy\provider;
use core_privacy\local\request\approved_userlist;
/**
* Unit tests for the tool_cohortroles implementation of the privacy API.
@@ -57,22 +58,36 @@ class tool_cohortroles_privacy_testcase extends \core_privacy\tests\provider_tes
$this->setUser($user);
$this->setAdminUser();
$nocohortroles = 3;
$this->setup_test_scenario_data($user->id, $nocohortroles);
// Create course category.
$coursecategory = $this->getDataGenerator()->create_category();
$coursecategoryctx = \context_coursecat::instance($coursecategory->id);
$systemctx = context_system::instance();
// Create course.
$course = $this->getDataGenerator()->create_course();
$coursectx = \context_course::instance($course->id);
$this->setup_test_scenario_data($user->id, $systemctx, 1);
$this->setup_test_scenario_data($user->id, $coursecategoryctx, 1, 'Sausage roll 2',
'sausageroll2');
$this->setup_test_scenario_data($user->id, $coursectx, 1, 'Sausage roll 3',
'sausageroll3');
// Test the User's assigned cohortroles matches 3.
$cohortroles = $DB->get_records('tool_cohortroles', ['userid' => $user->id]);
$this->assertCount($nocohortroles, $cohortroles);
$this->assertCount(3, $cohortroles);
// Test the User's retrieved contextlist contains only one context.
// Test the User's retrieved contextlist returns only the system and course category context.
$contextlist = provider::get_contexts_for_userid($user->id);
$contexts = $contextlist->get_contexts();
$this->assertCount(1, $contexts);
$this->assertCount(2, $contexts);
// Test the User's contexts equal the User's own context.
$context = reset($contexts);
$this->assertEquals(CONTEXT_USER, $context->contextlevel);
$this->assertEquals($user->id, $context->instanceid);
$contextlevels = array_column($contexts, 'contextlevel');
$expected = [
CONTEXT_SYSTEM,
CONTEXT_COURSECAT
];
// Test the User's contexts equal the system and course category context.
$this->assertEquals($expected, $contextlevels, '', 0, 10, true);
}
/**
@@ -84,26 +99,45 @@ class tool_cohortroles_privacy_testcase extends \core_privacy\tests\provider_tes
$this->setUser($user);
$this->setAdminUser();
$nocohortroles = 3;
$this->setup_test_scenario_data($user->id, $nocohortroles);
// Create course category.
$coursecategory = $this->getDataGenerator()->create_category();
$coursecategoryctx = \context_coursecat::instance($coursecategory->id);
$systemctx = context_system::instance();
// Create course.
$course = $this->getDataGenerator()->create_course();
$coursectx = \context_course::instance($course->id);
// Test the User's retrieved contextlist contains only one context.
$this->setup_test_scenario_data($user->id, $systemctx, 1);
$this->setup_test_scenario_data($user->id, $coursecategoryctx, 1, 'Sausage roll 2',
'sausageroll2');
$this->setup_test_scenario_data($user->id, $coursectx, 1, 'Sausage roll 3',
'sausageroll3');
// Test the User's retrieved contextlist contains two contexts.
$contextlist = provider::get_contexts_for_userid($user->id);
$contexts = $contextlist->get_contexts();
$this->assertCount(1, $contexts);
$this->assertCount(2, $contexts);
// Test the User's contexts equal the User's own context.
$context = reset($contexts);
$this->assertEquals(CONTEXT_USER, $context->contextlevel);
$this->assertEquals($user->id, $context->instanceid);
// Add a system, course category and course context to the approved context list.
$approvedcontextids = [
$systemctx->id,
$coursecategoryctx->id,
$coursectx->id
];
// Retrieve the User's tool_cohortroles data.
$approvedcontextlist = new approved_contextlist($user, 'tool_cohortroles', $contextlist->get_contextids());
$approvedcontextlist = new approved_contextlist($user, 'tool_cohortroles', $approvedcontextids);
provider::export_user_data($approvedcontextlist);
// Test the tool_cohortroles data is exported at the User context level.
$writer = writer::with_context($context);
// Test the tool_cohortroles data is exported at the system context level.
$writer = writer::with_context($systemctx);
$this->assertTrue($writer->has_any_data());
// Test the tool_cohortroles data is exported at the course category context level.
$writer = writer::with_context($coursecategoryctx);
$this->assertTrue($writer->has_any_data());
// Test the tool_cohortroles data is not exported at the course context level.
$writer = writer::with_context($coursectx);
$this->assertFalse($writer->has_any_data());
}
/**
@@ -117,29 +151,52 @@ class tool_cohortroles_privacy_testcase extends \core_privacy\tests\provider_tes
$this->setUser($user);
$this->setAdminUser();
$nocohortroles = 4;
$this->setup_test_scenario_data($user->id, $nocohortroles);
// Create course category.
$coursecategory = $this->getDataGenerator()->create_category();
$coursecategoryctx = \context_coursecat::instance($coursecategory->id);
$systemctx = context_system::instance();
// Test the User's assigned cohortroles matches 4.
$this->setup_test_scenario_data($user->id, $systemctx, 1);
$this->setup_test_scenario_data($user->id, $coursecategoryctx, 1, 'Sausage roll 2',
'sausageroll2');
// Test the User's assigned cohortroles matches 2.
$cohortroles = $DB->get_records('tool_cohortroles', ['userid' => $user->id]);
$this->assertCount($nocohortroles, $cohortroles);
$this->assertCount(2, $cohortroles);
// Test the User's retrieved contextlist contains only one context.
// Test the User's retrieved contextlist contains two contexts.
$contextlist = provider::get_contexts_for_userid($user->id);
$contexts = $contextlist->get_contexts();
$this->assertCount(2, $contexts);
// Make sure the user data is only being deleted in within the system and course category context.
$usercontext = context_user::instance($user->id);
// Delete all the User's records in mdl_tool_cohortroles table by the user context.
provider::delete_data_for_all_users_in_context($usercontext);
// Test the cohort roles records in mdl_tool_cohortroles table is still present.
$cohortroles = $DB->get_records('tool_cohortroles', ['userid' => $user->id]);
$this->assertCount(2, $cohortroles);
// Delete all the User's records in mdl_tool_cohortroles table by the specified system context.
provider::delete_data_for_all_users_in_context($systemctx);
// The user data in the system context should be deleted.
// Test the User's retrieved contextlist contains one context (course category).
$contextlist = provider::get_contexts_for_userid($user->id);
$contexts = $contextlist->get_contexts();
$this->assertCount(1, $contexts);
// Test the User's contexts equal the User's own context.
$context = reset($contexts);
$this->assertEquals(CONTEXT_USER, $context->contextlevel);
$this->assertEquals($user->id, $context->instanceid);
// Delete all the User's records in mdl_tool_cohortroles table by the specified User context.
provider::delete_data_for_all_users_in_context($context);
// Delete all the User's records in mdl_tool_cohortroles table by the specified course category context.
provider::delete_data_for_all_users_in_context($coursecategoryctx);
// Test the cohort roles records in mdl_tool_cohortroles table is equals zero.
$cohortroles = $DB->get_records('tool_cohortroles', ['userid' => $user->id]);
$this->assertCount(0, $cohortroles);
$contextlist = provider::get_contexts_for_userid($user->id);
$contexts = $contextlist->get_contexts();
$this->assertCount(0, $contexts);
}
/**
@@ -153,24 +210,35 @@ class tool_cohortroles_privacy_testcase extends \core_privacy\tests\provider_tes
$this->setUser($user);
$this->setAdminUser();
$nocohortroles = 4;
$this->setup_test_scenario_data($user->id, $nocohortroles);
// Create course category.
$coursecategory = $this->getDataGenerator()->create_category();
$coursecategoryctx = \context_coursecat::instance($coursecategory->id);
$systemctx = context_system::instance();
// Test the User's assigned cohortroles matches 4.
$this->setup_test_scenario_data($user->id, $systemctx, 1);
$this->setup_test_scenario_data($user->id, $coursecategoryctx, 1, 'Sausage roll 2',
'sausageroll2');
// Test the User's assigned cohortroles matches 2.
$cohortroles = $DB->get_records('tool_cohortroles', ['userid' => $user->id]);
$this->assertCount($nocohortroles, $cohortroles);
$this->assertCount(2, $cohortroles);
// Test the User's retrieved contextlist contains only one context.
// Test the User's retrieved contextlist contains two contexts.
$contextlist = provider::get_contexts_for_userid($user->id);
$contexts = $contextlist->get_contexts();
$this->assertCount(1, $contexts);
$this->assertCount(2, $contexts);
// Test the User's contexts equal the User's own context.
$context = reset($contexts);
$this->assertEquals(CONTEXT_USER, $context->contextlevel);
$this->assertEquals($user->id, $context->instanceid);
// Make sure the user data is only being deleted in within the system and the course category contexts.
$usercontext = context_user::instance($user->id);
// Delete all the User's records in mdl_tool_cohortroles table by the specified approved context list.
$approvedcontextlist = new approved_contextlist($user, 'tool_cohortroles', [$usercontext->id]);
provider::delete_data_for_user($approvedcontextlist);
// Delete all the User's records in mdl_tool_cohortroles table by the specified User approved context list.
// Test the cohort roles records in mdl_tool_cohortroles table are still present.
$cohortroles = $DB->get_records('tool_cohortroles', ['userid' => $user->id]);
$this->assertCount(2, $cohortroles);
// Delete all the User's records in mdl_tool_cohortroles table by the specified approved context list.
$approvedcontextlist = new approved_contextlist($user, 'tool_cohortroles', $contextlist->get_contextids());
provider::delete_data_for_user($approvedcontextlist);
@@ -179,19 +247,124 @@ class tool_cohortroles_privacy_testcase extends \core_privacy\tests\provider_tes
$this->assertCount(0, $cohortroles);
}
/**
* Test that only users within a course context are fetched.
*/
public function test_get_users_in_context() {
$component = 'tool_cohortroles';
// Create a user.
$user = $this->getDataGenerator()->create_user();
$usercontext = context_user::instance($user->id);
// Create course category.
$coursecategory = $this->getDataGenerator()->create_category();
$coursecategoryctx = \context_coursecat::instance($coursecategory->id);
$systemctx = context_system::instance();
$this->setAdminUser();
$userlist = new \core_privacy\local\request\userlist($systemctx, $component);
provider::get_users_in_context($userlist);
$this->assertCount(0, $userlist);
$this->setup_test_scenario_data($user->id, $systemctx, 1);
$this->setup_test_scenario_data($user->id, $coursecategoryctx, 1, 'Sausage roll 2',
'sausageroll2');
// The list of users within the system context should contain user.
provider::get_users_in_context($userlist);
$this->assertCount(1, $userlist);
$this->assertTrue(in_array($user->id, $userlist->get_userids()));
// The list of users within the course category context should contain user.
$userlist = new \core_privacy\local\request\userlist($coursecategoryctx, $component);
provider::get_users_in_context($userlist);
$this->assertCount(1, $userlist);
$this->assertTrue(in_array($user->id, $userlist->get_userids()));
// The list of users within the user context should be empty.
$userlist2 = new \core_privacy\local\request\userlist($usercontext, $component);
provider::get_users_in_context($userlist2);
$this->assertCount(0, $userlist2);
}
/**
* Test that data for users in approved userlist is deleted.
*/
public function test_delete_data_for_users() {
$component = 'tool_cohortroles';
// Create user1.
$user1 = $this->getDataGenerator()->create_user();
// Create user2.
$user2 = $this->getDataGenerator()->create_user();
// Create user3.
$user3 = $this->getDataGenerator()->create_user();
$usercontext3 = context_user::instance($user3->id);
// Create course category.
$coursecategory = $this->getDataGenerator()->create_category();
$coursecategoryctx = \context_coursecat::instance($coursecategory->id);
$systemctx = context_system::instance();
$this->setAdminUser();
$this->setup_test_scenario_data($user1->id, $systemctx, 1);
$this->setup_test_scenario_data($user2->id, $systemctx, 1, 'Sausage roll 2',
'sausageroll2');
$this->setup_test_scenario_data($user3->id, $coursecategoryctx, 1, 'Sausage roll 3',
'sausageroll3');
$userlist1 = new \core_privacy\local\request\userlist($systemctx, $component);
provider::get_users_in_context($userlist1);
$this->assertCount(2, $userlist1);
$this->assertTrue(in_array($user1->id, $userlist1->get_userids()));
$this->assertTrue(in_array($user2->id, $userlist1->get_userids()));
// Convert $userlist1 into an approved_contextlist.
$approvedlist1 = new approved_userlist($systemctx, $component, [$user1->id]);
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist1);
// Re-fetch users in systemcontext.
$userlist1 = new \core_privacy\local\request\userlist($systemctx, $component);
provider::get_users_in_context($userlist1);
// The user data of user1in systemcontext should be deleted.
// The user data of user2 in systemcontext should be still present.
$this->assertCount(1, $userlist1);
$this->assertTrue(in_array($user2->id, $userlist1->get_userids()));
// Convert $userlist1 into an approved_contextlist in the user context.
$approvedlist2 = new approved_userlist($usercontext3, $component, $userlist1->get_userids());
// Delete using delete_data_for_user.
provider::delete_data_for_users($approvedlist2);
// Re-fetch users in systemcontext.
$userlist1 = new \core_privacy\local\request\userlist($systemctx, $component);
provider::get_users_in_context($userlist1);
// The user data in systemcontext should not be deleted.
$this->assertCount(1, $userlist1);
}
/**
* Helper function to setup tool_cohortroles records for testing a specific user.
*
* @param int $userid The ID of the user used for testing.
* @param int $nocohortroles The number of tool_cohortroles to create for the user.
* @param string $rolename The name of the role to be created.
* @param string $roleshortname The short name of the role to be created.
* @throws \core_competency\invalid_persistent_exception
* @throws coding_exception
*/
protected function setup_test_scenario_data($userid, $nocohortroles) {
$roleid = create_role('Sausage Roll', 'sausageroll', 'mmmm');
protected function setup_test_scenario_data($userid, $context, $nocohortroles, $rolename = 'Sausage Roll',
$roleshortname = 'sausageroll') {
$roleid = create_role($rolename, $roleshortname, 'mmmm');
$result = new \stdClass();
$result->contextid = $context->id;
for ($c = 0; $c < $nocohortroles; $c++) {
$cohort = $this->getDataGenerator()->create_cohort();
$cohort = $this->getDataGenerator()->create_cohort($result);
$params = (object)array(
'userid' => $userid,
+3
View File
@@ -38,5 +38,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.5.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -30,7 +30,7 @@ $string['checkin'] = 'Save strings to language pack';
$string['checkout'] = 'Open language pack for editing';
$string['checkoutdone'] = 'Language pack loaded';
$string['checkoutinprogress'] = 'Loading language pack';
$string['confirmcheckin'] = 'You are about to save modifications to your local language pack. This will export the customised strings from the translator into you Moodle data directory and Moodle will start using the modified strings. Press \'Continue\' to proceed with saving.';
$string['confirmcheckin'] = 'You are about to save modifications to your local language pack. This will export the customised strings from the translator into your site data directory and your site will start using the modified strings. Press \'Continue\' to proceed with saving.';
$string['customlang:edit'] = 'Edit local translation';
$string['customlang:view'] = 'View local translation';
$string['filter'] = 'Filter strings';
+6 -4
View File
@@ -134,11 +134,13 @@ class tool_customlang_renderer extends plugin_renderer_base {
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'translatorsubmitted', 'value'=>1));
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'sesskey', 'value'=>sesskey()));
$output .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'p', 'value'=>$translator->currentpage));
$save1 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecontinue', 'value'=>get_string('savecontinue', 'tool_customlang')));
$save2 = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'savecheckin', 'value'=>get_string('savecheckin', 'tool_customlang')));
$output .= html_writer::tag('fieldset', $save1.$save2, array('class'=>'buttonsbar'));
$save1 = html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'savecontinue',
'value' => get_string('savecontinue', 'tool_customlang'), 'class' => 'btn btn-secondary'));
$save2 = html_writer::empty_tag('input', array('type' => 'submit', 'name' => 'savecheckin',
'value' => get_string('savecheckin', 'tool_customlang'), 'class' => 'btn btn-secondary'));
$output .= html_writer::tag('fieldset', $save1 . ' ' . $save2, array('class' => 'buttonsbar'));
$output .= html_writer::table($table);
$output .= html_writer::tag('fieldset', $save1.$save2, array('class'=>'buttonsbar'));
$output .= html_writer::tag('fieldset', $save1 . ' ' . $save2, array('class' => 'buttonsbar'));
$output .= html_writer::end_tag('div');
$output .= html_writer::end_tag('form');
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:'[data-action="deletecategory"]'},h=function(){this.registerEvents()};return h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name"),j=[{key:"deletecategory",component:"tool_dataprivacy",param:i},{key:"deletecategorytext",component:"tool_dataprivacy",param:i}];d.get_strings(j).then(function(d){var g=d[0],i=d[1];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){return d.setSaveButtonText(g),d.getRoot().on(f.save,function(){var d={methodname:"tool_dataprivacy_delete_category",args:{id:h}};b.call([d])[0].done(function(b){b.result?a('tr[data-categoryid="'+h+'"]').remove():c.addNotification({message:b.warnings[0].message,type:"error"})}).fail(c.exception)}),d.getRoot().on(f.hidden,function(){d.destroy()}),d})}).done(function(a){a.show()}).fail(c.exception)})},{init:function(){return new h}}});
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:'[data-action="deletecategory"]'},h=function(){this.registerEvents()};return h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name"),j=[{key:"deletecategory",component:"tool_dataprivacy"},{key:"deletecategorytext",component:"tool_dataprivacy",param:i},{key:"delete"}];d.get_strings(j).then(function(d){var g=d[0],i=d[1],j=d[2];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){return d.setSaveButtonText(j),d.getRoot().on(f.save,function(){var d={methodname:"tool_dataprivacy_delete_category",args:{id:h}};b.call([d])[0].done(function(b){b.result?a('tr[data-categoryid="'+h+'"]').remove():c.addNotification({message:b.warnings[0].message,type:"error"})}).fail(c.exception)}),d.getRoot().on(f.hidden,function(){d.destroy()}),d})}).done(function(a){a.show()}).fail(c.exception)})},{init:function(){return new h}}});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","tool_dataprivacy/events"],function(a,b,c,d,e,f){var g=!1,h={APPROVE_BUTTON:'[data-action="approve"]',DENY_BUTTON:'[data-action="deny"]'},i=function(a){d.call(this,a),this.getFooter().find(h.APPROVE_BUTTON).length||b.exception({message:"No approve button found"}),this.getFooter().find(h.DENY_BUTTON).length||b.exception({message:"No deny button found"})};return i.TYPE="tool_dataprivacy-data_request",i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.prototype.registerEventListeners=function(){d.prototype.registerEventListeners.call(this),this.getModal().on(c.events.activate,h.APPROVE_BUTTON,function(b,c){var d=a.Event(f.approve);this.getRoot().trigger(d,this),d.isDefaultPrevented()||(this.hide(),c.originalEvent.preventDefault())}.bind(this)),this.getModal().on(c.events.activate,h.DENY_BUTTON,function(b,c){var d=a.Event(f.deny);this.getRoot().trigger(d,this),d.isDefaultPrevented()||(this.hide(),c.originalEvent.preventDefault())}.bind(this))},g||(e.register(i.TYPE,i,"tool_dataprivacy/data_request_modal"),g=!0),i});
define(["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","tool_dataprivacy/events"],function(a,b,c,d,e,f){var g=!1,h={APPROVE_BUTTON:'[data-action="approve"]',DENY_BUTTON:'[data-action="deny"]',COMPLETE_BUTTON:'[data-action="complete"]'},i=function(a){d.call(this,a)};return i.TYPE="tool_dataprivacy-data_request",i.prototype=Object.create(d.prototype),i.prototype.constructor=i,i.prototype.registerEventListeners=function(){d.prototype.registerEventListeners.call(this),this.getModal().on(c.events.activate,h.APPROVE_BUTTON,function(b,c){var d=a.Event(f.approve);this.getRoot().trigger(d,this),d.isDefaultPrevented()||(this.hide(),c.originalEvent.preventDefault())}.bind(this)),this.getModal().on(c.events.activate,h.DENY_BUTTON,function(b,c){var d=a.Event(f.deny);this.getRoot().trigger(d,this),d.isDefaultPrevented()||(this.hide(),c.originalEvent.preventDefault())}.bind(this)),this.getModal().on(c.events.activate,h.COMPLETE_BUTTON,function(b,c){var d=a.Event(f.complete);this.getRoot().trigger(d,this),d.isDefaultPrevented()||(this.hide(),c.originalEvent.preventDefault())}.bind(this))},g||(e.register(i.TYPE,i,"tool_dataprivacy/data_request_modal"),g=!0),i});
@@ -0,0 +1 @@
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates"],function(a,b,c,d,e,f,g){function h(b,d,h,j,k,l,m,n){null!==h&&l.forEach(function(a){a.id===h&&(a.selected=!0)}),null!==j&&m.forEach(function(a){a.id===j&&(a.selected=!0)});var o={contextlevel:d,categoryoptions:l,purposeoptions:m};null!==n&&n.length&&(null===k?o.newactivitydefaults=!0:n.forEach(function(a){k===a.name&&(a.selected=!0)}),o.modemodule=!0,o.activityoptions=n),e.create({title:b,body:g.render("tool_dataprivacy/category_purpose_form",o),type:e.types.SAVE_CANCEL,large:!0}).then(function(b){return b.getRoot().on(f.save,function(){var b=a("#activity"),c="undefined"!=typeof b?b.val():null,d=a("#override"),e="undefined"!=typeof d&&d.is(":checked");i(a("#contextlevel").val(),a("#category").val(),a("#purpose").val(),c,e)}),b.getRoot().on(f.hidden,function(){b.destroy()}),b.show(),b})["catch"](c.exception)}function i(a,c,d,e,f){var g={methodname:"tool_dataprivacy_set_context_defaults",args:{contextlevel:a,category:c,purpose:d,override:f,activity:e}};b.call([g])[0].done(function(a){a.result&&window.location.reload()})}var j={EDIT_LEVEL_DEFAULTS:'[data-action="edit-level-defaults"]',NEW_ACTIVITY_DEFAULTS:'[data-action="new-activity-defaults"]',EDIT_ACTIVITY_DEFAULTS:'[data-action="edit-activity-defaults"]',DELETE_ACTIVITY_DEFAULTS:'[data-action="delete-activity-defaults"]'},k=-1,l=function(){this.registerEvents()};return l.prototype.registerEvents=function(){a(j.EDIT_LEVEL_DEFAULTS).click(function(e){e.preventDefault();var f=a(this),g=f.data("contextlevel"),i=f.data("category"),j=f.data("purpose"),k=[{methodname:"tool_dataprivacy_get_category_options",args:{}},{methodname:"tool_dataprivacy_get_purpose_options",args:{}}],l=b.call(k),m=d.get_string("editdefaults","tool_dataprivacy",a("#defaults-header").text());a.when(l[0],l[1],m).then(function(a,b,c){var d=a.options,e=b.options;return h(c,g,i,j,null,d,e,null),!0})["catch"](c.exception)}),a(j.NEW_ACTIVITY_DEFAULTS).click(function(e){e.preventDefault();var f=a(this),g=f.data("contextlevel"),i=[{methodname:"tool_dataprivacy_get_category_options",args:{}},{methodname:"tool_dataprivacy_get_purpose_options",args:{}},{methodname:"tool_dataprivacy_get_activity_options",args:{nodefaults:!0}}],j=b.call(i),k=d.get_string("addnewdefaults","tool_dataprivacy");a.when(j[0],j[1],j[2],k).then(function(a,b,c,d){var e=a.options,f=b.options,i=c.options;return h(d,g,null,null,null,e,f,i),!0})["catch"](c.exception)}),a(j.EDIT_ACTIVITY_DEFAULTS).click(function(e){e.preventDefault();var f=a(this),g=f.data("contextlevel"),i=f.data("category"),j=f.data("purpose"),k=f.data("activityname"),l=[{methodname:"tool_dataprivacy_get_category_options",args:{}},{methodname:"tool_dataprivacy_get_purpose_options",args:{}},{methodname:"tool_dataprivacy_get_activity_options",args:{}}],m=b.call(l),n=d.get_string("editmoduledefaults","tool_dataprivacy");a.when(m[0],m[1],m[2],n).then(function(a,b,c,d){var e=a.options,f=b.options,l=c.options;return h(d,g,i,j,k,e,f,l),!0})["catch"](c.exception)}),a(j.DELETE_ACTIVITY_DEFAULTS).click(function(b){b.preventDefault();var h=a(this),j=h.data("contextlevel"),l=h.data("activityname"),m=h.data("activitydisplayname"),n=k,o=k;e.create({title:d.get_string("deletedefaults","tool_dataprivacy",m),body:g.render("tool_dataprivacy/delete_activity_defaults",{activityname:m}),type:e.types.SAVE_CANCEL,large:!0}).then(function(a){return a.setSaveButtonText(d.get_string("delete")),a.getRoot().on(f.save,function(){i(j,n,o,l,!1)}),a.getRoot().on(f.hidden,function(){a.destroy()}),a.show(),!0})["catch"](c.exception)})},{init:function(){return new l}}});
+1 -1
View File
@@ -1 +1 @@
define([],function(){return{approve:"tool_dataprivacy-data_request:approve",deny:"tool_dataprivacy-data_request:deny"}});
define([],function(){return{approve:"tool_dataprivacy-data_request:approve",bulkApprove:"tool_dataprivacy-data_request:bulk_approve",deny:"tool_dataprivacy-data_request:deny",bulkDeny:"tool_dataprivacy-data_request:bulk_deny",complete:"tool_dataprivacy-data_request:complete"}});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:'[data-action="deletepurpose"]'},h=function(){this.registerEvents()};return h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name"),j=[{key:"deletepurpose",component:"tool_dataprivacy",param:i},{key:"deletepurposetext",component:"tool_dataprivacy",param:i}];d.get_strings(j).then(function(d){var g=d[0],i=d[1];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){return d.setSaveButtonText(g),d.getRoot().on(f.save,function(){var d={methodname:"tool_dataprivacy_delete_purpose",args:{id:h}};b.call([d])[0].done(function(b){b.result?a('tr[data-purposeid="'+h+'"]').remove():c.addNotification({message:b.warnings[0].message,type:"error"})}).fail(c.exception)}),d.getRoot().on(f.hidden,function(){d.destroy()}),d})}).done(function(a){a.show()}).fail(c.exception)})},{init:function(){return new h}}});
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:'[data-action="deletepurpose"]'},h=function(){this.registerEvents()};return h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name"),j=[{key:"deletepurpose",component:"tool_dataprivacy"},{key:"deletepurposetext",component:"tool_dataprivacy",param:i},{key:"delete"}];d.get_strings(j).then(function(d){var g=d[0],i=d[1],j=d[2];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){return d.setSaveButtonText(j),d.getRoot().on(f.save,function(){var d={methodname:"tool_dataprivacy_delete_purpose",args:{id:h}};b.call([d])[0].done(function(b){b.result?a('tr[data-purposeid="'+h+'"]').remove():c.addNotification({message:b.warnings[0].message,type:"error"})}).fail(c.exception)}),d.getRoot().on(f.hidden,function(){d.destroy()}),d})}).done(function(a){a.show()}).fail(c.exception)})},{init:function(){return new h}}});
@@ -0,0 +1 @@
define(["jquery","core/form-autocomplete","core/str","core/notification"],function(a,b,c,d){var e={REQUEST_FILTERS:"#request-filters"},f=function(){var f=[{key:"filter",component:"moodle"},{key:"nofiltersapplied",component:"moodle"}];c.get_strings(f).then(function(a){var c=a[0],d=a[1];return b.enhance(e.REQUEST_FILTERS,!1,"",c,!1,!0,d,!0)}).fail(d.exception);var g=a(e.REQUEST_FILTERS).val();a(e.REQUEST_FILTERS).on("change",function(){var b=a(this).val();g.join(",")!==b.join(",")&&(0===b.length&&a("#filters-cleared").val(1),a(this.form).submit())})};return{init:function(){f()}}});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates","tool_dataprivacy/data_request_modal","tool_dataprivacy/events"],function(a,b,c,d,e,f,g,h,i){function j(a,g){var h=[],j="";switch(a){case i.approve:h=[{key:"approverequest",component:"tool_dataprivacy"},{key:"confirmapproval",component:"tool_dataprivacy"}],j="tool_dataprivacy_approve_data_request";break;case i.deny:h=[{key:"denyrequest",component:"tool_dataprivacy"},{key:"confirmdenial",component:"tool_dataprivacy"}],j="tool_dataprivacy_deny_data_request"}var k="";d.get_strings(h).then(function(a){k=a[0];var b=a[1];return e.create({title:k,body:b,type:e.types.SAVE_CANCEL})}).then(function(a){return a.setSaveButtonText(k),a.getRoot().on(f.save,function(){var a={requestid:g},d={methodname:j,args:a};b.call([d])[0].done(function(a){a.result?window.location.reload():c.addNotification({message:a.warnings[0].message,type:"error"})}).fail(c.exception)}),a.getRoot().on(f.hidden,function(){a.destroy()}),a}).done(function(a){a.show()}).fail(c.exception)}var k={APPROVE_REQUEST:'[data-action="approve"]',DENY_REQUEST:'[data-action="deny"]',VIEW_REQUEST:'[data-action="view"]'},l=function(){this.registerEvents()};return l.prototype.registerEvents=function(){a(k.VIEW_REQUEST).click(function(d){d.preventDefault();var k=a(this).data("requestid"),l={requestid:k},m={methodname:"tool_dataprivacy_get_data_request",args:l},n=b.call([m]),o="",p=e.types.DEFAULT;a.when(n[0]).then(function(a){return a.result?(2==a.result.status&&(p=h.TYPE),o=a.result.typename,g.render("tool_dataprivacy/request_details",a.result)):(c.addNotification({message:a.warnings[0].message,type:"error"}),!1)}).then(function(a){return e.create({title:o,body:a,type:p,large:!0}).then(function(a){return a.getRoot().on(i.approve,function(){j(i.approve,k)}),a.getRoot().on(i.deny,function(){j(i.deny,k)}),a.getRoot().on(f.hidden,function(){a.destroy()}),a})}).done(function(a){a.show()}).fail(c.exception)}),a(k.APPROVE_REQUEST).click(function(b){b.preventDefault();var c=a(this).data("requestid");j(i.approve,c)}),a(k.DENY_REQUEST).click(function(b){b.preventDefault();var c=a(this).data("requestid");j(i.deny,c)})},l});
define(["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates","tool_dataprivacy/data_request_modal","tool_dataprivacy/events"],function(a,b,c,d,e,f,g,h,i){function j(a){return{wsfunction:"tool_dataprivacy_approve_data_request",wsparams:{requestid:a}}}function k(a){return{wsfunction:"tool_dataprivacy_bulk_approve_data_requests",wsparams:{requestids:a}}}function l(a){return{wsfunction:"tool_dataprivacy_deny_data_request",wsparams:{requestid:a}}}function m(a){return{wsfunction:"tool_dataprivacy_bulk_deny_data_requests",wsparams:{requestids:a}}}function n(a){return{wsfunction:"tool_dataprivacy_mark_complete",wsparams:{requestid:a}}}function o(a,b){var g=[];switch(a){case i.approve:g=[{key:"approverequest",component:"tool_dataprivacy"},{key:"confirmapproval",component:"tool_dataprivacy"}];break;case i.bulkApprove:g=[{key:"bulkapproverequests",component:"tool_dataprivacy"},{key:"confirmbulkapproval",component:"tool_dataprivacy"}];break;case i.deny:g=[{key:"denyrequest",component:"tool_dataprivacy"},{key:"confirmdenial",component:"tool_dataprivacy"}];break;case i.bulkDeny:g=[{key:"bulkdenyrequests",component:"tool_dataprivacy"},{key:"confirmbulkdenial",component:"tool_dataprivacy"}];break;case i.complete:g=[{key:"markcomplete",component:"tool_dataprivacy"},{key:"confirmcompletion",component:"tool_dataprivacy"}]}var h="";d.get_strings(g).then(function(a){h=a[0];var b=a[1];return e.create({title:h,body:b,type:e.types.SAVE_CANCEL})}).then(function(a){a.setSaveButtonText(h),a.getRoot().on(f.save,function(){p(b.wsfunction,b.wsparams)}),a.getRoot().on(f.hidden,function(){a.destroy()}),a.show()})["catch"](c.exception)}function p(a,d){var e={methodname:a,args:d};b.call([e])[0].done(function(a){a.result?window.location.reload():c.addNotification({message:a.warnings[0].message,type:"error"})}).fail(c.exception)}var q={APPROVE_REQUEST:'[data-action="approve"]',DENY_REQUEST:'[data-action="deny"]',VIEW_REQUEST:'[data-action="view"]',MARK_COMPLETE:'[data-action="complete"]',CHANGE_BULK_ACTION:'[id="bulk-action"]',CONFIRM_BULK_ACTION:'[id="confirm-bulk-action"]',SELECT_ALL:'[data-action="selectall"]'},r={APPROVE:1,DENY:2},s={SELECT_REQUEST:".selectrequests"},t=function(){this.registerEvents()};return t.prototype.registerEvents=function(){a(q.VIEW_REQUEST).click(function(d){d.preventDefault();var k=a(this).data("requestid"),m={requestid:k},n={methodname:"tool_dataprivacy_get_data_request",args:m},q=b.call([n]);a.when(q[0]).then(function(a){return a.result?a.result:(c.addNotification({message:a.warnings[0].message,type:"error"}),!1)}).then(function(a){var b=g.render("tool_dataprivacy/request_details",a),c={approvedeny:a.approvedeny,canmarkcomplete:a.canmarkcomplete};return e.create({title:a.typename,body:b,type:h.TYPE,large:!0,templateContext:c})}).then(function(a){a.getRoot().on(i.approve,function(){o(i.approve,j(k))}),a.getRoot().on(i.deny,function(){o(i.deny,l(k))}),a.getRoot().on(i.complete,function(){var a={requestid:k};p("tool_dataprivacy_mark_complete",a)}),a.getRoot().on(f.hidden,function(){a.destroy()}),a.show()})["catch"](c.exception)}),a(q.APPROVE_REQUEST).click(function(b){b.preventDefault();var c=a(this).data("requestid");o(i.approve,j(c))}),a(q.DENY_REQUEST).click(function(b){b.preventDefault();var c=a(this).data("requestid");o(i.deny,l(c))}),a(q.MARK_COMPLETE).click(function(b){b.preventDefault();var c=a(this).data("requestid");o(i.complete,n(c))}),a(q.CONFIRM_BULK_ACTION).click(function(){var b=[],e="",f={},g=[{key:"selectbulkaction",component:"tool_dataprivacy"},{key:"selectdatarequests",component:"tool_dataprivacy"},{key:"ok"}],h=parseInt(a("#bulk-action").val());if(h!=r.APPROVE&&h!=r.DENY)return void d.get_strings(g).done(function(a){c.alert("",a[0],a[2])}).fail(c.exception);if(a(".selectrequests:checked").each(function(){b.push(a(this).val())}),b.length<1)return void d.get_strings(g).done(function(a){c.alert("",a[1],a[2])}).fail(c.exception);switch(h){case r.APPROVE:e=i.bulkApprove,f=k(b);break;case r.DENY:e=i.bulkDeny,f=m(b)}o(e,f)}),a(q.SELECT_ALL).change(function(b){b.preventDefault();var c=a(this).is(":checked");a(s.SELECT_REQUEST).prop("checked",c)})},t});
@@ -58,25 +58,28 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents) {
var stringkeys = [
{
key: 'deletecategory',
component: 'tool_dataprivacy',
param: categoryname
component: 'tool_dataprivacy'
},
{
key: 'deletecategorytext',
component: 'tool_dataprivacy',
param: categoryname
},
{
key: 'delete'
}
];
Str.get_strings(stringkeys).then(function(langStrings) {
var title = langStrings[0];
var confirmMessage = langStrings[1];
var buttonText = langStrings[2];
return ModalFactory.create({
title: title,
body: confirmMessage,
type: ModalFactory.types.SAVE_CANCEL
}).then(function(modal) {
modal.setSaveButtonText(title);
modal.setSaveButtonText(buttonText);
// Handle save event.
modal.getRoot().on(ModalEvents.save, function() {
@@ -234,6 +234,7 @@ define(['jquery', 'core/str', 'core/ajax', 'core/notification', 'core/templates'
},
fail: Notification.exception
}]);
return;
}).catch(Notification.exception);
};
@@ -29,6 +29,7 @@ define(['jquery', 'core/notification', 'core/custom_interaction_events', 'core/m
var SELECTORS = {
APPROVE_BUTTON: '[data-action="approve"]',
DENY_BUTTON: '[data-action="deny"]',
COMPLETE_BUTTON: '[data-action="complete"]'
};
/**
@@ -38,14 +39,6 @@ define(['jquery', 'core/notification', 'core/custom_interaction_events', 'core/m
*/
var ModalDataRequest = function(root) {
Modal.call(this, root);
if (!this.getFooter().find(SELECTORS.APPROVE_BUTTON).length) {
Notification.exception({message: 'No approve button found'});
}
if (!this.getFooter().find(SELECTORS.DENY_BUTTON).length) {
Notification.exception({message: 'No deny button found'});
}
};
ModalDataRequest.TYPE = 'tool_dataprivacy-data_request';
@@ -80,6 +73,16 @@ define(['jquery', 'core/notification', 'core/custom_interaction_events', 'core/m
data.originalEvent.preventDefault();
}
}.bind(this));
this.getModal().on(CustomEvents.events.activate, SELECTORS.COMPLETE_BUTTON, function(e, data) {
var completeEvent = $.Event(DataPrivacyEvents.complete);
this.getRoot().trigger(completeEvent, this);
if (!completeEvent.isDefaultPrevented()) {
this.hide();
data.originalEvent.preventDefault();
}
}.bind(this));
};
// Automatically register with the modal registry the first time this module is imported so that you can create modals
@@ -0,0 +1,315 @@
// 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/>.
/**
* AMD module for data registry defaults actions.
*
* @module tool_dataprivacy/defaultsactions
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define([
'jquery',
'core/ajax',
'core/notification',
'core/str',
'core/modal_factory',
'core/modal_events',
'core/templates'],
function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates) {
/**
* List of action selectors.
*
* @type {{EDIT_LEVEL_DEFAULTS: string}}
* @type {{NEW_ACTIVITY_DEFAULTS: string}}
* @type {{EDIT_ACTIVITY_DEFAULTS: string}}
* @type {{DELETE_ACTIVITY_DEFAULTS: string}}
*/
var ACTIONS = {
EDIT_LEVEL_DEFAULTS: '[data-action="edit-level-defaults"]',
NEW_ACTIVITY_DEFAULTS: '[data-action="new-activity-defaults"]',
EDIT_ACTIVITY_DEFAULTS: '[data-action="edit-activity-defaults"]',
DELETE_ACTIVITY_DEFAULTS: '[data-action="delete-activity-defaults"]'
};
/** @type {{INHERIT: Number}} **/
var INHERIT = -1;
/**
* DefaultsActions class.
*/
var DefaultsActions = function() {
this.registerEvents();
};
/**
* Register event listeners.
*/
DefaultsActions.prototype.registerEvents = function() {
$(ACTIONS.EDIT_LEVEL_DEFAULTS).click(function(e) {
e.preventDefault();
var button = $(this);
var contextLevel = button.data('contextlevel');
var category = button.data('category');
var purpose = button.data('purpose');
// Get options.
var requests = [
{methodname: 'tool_dataprivacy_get_category_options', args: {}},
{methodname: 'tool_dataprivacy_get_purpose_options', args: {}}
];
var promises = Ajax.call(requests);
var titlePromise = Str.get_string('editdefaults', 'tool_dataprivacy', $('#defaults-header').text());
$.when(promises[0], promises[1], titlePromise).then(function(categoryResponse, purposeResponse, title) {
var categories = categoryResponse.options;
var purposes = purposeResponse.options;
showDefaultsFormModal(title, contextLevel, category, purpose, null, categories, purposes, null);
return true;
}).catch(Notification.exception);
});
$(ACTIONS.NEW_ACTIVITY_DEFAULTS).click(function(e) {
e.preventDefault();
var button = $(this);
var contextLevel = button.data('contextlevel');
// Get options.
var requests = [
{methodname: 'tool_dataprivacy_get_category_options', args: {}},
{methodname: 'tool_dataprivacy_get_purpose_options', args: {}},
{methodname: 'tool_dataprivacy_get_activity_options', args: {'nodefaults': true}}
];
var promises = Ajax.call(requests);
var titlePromise = Str.get_string('addnewdefaults', 'tool_dataprivacy');
$.when(promises[0], promises[1], promises[2], titlePromise).then(
function(categoryResponse, purposeResponse, activityResponse, title) {
var categories = categoryResponse.options;
var purposes = purposeResponse.options;
var activities = activityResponse.options;
showDefaultsFormModal(title, contextLevel, null, null, null, categories, purposes, activities);
return true;
}).catch(Notification.exception);
}
);
$(ACTIONS.EDIT_ACTIVITY_DEFAULTS).click(function(e) {
e.preventDefault();
var button = $(this);
var contextLevel = button.data('contextlevel');
var category = button.data('category');
var purpose = button.data('purpose');
var activity = button.data('activityname');
// Get options.
var requests = [
{methodname: 'tool_dataprivacy_get_category_options', args: {}},
{methodname: 'tool_dataprivacy_get_purpose_options', args: {}},
{methodname: 'tool_dataprivacy_get_activity_options', args: {}}
];
var promises = Ajax.call(requests);
var titlePromise = Str.get_string('editmoduledefaults', 'tool_dataprivacy');
$.when(promises[0], promises[1], promises[2], titlePromise).then(
function(categoryResponse, purposeResponse, activityResponse, title) {
var categories = categoryResponse.options;
var purposes = purposeResponse.options;
var activities = activityResponse.options;
showDefaultsFormModal(title, contextLevel, category, purpose, activity, categories, purposes, activities);
return true;
}).catch(Notification.exception);
}
);
$(ACTIONS.DELETE_ACTIVITY_DEFAULTS).click(function(e) {
e.preventDefault();
var button = $(this);
var contextLevel = button.data('contextlevel');
var activity = button.data('activityname');
var activityDisplayName = button.data('activitydisplayname');
// Set category and purpose to inherit (-1).
var category = INHERIT;
var purpose = INHERIT;
ModalFactory.create({
title: Str.get_string('deletedefaults', 'tool_dataprivacy', activityDisplayName),
body: Templates.render('tool_dataprivacy/delete_activity_defaults', {"activityname": activityDisplayName}),
type: ModalFactory.types.SAVE_CANCEL,
large: true
}).then(function(modal) {
modal.setSaveButtonText(Str.get_string('delete'));
// Handle save event.
modal.getRoot().on(ModalEvents.save, function() {
setContextDefaults(contextLevel, category, purpose, activity, false);
});
// Handle hidden event.
modal.getRoot().on(ModalEvents.hidden, function() {
// Destroy when hidden.
modal.destroy();
});
modal.show();
return true;
}).catch(Notification.exception);
});
};
/**
* Prepares and renders the modal for setting the defaults for the given context level/plugin.
*
* @param {String} title The modal's title.
* @param {Number} contextLevel The context level to set defaults for.
* @param {Number} category The current category ID.
* @param {Number} purpose The current purpose ID.
* @param {String} activity The plugin name of the activity. Optional.
* @param {Array} categoryOptions The list of category options.
* @param {Array} purposeOptions The list of purpose options.
* @param {Array} activityOptions The list of activity options. Optional.
*/
function showDefaultsFormModal(title, contextLevel, category, purpose, activity,
categoryOptions, purposeOptions, activityOptions) {
if (category !== null) {
categoryOptions.forEach(function(currentValue) {
if (currentValue.id === category) {
currentValue.selected = true;
}
});
}
if (purpose !== null) {
purposeOptions.forEach(function(currentValue) {
if (currentValue.id === purpose) {
currentValue.selected = true;
}
});
}
var templateContext = {
"contextlevel": contextLevel,
"categoryoptions": categoryOptions,
"purposeoptions": purposeOptions
};
// Check the activityOptions parameter that was passed.
if (activityOptions !== null && activityOptions.length) {
// Check the activity parameter that was passed.
if (activity === null) {
// We're setting a new defaults for a module.
templateContext.newactivitydefaults = true;
} else {
// Edit mode. Set selection.
activityOptions.forEach(function(currentValue) {
if (activity === currentValue.name) {
currentValue.selected = true;
}
});
}
templateContext.modemodule = true;
templateContext.activityoptions = activityOptions;
}
ModalFactory.create({
title: title,
body: Templates.render('tool_dataprivacy/category_purpose_form', templateContext),
type: ModalFactory.types.SAVE_CANCEL,
large: true
}).then(function(modal) {
// Handle save event.
modal.getRoot().on(ModalEvents.save, function() {
var activity = $('#activity');
var activityVal = typeof activity !== 'undefined' ? activity.val() : null;
var override = $('#override');
var overrideVal = typeof override !== 'undefined' ? override.is(':checked') : false;
setContextDefaults($('#contextlevel').val(), $('#category').val(), $('#purpose').val(), activityVal, overrideVal);
});
// Handle hidden event.
modal.getRoot().on(ModalEvents.hidden, function() {
// Destroy when hidden.
modal.destroy();
});
modal.show();
return modal;
}).catch(Notification.exception);
}
/**
* Calls a the tool_dataprivacy_set_context_defaults WS function.
*
* @param {Number} contextLevel The context level.
* @param {Number} category The category ID.
* @param {Number} purpose The purpose ID.
* @param {String} activity The plugin name of the activity module.
* @param {Boolean} override Whether to override custom instances.
*/
function setContextDefaults(contextLevel, category, purpose, activity, override) {
var request = {
methodname: 'tool_dataprivacy_set_context_defaults',
args: {
'contextlevel': contextLevel,
'category': category,
'purpose': purpose,
'override': override,
'activity': activity
}
};
Ajax.call([request])[0].done(function(data) {
if (data.result) {
window.location.reload();
}
});
}
return /** @alias module:tool_dataprivacy/defaultsactions */ {
// Public variables and functions.
/**
* Initialise the module.
*
* @method init
* @return {DefaultsActions}
*/
'init': function() {
return new DefaultsActions();
}
};
});
+3
View File
@@ -25,6 +25,9 @@
define([], function() {
return {
approve: 'tool_dataprivacy-data_request:approve',
bulkApprove: 'tool_dataprivacy-data_request:bulk_approve',
deny: 'tool_dataprivacy-data_request:deny',
bulkDeny: 'tool_dataprivacy-data_request:bulk_deny',
complete: 'tool_dataprivacy-data_request:complete'
};
});
@@ -34,7 +34,6 @@ define(['jquery', 'core/url', 'core/str'], function($, url, str) {
*
* @param {object} targetnode The node that we want to expand / collapse
* @param {object} thisnode The node that was clicked.
* @return {null}
*/
expandCollapse: function(targetnode, thisnode) {
if (targetnode.hasClass('hide')) {
@@ -58,7 +57,6 @@ define(['jquery', 'core/url', 'core/str'], function($, url, str) {
* Expand or collapse all nodes on this page.
*
* @param {string} nextstate The next state to change to.
* @return {null}
*/
expandCollapseAll: function(nextstate) {
var currentstate = (nextstate == 'visible') ? 'hide' : 'visible';
@@ -75,6 +73,7 @@ define(['jquery', 'core/url', 'core/str'], function($, url, str) {
str.get_string(currentstate, 'tool_dataprivacy').then(function(langString) {
$('.tool_dataprivacy-expand-all').html(langString);
return;
}).catch(Notification.exception);
$(':header i.fa').each(function() {
@@ -58,25 +58,28 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents) {
var stringkeys = [
{
key: 'deletepurpose',
component: 'tool_dataprivacy',
param: purposename
component: 'tool_dataprivacy'
},
{
key: 'deletepurposetext',
component: 'tool_dataprivacy',
param: purposename
},
{
key: 'delete'
}
];
Str.get_strings(stringkeys).then(function(langStrings) {
var title = langStrings[0];
var confirmMessage = langStrings[1];
var buttonText = langStrings[2];
return ModalFactory.create({
title: title,
body: confirmMessage,
type: ModalFactory.types.SAVE_CANCEL
}).then(function(modal) {
modal.setSaveButtonText(title);
modal.setSaveButtonText(buttonText);
// Handle save event.
modal.getRoot().on(ModalEvents.save, function() {
@@ -0,0 +1,84 @@
// 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/>.
/**
* JS module for the data requests filter.
*
* @module tool_dataprivacy/request_filter
* @package tool_dataprivacy
* @copyright 2018 Jun Pataleta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/form-autocomplete', 'core/str', 'core/notification'], function($, Autocomplete, Str, Notification) {
/**
* Selectors.
*
* @access private
* @type {{REQUEST_FILTERS: string}}
*/
var SELECTORS = {
REQUEST_FILTERS: '#request-filters'
};
/**
* Init function.
*
* @method init
* @private
*/
var init = function() {
var stringkeys = [
{
key: 'filter',
component: 'moodle'
},
{
key: 'nofiltersapplied',
component: 'moodle'
}
];
Str.get_strings(stringkeys).then(function(langstrings) {
var placeholder = langstrings[0];
var noSelectionString = langstrings[1];
return Autocomplete.enhance(SELECTORS.REQUEST_FILTERS, false, '', placeholder, false, true, noSelectionString, true);
}).fail(Notification.exception);
var last = $(SELECTORS.REQUEST_FILTERS).val();
$(SELECTORS.REQUEST_FILTERS).on('change', function() {
var current = $(this).val();
// Prevent form from submitting unnecessarily, eg. on blur when no filter is selected.
if (last.join(',') !== current.join(',')) {
// If we're submitting without filters, set the hidden input 'filters-cleared' to 1.
if (current.length === 0) {
$('#filters-cleared').val(1);
}
$(this.form).submit();
}
});
};
return /** @alias module:core/form-autocomplete */ {
/**
* Initialise the unified user filter.
*
* @method init
*/
init: function() {
init();
}
};
});
+277 -63
View File
@@ -39,11 +39,39 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Modal
* @type {{APPROVE_REQUEST: string}}
* @type {{DENY_REQUEST: string}}
* @type {{VIEW_REQUEST: string}}
* @type {{MARK_COMPLETE: string}}
* @type {{CHANGE_BULK_ACTION: string}}
* @type {{CONFIRM_BULK_ACTION: string}}
* @type {{SELECT_ALL: string}}
*/
var ACTIONS = {
APPROVE_REQUEST: '[data-action="approve"]',
DENY_REQUEST: '[data-action="deny"]',
VIEW_REQUEST: '[data-action="view"]'
VIEW_REQUEST: '[data-action="view"]',
MARK_COMPLETE: '[data-action="complete"]',
CHANGE_BULK_ACTION: '[id="bulk-action"]',
CONFIRM_BULK_ACTION: '[id="confirm-bulk-action"]',
SELECT_ALL: '[data-action="selectall"]'
};
/**
* List of available bulk actions.
*
* @type {{APPROVE: number}}
* @type {{DENY: number}}
*/
var BULK_ACTIONS = {
APPROVE: 1,
DENY: 2
};
/**
* List of selectors.
*
* @type {{SELECT_REQUEST: string}}
*/
var SELECTORS = {
SELECT_REQUEST: '.selectrequests'
};
/**
@@ -73,16 +101,9 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Modal
};
var promises = Ajax.call([request]);
var modalTitle = '';
var modalType = ModalFactory.types.DEFAULT;
$.when(promises[0]).then(function(data) {
if (data.result) {
// Check if the status is awaiting approval.
if (data.result.status == 2) {
modalType = ModalDataRequest.TYPE;
}
modalTitle = data.result.typename;
return Templates.render('tool_dataprivacy/request_details', data.result);
return data.result;
}
// Fail.
Notification.addNotification({
@@ -91,61 +112,209 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Modal
});
return false;
}).then(function(html) {
}).then(function(data) {
var body = Templates.render('tool_dataprivacy/request_details', data);
var templateContext = {
approvedeny: data.approvedeny,
canmarkcomplete: data.canmarkcomplete
};
return ModalFactory.create({
title: modalTitle,
body: html,
type: modalType,
large: true
}).then(function(modal) {
// Handle approve event.
modal.getRoot().on(DataPrivacyEvents.approve, function() {
showConfirmation(DataPrivacyEvents.approve, requestId);
});
// Handle deny event.
modal.getRoot().on(DataPrivacyEvents.deny, function() {
showConfirmation(DataPrivacyEvents.deny, requestId);
});
// Handle hidden event.
modal.getRoot().on(ModalEvents.hidden, function() {
// Destroy when hidden.
modal.destroy();
});
return modal;
title: data.typename,
body: body,
type: ModalDataRequest.TYPE,
large: true,
templateContext: templateContext
});
}).done(function(modal) {
}).then(function(modal) {
// Handle approve event.
modal.getRoot().on(DataPrivacyEvents.approve, function() {
showConfirmation(DataPrivacyEvents.approve, approveEventWsData(requestId));
});
// Handle deny event.
modal.getRoot().on(DataPrivacyEvents.deny, function() {
showConfirmation(DataPrivacyEvents.deny, denyEventWsData(requestId));
});
// Handle send event.
modal.getRoot().on(DataPrivacyEvents.complete, function() {
var params = {
'requestid': requestId
};
handleSave('tool_dataprivacy_mark_complete', params);
});
// Handle hidden event.
modal.getRoot().on(ModalEvents.hidden, function() {
// Destroy when hidden.
modal.destroy();
});
// Show the modal!
modal.show();
}).fail(Notification.exception);
return;
}).catch(Notification.exception);
});
$(ACTIONS.APPROVE_REQUEST).click(function(e) {
e.preventDefault();
var requestId = $(this).data('requestid');
showConfirmation(DataPrivacyEvents.approve, requestId);
showConfirmation(DataPrivacyEvents.approve, approveEventWsData(requestId));
});
$(ACTIONS.DENY_REQUEST).click(function(e) {
e.preventDefault();
var requestId = $(this).data('requestid');
showConfirmation(DataPrivacyEvents.deny, requestId);
showConfirmation(DataPrivacyEvents.deny, denyEventWsData(requestId));
});
$(ACTIONS.MARK_COMPLETE).click(function(e) {
e.preventDefault();
var requestId = $(this).data('requestid');
showConfirmation(DataPrivacyEvents.complete, completeEventWsData(requestId));
});
$(ACTIONS.CONFIRM_BULK_ACTION).click(function() {
var requestIds = [];
var actionEvent = '';
var wsdata = {};
var bulkActionKeys = [
{
key: 'selectbulkaction',
component: 'tool_dataprivacy'
},
{
key: 'selectdatarequests',
component: 'tool_dataprivacy'
},
{
key: 'ok'
}
];
var bulkaction = parseInt($('#bulk-action').val());
if (bulkaction != BULK_ACTIONS.APPROVE && bulkaction != BULK_ACTIONS.DENY) {
Str.get_strings(bulkActionKeys).done(function(langStrings) {
Notification.alert('', langStrings[0], langStrings[2]);
}).fail(Notification.exception);
return;
}
$(".selectrequests:checked").each(function() {
requestIds.push($(this).val());
});
if (requestIds.length < 1) {
Str.get_strings(bulkActionKeys).done(function(langStrings) {
Notification.alert('', langStrings[1], langStrings[2]);
}).fail(Notification.exception);
return;
}
switch (bulkaction) {
case BULK_ACTIONS.APPROVE:
actionEvent = DataPrivacyEvents.bulkApprove;
wsdata = bulkApproveEventWsData(requestIds);
break;
case BULK_ACTIONS.DENY:
actionEvent = DataPrivacyEvents.bulkDeny;
wsdata = bulkDenyEventWsData(requestIds);
}
showConfirmation(actionEvent, wsdata);
});
$(ACTIONS.SELECT_ALL).change(function(e) {
e.preventDefault();
var selectAll = $(this).is(':checked');
$(SELECTORS.SELECT_REQUEST).prop('checked', selectAll);
});
};
/**
* Return the webservice data for the approve request action.
*
* @param {Number} requestId The ID of the request.
* @return {Object}
*/
function approveEventWsData(requestId) {
return {
'wsfunction': 'tool_dataprivacy_approve_data_request',
'wsparams': {'requestid': requestId}
};
}
/**
* Return the webservice data for the bulk approve request action.
*
* @param {Array} requestIds The array of request ID's.
* @return {Object}
*/
function bulkApproveEventWsData(requestIds) {
return {
'wsfunction': 'tool_dataprivacy_bulk_approve_data_requests',
'wsparams': {'requestids': requestIds}
};
}
/**
* Return the webservice data for the deny request action.
*
* @param {Number} requestId The ID of the request.
* @return {Object}
*/
function denyEventWsData(requestId) {
return {
'wsfunction': 'tool_dataprivacy_deny_data_request',
'wsparams': {'requestid': requestId}
};
}
/**
* Return the webservice data for the bulk deny request action.
*
* @param {Array} requestIds The array of request ID's.
* @return {Object}
*/
function bulkDenyEventWsData(requestIds) {
return {
'wsfunction': 'tool_dataprivacy_bulk_deny_data_requests',
'wsparams': {'requestids': requestIds}
};
}
/**
* Return the webservice data for the complete request action.
*
* @param {Number} requestId The ID of the request.
* @return {Object}
*/
function completeEventWsData(requestId) {
return {
'wsfunction': 'tool_dataprivacy_mark_complete',
'wsparams': {'requestid': requestId}
};
}
/**
* Show the confirmation dialogue.
*
* @param {String} action The action name.
* @param {Number} requestId The request ID.
* @param {Object} wsdata Object containing ws data.
*/
function showConfirmation(action, requestId) {
function showConfirmation(action, wsdata) {
var keys = [];
var wsfunction = '';
switch (action) {
case DataPrivacyEvents.approve:
keys = [
@@ -158,7 +327,18 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Modal
component: 'tool_dataprivacy'
}
];
wsfunction = 'tool_dataprivacy_approve_data_request';
break;
case DataPrivacyEvents.bulkApprove:
keys = [
{
key: 'bulkapproverequests',
component: 'tool_dataprivacy'
},
{
key: 'confirmbulkapproval',
component: 'tool_dataprivacy'
}
];
break;
case DataPrivacyEvents.deny:
keys = [
@@ -171,7 +351,30 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Modal
component: 'tool_dataprivacy'
}
];
wsfunction = 'tool_dataprivacy_deny_data_request';
break;
case DataPrivacyEvents.bulkDeny:
keys = [
{
key: 'bulkdenyrequests',
component: 'tool_dataprivacy'
},
{
key: 'confirmbulkdenial',
component: 'tool_dataprivacy'
}
];
break;
case DataPrivacyEvents.complete:
keys = [
{
key: 'markcomplete',
component: 'tool_dataprivacy'
},
{
key: 'confirmcompletion',
component: 'tool_dataprivacy'
}
];
break;
}
@@ -189,26 +392,7 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Modal
// Handle save event.
modal.getRoot().on(ModalEvents.save, function() {
// Confirm the request.
var params = {
'requestid': requestId
};
var request = {
methodname: wsfunction,
args: params
};
Ajax.call([request])[0].done(function(data) {
if (data.result) {
window.location.reload();
} else {
Notification.addNotification({
message: data.warnings[0].message,
type: 'error'
});
}
}).fail(Notification.exception);
handleSave(wsdata.wsfunction, wsdata.wsparams);
});
// Handle hidden event.
@@ -217,9 +401,39 @@ function($, Ajax, Notification, Str, ModalFactory, ModalEvents, Templates, Modal
modal.destroy();
});
return modal;
}).done(function(modal) {
modal.show();
return;
}).catch(Notification.exception);
}
/**
* Calls a web service function and reloads the page on success and shows a notification.
* Displays an error notification, otherwise.
*
* @param {String} wsfunction The web service function to call.
* @param {Object} params The parameters for the web service functoon.
*/
function handleSave(wsfunction, params) {
// Confirm the request.
var request = {
methodname: wsfunction,
args: params
};
Ajax.call([request])[0].done(function(data) {
if (data.result) {
// On success, reload the page so that the data request table will be updated.
// TODO: Probably in the future, better to reload the table or the target data request via AJAX.
window.location.reload();
} else {
// Add the notification.
Notification.addNotification({
message: data.warnings[0].message,
type: 'error'
});
}
}).fail(Notification.exception);
}
+3
View File
@@ -24,6 +24,8 @@
require_once(__DIR__ . '/../../../config.php');
require_login(null, false);
$url = new moodle_url("/admin/tool/dataprivacy/categories.php");
$title = get_string('editcategories', 'tool_dataprivacy');
@@ -31,6 +33,7 @@ $title = get_string('editcategories', 'tool_dataprivacy');
$output = $PAGE->get_renderer('tool_dataprivacy');
echo $output->header();
echo $output->heading($title);
$categories = \tool_dataprivacy\api::get_categories();
$renderable = new \tool_dataprivacy\output\categories($categories);
File diff suppressed because it is too large Load Diff
@@ -1,64 +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/>.
/**
* Contains the contextlist persistent.
*
* @package tool_dataprivacy
* @copyright 2018 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_dataprivacy;
defined('MOODLE_INTERNAL') || die();
use core\persistent;
/**
* The contextlist persistent.
*
* @copyright 2018 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class contextlist extends persistent {
/** The table name this persistent object maps to. */
const TABLE = 'tool_dataprivacy_contextlist';
/**
* Return the definition of the properties of this model.
*
* @return array
*/
protected static function define_properties() {
return [
'component' => [
'type' => PARAM_TEXT
]
];
}
/**
* Create a new contextlist persistent from an instance of \core_privacy\local\request\contextlist.
*
* @param \core_privacy\local\request\contextlist $contextlist the core privacy contextlist.
* @return contextlist a contextlist persistent.
*/
public static function from_contextlist(\core_privacy\local\request\contextlist $contextlist) : contextlist {
$contextlistpersistent = new contextlist();
return $contextlistpersistent->set('component', $contextlist->get_component());
}
}
@@ -1,74 +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/>.
/**
* Contains the contextlist_context persistent.
*
* @package tool_dataprivacy
* @copyright 2018 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_dataprivacy;
defined('MOODLE_INTERNAL') || die();
use core\persistent;
/**
* The contextlist_context persistent.
*
* @copyright 2018 Jake Dallimore <jrhdallimore@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class contextlist_context extends persistent {
/** The table name this persistent object maps to. */
const TABLE = 'tool_dataprivacy_ctxlst_ctx';
/** This context is pending approval. */
const STATUS_PENDING = 0;
/** This context has been approved. */
const STATUS_APPROVED = 1;
/** This context has been rejected. */
const STATUS_REJECTED = 2;
/**
* Return the definition of the properties of this model.
*
* @return array
*/
protected static function define_properties() {
return [
'contextid' => [
'type' => PARAM_INT
],
'contextlistid' => [
'type' => PARAM_INT
],
'status' => [
'choices' => [
self::STATUS_PENDING,
self::STATUS_APPROVED,
self::STATUS_REJECTED,
],
'default' => self::STATUS_PENDING,
'type' => PARAM_INT
]
];
}
}

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