Compare commits

..

796 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 27d0c2181b Moodle release 3.6.7 2019-11-09 11:57:42 +01:00
Sara Arjona c6b6921b4e weekly release 3.6.6+ 2019-11-08 15:39:41 +01:00
Sara Arjona 1328297d48 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-11-08 15:39:38 +01:00
Adrian Greeve b5c18dedf0 Merge branch 'MDL-67169_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-11-08 10:45:30 +08:00
Jake Dallimore 4c9c8e00db Merge branch 'MDL-67016-36-user-profile-see-own-courses' of https://github.com/danowar2k/moodle into MOODLE_36_STABLE 2019-11-08 10:22:58 +08:00
Sara Arjona 0c79de9112 Merge branch 'MDL-66683-36' of git://github.com/cescobedo/moodle into MOODLE_36_STABLE 2019-11-07 17:41:43 +01:00
cescobedo 829c7c9a1b MDL-66683 core: Revert MDL-66181 because created regressions
This reverts commit ed080a580f.
This issue reverts the behaviour modified in MDL-66181, as that change
negatively impacted course-creation workflows. As this appears to be
the intended functionality, the Security team has agreed to revert
this change.
2019-11-07 17:31:04 +01:00
Jake Dallimore abd981c6a7 MDL-66257 tool_cohortroles: unit test for users in multiple cohorts 2019-11-07 23:48:34 +08:00
cescobedo 4d10388df2 MDL-66257 tool_cohortroles: Unassign the role on removal cohortroles. 2019-11-07 23:48:34 +08:00
Eloy Lafuente (stronk7) d89e40d7d6 MDL-67169 phpunit: fix clear flaw in unit test provider
Basically the provider is ignoring the CRLF to LF normalization
results and loading the original file again.

This doesn't have any impact normally, because all moodle
files are LF ones and people using other systems have their
git configurations set to work that way (not modify or force LF).

But there may be checkouts out there (for example travis) where
the git configuration by defult is to convert to the OS, causing
windows runs to fail badly there. See the issue for more info
and links.
2019-11-07 13:43:30 +01:00
Jun Pataleta 3efab60a57 Merge branch 'MDL-67084-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-11-07 19:37:40 +08:00
Marina Glancy 1d7543be8c MDL-67084 core_form: duration element should export arrays 2019-11-07 19:22:15 +08:00
Jun Pataleta 116d8541d2 MDL-66598 auth_oauth2: OAuth2 upgrade step
This basically does two things:
1. Updates all non-Facebook/Google/Microsoft issuers and sets their
'requireconfirmation' field to 1 so that future OAuth2 logins on these
issuers will always have an email confirmation sent to them.
2. Deletes the linked logins of users with non-Facebook/Google/Microsoft
OAuth2 issuers.
2019-11-07 18:44:43 +08:00
Jun Pataleta 78d51b1fc6 MDL-66598 auth_oauth2: Add warning messages in confirm emails 2019-11-07 18:44:43 +08:00
Jun Pataleta fd753889a2 MDL-66598 tool_oauth2: Make account confirmation required by default
* Only Facebook, Google, and Microsoft issuers can optionally offer to
require account confirmation via email. We will require email
confirmation for the rest of the issuers.
2019-11-07 18:44:43 +08:00
Eloy Lafuente (stronk7) f6822347de Merge branch 'MDL-42638-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-11-06 22:47:41 +01:00
Sara Arjona dcd13e2b08 Merge branch 'MDL-66984-change_password_url-with-user-MOODLE_36_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_36_STABLE 2019-11-06 08:31:01 +01:00
Michael Hawkins 1137b7d072 MDL-66161 output: Escaping fatal error message and URL strings 2019-11-06 01:26:37 +01:00
Juan Leyva c7a5fc2f35 MDL-66377 user: Only allow active users to retrieve files via tokenpluginfile.php 2019-11-06 01:26:37 +01:00
Paul Holden 167a8dc276 MDL-66228 mod_lesson: ensure return URL parameters are always local. 2019-11-06 01:26:37 +01:00
AMOS bot bf569af16b Automatically generated installer lang files 2019-11-06 00:16:42 +00:00
Adrian Greeve 7c34492487 Merge branch 'MDL-67136-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-11-06 08:16:41 +08:00
Luca Bösch 9d1ded28c2 MDL-42638 filters: Have emoticons respect <pre>. 2019-11-05 16:09:04 +01:00
Eloy Lafuente (stronk7) a9749a86b8 weekly release 3.6.6+ 2019-11-05 13:34:23 +01:00
Eloy Lafuente (stronk7) 030b9db219 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-11-05 13:34:21 +01:00
Mihail Geshoski 3cbb18b105 MDL-67136 mod_assign: Fix expand/collapse text submission in clean 2019-11-05 13:28:14 +08:00
Jake Dallimore b50f1289b6 Merge branch 'MDL-66455-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-11-05 11:43:31 +08:00
AMOS bot 23c4e59166 Automatically generated installer lang files 2019-11-05 00:10:35 +00:00
Brendan Heywood ddc5472056 MDL-66984 auth: Allow $USER to be used in change_password_url 2019-11-05 10:32:47 +11:00
Jun Pataleta 3139dba346 Merge branch 'MDL-66582-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-11-04 19:35:11 +08:00
Juan Leyva 768057b4db MDL-66582 tool_mobile: Clean URLs from auth plugins
In order to avoid the WebService to break we must double check that URLs coming from auth plugins are valid.
2019-11-04 10:21:19 +01:00
Johan Dobbelstein e91e315d19 MDL-66582 auth: Fix empty auth_logo in Shibboleth auth plugins
* set $idp['iconurl'] = null if no auth_logo
* lib/templates/loginform.mustache will skip NULL iconurls
* lib/ajax/service?info=tool_mobile_get_public_config will validate the NULL values
2019-11-04 10:13:48 +01:00
Jake Dallimore c8238b4d45 Merge branch 'MDL-67093-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-11-04 15:41:32 +08:00
Jake Dallimore dcb601fede Merge branch 'MDL-67009_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-11-04 14:56:35 +08:00
Adrian Greeve 1fc5f07ed3 Merge branch 'MDL-43189-36' of git://github.com/snake/moodle into MOODLE_36_STABLE 2019-11-04 09:25:17 +08:00
Eloy Lafuente (stronk7) 1652dfe456 Merge branch 'MDL-66990-36-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-11-03 23:15:29 +01:00
AMOS bot 3a4b7e8995 Automatically generated installer lang files 2019-11-02 00:09:38 +00:00
Helen Foster 716143b33c MDL-66990 lang: Import fixed English strings (en_fix)
Significant string changes:

* configenablecompletion,core_completion - including reason for setting
  activity completion conditions
* setuplink_desc,tool_mobile - including where the app download page
  link is displayed and leaving the setting empty
2019-11-01 11:28:31 +01:00
Shamim Rezaie 74ac275d08 MDL-43189 core: improve validating db settings during cli install 2019-11-01 15:39:55 +08:00
Shamim Rezaie 7a902dea3a MDL-43189 core: Validate db prefix during installation 2019-11-01 15:39:55 +08:00
Daniel Poggenpohl 88b7f71a50 MDL-67016 profile: current user should see his own courses 2019-10-31 14:40:53 +01:00
Eloy Lafuente (stronk7) a78ed9eed1 weekly release 3.6.6+ 2019-10-31 13:33:12 +01:00
Simey Lameze b4f299ec91 MDL-66455 calendar: add coverage for event types in subscription page 2019-10-31 18:48:15 +08:00
Simey Lameze 74d9dbf696 MDL-66455 calendar: show site level subscriptions 2019-10-31 18:48:15 +08:00
Adrian Greeve 567fa6adc3 Merge branch 'MDL-66247-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-10-31 14:41:10 +08:00
Andrew Nicols 4c3a2ea83c MDL-67093 grading: Fetch cm with get_fast_modinfo 2019-10-31 13:29:00 +08:00
Andrew Nicols c3cad10fcf Merge branch 'MDL-67088-36' of git://github.com/marinaglancy/moodle into MOODLE_36_STABLE 2019-10-31 11:08:34 +08:00
Marina Glancy e6993ed682 MDL-67088 mod_assign: compare time without case for MacOS compat 2019-10-30 19:21:43 +01:00
Andrew Nicols ac2b9ee95c MDL-66247 accessibility: Correct notification alert role support 2019-10-30 09:01:18 +08:00
Eloy Lafuente (stronk7) 55749ae39f weekly release 3.6.6+ 2019-10-29 21:01:40 +01:00
Eloy Lafuente (stronk7) d56954a828 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-10-29 21:01:33 +01:00
Jake Dallimore 4eb1e079b3 Merge branch 'MDL-66945_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-10-29 14:56:35 +08:00
Andrew Nicols d673f8abd7 Merge branch 'MDL-67027-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-10-29 09:36:07 +08:00
Andrew Nicols 398dde36b3 MDL-66945 composer: Update behat extension
(using php70 for this branch)

This uses a new version of the moodlehq-behat-extension which ensures
that a node is visible and in the view port before it is clicked on.

This resolves an issue with Firefox on Ubuntu 18.04 whereby the node is
only brought into the viewport instead of clicked on.
2019-10-28 13:40:23 +01:00
Jun Pataleta c92e401361 Merge branch 'm36_MDL-65811_Fix_Incorrect_ORDER_BY_Search' of https://github.com/scara/moodle into MOODLE_36_STABLE 2019-10-28 11:30:24 +08:00
AMOS bot ebb4054cd6 Automatically generated installer lang files 2019-10-28 00:09:26 +00:00
AMOS bot 7a68e34f61 Automatically generated installer lang files 2019-10-27 00:09:23 +00:00
Matteo Scaramuccia 9c82b32001 MDL-65811 database: Fix subsetting in MSSQL 2019-10-25 23:06:58 +02:00
Paul Holden 99c79db0c7 MDL-67027 calendar: fix event update form validation. 2019-10-25 17:36:47 +01:00
Eloy Lafuente (stronk7) 3f26d44a6f weekly release 3.6.6+ 2019-10-25 15:29:37 +02:00
Eloy Lafuente (stronk7) 48878c24fd Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-10-25 15:29:34 +02:00
Jake Dallimore 8dd23a1375 Merge branch 'MOODLE_36_MDL-66973' of https://github.com/golenkovm/moodle into MOODLE_36_STABLE 2019-10-25 11:10:42 +08:00
Jun Pataleta d1bd09fa41 Merge branch 'MDL-66543-36' of github.com:junpataleta/moodle into MOODLE_36_STABLE 2019-10-24 23:17:08 +08:00
Jun Pataleta db88f1f307 MDL-66543 core_form: Fix illegal whitespace 2019-10-24 23:14:47 +08:00
Jun Pataleta 03f1265690 Merge branch 'MDL-66543-36' of git://github.com/tobiasreischmann/moodle into MOODLE_36_STABLE 2019-10-24 23:08:29 +08:00
Tobias Reischmann 8fd70353e6 MDL-66543 forms: Make (hard) frozen textareas readonly (or disabled) 2019-10-24 13:43:07 +02:00
Eloy Lafuente (stronk7) 9d57a8057f Merge branch 'MDL-67001-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-10-24 13:27:54 +02:00
Eloy Lafuente (stronk7) 1f77d72592 MDL-67009 behat: get rid of invalid void type hinting for php70 2019-10-24 10:48:12 +02:00
Eloy Lafuente (stronk7) e2442de0b6 Merge branch 'MDL-66935-lock-clashes-MOODLE_36_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_36_STABLE 2019-10-24 10:03:55 +02:00
Adrian Greeve 5d5d2e6e42 Merge branch 'MDL-66876-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-10-24 15:17:25 +08:00
Luca Bösch 4112274408 MDL-67001 question: alignment and form spaces. 2019-10-24 07:59:24 +02:00
Brendan Heywood 1aabe01886 MDL-66935 core_lock: Fix resource key clashes in db and postgres locks 2019-10-24 15:07:49 +11:00
AMOS bot 734a176cf0 Automatically generated installer lang files 2019-10-24 00:09:34 +00:00
Eloy Lafuente (stronk7) d1d8f42cde Merge branch 'MDL-64298-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-10-23 22:22:00 +02:00
Eloy Lafuente (stronk7) 0123b42676 Merge branch 'MDL-67001-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-10-23 22:17:48 +02:00
Juan Leyva cb63696054 MDL-64298 gradereport_user: Fix WS returned parameter description
feedbackformat must be optional always
2019-10-23 17:16:30 +02:00
Juan Leyva a3bc3ce5b6 MDL-66876 core_filter: Fix context in Web Service warning 2019-10-23 17:07:47 +02:00
Luca Bösch d029483cde MDL-67001 question: alignment and form spaces. 2019-10-23 11:08:50 +02:00
Adrian Greeve 19115e20a7 Merge branch 'MDL-63125-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-10-23 11:10:31 +08:00
Sara Arjona 8cda42019a weekly release 3.6.6+ 2019-10-22 14:48:02 +02:00
Sara Arjona 4aca40f697 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-10-22 14:47:59 +02:00
Mikhail Golenkov 84a8b1b2df MDL-66973 search: Reset Content writer after test. 2019-10-22 09:43:15 +11:00
Paul Holden 880dcd0f94 MDL-63125 forms: Behat test for form autocomplete element. 2019-10-21 23:25:21 +01:00
Eloy Lafuente (stronk7) 269bb26b3c Merge branch 'MDL-66980_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-21 20:27:03 +02:00
Sara Arjona 7d87eef1fc Merge branch 'MDL-61121-36-5' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-10-21 14:46:42 +02:00
Tim Hunt de672b1357 MDL-66980 question bank: fix load_many_for_cache missing record check 2019-10-21 11:19:06 +01:00
Jun Pataleta f48f788115 Merge branch 'MDL-66009-36' of https://github.com/grabs/moodle into MOODLE_36_STABLE 2019-10-21 16:15:07 +08:00
Jake Dallimore a0a3400c59 Merge branch 'MDL-66915-36' of https://github.com/MartinGauk/moodle into MOODLE_36_STABLE 2019-10-21 15:56:50 +08:00
Andrew Nicols 49592cea31 Merge branch 'MDL-66962-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-10-21 14:24:10 +08:00
Luca Bösch b4bc353659 MDL-66962 questions: Question bank table T title non breaking. 2019-10-21 08:17:45 +02:00
Andrew Nicols f074a0ee86 Merge branch 'MDL-66944_36' of https://github.com/t-schroeder/moodle into MOODLE_36_STABLE 2019-10-21 13:49:12 +08:00
Andrew Nicols 9c2abf9a02 Merge branch 'MDL-66946_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-21 13:08:34 +08:00
Jake Dallimore 17d08f6cc5 Merge branch 'MDL-66930-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-10-21 11:56:10 +08:00
Jake Dallimore 85fec2dfe4 Merge branch 'MDL-66960-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-10-21 10:42:12 +08:00
AMOS bot cd99faeb67 Automatically generated installer lang files 2019-10-19 00:09:27 +00:00
Tim Schroeder 9e0c4e13d7 MDL-66944 course: fixed copy-paste-error in comment 2019-10-19 00:06:58 +02:00
Tim Hunt ee2c305e37 MDL-66946 quiz reports: incorrectly show teachers sometimes 2019-10-18 17:43:23 +01:00
Luca Bösch 4a3222dc50 MDL-66960 questions: Top align all question bank titles exc "select all" 2019-10-18 16:35:30 +02:00
Luca Bösch 0abefe1f2b MDL-66930 quiz: Question type icon size and alignment in Boost. 2019-10-18 13:51:39 +02:00
Eloy Lafuente (stronk7) caa6f445e4 weekly release 3.6.6+ 2019-10-18 10:31:24 +02:00
Mihail Geshoski 907312d17a MDL-61121 assign: Declare variables in the local scope 2019-10-18 14:00:55 +08:00
Mihail Geshoski 14b13ec478 MDL-61121 assign: Improve accessibility in quick grading page tables 2019-10-18 14:00:55 +08:00
Mihail Geshoski 9e687b46e9 MDL-61121 assign: Improve accessibility - view full/view summary control 2019-10-18 14:00:55 +08:00
Jun Pataleta 5cd189b68d Merge branch 'MDL-66806_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-10-18 09:34:24 +08:00
Andrew Nicols 5a774101e0 Merge branch 'MDL-66919_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-10-18 08:28:26 +08:00
Eloy Lafuente (stronk7) 6019d849b2 Merge branch 'MDL-64064-m36' of https://github.com/NeillM/moodle into MOODLE_36_STABLE 2019-10-17 23:09:24 +02:00
Andreas Grabs 3b1d619baf MDL-66009 mod_feedback: Nested dependency fails again 2019-10-17 09:19:43 +02:00
Eloy Lafuente (stronk7) 9eb88d21ba MDL-66919 behat: fix typo in error message
Also fix a couple of phpdocs that were incorrect.
2019-10-16 00:49:13 +02:00
Eloy Lafuente (stronk7) f2d10a9bb9 weekly release 3.6.6+ 2019-10-15 22:59:53 +02:00
Martin Gauk 580d8124c0 MDL-66915 assign: Notify only if grade was updated in past 24 hours
Send notifications only if a grade was updated in the past 24 hours,
whether marking workflow is enabled or not.
2019-10-15 15:55:06 +02:00
Tim Hunt af46f59162 MDL-66796 question bank: fix more bugs with category editing 2019-10-15 11:23:20 +08:00
Jun Pataleta e194ef059f Merge branch 'MDL-66821_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-15 07:36:31 +08:00
Andrew Nicols a9be3e27e3 Merge branch 'MDL-66335_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-10-15 07:31:42 +08:00
Eloy Lafuente (stronk7) 0f9ed5c5e0 MDL-66335 behat: Avoid double processing the page type
resolve_page_instance_helper() already processes the type, returning
the correct context that should be processing the navigation URL.

With that extra call to parse_page_name() the 2nd call always returns
"core", ultimately leading to tons of behat failures because "core" is
not aware of those (plugin, quiz for now) pages typology.
2019-10-15 00:04:11 +02:00
Eloy Lafuente (stronk7) 989faa4667 Merge branch 'MDL-66335_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-14 18:56:50 +02:00
Paul Holden 45d210a442 MDL-63125 forms: allow item removal from single-select autocomplete. 2019-10-14 17:07:46 +01:00
Eloy Lafuente (stronk7) d0577075b6 Merge branch 'MDL-66559-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-10-14 16:41:05 +02:00
Tim Hunt 96e9075ac9 MDL-66335 quiz behat: using the new generic navigation steps
This converts all the navigation to quiz pages when that is not
the thing under test. Also, I decided that the Quiz settings form
belonged to the course, so did not do that here.
2019-10-14 13:14:45 +01:00
Tim Hunt d714e336b6 MDL-66335 behat: new step to log in and go straight to a particular page
I did not think thought through if this new URL parameter would be a
potential security hole. The simple cop-out option is to make it only
work on Behat sites for now.
2019-10-14 13:14:41 +01:00
Tim Hunt 10bf14282c MDL-66335 behat: generic step for navigating direct to specific pages 2019-10-14 13:13:32 +01:00
Tim Hunt fa963675f4 MDL-66821 question behat: new step for acting on questions in the bank
There is a proposed change MDL-66816 which will change the question
bank UI. This will break any Behat tests which uses low-level steps
like

    When I click on "Duplicate" "link" in the "Test question" "table_row"

to perform an action on a question in the question bank. This commit
introduces a new step:

    When I choose "Duplicate" action for "Test question" in the question bank

This commit also converts all core Behat tests to use the new step.
2019-10-14 12:00:03 +01:00
Sara Arjona 7511cf3462 Merge branch 'MDL-66836-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-10-14 12:27:23 +02:00
Jake Dallimore 78be4e8724 Merge branch 'MDL-66659-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-10-14 15:34:32 +08:00
Andrew Nicols 86a58a82d8 MDL-66559 behat: Register component selectors earlier 2019-10-14 14:24:05 +08:00
Andrew Nicols 17342a4ff3 MDL-66559 behat: Update running suite 2019-10-14 14:17:47 +08:00
Jun Pataleta 3e50a250e9 Merge branch 'MDL-66796-36-fix' of https://github.com/snake/moodle into MOODLE_36_STABLE 2019-10-14 13:48:16 +08:00
Jake Dallimore 0143e8bcf4 MDL-66796 mod_quiz: only update the id number if changed
If the idnumber is present in the DB, it's set to null. In this case,
don't update the value.
2019-10-14 13:41:40 +08:00
Jake Dallimore 21ee8ef703 Merge branch 'MDL-66559-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-10-14 11:10:35 +08:00
Jake Dallimore 77ccb0f467 Merge branch 'MDL-66796_36' of git://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-14 07:42:10 +08:00
Eloy Lafuente (stronk7) d12b2d9822 Merge branch 'MDL-66851-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-10-13 16:51:27 +02:00
Eloy Lafuente (stronk7) 6a81c53788 Merge branch 'MDL-65243-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-10-13 16:31:37 +02:00
Eloy Lafuente (stronk7) e2a4284326 Merge branch 'MDL-66779-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-10-13 02:13:27 +02:00
Eloy Lafuente (stronk7) ed9c55b892 Merge branch 'MOODLE_36_MDL-66864' of https://github.com/golenkovm/moodle into MOODLE_36_STABLE 2019-10-13 02:09:01 +02:00
Eloy Lafuente (stronk7) 4462ed30c7 Merge branch 'MDL-65584-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-10-13 01:49:59 +02:00
Eloy Lafuente (stronk7) badb6a92c4 weekly release 3.6.6+ 2019-10-11 22:43:37 +02:00
Eloy Lafuente (stronk7) c6f435069e Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-10-11 22:43:25 +02:00
Neill Magill ff9be7de2c MDL-64064 block_timeline: Confusing when event is not in this year
If an event is not in the current year it can be confusing as the
months and days may appear to be in the wrong order.

This change adds the year to the displayed date to make the reason
for the order clear.
2019-10-11 08:39:14 +01:00
Tim Hunt eec220f2fc MDL-66559 behat: Documentation for component selectors 2019-10-11 12:58:16 +08:00
Andrew Nicols 8694eaac19 MDL-66559 behat: Allow per-component selectors and replacements 2019-10-11 12:58:16 +08:00
Jake Dallimore 8aeddd78bf Merge branch 'MDL-66804-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-10-11 09:58:49 +08:00
Jun Pataleta 3df36d632c Merge branch 'MDL-66450-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-10-11 09:20:21 +08:00
AMOS bot 7c31894342 Automatically generated installer lang files 2019-10-11 00:11:43 +00:00
Eloy Lafuente (stronk7) 8f89e0bde5 Merge branch 'MDL-66815_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-11 00:50:51 +02:00
Bas Brands 102e20c11b MDL-66450 theme_bootstrapbase: form autocomplete truncate listitems 2019-10-10 17:18:22 +02:00
David Monllaó ff698a03ec MDL-66806 analytics: No predictions for hidden courses 2019-10-10 10:09:43 +08:00
AMOS bot c917c9860c Automatically generated installer lang files 2019-10-10 00:09:35 +00:00
sam marshall fdf8e3668f MDL-66836 Behat: Reset unknown config variables between scenarios
In the Behat CLI run (not in the individual web requests), if you
modified an existing $CFG variable then this would be reset at the
start of the next scenario. However, if you added a completely new
one, it would not be reset. This change removes those variables.
2019-10-09 17:49:56 +01:00
Jun Pataleta 6d791cfa86 Merge branch 'MDL-66835_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-09 20:44:27 +08:00
Jun Pataleta e3d4c8d5a4 Merge branch 'MDL-66450-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-10-09 20:39:15 +08:00
Bas Brands 6594812c15 MDL-66450 themes: form autocomplete truncate listitems 2019-10-09 14:28:05 +02:00
Tim Hunt ece21a4a2b MDL-66835 behat: steps for setting/checking fields in containers 2019-10-09 13:24:19 +01:00
Sara Arjona 479eda9446 Merge branch 'MDL-66852-36' of github.com:lucaboesch/moodle into MOODLE_36_STABLE 2019-10-09 12:58:16 +02:00
Damyon Wiese d498f9b7da MDL-65243 badges: Use real time api
Never add or subtract timestamps - use the time api to do it correctly.
2019-10-09 11:56:12 +08:00
Andrew Nicols 976ad2a7de MDL-66779 phpunit: Correct component name for core_grades 2019-10-09 09:35:16 +08:00
Andrew Nicols 507928af8a Merge branch 'MDL-66118-36-byebyemoodlenet' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-10-09 08:51:55 +08:00
Luca Bösch 6b8b0e2468 MDL-66852 quiz: Style "Try another question like this one" button. 2019-10-08 11:26:08 +02:00
Eloy Lafuente (stronk7) df05ccb9af weekly release 3.6.6+ 2019-10-08 10:43:25 +02:00
Eloy Lafuente (stronk7) 1d82d302bd Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-10-08 10:43:18 +02:00
Mihail Geshoski 10a1109b79 MDL-66851 block_starredcourses: Hide 'hidden' courses from students
Thanks to Mark Sharp for the bug report and fix suggestion.
2019-10-08 09:54:23 +08:00
AMOS bot d6a6c93a88 Automatically generated installer lang files 2019-10-08 00:10:13 +00:00
Paul Holden d6fdedd4ab MDL-65584 blog: safer deletion of associations in privacy provider.
It's possible that the given context list contains no posts, which caused
an exception to be thrown when passing an empty array to get_in_or_equal.
2019-10-08 00:23:43 +01:00
Eloy Lafuente (stronk7) a3de11a763 Merge branch 'MDL-66801_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-08 01:16:57 +02:00
Eloy Lafuente (stronk7) 051e6b38e2 Merge branch 'MDL-66764_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-10-07 22:51:25 +02:00
Mikhail Golenkov 2d1b49b953 MDL-66864 upgrade: Delete non-mutual contacts in chunks. 2019-10-07 16:34:42 +11:00
David Mudrák 71f49c970e MDL-66118 hub: Remove the mentions of moodle.net
This is an update of the site registration admin page and some relevant
backend code to remove the mentions of moodle.net.

AMOS BEGIN
 CPY [registerwithmoodleorg,core_admin],[registerwithmoodleorg,core_hub]
AMOS END
2019-10-04 21:44:02 +02:00
David Mudrák 3bef0a6cf2 MDL-66118 hub: Stop using the hub URL as the setting name suffix
Site indicators shared with the registration hub used to have the hub
URL in the relevant setting names - such as site_name_httpsmoodlenet.
This upgrade step converts all such settings and drops the URL suffix
because we do not support alternative hubs any more.

Additionally the upgrade step renames the official hub and updates its
URL so that existing registrations with https://moodle.net are still
valid.
2019-10-04 21:44:02 +02:00
David Mudrák 168a1fed2a MDL-66118 hub: Define the new sites directory URL
The Moodle sites now register with stats.moodle.org so use that as a new
official hub's URL. Beside that, allow for the alternative value be
provided in config.php for development and testing purposes.
2019-10-04 21:42:09 +02:00
Eloy Lafuente (stronk7) 3016cb824d weekly release 3.6.6+ 2019-10-04 16:01:35 +02:00
Jun Pataleta 9b1c66d4e5 Merge branch 'MDL-65315-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-10-04 10:24:59 +08:00
Peter 496eeb0f73 MDL-65315 badges: Update the class and issuer OBv2.0 url 2019-10-04 07:46:53 +08:00
Eloy Lafuente (stronk7) 77414d0d57 Merge branch 'MDL-56649-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-10-03 19:37:34 +02:00
Jun Pataleta d1dbe6db4a Merge branch 'MDL-61450-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-10-03 15:42:01 +08:00
Jun Pataleta 7070a23d97 MDL-61450 calendar: Unit test for calendar_view_event_allowed()
* Unit test for calendar_view_event_allowed() when dealing with course
events.
2019-10-03 15:39:25 +08:00
Simey Lameze dec2ad8603 MDL-61450 calendar: fix course event type permissions 2019-10-03 15:39:25 +08:00
Eloy Lafuente (stronk7) c89a1b99fd Merge branch 'MDL-66774-36-macedonia' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-10-03 00:59:15 +02:00
Eloy Lafuente (stronk7) f30091c8dc Merge branch 'MDL-66197-36' of git://github.com/marinaglancy/moodle into MOODLE_36_STABLE 2019-10-03 00:45:52 +02:00
Eloy Lafuente (stronk7) 6f32cfee2b Merge branch 'MDL-65335_36_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_36_STABLE 2019-10-01 23:22:43 +02:00
Tim Hunt d6f442bf41 MDL-66815 behat: question category generator must find right parent id
This is implemented in a bit of a hacky way, because the only other
alternative would be a large rewrite of the whole class, which is
not feasible for me right now. Note that many other types of thing
that can be generated suffer from the same issue. (E.g. if you ever
wanted to generate two groups with the same name in two different
courses and then add group memebers.)

It is worth doing a special-case fix for question categories, because
way Moodle works, it is inevitable that we end up with many categories
called 'top' in the database.
2019-10-01 16:48:41 +01:00
Eloy Lafuente (stronk7) 896db11641 Merge branch 'MDL-65522-m36' of https://github.com/NeillM/moodle into MOODLE_36_STABLE 2019-10-01 16:13:16 +02:00
Eloy Lafuente (stronk7) fb23adbcd3 Merge branch 'MDL-66542_36' of https://github.com/t-schroeder/moodle into MOODLE_36_STABLE 2019-10-01 15:58:58 +02:00
Paul Holden 9bdca4fbe0 MDL-66659 core: observe viewfullnames capability in flexible_table. 2019-10-01 10:15:25 +01:00
Paul Holden 6442cf75ee MDL-66804 user: consistent user access times in privacy export. 2019-09-30 23:15:05 +01:00
Tim Hunt ed3fc39176 MDL-66801 questions: XML import/export should include category idnumbers 2019-09-30 19:00:37 +01:00
Tim Hunt eaca013a20 MDL-66796 question bank: 0 is a valid question category idnumber 2019-09-30 14:19:22 +01:00
Tim Schroeder 864cd27438 MDL-66542 lib: Fix quote escaping in JS quote helper 2019-09-30 10:11:33 +02:00
Neill Magill 0aa44e4539 MDL-65522 block_social_activities: Improve behat steps documentation
The documentation for these steps was not helpful in the Acceptance
testing admin tool page.
2019-09-30 09:00:15 +01:00
Jun Pataleta 4897a4a166 weekly release 3.6.6+ 2019-09-27 11:12:20 +08:00
Jun Pataleta 0bad3d746d Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-09-27 11:12:19 +08:00
David Mudrák 67125ee5f4 MDL-66774 lang: Update the list of countries as per ISO 3166-1
Source: https://www.iso.org/obp/ui/

Two significant changes are:

* North Macedonia
* Eswatini

All other changes are formal, such as changing the letter case of the
"And" (the current ISO uses the lower case "and").  Our own existing
modifications of the list (such as having just "United States" and
"United Kingdom" instead of the full long name) were kept.
2019-09-26 10:55:29 +02:00
Jun Pataleta 9d30d31afb Merge branch 'MDL-66262_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-09-26 11:34:33 +08:00
Eloy Lafuente (stronk7) cff6fab1cd Merge branch 'MDL-51327-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-09-26 00:05:06 +02:00
Eloy Lafuente (stronk7) d3843bbc7e Merge branch 'MDL-66685_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-09-25 23:58:07 +02:00
Eloy Lafuente (stronk7) f47a98b31f Merge branch 'MDL-66675-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-25 20:06:25 +02:00
Marina Glancy 48d8fb92ff MDL-66197 core: correct get parent language 2019-09-25 17:41:45 +02:00
Bas Brands d5f83a1a23 MDL-56649 themes: filepicker file exists buttons spacing 2019-09-25 12:25:10 +02:00
Tim Hunt a29971b021 MDL-66764 quiz: redo question should not repeat random questions
Before this fix, it was only considering questions seen in previous attempts.

It should avoid the questions in the current attmept too.
2019-09-25 11:05:24 +01:00
Jun Pataleta 16ec7c1d7c Merge branch 'MDL-66354-36' of http://github.com/dravek/moodle into MOODLE_36_STABLE 2019-09-25 16:42:46 +08:00
David Matamoros 4f4d28b56b MDL-66354 core_calendar: Notices in error.log on calendar events 2019-09-25 09:13:03 +02:00
Jun Pataleta 6de29467ce Merge branch 'MDL-66644-36-versionrequires' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-09-25 14:53:20 +08:00
Eloy Lafuente (stronk7) cfc96245ba Merge branch 'MDL-65621-dimmed-courses-MOODLE_3.6' of https://github.com/stopfstedt/moodle into MOODLE_36_STABLE 2019-09-24 19:09:22 +02:00
Mihail Geshoski 935d259396 MDL-51327 core_course: Allow subdirs in edit section form 2019-09-24 09:09:38 +08:00
AMOS bot 9cfbcde257 Automatically generated installer lang files 2019-09-22 00:09:27 +00:00
Sara Arjona 9d7fd4b062 Merge branch 'MDL-46978-MOODLE_36_STABLE' of github.com:tuanngocnguyen/moodle into MOODLE_36_STABLE 2019-09-20 13:08:15 +02:00
Sara Arjona f1659f3f40 Merge branch 'MDL-66090_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-09-20 12:46:36 +02:00
Mark Johnson c63863df2b MDL-65335 auth: Make oauth2 enabled check more efficient 2019-09-20 08:56:06 +01:00
Jake Dallimore 2fb35f856c Merge branch 'MDL-65970-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-09-20 14:29:29 +08:00
Sara Arjona 6709fdbb6d weekly release 3.6.6+ 2019-09-19 21:19:16 +02:00
Stefan Topfstedt 7f9e015071 MDL-66433 block_myoverview: tag courses as "hidden from students"
This is intended to visually separate hidden course from open courses in the course overview block
by applying a "Hidden from students" tag to the various views in this block.
To achive this, the course summary exporter's output must be augmented with a "visiblity" attribute,
carrying the given course's corresponding visibility setting.
Since the exporter now expects this data point as part of its input, the output of the course_get_recent_courses()
function had to also be augmented with the course visibility setting to provide this value.
2019-09-19 10:09:39 -07:00
Eloy Lafuente (stronk7) da01d735a1 Merge branch 'MDL-65878-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-19 15:57:58 +02:00
Luca Bösch 8ad9815afc MDL-65878 core_output: Move button not sticky to select field. 2019-09-19 12:16:45 +02:00
Luca Bösch a1ed46a130 MDL-65878 core_output: Move button not sticky to select field. 2019-09-19 12:04:15 +02:00
Eloy Lafuente (stronk7) c62a946756 Merge branch 'MDL-65878-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-19 09:41:26 +02:00
Luca Bösch 0846707178 MDL-65878 forum: add padding for export to portfolio option. 2019-09-19 09:23:22 +02:00
Nathan Nguyen 9b6d7fc1e0 MDL-46978 core_grades: preserve category total visibility 2019-09-19 14:11:52 +10:00
David Monllaó 51e71e8aa9 MDL-66090 analytics: Support user for notifications 2019-09-19 08:00:26 +08:00
Andrew Nicols e46ad4a1a1 MDL-66675 behat: Fix typo in step function name 2019-09-19 07:30:42 +08:00
Andrew Nicols dec33c29aa MDL-66675 behat: Add option to pause on behat failures 2019-09-19 07:30:41 +08:00
Andrew Nicols e44811963c MDL-66675 CLI: Add ANSI formatting options 2019-09-19 07:30:40 +08:00
Eloy Lafuente (stronk7) cb5ae56e63 Merge branch 'MDL-66641_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-09-18 20:30:14 +02:00
Eloy Lafuente (stronk7) 10f73026e9 Merge branch 'MDL-65878-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-18 20:08:09 +02:00
Luca Bösch d30be99a47 MDL-65878 core_output: Move button not sticky to select field. 2019-09-18 19:10:50 +02:00
Eloy Lafuente (stronk7) 9467ac7707 Merge branch 'MDL-63895-36' of git://github.com/vmdef/moodle into MOODLE_36_STABLE 2019-09-18 17:33:36 +02:00
Sara Arjona 4bac2a4bdb Merge branch 'MDL-66614_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-09-18 17:11:15 +02:00
Sara Arjona 790cae52ca Merge branch 'MDL-63293-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-09-18 13:40:16 +02:00
Sara Arjona e943107851 Merge branch 'MDL-66156-36' of https://github.com/snake/moodle into MOODLE_36_STABLE 2019-09-18 12:25:55 +02:00
Eloy Lafuente (stronk7) 3ff1ef47f8 Merge branch 'MDL-65026-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-09-18 01:01:55 +02:00
Juan Leyva 305111bcd3 MDL-65970 airnotifier: Set lower timeout for Push curl requests 2019-09-17 16:51:39 +02:00
Eloy Lafuente (stronk7) aadce0acfa Merge branch 'MDL-62915-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-09-17 16:22:16 +02:00
Sara Arjona fd0a5bef1e Merge branch 'MDL-66113-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-09-17 12:04:04 +02:00
Paul Holden e8c2c263b7 MDL-62915 tool_dataprivacy: don't let primary admin delete themselves. 2019-09-16 23:41:05 +01:00
Eloy Lafuente (stronk7) 878e330148 Merge branch 'MDL-66293-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-09-16 20:38:41 +02:00
Tim Hunt fd4de847ce MDL-66685 questions: should able to save an empty question usage 2019-09-16 14:36:17 +01:00
Juan Leyva a25615ff66 MDL-66113 assign: Apply user overrides in get_submission_status WS 2019-09-16 12:08:42 +02:00
Paul Holden 56d043a636 MDL-63293 enrol_manual: observe user paging config in enrol dialog. 2019-09-15 21:48:22 +01:00
Eloy Lafuente (stronk7) 1ed4e401f1 MDL-66262 env: Moodle 3.6.x and 3.7.x do not support PHP 7.4 2019-09-13 17:44:36 +02:00
Jake Dallimore f1246ad631 weekly release 3.6.6+ 2019-09-13 11:30:17 +08:00
Jake Dallimore b91f9efddc Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-09-13 11:30:16 +08:00
Eloy Lafuente (stronk7) 4c03ce0895 Merge branch 'MDL-66550-36-2' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-12 15:32:01 +02:00
Víctor Déniz Falcón 470e23e25b MDL-63895 user: Hide suspended enrolments to user without capability
Users without course:viewsuspendedusers capability should not view
suspended users on the participant list
2019-09-12 11:58:09 +01:00
Shamim Rezaie 2af29ca628 MDL-66293 javascript: set maximum paging bar size to 10 2019-09-12 18:05:59 +10:00
Shamim Rezaie 5cb6386af1 MDL-66293 theme_bootstrapbase: Support setting bar size for paging bars 2019-09-12 18:05:59 +10:00
Andrew Nicols 0ac32aff37 MDL-66550 admin: The execute wrapper MUST be used in behat 2019-09-12 16:04:16 +08:00
Andrew Nicols 9400966aa9 MDL-66550 theme: Wrap JS calls in pendingJS 2019-09-12 14:59:17 +08:00
Jake Dallimore 55f56db61f MDL-66156 block_myoverview: remove orphaned course favourite records 2019-09-12 13:12:13 +08:00
Jake Dallimore 09b691381c MDL-66156 block_myoverview: purge course favourites on course deletion. 2019-09-12 13:12:12 +08:00
Shamim Rezaie 37e349dd89 MDL-66293 javascript: Added support to set bar size for paging bars 2019-09-12 14:24:34 +10:00
Andrew Nicols ddd9d6e95e Merge branch 'MDL-66498_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-09-12 11:18:11 +08:00
Jake Dallimore 34a5bd4223 Merge branch 'MDL-64917-MOODLE_36_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_36_STABLE 2019-09-12 09:28:32 +08:00
Nathan Nguyen 734cd75ed3 MDL-64917 filepicker: change event dispatch 2019-09-12 11:00:43 +10:00
AMOS bot ee73cabac3 Automatically generated installer lang files 2019-09-12 00:09:30 +00:00
Andrew Nicols 9455300763 Merge branch 'MDL-66489-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-09-12 07:08:17 +08:00
Shamim Rezaie 5f4a113242 MDL-66489 enrol: Send all form data to WS and do all busines logic there
It is discouraged to use JS Date functions. We should pass all raw data to PHP.
2019-09-11 20:35:04 +10:00
Andrew Nicols b680e40303 Merge branch 'MDL-65429-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-09-11 14:23:04 +08:00
Jake Dallimore d1221854c8 Merge branch 'MDL-65493-36-2' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-11 13:45:56 +08:00
David Monllaó ec77087e21 MDL-66498 analytics: get_samples() with no params limit 2019-09-11 12:46:54 +08:00
David Monllaó af06a498dc MDL-66498 analytics: Avoid get_in_or_equal for big arrays
Also, join directly with context table.
2019-09-11 12:46:55 +08:00
Andrew Nicols 2ba7a4066d Merge branch 'MDL-66328_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-09-11 12:21:45 +08:00
Jake Dallimore 3475c90d37 Merge branch 'MDL-66550-36-2' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-11 10:40:32 +08:00
Eloy Lafuente (stronk7) f6c82c8a86 Merge branch 'MDL-65310-36' of https://github.com/tsmilan/moodle into MOODLE_36_STABLE 2019-09-11 00:44:53 +02:00
David Mudrák 8a65065551 MDL-66644 admin: Display required moodle version only when declared
The minimum required Moodle version specified in the plugin's
version.php file is not a mandatory field. If it is not declared, do not
display "Moodle {$a}".
2019-09-10 18:11:35 +02:00
Andrew Nicols ec372682b8 MDL-66550 forum: Target fields in a fieldset for behat test 2019-09-10 21:24:20 +08:00
Andrew Nicols 85b30e2ac5 MDL-66550 behat: Transform fields to search in a fieldset 2019-09-10 21:24:20 +08:00
Andrew Nicols 0c7478e4fa MDL-66550 behat: Standardise finding in core functionality 2019-09-10 21:24:20 +08:00
Andrew Nicols 1b52ec70f0 MDL-66550 behat: Add ability to transform a specific selector 2019-09-10 21:24:15 +08:00
Andrew Nicols f4f245e011 MDL-66550 behat: Normalise selectors better 2019-09-10 21:24:07 +08:00
Tim Hunt 7d8ad43bd2 MDL-66641 quiz stats: discriminativeefficiency is already out of 100 2019-09-10 12:12:16 +01:00
Jake Dallimore a3de6b7961 Merge branch 'MDL-66409-edit-numerical/moodle36' of https://github.com/RaAstons/moodle into MOODLE_36_STABLE 2019-09-10 13:35:21 +08:00
Andrew Nicols 153502a7f5 Merge branch 'MDL-63250-36' of https://github.com/Kathrin84/moodle into MOODLE_36_STABLE 2019-09-10 12:41:01 +08:00
Tim Hunt d5bb3640d5 MDL-66328 groups: overview page can require lots of memory 2019-09-09 11:20:30 +01:00
Raphaël Santos 5c37c61b42 MDL-66409 mod_lesson: Fix editing of numerical pages
This avoids using the "magic" `isset` function implemented
within the lesson_base class (which returns the `empty` function).
In the case of the answer beeing `0`, the test fails and the answer
is considered to be deleted.
2019-09-09 09:41:49 +02:00
David Monllao 926ff49e12 MDL-66498 analytics: SQL IN in chunks 2019-09-06 13:35:54 +08:00
Jake Dallimore 7de0c0f1ad Moodle release 3.6.6 2019-09-06 11:50:42 +08:00
Trisha Milan 90b9c2e2d3 MDL-65310 block_timeline: Hide activities without due date 2019-09-06 13:49:00 +10:00
Andrew Nicols c50947b75e MDL-65493 core: Add pendingJS around pubsub.publish 2019-09-06 08:41:11 +08:00
Andrew Nicols c61928e007 MDL-65493 message: The execute wrapper MUST be used 2019-09-06 08:41:11 +08:00
Andrew Nicols 6f09229a3d MDL-65493 message: JS fixes for random behat fails 2019-09-06 08:41:11 +08:00
Andrew Nicols 16291ec5bd MDL-65493 theme_bootstrapbase: Emulate transition ends for BS2 events 2019-09-06 08:41:11 +08:00
Andrew Nicols d96c728295 MDL-65493 theme_bootstrapbase: Pending JS checks for transitions 2019-09-06 08:41:11 +08:00
Eloy Lafuente (stronk7) 95abbe12ba weekly release 3.6.5+ 2019-09-05 17:14:37 +02:00
Eloy Lafuente (stronk7) 2e33ec271b Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-09-05 17:14:34 +02:00
Andrew Nicols 17da93d42b MDL-66614 pgsql DML: Update get_records_sql to consume less memory
This is a backport of MDL-66327.

It's more memory efficient to use `pg_fetch_assoc` for each row than to
call `pg_fetch_all` and release memory immediately. This is because we
can treat the assoc fetch like an iterator and it only fetches the
current record into memory one at a time, whilst the all fetch fetches
all records and never unsets them. Attempting to unset them is extremely
time consuming.
2019-09-05 16:05:27 +01:00
Eloy Lafuente (stronk7) 2efbb5dcc0 Merge branch 'MDL-66560-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-05 15:58:38 +02:00
Jake Dallimore 8a7f86f387 Merge branch 'MDL-56223-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-09-05 17:20:50 +08:00
Simey Lameze 0b5aad45af MDL-56223 calendar: fix wrong create_calendar_events WS phpdoc 2019-09-05 17:16:14 +08:00
Simey Lameze aa97b1530f MDL-56223 calendar: show the number of deleted events 2019-09-05 17:16:14 +08:00
Simey Lameze a2a489d1f8 MDL-56223 calendar: skip events updating if nothing has changed 2019-09-05 17:16:14 +08:00
Luca Bösch c04c03594e MDL-66560 import: Format course search UI elements. 2019-09-05 06:39:56 +02:00
Jake Dallimore e3147eec7d Merge branch 'MDL-66551-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-09-05 11:16:53 +08:00
Simey Lameze 37e178e755 MDL-66551 core_user: remove orphaned calendar subscriptions 2019-09-05 10:59:04 +08:00
Simey Lameze 3ee7064392 MDL-66551 core_user: delete_user() should remove users calendar subs 2019-09-05 10:52:38 +08:00
Andrew Nicols de6225210d Merge branch 'MDL-66391-36' of https://bitbucket.org/isprynt/moodle into MOODLE_36_STABLE 2019-09-05 10:00:27 +08:00
Eloy Lafuente (stronk7) f9dc45fee6 Merge branch 'MDL-66072-36-3' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-09-05 02:48:32 +02:00
Peter d5f387f922 MDL-66072 core: Remove ancillary sharing functions and code 2019-09-05 08:44:36 +08:00
Peter c3ef9e4380 MDL-66072 core: Remove course sharing and related capabilities 2019-09-05 08:44:30 +08:00
Eloy Lafuente (stronk7) 99a75cba2c Merge branch 'MDL-66560-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-05 02:18:04 +02:00
AMOS bot 5000628be5 Automatically generated installer lang files 2019-09-05 00:12:06 +00:00
Luca Bösch 3d348a4638 MDL-66560 import: Format course search UI elements. 2019-09-05 00:41:53 +02:00
Segun Babalola 1d88fac6f6 MDL-66391 core_course: Fix to send correct Ajax parameter for userid 2019-09-04 12:22:36 +01:00
Andrew Nicols 179762bd02 Merge branch 'MDL-66137-36_mod_assign_marking_workflow_incorrect_grade_display' of https://github.com/tomdickman/moodle into MOODLE_36_STABLE 2019-09-04 13:48:18 +08:00
Tom Dickman b51509778b MDL-66137 mod_assign: fixed marking workflow incorrect grade display
Aligned logic between quick grading changes and set marking workflow state changes to accurately
finalise or remove final grade from the gradebook, depending on the marking workflow state if
being used.
2019-09-04 15:08:49 +10:00
Andrew Nicols 245e70eeab Merge branch 'MDL-66554-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-09-04 12:41:30 +08:00
Andrew Nicols 98e7475aea Merge branch 'MDL-66500-36-unoconvwarning' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-09-04 12:14:53 +08:00
Ryan Wyllie 6981a6f83b MDL-62284 javascript: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:24:05 +08:00
Ryan Wyllie d41890c0f7 MDL-62284 output: prevent nested JS mustache handler calls
Prevent the JS mustache helper from being executed from within
the render call of another mustache helper because it can allow
users to inject JS into the page.
2019-09-04 11:24:05 +08:00
Jake Dallimore 3f3cace28c Merge branch 'MDL-66265-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-04 11:07:17 +08:00
Andrew Nicols ba4d2dee9a MDL-66265 javascript: More specific overrides in eslintrc 2019-09-04 10:49:13 +08:00
Eloy Lafuente (stronk7) d8cb31ce19 Merge branch 'MDL-66265-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-04 02:14:28 +02:00
AMOS bot aa0f8fd86d Automatically generated installer lang files 2019-09-04 00:11:18 +00:00
Eloy Lafuente (stronk7) c4b7a43793 Merge branch 'MDL-66532-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-04 02:01:30 +02:00
Andrew Nicols 98a450e721 MDL-66265 javascript: Add jshint ignore for ES6 files in root dir 2019-09-04 06:53:45 +08:00
Andrew Nicols f8e02a34a7 MDL-66265 javascript: Add basic jshint ignores 2019-09-04 06:53:45 +08:00
Andrew Nicols b8a1748e48 MDL-66265 javascript: Bump jshint version 2019-09-04 06:53:45 +08:00
Andrew Nicols b043d306c3 MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:53:44 +08:00
Andrew Nicols dd159713a8 MDL-66532 javascript: Lock NPM version for NVM 2019-09-04 06:45:51 +08:00
Eloy Lafuente (stronk7) 53c8bd1b2f Merge branch 'MDL-63315-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-09-04 00:19:33 +02:00
Eloy Lafuente (stronk7) ed903633b3 Merge branch 'MDL-66120-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-09-03 12:12:47 +02:00
Andrew Nicols a029dfbc5b Merge branch 'MDL-66434-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-09-03 12:41:27 +08:00
Andrew Nicols 4aa04de246 Merge branch 'MDL-62161-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-09-03 11:50:34 +08:00
Andrew Nicols b1aba64aee Merge branch 'MDL-65042-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-09-03 09:29:51 +08:00
AMOS bot 51759ac646 Automatically generated installer lang files 2019-09-03 00:11:42 +00:00
Eloy Lafuente (stronk7) 0e884990f0 Merge branch 'MDL-66457-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-09-03 00:55:04 +02:00
sam marshall 7b2442a913 MDL-63315 DB: Postgres - Clear cursors in persistent connection
If there is a PHP fatal error and destructors do not run (this can
happen in out-of-memory errors, and maybe if there is an error in a
previous destructor) then Postgres cursors may be left open.

Usually this does not cause a problem because the connection is
closed anyway, but if using persistent connections, a future
request may reuse the connection with a cursor open. It then gets
errors when it tries to create a new cursor with the same name.

This change closes all cursors at the start of a persistent
connection.
2019-09-02 14:10:58 +01:00
Peter efe8b11186 MDL-66120 block_community: Disable community block and related caps
Disable community block access
2019-09-02 15:57:58 +08:00
Juan Leyva 1dca6b0fcf MDL-66501 tool_mobile: Prevent URLs in custom scheme 2019-09-02 15:29:55 +08:00
Jun Pataleta 64f0c4ceaa MDL-66187 format_singleactivity: Make sure available types is not empty 2019-09-02 05:06:37 +02:00
Andrew Nicols eacdff4e4f MDL-66187 course: Respect :addinstance in single activity format 2019-09-02 05:06:37 +02:00
Simey Lameze 1acf5e5da2 MDL-65749 lib: fix phpmailer file handling 2019-09-02 05:06:37 +02:00
Andrew Nicols 49523e0349 MDL-66181 course: Only assign roles that the user is allowed to assign 2019-09-02 05:06:37 +02:00
Andrew Nicols f63284d2eb MDL-66181 behat: You check checkboxes, not click them 2019-09-02 05:06:37 +02:00
Michael Hawkins 08e8818abe MDL-55451 mod_forum: Limit subscription redirect to internal URLs 2019-09-02 05:06:37 +02:00
David Monllaó 9dce35eae8 MDL-66069 mlbackend_python: Bump to a new version of the package 2019-09-02 05:06:37 +02:00
Andrew Nicols 8c21a3d340 Merge branch 'MDL-66472-36' of https://github.com/Dagefoerde/moodle into MOODLE_36_STABLE 2019-09-02 11:03:58 +08:00
Andrew Nicols 4a7316c071 Merge branch 'MDL-33087-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-09-02 10:48:35 +08:00
David Mudrák 1f69f00697 MDL-66504 lang: Use the new strings in the Behat scenario 2019-09-01 12:36:22 +02:00
Helen Foster 7334de1e6c MDL-66504 lang: Import fixed English strings (en_fix)
Significant string changes:

- mobilenotificationsdisabledwarning,tool_mobile - location corrected
- statsreport14,core - 'views/posts' corrected to 'posts/views'
- err_nousers,core_completion - explanation of who completion
- information is displayed for errorcourselisting,block_community - note
  about sunsetting moodle.net
2019-09-01 12:35:25 +02:00
Paul Holden ca1929d390 MDL-62161 user: preserve all selected users between searches. 2019-08-30 14:37:27 +01:00
Paul Holden 0fb84542b5 MDL-33087 tool_capability: correct role override link. 2019-08-30 14:34:41 +01:00
Andrew Nicols 2bfb88591a MDL-66457 behat: simplify selector search 2019-08-30 15:13:07 +08:00
Luca Bösch 46ebab12cf MDL-66434 mod_data: Align 'Field description' field as all other fields. 2019-08-30 07:56:10 +02:00
Jake Dallimore 2baf9a81d8 weekly release 3.6.5+ 2019-08-30 13:12:09 +08:00
Peter e49444d535 MDL-65429 mod_forum: Indicate subs fetch completion with no subs
Unit tests updated to make sure only a single query is executed after
multiple reads
2019-08-30 09:08:19 +08:00
Juan Leyva 1da54dc846 MDL-66554 mod_scorm: Set module viewed in WS 2019-08-29 20:46:18 +01:00
Jake Dallimore 0e314a4320 Merge branch 'MDL-66139_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-08-29 11:51:56 +08:00
Adrian Greeve 23fe5c9110 Merge branch 'MDL-65975-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-08-29 10:20:39 +08:00
Netica Informática 4639c08029 MDL-66139 cachestore_redis: Fix connection problems when port is not set
Due to some changes in Redis 5 php extension Moodle fails to connect via TCP when
no port is set. It's fixed upstream in phpredis repo (version 5.0.0, 5.0.1 and
5.0.2 affected so far), but with this patch we'll send the right port anyway.
2019-08-28 20:59:28 +02:00
Eloy Lafuente (stronk7) 3aa3952340 Merge branch 'MDL-63852-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-08-28 17:41:20 +02:00
Eloy Lafuente (stronk7) 80d85657b7 Merge branch 'MOODLE_36_STABLE_MDL-65116' of https://github.com/yao9394/moodle into MOODLE_36_STABLE 2019-08-28 16:59:28 +02:00
Adrian Greeve d631bfb4ef Merge branch 'MDL-66230-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-08-28 14:57:10 +08:00
Eloy Lafuente (stronk7) 6191d50b8a MDL-66184 core: Update composer to apply for php 7.0.0 as min
With behat extension v3.36.2 we started requiring php 7.0.0
(same requirement than core 3.6.x). This bumps all the components
in the lock file to suit that requirement.

Generated with php 7.0.x.
2019-08-27 00:32:36 +02:00
David Mudrák 2bcad30213 MDL-66500 lang: Do not mark unoconvwarning as deprecated
It has been deprecated by mistake.
2019-08-26 21:31:06 +02:00
Eloy Lafuente (stronk7) a93b0d75ed Merge branch 'MDL-66309-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-08-26 20:25:28 +02:00
Eloy Lafuente (stronk7) ec160fed59 Merge branch 'MDL-66312-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-26 19:42:18 +02:00
Jan Dageförde 7ef1e8818d MDL-66472 forms: Fix regression autocomplete not closing 2019-08-26 17:55:53 +02:00
Eloy Lafuente (stronk7) 5f5e77c4ef weekly release 3.6.5+ 2019-08-23 19:16:28 +02:00
Jun Pataleta a7a2fb253f Merge branch 'MDL-66483_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-08-23 20:14:56 +08:00
sam marshall 14ba75116b MDL-66309 block_recentlyaccesseditems: Improve upgrade performance 2019-08-23 11:36:20 +01:00
Eloy Lafuente (stronk7) 07508900e4 MDL-66483 lib: remove recent xmlize dep on setuplib/CFG
This removes the dependency added by MDL-66110 (aiming to fix
a CI job). So we keep things as they were and will fix the
CI job separately.
2019-08-23 11:32:30 +02:00
Luca Bösch 7fd442d168 MDL-63852 behat: Using correct exception class path. 2019-08-23 07:55:04 +02:00
Adrian Greeve b6f9a29a5e weekly release 3.6.5+ 2019-08-23 12:55:26 +08:00
Adrian Greeve f753d02aea Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-23 12:55:18 +08:00
John Yao dc8bac39e3 MDL-65116 mod_assign : Assignment due date does not update for groups
This commit fixes the assignment due date not showing correctly according to groups selected by users who can view grades
2019-08-23 13:13:34 +10:00
Jun Pataleta 325f268cb1 Merge branch 'MDL-66110-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-23 10:21:42 +08:00
Jun Pataleta 46e9a19620 MDL-66110 core: Require setuplib.php once as it's required by xmlize.php 2019-08-23 10:16:15 +08:00
Jun Pataleta 67cf6f02c3 Merge branch 'MDL-66110-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-22 16:26:55 +08:00
Jun Pataleta 14404f91ea MDL-66110 dml: Undo table name fix when table name's used as parameter 2019-08-22 16:18:04 +08:00
Ryan Wyllie cdc64ab1dd MDL-66110 dml: use fix_table_name for all mysql table names
Changed all of the places that were manually prefixing the table
name to instead fix the table name with the fix_table_name
function.
2019-08-22 16:18:04 +08:00
Adrian Greeve 955937a856 Merge branch 'MDL-66378-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-22 09:30:38 +08:00
Andrew Nicols 0ae284c15b MDL-66378 behat: Increase window size for rubric tests 2019-08-22 07:56:19 +08:00
Andrew Nicols 879946be6a MDL-66378 behat: Change screen size to small to work around UI bugs 2019-08-22 07:56:19 +08:00
Adrian Greeve 0287fd6499 Merge branch 'MDL-65443-m36' of https://github.com/NeillM/moodle into MOODLE_36_STABLE 2019-08-21 16:39:57 +08:00
Neill Magill 0d51c25e85 MDL-65443 core: Improve class descriptions for locking events 2019-08-21 09:05:19 +01:00
Jun Pataleta d113822e72 Merge branch 'MDL-66110-36' of https://github.com/ryanwyllie/moodle into MOODLE_36_STABLE 2019-08-21 09:57:23 +08:00
Adrian Greeve 8839000d68 Merge branch 'MDL-66378-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-21 09:02:39 +08:00
Andrew Nicols ceb89d1fb0 MDL-66378 behat: Correct grammar of resize step 2019-08-21 08:39:51 +08:00
Andrew Nicols 53b41d3a84 MDL-66378 grade: Set window size to large for rubric tests 2019-08-21 08:39:28 +08:00
Andrew Nicols 33c9f1fa48 MDL-66378 behat: All args are required for document.evaluate 2019-08-21 08:24:08 +08:00
AMOS bot c4cf607c19 Automatically generated installer lang files 2019-08-21 00:11:25 +00:00
Neill Magill e8b4c32290 MDL-65443 core: Log when a context is locked or unlocked 2019-08-20 09:33:03 +01:00
Jun Pataleta a3b6b58f19 Merge branch 'MDL-64437-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-08-20 14:19:08 +08:00
Adrian Greeve f18c63e584 Merge branch 'MDL-66378-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-20 14:10:51 +08:00
Jun Pataleta 46f06e7697 Merge branch 'MDL-65507-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-08-20 11:57:05 +08:00
Jun Pataleta ac858f44ae Merge branch 'MDL-66248_36' of https://github.com/dvdcastro/moodle into MOODLE_36_STABLE 2019-08-20 10:58:23 +08:00
Adrian Greeve dfba6ffe7f Merge branch 'MDL-65083-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-20 10:06:13 +08:00
David Castro 5cfa863adc MDL-66248 mod_forum: Fixes on portofolio command url styling. 2019-08-19 20:56:06 -05:00
Adrian Greeve 904caddecb Merge branch 'MDL-65561-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-20 09:38:18 +08:00
AMOS bot d8d1c97ef7 Automatically generated installer lang files 2019-08-20 00:10:51 +00:00
Adrian Greeve f026d258b8 Merge branch 'MDL-65604-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-19 16:29:21 +08:00
Bas Brands e4854c6653 MDL-65561 themes: user date filters display fixes 2019-08-19 08:25:24 +02:00
Bas Brands 9b36c1408e MDL-65083 theme_boost: update uses of pull-xs-right 2019-08-19 08:22:13 +02:00
Mihail Geshoski 1b8a5338dd MDL-64437 assignment: Fix element overlaping in low screen resolution 2019-08-19 13:32:02 +08:00
Mihail Geshoski 5d64e8eef1 MDL-65507 mod_data: Remove unnecessary record created event 2019-08-19 13:27:36 +08:00
Andrew Nicols 2076f32acb MDL-66378 competency: Add pending promises to competency chooser 2019-08-19 08:16:40 +08:00
Andrew Nicols 28b8712820 MDL-66378 behat: JS does not work with newlines in an xpath 2019-08-19 08:16:40 +08:00
Andrew Nicols 5680713966 MDL-66378 behat: Fix use of before/after selectors 2019-08-19 08:16:40 +08:00
Andrew Nicols f782dcffdc MDL-66378 behat: Backport expand autocomplete step 2019-08-17 16:37:40 +08:00
Andrew Nicols 9e812c35a7 MDL-66378 behat: Add partial named selector for whole autocomplete field 2019-08-17 16:37:40 +08:00
Andrew Nicols 38a64383f1 MDL-66378 behat: Before/after detection should be constrainable
The default before/after detection checks the entire body. Any match of
the text will therefore be found.

Add support for specification of a container for the nodes.
2019-08-17 16:37:40 +08:00
Andrew Nicols 7d84120a0e MDL-66378 behat: Add non-JS fallback for before/after 2019-08-17 16:37:40 +08:00
sam marshall a4dcb6a26a MDL-66378 Behat: Speed up 'before/after' step in Chrome
On some Chrome versions the xpath used for before/after is slow
and (sometimes) uses a lot of memory. This change uses pure
JavaScript to do the before/after calculation, which should always
be fast.
2019-08-17 16:37:40 +08:00
Andrew Nicols 26a36d2595 MDL-66378 behat: Correct invalid uses of selection from dropdown 2019-08-17 16:37:40 +08:00
Andrew Nicols 10b49eabb1 MDL-66378 report_participation: Correct label for target 2019-08-17 16:37:40 +08:00
Andrew Nicols 2b937e35d6 MDL-66378 gradereport_singleview: Add missing label for dropdown 2019-08-17 16:37:40 +08:00
Andrew Nicols d47457b4aa MDL-66378 behat: Update screen sizes to Y2K standards 2019-08-17 10:32:19 +08:00
Andrew Nicols fb7a713f4c MDL-66378 behat: Update dependencies for chrome webdriver fix 2019-08-17 10:32:19 +08:00
Juan Leyva 0cf9600c9b MDL-65042 rating: Fix incorrect image generated for user in rating 2019-08-16 15:41:50 +01:00
Juan Leyva 19cedc5bf8 MDL-65026 course: Fix modules intro formatting in WS
The Web Service seems to be doing excessive text cleaning.
2019-08-16 11:55:13 +01:00
Andrew Nicols 55515e15dc MDL-66312 js: Autocomplete promises were inside out
The pending promise should nott be resolved until the changes are
complete.
Previously the resolution of the pendingPromise was triggering the other
changes.
2019-08-16 11:40:15 +08:00
Andrew Nicols d36b3034d0 weekly release 3.6.5+ 2019-08-16 11:06:58 +08:00
Andrew Nicols 9353a72693 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-16 11:06:56 +08:00
Juan Leyva c580658cf0 MDL-65975 tool_mobile: Backport features admin should be able to disable 2019-08-15 13:04:33 +01:00
Andrew Nicols f51040346d Merge branch 'MDL-35939-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-15 16:10:03 +08:00
Jun Pataleta ee6c9e92ae MDL-35939 mod_quiz: Add quiz attempt generator function 2019-08-15 16:06:13 +08:00
Andrew Nicols ab44453bde Merge branch 'MDL-35939-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-08-15 12:04:12 +08:00
Jun Pataleta 6e3a15df95 Merge branch 'm36_MDL-66140_Mitigate_PECL_Solr_issue_Ref_72740' of https://github.com/scara/moodle into MOODLE_36_STABLE 2019-08-15 11:17:50 +08:00
Shamim Rezaie 01a06cb489 MDL-35939 mod_quiz: use descriptive titles for pages 2019-08-15 12:27:05 +10:00
Shamim Rezaie f0143c5a5e MDL-35939 mod_quiz: phpdoc fix 2019-08-15 12:27:05 +10:00
Shamim Rezaie 5dd2654b6f MDL-35939 mod_quiz: new functions to generate title for attempt pages 2019-08-15 12:27:03 +10:00
AMOS bot 350823fe15 Automatically generated installer lang files 2019-08-15 00:13:03 +00:00
Jun Pataleta 7adb08d1ad Merge branch 'MDL-65925-grade-page-broken-for-deleted-submission-MOODLE_36_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_36_STABLE 2019-08-14 15:26:29 +08:00
Andrew Nicols 247f3431d5 Merge branch 'patch-3' of https://github.com/aspark21/moodle into MOODLE_36_STABLE 2019-08-14 11:38:21 +08:00
Adrian Greeve 7313f15abc Merge branch 'MDL-52849-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-08-14 09:08:37 +08:00
Jun Pataleta 7ea95c10dd Merge branch 'MDL-62034-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-13 14:20:27 +08:00
Andrew Nicols 06259d40ae MDL-62034 assign: Add hint for user tour reset 2019-08-13 14:13:12 +08:00
Ryan Wyllie 678d682b35 MDL-66110 dml: Fix MySQL v8 compatibility with groups table
MySQL v8 has added "groups" to the reserved word list. That is used
as a table name in Moodle so we have to quote it with backticks in the
SQL so that MySQL knows it's being used as an identifier.
2019-08-13 11:14:24 +08:00
Jun Pataleta 9f4959bd87 Merge branch 'MDL-66104_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-08-12 14:51:45 +08:00
Peter 051d6f74e4 MDL-52849 core: Focus reader onto popup with ajax errors 2019-08-12 10:52:18 +08:00
Ilya Tregubov 40b81687d6 MDL-65925 assign: Grade page broken if submission was deleted. 2019-08-12 09:27:26 +10:00
Matteo Scaramuccia c77c2a8a06 MDL-66140 search: Mitigate PECL solr extension regression
Refs:
- https://bugs.php.net/bug.php?id=72740
- https://bugs.php.net/bug.php?id=75631
- https://github.com/php/pecl-search_engine-solr/pull/16
2019-08-11 20:07:52 +02:00
Andrew Nicols 10720c81cd MDL-65604 repository: Kill off missing param errors
The file picker template included an img with a src of "#". When the
template was loaded into the modal, the browser fetches the img src, but
it's immediately removed as that section is only used as an in-place
template. The src tag does not need to be present.
2019-08-11 14:53:09 +08:00
AMOS bot 916ca9c774 Automatically generated installer lang files 2019-08-10 00:11:27 +00:00
Jun Pataleta 0f07f03670 weekly release 3.6.5+ 2019-08-09 16:24:03 +08:00
Jun Pataleta 600b85f83a Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-09 16:24:01 +08:00
Jun Pataleta 7cfc31d809 Merge branch 'MDL-65679-36-fix' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-08-09 11:39:44 +08:00
Andrew Nicols 5543c95ccd MDL-65679 assignfeedback_editpdf: Adjust z-indexes for editpdf 2019-08-09 08:35:40 +08:00
Victor Deniz Falcon b791a215ff MDL-66272 core_renderer: fix favicon method PHPDoc 2019-08-08 12:47:58 +08:00
Amaia Anabitarte b8846767fe MDL-60636 behat: Fixing modified xpath 2019-08-08 11:58:17 +08:00
Andrew Nicols bcd7c897d1 Merge branch 'MDL-65595-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-08-08 10:28:52 +08:00
Jun Pataleta 7e11f3c83c Merge branch 'MDL-57239_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-08-08 08:48:05 +08:00
Bas Brands ffbbf7d9f2 MDL-60636 themes: form autocomplete chevron down 3.6 extra fix 2019-08-07 16:11:24 +08:00
Andrew Nicols 2770a205b6 Merge branch 'MDL-66039-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-07 15:33:13 +08:00
Jun Pataleta 0b44aeaf9d Merge branch 'MDL-56789-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-08-07 13:58:19 +08:00
Shamim Rezaie 0157d682d5 MDL-56789 core: Improve unit tests 2019-08-07 15:36:09 +10:00
Shamim Rezaie ae0e8015c5 MDL-56789 core: Recycle bin warn only if a grade item is being deleted 2019-08-07 15:34:44 +10:00
Sara Arjona 4f91fb9538 Merge branch 'MDL-63198-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-08-07 11:08:09 +08:00
Sara Arjona ad4427fc31 Merge branch 'MDL-60636-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-08-07 10:01:07 +08:00
Alistair Spark 553732088e MDL-66071 user: username is required with non-internal auth method 2019-08-07 01:03:03 +02:00
Sara Arjona 3cbf774ef0 Merge branch 'MDL-64598-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-08-06 15:30:23 +08:00
Andrew Nicols c9d36709fc Merge branch 'MDL-65679-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-08-06 13:18:26 +08:00
Andrew Nicols 6b8b1afb50 Merge branch 'MDL-65992-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-06 09:14:22 +08:00
Andrew Nicols 63aa3dc1af Merge branch 'MDL-33884_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-08-05 14:34:13 +08:00
Sara Arjona aee7b3c316 Merge branch 'MDL-66281-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-08-05 13:41:17 +08:00
Shamim Rezaie 202c04bbcd MDL-63198 forms: click on scrollbar should not close the suggestions box 2019-08-05 13:17:50 +10:00
Tim Hunt 8a14da2383 MDL-57239 qbehaviour_interactive: fix Try again button when reviewing 2019-08-02 11:46:55 +01:00
Luca Bösch 71eba0cb1d MDL-64598 pix: Adding width/height information to emoji SVG images. 2019-08-02 11:53:44 +02:00
AMOS bot 871454b2dc Automatically generated installer lang files 2019-08-02 00:11:32 +00:00
AMOS bot f8f338c2c8 Automatically generated installer lang files 2019-08-02 00:11:32 +00:00
Mihail Geshoski 2207bea33c MDL-65679 assign: Collapsing comments
The comments should appear above everything else when expanded, and expanding/collapsing comments
should not affect the position of anything else in the page.

All credit goes to Damyon Wiese.
2019-08-02 07:39:14 +08:00
Eloy Lafuente (stronk7) a58897441e MDL-66104 output: HTMLPurifier to allow <nolink> tags everywhere
Before the patch, HTMLPurifier was instructed to handle <nolink>
tags in block mode. That implies that any block tag enclosing it
had to be closed for HTML compliance.

But <noscript> tags are not part of the final output (they are
removed) but just internally used to skip filtering certain areas.

So they can be virtually everywhere, HTMLPurifier just should allow
them without any change, both to parent or children tags.
2019-08-01 17:53:16 +02:00
Eloy Lafuente (stronk7) 0e4e2ce352 weekly release 3.6.5+ 2019-08-01 17:07:02 +02:00
Eloy Lafuente (stronk7) 946e06bbdc Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-08-01 17:06:59 +02:00
Shamim Rezaie 36f588f8fb MDL-56789 core: Added unit test for course_modules_pending_deletion 2019-08-01 19:16:37 +10:00
Eloy Lafuente (stronk7) c9b3d8e710 Merge branch 'MDL-50472-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-01 10:12:05 +02:00
Mathew May c8ac8de2c7 MDL-50472 boost: Add maintenance message to the login page. 2019-08-01 14:38:45 +08:00
Sara Arjona c89aaced1a Merge branch 'MDL-42451-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-01 09:53:58 +08:00
Eloy Lafuente (stronk7) 99fb1c8c7b Merge branch 'MDL-50472-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-08-01 00:28:50 +02:00
Eloy Lafuente (stronk7) 2b22c47ac3 Merge branch 'MDL-57342-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-07-31 18:56:44 +02:00
Tim Hunt a1cb73feea MDL-33884 question export: raise memory limit
Question exports can be quite big, just like imports can. Therefore, we
should raise memory limits in the same way.

(Of course, eventually we should change the API, so that it writes one
questoin at a time, rather than building the whole export file contents
in RAM first, but that would be a much bigger change, and we need a
quick fix now.)
2019-07-31 16:40:11 +01:00
Mathew May ecbd999ca3 MDL-42451 installation: Add some Bootstrap classes for install 2019-07-31 14:41:01 +08:00
Mathew May 35d3396f21 MDL-65992 travis: Migrate to Xenial distro and default MySQL service 2019-07-31 13:03:15 +08:00
Peter 2ce7e21395 MDL-65595 core: Remove the nowrap from the form's radio template 2019-07-31 08:20:20 +08:00
AMOS bot baa3eec946 Automatically generated installer lang files 2019-07-31 00:09:23 +00:00
Paul Holden 67d288f6c2 MDL-66230 tool_usertours: account for deleted tours in privacy export. 2019-07-30 09:56:55 +01:00
Sara Arjona 22ecbc36c7 Merge branch 'MDL-64195-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-07-30 16:35:05 +08:00
Jun Pataleta 39789fcbd1 MDL-66281 tool_dataprivacy: Set sensitive data processing default value 2019-07-30 13:59:29 +08:00
Sara Arjona b861e09e65 Merge branch 'MDL-63458_36' of https://github.com/rlorenzo/moodle into MOODLE_36_STABLE 2019-07-30 11:59:47 +08:00
Adrian Greeve e974568f89 Merge branch 'MDL-66174-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-07-29 14:41:13 +08:00
Mathew May 28a27595e3 MDL-42451 installation: Allow enter key to proceed 2019-07-29 11:07:13 +08:00
Mathew May 7c5d2ebc95 MDL-50472 auth: Add maintenance message to the login page. 2019-07-29 10:51:22 +08:00
Jake Dallimore da6bf80c2f Merge branch 'MDL-65219-36' of https://github.com/ryanwyllie/moodle into MOODLE_36_STABLE 2019-07-26 15:21:53 +08:00
Eloy Lafuente (stronk7) 325b025522 weekly release 3.6.5+ 2019-07-25 13:44:53 +02:00
Adrian Greeve 24a8a6a043 Merge branch 'MDL-65078-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-07-24 09:53:55 +08:00
Mathew May 11cfdfb171 MDL-57342 admin: confightml will check if returned data is empty 2019-07-23 13:29:45 +08:00
Eloy Lafuente (stronk7) ac224b87a9 Merge branch 'MDL-65788-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-07-22 21:33:52 +02:00
Eloy Lafuente (stronk7) 6bc76a5086 Merge branch 'MDL-66132-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-07-22 20:40:54 +02:00
Bas Brands b23aa517f8 MDL-64195 theme_bootstrapbase: message drawer position
* prevent hiding the navbar behind the message drawer on small devices
2019-07-22 17:10:25 +02:00
Adrian Greeve 8a2dfa7ea1 Merge branch 'MDL-66136-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-07-22 10:43:14 +08:00
Mihail Geshoski d59b0eefac MDL-66136 assign: Verify presence of resources in online text submission 2019-07-22 08:02:57 +08:00
Mihail Geshoski d6c09ba2f3 MDL-66136 assignfeedback_comments: Extend testcase 2019-07-22 08:02:57 +08:00
Eloy Lafuente (stronk7) 62238e0117 Merge branch 'MDL-50733_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-07-20 00:25:03 +02:00
Mathew May 5610176e3c MDL-50733 core: Update composer to updated behat-extension 2019-07-19 16:22:25 +02:00
Eloy Lafuente (stronk7) bde0f62364 weekly release 3.6.5+ 2019-07-18 17:11:39 +02:00
Eloy Lafuente (stronk7) 2a7d48cd1a Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-07-18 17:11:37 +02:00
Kathrin Osswald 9d2fbd521b MDL-63250 mediaplugin: Fixed video player size in specific tables 2019-07-18 13:53:36 +02:00
Peter d47848dbc4 MDL-66174 mod_assign: Remove the strict widths on the annotation menu 2019-07-18 12:56:11 +08:00
Mathew May 23aae2b6ea MDL-65788 tool_policy: Move accept_policy JS call into an array 2019-07-18 10:48:36 +08:00
Andrew Nicols 7cf1f6d8d5 Merge branch 'MDL-59911-conv_cleanup_check-36' of git://github.com/leonstr/moodle into MOODLE_36_STABLE 2019-07-18 08:25:56 +08:00
Andrew Nicols 2f3ef4c515 Merge branch 'MDL-66163-36' of git://github.com/marinaglancy/moodle into MOODLE_36_STABLE 2019-07-18 08:16:59 +08:00
AMOS bot 93fab635bd Automatically generated installer lang files 2019-07-18 00:09:13 +00:00
Eloy Lafuente (stronk7) e284dc2042 Merge branch 'MDL-66115_36' of https://github.com/dvdcastro/moodle into MOODLE_36_STABLE 2019-07-17 23:10:01 +02:00
Bas Brands 59af2fc881 MDL-60636 themes: form autocomplete chevron down on mobile 2019-07-17 13:40:25 +02:00
Andrew Nicols 4adb26ca32 Merge branch 'MDL-65538-36' of git://github.com/sarjona/moodle into MOODLE_36_STABLE 2019-07-17 10:56:34 +08:00
Bas Brands 493ed38380 MDL-65357 themes: position enrolment icons in course listing 2019-07-17 09:42:29 +08:00
Eloy Lafuente (stronk7) fc22282d3b Merge branch 'MDL-66032-MOODLE_36_STABLE_awarded_badges_criteria' of https://github.com/andrewmadden/moodle into MOODLE_36_STABLE 2019-07-17 01:32:05 +02:00
Eloy Lafuente (stronk7) a6006f5a4b Merge branch 'MDL-65908-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-07-17 01:21:26 +02:00
Marina Glancy 9684f897ac MDL-66163 mod_forum: Add component to unittest sql queries
files from other components may exist in the files table
2019-07-16 20:37:09 +03:00
Leon Stringer cce561cdfe MDL-59911 fileconverter_unoconv: Fix: test PDF fails after upgrade
When generating the PDF of unoconv_test.docx this file's previous conversions
are removed from mdl_file_conversion.  But these may also be removed by
\core_files\task\conversion_cleanup_task in which case an error occurs as
delete() is invoked with a NULL id.  Added check for non-NULL id prior to
invoking delete().
2019-07-16 16:23:30 +01:00
Eloy Lafuente (stronk7) c53c3bbe03 Merge branch 'MDL-65555_MOODLE_36_STABLE' of https://github.com/tuanngocnguyen/moodle into MOODLE_36_STABLE 2019-07-16 12:36:38 +02:00
Andrew Nicols fbfbff8046 Merge branch 'MOODLE_36_STABLE_MDL-65517' of https://github.com/yao9394/moodle into MOODLE_36_STABLE 2019-07-16 12:23:38 +08:00
Andrew Nicols 8dc48409ab Merge branch 'MDL-65409-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-07-16 11:37:06 +08:00
Nathan Nguyen 5a1de3de31 MDL-65555 mod_lesson: fix group override backup and restore 2019-07-16 12:57:31 +10:00
Nathan Nguyen 6cb12d596f MDL-65555 mod_quiz: fix group override backup and restore 2019-07-16 12:56:23 +10:00
Ryan Wyllie 75d82cfa72 MDL-65219 message: add message/pendingcontactrequests.php page back
We previously had this page when contact requests were first introduced
and unfortunately we created a bunch of notifications that reference
this URL directly which now won't work because the page has been removed.

I've added it back but set it to redirect to the message/index.php page
and load the contact requests page there.
2019-07-16 09:49:54 +08:00
Damyon Wiese b0487262ec MDL-65078 competencies: fix webservice
The webservice list_course_module_competencies calls a function that does not exist.

Thanks to Marie-Eve Lévesque for reporting this issue.
2019-07-16 09:48:16 +08:00
Andrew Madden fab4db0994 MDL-66032 badges: Prevent empty awarded badges criteria being created.
When creating or editing the awarded badges criteria, the select element should be
required to prevent empty criteria from being created. In addition, if there are
already badges created with the empty criteria, there should be not be an exception
thrown when assessing whether the criteria has been completed.
2019-07-16 09:35:23 +10:00
Sara Arjona 8504b17c4a MDL-65538 competency: fix behat errors with firefox
There is a random behat error in 3.7 and master when executing the "Go to
the competency course competencies page." scenario: "Moodle exception: A
required parameter (courseid) was missing More information about this error".
It happens because sometimes the form is sent before the JS and it hasn't
the needed parameters defined. So they have been added as hidden to the
form to avoid the error (which I couldn't reproduce manually).
2019-07-15 14:22:46 +02:00
Eloy Lafuente (stronk7) ae2a7a21cb Merge branch 'MDL-58026-36' of https://github.com/MartinGauk/moodle into MOODLE_36_STABLE 2019-07-15 13:39:05 +02:00
Peter e024a6ca05 MDL-65908 mod_assign: Remove scroll repositioning.
Absolute positioned elements do not require repositioning on scroll as long as
their immediate parent is relatively positioned.
2019-07-15 08:44:28 +08:00
Peter fe8fcea294 MDL-65908 assign: Overflow and positioning updates
Draw all annotation within the drawing canvas instead of the region
2019-07-15 08:42:48 +08:00
Peter d75d48f497 MDL-65908 assign: Revert overflow scroll fix
Revert "MDL-65484 assign: Scrolling overflow CSS"

This reverts commit 5bda066caa.
2019-07-15 08:40:02 +08:00
Mathew May bc68cb69ca MDL-65788 tool_policy: Prevent two modals rendering for guests.
With the Guest registration calling policyactions.js the [data-action="view"]
was having two click handlers set on the inital policy modal trgger.
With this commit we state what we want the click event to be set on.
2019-07-14 18:54:07 +08:00
AMOS bot 9b06a22e03 Automatically generated installer lang files 2019-07-14 00:08:58 +00:00
David Castro a6b048b60b MDL-66115 qtype_ddimageortext: Fixing choice deletion.
Summarising responses fails when question choices have been removed.

AMOS BEGIN
CPY [deletedchoice,qtype_match],[deletedchoice,qtype_ddimageortext]
AMOS END
2019-07-12 14:35:32 -05:00
sam marshall d351dc5a59 MDL-66132 Search: Behat tests should use simpledb, fix mock count
When searching using mock results (the 'global search expects the
query' step), the result count is not correctly set. As a result, the
page incorrectly reports that there are no results and doesn't
correctly show the first page of multi-page results.

Additionally, some of the core Behat tests can now be moved to use
real searching with the simpledb engine, rather than using mock
results at all. This gives better tests.

Unfortunately it was not possible to move all of the core Behat tests
and deprecate the mock step, because some of the tests are related to
the UI for 'special' features searching by user or group, neither of
which are supported by the simpledb engine.
2019-07-12 17:40:16 +01:00
Damyon Wiese 6cbef68ec2 MDL-65409 files: Allow location header
Allow incorrect capitals in location header response.
2019-07-12 08:45:05 +08:00
John Yao c1bcad4ea7 MDL-65517 block_timeline: Hide completed course modules in Timeline
When some activities are manually completed by students, some are still showing in students' timeline.
This commit fix that for module assign,chat,choice,feedback,lesson,quiz,scorm and workshop.
2019-07-12 09:18:43 +10:00
Eloy Lafuente (stronk7) 5701d69f99 weekly release 3.6.5+ 2019-07-11 23:33:45 +02:00
Eloy Lafuente (stronk7) 5755a823e1 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-07-11 23:33:43 +02:00
Bas Brands c0bbdc4c20 MDL-66039 themes: remove duplicate css
* removed duplicate #page { margin-top: 50px };
2019-07-11 14:55:34 +02:00
Jun Pataleta 99f0d38c56 Merge branch 'MDL-65926-MOODLE_36_STABLE_lowercase_username_sql_query' of https://github.com/andrewmadden/moodle into MOODLE_36_STABLE 2019-07-11 11:00:19 +08:00
AMOS bot 602d1c020f Automatically generated installer lang files 2019-07-11 00:09:11 +00:00
Andrew Madden 87bcae7a57 MDL-65926 moodlelib: Convert username to lowercase prior to SQL query
Within a very large project, it was found that searching for a user with their username in the user table using a case insensitive
search was inefficient. Instead it is proposed that the username input is made to be lowercase prior to executing a database query
as the username for each user in the database must be lowercase. This allows for a case sensitive query to find the user data.
Essentially we are moving a case insensitive search for a user from SQL into PHP to increase performance.
2019-07-10 19:56:36 +10:00
Jun Pataleta bee49acf1e Merge branch 'MDL-66012-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-07-10 12:15:55 +08:00
Simey Lameze 59aae6ab8c MDL-66012 calendar: fix no event message on calendar views
Ahhh Jun. Thanks legend :)
2019-07-10 11:33:32 +08:00
Eloy Lafuente (stronk7) 31b6ef812b Merge branch 'MDL-56835_36-coursetimecreated' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-07-10 00:15:10 +02:00
Jun Pataleta 03b29c9b75 Merge branch 'MDL-66081-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-07-09 17:10:00 +08:00
Andrew Nicols c26796c0e7 Merge branch 'MDL-64258-36' of https://github.com/HuongNV13/moodle into MOODLE_36_STABLE 2019-07-09 14:51:39 +08:00
Andrew Nicols e6d981b3c2 Merge branch 'MDL-65965-36-fix' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-07-09 11:00:47 +08:00
Jun Pataleta a73230bf10 MDL-65965 behat: Do not fetch grouping IDs for empty grouping idnumbers 2019-07-09 10:49:18 +08:00
Mark Nelson 0b7e375d32 MDL-56835 report_participation: remove unreachable if condition 2019-07-09 09:15:16 +08:00
Mark Nelson 4a8da9b005 MDL-56835 report_participation: initialise action variables 2019-07-09 08:32:20 +08:00
Mark Nelson c241a52e12 MDL-56835 report_participation: use course timecreated as minlog 2019-07-09 08:32:12 +08:00
Matt Porritt fec1ffae54 MDL-56835 report_participation: release session lock 2019-07-09 08:31:47 +08:00
Eloy Lafuente (stronk7) dbcdedffd6 Merge branch 'MDL-66054-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-07-09 00:57:36 +02:00
Eloy Lafuente (stronk7) 0242b2596a Merge branch 'MDL-65965-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-07-09 00:55:17 +02:00
Martin Gauk ee3cecc141 MDL-58026 question: fix regrading in progress attempt
Do not convert autosave steps to true steps when regrading.

Thanks Eric Merrill for providing the unit test code.
2019-07-08 09:15:27 +00:00
AMOS bot 719e34fba7 Automatically generated installer lang files 2019-07-08 00:10:18 +00:00
AMOS bot a36a01c543 Automatically generated installer lang files 2019-07-07 00:09:05 +00:00
Sara Arjona c88d732e39 Moodle release 3.6.5 2019-07-05 12:27:19 +02:00
Simey Lameze 32265ff372 MDL-66081 calendar: fix typo in attribute description 2019-07-05 17:08:13 +08:00
AMOS bot 09323d63f1 Automatically generated installer lang files 2019-07-05 00:09:56 +00:00
Eloy Lafuente (stronk7) 61d76db67b weekly release 3.6.4+ 2019-07-04 16:50:57 +02:00
Eloy Lafuente (stronk7) 86efefc1eb Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-07-04 16:50:52 +02:00
AMOS bot acc147bb29 Automatically generated installer lang files 2019-07-04 00:08:48 +00:00
Shamim Rezaie 7f1c38ea92 MDL-61114 mod_assign: Check if the teacher can access the override 2019-07-03 18:05:59 +02:00
Shamim Rezaie 2451ef2ba5 MDL-61114 mod_assign: assignment overrides to observe group membership 2019-07-03 18:05:59 +02:00
Shamim Rezaie 5e9dd950a1 MDL-61115: mod_lesson: Check if the teacher can access the override 2019-07-03 17:50:23 +02:00
Shamim Rezaie 1aa9422c9f MDL-61115 mod_lesson: Lesson overrides to observe group membership 2019-07-03 17:50:23 +02:00
Sara Arjona c53515f170 Merge branch 'MDL-65958-36-v3' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-07-03 14:53:52 +02:00
Simey Lameze 5aaf5d99d7 MDL-65958 calendar: cover students default event type visibility 2019-07-03 20:41:21 +08:00
Simey Lameze a337b28093 MDL-65958 calendar: students should not see course event type 2019-07-03 20:41:20 +08:00
Simey Lameze 002437681b MDL-65958 calendar: add behat to test calendar_adminseesall behaviour 2019-07-03 20:41:20 +08:00
Simey Lameze ee905caef5 MDL-65958 calendar: fix adminseesall logic in the event form 2019-07-03 20:41:19 +08:00
Sara Arjona a76b3ea7c8 Merge branch 'MDL-64794_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-07-03 11:15:52 +02:00
Huong Nguyen 95594d39df MDL-64258 Group: Performance problem on the enrol group members page 2019-07-03 15:29:52 +07:00
Huong Nguyen 7d58ebbb19 MDL-64258 Group: Unit Test for find_users function 2019-07-03 15:29:42 +07:00
Eloy Lafuente (stronk7) 82002907b5 Merge branch 'MDL-65845_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-07-03 02:25:53 +02:00
AMOS bot edf7b72716 Automatically generated installer lang files 2019-07-03 00:08:54 +00:00
AMOS bot f4f079fa42 Automatically generated installer lang files 2019-07-03 00:08:54 +00:00
Eloy Lafuente (stronk7) fb1b60d0b4 Merge branch 'MDL-63268-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-07-03 00:13:49 +02:00
Sara Arjona 57f681365d Merge branch 'MDL-64614_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-07-02 21:21:46 +02:00
Luca Bösch 45a5c7bfa5 MDL-63268 tool_uploadcourse: Keep source course section number. 2019-07-02 19:48:57 +02:00
Eloy Lafuente (stronk7) a2bd8bec84 Merge branch 'MDL-65707-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-07-02 16:40:57 +02:00
Sara Arjona 821c578ff3 Merge branch 'MDL-65101_36' of git://github.com/markn86/moodle into MOODLE_36_STABLE 2019-07-02 14:50:34 +02:00
Eloy Lafuente (stronk7) 6b4a4fba82 Merge branch 'MDL-66001-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-07-02 12:10:12 +02:00
Sara Arjona 8a81a31fd8 Merge branch 'MDL-65839_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-07-02 10:42:19 +02:00
Eloy Lafuente (stronk7) d2015975ed Merge branch 'MDL-65853_m36' of git://github.com/gjb2048/moodle into MOODLE_36_STABLE 2019-07-02 10:25:51 +02:00
Shamim Rezaie d51f3d032e MDL-34411 mod_quiz: Check if the teacher can access the override 2019-07-02 08:16:43 +02:00
Shamim Rezaie 5622de1179 MDL-34411 groups: copy/paste error in test_groups_user_groups_visible 2019-07-02 08:16:43 +02:00
Shamim Rezaie 6faeafa53d MDL-34411 mod_quiz: quiz overrides to observe group membership 2019-07-02 08:16:43 +02:00
Damyon Wiese af45515fe1 MDL-64623 glossary: Check the entry id
The entry must match the glossary before you can do any action on it.
2019-07-02 08:16:43 +02:00
Damyon Wiese f3a81b5b3d MDL-53689 xmldb: Require a sesskey to load xml
Loading and unloading xml files is not protected from XSS with a sesskey.
2019-07-02 08:16:43 +02:00
Sara Arjona 393e396080 Merge branch 'MDL-65901-36' of https://github.com/lucaboesch/moodle into MOODLE_36_STABLE 2019-07-02 08:10:42 +02:00
Eloy Lafuente (stronk7) 54a250b5fa Merge branch 'MDL-64935-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-07-02 00:07:45 +02:00
Shamim Rezaie 5876688def MDL-66054 behat: typo fix 2019-07-02 04:05:52 +10:00
Eloy Lafuente (stronk7) 5fa331fc19 Merge branch 'MDL-64511-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-07-01 18:52:44 +02:00
Sara Arjona 5b502e1c04 Merge branch 'MDL-65297-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-07-01 18:35:18 +02:00
Luca Bösch 48a860601e MDL-65901 forum: Style advanced search form properly. 2019-07-01 18:03:41 +02:00
Sara Arjona 061f29c7ef Merge branch 'MDL-65973-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-07-01 13:14:19 +02:00
Dan Marsden b48c1715df MDL-60347 core: debugsmtp should be a developer only setting. 2019-07-01 12:16:48 +02:00
Sara Arjona 3a8a5c7968 Merge branch 'MDL-57884_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-07-01 09:58:02 +02:00
Eloy Lafuente (stronk7) a7547d531f MDL-64614 environment: mssql requirement up to 2012 (11.0) 2019-06-30 11:58:33 +02:00
Eloy Lafuente (stronk7) cbebe6810c MDL-64614 environment: 3.8 base information
This is a direct copy of the 3.7 branch to have
changes under control easier for next commits.
2019-06-30 11:58:33 +02:00
AMOS bot 390d427b2a Automatically generated installer lang files 2019-06-30 00:09:24 +00:00
AMOS bot 839da4abbe Automatically generated installer lang files 2019-06-30 00:09:24 +00:00
AMOS bot b9cda33903 Automatically generated installer lang files 2019-06-29 00:09:27 +00:00
AMOS bot df4aa5380f Automatically generated installer lang files 2019-06-29 00:09:27 +00:00
David Monllaó 20083e193d MDL-65845 mod_lesson: Fix wrong pointer to an object
We should be pointing to the array of timecreated values instead.
2019-06-28 21:06:53 +02:00
David Monllaó e2c7bd75ef MDL-65839 core_analytics: New indicator instances for each analysable 2019-06-28 21:00:41 +02:00
Paul Holden 0ecea81e24 MDL-64511 privacy: encode data URL when loading content.
Previously paths that included ? or # characters would break loading.
2019-06-28 13:17:18 +01:00
Paul Holden f058a0ae79 MDL-65297 atto_managefiles: improve filename decoding.
Filenames containing # character would previously be missed.
2019-06-28 13:14:35 +01:00
Sara Arjona ea99ff8801 Merge branch 'MDL-65506-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-06-28 12:16:41 +02:00
Mark Nelson 885b98991b MDL-65101 core_message: add Behat test 2019-06-28 18:14:39 +08:00
Mark Nelson 1ba6407a66 MDL-65101 core_message: 'canmessage' should trump 'requirescontract' 2019-06-28 15:41:29 +08:00
AMOS bot 824840cf1f Automatically generated installer lang files 2019-06-28 00:09:56 +00:00
Gareth Barnard 12ffbefe4a MDL-65853 format_base: Labels counted in section activity summary. 2019-06-27 23:38:16 +01:00
Eloy Lafuente (stronk7) e60503f77c weekly release 3.6.4+ 2019-06-27 18:54:35 +02:00
Eloy Lafuente (stronk7) 6be471293b Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-06-27 18:54:32 +02:00
Andrew Nicols 03e8d1d8f8 Merge branch 'MDL-53778_36' of https://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-06-27 08:37:11 +08:00
Eloy Lafuente (stronk7) 616755e129 MDL-53778 quiz: ensure completion deps are fulfilled by behat
Behat backgrounds and scenarios must observe the new
interdependencies between quiz completion settings.

This commits just applies that to the tests missing it.
2019-06-27 01:13:11 +02:00
Eloy Lafuente (stronk7) 6585acf84d MDL-53778 quiz: ensure completion deps are fulfilled by generator uses
There are some mod_quiz generator issues where the new chain
of dependencies between completion settings was not being observed.

This patch just ensures that the now 3 chained settings are
enabled together (or new quiz options logic will proceed to
disable them).
2019-06-27 01:13:11 +02:00
Eloy Lafuente (stronk7) 97516416ad Merge branch 'MDL-66003-36-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_36_STABLE 2019-06-26 23:04:38 +02:00
Nicolas Dunand 029c0fdb85 MDL-63458 core_user: Remove send message if messaging is disabled 2019-06-26 11:29:35 -07:00
Sara Arjona 2681c83fb8 Merge branch 'MDL-60088-36' of git://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-06-26 18:11:24 +02:00
Eloy Lafuente (stronk7) d6adc76343 Merge branch 'MDL-53778_36' of https://github.com/anieminen/moodle into MOODLE_36_STABLE 2019-06-26 17:50:50 +02:00
Eloy Lafuente (stronk7) 232168c8f2 Merge branch 'MDL-65249-36-fix' of https://github.com/snake/moodle into MOODLE_36_STABLE 2019-06-26 10:29:54 +02:00
Jake Dallimore 2eef46fb46 MDL-65249 session: use redis host constant in unit tests 2019-06-26 16:11:50 +08:00
Jake Dallimore 4f8912ac4e Merge branch 'MDL-65249-redis-catch-exception-after-retry-MOODLE_36_STABLE' of https://github.com/ilya-catalyst/moodle into MOODLE_36_STABLE 2019-06-26 14:50:24 +08:00
Jake Dallimore d3552b500f Merge branch 'MDL-60978-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-06-26 13:23:15 +08:00
AMOS bot 0af69b05b1 Automatically generated installer lang files 2019-06-26 00:09:35 +00:00
Eloy Lafuente (stronk7) f9d5f0bedc Merge branch 'MDL-65181-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-06-26 00:44:00 +02:00
David Mudrák ff0847e74b MDL-66003 lang: Use the updated strings in the tests 2019-06-25 22:07:44 +02:00
Helen Foster ec1f3ffb7a MDL-66003 lang: Import fixed English strings (en_fix)
Significant string changes:

* moodleorghubname,core_admin and
  sitemustberegistered,message_airnotifier - 'Moodle.net' changed to
  'Moodle'

* registration_help,core_admin and registermoochtips,core_hub - removed
  erroneous 'access to Moodle.net our course sharing platform'

* trackingtype_help,mod_forum and formnotavailable,core_grading and
  showgrades_help,core and rolewarning_help,core_rating -
  'Administration block' changed to 'Actions menu or admin block',
  'navigation block' changed to 'navigation drawer or block'
2019-06-25 22:06:14 +02:00
Arto Nieminen a63a6643e5 MDL-53778 quiz settings: Ensure that disabled checkboxes have value 0 2019-06-25 13:28:08 +03:00
Ilya Tregubov f7c13d3996 MDL-65249 Session: Throw exception if number of attempts exceeded. 2019-06-25 15:08:16 +10:00
Simey Lameze e39814b41a MDL-65707 calendar: behat scenario to test default event type 2019-06-25 10:07:00 +08:00
Simey Lameze b92a61734c MDL-65707 calendar: set the correct event type on site calendar 2019-06-25 10:01:02 +08:00
AMOS bot 79421e92f2 Automatically generated installer lang files 2019-06-25 00:09:26 +00:00
Eloy Lafuente (stronk7) 106294da28 Merge branch 'MDL-64340-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-06-25 00:54:10 +02:00
Bas Brands acb53bb1f0 MDL-64935 theme: prevent activitynavigation link overflowing container 2019-06-24 14:50:58 +02:00
Bas Brands 2dfa8e8d74 MDL-66001 block_myoverview: fix incorrect closing tag 2019-06-24 12:10:48 +02:00
Jake Dallimore f056ce4e0d Merge branch 'MDL-65893-36' of https://github.com/nicoroeser/moodle into MOODLE_36_STABLE 2019-06-24 11:42:53 +08:00
AMOS bot be3ed34e68 Automatically generated installer lang files 2019-06-24 00:08:25 +00:00
Mathew May d3c46e052e MDL-60088 travis: add dist:trusty to travis
We are doing this because travis changed its default release to xenial.
So this is a stop gap and we will add xenial support moving forward.
2019-06-23 23:57:33 +08:00
Jun Pataleta 5a0a757830 MDL-65965 behat: Map grouping for activity data generator 2019-06-21 15:41:04 +08:00
Jun Pataleta bdd0fce48d MDL-65965 availability: Behat test for activity grouping restriction 2019-06-21 15:41:04 +08:00
Andrew Nicols 8215efe451 MDL-60978 session: Run redis tests in isolation 2019-06-21 14:36:13 +08:00
Andrew Nicols af1a436b2b MDL-60978 testing: Support ability to run phpunit in isolated process 2019-06-21 14:36:13 +08:00
Shamim Rezaie ad8a4d8252 MDL-64340 mod_quiz: not display "add random question" when no permission 2019-06-21 08:53:57 +10:00
Eloy Lafuente (stronk7) 3cb2c5657a weekly release 3.6.4+ 2019-06-20 17:43:02 +02:00
Eloy Lafuente (stronk7) 1f1a74a431 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-06-20 17:42:58 +02:00
Juan Leyva 20a3b1b194 MDL-65973 calendar: Avoid sesskey checks in WS
External function submit_create_update_form should avoid any sesskey checks.
2019-06-20 15:59:24 +02:00
Jake Dallimore 99d4117301 Merge branch 'MDL-65084-m36' of https://github.com/NeillM/moodle into MOODLE_36_STABLE 2019-06-20 09:44:13 +08:00
Andrew Nicols 360920f41b Merge branch 'MDL-61319-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-06-20 08:11:07 +08:00
Eloy Lafuente (stronk7) 1d6b2c6e08 Merge branch 'MDL-64975-36' of https://github.com/nicoroeser/moodle into MOODLE_36_STABLE 2019-06-20 00:18:07 +02:00
Eloy Lafuente (stronk7) 15e212555e Merge branch 'MDL-65910-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-06-19 20:54:49 +02:00
Eloy Lafuente (stronk7) cde9e41fc2 Merge branch 'MDL-65665-36-2' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-06-19 20:29:52 +02:00
Eloy Lafuente (stronk7) 164c68f3e5 Merge branch 'MDL-65806-m36' of https://github.com/sammarshallou/moodle into MOODLE_36_STABLE 2019-06-19 18:27:29 +02:00
Eloy Lafuente (stronk7) a1069966fd Merge branch 'MDL-65864_36' of git://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-06-19 18:09:55 +02:00
Eloy Lafuente (stronk7) ba82320484 Merge branch 'MDL-55821-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-06-19 18:05:29 +02:00
Neill Magill e597b88315 MDL-65084 recent items: Handle deleted courses
The method should not cause errors when a course with activities
that the user has visited no longer exists.

Ensuring that we only get records for courses still in the database
will stop any course not found erros from get_fast_modinfo()
2019-06-19 09:06:17 +01:00
Neill Magill 662c071f65 MDL-65084 recent items: Test handling of deleted courses 2019-06-19 09:06:14 +01:00
Jake Dallimore 0243fd369b Merge branch 'MDL-65904-36' of git://github.com/merrill-oakland/moodle into MOODLE_36_STABLE 2019-06-19 15:03:12 +08:00
Tim Hunt 81b386b9ae MDL-57884 quiz: autosave should not send the value of submit buttons 2019-06-18 17:47:55 +01:00
Bas Brands 97bfff5c12 MDL-61319 themes: prevent using @extend rules for complex classes
* the settings and navigation blocks scss extended .fa which caused
issues with native fontawesome classes like fa-pull-left.
2019-06-18 13:52:12 +02:00
M Kassaei b4bec70f7d MDL-65840 qtype_ddmarker: coordinates of cirle shape
The coordinates of a circle shape are not allowed to be smaller than its radius.
By default, set the coordinates to be the same as the radius.
2019-06-18 09:46:02 +08:00
AMOS bot e1255d9a68 Automatically generated installer lang files 2019-06-18 00:08:45 +00:00
Eloy Lafuente (stronk7) efb364d5ff Merge branch 'MDL-64383-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-06-17 23:03:07 +02:00
Shamim Rezaie 7f682a5392 MDL-65506 forms: get the correct value for advcheckbox fields in js 2019-06-16 17:10:10 +10:00
AMOS bot 8e7363baa6 Automatically generated installer lang files 2019-06-15 00:08:22 +00:00
Nicolas Roeser 3f40483351 MDL-64975 moodlelib: fix float formatting if decsep is ~ (tilde)
Commit 637da99edb has introduced changes
for removing trailing zeroes from the output of function format_float.
Due to a small omission, the function causes a PHP warning when the
string decsep is set to a tilde character ('~'). This is rarely the
case.

The bug lies in using PHP function preg_replace with a string that
contains external input (in this case, including decsep), but without
escaping it for PCRE processing.

This commit fixes the function to also support a tilde character in
string decsep. It also adds tests for having tilde as decimal separator.

Thanks-To:  Jake Dallimore <jake@moodle.com>
2019-06-14 13:03:07 +02:00
Paul Holden 11e1774de7 MDL-65181 mod_data: show required field indicator for textarea fields. 2019-06-14 09:55:28 +01:00
Nicolas Roeser c68f118e35 MDL-65893 webservice: format site name (handle language tags etc.)
Allow web service clients (like the Moodle App) to benefit from a
formatted (filtered) site name. Select the filtered (localized etc.)
string on server side, before it is sent to the web service client.

For example, this translates a site name which uses language tags in
curly braces when using the filter_multilang2 plugin.

Thanks-To: Juan Leyva <juan@moodle.com>
Thanks-To: Kathrin Osswald <kathrin.osswald@uni-ulm.de>
2019-06-14 10:36:14 +02:00
Jun Pataleta fffbcd1641 MDL-65910 report_stats: Add stattype query condition for consistency 2019-06-14 13:01:41 +08:00
Mihail Geshoski fd7738bc17 MDL-65665 forum: WS does not respect subscribe on reply user preference 2019-06-14 08:47:55 +08:00
Mihail Geshoski 48efb6d287 MDL-65665 forum: Add unit test 2019-06-14 08:47:55 +08:00
Tim Hunt c82b6e01b1 MDL-65864 question engine: fix re-saving a new usage
Before this fix, test_repeated_usage_saving_new_usage was failing but
test_repeated_usage_saving_existing_usage was passing. Now the
behaviour is consistent and they both pass.
2019-06-13 18:02:05 +01:00
Eloy Lafuente (stronk7) 43c501a6da weekly release 3.6.4+ 2019-06-13 18:15:42 +02:00
Eloy Lafuente (stronk7) 99ed7c1161 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-06-13 18:15:40 +02:00
Andrew Nicols fe2bc7f69e Merge branch 'MDL-65814-36' of git://github.com/junpataleta/moodle into MOODLE_36_STABLE 2019-06-13 11:44:53 +08:00
Jun Pataleta 176457450a MDL-65814 block_timeline: Bring back item counts for action events 2019-06-13 11:30:14 +08:00
Jun Pataleta 07caf1b933 Merge branch 'MDL-55997-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-06-13 10:28:49 +08:00
Peter fb4769c30a MDL-55997 core_reports: modify user stats query to fix duplicate rows 2019-06-13 07:46:12 +08:00
Eloy Lafuente (stronk7) 0e94568f01 Merge branch 'MDL-64484-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-06-12 20:08:28 +02:00
Eric Merrill d49423d131 MDL-65904 theme: Compile fallback css in the correct order 2019-06-12 13:09:18 -04:00
Paul Holden 3d61b21764 MDL-64484 user: cross-DB compatible profile field ordering. 2019-06-12 17:02:01 +01:00
Jun Pataleta 8b7c7ae5d2 Merge branch 'MDL-65803-36' of git://github.com/peterRd/moodle into MOODLE_36_STABLE 2019-06-12 13:58:39 +08:00
Andrew Nicols 939b429054 Merge branch 'MDL-65703-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-06-12 12:39:20 +08:00
Peter 086dd3c269 MDL-65803 recentlyaccesseditems: Restrict response to valid courses.
* Additional hooks to cleanup data when a course or module is deleted
* Augmented unit tests to cover the situation when a course is deleted
* Upgrade step to cleanup existing data
2019-06-12 12:17:55 +08:00
Andrew Nicols 4b2d298d3e Merge branch 'MDL-65829_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-06-12 10:33:37 +08:00
Andrew Nicols 023a8a778f Merge branch 'MDL-64484-36' of https://github.com/paulholden/moodle into MOODLE_36_STABLE 2019-06-12 09:01:59 +08:00
sam marshall c4c0589a91 MDL-65806 Search: Solr does not find words in italic 2019-06-11 16:44:18 +01:00
Paul Holden 3703f2eec6 MDL-64484 user: show full profile field name in filter element. 2019-06-11 14:24:15 +01:00
Andrew Nicols ae6616a7b1 Merge branch 'MDL-65817_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-06-11 11:06:27 +08:00
Andrew Nicols da0762f95d Merge branch 'MDL-65183-MOODLE-36' of https://github.com/kristian-94/moodle into MOODLE_36_STABLE 2019-06-11 11:03:19 +08:00
Jun Pataleta 5a4937049c Merge branch 'MDL-55592-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-06-10 15:22:57 +08:00
Andrew Nicols 0380b49e1b Merge branch 'm36_MDL-61038_Fix_uuid_extensions_usage_v2' of https://github.com/scara/moodle into MOODLE_36_STABLE 2019-06-10 14:11:51 +08:00
Matteo Scaramuccia b7d9f9e827 MDL-61038 setuplib: Fixed PECL UUID extension support 2019-06-08 23:13:40 +02:00
AMOS bot 20227eee86 Automatically generated installer lang files 2019-06-07 00:09:56 +00:00
Kristian Ringer f203630918 MDL-65183 block_timeline: escape newline characters 2019-06-07 09:34:21 +10:00
Eloy Lafuente (stronk7) 92708b3f8b MDL-65817 behat: switch to forked repo towards php73 compatibility
It seems that https://github.com/instaclick/php-webdriver/pull/91
is being ignored (in fact the repository itself doesn't show much
activity). So we have decided to fork it and apply any fix able
to keep our (non-marionette) runs working.

Hopefully, soon, the new W3C drivers will be supported by our
behat->mink stack... and we'll be able to move to it (from current
JSonwire drivers). So all this will be hostory.
2019-06-06 19:50:06 +02:00
David Monllaó 48bb66e3d3 MDL-65829 analytics: Accept enrol start time after analysis time 2019-06-06 19:05:55 +02:00
Eloy Lafuente (stronk7) 4f64c3f57c weekly release 3.6.4+ 2019-06-06 16:46:45 +02:00
Eloy Lafuente (stronk7) 1575e0551d Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-06-06 16:46:43 +02:00
Damyon Wiese 3a37d96479 MDL-55821 assign: Show assign grade
When marking workflow is enabled and the grade is not released yet,
it would be helpful to show the assignment grade in the grading form.
2019-06-06 14:27:37 +08:00
Damyon Wiese 5a4f04c54f MDL-64383 user: Make username required
Username is a required field, we should indicate this even if it has a help icon.
2019-06-06 13:28:34 +08:00
AMOS bot 3a4603871a Automatically generated installer lang files 2019-06-06 00:08:25 +00:00
Sara Arjona f447d028f7 Merge branch 'MDL-65777-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-06-05 09:01:20 +02:00
Mihail Geshoski 20d6fcf956 MDL-65777 assignment: Respect user full name in downloaded submissions 2019-06-05 11:14:59 +08:00
Adrian Greeve 115a493b7f Merge branch 'MDL-65731_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-06-05 10:42:17 +08:00
AMOS bot 200818f912 Automatically generated installer lang files 2019-06-05 00:08:27 +00:00
Eloy Lafuente (stronk7) 0eed941c68 Merge branch 'MDL-65689-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-06-04 23:32:30 +02:00
Eloy Lafuente (stronk7) 4295445828 Merge branch 'MDL-65576-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-06-04 21:40:12 +02:00
Eloy Lafuente (stronk7) 0cbc68d58b Merge branch 'm36_MDL-65686_Fix_Incorrect_Function_Call' of https://github.com/scara/moodle into MOODLE_36_STABLE 2019-06-04 20:05:14 +02:00
Simey Lameze 76162e5ed2 MDL-65703 calendar: do not add course param for site calendar 2019-06-04 19:37:50 +08:00
Andreas Grabs bc7a35db6a MDL-65703 core_calendar: fix user event type filtering logic 2019-06-04 19:37:49 +08:00
Jun Pataleta 792d9c26d3 Merge branch 'MDL-65696-MOODLE-36' of https://github.com/kristian-94/moodle into MOODLE_36_STABLE 2019-06-04 16:54:06 +08:00
AMOS bot 748d9bd512 Automatically generated installer lang files 2019-06-04 00:08:22 +00:00
Eloy Lafuente (stronk7) 7730b4b575 Merge branch 'MDL-63240-36' of https://github.com/Kathrin84/moodle into MOODLE_36_STABLE 2019-06-03 17:58:04 +02:00
AMOS bot 4e78dd9921 Automatically generated installer lang files 2019-06-03 00:08:25 +00:00
Kristian Ringer 2f3ac0e51c MDL-65696 assign: Fix width of editpdf comments 2019-06-03 09:28:25 +10:00
Andrew Nicols fecba4307a MDL-65576 behat: Reset Selenium driver between scorm scenarios 2019-05-31 08:09:25 +08:00
Eloy Lafuente (stronk7) 2e58ffbe4c MDL-64794 tcpdf: Bump to tcpdf 6.2.26 2019-05-30 23:48:36 +02:00
Matteo Scaramuccia 7bd829fa56 MDL-65686 setuplib: Fix missing round brackets 2019-05-30 22:43:04 +02:00
Eloy Lafuente (stronk7) 124ac3bcf7 weekly release 3.6.4+ 2019-05-30 12:18:32 +02:00
Eloy Lafuente (stronk7) 77d98b8215 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-05-30 12:18:29 +02:00
Tim Hunt 697de172a1 MDL-65731 quiz manual grading: fix ambiguous order by idnumber 2019-05-29 16:55:14 +01:00
Kathrin Osswald ebdc693048 MDL-63240 theme Boost: Removed z-indexes for border styling in navdrawer 2019-05-29 17:55:08 +02:00
Marina Glancy fd37432a6e MDL-65726 core_roles: allow to create roles in install.php 2019-05-29 10:44:32 +02:00
Damyon Wiese 4bafd61443 MDL-55592 lti: Forget the key and secret
When the "Enter your consumer key and shared secret" form is displayed,
it should not contain the same values it had the last time it was opened.
2019-05-29 13:59:43 +08:00
Adrian Greeve ff6112f675 Merge branch 'MDL-57729-36' of git://github.com/mihailges/moodle into MOODLE_36_STABLE 2019-05-29 11:42:27 +08:00
Adrian Greeve fe4a9a28e4 Merge branch 'MDL-65726-36' of git://github.com/marinaglancy/moodle into MOODLE_36_STABLE 2019-05-29 11:08:42 +08:00
Mihail Geshoski 75dacc6329 MDL-57729 enrol_lti: Escape the property values of the xpath elements 2019-05-29 09:57:02 +08:00
Jake Dallimore 72436b5a0b Merge branch 'MDL-65326-MOODLE_36_STABLE' of https://github.com/dmitriim/moodle into MOODLE_36_STABLE 2019-05-29 09:35:39 +08:00
AMOS bot 8a01a9dbe6 Automatically generated installer lang files 2019-05-29 00:09:28 +00:00
Marina Glancy df597afcfb MDL-65726 role: do not fail unittest if plugins create their roles 2019-05-28 19:11:58 +02:00
Jake Dallimore 9131d460b8 Merge branch 'MDL-65657-36-int-fix-1' of https://github.com/ryanwyllie/moodle into MOODLE_36_STABLE 2019-05-28 14:06:34 +08:00
Ryan Wyllie 350cb520b8 MDL-65657 message: reduce message poll timer for behat tests 2019-05-28 13:36:16 +08:00
Jun Pataleta 3eec169ce6 Merge branch 'MDL-65697-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-05-28 13:31:01 +08:00
Dmitrii Metelkin 131da11055 MDL-65326 backup: check caps exist before assigning 2019-05-28 11:18:08 +10:00
Jun Pataleta 2273ca23ff Merge branch 'MDL-65606-36' of https://github.com/Chocolate-lightning/moodle into MOODLE_36_STABLE 2019-05-27 16:27:09 +08:00
Jake Dallimore 814c969f70 Merge branch 'MDL-64330-36' of git://github.com/andrewnicols/moodle into MOODLE_36_STABLE 2019-05-27 15:24:02 +08:00
Andrew Nicols 18d595089b MDL-64330 course: Correct course test assumptions 2019-05-27 15:08:48 +08:00
Jake Dallimore 600166489c Merge branch 'MDL-65657-36' of https://github.com/ryanwyllie/moodle into MOODLE_36_STABLE 2019-05-27 13:31:57 +08:00
Mathew May 1b3bb25b6a MDL-65606 mod_data: Add approvalstatusclass to template 2019-05-27 13:13:19 +08:00
Ryan Wyllie 4c74b7d17b MDL-65657 message: revert polling timeout back to old algorithm 2019-05-27 11:59:02 +08:00
Adrian Greeve 183bce3a77 Merge branch 'MDL-64523-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-05-27 10:50:44 +08:00
AMOS bot 0b92419829 Automatically generated installer lang files 2019-05-25 00:08:42 +00:00
Shamim Rezaie 42ce94472f MDL-65689 task: fix typo in help string 2019-05-25 05:19:49 +10:00
Shamim Rezaie e011a40e21 MDL-64523 core_access: replace .delegate with .on
As of jQuery 3.0, .delegate() has been deprecated. It was superseded by
the .on() method since jQuery 1.7, so its use was already discouraged.
2019-05-25 04:28:05 +10:00
Shamim Rezaie d69e87b2ba MDL-64523 core_access: Fix js racing issue when overriding permissions 2019-05-25 04:28:05 +10:00
Shamim Rezaie ec5d9e968a MDL-64523 core_access: Improve the title of the delete role links 2019-05-25 04:28:05 +10:00
Sara Arjona bc6bb763aa Merge branch 'MDL-65060-36' of git://github.com/aanabit/moodle into MOODLE_36_STABLE 2019-05-24 12:35:39 +02:00
Amaia Anabitarte 8f03499b61 MDL-65060 core_message: Delete messages behat test 2019-05-24 12:15:14 +02:00
AMOS bot 0e2dec33de Automatically generated installer lang files 2019-05-24 00:15:15 +00:00
Simey Lameze c62871aa9d MDL-65697 qtype_missingtype: include missing class 2019-05-24 07:02:20 +08:00
Eloy Lafuente (stronk7) baebbcc341 weekly release 3.6.4+ 2019-05-23 20:35:26 +02:00
Eloy Lafuente (stronk7) 66eca74041 Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-05-23 20:35:24 +02:00
Amaia Anabitarte 9ee809d685 MDL-65060 core_message: Group message data generator 2019-05-23 15:35:11 +02:00
Jun Pataleta 40acd3985c Merge branch 'MDL-55197_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-05-23 11:58:07 +08:00
Andrew Nicols ae0fc8eef2 Merge branch 'MDL-59650-36' of git://github.com/lameze/moodle into MOODLE_36_STABLE 2019-05-23 10:29:18 +08:00
Adrian Greeve f467121ce0 Merge branch 'MDL-65549_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-05-23 10:11:27 +08:00
Adrian Greeve e793a8e368 Merge branch 'MDL-65634_36' of git://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-05-23 09:55:59 +08:00
Andrew Nicols d4fe51c7d7 Merge branch 'MDL-65654-36' of https://github.com/danielneis/moodle into MOODLE_36_STABLE 2019-05-23 09:49:01 +08:00
AMOS bot a97610ac5b Automatically generated installer lang files 2019-05-23 00:12:53 +00:00
Jun Pataleta 92a8b46a79 Merge branch 'MDL-65636_36' of https://github.com/timhunt/moodle into MOODLE_36_STABLE 2019-05-22 19:35:59 +08:00
Tim Hunt 0925ecdbd4 MDL-55197 filter_multilang: handle 'en' as parent lang better 2019-05-22 11:17:59 +01:00
Tim Hunt 0bff3507f7 MDL-55197 filter_multilang: move preg_callback fn into class 2019-05-22 11:12:06 +01:00
Tim Hunt 957e78388a MDL-65636 filter_multilang: add some basic unit tests
This commit includes suggestions from Jun Pataleta on how to improve the
unit tests.
2019-05-22 11:04:07 +01:00
Adrian Greeve 3377d26e2a Merge branch 'MDL-65067_36' of https://github.com/dmonllao/moodle into MOODLE_36_STABLE 2019-05-22 16:32:03 +08:00
Paul Holden d3f44d65d3 MDL-64784 core: update tablelib tests for explicit sort direction. 2019-05-22 14:50:52 +08:00
Paul Holden 3853eb7bb8 MDL-64784 core: consistent column sort direction in flexible_table. 2019-05-22 14:50:45 +08:00
Andrew Nicols a41c7cd69a Merge branch 'MDL-65630-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-05-22 09:41:34 +08:00
Daniel Neis Araujo ecc9ffd797 MDL-65654 tool_uploaduser: Fix undefined variable warning 2019-05-21 14:01:24 -03:00
David Monllaó 1928283c91 MDL-65549 tool_analytics: Reduce the context name length in models_view 2019-05-21 17:34:51 +02:00
David Monllaó 474e5c539d MDL-65634 analytics: Discard late and early student enrolments 2019-05-21 17:22:41 +02:00
Sara Arjona 7074cdc2c8 Merge branch 'MDL-65605-36' of git://github.com/rezaies/moodle into MOODLE_36_STABLE 2019-05-21 13:47:55 +02:00
Amaia Anabitarte 9772b2e138 MDL-65060 core_message: Group_message_message_content selector 2019-05-21 13:16:53 +02:00
Ryan Wyllie ad4aad6c29 MDL-65060 core_message: add render buffer to conversations
Change the conversation logic to render using a buffer so that we can
immediately save state. The render patches are based on the state so
the UI will always reach eventual consistency with the state since the
patches are processed in order.
2019-05-21 13:05:17 +02:00
Jun Pataleta aad80c974d Merge branch 'MDL-65274-36' of git://github.com/jleyva/moodle into MOODLE_36_STABLE 2019-05-21 18:49:17 +08:00
Jun Pataleta 20025aadf5 Merge branch 'MDL-60407-36' of git://github.com/vmdef/moodle into MOODLE_36_STABLE 2019-05-21 18:44:39 +08:00
Juan Leyva df6a6ed97e MDL-65274 mod_quiz: Do not return a translated string
We should be returning proper error codes and the translated string can be part of the debug information.
2019-05-21 10:41:04 +02:00
Simey Lameze ec67afb944 MDL-59650 core_calendar: remove limit from calendar UI 2019-05-21 15:23:20 +08:00
Simey Lameze bdd12dc368 MDL-59650 core_calendar: remove limit from event exporter 2019-05-21 15:23:20 +08:00
Adrian Greeve 3f1e909ae8 Merge branch 'MDL-65572-36' of git://github.com/damyon/moodle into MOODLE_36_STABLE 2019-05-21 15:21:44 +08:00
AMOS bot 060e6702e7 Automatically generated installer lang files 2019-05-21 00:12:55 +00:00
AMOS bot 14a8a5d649 Automatically generated installer lang files 2019-05-21 00:12:55 +00:00
Shamim Rezaie f7ced50b6b MDL-65630 mod_quiz: Allow redo within an attempt with random questions 2019-05-20 23:50:34 +10:00
Shamim Rezaie b90ac61667 MDL-65630 mod_quiz: Move logging in to the start of tests
The background is for set up, the scenario is for the test. Logging in
to start the test is the start of the test and the end of the background
itself.
2019-05-20 23:50:34 +10:00
Shamim Rezaie 9cc1dfda95 MDL-65605 core_question: Fix the issue when get_draft_files returns nul 2019-05-20 23:49:25 +10:00
Shamim Rezaie f29ba322b8 MDL-65605 mod_lesson: Fix the issue when get_draft_files returns null 2019-05-20 23:49:25 +10:00
Damyon Wiese 1ad4891169 MDL-65572 messaging: Loginas upgrade check
When using login as, we also need to check if there are legacy messages that
need updating and set the user preference if required.
2019-05-20 09:15:30 +08:00
Eloy Lafuente (stronk7) 89722fc4d9 weekly release 3.6.4+ 2019-05-19 11:17:45 +02:00
Eloy Lafuente (stronk7) 43a40d987c Merge branch 'install_36_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_36_STABLE 2019-05-19 11:17:42 +02:00
Eloy Lafuente (stronk7) e316048830 Merge branch 'MDL-65641_36' of git://github.com/stronk7/moodle into MOODLE_36_STABLE 2019-05-19 10:25:46 +02:00
Eloy Lafuente (stronk7) 3083a5a80d MDL-65641 forum: Make forum post form to honor existing MOODLE_FORMAT
Since the night of the times (MDL-16698) we have been performing
that simple empty($post->messageformat) check to decide if the
preferred editor format should be used, instead of any existing format.

Problem is that FORMAT_MOODLE == 0, so the condition evaluates
to to true and then the preferred editor takes the baton when it should
not. Exiting format must win always!

So this just makes the condition a little better, checking if the
attribute is set and that it's numerical (accepting both n and 'n').

That covers the FORMAT_MOODLE case and any other valid format. Only if the
conditions aren't met the preferred editor format takes the baton. Only
then.
2019-05-18 11:06:36 +02:00
AMOS bot 7a79046285 Automatically generated installer lang files 2019-05-18 00:12:38 +00:00
David Monllaó 7ad4cd3728 MDL-65067 tool_analytics: Limit update_end_date to format_weeks 2019-05-17 17:01:45 +02:00
Didier 'OdyX' Raboud 940608f34f MDL-65067 analytics: Strengthen format_weeks detection
The public function get_section_dates($section, $startdate = false) is
only defined in format_weeks, not in format_base.

As other formats can (and format_topcoll has) declare a different
get_section_dates public method, merely checking that it exists is not
sufficient to guarantee that it can be called with just a section object.

Check that the format either is, or is a subclass of format_weeks.
2019-05-17 16:59:28 +02:00
AMOS bot 60a9b9736d Automatically generated installer lang files 2019-05-17 00:14:30 +00:00
Eloy Lafuente (stronk7) 6e65843268 weekly release 3.6.4+ 2019-05-16 10:56:53 +02:00
Sara Arjona ede4c60b54 Merge branch 'MDL-65596-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-05-15 14:19:56 +02:00
Bas Brands ed674e43c2 MDL-65596 core_message: dropdown menu blocked by contact request message 2019-05-14 13:27:11 +02:00
Sara Arjona f47a36f707 weekly release 3.6.4+ 2019-05-14 13:21:45 +02:00
Víctor Déniz Falcón d8e0afc38a MDL-60407 report_insights: Fix redirect when action on last prediction
When an actions is taken on the last prediction, the predictions
list page is reloaded.
2019-05-14 09:17:20 +01:00
Sara Arjona d305985604 Merge branch 'MDL-65581-36' of git://github.com/bmbrands/moodle into MOODLE_36_STABLE 2019-05-13 21:19:27 +02:00
Bas Brands ca8cf5444e MDL-65581 core_blocks: change classname for hidden blocks
Changing the added class .invisible to .ivisibleblock to avoid hiding
the block completely
2019-05-13 12:29:48 +02:00
791 changed files with 14147 additions and 5146 deletions
+1 -1
View File
@@ -203,7 +203,7 @@
}
},
{
files: ["**/amd/src/*.js"],
files: ["**/amd/src/*.js", "Gruntfile.js"],
// Check AMD with some slightly stricter rules.
rules: {
'no-unused-vars': 'error',
+2
View File
@@ -0,0 +1,2 @@
**/amd/**
/*.js
+1
View File
@@ -0,0 +1 @@
v8.16.1
+7 -6
View File
@@ -11,6 +11,11 @@ notifications:
language: php
dist: xenial
services:
- mysql
php:
# We only run the highest and lowest supported versions to reduce the load on travis-ci.org.
- 7.2
@@ -18,10 +23,6 @@ php:
addons:
postgresql: "9.6"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# services:
@@ -76,10 +77,10 @@ install:
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo stop mysql
sudo service mysql stop
sudo mv /var/lib/mysql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
sudo start mysql
sudo service mysql restart
fi
- >
if [ "$DB" = 'pgsql' ];
+1
View File
@@ -24,6 +24,7 @@
* Grunt configuration
*/
/* eslint-env node */
module.exports = function(grunt) {
var path = require('path'),
tasks = {},
+97 -88
View File
@@ -514,100 +514,105 @@ if ($interactive) {
$database = $databases[$CFG->dbtype];
// ask for db host
if ($interactive) {
cli_separator();
cli_heading(get_string('databasehost', 'install'));
if ($options['dbhost'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbhost']);
// We cannot do any validation until all DB connection data is provided.
$hintdatabase = '';
do {
echo $hintdatabase;
// Ask for db host.
if ($interactive) {
cli_separator();
cli_heading(get_string('databasehost', 'install'));
if ($options['dbhost'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbhost']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbhost = cli_input($prompt, $options['dbhost']);
} else {
$prompt = get_string('clitypevalue', 'admin');
$CFG->dbhost = $options['dbhost'];
}
$CFG->dbhost = cli_input($prompt, $options['dbhost']);
} else {
$CFG->dbhost = $options['dbhost'];
}
// Ask for db name.
if ($interactive) {
cli_separator();
cli_heading(get_string('databasename', 'install'));
if ($options['dbname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbname = cli_input($prompt, $options['dbname']);
// ask for db name
if ($interactive) {
cli_separator();
cli_heading(get_string('databasename', 'install'));
if ($options['dbname'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbname']);
} else {
$prompt = get_string('clitypevalue', 'admin');
$CFG->dbname = $options['dbname'];
}
$CFG->dbname = cli_input($prompt, $options['dbname']);
} else {
$CFG->dbname = $options['dbname'];
}
// Ask for db prefix.
if ($interactive) {
cli_separator();
cli_heading(get_string('dbprefix', 'install'));
//TODO: solve somehow the prefix trouble for oci.
if ($options['prefix'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['prefix']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->prefix = cli_input($prompt, $options['prefix']);
// ask for db prefix
if ($interactive) {
cli_separator();
cli_heading(get_string('dbprefix', 'install'));
//TODO: solve somehow the prefix trouble for oci
if ($options['prefix'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['prefix']);
} else {
$prompt = get_string('clitypevalue', 'admin');
$CFG->prefix = $options['prefix'];
}
$CFG->prefix = cli_input($prompt, $options['prefix']);
} else {
$CFG->prefix = $options['prefix'];
}
// Ask for db port.
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseport', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbport']);
$CFG->dboptions['dbport'] = (int) cli_input($prompt, $options['dbport']);
// ask for db port
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseport', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbport']);
$CFG->dboptions['dbport'] = (int)cli_input($prompt, $options['dbport']);
} else {
$CFG->dboptions['dbport'] = (int)$options['dbport'];
}
if ($CFG->dboptions['dbport'] <= 0) {
$CFG->dboptions['dbport'] = '';
}
// ask for db socket
if ($CFG->ostype === 'WINDOWS') {
$CFG->dboptions['dbsocket'] = '';
} else if ($interactive and empty($CFG->dboptions['dbport'])) {
cli_separator();
cli_heading(get_string('databasesocket', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbsocket']);
$CFG->dboptions['dbsocket'] = cli_input($prompt, $options['dbsocket']);
} else {
$CFG->dboptions['dbsocket'] = $options['dbsocket'];
}
// ask for db user
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseuser', 'install'));
if ($options['dbuser'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
$CFG->dboptions['dbport'] = (int) $options['dbport'];
}
if ($CFG->dboptions['dbport'] <= 0) {
$CFG->dboptions['dbport'] = '';
}
$CFG->dbuser = cli_input($prompt, $options['dbuser']);
} else {
$CFG->dbuser = $options['dbuser'];
}
// Ask for db socket.
if ($CFG->ostype === 'WINDOWS') {
$CFG->dboptions['dbsocket'] = '';
} else if ($interactive and empty($CFG->dboptions['dbport'])) {
cli_separator();
cli_heading(get_string('databasesocket', 'install'));
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbsocket']);
$CFG->dboptions['dbsocket'] = cli_input($prompt, $options['dbsocket']);
} else {
$CFG->dboptions['dbsocket'] = $options['dbsocket'];
}
// Ask for db user.
if ($interactive) {
cli_separator();
cli_heading(get_string('databaseuser', 'install'));
if ($options['dbuser'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbuser']);
} else {
$prompt = get_string('clitypevalue', 'admin');
}
$CFG->dbuser = cli_input($prompt, $options['dbuser']);
} else {
$CFG->dbuser = $options['dbuser'];
}
// Ask for db password.
if ($interactive) {
cli_separator();
cli_heading(get_string('databasepass', 'install'));
// ask for db password
if ($interactive) {
cli_separator();
cli_heading(get_string('databasepass', 'install'));
do {
if ($options['dbpass'] !== '') {
$prompt = get_string('clitypevaluedefault', 'admin', $options['dbpass']);
} else {
@@ -615,19 +620,23 @@ if ($interactive) {
}
$CFG->dbpass = cli_input($prompt, $options['dbpass']);
if (function_exists('distro_pre_create_db')) { // Hook for distros needing to do something before DB creation
$distro = distro_pre_create_db($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']), $distro);
if (function_exists('distro_pre_create_db')) { // Hook for distros needing to do something before DB creation.
$distro = distro_pre_create_db($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix,
array('dbpersist' => 0, 'dbport' => $CFG->dboptions['dbport'], 'dbsocket' => $CFG->dboptions['dbsocket']),
$distro);
}
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']));
} while ($hint_database !== '');
$hintdatabase = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix,
array('dbpersist' => 0, 'dbport' => $CFG->dboptions['dbport'], 'dbsocket' => $CFG->dboptions['dbsocket']));
} else {
$CFG->dbpass = $options['dbpass'];
$hint_database = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix, array('dbpersist'=>0, 'dbport'=>$CFG->dboptions['dbport'], 'dbsocket'=>$CFG->dboptions['dbsocket']));
if ($hint_database !== '') {
cli_error(get_string('dbconnectionerror', 'install'));
} else {
$CFG->dbpass = $options['dbpass'];
$hintdatabase = install_db_validate($database, $CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix,
array('dbpersist' => 0, 'dbport' => $CFG->dboptions['dbport'], 'dbsocket' => $CFG->dboptions['dbsocket']));
if ($hintdatabase !== '') {
cli_error(get_string('dbconnectionerror', 'install'));
}
}
}
} while ($hintdatabase !== '');
// ask for fullname
if ($interactive) {
+183
View File
@@ -2451,6 +2451,7 @@
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
<RESTRICT function="restrict_php_version_74" message="unsupportedphpversion74" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2631,6 +2632,188 @@
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
<RESTRICT function="restrict_php_version_74" message="unsupportedphpversion74" />
</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>
<MOODLE version="3.8" requires="3.2">
<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="11.0" />
<VENDOR name="oracle" version="11.2" />
</DATABASE>
<PHP version="7.1.0" level="required">
</PHP>
<PCREUNICODE level="optional">
+1 -1
View File
@@ -46,7 +46,7 @@ $error = optional_param('error', '', PARAM_ALPHANUM);
admin_externalpage_setup('registrationmoodleorg');
if ($url !== HUB_MOODLEORGHUBURL) {
// Allow other plugins to confirm registration on hubs other than moodle.net . Plugins implementing this
// Allow other plugins to confirm registration on custom hubs. Plugins implementing this
// callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration .
$callbacks = get_plugins_with_function('hub_registration');
foreach ($callbacks as $plugintype => $plugins) {
+1 -2
View File
@@ -32,5 +32,4 @@
defined('MOODLE_INTERNAL') || die();
debugging('Support for alternative hubs has been removed from Moodle in 3.4. For communication with moodle.net ' .
'see lib/classes/hub/ .', DEBUG_DEVELOPER);
debugging('Support for alternative hubs has been removed from Moodle in 3.4.', DEBUG_DEVELOPER);
+6 -6
View File
@@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL
* @copyright (C) 1999 onwards Martin Dougiamas http://dougiamas.com
*
* This page displays the site registration form for Moodle.net.
* This page displays the site registration form.
* It handles redirection to the hub to continue the registration workflow process.
* It also handles update operation by web service.
*/
@@ -48,7 +48,7 @@ if ($unregistration && \core\hub\registration::is_registered()) {
}
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('unregisterfrom', 'hub', 'Moodle.net'), 3, 'main');
echo $OUTPUT->heading(get_string('registerwithmoodleorgremove', 'core_hub'), 3, 'main');
$siteunregistrationform->display();
echo $OUTPUT->footer();
exit;
@@ -82,7 +82,7 @@ if ($fromform = $siteregistrationform->get_data()) {
echo $OUTPUT->header();
// Current status of registration on Moodle.net.
// Current status of registration.
$notificationtype = \core\output\notification::NOTIFY_ERROR;
if (\core\hub\registration::is_registered()) {
@@ -104,11 +104,11 @@ if (\core\hub\registration::is_registered()) {
// Heading.
if (\core\hub\registration::is_registered()) {
echo $OUTPUT->heading(get_string('updatesite', 'hub', 'Moodle.net'));
echo $OUTPUT->heading(get_string('registerwithmoodleorgupdate', 'core_hub'));
} else if ($isinitialregistration) {
echo $OUTPUT->heading(get_string('completeregistration', 'hub'));
echo $OUTPUT->heading(get_string('registerwithmoodleorgcomplete', 'core_hub'));
} else {
echo $OUTPUT->heading(get_string('registerwithmoodleorg', 'admin'));
echo $OUTPUT->heading(get_string('registerwithmoodleorg', 'core_hub'));
}
$renderer = $PAGE->get_renderer('core', 'admin');
+2 -2
View File
@@ -40,7 +40,7 @@ $token = optional_param('token', '', PARAM_TEXT);
admin_externalpage_setup('registrationmoodleorg');
if ($url !== HUB_MOODLEORGHUBURL) {
// Allow other plugins to renew registration on hubs other than moodle.net . Plugins implementing this
// Allow other plugins to renew registration on custom hubs. Plugins implementing this
// callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration .
$callbacks = get_plugins_with_function('hub_registration');
foreach ($callbacks as $plugintype => $plugins) {
@@ -56,7 +56,7 @@ if ($url !== HUB_MOODLEORGHUBURL) {
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('renewregistration', 'hub'), 3, 'main');
$hublink = html_writer::tag('a', 'Moodle.net', array('href' => HUB_MOODLEORGHUBURL));
$hublink = html_writer::tag('a', HUB_MOODLEORGHUBURL, array('href' => HUB_MOODLEORGHUBURL));
$deletedregmsg = get_string('previousregistrationdeleted', 'hub', $hublink);
+27 -4
View File
@@ -1449,9 +1449,11 @@ class core_admin_renderer extends plugin_renderer_base {
$class = 'requires-failed';
$label = html_writer::span(get_string('dependencyfails', 'core_plugin'), 'label label-important');
}
$requires[] = html_writer::tag('li',
html_writer::span(get_string('moodleversion', 'core_plugin', $plugin->versionrequires), 'dep dep-core').
' '.$label, array('class' => $class));
if ($reqinfo->reqver != ANY_VERSION) {
$requires[] = html_writer::tag('li',
html_writer::span(get_string('moodleversion', 'core_plugin', $plugin->versionrequires), 'dep dep-core').
' '.$label, array('class' => $class));
}
} else {
$actions = array();
@@ -2090,6 +2092,27 @@ class core_admin_renderer extends plugin_renderer_base {
* @return string
*/
public function moodleorg_registration_message() {
return format_text(get_string('registermoodlenet', 'admin'), FORMAT_HTML, ['noclean' => true]);
$out = format_text(get_string('registerwithmoodleorginfo', 'core_hub'), FORMAT_MARKDOWN);
$out .= html_writer::link(
new moodle_url('/admin/settings.php', ['section' => 'moodleservices']),
$this->output->pix_icon('i/info', '').' '.get_string('registerwithmoodleorginfoapp', 'core_hub'),
['class' => 'btn btn-link', 'role' => 'opener', 'target' => '_href']
);
$out .= html_writer::link(
HUB_MOODLEORGHUBURL,
$this->output->pix_icon('i/stats', '').' '.get_string('registerwithmoodleorginfostats', 'core_hub'),
['class' => 'btn btn-link', 'role' => 'opener', 'target' => '_href']
);
$out .= html_writer::link(
HUB_MOODLEORGHUBURL.'/sites',
$this->output->pix_icon('i/location', '').' '.get_string('registerwithmoodleorginfosites', 'core_hub'),
['class' => 'btn btn-link', 'role' => 'opener', 'target' => '_href']
);
return $this->output->box($out);
}
}
@@ -623,7 +623,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
echo "</label>\n";
}
if ($helpicon) {
echo '<span class="pull-xs-right text-nowrap">'.$helpicon.'</span>';
echo '<span class="float-sm-right text-nowrap">'.$helpicon.'</span>';
}
echo '</div>';
if (isset($this->errors[$name])) {
+2 -2
View File
@@ -96,7 +96,7 @@ class core_role_permissions_table extends core_role_capability_table_base {
"linkclass" => "preventlink", "adminurl" => $adminurl->out(), "icon" => "", "iconalt" => "");
if (isset($overridableroles[$id]) and ($allowoverrides or ($allowsafeoverrides and is_safe_capability($capability)))) {
$templatecontext['icon'] = 't/delete';
$templatecontext['iconalt'] = get_string('delete');
$templatecontext['iconalt'] = get_string('deletexrole', 'core_role', $name);
}
$neededroles[$id] = $renderer->render_from_template('core/permissionmanager_role', $templatecontext);
}
@@ -109,7 +109,7 @@ class core_role_permissions_table extends core_role_capability_table_base {
"icon" => "", "iconalt" => "");
if (isset($overridableroles[$id]) and prohibit_is_removable($id, $context, $capability->name)) {
$templatecontext['icon'] = 't/delete';
$templatecontext['iconalt'] = get_string('delete');
$templatecontext['iconalt'] = get_string('deletexrole', 'core_role', $name);
}
$forbiddenroles[$id] = $renderer->render_from_template('core/permissionmanager_role', $templatecontext);
}
+1 -1
View File
@@ -213,7 +213,7 @@ $arguments = array('contextid' => $contextid,
$PAGE->requires->strings_for_js(
array('roleprohibitinfo', 'roleprohibitheader', 'roleallowinfo', 'roleallowheader',
'confirmunassigntitle', 'confirmroleunprohibit', 'confirmroleprevent', 'confirmunassignyes',
'confirmunassignno'), 'core_role');
'confirmunassignno', 'deletexrole'), 'core_role');
$PAGE->requires->js_call_amd('core/permissionmanager', 'initialize', array($arguments));
$table = new core_role_permissions_table($context, $contextname, $allowoverrides, $allowsafeoverrides, $overridableroles);
echo $OUTPUT->box_start('generalbox capbox');
+5 -29
View File
@@ -48,7 +48,6 @@ class behat_admin extends behat_base {
* @param TableNode $table
*/
public function i_set_the_following_administration_settings_values(TableNode $table) {
if (!$data = $table->getRowsHash()) {
return;
}
@@ -57,17 +56,12 @@ class behat_admin extends behat_base {
// We expect admin block to be visible, otherwise go to homepage.
if (!$this->getSession()->getPage()->find('css', '.block_settings')) {
$this->getSession()->visit($this->locate_path('/'));
$this->wait(self::get_timeout() * 1000, self::PAGE_READY_JS);
$this->execute('behat_forms::i_am_on_homepage');
}
// Search by label.
$searchbox = $this->find_field(get_string('searchinsettings', 'admin'));
$searchbox->setValue($label);
$submitsearch = $this->find('css', 'form.adminsearchform input[type=submit]');
$submitsearch->press();
$this->wait(self::get_timeout() * 1000, self::PAGE_READY_JS);
$this->execute('behat_forms::i_set_the_field_to', [get_string('searchinsettings', 'admin'), $label]);
$this->execute("behat_general::i_click_on_in_the", [get_string('search', 'admin'), 'button', '.block_settings', 'css_element']);
// Admin settings does not use the same DOM structure than other moodle forms
// but we also need to use lib/behat/form_field/* to deal with the different moodle form elements.
@@ -83,35 +77,17 @@ class behat_admin extends behat_base {
"@id=//span[contains(normalize-space(.), $label)]/preceding-sibling::label[1]/@for]";
$fieldnode = $this->find('xpath', $fieldxpath, $exception);
$formfieldtypenode = $this->find('xpath', $fieldxpath . "/ancestor::div[@class='form-setting']" .
"/child::div[contains(concat(' ', @class, ' '), ' form-')]/child::*/parent::div");
} catch (ElementNotFoundException $e) {
// Multi element settings, interacting only the first one.
$fieldxpath = "//*[label[normalize-space(.)= $label]|span[normalize-space(.)= $label]]/" .
"ancestor::div[contains(concat(' ', normalize-space(@class), ' '), ' form-item ')]" .
"/descendant::div[@class='form-group']/descendant::*[self::input | self::textarea | self::select]" .
"[not(./@type = 'submit' or ./@type = 'image' or ./@type = 'hidden')]";
$fieldnode = $this->find('xpath', $fieldxpath);
// It is the same one that contains the type.
$formfieldtypenode = $fieldnode;
}
// Getting the class which contains the field type.
$classes = explode(' ', $formfieldtypenode->getAttribute('class'));
foreach ($classes as $class) {
if (substr($class, 0, 5) == 'form-') {
$type = substr($class, 5);
}
}
// Instantiating the appropiate field type.
$field = behat_field_manager::get_field_instance($type, $fieldnode, $this->getSession());
$field->set_value($value);
$this->find_button(get_string('savechanges'))->press();
$this->execute('behat_forms::i_set_the_field_with_xpath_to', [$fieldxpath, $value]);
$this->execute("behat_general::i_click_on", [get_string('savechanges'), 'button']);
}
}
+1
View File
@@ -9,6 +9,7 @@ Feature: Manage tokens
| username | password | firstname | lastname |
| testuser | testuser | Joe | Bloggs |
| testuser2 | testuser2 | TestFirstname | TestLastname |
And I change window size to "small"
And I log in as "admin"
And I am on site homepage
@@ -141,7 +141,7 @@ class models_list implements \renderable, \templatable {
if ($contextid == SYSCONTEXTID) {
$contextname = get_string('allpredictions', 'tool_analytics');
} else {
$contextname = shorten_text($context->get_context_name(true, true), 90);
$contextname = shorten_text($context->get_context_name(false, true), 40);
}
$predictioncontexts[$contextid] = $contextname;
}
@@ -173,7 +173,8 @@ function tool_analytics_calculate_course_dates($course, $options) {
$formatoptions = $format->get_format_options();
// Change this for a course formats API level call in MDL-60702.
if (method_exists($format, 'update_end_date') && $formatoptions['automaticenddate']) {
if ((get_class($format) == 'format_weeks' || is_subclass_of($format, 'format_weeks')) &&
method_exists($format, 'update_end_date') && $formatoptions['automaticenddate']) {
// Special treatment for weeks-based formats with automatic end date.
if ($options['update']) {
+1 -1
View File
@@ -30,7 +30,7 @@ $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, 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['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="https://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';
@@ -20,12 +20,12 @@ Feature: Edit capabilities
And I set the following system permissions of "Teacher" role:
| capability | permission |
| block/mnet_hosts:myaddinstance | Allow |
| moodle/community:add | Inherit |
| moodle/site:messageanyuser | Inherit |
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
When I follow "Edit Teacher role"
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission
And "moodle/community:add" capability has "Not set" permission
And "moodle/site:messageanyuser" capability has "Not set" permission
And "moodle/grade:managesharedforms" capability has "Prevent" permission
And "moodle/course:request" capability has "Prohibit" permission
@@ -0,0 +1,27 @@
@tool_behat
Feature: Behat steps for interacting with form work
In order to test my Moodle code
As a developer
I need the Behat steps for form elements to work reliably
@javascript
Scenario: Test fields in containers
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
When I log in as "admin"
And I am on "Course 1" course homepage
# Just get to any form.
And I navigate to "Edit settings" in current page administration
And I set the field "Course full name" in the "General" "fieldset" to "Frog"
And I set the following fields in the "Appearance" "fieldset" to these values:
| Show activity reports | Yes |
| Number of announcements | 1 |
Then the field "Show activity reports" in the "Appearance" "fieldset" matches value "Yes"
And the field "Show activity reports" in the "Appearance" "fieldset" does not match value "No"
And the following fields in the "region-main" "region" match these values:
| Course full name | Frog |
| Number of announcements | 1 |
And the following fields in the "region-main" "region" do not match these values:
| Course full name | Course 1 |
| Number of announcements | 5 |
+11 -9
View File
@@ -114,15 +114,17 @@ class tool_capability_renderer extends plugin_renderer_base {
}
// Start the list item, and print the context name as a link to the place to make changes.
if ($contextid == context_system::instance()->id) {
$url = new moodle_url('/admin/roles/manage.php');
$title = get_string('changeroles', 'tool_capability');
} else {
$url = new moodle_url('/admin/roles/override.php', array('contextid' => $contextid));
$title = get_string('changeoverrides', 'tool_capability');
}
$context = context::instance_by_id($contextid);
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), array('title' => $title)), 3);
if ($context instanceof context_system) {
$url = new moodle_url('/admin/roles/manage.php');
} else {
$url = new moodle_url('/admin/roles/permissions.php', ['contextid' => $contextid]);
}
$title = get_string('permissionsincontext', 'core_role', $context->get_context_name());
$html = $this->output->heading(html_writer::link($url, $context->get_context_name(), ['title' => $title]), 3);
$html .= html_writer::table($table);
// If there are any child contexts, print them recursively.
if (!empty($contexts[$contextid]->children)) {
@@ -133,4 +135,4 @@ class tool_capability_renderer extends plugin_renderer_base {
return $html;
}
}
}
+42
View File
@@ -222,6 +222,48 @@ class api {
}
}
// Clean the legacy role assignments which are stale.
$paramsclean['usercontext'] = CONTEXT_USER;
$paramsclean['component'] = 'tool_cohortroles';
$sql = 'SELECT DISTINCT(ra.id), ra.roleid, ra.userid, ra.contextid, ctx.instanceid
FROM {role_assignments} ra
JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :usercontext
JOIN {cohort_members} cm ON cm.userid = ctx.instanceid
LEFT JOIN {tool_cohortroles} tc ON tc.cohortid = cm.cohortid
AND tc.userid = ra.userid
AND tc.roleid = ra.roleid
WHERE ra.component = :component
AND tc.id is null';
if ($candidatelegacyassignments = $DB->get_records_sql($sql, $paramsclean)) {
$sql = 'SELECT DISTINCT(ra.id)
FROM {role_assignments} ra
JOIN {context} ctx ON ctx.id = ra.contextid AND ctx.contextlevel = :usercontext
JOIN {cohort_members} cm ON cm.userid = ctx.instanceid
JOIN {tool_cohortroles} tc ON tc.cohortid = cm.cohortid AND tc.userid = ra.userid
WHERE ra.component = :component';
if ($currentvalidroleassignments = $DB->get_records_sql($sql, $paramsclean)) {
foreach ($candidatelegacyassignments as $candidate) {
if (!array_key_exists($candidate->id, $currentvalidroleassignments)) {
role_unassign($candidate->roleid, $candidate->userid, $candidate->contextid, 'tool_cohortroles');
$rolesremoved[] = array(
'useridassignedto' => $candidate->userid,
'useridassignedover' => $candidate->instanceid,
'roleid' => $candidate->roleid
);
}
}
} else {
foreach ($candidatelegacyassignments as $candidate) {
role_unassign($candidate->roleid, $candidate->userid, $candidate->contextid, 'tool_cohortroles');
$rolesremoved[] = array(
'useridassignedto' => $candidate->userid,
'useridassignedover' => $candidate->instanceid,
'roleid' => $candidate->roleid
);
}
}
}
return array('rolesadded' => $rolesadded, 'rolesremoved' => $rolesremoved);
}
@@ -103,5 +103,4 @@ class cohort_role_assignment extends persistent {
return true;
}
}
+82 -7
View File
@@ -50,8 +50,6 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
* Setup function- we will create a course and add an assign instance to it.
*/
protected function setUp() {
global $DB;
$this->resetAfterTest(true);
// Create some users.
@@ -133,14 +131,91 @@ class tool_cohortroles_api_testcase extends advanced_testcase {
public function test_delete_cohort_role_assignment() {
$this->setAdminUser();
$params = (object) array(
// Create a cohort role assigment.
$params = (object) [
'userid' => $this->userassignto->id,
'roleid' => $this->roleid,
'cohortid' => $this->cohort->id
);
$result = api::create_cohort_role_assignment($params);
$worked = api::delete_cohort_role_assignment($result->get('id'));
$this->assertTrue($worked);
];
$cohortroleassignment = api::create_cohort_role_assignment($params);
$sync = api::sync_all_cohort_roles();
$rolesadded = [
[
'useridassignedto' => $this->userassignto->id,
'useridassignedover' => $this->userassignover->id,
'roleid' => $this->roleid
]
];
$expected = [
'rolesadded' => $rolesadded,
'rolesremoved' => []
];
$this->assertEquals($sync, $expected);
// Delete the cohort role assigment and confirm the roles are removed.
$result = api::delete_cohort_role_assignment($cohortroleassignment->get('id'));
$this->assertTrue($result);
$sync = api::sync_all_cohort_roles();
$expected = [
'rolesadded' => [],
'rolesremoved' => $rolesadded
];
$this->assertEquals($expected, $sync);
}
/**
* Test case verifying that syncing won't remove role assignments if they are valid for another cohort role assignment.
*/
public function test_delete_cohort_role_assignment_cohorts_having_same_members() {
$this->setAdminUser();
// Create 2 cohorts, with a 1 user (user1) present in both,
// and user2 and user3 members of 1 cohort each.
$cohort1 = $this->getDataGenerator()->create_cohort();
$cohort2 = $this->getDataGenerator()->create_cohort();
$user1 = $this->getDataGenerator()->create_user();
$user2 = $this->getDataGenerator()->create_user();
$user3 = $this->getDataGenerator()->create_user();
cohort_add_member($cohort1->id, $user1->id);
cohort_add_member($cohort1->id, $user2->id);
cohort_add_member($cohort2->id, $user1->id);
cohort_add_member($cohort2->id, $user3->id);
// And a role and a user to assign that role to.
$user4 = $this->getDataGenerator()->create_user(); // A cohort manager, for example.
$roleid = create_role('Role 1', 'myrole', 'test');
// Assign the role for user4 in both cohorts.
$params = (object) [
'userid' => $user4->id,
'roleid' => $roleid,
'cohortid' => $cohort1->id
];
$cohort1roleassignment = api::create_cohort_role_assignment($params);
$params->cohortid = $cohort2->id;
$cohort2roleassignment = api::create_cohort_role_assignment($params);
$sync = api::sync_all_cohort_roles();
// There is no guarantee about the order of roles assigned.
// so confirm we have 3 role assignments, and they are for the users 1, 2 and 3.
$this->assertCount(3, $sync['rolesadded']);
$addedusers = array_column($sync['rolesadded'], 'useridassignedover');
$this->assertContains($user1->id, $addedusers);
$this->assertContains($user2->id, $addedusers);
$this->assertContains($user3->id, $addedusers);
// Remove the role assignment for user4/cohort1.
// Verify only 1 role is unassigned as the others are still valid for the other cohort role assignment.
$result = api::delete_cohort_role_assignment($cohort1roleassignment->get('id'));
$this->assertTrue($result);
$sync = api::sync_all_cohort_roles();
$this->assertCount(0, $sync['rolesadded']);
$this->assertCount(1, $sync['rolesremoved']);
$removedusers = array_column($sync['rolesremoved'], 'useridassignedover');
$this->assertContains($user2->id, $removedusers);
}
public function test_list_cohort_role_assignments() {
@@ -440,6 +440,9 @@ class purpose extends persistent {
}
if (!empty($data->sensitivedatareasons) && is_array($data->sensitivedatareasons)) {
$data->sensitivedatareasons = implode(',', $data->sensitivedatareasons);
} else {
// Nothing selected. Set default value of null.
$data->sensitivedatareasons = null;
}
// A single value.
@@ -127,13 +127,17 @@ class process_data_request_task extends adhoc_task {
$thing = $fs->create_file_from_pathname($filerecord, $exportedcontent);
$completestatus = api::DATAREQUEST_STATUS_DOWNLOAD_READY;
} else if ($request->type == api::DATAREQUEST_TYPE_DELETE) {
// Delete the data.
$manager = new \core_privacy\manager();
$manager->set_observer(new \tool_dataprivacy\manager_observer());
// Delete the data for users other than the primary admin, which is rejected.
if (is_primary_admin($foruser->id)) {
$completestatus = api::DATAREQUEST_STATUS_REJECTED;
} else {
$manager = new \core_privacy\manager();
$manager->set_observer(new \tool_dataprivacy\manager_observer());
$manager->delete_data_for_user($approvedclcollection);
$completestatus = api::DATAREQUEST_STATUS_DELETED;
$deleteuser = !$foruser->deleted;
$manager->delete_data_for_user($approvedclcollection);
$completestatus = api::DATAREQUEST_STATUS_DELETED;
$deleteuser = !$foruser->deleted;
}
}
// When the preparation of the metadata finishes, update the request status to awaiting approval.
@@ -134,6 +134,10 @@ class tool_dataprivacy_data_request_form extends moodleform {
$errors['type'] = get_string('errorrequestalreadyexists', 'tool_dataprivacy');
}
if ($data['type'] == api::DATAREQUEST_TYPE_DELETE && is_primary_admin($data['userid'])) {
$errors['type'] = get_string('errorcannotdeleteadmin', 'tool_dataprivacy');
}
return $errors;
}
}
@@ -124,6 +124,7 @@ $string['editpurposes'] = 'Edit purposes';
$string['effectiveretentionperiodcourse'] = '{$a} (after the course end date)';
$string['effectiveretentionperioduser'] = '{$a} (since the last time the user accessed the site)';
$string['emailsalutation'] = 'Dear {$a},';
$string['errorcannotdeleteadmin'] = 'Cannot create deletion request for the primary site admin';
$string['errorinvalidrequestcreationmethod'] = 'Invalid request creation method!';
$string['errorinvalidrequeststatus'] = 'Invalid request status!';
$string['errorinvalidrequesttype'] = 'Invalid request type!';
+1 -1
View File
@@ -78,7 +78,7 @@ function tool_dataprivacy_myprofile_navigation(tree $tree, $user, $iscurrentuser
// Check if the user has an ongoing data deletion request.
$hasdeleterequest = \tool_dataprivacy\api::has_ongoing_request($user->id, \tool_dataprivacy\api::DATAREQUEST_TYPE_DELETE);
// Show data deletion link only if the user doesn't have an ongoing data deletion request.
if (!$hasdeleterequest) {
if (!$hasdeleterequest && !is_primary_admin($user->id)) {
$deleteparams = ['type' => \tool_dataprivacy\api::DATAREQUEST_TYPE_DELETE];
$deleteurl = new moodle_url('/admin/tool/dataprivacy/createdatarequest.php', $deleteparams);
$deletenode = new core_user\output\myprofile\node('privacyandpolicies', 'requestdatadeletion',
+23
View File
@@ -303,6 +303,29 @@ class tool_dataprivacy_api_testcase extends advanced_testcase {
$requestid = $datarequest->get('id');
}
/**
* Test that deletion requests for the primary admin are rejected
*/
public function test_reject_data_deletion_request_primary_admin() {
$this->resetAfterTest();
$this->setAdminUser();
$datarequest = api::create_data_request(get_admin()->id, api::DATAREQUEST_TYPE_DELETE);
// Approve the request and execute the ad-hoc process task.
ob_start();
api::approve_data_request($datarequest->get('id'));
$this->runAdhocTasks('\tool_dataprivacy\task\process_data_request_task');
ob_end_clean();
$request = api::get_request($datarequest->get('id'));
$this->assertEquals(api::DATAREQUEST_STATUS_REJECTED, $request->get('status'));
// Confirm they weren't deleted.
$user = core_user::get_user($request->get('userid'));
core_user::require_active_user($user);
}
/**
* Test for api::can_contact_dpo()
*/
@@ -88,6 +88,12 @@ Feature: Data delete from the privacy API
And I navigate to "Users > Privacy and policies > Data requests" in site administration
And I should see "Deleted"
@javascript
Scenario: As a primary admin, the link to create a data deletion request should not be shown.
Given I log in as "admin"
When I follow "Profile" in the user menu
Then I should not see "Delete my account"
@javascript
Scenario: As a parent, request account and data deletion for my child
Given I log in as "parent"
+1 -1
View File
@@ -24,7 +24,7 @@
$string['actlogshdr'] = 'Available log stores';
$string['configlogplugins'] = 'Please enable all required plugins and arrange them in appropriate order.';
$string['exportlog'] = 'Include logs when exporting.';
$string['exportlog'] = 'Include logs when exporting';
$string['exportlogdetail'] = 'Include logs that relate to the user when exporting.';
$string['logging'] = 'Logging';
$string['managelogging'] = 'Manage log stores';
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates"],function(a,b,c,d,e,f){var g=function(b){a(b).on("click",this.configureSettings.bind(this))};return g.prototype._dialogue=null,g.prototype.configureSettings=function(e){var g=a(e.target).closest("a").data("courseid"),h=a(e.target).closest("a").data("pushratingstouserplans"),i={courseid:g,settings:{pushratingstouserplans:h}};e.preventDefault(),f.render("tool_lp/course_competency_settings",i).done(function(a){d.get_string("configurecoursecompetencysettings","tool_lp").done(function(b){this._dialogue=new c(b,a,this.addListeners.bind(this))}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},g.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},g.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},g.prototype.saveSettings=function(a){a.preventDefault();var c=this._find('input[name="pushratingstouserplans"]:checked').val(),d=this._find('input[name="courseid"]').val(),f={pushratingstouserplans:c};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:d,settings:f}}])[0].done(function(){this.refreshCourseCompetenciesPage()}.bind(this)).fail(b.exception)},g.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val();e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].done(function(c){f.render("tool_lp/course_competencies_page",c).done(function(b,c){a('[data-region="coursecompetenciespage"]').replaceWith(b),f.runTemplateJS(c),this._dialogue.close()}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)},g});
define(["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates","core/pending"],function(a,b,c,d,e,f,g){var h=function(b){a(b).on("click",this.configureSettings.bind(this))};return h.prototype._dialogue=null,h.prototype.configureSettings=function(e){var h=new g,i=a(e.target).closest("a").data("courseid"),j=a(e.target).closest("a").data("pushratingstouserplans"),k={courseid:i,settings:{pushratingstouserplans:j}};e.preventDefault(),a.when(d.get_string("configurecoursecompetencysettings","tool_lp"),f.render("tool_lp/course_competency_settings",k)).then(function(a,b){return this._dialogue=new c(a,b[0],this.addListeners.bind(this)),this._dialogue}.bind(this)).then(h.resolve)["catch"](b.exception)},h.prototype.addListeners=function(){var a=this._find('[data-action="save"]');a.on("click",this.saveSettings.bind(this));var b=this._find('[data-action="cancel"]');b.on("click",this.cancelChanges.bind(this))},h.prototype.cancelChanges=function(a){a.preventDefault(),this._dialogue.close()},h.prototype._find=function(b){return a('[data-region="coursecompetencysettings"]').find(b)},h.prototype.saveSettings=function(a){var c=new g;a.preventDefault();var d=this._find('input[name="pushratingstouserplans"]:checked').val(),f=this._find('input[name="courseid"]').val(),h={pushratingstouserplans:d};e.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:f,settings:h}}])[0].then(function(){return this.refreshCourseCompetenciesPage()}.bind(this)).then(c.resolve)["catch"](b.exception)},h.prototype.refreshCourseCompetenciesPage=function(){var c=this._find('input[name="courseid"]').val(),d=new g;e.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c}}])[0].then(function(a){return f.render("tool_lp/course_competencies_page",a)}).then(function(b,c){f.replaceNode(a('[data-region="coursecompetenciespage"]'),b,c),this._dialogue.close()}.bind(this)).then(d.resolve)["catch"](b.exception)},h});
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return this._render().then(function(a){return f.get_string("rate","tool_lp").then(function(b){this._popup=new d(b,a,this._afterRender.bind(this))}.bind(this))}.bind(this)).fail(b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
define(["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]),this._ratingOptions=a};return g.prototype=Object.create(e.prototype),g.prototype._popup=null,g.prototype._ratingOptions=null,g.prototype._afterRender=function(){var b=this._find('[data-action="rate"]'),c=this._find('[name="rating"]'),d=this._find('[name="comment"]');this._find('[data-action="cancel"]').click(function(a){a.preventDefault(),this._trigger("cancelled"),this.close()}.bind(this)),c.change(function(){var c=a(this);c.val()?b.prop("disabled",!1):b.prop("disabled",!0)}).change(),b.click(function(a){a.preventDefault();var b=c.val();b&&(this._trigger("rated",{rating:b,note:d.val()}),this.close())}.bind(this))},g.prototype.close=function(){this._popup.close(),this._popup=null},g.prototype.display=function(){return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){return this._popup=new d(a,b[0],this._afterRender.bind(this)),this._popup}.bind(this))["catch"](b.exception)},g.prototype._find=function(b){return a(this._popup.getContent()).find(b)},g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)},g});
@@ -1 +1 @@
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.done(function(f){a.push({value:"",name:d._chooseStr});for(var g=0;g<f.length;g++){var h=f[g];a.push({value:h.id,name:h.name})}d._dialogue=new e(a),d._dialogue.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])})}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
define(["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length)throw new Error("Could not find the trigger");this._scaleId=c,this._competencyId=d,this._userId=e,this._planId=g,this._courseId=h,this._chooseStr=i,this._setUp(),j.click(function(a){a.preventDefault(),this._dialogue.display()}.bind(this)),this._planId?(this._methodName="core_competency_grade_competency_in_plan",this._args={competencyid:this._competencyId,planid:this._planId}):this._courseId?(this._methodName="core_competency_grade_competency_in_course",this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}):(this._methodName="core_competency_grade_competency",this._args={userid:this._userId,competencyid:this._competencyId})};return h.prototype=Object.create(f.prototype),h.prototype._setUp=function(){var a=[],d=this,f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0;c<b.length;c++){var e=b[c];a.push({value:e.id,name:e.name})}return a}).then(function(a){return new e(a)}).then(function(a){return a.on("rated",function(a,e){var f=d._args;f.grade=e.rating,f.note=e.note,c.call([{methodname:d._methodName,args:f,done:function(a){d._trigger("competencyupdated",{args:f,evidence:a})},fail:b.exception}])}),a}).then(function(a){d._dialogue=a}).fail(b.exception)},h.prototype._scaleId=null,h.prototype._competencyId=null,h.prototype._userId=null,h.prototype._planId=null,h.prototype._courseId=null,h.prototype._chooseStr=null,h.prototype._dialogue=null,h});
+28 -15
View File
@@ -27,8 +27,9 @@ define(['jquery',
'core/templates',
'core/str',
'tool_lp/competencypicker',
'tool_lp/dragdrop-reorder'],
function($, notification, ajax, templates, str, Picker, dragdrop) {
'tool_lp/dragdrop-reorder',
'core/pending'],
function($, notification, ajax, templates, str, Picker, dragdrop, Pending) {
/**
* Constructor
@@ -117,6 +118,7 @@ define(['jquery',
* Pick a competency
*
* @method pickCompetency
* @return {Promise}
*/
competencies.prototype.pickCompetency = function() {
var self = this;
@@ -132,6 +134,7 @@ define(['jquery',
self.pickerInstance = new Picker(self.pageContextId, false, pageContextIncludes);
self.pickerInstance.on('save', function(e, data) {
var compIds = data.competencyIds;
var pendingPromise = new Pending();
if (self.itemtype === "course") {
requests = [];
@@ -181,17 +184,20 @@ define(['jquery',
pagerender = 'tool_lp/plan_page';
pageregion = 'plan-page';
}
ajax.call(requests)[requests.length - 1].then(function(context) {
ajax.call(requests)[requests.length - 1]
.then(function(context) {
return templates.render(pagerender, context);
}).then(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
self.pickerInstance.display();
return self.pickerInstance.display();
};
/**
@@ -302,6 +308,7 @@ define(['jquery',
if (localthis.itemtype == 'course') {
// Course completion rule handling.
$('[data-region="coursecompetenciespage"]').on('change', 'select[data-field="ruleoutcome"]', function(e) {
var pendingPromise = new Pending();
var requests = [];
var pagerender = 'tool_lp/course_competencies_page';
var pageregion = 'coursecompetenciespage';
@@ -314,18 +321,24 @@ define(['jquery',
args: {courseid: localthis.itemid}}
]);
requests[1].done(function(context) {
templates.render(pagerender, context).done(function(html, js) {
$('[data-region="' + pageregion + '"]').replaceWith(html);
templates.runTemplateJS(js);
}).fail(notification.exception);
}).fail(notification.exception);
requests[1].then(function(context) {
return templates.render(pagerender, context);
})
.then(function(html, js) {
return templates.replaceNode($('[data-region="' + pageregion + '"]'), html, js);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
$('[data-region="actions"] button').click(function(e) {
var pendingPromise = new Pending();
e.preventDefault();
localthis.pickCompetency();
localthis.pickCompetency()
.then(pendingPromise.resolve)
.catch();
});
$('[data-action="delete-competency-link"]').click(function(e) {
e.preventDefault();
+10 -3
View File
@@ -33,8 +33,12 @@ define(['jquery',
'tool_lp/menubar',
'tool_lp/competencypicker',
'tool_lp/competency_outcomes',
'tool_lp/competencyruleconfig'],
function($, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig) {
'tool_lp/competencyruleconfig',
'core/pending',
],
function(
$, url, templates, notification, str, ajax, dragdrop, Ariatree, Dialogue, menubar, Picker, Outcomes, RuleConfig, Pending
) {
// Private variables and functions.
/** @var {Object} treeModel - This is an object representing the nodes in the tree. */
@@ -412,6 +416,7 @@ define(['jquery',
if (!pickerInstance) {
pickerInstance = new Picker(pageContextId, relatedTarget.competencyframeworkid);
pickerInstance.on('save', function(e, data) {
var pendingPromise = new Pending();
var compIds = data.competencyIds;
var calls = [];
@@ -436,7 +441,9 @@ define(['jquery',
templates.runTemplateJS(js);
updatedRelatedCompetencies();
return;
}).catch(notification.exception);
})
.then(pendingPromise.resolve)
.catch(notification.exception);
});
}
+8 -2
View File
@@ -31,8 +31,10 @@ define(['jquery',
'core/templates',
'tool_lp/dialogue',
'core/str',
'tool_lp/tree'],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree) {
'tool_lp/tree',
'core/pending'
],
function($, Notification, Ajax, Templates, Dialogue, Str, Tree, Pending) {
/**
* Competency picker class.
@@ -157,6 +159,7 @@ define(['jquery',
// Add listener for add.
self._find('[data-region="competencylinktree"] [data-action="add"]').click(function(e) {
e.preventDefault();
var pendingPromise = new Pending();
if (!self._selectedCompetencies.length) {
return;
}
@@ -168,7 +171,10 @@ define(['jquery',
self._trigger('save', {competencyId: self._selectedCompetencies[0]});
}
// The dialogue here is a YUI dialogue and doesn't support Promises at all.
// However, it is typically synchronous so this shoudl suffice.
self.close();
pendingPromise.resolve();
});
// The list of selected competencies will be modified while looping (because of the listeners above).
@@ -26,8 +26,10 @@ define(['jquery',
'tool_lp/dialogue',
'core/str',
'core/ajax',
'core/templates'],
function($, notification, Dialogue, str, ajax, templates) {
'core/templates',
'core/pending'
],
function($, notification, Dialogue, str, ajax, templates, Pending) {
/**
* Constructor
@@ -48,6 +50,7 @@ define(['jquery',
* @method configureSettings
*/
settingsMod.prototype.configureSettings = function(e) {
var pendingPromise = new Pending();
var courseid = $(e.target).closest('a').data('courseid');
var currentValue = $(e.target).closest('a').data('pushratingstouserplans');
var context = {
@@ -56,16 +59,21 @@ define(['jquery',
};
e.preventDefault();
templates.render('tool_lp/course_competency_settings', context).done(function(html) {
str.get_string('configurecoursecompetencysettings', 'tool_lp').done(function(title) {
this._dialogue = new Dialogue(
title,
html,
this.addListeners.bind(this)
);
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
$.when(
str.get_string('configurecoursecompetencysettings', 'tool_lp'),
templates.render('tool_lp/course_competency_settings', context)
)
.then(function(title, templateResult) {
this._dialogue = new Dialogue(
title,
templateResult[0],
this.addListeners.bind(this)
);
return this._dialogue;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
/**
@@ -108,6 +116,7 @@ define(['jquery',
* @method saveSettings
*/
settingsMod.prototype.saveSettings = function(e) {
var pendingPromise = new Pending();
e.preventDefault();
var newValue = this._find('input[name="pushratingstouserplans"]:checked').val();
@@ -117,9 +126,12 @@ define(['jquery',
ajax.call([
{methodname: 'core_competency_update_course_competency_settings',
args: {courseid: courseId, settings: settings}}
])[0].done(function() {
this.refreshCourseCompetenciesPage();
}.bind(this)).fail(notification.exception);
])[0]
.then(function() {
return this.refreshCourseCompetenciesPage();
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
@@ -131,18 +143,23 @@ define(['jquery',
*/
settingsMod.prototype.refreshCourseCompetenciesPage = function() {
var courseId = this._find('input[name="courseid"]').val();
var pendingPromise = new Pending();
ajax.call([
{methodname: 'tool_lp_data_for_course_competencies_page',
args: {courseid: courseId}}
])[0].done(function(context) {
templates.render('tool_lp/course_competencies_page', context).done(function(html, js) {
$('[data-region="coursecompetenciespage"]').replaceWith(html);
templates.runTemplateJS(js);
this._dialogue.close();
}.bind(this)).fail(notification.exception);
}.bind(this)).fail(notification.exception);
])[0]
.then(function(context) {
return templates.render('tool_lp/course_competencies_page', context);
})
.then(function(html, js) {
templates.replaceNode($('[data-region="coursecompetenciespage"]'), html, js);
this._dialogue.close();
return;
}.bind(this))
.then(pendingPromise.resolve)
.catch(notification.exception);
};
return /** @alias module:tool_lp/configurecoursecompetencysettings */ settingsMod;
+14 -9
View File
@@ -102,15 +102,20 @@ define(['jquery',
* @return {Promise}
*/
Grade.prototype.display = function() {
return this._render().then(function(html) {
return Str.get_string('rate', 'tool_lp').then(function(title) {
this._popup = new Dialogue(
title,
html,
this._afterRender.bind(this)
);
}.bind(this));
}.bind(this)).fail(Notification.exception);
return $.when(
Str.get_string('rate', 'tool_lp'),
this._render()
)
.then(function(title, templateResult) {
this._popup = new Dialogue(
title,
templateResult[0],
this._afterRender.bind(this)
);
return this._popup;
}.bind(this))
.catch(Notification.exception);
};
/**
@@ -95,7 +95,7 @@ define(['jquery',
self = this;
var promise = ScaleValues.get_values(self._scaleId);
promise.done(function(scalevalues) {
promise.then(function(scalevalues) {
options.push({
value: '',
name: self._chooseStr
@@ -109,8 +109,13 @@ define(['jquery',
});
}
self._dialogue = new GradeDialogue(options);
self._dialogue.on('rated', function(e, data) {
return options;
})
.then(function(options) {
return new GradeDialogue(options);
})
.then(function(dialogue) {
dialogue.on('rated', function(e, data) {
var args = self._args;
args.grade = data.rating;
args.note = data.note;
@@ -123,7 +128,15 @@ define(['jquery',
fail: notification.exception
}]);
});
}).fail(notification.exception);
return dialogue;
})
.then(function(dialogue) {
self._dialogue = dialogue;
return;
})
.fail(notification.exception);
};
/** @type {Number} The scale id for this competency. */
@@ -75,7 +75,7 @@ class manage_competency_frameworks_page implements renderable, templatable {
);
$this->navigation[] = $addpage;
$competenciesrepository = new single_button(
new moodle_url('https://moodle.net/competencies'),
new moodle_url('https://archive.moodle.net/competencies'),
get_string('competencyframeworksrepository', 'tool_lp'),
'get'
);
@@ -38,6 +38,9 @@
<div class="pull-xs-right card card-block">
<p>{{{groupselector}}}</p>
<form class="user-competency-course-navigation">
<input type="hidden" name="userid" value="{{userid}}"/>
<input type="hidden" name="competencyid" value="{{competencyid}}"/>
<input type="hidden" name="courseid" value="{{courseid}}"/>
{{#hasusers}}
<span>
<label for="user-nav-{{uniqid}}" class="accesshide">{{#str}}jumptouser, tool_lp{{/str}}</label>
@@ -6,6 +6,7 @@ Feature: Manage competency frameworks
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new framework
@@ -6,6 +6,7 @@ Feature: Manage plearning plan templates
Background:
Given I log in as "admin"
And I change window size to "small"
And I am on site homepage
Scenario: Create a new learning plan template
@@ -105,7 +105,7 @@ $string['requirevalidation'] = 'Validate sender address';
$string['name'] = 'Name';
$string['ssl'] = 'SSL (Auto-detect SSL version)';
$string['sslv2'] = 'SSLv2 (Force SSL Version 2)';
$string['sslv3'] = 'SSLv2 (Force SSL Version 3)';
$string['sslv3'] = 'SSLv3 (Force SSL Version 3)';
$string['taskcleanup'] = 'Cleanup of unverified incoming email';
$string['taskpickup'] = 'Incoming email pickup';
$string['tls'] = 'TLS (TLS; started via protocol-level negotiation over unencrypted channel; RECOMMENDED way of initiating secure connection)';
+11
View File
@@ -206,6 +206,12 @@ class api {
$identityprovidersdata = \auth_plugin_base::prepare_identity_providers_for_output($identityproviders, $OUTPUT);
if (!empty($identityprovidersdata)) {
$settings['identityproviders'] = $identityprovidersdata;
// Clean URLs to avoid breaking Web Services.
// We can't do it in prepare_identity_providers_for_output() because it may break the web output.
foreach ($settings['identityproviders'] as &$ip) {
$ip['url'] = (!empty($ip['url'])) ? clean_param($ip['url'], PARAM_URL) : '';
$ip['iconurl'] = (!empty($ip['iconurl'])) ? clean_param($ip['iconurl'], PARAM_URL) : '';
}
}
// If age is verified, return also the admin contact details.
@@ -382,6 +388,8 @@ class api {
$features = array(
'NoDelegate_CoreOffline' => new lang_string('offlineuse', 'tool_mobile'),
'$mmLoginEmailSignup' => new lang_string('startsignup'),
'NoDelegate_CoreComments' => new lang_string('comments'),
'NoDelegate_CoreRating' => new lang_string('ratings', 'rating'),
"$mainmenu" => array(
'$mmSideMenuDelegate_mmCourses' => new lang_string('mycourses'),
'$mmSideMenuDelegate_mmaFrontpage' => new lang_string('sitehome'),
@@ -390,6 +398,7 @@ class api {
'$mmSideMenuDelegate_mmaNotifications' => new lang_string('notifications', 'message'),
'$mmSideMenuDelegate_mmaMessages' => new lang_string('messages', 'message'),
'$mmSideMenuDelegate_mmaCalendar' => new lang_string('calendar', 'calendar'),
'CoreMainMenuDelegate_AddonBlog' => new lang_string('blog', 'blog'),
'$mmSideMenuDelegate_mmaFiles' => new lang_string('files'),
'$mmSideMenuDelegate_website' => new lang_string('webpage'),
'$mmSideMenuDelegate_help' => new lang_string('help'),
@@ -403,6 +412,7 @@ class api {
'$mmCoursesDelegate_mmaNotes' => new lang_string('notes', 'notes'),
'NoDelegate_CoreCourseDownload' => new lang_string('downloadcourse', 'tool_mobile'),
'NoDelegate_CoreCoursesDownload' => new lang_string('downloadcourses', 'tool_mobile'),
'CoreCourseOptionsDelegate_AddonBlog' => new lang_string('blog', 'blog'),
),
"$user" => array(
'$mmUserDelegate_mmaBadges' => new lang_string('badges', 'badges'),
@@ -414,6 +424,7 @@ class api {
'$mmUserDelegate_mmaMessages:blockContact' => new lang_string('blockcontact', 'message'),
'$mmUserDelegate_mmaNotes:addNote' => new lang_string('addnewnote', 'notes'),
'$mmUserDelegate_picture' => new lang_string('userpic'),
'CoreCourseOptionsDelegate_AddonBlog' => new lang_string('blog', 'blog'),
),
"$files" => array(
'files_privatefiles' => new lang_string('privatefiles'),
+2 -2
View File
@@ -81,7 +81,7 @@ $string['mobileappearance'] = 'Mobile appearance';
$string['mobileauthentication'] = 'Mobile authentication';
$string['mobilecssurl'] = 'CSS';
$string['mobilefeatures'] = 'Mobile features';
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Manage message outputs.';
$string['mobilenotificationsdisabledwarning'] = 'Mobile notifications are not enabled. They should be enabled in Notification settings.';
$string['mobilesettings'] = 'Mobile settings';
$string['offlineuse'] = 'Offline use';
$string['pluginname'] = 'Moodle app tools';
@@ -89,7 +89,7 @@ $string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
$string['remoteaddons'] = 'Remote add-ons';
$string['selfsignedoruntrustedcertificatewarning'] = 'It seems that the HTTPS certificate is self-signed or not trusted. The mobile app will only work with trusted sites.';
$string['setuplink'] = 'App download page';
$string['setuplink_desc'] = 'URL of page with links to download the mobile app from the App Store and Google Play.';
$string['setuplink_desc'] = 'URL of page with options to download the mobile app from the App Store and Google Play. The app download page link is displayed in the page footer and in a user\'s profile. Leave blank to not display a link.';
$string['smartappbanners'] = 'App Banners';
$string['typeoflogin'] = 'Type of login';
$string['typeoflogin_desc'] = 'If the site uses a SSO authentication method, then select via a browser window or via an embedded browser. An embedded browser provides a better user experience, though it doesn\'t work with all SSO plugins.';
+1 -1
View File
@@ -30,7 +30,7 @@ require_once($CFG->libdir . '/externallib.php');
$serviceshortname = required_param('service', PARAM_ALPHANUMEXT);
$passport = required_param('passport', PARAM_RAW); // Passport send from the app to validate the response URL.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_NOTAGS); // The URL scheme the app supports.
$urlscheme = optional_param('urlscheme', 'moodlemobile', PARAM_ALPHANUM); // The URL scheme the app supports.
$confirmed = optional_param('confirmed', false, PARAM_BOOL); // If we are being redirected after user confirmation.
$oauthsso = optional_param('oauthsso', 0, PARAM_INT); // Id of the OpenID issuer (for OAuth direct SSO).
+1 -1
View File
@@ -63,7 +63,7 @@ if ($hassiteconfig) {
$temp->add(new admin_setting_configtext('tool_mobile/forcedurlscheme',
new lang_string('forcedurlscheme_key', 'tool_mobile'),
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_NOTAGS));
new lang_string('forcedurlscheme', 'tool_mobile'), '', PARAM_ALPHANUM));
$ADMIN->add('mobileapp', $temp);
@@ -98,6 +98,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
);
$this->assertEquals($expected, $result);
$this->setAdminUser();
// Change some values.
set_config('registerauth', 'email');
$authinstructions = 'Something with <b>html tags</b>';
@@ -111,6 +112,18 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
set_config('lang', 'a_b'); // Set invalid lang.
set_config('disabledfeatures', 'myoverview', 'tool_mobile');
// Enable couple of issuers.
$issuer = \core\oauth2\api::create_standard_issuer('google');
$irecord = $issuer->to_record();
$irecord->clientid = 'mock';
$irecord->clientsecret = 'mock';
core\oauth2\api::update_issuer($irecord);
set_config('user_attribute', 'test', 'auth_shibboleth');
set_config('auth_logo', 'http://invalidurl.com//invalid/', 'auth_shibboleth');
set_config('auth', 'oauth2,shibboleth');
list($authinstructions, $notusedformat) = external_format_text($authinstructions, FORMAT_MOODLE, $context->id);
$expected['registerauth'] = 'email';
$expected['authinstructions'] = $authinstructions;
@@ -132,7 +145,26 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
$result = external::get_public_config();
$result = external_api::clean_returnvalue(external::get_public_config_returns(), $result);
// First check providers.
$identityproviders = $result['identityproviders'];
unset($result['identityproviders']);
$this->assertEquals('Google', $identityproviders[0]['name']);
$this->assertEquals($irecord->image, $identityproviders[0]['iconurl']);
$this->assertContains($CFG->wwwroot, $identityproviders[0]['url']);
$this->assertEquals('Shibboleth Login', $identityproviders[1]['name']);
$this->assertEmpty($identityproviders[1]['iconurl']);
$this->assertContains($CFG->wwwroot, $identityproviders[1]['url']);
$this->assertEquals($expected, $result);
// Change providers img.
$newurl = 'validimage.png';
set_config('auth_logo', $newurl, 'auth_shibboleth');
$result = external::get_public_config();
$result = external_api::clean_returnvalue(external::get_public_config_returns(), $result);
$this->assertContains($newurl, $result['identityproviders'][1]['iconurl']);
}
/**
+2 -1
View File
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
use \tool_monitor\privacy\provider;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\approved_userlist;
use \core_privacy\tests\provider_testcase;
/**
* Privacy test for the event monitor
@@ -37,7 +38,7 @@ use \core_privacy\local\request\approved_userlist;
* @copyright 2018 Adrian Greeve <adriangreeve.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_monitor_privacy_testcase extends advanced_testcase {
class tool_monitor_privacy_testcase extends provider_testcase {
/**
* Set up method.
+9 -3
View File
@@ -46,6 +46,9 @@ class issuer extends persistent {
/** @var string $type */
protected $type;
/** @var boolean $showrequireconfirm Whether to show the require confirmation email checkbox or not. */
protected $showrequireconfirm;
/**
* Constructor.
*
@@ -71,6 +74,7 @@ class issuer extends persistent {
if (array_key_exists('type', $customdata)) {
$this->type = $customdata['type'];
}
$this->showrequireconfirm = !empty($customdata['showrequireconfirm']);
parent::__construct($action, $customdata, $method, $target, $attributes, $editable, $ajaxformdata);
}
@@ -157,9 +161,11 @@ class issuer extends persistent {
$mform->addElement('checkbox', 'showonloginpage', get_string('issuershowonloginpage', 'tool_oauth2'));
$mform->addHelpButton('showonloginpage', 'issuershowonloginpage', 'tool_oauth2');
// Require confirmation email for new accounts.
$mform->addElement('advcheckbox', 'requireconfirmation', get_string('issuerrequireconfirmation', 'tool_oauth2'));
$mform->addHelpButton('requireconfirmation', 'issuerrequireconfirmation', 'tool_oauth2');
if ($this->showrequireconfirm) {
// Require confirmation email for new accounts.
$mform->addElement('advcheckbox', 'requireconfirmation', get_string('issuerrequireconfirmation', 'tool_oauth2'));
$mform->addHelpButton('requireconfirmation', 'issuerrequireconfirmation', 'tool_oauth2');
}
$mform->addElement('hidden', 'sortorder');
$mform->setType('sortorder', PARAM_INT);
+37 -7
View File
@@ -58,7 +58,24 @@ if ($action == 'edit') {
$PAGE->navbar->add(get_string('createnewissuer', 'tool_oauth2'));
}
$mform = new \tool_oauth2\form\issuer(null, ['persistent' => $issuer]);
$showrequireconfirm = false;
if (!empty($issuerid)) {
// Show the "Require confirmation email" checkbox for trusted issuers like Google, Facebook and Microsoft.
$likefacebook = $DB->sql_like('url', ':facebook');
$likegoogle = $DB->sql_like('url', ':google');
$likemicrosoft = $DB->sql_like('url', ':microsoft');
$params = [
'issuerid' => $issuerid,
'facebook' => '%facebook%',
'google' => '%google%',
'microsoft' => '%microsoft%',
];
$select = "issuerid = :issuerid AND ($likefacebook OR $likegoogle OR $likemicrosoft)";
// We're querying from the oauth2_endpoint table because the base URLs of FB and Microsoft can be empty in the issuer table.
$showrequireconfirm = $DB->record_exists_select('oauth2_endpoint', $select, $params);
}
$mform = new \tool_oauth2\form\issuer(null, ['persistent' => $issuer, 'showrequireconfirm' => $showrequireconfirm]);
}
if ($mform && $mform->is_cancelled()) {
@@ -108,9 +125,11 @@ if ($mform && $mform->is_cancelled()) {
$type = required_param('type', PARAM_ALPHA);
$docs = required_param('docslink', PARAM_ALPHAEXT);
$showrequireconfirm = optional_param('showrequireconfirm', false, PARAM_BOOL);
require_sesskey();
$issuer = core\oauth2\api::init_standard_issuer($type);
$mform = new \tool_oauth2\form\issuer(null, ['persistent' => $issuer, 'type' => $type]);
$mform = new \tool_oauth2\form\issuer(null, ['persistent' => $issuer, 'type' => $type,
'showrequireconfirm' => $showrequireconfirm]);
echo $OUTPUT->header();
$mform->display();
@@ -178,26 +197,37 @@ if ($mform && $mform->is_cancelled()) {
$issuers = core\oauth2\api::get_all_issuers();
echo $renderer->issuers_table($issuers);
// Google template.
$docs = 'admin/tool/oauth2/issuers/google';
$params = ['action' => 'edittemplate', 'type' => 'google', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'google', 'sesskey' => sesskey(), 'docslink' => $docs,
'showrequireconfirm' => true];
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
echo $renderer->single_button($addurl, get_string('createnewgoogleissuer', 'tool_oauth2'));
// Microsoft template.
$docs = 'admin/tool/oauth2/issuers/microsoft';
$params = ['action' => 'edittemplate', 'type' => 'microsoft', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'microsoft', 'sesskey' => sesskey(), 'docslink' => $docs,
'showrequireconfirm' => true];
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
echo $renderer->single_button($addurl, get_string('createnewmicrosoftissuer', 'tool_oauth2'));
// Facebook template.
$docs = 'admin/tool/oauth2/issuers/facebook';
$params = ['action' => 'edittemplate', 'type' => 'microsoft', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'facebook', 'sesskey' => sesskey(), 'docslink' => $docs];
$params = ['action' => 'edittemplate', 'type' => 'facebook', 'sesskey' => sesskey(), 'docslink' => $docs,
'showrequireconfirm' => true];
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
echo $renderer->single_button($addurl, get_string('createnewfacebookissuer', 'tool_oauth2'));
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', ['action' => 'edit']);
// Nextcloud template.
$docs = 'admin/tool/oauth2/issuers/nextcloud';
$params = ['action' => 'edittemplate', 'type' => 'nextcloud', 'sesskey' => sesskey(), 'docslink' => $docs];
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', $params);
echo $renderer->single_button($addurl, get_string('createnewnextcloudissuer', 'tool_oauth2'));
// Generic issuer.
$addurl = new moodle_url('/admin/tool/oauth2/issuers.php', ['action' => 'edit']);
echo $renderer->single_button($addurl, get_string('createnewissuer', 'tool_oauth2'));
echo $OUTPUT->footer();
}
+1 -1
View File
@@ -1 +1 @@
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f={VIEW_POLICY:'[data-action="view"]'},g=function(){this.registerEvents()};return g.prototype.registerEvents=function(){a(f.VIEW_POLICY).click(function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(){return new g}}});
define(["jquery","core/ajax","core/notification","core/modal_factory","core/modal_events"],function(a,b,c,d,e){var f=function(a){this.registerEvents(a)};return f.prototype.registerEvents=function(f){f.on("click",function(f){f.preventDefault();var g=a(this).data("versionid"),h=a(this).data("behalfid"),i={versionid:g,behalfid:h},j={methodname:"tool_policy_get_policy_version",args:i},k=a.Deferred(),l=a.Deferred(),m=d.create({title:k,body:l,large:!0}).then(function(a){return a.getRoot().on(e.hidden,function(){a.destroy()}),a}).then(function(a){return a.show(),a})["catch"](c.exception),n=b.call([j]);a.when(n[0]).then(function(a){if(a.result.policy)return k.resolve(a.result.policy.name),l.resolve(a.result.policy.content),a;throw new Error(a.warnings[0].message)})["catch"](function(a){return m.then(function(a){return a.hide(),a.destroy(),a})["catch"](c.exception),c.addNotification({message:a,type:"error"})})})},{init:function(b){return b=a(b),new f(b)}}});
+7 -15
View File
@@ -29,27 +29,18 @@ define([
'core/modal_events'],
function($, Ajax, Notification, ModalFactory, ModalEvents) {
/**
* List of action selectors.
*
* @type {{VIEW_POLICY: string}}
*/
var ACTIONS = {
VIEW_POLICY: '[data-action="view"]'
};
/**
* PolicyActions class.
*/
var PolicyActions = function() {
this.registerEvents();
var PolicyActions = function(root) {
this.registerEvents(root);
};
/**
* Register event listeners.
*/
PolicyActions.prototype.registerEvents = function() {
$(ACTIONS.VIEW_POLICY).click(function(e) {
PolicyActions.prototype.registerEvents = function(root) {
root.on("click", function(e) {
e.preventDefault();
var versionid = $(this).data('versionid');
@@ -127,8 +118,9 @@ function($, Ajax, Notification, ModalFactory, ModalEvents) {
* @method init
* @return {PolicyActions}
*/
'init': function() {
return new PolicyActions();
'init': function(root) {
root = $(root);
return new PolicyActions(root);
}
};
});
@@ -111,7 +111,7 @@ class accept_policy extends \moodleform {
}
}
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init');
$PAGE->requires->js_call_amd('tool_policy/policyactions', 'init', ['[data-action="view"]']);
}
/**
@@ -197,4 +197,4 @@ class accept_policy extends \moodleform {
}
}
}
}
}
@@ -58,7 +58,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
"<ul>{{#policies}}" +
"<li>" +
"<a href=\"{{pluginbaseurl}}/view.php?versionid={{id}}{{#returnurl}}&amp;returnurl={{.}}{{/returnurl}}\" " +
" data-action=\"view\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
" data-action=\"view-guest\" data-versionid=\"{{id}}\" data-behalfid=\"1\" >" +
"{{{name}}}" +
"</a>" +
"</li>" +
@@ -81,7 +81,7 @@ require(['jquery', 'tool_policy/jquery-eu-cookie-law-popup', 'tool_policy/policy
{{/haspolicies}}
// Initialise the JS for the modal window which displays the policy versions.
ActionsMod.init();
ActionsMod.init('[data-action="view-guest"]');
});
});
@@ -143,6 +143,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -73,6 +73,6 @@
{{#js}}
// Initialise the JS for the modal window which displays the policy versions.
require(['tool_policy/policyactions'], function(ActionsMod) {
ActionsMod.init();
ActionsMod.init('[data-action="view"]');
});
{{/js}}
@@ -28,7 +28,7 @@ $string['spamauto'] = 'Autodetect common spam patterns';
$string['spamcannotdelete'] = 'Cannot delete this user';
$string['spamcannotfinduser'] = 'No users matching your search';
$string['spamcleanerintro'] = '<p>This script allows you to search all user profiles for certain strings and then delete those accounts which are obviously created by spammers. You can search for multiple keywords using commas (e.g. casino, porn).</p>
<p>For further information, see the documentation <a href="http://docs.moodle.org/en/Reducing_spam_in_Moodle">Reducing spam in Moodle</a>.</p>';
<p>For further information, see the documentation <a href="https://docs.moodle.org/en/Reducing_spam_in_Moodle">Reducing spam in Moodle</a>.</p>';
$string['spamdeleteall'] = 'Delete all these user accounts';
$string['spamdeleteallconfirm'] = 'Are you sure you want to delete all these user accounts? You can not undo this.';
$string['spamdeleteconfirm'] = 'Are you sure you want to delete this entry? You can not undo this.';
+1 -1
View File
@@ -50,7 +50,7 @@ Options:
-h, --help Print out this help
Example:
\$sudo -u www-data /usr/bin/php admin/tool/task/cli/scheduled_task.php --execute=\\\\core\\\\task\\\\session_cleanup_task
\$sudo -u www-data /usr/bin/php admin/tool/task/cli/schedule_task.php --execute=\\\\core\\\\task\\\\session_cleanup_task
";
+9 -1
View File
@@ -703,10 +703,18 @@ class tool_uploadcourse_course {
$coursedata += $courseformat->validate_course_format_options($this->rawdata);
}
// Special case, 'numsections' is not a course format option any more but still should apply from defaults.
// Special case, 'numsections' is not a course format option any more but still should apply from the template course,
// if any, and otherwise from defaults.
if (!$exists || !array_key_exists('numsections', $coursedata)) {
if (isset($this->rawdata['numsections']) && is_numeric($this->rawdata['numsections'])) {
$coursedata['numsections'] = (int)$this->rawdata['numsections'];
} else if (isset($this->options['templatecourse'])) {
$numsections = tool_uploadcourse_helper::get_coursesection_count($this->options['templatecourse']);
if ($numsections != 0) {
$coursedata['numsections'] = $numsections;
} else {
$coursedata['numsections'] = get_config('moodlecourse', 'numsections');
}
} else {
$coursedata['numsections'] = get_config('moodlecourse', 'numsections');
}
@@ -286,6 +286,25 @@ class tool_uploadcourse_helper {
return $roles;
}
/**
* Helper to detect how many sections a course with a given shortname has.
*
* @param string $shortname shortname of a course to count sections from.
* @return integer count of sections.
*/
public static function get_coursesection_count($shortname) {
global $DB;
if (!empty($shortname) || is_numeric($shortname)) {
// Creating restore from an existing course.
$course = $DB->get_record('course', array('shortname' => $shortname));
}
if (!empty($course)) {
$courseformat = course_get_format($course);
return $courseformat->get_last_section_number();
}
return 0;
}
/**
* Get the role renaming data from the passed data.
*
+2
View File
@@ -353,6 +353,7 @@ function uu_allowed_roles() {
*/
function uu_allowed_roles_cache() {
$allowedroles = get_assignable_roles(context_course::instance(SITEID), ROLENAME_SHORT);
$rolecache = [];
foreach ($allowedroles as $rid=>$rname) {
$rolecache[$rid] = new stdClass();
$rolecache[$rid]->id = $rid;
@@ -372,6 +373,7 @@ function uu_allowed_roles_cache() {
*/
function uu_allowed_sysroles_cache() {
$allowedroles = get_assignable_roles(context_system::instance(), ROLENAME_SHORT);
$rolecache = [];
foreach ($allowedroles as $rid => $rname) {
$rolecache[$rid] = new stdClass();
$rolecache[$rid]->id = $rid;
+1 -1
View File
@@ -257,7 +257,7 @@ class manager {
'title' => get_string('importtour', 'tool_usertours'),
],
(object) [
'link' => new \moodle_url('https://moodle.net/tours'),
'link' => new \moodle_url('https://archive.moodle.net/tours'),
'linkproperties' => [
'target' => '_blank',
],
@@ -77,18 +77,22 @@ class provider implements
}
if ($descriptionidentifier !== null) {
$time = transform::datetime($value);
$tour = \tool_usertours\tour::instance($tourid);
try {
$tour = \tool_usertours\tour::instance($tourid);
$time = transform::datetime($value);
writer::export_user_preference(
'tool_usertours',
$name,
$time,
get_string($descriptionidentifier, 'tool_usertours', (object) [
'name' => $tour->get_name(),
'time' => $time,
])
);
writer::export_user_preference(
'tool_usertours',
$name,
$time,
get_string($descriptionidentifier, 'tool_usertours', (object) [
'name' => $tour->get_name(),
'time' => $time,
])
);
} catch (\dml_missing_record_exception $ex) {
// The tour related to this user preference no longer exists.
}
}
}
}
@@ -112,4 +112,37 @@ class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testc
$this->assertCount(2, (array) $prefs);
}
/**
* Ensure that export_user_preferences excludes deleted tours.
*/
public function test_export_user_preferences_deleted_tour() {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
$user = \core_user::get_user_by_username('admin');
$alltours = $DB->get_records('tool_usertours_tours');
$tour1 = tour::instance(array_shift($alltours)->id);
$tour1->mark_user_completed();
$tour2 = tour::instance(array_shift($alltours)->id);
$tour2->mark_user_completed();
$tour2->remove();
$writer = writer::with_context(\context_system::instance());
provider::export_user_preferences($user->id);
$this->assertTrue($writer->has_any_data());
// We should have one preference.
$prefs = $writer->get_user_preferences('tool_usertours');
$this->assertCount(1, (array) $prefs);
// The preference should be related to the first tour.
$this->assertContains($tour1->get_name(), reset($prefs)->description);
}
}
@@ -38,9 +38,6 @@ class load_xml_file extends XMLDBAction {
$this->can_subaction = ACTION_NONE;
//$this->can_subaction = ACTION_HAVE_SUBACTIONS;
// Set own custom attributes
$this->sesskey_protected = false; // This action doesn't need sesskey protection
// Get needed strings
$this->loadStrings(array(
// 'key' => 'module',
@@ -169,7 +169,7 @@ class main_view extends XMLDBAction {
file_exists($key . '/install.xml') &&
is_readable($key . '/install.xml') &&
empty($dbdir->xml_loaded)) {
$b .= '<a href="index.php?action=load_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['load'] . ']</a>';
$b .= '<a href="index.php?action=load_xml_file&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['load'] . ']</a>';
} else {
$b .= '[' . $this->str['load'] . ']';
}
@@ -239,7 +239,7 @@ class main_view extends XMLDBAction {
is_readable($key . '/install.xml') &&
!empty($dbdir->xml_loaded) &&
empty($dbdir->xml_changed)) {
$b .= '<a href="index.php?action=unload_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['unload'] . ']</a>';
$b .= '<a href="index.php?action=unload_xml_file&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['unload'] . ']</a>';
} else {
$b .= '[' . $this->str['unload'] . ']';
}
@@ -35,9 +35,6 @@ class unload_xml_file extends XMLDBAction {
function init() {
parent::init();
// Set own custom attributes
$this->sesskey_protected = false; // This action doesn't need sesskey protection
// Get needed strings
$this->loadStrings(array(
// 'key' => 'module',
+3 -3
View File
@@ -33,7 +33,7 @@ $string['confirmdeleteindex'] = 'Are you absolutely sure that you want to delete
$string['confirmdeletekey'] = 'Are you absolutely sure that you want to delete the key:';
$string['confirmdeletetable'] = 'Are you absolutely sure that you want to delete the table:';
$string['confirmdeletexmlfile'] = 'Are you absolutely sure that you want to delete the file:';
$string['confirmcheckbigints'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.
$string['confirmcheckbigints'] = 'This functionality will search for <a href="https://tracker.moodle.org/browse/MDL-11038">potential wrong integer fields</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the integers in your DB properly defined.
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
@@ -59,7 +59,7 @@ Once generated you can copy such statements and execute them safely with your fa
It\'s highly recommended to be running the latest (+ version) available of your Moodle release before executing the search of missing indexes.
This functionality doesn\'t perform any action against the DB (just reads from it), so can be safely executed at any moment.';
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="http://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).
$string['confirmcheckoraclesemantics'] = 'This functionality will search for <a href="https://tracker.moodle.org/browse/MDL-29322">Oracle varchar2 columns using BYTE semantics</a> in your Moodle server, generating (but not executing!) automatically the needed SQL statements to have all the columns converted to use CHAR semantics instead (better for cross-db compatibility and increased contents max. length).
Once generated you can copy such statements and execute them safely with your favourite SQL interface (don\'t forget to backup your data before doing that).
@@ -139,7 +139,7 @@ $string['incorrecttablename'] = 'Incorrect table name';
$string['key'] = 'Key';
$string['keynameempty'] = 'The key name cannot be empty';
$string['keys'] = 'Keys';
$string['listreservedwords'] = 'List of Reserved Words<br />(used to keep <a href="http://docs.moodle.org/en/XMLDB_reserved_words" target="_blank">XMLDB_reserved_words</a> updated)';
$string['listreservedwords'] = 'List of reserved words<br />(used to keep <a href="https://docs.moodle.org/en/XMLDB_reserved_words" target="_blank">XMLDB reserved words</a> updated)';
$string['load'] = 'Load';
$string['main_view'] = 'Main view';
$string['masterprimaryuniqueordernomatch'] = 'The fields in your foreign key must be listed in the same order as they are listed in the UNIQUE KEY on the referenced table.';
+15 -1
View File
@@ -594,7 +594,9 @@ abstract class base {
}
try {
foreach ($this->indicators as $key => $indicator) {
// Instantiate empty indicators to ensure that no garbage is dragged from previous analyses.
foreach ($this->instantiate_indicators() as $key => $indicator) {
// The analyser attaches the main entities the sample depends on and are provided to the
// indicator to calculate the sample.
$this->indicators[$key]->add_sample_data($samplesdata);
@@ -651,6 +653,18 @@ abstract class base {
return $result;
}
/**
* Instantiate the indicators.
*
* @return \core_analytics\local\indicator\base[]
*/
public function instantiate_indicators() {
foreach ($this->indicators as $key => $indicator) {
$this->indicators[$key] = call_user_func(array($indicator, 'instance'));
}
return $this->indicators;
}
/**
* Returns the most recent range that can be used to predict.
*
@@ -836,7 +836,8 @@ abstract class community_of_inquiry_activity extends linear {
// When the course is using format weeks we use the week's end date.
$format = course_get_format($activity->get_modinfo()->get_course());
// We should change this in MDL-60702.
if (method_exists($format, 'get_section_dates')) {
if ((get_class($format) == 'format_weeks' || is_subclass_of($format, 'format_weeks'))
&& method_exists($format, 'get_section_dates')) {
$dates = $format->get_section_dates($section);
// We need to consider the +2 hours added by get_section_dates.
+4 -2
View File
@@ -115,8 +115,10 @@ abstract class base extends \core_analytics\calculable {
global $PAGE;
$predictionid = $prediction->get_prediction_data()->id;
$contextid = $prediction->get_prediction_data()->contextid;
$modelid = $prediction->get_prediction_data()->modelid;
$PAGE->requires->js_call_amd('report_insights/actions', 'init', array($predictionid));
$PAGE->requires->js_call_amd('report_insights/actions', 'init', array($predictionid, $contextid, $modelid));
$actions = array();
@@ -196,7 +198,7 @@ abstract class base extends \core_analytics\calculable {
$message->component = 'moodle';
$message->name = 'insights';
$message->userfrom = \core_user::get_noreply_user();
$message->userfrom = \core_user::get_support_user();
$message->userto = $user;
$insighturl = new \moodle_url('/report/insights/insights.php?modelid=' . $modelid . '&contextid=' . $context->id);
+43 -26
View File
@@ -547,45 +547,62 @@ class manager {
public static function cleanup() {
global $DB;
// Clean up stuff that depends on contexts that do not exist anymore.
$sql = "SELECT DISTINCT ap.contextid FROM {analytics_predictions} ap
LEFT JOIN {context} ctx ON ap.contextid = ctx.id
WHERE ctx.id IS NULL";
$apcontexts = $DB->get_records_sql($sql);
$DB->execute("DELETE FROM {analytics_prediction_actions} WHERE predictionid IN
(SELECT ap.id FROM {analytics_predictions} ap
LEFT JOIN {context} ctx ON ap.contextid = ctx.id
WHERE ctx.id IS NULL)");
$sql = "SELECT DISTINCT aic.contextid FROM {analytics_indicator_calc} aic
LEFT JOIN {context} ctx ON aic.contextid = ctx.id
WHERE ctx.id IS NULL";
$indcalccontexts = $DB->get_records_sql($sql);
$contexts = $apcontexts + $indcalccontexts;
if ($contexts) {
list($sql, $params) = $DB->get_in_or_equal(array_keys($contexts));
$DB->execute("DELETE FROM {analytics_prediction_actions} WHERE predictionid IN
(SELECT ap.id FROM {analytics_predictions} ap WHERE ap.contextid $sql)", $params);
$DB->delete_records_select('analytics_predictions', "contextid $sql", $params);
$DB->delete_records_select('analytics_indicator_calc', "contextid $sql", $params);
}
$contextsql = "SELECT id FROM {context} ctx";
$DB->delete_records_select('analytics_predictions', "contextid NOT IN ($contextsql)");
$DB->delete_records_select('analytics_indicator_calc', "contextid NOT IN ($contextsql)");
// Clean up stuff that depends on analysable ids that do not exist anymore.
$models = self::get_all_models();
foreach ($models as $model) {
// We first dump into memory the list of analysables we have in the database (we could probably do this with 1 single
// query for the 3 tables, but it may be safer to do it separately).
$predictsamplesanalysableids = $DB->get_fieldset_select('analytics_predict_samples', 'DISTINCT analysableid',
'modelid = :modelid', ['modelid' => $model->get_id()]);
$predictsamplesanalysableids = array_flip($predictsamplesanalysableids);
$trainsamplesanalysableids = $DB->get_fieldset_select('analytics_train_samples', 'DISTINCT analysableid',
'modelid = :modelid', ['modelid' => $model->get_id()]);
$trainsamplesanalysableids = array_flip($trainsamplesanalysableids);
$usedanalysablesanalysableids = $DB->get_fieldset_select('analytics_used_analysables', 'DISTINCT analysableid',
'modelid = :modelid', ['modelid' => $model->get_id()]);
$usedanalysablesanalysableids = array_flip($usedanalysablesanalysableids);
$analyser = $model->get_analyser(array('notimesplitting' => true));
$analysables = $analyser->get_analysables();
if (!$analysables) {
continue;
}
$analysableids = array_map(function($analysable) {
return $analysable->get_id();
}, $analysables);
foreach ($analysables as $analysable) {
unset($predictsamplesanalysableids[$analysable->get_id()]);
unset($trainsamplesanalysableids[$analysable->get_id()]);
unset($usedanalysablesanalysableids[$analysable->get_id()]);
}
list($notinsql, $params) = $DB->get_in_or_equal($analysableids, SQL_PARAMS_NAMED, 'param', false);
$params['modelid'] = $model->get_id();
$param = ['modelid' => $model->get_id()];
$DB->delete_records_select('analytics_predict_samples', "modelid = :modelid AND analysableid $notinsql", $params);
$DB->delete_records_select('analytics_train_samples', "modelid = :modelid AND analysableid $notinsql", $params);
if ($predictsamplesanalysableids) {
list($idssql, $idsparams) = $DB->get_in_or_equal(array_flip($predictsamplesanalysableids), SQL_PARAMS_NAMED);
$DB->delete_records_select('analytics_predict_samples', "modelid = :modelid AND analysableid $idssql",
$param + $idsparams);
}
if ($trainsamplesanalysableids) {
list($idssql, $idsparams) = $DB->get_in_or_equal(array_flip($trainsamplesanalysableids), SQL_PARAMS_NAMED);
$DB->delete_records_select('analytics_train_samples', "modelid = :modelid AND analysableid $idssql",
$param + $idsparams);
}
if ($usedanalysablesanalysableids) {
list($idssql, $idsparams) = $DB->get_in_or_equal(array_flip($usedanalysablesanalysableids), SQL_PARAMS_NAMED);
$DB->delete_records_select('analytics_used_analysables', "modelid = :modelid AND analysableid $idssql",
$param + $idsparams);
}
}
}
+61 -3
View File
@@ -923,7 +923,7 @@ class model {
}
// Get all samples data.
list($sampleids, $samplesdata) = $this->get_analyser()->get_samples($sampleids);
list($sampleids, $samplesdata) = $this->get_samples($sampleids);
// Calculate the targets.
$predictions = array();
@@ -1233,7 +1233,7 @@ class model {
return $prediction->sampleid;
}, $predictions);
list($unused, $samplesdata) = $this->get_analyser()->get_samples($sampleids);
list($unused, $samplesdata) = $this->get_samples($sampleids);
$current = 0;
@@ -1275,7 +1275,7 @@ class model {
*/
public function prediction_sample_data($predictionobj) {
list($unused, $samplesdata) = $this->get_analyser()->get_samples(array($predictionobj->sampleid));
list($unused, $samplesdata) = $this->get_samples(array($predictionobj->sampleid));
if (empty($samplesdata[$predictionobj->sampleid])) {
throw new \moodle_exception('errorsamplenotavailable', 'analytics');
@@ -1533,6 +1533,64 @@ class model {
$DB->update_record('analytics_models', $this->model);
}
/**
* Wrapper around analyser's get_samples to skip DB's max-number-of-params exception.
*
* @param array $sampleids
* @return array
*/
public function get_samples(array $sampleids): array {
if (empty($sampleids)) {
throw new \coding_exception('No sample ids provided');
}
$chunksize = count($sampleids);
// We start with just 1 chunk, if it is too large for the db we split the list of sampleids in 2 and we
// try again. We repeat this process until the chunk is small enough for the db engine to process. The
// >= has been added in case there are other \dml_read_exceptions unrelated to the max number of params.
while (empty($done) && $chunksize >= 1) {
$chunks = array_chunk($sampleids, $chunksize);
$allsampleids = [];
$allsamplesdata = [];
foreach ($chunks as $index => $chunk) {
try {
list($chunksampleids, $chunksamplesdata) = $this->get_analyser()->get_samples($chunk);
} catch (\dml_read_exception $e) {
// Reduce the chunksize, we use floor() so the $chunksize is always less than the previous $chunksize value.
$chunksize = floor($chunksize / 2);
break;
}
// We can sum as these two arrays are indexed by sampleid and there are no collisions.
$allsampleids = $allsampleids + $chunksampleids;
$allsamplesdata = $allsamplesdata + $chunksamplesdata;
if ($index === count($chunks) - 1) {
// We successfully processed all the samples in all chunks, we are done.
$done = true;
}
}
}
if (empty($done)) {
if (!empty($e)) {
// Throw the last exception we caught, the \dml_read_exception we have been catching is unrelated to the max number
// of param's exception.
throw new \dml_read_exception($e);
} else {
throw new \coding_exception('We should never reach this point, there is a bug in ' .
'core_analytics\\model::get_samples\'s code');
}
}
return [$allsampleids, $allsamplesdata];
}
/**
* Purges the insights cache.
*/
+2 -6
View File
@@ -306,13 +306,9 @@ class provider implements
$idssql = "SELECT ap.id FROM {analytics_predictions} ap
WHERE ap.contextid = :contextid AND ap.modelid = :modelid";
$idsparams = ['contextid' => $context->id, 'modelid' => $modelid];
$predictionids = $DB->get_fieldset_sql($idssql, $idsparams);
if ($predictionids) {
list($predictionidssql, $params) = $DB->get_in_or_equal($predictionids, SQL_PARAMS_NAMED);
$DB->delete_records_select('analytics_prediction_actions', "predictionid IN ($idssql)", $idsparams);
$DB->delete_records_select('analytics_predictions', "id $predictionidssql", $params);
}
$DB->delete_records_select('analytics_prediction_actions', "predictionid IN ($idssql)", $idsparams);
$DB->delete_records_select('analytics_predictions', "contextid = :contextid AND modelid = :modelid", $idsparams);
}
// We delete them all this table is just a cache and we don't know which model filled it.
+4 -2
View File
@@ -134,8 +134,9 @@ class analytics_manager_testcase extends advanced_testcase {
$model->train();
$model->predict();
$npredictsamples = $DB->count_records('analytics_predict_samples');
$ntrainsamples = $DB->count_records('analytics_train_samples');
$this->assertNotEmpty($DB->count_records('analytics_predict_samples'));
$this->assertNotEmpty($DB->count_records('analytics_train_samples'));
$this->assertNotEmpty($DB->count_records('analytics_used_analysables'));
// Now we delete an analysable, stored predict and training samples should be deleted.
$deletedcontext = \context_course::instance($coursepredict1->id);
@@ -145,6 +146,7 @@ class analytics_manager_testcase extends advanced_testcase {
$this->assertEmpty($DB->count_records('analytics_predict_samples', array('analysableid' => $coursepredict1->id)));
$this->assertEmpty($DB->count_records('analytics_train_samples', array('analysableid' => $coursepredict1->id)));
$this->assertEmpty($DB->count_records('analytics_used_analysables', array('analysableid' => $coursepredict1->id)));
set_config('enabled_stores', '', 'tool_log');
get_log_manager(true);
+53
View File
@@ -341,6 +341,59 @@ class analytics_model_testcase extends advanced_testcase {
$this->assertLessThanOrEqual(2, $DB->count_records('analytics_used_analysables', $params));
}
/**
* Tests model::get_samples()
*
* @return null
*/
public function test_get_samples() {
$this->resetAfterTest();
if (!PHPUNIT_LONGTEST) {
$this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
}
// 10000 should be enough to make oracle and mssql fail, if we want pgsql to fail we need around 70000
// users, that is a few minutes just to create the users.
$nusers = 10000;
$userids = [];
for ($i = 0; $i < $nusers; $i++) {
$user = $this->getDataGenerator()->create_user();
$userids[] = $user->id;
}
$target = \core_analytics\manager::get_target('test_target_site_users');
$indicator = \core_analytics\manager::get_indicator('test_indicator_max');
$model = \core_analytics\model::create($target, ['test_indicator_max' => $indicator],
'\core\analytics\time_splitting\single_range');
list($sampleids, $samplesdata) = $model->get_samples($userids);
$this->assertCount($nusers, $sampleids);
$this->assertCount($nusers, $samplesdata);
$subset = array_slice($userids, 0, 100);
list($sampleids, $samplesdata) = $model->get_samples($subset);
$this->assertCount(100, $sampleids);
$this->assertCount(100, $samplesdata);
$subset = array_slice($userids, 0, 2);
list($sampleids, $samplesdata) = $model->get_samples($subset);
$this->assertCount(2, $sampleids);
$this->assertCount(2, $samplesdata);
$subset = array_slice($userids, 0, 1);
list($sampleids, $samplesdata) = $model->get_samples($subset);
$this->assertCount(1, $sampleids);
$this->assertCount(1, $samplesdata);
// Unexisting, so nothing returned, but still 2 arrays.
list($sampleids, $samplesdata) = $model->get_samples([1231231231231231]);
$this->assertEmpty($sampleids);
$this->assertEmpty($samplesdata);
}
/**
* Generates a model log record.
*/
+7
View File
@@ -72,6 +72,8 @@ class login implements renderable, templatable {
public $username;
/** @var string The csrf token to limit login to requests that come from the login form. */
public $logintoken;
/** @var string Maintenance message, if Maintenance is enabled. */
public $maintenance;
/**
* Constructor.
@@ -109,6 +111,10 @@ class login implements renderable, templatable {
$this->instructions = get_string('loginsteps', 'core', 'signup.php');
}
if ($CFG->maintenance_enabled == true && !empty($CFG->maintenance_message)) {
$this->maintenance = $CFG->maintenance_message;
}
// Identity providers.
$this->identityproviders = \auth_plugin_base::get_identity_providers($authsequence);
$this->logintoken = \core\session\manager::get_login_token();
@@ -145,6 +151,7 @@ class login implements renderable, templatable {
$data->signupurl = $this->signupurl->out(false);
$data->username = $this->username;
$data->logintoken = $this->logintoken;
$data->maintenance = format_text($this->maintenance, FORMAT_MOODLE);
return $data;
}
+1 -1
View File
@@ -24,7 +24,7 @@
$string['auth_emaildescription'] = '<p>Email-based self-registration enables a user to create their own account via a \'Create new account\' button on the login page. The user then receives an email containing a secure link to a page where they can confirm their account. Future logins just check the username and password against the stored values in the Moodle database.</p><p>Note: In addition to enabling the plugin, email-based self-registration must also be selected from the self registration drop-down menu on the \'Manage authentication\' page.</p>';
$string['auth_emailnoemail'] = 'Tried to send you an email but failed!';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the sign-up page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See http://www.google.com/recaptcha for more details.';
$string['auth_emailrecaptcha'] = 'Adds a visual/audio confirmation form element to the sign-up page for email self-registering users. This protects your site against spammers and contributes to a worthwhile cause. See https://www.google.com/recaptcha for more details.';
$string['auth_emailrecaptcha_key'] = 'Enable reCAPTCHA element';
$string['auth_emailsettings'] = 'Settings';
$string['pluginname'] = 'Email-based self-registration';
+1 -1
View File
@@ -94,7 +94,7 @@ $string['auth_ldap_usertypeundefined2'] = 'config.user_type not defined or funct
$string['auth_ldap_version'] = 'The version of the LDAP protocol your server is using.';
$string['auth_ldap_version_key'] = 'Version';
$string['auth_ntlmsso'] = 'NTLM SSO';
$string['auth_ntlmsso_enabled'] = 'Set to yes to attempt Single Sign On with the NTLM domain. <strong>Note:</strong> this requires additional setup on the webserver to work, see <a href="http://docs.moodle.org/en/NTLM_authentication">http://docs.moodle.org/en/NTLM_authentication</a>';
$string['auth_ntlmsso_enabled'] = 'Set to yes to attempt Single Sign On with the NTLM domain. Note that this requires additional setup on the server to work. For further details, see the documentation <a href="https://docs.moodle.org/en/NTLM_authentication">NTLM authentication</a>.';
$string['auth_ntlmsso_enabled_key'] = 'Enable';
$string['auth_ntlmsso_ie_fastpath'] = 'Set to enable the NTLM SSO fast path (bypasses certain steps if the client\'s browser is MS Internet Explorer).';
$string['auth_ntlmsso_ie_fastpath_key'] = 'MS IE fast path?';
+1 -2
View File
@@ -402,7 +402,6 @@ class api {
* @return bool
*/
public static function is_enabled() {
$plugininfo = \core_plugin_manager::instance()->get_plugin_info('auth_oauth2');
return $plugininfo->is_enabled();
return is_enabled_auth('oauth2');
}
}
+34
View File
@@ -50,5 +50,39 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v3.6.0 release upgrade line.
// Put any upgrade step following this.
if ($oldversion < 2018120301) {
// Fetch Facebook, Google, and Microsoft issuers. We use the URL field to determine the issuer type as it's the only
// field that contains the keyword that can somewhat let us reliably determine the issuer type.
$likefacebook = $DB->sql_like('oe.url', ':facebook');
$likegoogle = $DB->sql_like('oe.url', ':google');
$likemicrosoft = $DB->sql_like('oe.url', ':microsoft');
$params = [
'facebook' => '%facebook%',
'google' => '%google%',
'microsoft' => '%microsoft%',
];
// We're querying from the oauth2_endpoint table because the base URLs of FB and Microsoft can be empty in the issuer table.
$subsql = "
SELECT DISTINCT oe.issuerid
FROM {oauth2_endpoint} oe
WHERE $likefacebook
OR $likegoogle
OR $likemicrosoft";
// Update non-Facebook/Google/Microsoft issuers and set requireconfirmation to 1.
$updatesql = "
UPDATE {oauth2_issuer}
SET requireconfirmation = 1
WHERE id NOT IN ({$subsql})";
$DB->execute($updatesql, $params);
// Delete linked logins for non-Facebook/Google/Microsoft issuers. They can easily re-link their logins anyway.
$DB->delete_records_select('auth_oauth2_linked_login', "issuerid NOT IN ($subsql)", $params);
upgrade_plugin_savepoint(true, 2018120301, 'auth', 'oauth2');
}
return true;
}
+8 -2
View File
@@ -40,7 +40,10 @@ then cut and paste the address into the address
line at the top of your web browser window.
If you need help, please contact the site administrator,
{$a->admin}';
{$a->admin}
If you did not do this, someone else could be trying to compromise your account.
Please contact the site administrator immediately.';
$string['confirmaccountemailsubject'] = '{$a}: account confirmation';
$string['confirmationinvalid'] = 'The confirmation link is either invalid, or has expired. Please start the login process again to generate a new confirmation email.';
$string['confirmationpending'] = 'This account is pending email confirmation.';
@@ -60,7 +63,10 @@ then cut and paste the address into the address
line at the top of your web browser window.
If you need help, please contact the site administrator,
{$a->admin}';
{$a->admin}
If you did not do this, someone else could be trying to compromise your account.
Please contact the site administrator immediately.';
$string['confirmlinkedloginemailsubject'] = '{$a}: linked login confirmation';
$string['createaccountswarning'] = 'This authentication plugin allows users to create accounts on your site. You may want to enable the setting "authpreventaccountcreation" if you use this plugin.';
$string['createnewlinkedlogin'] = 'Link a new account ({$a})';
+19
View File
@@ -140,4 +140,23 @@ class auth_oauth2_external_testcase extends advanced_testcase {
$this->assertEquals($newuser->id, $match->get('userid'));
}
/**
* Test that is_enabled correctly identifies when the plugin is enabled.
*/
public function test_is_enabled() {
$this->resetAfterTest();
set_config('auth', 'manual,oauth2');
$this->assertTrue(\auth_oauth2\api::is_enabled());
}
/**
* Test that is_enabled correctly identifies when the plugin is disabled.
*/
public function test_is_enabled_disabled() {
$this->resetAfterTest();
set_config('auth', 'manual');
$this->assertFalse(\auth_oauth2\api::is_enabled());
}
}
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2018120300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2018120301; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2018112800; // Requires this Moodle version.
$plugin->component = 'auth_oauth2'; // Full name of the plugin (used for diagnostics).
+13 -6
View File
@@ -294,12 +294,19 @@ class auth_plugin_shibboleth extends auth_plugin_base {
}
$url = new moodle_url('/auth/shibboleth/index.php');
$iconurl = moodle_url::make_pluginfile_url(context_system::instance()->id,
'auth_shibboleth',
'logo',
null,
'/',
$config->auth_logo);
if ($config->auth_logo) {
$iconurl = moodle_url::make_pluginfile_url(
context_system::instance()->id,
'auth_shibboleth',
'logo',
null,
null,
$config->auth_logo);
} else {
$iconurl = null;
}
$result[] = ['url' => $url, 'iconurl' => $iconurl, 'name' => $config->login_name];
return $result;
}
+1 -1
View File
@@ -28,7 +28,7 @@ $string['auth_shib_auth_method_description'] = 'Provide a name for the Shibbolet
$string['auth_shib_auth_logo'] = 'Authentication method logo';
$string['auth_shib_auth_logo_description'] = 'Provide a logo for the Shibboleth authentication method that is familiar to your users. This could be the logo of your Shibboleth federation, e.g. <tt>SWITCHaai Login</tt> or <tt>InCommon Login</tt> or similar.';
$string['auth_shib_contact_administrator'] = 'In case you are not associated with the given organizations and you need access to a course on this server, please contact the <a href="mailto:{$a}">Moodle Administrator</a>.';
$string['auth_shibbolethdescription'] = 'Using this method users are created and authenticated using <a href="http://shibboleth.internet2.edu/">Shibboleth</a>.<br />Be sure to read the <a href="../auth/shibboleth/README.txt">README</a> for Shibboleth on how to set up your Moodle with Shibboleth';
$string['auth_shibbolethdescription'] = 'Using this method users are created and authenticated using Shibboleth. For set-up details, see the <a href="../auth/shibboleth/README.txt">Shibboleth README</a>.';
$string['auth_shibboleth_errormsg'] = 'Please select the organization you are member of!';
$string['auth_shibboleth_login'] = 'Shibboleth login';
$string['auth_shibboleth_login_long'] = 'Login to Moodle via Shibboleth';
+10 -2
View File
@@ -42,10 +42,18 @@ class behat_auth extends behat_base {
* Logs in the user. There should exist a user with the same value as username and password.
*
* @Given /^I log in as "(?P<username_string>(?:[^"]|\\")*)"$/
* @param string $username the user to log in as.
* @param moodle_url|null $wantsurl optional, URL to go to after logging in.
*/
public function i_log_in_as($username) {
public function i_log_in_as(string $username, moodle_url $wantsurl = null) {
$loginurl = new moodle_url('/login/index.php');
if ($wantsurl !== null) {
$loginurl->param('wantsurl', $wantsurl->out_as_local_url());
}
// Visit login page.
$this->getSession()->visit($this->locate_path('login/index.php'));
$this->getSession()->visit($this->locate_path($loginurl->out_as_local_url()));
// Enter username and password.
$this->execute('behat_forms::i_set_the_field_to', array('Username', $this->escape($username)));
@@ -92,3 +92,25 @@ Feature: availability_grouping
# P1 should show but not B2.
Then I should see "P1" in the "region-main" "region"
And I should not see "P2" in the "region-main" "region"
@javascript
Scenario: Check grouping access restriction message on course homepage
Given the following "groupings" exist:
| name | course | idnumber |
| Grouping A | C1 | GA |
And the following "grouping groups" exist:
| grouping | group |
| GA | GI1 |
And the following "activities" exist:
| activity | name | intro | course | idnumber | groupmode | grouping |
| assign | Test assign | Assign description | C1 | assign1 | 1 | GA |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I turn editing mode on
And I open "Test assign" actions menu
And I choose "Edit settings" in the open action menu
And I expand all fieldsets
And the field "groupingid" matches value "Grouping A"
And I press "Add group/grouping access restriction"
When I press "Save and return to course"
Then I should see "Not available unless: You belong to a group in Grouping A"
+12 -3
View File
@@ -1969,6 +1969,12 @@ class restore_course_structure_step extends restore_structure_step {
}
$capability = 'mod/' . $modname . ':addinstance';
if (!get_capability_info($capability)) {
$this->log("Capability '{$capability}' was not found!", backup::LOG_WARNING);
continue;
}
foreach ($roleids as $roleid) {
assign_capability($capability, CAP_PREVENT, $roleid, $context);
}
@@ -2096,9 +2102,12 @@ class restore_ras_and_caps_structure_step extends restore_structure_step {
$newroleid = $this->get_mappingid('role', $data->roleid);
// If newroleid and context are valid assign it via API (it handles dupes and so on)
if ($newroleid && $this->task->get_contextid()) {
// TODO: assign_capability() needs one userid param to be able to specify our restore userid
// TODO: it seems that assign_capability() doesn't check for valid capabilities at all ???
assign_capability($data->capability, $data->permission, $newroleid, $this->task->get_contextid());
if (!get_capability_info($data->capability)) {
$this->log("Capability '{$data->capability}' was not found!", backup::LOG_WARNING);
} else {
// TODO: assign_capability() needs one userid param to be able to specify our restore userid.
assign_capability($data->capability, $data->permission, $newroleid, $this->task->get_contextid());
}
}
}
}
@@ -128,15 +128,6 @@ abstract class backup_check {
// Now, if backup mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (backupxxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/backup:backuptargethub', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/backup:backuptargethub';
throw new backup_controller_exception('backup_user_missing_capability', $a);
}
break;
case backup::MODE_IMPORT:
if (!has_capability('moodle/backup:backuptargetimport', $coursectx, $userid)) {
$a = new stdclass();
@@ -90,15 +90,6 @@ abstract class restore_check {
// Now, if restore mode is hub or import, check userid has permissions for those modes
// other modes will perform common checks only (restorexxxx capabilities in $typecapstocheck)
switch ($mode) {
case backup::MODE_HUB:
if (!has_capability('moodle/restore:restoretargethub', $coursectx, $userid)) {
$a = new stdclass();
$a->userid = $userid;
$a->courseid = $courseid;
$a->capability = 'moodle/restore:restoretargethub';
throw new restore_controller_exception('restore_user_missing_capability', $a);
}
break;
case backup::MODE_IMPORT:
if (!has_capability('moodle/restore:restoretargetimport', $coursectx, $userid)) {
$a = new stdclass();

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