Compare commits

...

870 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) e786a591d5 Moodle release 3.3.5 2018-03-17 01:18:30 +01:00
Eloy Lafuente (stronk7) d9321f3342 Merge branch 'MDL-61672-33-abstractstaticmethod' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2018-03-16 23:26:10 +01:00
David Mudrák b2865ca1e4 MDL-61672 admin: Fix sitepolicy handler API
The base class had abstract static methods which raises strict standards
warning on PHP 5.6.
2018-03-16 17:22:45 +01:00
Jake Dallimore 9973df93f4 weekly release 3.3.4+ 2018-03-16 10:08:50 +08:00
Eloy Lafuente (stronk7) 9e21adb5f7 Merge branch 'MDL-61570-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-16 01:15:35 +01:00
Andrew Nicols 65c23f097c MDL-61570 tool_usertours: Implement Privacy API 2018-03-16 08:13:04 +08:00
Eloy Lafuente (stronk7) 92be49df49 MDL-61566 theme: PHP 5.6 compatibility 2018-03-16 00:48:58 +01:00
Eloy Lafuente (stronk7) 7eab2af613 Merge branch 'MDL-61566-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-16 00:30:08 +01:00
Eloy Lafuente (stronk7) 5fb193152e Merge branch 'MDL-61571-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-15 23:51:09 +01:00
Jake Dallimore 44080d810b Merge branch 'wip-MDL-61477-33-behat' of https://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2018-03-15 16:44:57 +08:00
Marina Glancy c525fe3095 MDL-61477 auth_email: behat tests for sign up 2018-03-15 16:22:13 +08:00
Jake Dallimore 86fe3ca41b Merge branch 'wip-MDL-61477-33-manager' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2018-03-15 11:41:12 +08:00
Marina Glancy 20884e18e5 MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:31:30 +08:00
David Mudrák b0b49c938b MDL-61477 admin: Allow plugins to act as alternate policy handlers
The patch introduces a new site setting 'sitepolicyhandler' that can be
either empty or contain a plugin component name. If it is empty, the
site policy feature keeps working as before and the core keeps the
control over it.

If a plugin is specified, it is expected to implement the callback
'site_policy_handler' in its lib.php file. The callback should return a
URL to a script where the user can accept the site policies. The plugin
itself is responsible for setting the 'policyagreed' flag in the users
table. The callback may return an empty value, in which case the user
can continue using the site without being redirected.

The patch adds support for a new pre-config flag NO_SITEPOLICY_CHECK.
This constant should be defined and set to true if we should not check
the user's policyagreed status during the require_login().

This is for pages where the user actually accepts the site policies and
helps to avoid the redirect loop.
2018-03-15 09:30:05 +08:00
Eloy Lafuente (stronk7) 2e6acd5f60 Merge branch 'MDL-61600-33' of git://github.com/dpalou/moodle into MOODLE_33_STABLE 2018-03-14 14:43:47 +01:00
Eloy Lafuente (stronk7) b0e4353ddd Merge branch 'MDL-61620_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2018-03-14 13:38:59 +01:00
David Monllao 16edec0104 MDL-61620 output: New action_menu options 2018-03-14 11:38:32 +01:00
Eloy Lafuente (stronk7) 07c9c193b3 Merge branch 'MDL-61398-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-14 11:22:33 +01:00
Eloy Lafuente (stronk7) 0817548194 Merge branch 'MDL-61475-33-v3' of git://github.com/snake/moodle into MOODLE_33_STABLE 2018-03-14 11:01:18 +01:00
Dani Palou 3585740ced MDL-61600 recaptcha: Create a script to display recaptcha 2018-03-14 10:35:35 +01:00
Andrew Nicols 1cf00cde92 Merge branch 'MDL-60398-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2018-03-14 10:34:09 +08:00
Jake Dallimore 4ee7ad2377 Merge branch 'MDL-61307-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-14 09:46:06 +08:00
Jake Dallimore 9cdf3e4316 MDL-61475 mod_choice: perf improvement when exporting personal data
Instead of creating an array containing all record information and then
writing, we know write periodically during the recordset iteration, thus
alleviating any memory concerns associated with the array approach.
2018-03-14 09:37:57 +08:00
Jake Dallimore 60bf7bf6c2 MDL-61475 mod_choice: Update core_privacy implementation 2018-03-14 09:37:57 +08:00
Jun Pataleta d378b3a50e MDL-61475 mod_choice: Add implementation of Privacy API 2018-03-14 09:37:57 +08:00
Andrew Nicols 82c9aa61a8 MDL-61398 block_html: Implement privacy API 2018-03-14 09:33:16 +08:00
Andrew Nicols cb8197f594 MDL-61307 core_privacy: Add unit test to check installed providers 2018-03-14 09:32:32 +08:00
David Mudrák 9873a175a5 MDL-61392 enrol_paypal: Improve IPN input parameters checking 2018-03-14 09:12:09 +08:00
David Mudrák 89033d2d07 MDL-61392 enrol_paypal: Improve the IPN notifications handling
* Notify administrators once incoming IPN request is verified by PayPal.
* Fix the HTTP status as expected by the IPN protocol.
2018-03-14 09:12:09 +08:00
Eloy Lafuente (stronk7) 110e818da7 Merge branch 'MDL-61625_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2018-03-14 00:59:29 +01:00
David Mudrák 5d06da4e41 MDL-60101 auth_oauth2: Don't allow suspended users to SSO in via OAuth2
Without this patch, users could still log in as a suspended account via
OAuth2 SSO feature.
2018-03-13 10:13:00 +01:00
Jake Dallimore 78ebc5d9e7 Merge branch 'm33_MDL-61626_PgSQL_Table_Name_Could_Be_Schema_Qualified' of https://github.com/scara/moodle into MOODLE_33_STABLE 2018-03-13 15:38:15 +08:00
Andrew Nicols d8952802e7 Merge branch 'MDL-59070-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-03-13 13:55:25 +08:00
Andrew Nicols 7a49ac3d79 Merge branch 'MDL-61397-33' of git://github.com/zig-moodle/moodle into MOODLE_33_STABLE 2018-03-13 12:59:47 +08:00
Andrew Nicols 1983c83957 Merge branch 'MDL-61567-33' of git://github.com/zig-moodle/moodle into MOODLE_33_STABLE 2018-03-13 12:21:36 +08:00
Eloy Lafuente (stronk7) 1b1b6313c0 Merge branch 'MDL-61307-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-13 03:27:53 +01:00
Zig Tan d2bc47577b MDL-61397 blocks: Fix null_provider namespace for blocks
Also added null provider for block_messages
2018-03-13 10:07:44 +08:00
Andrew Nicols 674a9c859d MDL-61307 core: Language changes 2018-03-13 09:42:23 +08:00
Andrew Nicols 56335cc001 MDL-61307 privacy: Rename deletion functions 2018-03-13 08:52:26 +08:00
Andrew Nicols 2e86cca9ca MDL-61307 core: Remove deletion_criteria 2018-03-13 08:50:27 +08:00
Eloy Lafuente (stronk7) 0913f3314f Merge branch 'MDL-48501-mdl33' of git://github.com/jswebster/moodle into MOODLE_33_STABLE 2018-03-12 23:51:06 +01:00
Matteo Scaramuccia cf7979c622 MDL-61626 core_dml: pgsql and schema qualification. 2018-03-12 22:52:37 +01:00
Eloy Lafuente (stronk7) cda6d082de Merge branch 'wip-MDL-60241-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2018-03-12 18:29:00 +01:00
Eloy Lafuente (stronk7) eb12fec156 Merge branch 'MDL-61397-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-12 17:31:35 +01:00
Eloy Lafuente (stronk7) d2c04300f3 Merge branch 'MDL-61622-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2018-03-12 11:37:16 +01:00
David Monllao ceb21de5e3 MDL-61625 persistent form: Add missing param to the constructor 2018-03-12 08:10:40 +01:00
Andrew Nicols 6aef716ec4 MDL-61566 theme: Add Privacy providers for all core themes 2018-03-12 13:28:08 +08:00
Andrew Nicols fc16e61230 MDL-61571 atto: Implement null provider for atto plugins 2018-03-12 13:22:58 +08:00
Andrew Nicols 0534fbc2aa Merge branch 'MDL-61513-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-03-12 12:26:48 +08:00
Andrew Nicols 5b9f872429 Merge branch 'MDL-61498-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-03-12 12:08:07 +08:00
Andrew Nicols dd67898152 Merge branch 'MDL-61261-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2018-03-12 11:52:31 +08:00
Zig Tan 2377dbd9d8 MDL-61567 mod_url: Implement null provider mod_url 2018-03-12 11:24:21 +08:00
Zig Tan 3810c3ad36 MDL-61567 mod_resource: Implement null provider mod_resource 2018-03-12 11:23:56 +08:00
Zig Tan ef9c44ad7e MDL-61567 mod_page: Implement null provider mod_page 2018-03-12 11:23:26 +08:00
Zig Tan 3eac779614 MDL-61567 mod_label: Implement null provider mod_label 2018-03-12 11:20:33 +08:00
Zig Tan 5223ceed6b MDL-61567 mod_folder: Implement null provider mod_folder 2018-03-12 11:19:57 +08:00
Zig Tan f27cf98517 MDL-61397 blocks: Add null_providers for blocks with no user data 2018-03-12 08:46:33 +08:00
Juan Leyva 7fe0a3b051 MDL-61622 auth: New WS is_age_digital_consent_verification_enabled 2018-03-09 18:13:59 +01:00
Jake Dallimore f03765aae7 Merge branch 'MDL-61307-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-03-09 13:37:40 +08:00
Andrew Nicols 9fa3922c77 MDL-61307 core_plagiarism: Add implementation of Privacy API 2018-03-09 12:24:39 +08:00
Andrew Nicols 4a9c1685bd MDL-61307 core_privacy: Add legacy polyfill for contrib plugins
This legacy polyfill allows plugin developers who release a single
branch to work with multiple versions of Moodle to support the API in
both Moodle 3.3 with PHP 5.6, and later versions.
2018-03-09 12:24:39 +08:00
Andrew Nicols fbb3918ebe MDL-61307 core_privacy: Implementation of itself 2018-03-09 12:24:39 +08:00
Adrian Greeve d17dc20947 MDL-61307 core_comment: Add implementation of privacy API 2018-03-09 12:24:39 +08:00
Andrew Nicols a63717d365 MDL-61307 core_rating: Add implementation of Privacy API 2018-03-09 12:24:38 +08:00
Zig Tan 0867abed26 MDL-61307 core_tag: Unit tests for privacy implementation 2018-03-09 12:24:38 +08:00
Andrew Nicols be94915636 MDL-61307 core_tag: Add implementation of privacy API 2018-03-09 12:24:38 +08:00
Jake Dallimore 5de4b14160 MDL-61307 core_privacy: Add the privacy manager 2018-03-09 12:24:38 +08:00
Marina Glancy 3e316b8713 MDL-60241 course: General section always visible (topics, weeks) 2018-03-09 12:11:31 +08:00
Andrew Nicols 267e1af112 MDL-61307 core_privacy: Define and test providers 2018-03-09 10:03:29 +08:00
Andrew Nicols 37db3b8561 MDL-61307 core: Add component_class_callback functionality 2018-03-09 10:03:29 +08:00
Andrew Nicols 5a146aa633 MDL-61307 core: Define a new privacy component 2018-03-09 10:03:28 +08:00
Jeff Webster 934220228a MDL-48501 auth/email: update external class to use reCAPTCHA v2 2018-03-08 14:22:39 -05:00
Jeff Webster 3c9a5ae1cc MDL-48501 mod_feedback: update feedback to use reCAPTCHA v2 2018-03-08 14:22:39 -05:00
Jeff Webster 8d7d722fb0 MDL-48501 login: update signup_form to use reCAPTCHA v2 2018-03-08 14:22:39 -05:00
Jeff Webster 2f0be313b3 MDL-48501 form/recaptcha: update to use reCAPTCHA v2 2018-03-08 14:22:39 -05:00
Jeff Webster 68e6299010 MDL-48501 recaptchalib_v2: add new lib to support reCAPTCHA v2 2018-03-08 14:22:39 -05:00
Jeff Webster e3a18e4458 MDL-48501 lang: update reCAPTCHA language strings 2018-03-08 14:22:39 -05:00
Luca Bösch 21d27e3f96 MDL-59070 enrol_database: Take enablecompletion from template 2018-03-08 17:22:52 +01:00
Luca Bösch a74a3f8ab8 MDL-61498 lesson: link to next activity in boost 2018-03-08 17:22:26 +01:00
Eloy Lafuente (stronk7) e95f91c90a weekly release 3.3.4+ 2018-03-08 13:29:10 +01:00
Eloy Lafuente (stronk7) 7a793db488 NOBUG: Fixed SVG browser compatibility 2018-03-08 13:29:09 +01:00
Eloy Lafuente (stronk7) 645b80ea72 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2018-03-08 13:29:08 +01:00
Andrew Nicols 5c07c79657 Merge branch 'MDL-61423-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2018-03-08 15:30:36 +08:00
Mihail Geshoski 5cb155ad9d MDL-61423 authentication: Add digital minor verification upon signup 2018-03-08 15:03:05 +08:00
Eloy Lafuente (stronk7) a8b5704fb4 Merge branch 'MDL-60445-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-03-07 19:20:21 +01:00
Jesse Ritchey 707d3a3aa3 MDL-60445 theme_boost: remove fieldset tag 2018-03-07 11:09:04 +01:00
Andrew Nicols 9f11f13ad8 Merge branch 'WIP-MDL-60658-33' of https://github.com/chkhanu/moodle into MOODLE_33_STABLE 2018-03-07 11:37:45 +08:00
Andrew Nicols b091c290bb Merge branch 'wip-MDL-61322-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2018-03-07 10:58:24 +08:00
Andrew Nicols c101a623d8 Merge branch 'MDL-61497-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-03-07 10:28:49 +08:00
AMOS bot 5815d6f01c Automatically generated installer lang files 2018-03-07 00:06:38 +00:00
Eloy Lafuente (stronk7) 2e17137c8b Merge branch 'MDL-36157-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-03-06 02:52:41 +01:00
Luca Bösch 28b6ae97e9 MDL-36157 block_rss_client: Don't double escape titles. 2018-03-06 00:20:33 +01:00
Luca Bösch d527a497ea MDL-36157 block_rss_client: Don't double escape titles. 2018-03-06 00:20:32 +01:00
Eloy Lafuente (stronk7) 64488fd069 Merge branch 'MDL-61211-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2018-03-05 23:33:44 +01:00
Eloy Lafuente (stronk7) 76148061d7 Merge branch 'MDL-55153-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2018-03-05 23:26:12 +01:00
Andrew Nicols 9214166d89 MDL-61268 core: Fix empty string DB cehck
(amended by stronk7 to use the helper better)
2018-03-02 16:32:36 +01:00
Andrew Nicols 253fcd9ce2 Merge branch 'wip-MDL-61268-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2018-03-02 10:03:58 +08:00
Adrian Greeve 218cbbed31 MDL-61268 blocks: Unit tests for deprecated object update.
Unit tests for testing that the upgrade functions to change
the now deprecated object to stdClass works.
2018-03-02 09:39:16 +08:00
Adrian Greeve b3dfb6eafa MDL-61268 blocks: Fix corrupt configdata in block instances.
Old configuration data in the block instances is base64 encoded with
the deprecated object class instead of stdClass.
2018-03-02 09:38:59 +08:00
Andrew Nicols 8fda9b0267 Merge branch 'MDL-61196_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2018-03-02 09:35:03 +08:00
Eloy Lafuente (stronk7) 5fafbd8a3c Merge branch 'MDL-61533-33-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2018-03-02 01:43:12 +01:00
Helen Foster 9a550cac49 MDL-61533 lang: Merge English strings from the en_fix language pack
Significant string change:

* typeoflogin_desc,tool_mobile - removing sentence about autologinguests
2018-03-01 15:35:05 +01:00
Luca Bösch ffd593db80 MDL-61497 repository_onedrive: Use post 2015 icon 2018-03-01 08:57:29 +01:00
Chernyavskiy Leonid 14618260c8 MDL-60658 course, gradebook: fix missing unformat_float for gradepass
Fix incorrect comparison of gradepass variable (with comma as decimal separator)
with grade variable when trying to save assignment settings.
Adds missing unformat_float($data['gradepass']).
2018-03-01 09:27:08 +07:00
Mihail Geshoski 7f1fcbda75 MDL-61211 lesson: Error when answer or response contains break tag 2018-03-01 09:52:22 +08:00
Andrew Nicols 5fc058c0b0 Merge branch 'MDL-61453-33-userpicturefiletype' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2018-03-01 08:46:44 +08:00
Eloy Lafuente (stronk7) 2faddcdef5 weekly release 3.3.4+ 2018-02-28 12:58:18 +01:00
Jake Dallimore a49458943c Merge branch 'wip-MDL-61485-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2018-02-27 09:40:40 +08:00
Jake Dallimore aaf815541b Merge branch 'MDL-61480-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-02-27 09:05:42 +08:00
David Mudrák eb618c1c71 MDL-61453 user: Fix accepted file type when uploading user pictures
Not all archives are supported, only ZIP files are.
2018-02-26 14:32:55 +01:00
Mihail Geshoski 4948a43536 MDL-60398 resource: Unable to download folder resource 2018-02-26 16:54:23 +08:00
Andrew Nicols b4a4b7ce70 Merge branch 'wip-MDL-61455-33' of https://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2018-02-26 14:12:04 +08:00
Andrew Nicols 4f21e3a33f MDL-61480 core: Check plugin installed before returning 2018-02-26 12:12:08 +08:00
Andrew Nicols d6e63cb602 Merge branch 'MDL-60547-33' of git://github.com/cescobedo/moodle into MOODLE_33_STABLE 2018-02-26 10:27:56 +08:00
Andrew Nicols 504e36da8e Merge branch 'MDL-61462-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-26 10:19:00 +08:00
Jake Dallimore 9c796e028d weekly release 3.3.4+ 2018-02-23 11:51:32 +08:00
Jake Dallimore 3a7f56c779 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2018-02-23 11:51:31 +08:00
Carlos c4f22db315 MDL-60547 message_popup: adding preventDefault at notification popover 2018-02-22 10:53:51 +01:00
Jun Pataleta f926f376f8 MDL-61513 admin: Fix undefined $buttons variable 2018-02-22 10:22:38 +08:00
Eloy Lafuente (stronk7) 6972f8403f Merge branch 'MDL-61324_lti_sync_33' of git://github.com/davosmith/moodle into MOODLE_33_STABLE 2018-02-22 08:31:59 +08:00
Dan Marsden 457fcfe3d0 MDL-61005 core_cohort: Allow teachers to view site-wide cohorts 2018-02-22 08:31:59 +08:00
Luca Bösch bf085b7fc5 MDL-58845 mod_choice: Fix behat related tests 2018-02-22 08:31:58 +08:00
Andrew Nicols 2eb83b7678 Merge branch 'MDL-61421-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2018-02-22 08:31:57 +08:00
Andrew Nicols a3e647dc98 Merge branch 'MDL-61408-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-02-22 08:31:57 +08:00
Sara Arjona a5bac67326 MDL-55153 customlang: Remove local DB entries when deleting local file 2018-02-21 21:04:57 +01:00
Damyon Wiese 3117287072 MDL-61455 autocomplete: Return promise
Partial backport of MDL-59368
2018-02-21 09:40:07 +08:00
Mihail Geshoski f6121c0bd6 MDL-61485 authentication: Add callback 'pre_signup_requests' 2018-02-20 10:00:02 +08:00
Eloy Lafuente (stronk7) fd1ef60779 Merge branch 'MDL-58845-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-02-19 02:13:07 +01:00
Andrew Nicols ff1f239381 Merge branch 'MDL-61289-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-19 09:08:00 +08:00
Jun Pataleta 6c855610bf MDL-61289 mod_choice: Add extra user fields to response data 2018-02-19 08:54:39 +08:00
AMOS bot 8b1eb7742e Automatically generated installer lang files 2018-02-19 00:06:34 +00:00
AMOS bot 08e1bbd86b Automatically generated installer lang files 2018-02-17 00:06:37 +00:00
Luca Bösch b899bab0bc MDL-61408 qbehaviour: Correct "Check" button styling. 2018-02-16 08:43:45 +01:00
Luca Bösch 48352701a1 MDL-58845 mod_choice: In reports, respect "Show column for unanswered" 2018-02-16 08:43:42 +01:00
Jun Pataleta f23541f3fb MDL-61462 admin_roles: Point back to roles link to the correct URL 2018-02-16 10:33:25 +08:00
Damyon Wiese ab83a52583 MDL-61455 boost: Don't allow z-index on pagination MDL-59809
This causes parts of the pagination bar to show through overlays and modals.
2018-02-16 10:08:12 +08:00
Eloy Lafuente (stronk7) 2e8f163f64 weekly release 3.3.4+ 2018-02-15 17:10:27 +01:00
Andrew Nicols 41275ea779 Merge branch 'wip-33-MDL-61344' of https://github.com/ndunand/moodle into MOODLE_33_STABLE 2018-02-13 09:04:45 +08:00
Andrew Nicols e129c4733b Merge branch 'MDL-61150_33' of git://github.com/stronk7/moodle into MOODLE_33_STABLE 2018-02-13 09:02:53 +08:00
David Monllao 8904b10b44 Merge branch 'MDL-61236-33' of git://github.com/farhan6318/moodle into MOODLE_33_STABLE 2018-02-12 12:14:28 +01:00
Nicolas Dunand 5e092e2540 MDL-61344 mod_assign: Show additional files when adding submission 2018-02-12 11:13:55 +01:00
David Monllao 235d4be426 Merge branch 'MDL-61153-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2018-02-12 10:56:14 +01:00
David Monllao 0ce2cf80ee Merge branch 'MDL-61375_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2018-02-12 09:41:04 +01:00
Nick Phillips 7d5efd643c MDL-56688 grade: fix ordering of grade items in grade_seq::flatten 2018-02-12 09:35:16 +01:00
Davo Smith 8566cace36 MDL-61324 enrol_lti: fix detection of changed grades during sync 2018-02-12 08:26:59 +00:00
David Monllao f71d4d4a97 Merge branch 'mod-lti-fix-test-with-hardcoded-url-mdl33' of https://github.com/peikk0/moodle into MOODLE_33_STABLE 2018-02-12 09:21:04 +01:00
David Monllao ccd495d806 Merge branch 'MDL-61425-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2018-02-12 09:13:20 +01:00
Sara Arjona 5613a37ab2 MDL-61421 cohort: Fix cohort_role_sync when a user is in two cohorts 2018-02-12 09:10:14 +01:00
Andrew Nicols 8e2eb1f335 Merge branch 'MDL-61366_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2018-02-12 15:26:39 +08:00
Shamim Rezaie 89660817f7 MDL-61425 theme_boost: Made question labels width full in question bank 2018-02-12 14:54:32 +11:00
Andrew Nicols ea61136232 Merge branch 'MDL-61305-33-fix' of https://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-02-12 11:32:10 +08:00
Andrew Nicols 9a36044425 MDL-61305 modinfo: Add back missing require for course 2018-02-12 10:40:17 +08:00
Andrew Nicols 6dc3fc7508 Merge branch 'MDL-61305-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2018-02-12 09:09:08 +08:00
Pierre Guinoiseau 8ba2f949d0 MDL-61379 mod_lti: fix a test comparing a hardcoded URL from fixtures
The hardcoded URL from tests/fixtures/ims_cartridge_basic_lti_link.xml
didn't match if TEST_EXTERNAL_FILES_HTTPS_URL was defined, the test
needs to compare with the exact same URL instead of a generated one.
2018-02-12 13:46:48 +13:00
Andrew Nicols e53bde7de2 Merge branch 'MDL-61413_33' of git://github.com/stronk7/moodle into MOODLE_33_STABLE 2018-02-12 08:09:09 +08:00
Marina Glancy aee5a8666a MDL-61150 xmldb: correct path to schema in install.xml 2018-02-11 23:09:03 +01:00
Eloy Lafuente (stronk7) a163049a64 MDL-61150 xmldb: Fix wrong PATH attributes in core 2018-02-11 23:09:03 +01:00
Farhan Karmali 055010a34a MDL-61236 enrol: Course welcome message to be sent from correct contact 2018-02-11 20:49:31 +05:30
Eloy Lafuente (stronk7) abe4724b32 MDL-61413 mod_lti: Use sql_compare_text() for comparing TEXTs 2018-02-11 02:18:58 +01:00
Mark Nelson 163a9d21e5 MDL-61196 message_popup: clean params before returning via WS 2018-02-09 17:37:04 +08:00
Mark Nelson 234d16cfcb MDL-61375 mod_chat: specify the 'eventtype' to avoid duplicate rows 2018-02-09 14:47:17 +08:00
sam marshall e598dc49a7 MDL-61305 Performance: Modinfo cache can get built in parallel
In a busy site it is possible that one user will access the site
while another is building modinfo cache. This can result in the
cache being built several times at once, potentially causing a
performance issue.
2018-02-08 14:50:48 +00:00
David Monllao 1702e66574 weekly release 3.3.4+ 2018-02-08 09:29:12 +01:00
Andrew Nicols 9d8c7eaaa8 Merge branch 'MDL-61377-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2018-02-07 12:53:02 +08:00
Shamim Rezaie a77941b809 MDL-61377 Core: Fixed faulty warning when using progress_bar 2018-02-07 14:48:39 +11:00
Eloy Lafuente (stronk7) 7fe0d459d6 MDL-52832 quiz: sql fixing couple of incorrect group by uses 2018-02-07 07:09:37 +08:00
Tim Hunt bfe824dd3d MDL-61366 setuplib: safely construct the ajax renderer when needed 2018-02-06 12:12:58 +00:00
David Monllao ad0f68802a Merge branch 'MDL-52832-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-02-06 12:20:19 +01:00
Dan Marsden e3db31ac67 MDL-60421 tool_cohortroles: fix deprecated call. 2018-02-06 10:51:52 +01:00
Eloy Lafuente (stronk7) 00ab44ee52 Merge branch 'MDL-61168-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-05 20:40:36 +01:00
Eloy Lafuente (stronk7) bb89fdcf22 Merge branch 'MDL-61341-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-02-05 20:08:30 +01:00
David Monllao b813a2778b Merge branch 'MDL-61027-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2018-02-05 11:56:36 +01:00
David Monllao 7e9362481d Merge branch 'MDL-61251-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-02-05 11:50:54 +01:00
David Monllao 407a8d675e Merge branch 'MDL-42764_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2018-02-05 11:18:54 +01:00
Andrew Nicols 38055cdb22 Merge branch 'MDL-61269_33' of git://github.com/stronk7/moodle into MOODLE_33_STABLE 2018-02-05 17:53:30 +08:00
Andrew Nicols b3c71b12c7 Merge branch 'MDL-51189-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2018-02-05 15:58:30 +08:00
Eloy Lafuente (stronk7) 5ac4c7f2ba MDL-61269 composer: better license GPL-3.0-or-later
Source: https://spdx.org/licenses/
2018-02-04 19:40:33 +01:00
Sara Arjona 0c8d6093dc MDL-61261 badges: Add email validation during backpack configuration 2018-02-02 11:35:36 +01:00
Andrew Nicols 0ab8ddc56b MDL-61341 theme_boost: Fix usertour zindex calculations 2018-02-02 11:36:46 +08:00
Jun Pataleta 2cda43b3bd MDL-61168 mod_assign: Truncate only the online text submission 2018-02-02 09:21:41 +08:00
Luca Bösch efc06d64e7 MDL-52832 quiz: timeclose in activities block looks after overrides. 2018-02-02 00:00:04 +01:00
Luca Bösch a71eb555c2 MDL-61251 admin: configenablerssfeedsdisabled2 string more correct. 2018-02-01 22:57:20 +01:00
David Monllao 7517f9ea50 weekly release 3.3.4+ 2018-02-01 14:26:40 +01:00
David Monllao 73f8281a01 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2018-02-01 14:26:39 +01:00
Jake Dallimore 158586680d Merge branch 'MDL-60077-33-fix' of https://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-02-01 14:56:28 +08:00
Andrew Nicols c81ead0adb MDL-60077 tool_usertours: Pull v0.12.2 of usertours for triangle fix 2018-02-01 14:29:06 +08:00
David Mudrák 1ac64fbe83 MDL-61242 repository_equella: Fix missing class repository
The call to the class 'repository' introduced in the commit d05c2ac7cc
didn't fully work and threw: "Exception - Class 'repository' not found".
This fixes the missing library inclusion.
2018-02-01 10:34:39 +08:00
Eloy Lafuente (stronk7) 3111b937ef Merge branch 'MDL-61058-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-01 10:34:38 +08:00
Eloy Lafuente (stronk7) 58c586c3c4 Merge branch 'MDL-61023-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-01 10:34:38 +08:00
Andrew Nicols 9b2b1b5b12 Merge branch 'MDL-61313_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2018-02-01 10:34:38 +08:00
Eloy Lafuente (stronk7) e9925ef601 Merge branch 'MDL-44612-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-01 10:34:37 +08:00
David Monllao d8aba73bb4 Merge branch 'MDL-60646-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-01 10:34:37 +08:00
David Monllao 4174bcc99c Merge branch 'MDL-60997-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-02-01 10:34:37 +08:00
David Monllao f89874634c Merge branch 'MDL-61260_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2018-02-01 10:34:36 +08:00
Jake Dallimore 66a13f93e4 Merge branch 'MDL-61253-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-02-01 10:34:36 +08:00
Andrew Nicols 859e9b3394 Merge branch 'MDL-60077-33' of https://github.com/HuongNV13/moodle into MOODLE_33_STABLE 2018-02-01 10:34:36 +08:00
Andrew Nicols 9aae08cc38 Merge branch 'MDL-61250-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2018-02-01 10:34:36 +08:00
Adrian Greeve 5608acd0d7 MDL-61322 reports: Reformated the display date to include the year. 2018-02-01 08:30:07 +08:00
AMOS bot 0b13c999e2 Automatically generated installer lang files 2018-02-01 00:06:56 +00:00
AMOS bot fa62cb4137 Automatically generated installer lang files 2018-01-31 00:06:44 +00:00
David Monllao db75ead6fe MDL-61313 behat: Move future events further 2018-01-30 18:17:33 +01:00
AMOS bot 5ae345bdeb Automatically generated installer lang files 2018-01-30 00:06:46 +00:00
Mark Nelson ac8bf02214 MDL-42764 core: added missing string definition
Also changed the string index so it was not
vague. The index 'emailempty' appears as if it
could belong to a validation method for a form.
2018-01-29 19:08:32 +08:00
Huong Nguyen a1a04839eb MDL-60077 User tours: pop-up triangle look bad next to the corners 2018-01-29 10:34:58 +07:00
Mark Nelson d8c58a53d3 MDL-61260 auth_ldap: require /user/profile/lib.php file 2018-01-29 11:31:36 +08:00
Eloy Lafuente (stronk7) 17384a4a8e Merge branch 'wip-MDL-61242-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2018-01-29 01:41:23 +01:00
Luca Bösch 0a8e683595 MDL-61250 questions: Omit leading space in question preview link 2018-01-25 14:25:53 +01:00
Jun Pataleta 63da6656b9 MDL-60997 core_message: Add replytoname in unit test 2018-01-25 16:48:13 +08:00
Arnaud Trouvé 53556cf240 MDL-60997 messages: add property replytoname 2018-01-25 16:48:12 +08:00
Andrew Nicols a11dae7625 weekly release 3.3.4+ 2018-01-25 15:14:33 +08:00
Andrew Nicols 274d3ca6d5 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2018-01-25 15:14:29 +08:00
Jake Dallimore 492ddb2bf8 Merge branch 'MDL-60078-33-fix' of https://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-25 14:49:00 +08:00
Andrew Nicols 5bb4d629fc MDL-60078 tool_usertours: Adjust accessibility checks for all themes 2018-01-25 12:50:33 +08:00
Eloy Lafuente (stronk7) 9cb82a1530 MDL-61269 behat-extension: bump to fix some caps & defaults 2018-01-25 00:32:28 +01:00
Jun Pataleta a5e434b97e MDL-44612 mod_glossary: Test importing of glossary entries
* And check that the importing of entries is reflected in the recent
activity block.
2018-01-24 16:39:24 +08:00
Jun Pataleta cf9910912f MDL-44612 mod_forum: Confirm forum post listing in recent activity block 2018-01-24 16:39:23 +08:00
Damyon Wiese b2961aa526 MDL-61058 behat: Automate MDLQA-8146
Verify that the keyholder is displayed on the self enrolment page.
2018-01-24 16:37:05 +08:00
Damyon Wiese 48a5afe796 MDL-61023 behat: Automate MDLQA-8158
Verify the general section does not appear in the navigation when it is empty.
2018-01-24 16:35:56 +08:00
Andrew Nicols 83539ba7aa MDL-61234 tool_usertours: Rewrite feature to work with all themes 2018-01-24 10:20:08 +08:00
Andrew Nicols 01484f2289 MDL-61253 repository: Add referenced files to archives 2018-01-23 11:52:13 +08:00
Shamim Rezaie a167de121b MDL-51189 Quiz: Edit overrides when quiz is not available to students
The $active variable should simply be used to dim the text, nothing more.
2018-01-23 10:53:40 +11:00
Eloy Lafuente (stronk7) f058e911cd Merge branch 'MDL-60918-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2018-01-22 20:17:43 +01:00
Eloy Lafuente (stronk7) 06cded2b76 Merge branch 'MDL-58006-33' of git://github.com/zig-moodle/moodle into MOODLE_33_STABLE 2018-01-22 20:00:20 +01:00
Eloy Lafuente (stronk7) df5debbfc4 Merge branch 'MDL-60181-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2018-01-22 12:51:38 +01:00
Shamim Rezaie 1c1c751560 MDL-61027 calendar: Fix datetime profile field issue with non-Gregorian 2018-01-22 19:06:08 +11:00
Mihail Geshoski e6645efea6 MDL-60181 glossary: Glossary rating is displayed wrongly 2018-01-22 13:59:52 +08:00
Zig Tan eedd1437c8 MDL-58006 assign: Reset blindmarking assignments to hidden
Fix to reset blindmarking assigments to hidden as part of Course reset with behat test
2018-01-22 11:37:21 +08:00
Andrew Nicols b1c1aa89ed Merge branch 'MDL-60078-33' of https://github.com/nashtechdev01/moodle into MOODLE_33_STABLE 2018-01-22 11:31:15 +08:00
Eloy Lafuente (stronk7) 8ede8c859e Merge branch 'MDL-61077_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2018-01-22 02:26:19 +01:00
Eloy Lafuente (stronk7) e288c6314f Merge branch 'MDL-61234-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-22 02:04:08 +01:00
Eloy Lafuente (stronk7) 4865f138c7 Merge branch 'wip-MDL-61175-MOODLE_33_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_33_STABLE 2018-01-22 01:25:04 +01:00
Eloy Lafuente (stronk7) 9db5265f18 Merge branch 'MDL-61224_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2018-01-22 01:23:26 +01:00
Adrian Greeve 5b7ee7d6b3 MDL-61242 repository_equella: Add source key when sending the source.
A thank you to Nelson Cheng for find this issue and suggesting a patch.
2018-01-20 11:02:04 +08:00
Andrew Nicols e1a489362c MDL-61234 tool_usertours: Wrap library calls in pendingjs 2018-01-19 15:55:12 +08:00
AMOS bot 2da5023cd2 Automatically generated installer lang files 2018-01-19 00:07:12 +00:00
Kevin Wiliarty b025f80743 MDL-61175 mod_assign: roll grade-by reminder on restore 2018-01-18 08:42:02 -05:00
Jun Pataleta b65a529086 MDL-60646 user_portfolio: Fix action icons in Show / hide column
* Refactor the code to make it look cleaner and easier to read.
* Fixed incorrect alt-text for the configure icon.
* Fixed missing alt-text for show/hide icon.
2018-01-18 15:27:03 +08:00
Andrew Nicols 68673fb78d weekly release 3.3.4+ 2018-01-18 12:47:57 +08:00
Andrew Nicols 0de71f9432 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2018-01-18 12:47:54 +08:00
AMOS bot 82815a491e Automatically generated installer lang files 2018-01-17 00:06:38 +00:00
Jun Pataleta 5abcd64852 Merge branch 'MDL-61221-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-16 23:01:29 +08:00
KietLy da908a84c3 MDL-60078 User tours accessibility: Tab should go back into the pop-up 2018-01-16 17:36:57 +07:00
Mark Nelson fde9d39538 MDL-61224 core_role: prevent short name from exceeding 100 chars 2018-01-16 18:18:04 +08:00
David Monllao 97cf15c9ad Merge branch 'MDL-61010-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-16 09:25:49 +01:00
Adam Olley 6837f2f698 MDL-60918 core_message: update preferences of user behat test 2018-01-16 05:27:10 +00:00
Ryan Wyllie 83b01d7505 MDL-60918 message: use current user in message preference update 2018-01-16 05:27:10 +00:00
Andrew Nicols e9c315ff85 MDL-61221 badges: Ignore site availabilty for behat
Behat sites should not be available publically, and the check against
the backpack API for site availablity can time out in some situations.

We should be testing as though the site _is_ available, as this is the
standard expectation.
2018-01-16 13:23:28 +08:00
David Knuplesch fb4da0de30 MDL-60549 lti: support for moving embedded lti into separate tab 2018-01-16 10:12:24 +08:00
Eloy Lafuente (stronk7) 3cf3e20b77 Merge branch 'MDL-61204-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-16 02:17:08 +01:00
Andrew Nicols 2d6a9a6ef3 MDL-61204 user: Fix random failure in behat
We need to get into the habit of not using usernames like 'student1'
and 'student10' as our matches are non-strict, and the tests become
dependent upon DB sort order.

This change adds a character after the varying value to act as a
delimter for all of these tests.
2018-01-16 08:16:11 +08:00
Andrew Nicols 2a208a32cb MDL-61010 mod_forum: Add unread link to blog view 2018-01-16 08:07:43 +08:00
AMOS bot ba6233ae2c Automatically generated installer lang files 2018-01-16 00:06:49 +00:00
Eloy Lafuente (stronk7) ad2ed52966 Merge branch 'MDL-61081-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2018-01-16 00:28:01 +01:00
Eloy Lafuente (stronk7) 84bc03313b Merge branch 'MDL-37390-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2018-01-16 00:25:41 +01:00
Eloy Lafuente (stronk7) 043279b4d9 Merge branch 'MDL-61162-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2018-01-15 22:58:12 +01:00
Tim Hunt 4a108f79a8 MDL-61077 question stats: make calculations more robust 2018-01-15 16:08:35 +00:00
David Monllao 0c496132cf Merge branch 'MDL-60776-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2018-01-15 10:58:58 +01:00
Eloy Lafuente (stronk7) d251a46588 Merge branch 'MDL-61166-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2018-01-15 10:57:57 +01:00
David Monllao 20c6e3628c Merge branch 'MDL-55382-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2018-01-15 10:09:56 +01:00
Shamim Rezaie 6df9abc397 MDL-61166 Groups: Fixed a typo in PHPDoc 2018-01-14 09:23:00 +11:00
Eloy Lafuente (stronk7) 330fa046d5 Moodle release 3.3.4 2018-01-12 20:35:41 +01:00
Farhan Karmali c16fd22bbc MDL-37390 course: Set startdate properly for approved course
Once a course is approved the startdate is not set properly
This patch sets current midnight date as startdate and leave
enddate to 0
2018-01-12 10:03:43 +01:00
Farhan Karmali b8cf9f06dc MDL-61081 enrol: Start date for courses created by external db
Course created by external db enrolment plugin should have start date as current midnight date
2018-01-12 09:59:28 +01:00
do-you-even-curl 879c847aed MDL-60776 enrol: Fix header for custom fullnamedisplay formats
In case you used a custom fullnamedisplay format that involved anything but spaces (e.g. commas) as delimiters the username header
would be displayed incorrectly and you wouldn't be able to click on the "Firstname" or "Surname" headers to sort according to them.
2018-01-12 09:52:01 +01:00
Eloy Lafuente (stronk7) 7c9b7feb10 weekly release 3.3.3+ 2018-01-12 02:12:39 +01:00
Jake Dallimore 272467514a Merge branch 'MDL-61177-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-11 09:23:42 +08:00
Cameron Ball bbcf850b68 MDL-61143 core_files: Don't append dot when checking domain names or IP addresses.
Previously we appended a dot at the end of IP addresses and domain names in the
cURL security helper, but it causes issues with Google OAuth so this patch removes it.
2018-01-10 15:23:50 +08:00
Andrew Nicols 7bdde1a0ee MDL-61177 badges: JS pending checks in connection test 2018-01-10 08:13:58 +08:00
Adrian Greeve 5912eca97e MDL-61131 repositories: Added a key to verify incoming urls. 2018-01-09 11:34:51 +01:00
Cameron Ball 5dfceb9f52 MDL-61143 core_files: Update unit tests for curl_security_helper
Previously some of the unit tests were passing "by accident" becuase
we had the security helper letting through domains where the DNS lookup
failed. That behaviour has changed and now such domains are blocked.

Additionally tests for domains with multiple A records and weird Unicode
stuff have been added.

This patch also mocks the DNS resolution in the test, rather than actually
resolving the domain.
2018-01-09 16:54:30 +08:00
Cameron Ball 28b96ce145 MDL-61143 core_files: Block hosts that cannot be determined to be an IP address of domain name
Freaky deaky Unicode/octal/hex domains can be resolved by cURL but are technically not valid.

This patch causes anything that Moodle does not consider to be a valid domain or IP to be blocked
by the cURL security helper.
2018-01-09 16:54:30 +08:00
Cameron Ball ef7dc1ae34 MDL-61143 core_files: Check all A records when testing blocked IPs 2018-01-09 16:54:30 +08:00
Simey Lameze 4f04ad2d19 MDL-60235 core_calendar: clean event name field 2018-01-09 16:54:30 +08:00
Juan Leyva 12b47586bb MDL-60908 mod_quiz: Return question state only when configured
The question state should be returned following the quiz review options
settings.
2018-01-09 16:54:30 +08:00
David Monllao 67240e4539 Merge branch 'wip-MDL-60742-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2018-01-09 09:53:03 +01:00
David Monllao a324b4981a Merge branch 'MDL-60079-33' of https://github.com/nashtechdev01/moodle into MOODLE_33_STABLE 2018-01-09 08:11:01 +01:00
Andrew Nicols 63401025a9 Merge branch 'wip-MDL-60415-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2018-01-09 14:31:25 +08:00
David Knuplesch e32a370df2 MDL-60415 mod_lti: avoid confusing error-message 2018-01-09 14:03:00 +08:00
Thinh Pham c0f75375fe MDL-60079 User tours: leave unnecessary aria tags in the page 2018-01-09 10:12:19 +07:00
Jun Pataleta 5dc4095720 Merge branch 'MDL-61068-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-09 09:51:41 +08:00
Andrew Nicols 50114457be MDL-61068 mod_forum: Fix neighbour test dates 2018-01-09 09:49:49 +08:00
Eloy Lafuente (stronk7) 7857d77a30 Merge branch 'MDL-60943-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2018-01-09 00:52:41 +01:00
Eloy Lafuente (stronk7) 6a8c7fd988 Merge branch 'MDL-61098-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2018-01-08 21:06:47 +01:00
Eloy Lafuente (stronk7) 1a7ded0892 Merge branch 'MDL-61068-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-08 19:56:42 +01:00
David Monllao 504bde6118 Merge branch 'MDL-61169-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-08 14:59:15 +01:00
Andrew Nicols a38462a3aa MDL-61169 iplookup: Change to github.com IP 2018-01-08 17:16:15 +08:00
Eloy Lafuente (stronk7) 1c6c7ac06d Merge branch 'MDL-61046-33-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2018-01-08 10:07:42 +01:00
Andrew Nicols c50907bdfd Merge branch 'MDL-57786-33' of git://github.com/zig-moodle/moodle into MOODLE_33_STABLE 2018-01-08 15:17:53 +08:00
Andrew Nicols 65be0f98d8 Merge branch 'MDL-43042-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2018-01-08 15:13:57 +08:00
Andrew Nicols fa13c8a8cb Merge branch 'MDL-53985-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2018-01-08 12:52:48 +08:00
Jun Pataleta 1b091c789c MDL-61162 mod_forum: Remove unnecessary forum creation step 2018-01-08 10:58:20 +08:00
Andrew Nicols ff0edf2d12 MDL-61068 mod_forum: Round timed posts to nearest 60 seconds
This slightly reduces the effectiveness of the DB query cache, but gives
us correct results every time.
2018-01-05 16:43:56 +08:00
Mihail Geshoski ac1af59d9b MDL-43042 lesson: Confusing feedback order in multiple answer questions 2018-01-05 15:25:54 +08:00
sam marshall d51a8d2e40 MDL-60943 core_search: Improve exception for preg_replace errors 2018-01-04 17:29:56 +00:00
Helen Foster a1e72fc747 MDL-61046 lang: Merge English strings from the en_fix language pack
Significant string changes:

* pluginname_desc, enrol_category - improved explanation
* configdeleteunconfirmed, core_admin - setting applies to more than
  just email-based self-registration
2018-01-04 12:09:15 +01:00
David Monllao 591fbbe972 weekly release 3.3.3+ 2018-01-04 11:02:39 +01:00
David Monllao 41e6821e5d Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2018-01-04 11:02:38 +01:00
Mihail Geshoski 15646264c4 MDL-61153 lesson: Inconsistent column sizing in detailed statistics 2018-01-04 15:49:51 +08:00
Marina Glancy 505de3307c MDL-60742 calendar: allow customisation of 12/24h time format strings 2018-01-04 15:15:58 +08:00
Jun Pataleta e326124d9e Merge branch 'MDL-40613-33-ldap' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2018-01-04 14:58:16 +08:00
Andrew Nicols e6f2e62275 MDL-40613 auth_ldap: Call update_user_record on create 2018-01-04 14:40:33 +08:00
Jun Pataleta c823d1c9aa Merge branch 'MDL-40613_33-fix' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2018-01-04 09:58:19 +08:00
AMOS bot d3b89d98f5 Automatically generated installer lang files 2018-01-04 00:07:13 +00:00
Mark Nelson 4c29192189 MDL-40613 auth_ldap: removed usage of profile_load_custom_fields() 2018-01-03 18:08:51 +08:00
AMOS bot 33947383f7 Automatically generated installer lang files 2018-01-03 00:06:35 +00:00
Eloy Lafuente (stronk7) c2155bef19 Merge branch 'MDL-23887-33-2' of https://github.com/snake/moodle into MOODLE_33_STABLE 2018-01-03 00:25:42 +01:00
David Monllao 0829f91214 Merge branch 'MDL-57727-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2018-01-02 12:34:05 +01:00
Jake Dallimore 7ec58e84b0 MDL-23887 database: fix use of deprecated system tables for mssql
Catalog views are available which we should use instead.
2018-01-02 17:21:47 +08:00
Jun Pataleta ae02647dec Merge branch 'MDL-40613_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2018-01-02 16:51:10 +08:00
David Monllao cb04f502d5 Merge branch 'MDL-61107_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2018-01-02 08:34:55 +01:00
Zig Tan 13c3219692 MDL-57786 mod_assign: Fix word count for online text submissions 2018-01-02 14:06:01 +08:00
David Monllao 557b880f0b weekly release 3.3.3+ 2017-12-28 12:35:15 +01:00
David Monllao 803a9fdc96 MDL-51089 mod_quiz: Hide first page last node 2017-12-28 11:47:06 +01:00
Eloy Lafuente (stronk7) 659b1ee304 Merge branch 'MDL-60363-33' of https://github.com/Kathrin84/moodle into MOODLE_33_STABLE 2017-12-27 17:57:06 +01:00
David Monllao 22a68d6fac Merge branch 'MDL-51089-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-27 17:57:05 +01:00
David Monllao 3eb97ca783 Merge branch 'MDL-58983-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-12-27 17:57:05 +01:00
David Monllao 2530725163 Merge branch 'MDL-33886-33' of git://github.com/zig-moodle/moodle into MOODLE_33_STABLE 2017-12-27 17:57:04 +01:00
David Monllao 9308160bce MDL-60439 block_tags: Removing extra var assign 2017-12-27 17:57:04 +01:00
David Monllao 2667898317 Merge branch 'MDL-60439-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-27 17:57:03 +01:00
David Monllao 9525aa62a5 Merge branch 'MDL-60942-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-12-27 17:57:03 +01:00
David Monllao a6cf5b5582 Merge branch 'MDL-60359-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-27 17:57:03 +01:00
Eloy Lafuente (stronk7) 02d16e76c3 Merge branch 'MDL-43827-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-12-26 00:25:48 +01:00
Tim Hunt 1926647e85 MDL-61107 quiz editing: handle invalid Maximum grade input 2017-12-22 13:36:01 +00:00
Kathrin Osswald f510295159 MDL-60363 conditional activities: Dim the icon also in student's view.
The class dimmed_text would only dim the activity's title and not the icon.
The teacher has both, icon and text, dimmed. So I added the class dimmed
to the class dimmed_text, what dims both elements for the students.
2017-12-22 13:13:00 +01:00
Luca Bösch fc86038b54 MDL-60439 blocks: Tags block title multilang 2017-12-22 09:24:16 +01:00
Luca Bösch e4fd0ad2e3 MDL-51089 quiz: "Add" menu in edit quiz more keyboard accessible 2017-12-22 09:22:55 +01:00
Luca Bösch 64b3116245 MDL-60359 theme_boost: have correct mc question check mark not overlap 2017-12-22 09:20:34 +01:00
Zig Tan 39dc526cd4 MDL-33886 backup: Add backup filename length < 255 char validation 2017-12-22 13:16:43 +08:00
Jun Pataleta f46f4ca56d weekly release 3.3.3+ 2017-12-22 14:42:01 +13:00
Jun Pataleta fd4f1fd78a Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-12-22 14:42:00 +13:00
Juan Leyva cde629d3c6 MDL-61098 repository: Retrieve correct context for repo instance
The repository instance was being retrieved without specifying a valid
context that is required in further API checks.
2017-12-21 11:35:18 +01:00
Mihail Geshoski c2ebe33f77 MDL-43827 filepicker: Multiple actions not accessible using keyboard 2017-12-21 14:10:08 +08:00
Eloy Lafuente (stronk7) e807adb913 Merge branch 'MDL-60567-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-12-19 11:29:54 +01:00
David Monllao af37de609e Merge branch 'MDL-60938-33-2' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-12-19 07:53:24 +01:00
Mark Nelson 01880d2a9e MDL-40613 auth_ldap: sync user profile fields 2017-12-19 14:17:10 +08:00
David Monllao adb29782e8 Merge branch 'MDL-61045_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-12-19 06:44:31 +01:00
Simey Lameze 2be626caaa MDL-57431 mod_quiz: remove unnecessary class from selector 2017-12-19 12:50:13 +08:00
Damyon Wiese 5ecd41650f Merge branch 'MDL-60767-33-3' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-12-19 11:26:34 +08:00
Damyon Wiese 7f4bc03789 Merge branch 'MDL-59999-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-12-19 10:53:07 +08:00
Jun Pataleta d77de7c873 Merge branch 'MDL-59709_33' of https://github.com/marcusfabriczy/moodle into MOODLE_33_STABLE 2017-12-19 13:28:44 +13:00
Eloy Lafuente (stronk7) 409a0ecf2a Merge branch 'MDL-59200-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-12-19 01:10:50 +01:00
Eloy Lafuente (stronk7) 9fcec4530d Merge branch 'MDL-58888-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-12-19 01:05:09 +01:00
Eloy Lafuente (stronk7) 2489235195 Merge branch 'wip-MDL-60594-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-12-19 00:46:16 +01:00
Jun Pataleta e16a56ccc5 Merge branch 'm33_MDL-60793_Mod_Chat_Reserved_Words_In_MySQL8p0p3_And_Above' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-12-19 12:11:41 +13:00
David Monllao 9e3b6c626c Merge branch 'MDL-60653-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2017-12-18 17:59:55 +01:00
David Monllao 00f88c287d Merge branch 'MDL-61042-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-12-18 17:27:01 +01:00
David Monllao 23d7a70ef3 Merge branch 'MDL-61040-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-12-18 17:25:18 +01:00
Eloy Lafuente (stronk7) 652948bd4b Merge branch 'wip-MDL-60161-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-12-18 16:12:05 +01:00
Matteo Scaramuccia 70a713c3d8 MDL-60793 mod_chat: Renamed 'system' into 'issystem'
'system' is now a reserved word in MySQL 8.0.3+.
2017-12-18 15:28:23 +01:00
David Monllao e4b5f17a93 Merge branch 'MDL-31521-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-18 13:14:39 +01:00
Eloy Lafuente (stronk7) 70611182ec Merge branch 'MDL-56932-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-12-18 12:16:57 +01:00
Damyon Wiese 660f2f2b70 MDL-61022 recyclebin: Verify groups are restored 2017-12-18 10:22:17 +01:00
David Monllao 847250b4d5 Merge branch 'wip-MDL-52100-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-12-18 10:08:28 +01:00
Andrew Nicols ccd3ab300d Merge branch 'MDL-42676-33' of git://github.com/zig-moodle/moodle into MOODLE_33_STABLE 2017-12-18 15:38:21 +08:00
Adrian Greeve 304b80c734 MDL-52100 filelib: Update to unit tests for maxbytes. 2017-12-18 13:18:16 +08:00
Adrian Greeve 74798df3e9 MDL-52100 filelib: Files that are oversized are checked with user.
Files that are oversized could have been uploaded by a user who
can ignore the file size limits. These files should not be deleted
in these situations.
2017-12-18 13:18:11 +08:00
Damyon Wiese 6503626135 Merge branch 'MDL-34389-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-18 13:00:31 +08:00
Damyon Wiese b62d6b901a Merge branch 'MDL-57431-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-12-18 12:54:26 +08:00
Damyon Wiese 511a150aa0 Merge branch 'MDL-54967-33' of git://github.com/zig-moodle/moodle into MOODLE_33_STABLE 2017-12-18 12:48:36 +08:00
Damyon Wiese 4fca4d4e87 Merge branch 'wip-MDL-49995-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-12-18 12:01:50 +08:00
Andrew Nicols 1c216b13e4 Merge branch 'MDL-57564-33-courseorder' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-12-18 11:25:10 +08:00
Jake Dallimore d7a7ef5c44 MDL-60767 admin: fix usage of admin_write_settings
Make sure we always checks for failed validation, before redirecting.
A positive return value does not signal that all settings were able
to be written, only that at least one was - errors still need to be
checked!
2017-12-18 09:27:38 +08:00
Mihail Geshoski c426a1e2f7 MDL-59999 lesson: Boost grade essays page not indicating grade status
AMOS BEGIN
    CPY [graded,assign],[graded,lesson]
    CPY [notgraded,assign],[notgraded,lesson]
AMOS END
2017-12-18 09:19:10 +08:00
AMOS bot 761e8a442f Automatically generated installer lang files 2017-12-18 00:06:29 +00:00
Tim Hunt e15be87a98 MDL-61045 quiz settings: add back missing disabledIf
This got broken in Moodle 2.1 by MDL-20636.
2017-12-15 13:15:19 +00:00
Damyon Wiese d716aa1587 MDL-55382 assign: Sort editpdf quick list 2017-12-15 14:58:00 +08:00
Jun Pataleta 9a2441ca48 MDL-61042 mod_lesson: Initialise pageid variable 2017-12-15 17:37:32 +13:00
Damyon Wiese 036b10b783 MDL-53985 assign: Do not remove annotations
When an assignment submission is reverted to a draft, the timemodified on
the submission should not be modified. Changing the timemodified causes the
editpdf code to assume the pdf is stale, and forces all annotations to be removed.
2017-12-15 11:52:37 +08:00
Jun Pataleta 2444915544 MDL-58888 mod_choice: Sort choice_get_my_response() results by optionid 2017-12-15 15:56:19 +13:00
Jun Pataleta a6870770c3 MDL-58888 mod_choice: Verify sorting when testing multiple selections
* Improve test_choice_get_my_response() to verify the sorting of the
  responses returned by choice_get_my_response().
* Fix correct usage of choice_get_my_response().
2017-12-15 15:56:18 +13:00
Zig Tan 6acae651b3 MDL-54967 backup: Fix IMS CC import URL decoding for XML format
HTML encoding special characters to avoid XML compatibility issues during
Course backup restoration and avoid double encoding.
2017-12-15 09:47:18 +08:00
Jun Pataleta 2d9efe5283 MDL-61040 mod_choice: Save my choice button needs some space 2017-12-15 13:07:23 +13:00
Jun Pataleta 068935011b MDL-60938 mod_choice: Fix rendering of users for choice results 2017-12-15 12:52:45 +13:00
Matteo Scaramuccia 4e00702953 MDL-60793 core_ddl: Added the new MySQL 8 reserved words 2017-12-14 23:04:11 +01:00
Luca Bösch 020fd88e2e MDL-31521 questions: Allow more than one unit with multiplier equal to 1 2017-12-14 22:33:44 +01:00
Eloy Lafuente (stronk7) fb20acf02d weekly release 3.3.3+ 2017-12-14 14:47:41 +01:00
Eloy Lafuente (stronk7) b2b940caae Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-12-14 14:47:40 +01:00
AMOS bot ab578c4b48 Automatically generated installer lang files 2017-12-14 00:06:21 +00:00
Simey Lameze b571d8b51f MDL-56932 theme_boost: fix quiz max mark input height 2017-12-13 11:49:03 +08:00
Adrian Greeve 2f81f23e3c MDL-60161 filelib: Unit test for duplicate curl headers. 2017-12-13 11:15:05 +08:00
Carson Tam d02e847c3f MDL-60161 class curl in filelib: Cleaned up doc block. 2017-12-13 11:15:00 +08:00
Carson Tam aab559c464 MDL-60161 class curl in filelib: Avoid duplicate params in http header 2017-12-13 11:14:55 +08:00
Jun Pataleta 457d29926f Merge branch 'MDL-58200-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-12-12 19:13:16 +13:00
Jun Pataleta 7660a50369 Merge branch 'MDL-59970-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-12-12 18:52:34 +13:00
Andrew Nicols 35b5315034 Merge branch 'M3.3-MDL-59866' of https://github.com/marcusboon/moodle into MOODLE_33_STABLE 2017-12-12 13:48:29 +08:00
Andrew Nicols 74cc4d6acb Merge branch 'wip-MDL-56864-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-12-12 13:40:28 +08:00
Marcus Boon 98bd6c5273 MDL-59866 session: Add retry for redis sessions
There is an edge case whereby redis will fail
to accept connections on the first try but
retrying the connection seems to make it work

Included in this commit:
* Retry functionality in the session init
2017-12-12 14:51:20 +10:00
Damyon Wiese aaa3a28e03 Merge branch 'MDL-44660-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-12 12:51:07 +08:00
Tyler Bannister 1ab916014f MDL-60653 Navigation: Fixed loose string comparison.
The previous comparison would sometimes evaluate to true when the
navigation key was not a string.
2017-12-12 12:35:07 +08:00
Damyon Wiese 6a02fd458f Merge branch 'MDL-58058-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-12-12 12:15:05 +08:00
Damyon Wiese 9f35372c0c Merge branch 'MDL-60945-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-12-12 11:36:00 +08:00
Damyon Wiese 042077dd47 Merge branch 'MDL-60965-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-12-12 11:16:00 +08:00
Damyon Wiese c31343bf78 Merge branch 'MDL-60969_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-12-12 11:08:15 +08:00
Damyon Wiese 3baef4ab41 Merge branch 'MDL-52538-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-12-12 10:40:54 +08:00
Damyon Wiese 25666e5ff5 Merge branch 'MDL-44667-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-12-12 10:26:30 +08:00
Damyon Wiese ba68a016de Merge branch 'MDL-60968-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-12-12 10:19:41 +08:00
Mathew May 53b2f1cf4a MDL-57431 mod_quiz: Quiz editing help icon fix 2017-12-12 09:57:37 +08:00
Matt Clarkson ec85b1eb56 MDL-60976 dml: Optimise replace_all_text()
Avoid updating fields that do not match the search string.
2017-12-12 09:57:23 +08:00
Mihail Geshoski e96e4d5a5b MDL-57727 reports: Activity completion report sorting problem 2017-12-12 09:56:00 +08:00
Jake Dallimore b01791c076 MDL-44667 database: fix incorrect usages of $DB->get_field
Some places were passing 5 params, meaning the strictness param was
lost. This fixes those usages.
2017-12-12 09:53:02 +08:00
Brendan Heywood f93839e2ca MDL-60968 auth: Allow more flexibility with mapping attributes 2017-12-12 09:38:10 +08:00
Damyon Wiese c45ca633b7 Merge branch 'MDL-60041-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-12-12 09:22:25 +08:00
Mihail Geshoski fe94c07971 MDL-52538 lesson: Grade info displayed while ongoing score disabled 2017-12-12 09:06:59 +08:00
Zig Tan 63d3298c0b MDL-42676 mod_assign: Display message fix when using grade override
Logic fix in mod_assign locallib.php to correctly set the submissionlockedstatus,
and added associated unit test in test_grade_submission_override()
2017-12-12 09:05:45 +08:00
Damyon Wiese 318697f600 Merge branch 'MDL-54021-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-12-12 08:59:46 +08:00
Damyon Wiese c00848dbf2 Merge branch 'MDL-40790-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE
Conflicts:
	theme/boost/scss/moodle/modules.scss
2017-12-11 16:57:21 +08:00
Damyon Wiese 5fd29e79dc Merge branch 'MDL-56197-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-12-11 16:48:19 +08:00
Neill Magill 8794e3392d MDL-60041 dml: MOODLELIB sql file must have Unix line endings
If the file does not have Unix line endings then the regular expression
in oci_native_moodle_database::attempt_oci_package_install() does
not split it correctly.

This leads to an invalid package being created in Oracle.

The .gitattribute file changes for oci_native_moodle_package.sql
force it to have Unix style line endings when the branch is checked
out and the file does not already exist.

The file has been modified so that the Unix style line endings are
applied even if the file already exists, for example when pulling in
this change to an existing branch.
2017-12-11 08:44:46 +00:00
Neill Magill 3cbea698c3 MDL-60945 Web services: Too many progress records retrieved
The core_completion_get_activities_completion_status was getting the
progress for all users on the course called, and then discarding all
the records but one.

This change ensures that only progress for the user we are interested in
is retrieved from the database.

This has a side benefit of removing a full table scan from the query
finding the users inside the get_progress_all() method.
2017-12-11 08:44:14 +00:00
Mihail Geshoski 384947bab2 MDL-56197 lesson: Multichoice answers not on same line as radio button 2017-12-11 15:54:29 +08:00
Andrew Nicols 5fea116586 Merge branch 'MDL-58272-33-2' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-12-11 15:02:44 +08:00
Marina Glancy 9ce791b51e MDL-60594 xmlrpc: wrapper for buggy xmlrpc_decode 2017-12-11 14:26:55 +08:00
Damyon Wiese 9fd5ed6217 Merge branch 'wip-MDL-45500-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-12-11 13:14:39 +08:00
Damyon Wiese 402d910a60 Merge branch 'MDL-54106-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-11 11:38:28 +08:00
Marcus Fabriczy 78c66df3e5 MDL-59709 mod_assign: Export to portfolio button not working
Changed the button to a text link
2017-12-10 13:49:16 +10:30
Luca Bösch 7391e4a459 MDL-44660 grade: Typos @package core_grade instead of core_grades 2017-12-08 14:21:23 +01:00
Luca Bösch d1e03e531d MDL-54106 task: Deleting unconfirmed users after $CFG->deleteunconfirmed 2017-12-08 14:12:42 +01:00
Simey Lameze 3eba4443a1 MDL-58058 competency: replace other sortorder usages 2017-12-08 16:01:22 +08:00
Frederic Massart a34f98e166 MDL-58058 competency: Allow unspecified sortorder for new competencies 2017-12-08 16:01:22 +08:00
Mihail Geshoski df6bdbcd46 MDL-40790 lesson: Lesson content button runs off the edge of the page 2017-12-08 09:58:55 +08:00
Mihail Geshoski c709d42c06 MDL-54021 blocks: Course completion block lang problem 2017-12-08 09:30:28 +08:00
Jake Dallimore c13b3ca26b MDL-58272 core_files: get converters from file extension not mimetype 2017-12-08 09:10:48 +08:00
AMOS bot 88ed1a48fd Automatically generated installer lang files 2017-12-08 00:10:02 +00:00
Jun Pataleta 1402bb28bc weekly release 3.3.3+ 2017-12-08 09:10:03 +13:00
Mark Nelson ec1aa43448 MDL-60969 auth_ldap: replace hardcoded strings in config settings 2017-12-07 14:04:19 +08:00
David Mudrák 3b70d720ec MDL-57564 enrol: Fix the course ordering on the dashboard
The list of courses displayed at the user's dashboard - course overview
block, had the sorting hard-coded to order by fullname. This did not
respect the site setting "navsortmycoursessort" and led to inconsistent
behaviour with "My courses" list in the navigation.
2017-12-06 23:48:10 +01:00
Andrew Nicols 10d22c10fc Merge branch 'MDL-59159_33' of git://github.com/stronk7/moodle into MOODLE_33_STABLE 2017-12-06 10:05:22 +08:00
Jun Pataleta a65c67a7b0 Merge branch 'MDL-32350-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-12-06 11:30:20 +13:00
Luca Bösch 2f7ef500a4 MDL-32350 admin: Sort users by country ASC and DESC 2017-12-05 07:24:26 +01:00
Jun Pataleta 157981c24b Merge branch 'wip-MDL-60926-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-12-05 19:03:22 +13:00
David Herney 5cb58b2db4 MDL-60443 dataformat lib: Change a wrong variable name
The variable $type really is $dataformat. I have changed it for
prevent the error and show a correct error message.
2017-12-05 13:53:08 +08:00
Jun Pataleta 608cce8d16 Merge branch 'wip-MDL-34161-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-12-05 17:59:40 +13:00
Andrew Nicols b74d94b85e Merge branch 'MDL-60801_33' of https://github.com/andrewhancox/moodle into MOODLE_33_STABLE 2017-12-05 12:54:32 +08:00
Andrew Nicols fdea53a86b Merge branch 'MDL-60899-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-12-05 11:55:33 +08:00
Andrew Nicols 4ff3d4e309 MDL-60965 behat: Correct strlen use 2017-12-05 11:19:30 +08:00
Andrew Nicols b448376bea Merge branch 'MDL-47114-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2017-12-05 09:53:33 +08:00
Andrew Nicols d6d0e0f4be Merge branch 'wip-MDL-37757-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-12-05 09:45:36 +08:00
Damyon Wiese 9a32a6d629 Merge branch 'MDL-60219-33' of https://github.com/abias/moodle into MOODLE_33_STABLE 2017-12-04 16:29:05 +08:00
Marina Glancy 8d41ccfbe1 MDL-34161 mod_lti: backup and restore of submissions 2017-12-04 15:05:48 +08:00
Marina Glancy ac1f4d9633 MDL-34161 mod_lti: backup/restore of lti types
Only course tools are backed up, site tools and registrations
can be matched by id if they are restored to the same site only.

For predefined course tools the secret is backed up encrypted
and can be restored on the same site only.
2017-12-04 15:05:47 +08:00
Tim Lock 4826b9d454 MDL-34161 mod_lti: Added Behat tests 2017-12-04 15:05:47 +08:00
Gregory Faller 07cb9ff078 MDL-34161 mod_lti: Add support for restoring site tool 2017-12-04 15:05:47 +08:00
Marina Glancy 3f79afbb78 MDL-60926 auth: do not map very long profile fields 2017-12-04 09:28:38 +08:00
Eloy Lafuente (stronk7) 540f98ac7e MDL-59159 environment: 3.1 (LTS) required 2017-12-04 02:04:36 +01:00
Eloy Lafuente (stronk7) d6e92ad815 MDL-59159 environment: 3.5 base information
This is a direct copy of the 3.4 branch to
have changes under control easier in next commits.
2017-12-04 02:04:36 +01:00
Jun Pataleta cc34be6fae Merge branch 'MDL-60914_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-12-04 12:46:00 +13:00
Shamim Rezaie 1f05e1459a MDL-47114 core: Improved function description 2017-12-02 07:44:14 +08:00
Ryan Wyllie 2b460b0fc8 MDL-60942 filters: include filter in format_string cache key 2017-12-01 06:52:00 +00:00
Eloy Lafuente (stronk7) cb9d984b86 weekly release 3.3.3+ 2017-11-30 17:05:19 +01:00
Alexander Bias 11af3ac71d MDL-60219 lti: Replace pagelayout frametop with incourse 2017-11-29 09:55:36 +01:00
Damyon Wiese 1f446a04c2 MDL-58200 competencies: Student can view linked courses 2017-11-29 16:07:46 +08:00
Jun Pataleta 39237cf346 Merge branch 'wip-MDL-45068-33-fix' of
https://github.com/marinaglancy/moodle into MOODLE_33_STABLE
2017-11-29 16:59:54 +13:00
Marina Glancy 60770d10f9 MDL-45068 groups: corrected check for idnumber '0' 2017-11-29 11:54:31 +08:00
Eloy Lafuente (stronk7) 108411af39 Merge branch 'wip-MDL-60591-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-11-28 22:38:50 +01:00
Eloy Lafuente (stronk7) 3104923f6b Merge branch 'MDL-60738-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-11-28 21:00:00 +01:00
Eloy Lafuente (stronk7) 7edb9a48e0 Merge branch 'MDL-60838-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-11-28 20:48:38 +01:00
Damyon Wiese d5b71904b0 MDL-58983 assign: Hide grade button if no cap
If the current user cannot grade students, don't show them the button.
2017-11-28 15:48:57 +08:00
Marina Glancy 8ac72824e1 MDL-49995 files: delete old file when overwriting 2017-11-28 15:03:40 +08:00
Damyon Wiese 7b3832899c MDL-59200 assign: add feedback when grade locked
We are including a hidden field when the grade is locked in the gradebook for a student. This field fails validation, so
the form cannot be submitted.
2017-11-28 14:37:38 +08:00
Damyon Wiese 0c4f7b3b1b MDL-60899 block_lp: no permissions - empty block
Show an empty block if the current user does not have the capability to see any plans.
2017-11-28 14:33:21 +08:00
Damyon Wiese 5dc5337f36 Merge branch 'MDL-53004-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE
Conflicts:
	mod/assign/styles.css
2017-11-28 12:53:00 +08:00
Marina Glancy 8b283a6cf5 MDL-45500 gradingform: allow plugin uninstall 2017-11-28 12:28:04 +08:00
Jun Pataleta b0734fa5ee Merge branch 'MDL-46768-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2017-11-28 17:19:13 +13:00
Damyon Wiese 9e5c6b8d3d Merge branch 'MDL-24678-MOODLE_33-chat_get_latest_message' of https://github.com/bozoh/moodle into MOODLE_33_STABLE 2017-11-28 12:15:13 +08:00
Damyon Wiese 9962da5423 Merge branch 'MDL-60669-33' of git://github.com/tobiasreischmann/moodle into MOODLE_33_STABLE 2017-11-28 12:07:15 +08:00
Mark Nelson bae7a3b909 MDL-60914 mod_lti: ensure grade_update() is defined during upgrade 2017-11-28 11:38:19 +08:00
Eloy Lafuente (stronk7) 6103daf4b0 Merge branch 'MDL-60249-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-28 00:49:06 +01:00
Tobias Reischmann 702605b2c9 MDL-60669 forum: Added duplicate check for restoring forum subscriptions
Before MDL-59854 it was possible to have duplicate forum subscriptions.
Trying to import backups created from back then, caused a DB exception
due to unqiue key constraints. Now only one of multiple identical forum
subscritions is restored.
2017-11-27 10:53:25 +01:00
Damyon Wiese f5e3d2fe72 Merge branch 'MDL-60188-33' of git://github.com/rezaies/moodle into MOODLE_33_STABLE 2017-11-27 16:01:37 +08:00
Jun Pataleta 4965564ef4 Merge branch 'MDL-57569-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2017-11-27 19:44:07 +13:00
Jun Pataleta 9f65a1fb64 Merge branch 'wip-MDL-45068-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-11-27 19:36:24 +13:00
Marina Glancy 907832b43b MDL-60591 mod_forum: inline attachments are not displayed in plain text 2017-11-27 14:29:24 +08:00
Marina Glancy a4c2795681 MDL-45068 groups: fixes to group import
- If 'coursename' is specified in the CSV it should match the course short name - thanks Yusuf Yılmaz for the patch
- If 'idnumber' is specified but 'groupidnumber' is not, idnumber should be used for matching the course idnumber only
- If 'groupingname' is not specified, there should be no notices (regression from MDL-42514)
- If 'coursename' or 'idnumber' column is present, it can contain empty values in some/all lines
2017-11-27 14:26:06 +08:00
Shamim Rezaie 4d7d71fb37 MDL-60188 groups: cache user's groups and groupings
The function groups_get_user_groups is called too often both before rendering the page and after the page is rendered (using ajax).
The function was executing a query joining 3 tables in each call. The plementation of the function has now modified to store the
query result in a request cache.
2017-11-27 10:39:15 +08:00
Jun Pataleta 813baed84d Merge branch 'MDL-58887-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-11-27 15:06:19 +13:00
Jake Dallimore 319e12ba83 Merge branch 'MDL-27230-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-11-27 09:44:49 +08:00
Andrew Hancox 33c67b74aa MDL-60801 tool_uploaduser: Fix issue with defaults being ignored 2017-11-25 11:40:46 +00:00
Carlos Alexandre S. da Fonseca d36fdb9657 MDL-24678 mod_chat: Fixed race condition on chat module 2017-11-24 10:30:33 -02:00
sam marshall de874ead39 MDL-60838 core_search: File upload does not honour timeout 2017-11-24 11:04:10 +00:00
Sara Arjona cab3b03540 MDL-57569 core_files: Fix to let show generated f3 image 2017-11-24 11:53:47 +01:00
Sara Arjona 462785cb74 MDL-46768 core_badges: changed badge name type from FILE to TEXT 2017-11-24 11:40:11 +01:00
Luca Bösch 2d3c247d4d MDL-34389 course: switch to subcategory w/ course:changecategory perms 2017-11-23 16:50:48 +01:00
Luca Bösch 542bd70b90 MDL-53004 assignment: Separate label and pulldown in grading (Clean) 2017-11-23 16:41:56 +01:00
Luca Bösch 29372f84cb MDL-27230 quiz: remove and update group overrides in calendar 2017-11-23 16:41:50 +01:00
David Monllao c099963697 weekly release 3.3.3+ 2017-11-23 13:35:16 +01:00
David Monllao f6a3bbe132 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-11-23 13:35:15 +01:00
Marina Glancy 96a77cf0b1 MDL-27886 backup: When setting is unlocked set it to original value 2017-11-23 12:30:34 +08:00
Damyon Wiese cd54b73299 MDL-60249 assign: resize quickgrade textareas
The Bootstrap CSS reset prevents horizontal resizing of textareas. We want to allow it in the quickgrading ui.
2017-11-23 12:18:58 +08:00
Jake Dallimore 657cb6b451 Merge branch 'MDL-60831-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-11-22 13:27:31 +01:00
Jun Pataleta 04be8aa428 Merge branch 'wip-MDL-60546-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-11-22 13:27:31 +01:00
Jun Pataleta 2f71de8e90 Merge branch 'MDL-60526-33-fix1' of http://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-22 13:27:30 +01:00
David Monllao 6b38456cda MDL-59512 version: Following 2 digits scheme 2017-11-22 13:27:30 +01:00
Damyon Wiese 6f0e8dbaa5 MDL-60526 forms: Button elements should have type
The mform "buttons" should be of type "button", instead it's not specified so they get
the default of "submit". This is causing behat fails.
2017-11-22 13:27:30 +01:00
David Monllao 275fbca097 Merge branch 'MDL-59512-33' of git://github.com/Dagefoerde/moodle into MOODLE_33_STABLE 2017-11-22 13:27:29 +01:00
Jun Pataleta 5ef58abac3 Merge branch 'mdl58817-moodle33' of https://github.com/tlock/moodle into MOODLE_33_STABLE 2017-11-22 13:27:29 +01:00
Jun Pataleta 8854864605 Merge branch 'MDL-60637-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-11-22 13:27:28 +01:00
Damyon Wiese cc37bd164f MDL-59970 competencies: performance
Remove useless get_records call in get_least_proficient_competencies_for_course function.
On big sites this would cause huge memory usage.
2017-11-22 15:37:22 +08:00
Ankit Agarwal e8605c6514 MDL-60831 search: add BS classes to block elements 2017-11-22 12:28:33 +05:30
Adrian Greeve 03c8a58b59 MDL-60546 mod_choice: Update to select all functionality. 2017-11-22 14:17:17 +08:00
Marcus Fabriczy ad95dcaccb MDL-60546 mod_choice: Fixed select all functionality
Fixed the functionality which ticks or unticks all checkboxes when
clicking the Select all or Deselect all elements when viewing the
responses.

Caused by deprecating checkall and checknone functions in
MDL-57490.
2017-11-22 14:17:08 +08:00
Ryan Wyllie 25bb7e4a12 MDL-58887 core: fix default title for action menu
Thanks to Michelle Melton <meltonml@appstate.edu> for the original
version of this patch.
2017-11-22 01:38:52 +00:00
AMOS bot 2ace718489 Automatically generated installer lang files 2017-11-22 00:06:05 +00:00
Marina Glancy 3eeca45c23 MDL-56864 forms: allow to remove last tag with forced standard tags 2017-11-21 15:29:08 +08:00
Marina Glancy 58394a6223 MDL-56864 forms: boost templates don't allow remove last tag 2017-11-21 15:29:08 +08:00
Simey Lameze 6c364342cf MDL-60637 core_group: fix unit tests failures 2017-11-21 11:21:50 +08:00
Simey Lameze 986e88bce3 MDL-60637 group: remove useless id number validation on web services 2017-11-21 11:21:50 +08:00
David Monllao fec3b64a4f Merge branch 'MDL-60526-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-20 13:44:10 +01:00
David Monllao 14120d413e Merge branch 'MDL-60436-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-11-20 13:26:17 +01:00
David Monllao 5fe7cae927 Merge branch 'MDL-56253-33' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-11-20 12:55:45 +01:00
Juan Leyva dbe472f58b MDL-60738 webservice: Clean theme and lang properly
Sometimes the "theme" and "lang" fields in the user and course tables
in the database are set to incorrect values (uninstalled or
non-existent themes and language packs).
This makes Web Services functions to fail because the WS server
validate the returned data using the validate_param function that clean
parameters.
2017-11-20 09:38:15 +01:00
Jun Pataleta 8156736712 Merge branch 'MDL-60187_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-11-20 21:34:05 +13:00
Damyon Wiese 5e5283f9f3 Merge branch 'MDL-60810_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-11-20 15:59:27 +08:00
Damyon Wiese ce694bbb81 Merge branch 'MDL-60809-33' of git://git.cameron1729.xyz/moodle into MOODLE_33_STABLE 2017-11-20 15:32:05 +08:00
Jakob Ackermann ff6faa59eb MDL-60187 mod_lti: Do not create a grade item when grades are disabled.
If the privacy option "Accept grades from the tool" is disabled, the
module should not appear in the gradebook when edited inline or when
recover grades is running during enrolment.
2017-11-20 14:05:02 +08:00
Luca Bösch 0cca93b3b2 MDL-56253 grade: have coursemodule name pass filters. 2017-11-20 06:38:33 +01:00
Damyon Wiese 67def8d76b Merge branch 'MDL-27886-33' of git://github.com/tobiasreischmann/moodle into MOODLE_33_STABLE 2017-11-20 13:27:03 +08:00
Jun Pataleta de935c233b Merge branch 'MOODLE_33_STABLE_MDL-60253' of https://github.com/CengageEng/moodle into MOODLE_33_STABLE 2017-11-20 13:22:07 +13:00
Jun Pataleta 0a45b8eba3 Merge branch 'MDL-55808_33' of git://github.com/juancs/moodle into MOODLE_33_STABLE 2017-11-20 10:37:31 +13:00
Neill Magill d10e946d7b MDL-60436 blocks: Unit test for dashboard block positioning 2017-11-17 14:14:24 +00:00
Neill Magill 479e718dc3 MDL-60436 blocks: Improve performance of block loading 2017-11-17 14:13:30 +00:00
yair.spielmann 0bbd7b8291 MDL-59512 tool_oauth2: add option for basic authentication 2017-11-17 10:23:19 +01:00
Damyon Wiese 68791e3d6e Merge branch 'MDL-60773-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-11-17 14:12:44 +08:00
Andrew Nicols 65c7d85d30 MDL-60773 core: Add pendingJS checks for autocomplete interactions 2017-11-17 14:01:02 +08:00
Adrian Greeve a48f144dc1 MDL-37757 repositories: Deleting a repository deletes files.
If the user decides to remove a repository all of the linked
files are now deleted along with file references. This was causing
problems such as the course page displaying an error with no recourse
to fix the problem.
2017-11-16 15:01:02 +08:00
Cameron Ball 1174beee83 MDL-60809 xmlrpc: Include filelib when making xmlrpc call 2017-11-16 14:48:40 +08:00
Jake Dallimore 2a626230ee weekly release 3.3.3+ 2017-11-16 11:13:09 +08:00
David Monllao ce5fe979f8 Merge branch 'MDL-60789-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2017-11-15 10:36:58 +01:00
Damyon Wiese be05d8c3f0 Merge branch 'wip-MDL-59876-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-11-15 10:36:58 +01:00
Mark Nelson ad904c2827 MDL-60810 auth_db: removed rubbish content in string 2017-11-15 15:01:40 +08:00
Damyon Wiese 087b392b04 MDL-60526 forms: Prevent duplicate type attributes
The exporter for mform elements does not skip "type" (which is included as a separate value).
2017-11-15 11:54:42 +08:00
Adrian Greeve 5a6b7338c3 MDL-59876 core_user: Add required library for function.
The external service create_users has a function call to
useredit_update_user_preference() that requires editlib.php
2017-11-15 11:50:23 +08:00
Damyon Wiese d60d047a96 Merge branch 'MDL-60675-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-11-14 17:06:45 +08:00
Mihail Geshoski 30161129f5 MDL-60675 analytics: Apply strict comparison check 2017-11-14 16:33:34 +08:00
Sara Arjona edd820115e MDL-60789 workshop: Check title submission maxlength 2017-11-14 09:00:10 +01:00
Jake Dallimore c5430a26cf Merge branch 'MDL-60741_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-11-14 15:29:12 +08:00
Jun Pataleta 89401022c3 Merge branch 'm33_MDL-59099_MySQL8_InnoDB_Params_Removed' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-11-14 12:23:50 +13:00
Damyon Wiese f8cecf2031 Merge branch 'MDL-60693_33-backup-multilang-activities' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-11-13 14:38:49 +08:00
Damyon Wiese 697d94550c Merge branch 'MDL-60675-33' of git://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-11-13 14:12:09 +08:00
Damyon Wiese 487b237684 Merge branch 'MDL-60355-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-11-13 13:30:42 +08:00
Juan Leyva 7444926f37 MDL-59876 webservice: Fix the user preference name field type
Web Services from user and enrol components has been updated to change
the user preference name field type from PARAM_ALPHANUMEXT to
PARAM_RAW.
The old type was not matching the core functionality.
2017-11-13 11:09:12 +08:00
Tim Lock d1c7b42f57 MDL-58817 mod_lti: cartridge: maintain custom icons 2017-11-13 10:17:10 +10:30
Luca Bösch 6e270daa1d MDL-60693 backup: Use multilang with course activities
On backup and restore, activities are shown after passing format_string,
supporting multilang.
2017-11-12 14:54:01 +01:00
Eloy Lafuente (stronk7) 22bce961b7 Moodle release 3.3.3 2017-11-11 19:29:38 +01:00
AMOS bot ec6731b117 Automatically generated installer lang files 2017-11-11 00:05:47 +00:00
David Monllao c99581ca26 weekly release 3.3.2+ 2017-11-10 15:15:25 +01:00
David Monllao 32ae0dd852 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-11-10 15:15:23 +01:00
Jun Pataleta 3d7db9e878 Merge branch 'MDL-60771-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-11-10 18:03:31 +13:00
Damyon Wiese e6b9178eaa Merge branch 'MDL-60749-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2017-11-10 12:06:35 +08:00
Simey Lameze 5c7be99010 MDL-60771 mod_scorm: typecast score to integer 2017-11-10 12:02:48 +08:00
Andrew Nicols 77952f9b6f Merge branch 'MDL-52838-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-10 11:50:03 +08:00
Mihail Geshoski 6b4810bdf9 MDL-60675 analytics: Error when selecting invalid insight 2017-11-10 10:48:50 +08:00
Damyon Wiese 2fa0109fbf MDL-52838 workshop: Each criterion > 0 levels
Add validation to the edit assessment form so each criterion in a rubric requires at least one level.
2017-11-10 10:22:33 +08:00
Sara Arjona f3e4a11dce MDL-60749 scorm: Remove &nbsp; from files when downloading 2017-11-09 10:19:36 +01:00
Sara Arjona 038bc7f900 MDL-60550 user: Add more restrictions in keyword searches
Original patch provided by Tim Schroeder.
2017-11-09 15:50:29 +08:00
David Monllao b7abe12fb7 Merge branch 'MDL-60615-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-09 08:49:03 +01:00
Damyon Wiese 5e06871c05 Merge branch 'MDL-60752-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-11-09 15:10:30 +08:00
Damyon Wiese 365a403c25 MDL-60615 imscc: string to array fix
Sloppy typing in the imscc converter is causing errors on php7.1

Variable is initialised as a string and then used as an array.
2017-11-09 15:06:42 +08:00
Andrew Nicols 22baec7429 MDL-60752 lti: Compare text in types_config properly 2017-11-09 14:27:01 +08:00
AMOS bot bcfe44feb5 Automatically generated installer lang files 2017-11-09 00:05:11 +00:00
David Monllao 8526700385 Merge branch 'MDL-60720-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-11-08 17:32:40 +01:00
David Monllao f47f92c0b1 Merge branch 'MDL-58699-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-08 15:56:36 +01:00
Tim Hunt b9ab4a82e5 MDL-60741 purgecaches: did not correctly setup the admin page
Note that, admin_externalpage_setup does the right capability check.
2017-11-08 14:31:48 +00:00
David Monllao a43556a44f MDL-60733 oauth: Remove outdated comment 2017-11-08 12:04:55 +01:00
David Monllao 3417cf93e0 Merge branch 'MDL-60733-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-08 12:04:47 +01:00
David Monllao 64baebd086 weekly release 3.3.2+ 2017-11-08 09:47:27 +01:00
David Monllao 45a0cd6120 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-11-08 09:47:26 +01:00
Damyon Wiese c8e7e1c3c5 MDL-60733 core: B/C for google_oauth
The google_oauth class extends oauth2client which was modified to send "Accept" headers.

The "Accept" headers break picasa and could break any other plugin that was using google_oauth.
2017-11-08 15:25:34 +08:00
Jun Pataleta 6493f30813 Merge branch 'MDL-60717-33-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-11-08 14:43:35 +13:00
AMOS bot 49ecb5e880 Automatically generated installer lang files 2017-11-08 00:05:13 +00:00
Helen Foster 3417222e0a MDL-60717 lang: Merge English strings from the en_fix language pack
Significant string changes:

- needbcmath,auth_ldap - 'grace logins' changed to 'expired password
  checking'
2017-11-07 21:59:52 +01:00
sam marshall 0d982a293c MDL-60720 core_search: Indexing halts on failed get_document
The recordsets used for search indexing sometimes return results
which are invalid (e.g. cannot be found in database). When this
happens, the result in the iterator for the recordset will be
false. Due to a bug, the iterator used to stop when it encountered
a false value, which prevented indexing from getting past the
problematic record.

In addition, the iterator that skips future data resulted in the
current() function of its parent indicator being called twice per
entry, which meant that search indexing called get_document()
twice as many times.
2017-11-07 16:39:16 +00:00
Jake Dallimore ad51194713 Merge branch 'MDL-57772-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-07 15:01:53 +08:00
Damyon Wiese d2d3a57a6b MDL-58699 mod_quiz: Require javascript for popup
If any of the access rules require the attempt to open in a new window, assume we
require javascript to attempt the quiz. This makes it harder to bypass the javascript
pseudo security restrictions.
2017-11-07 12:50:22 +08:00
Damyon Wiese 7b567a1fea MDL-57772 chat: BEEP is back baby! 2017-11-07 11:25:17 +08:00
sam marshall 66fe9b5b5f MDL-60671 core_search: Cron output should use mtrace
The mtrace function is preferable for plain text logging/progress
output because it can be redirected if necessary. By convention it
is normally used in cron and can be used in CLI tasks if required.

This change makes the text_progress_trace class use mtrace instead
of echo and then flush. (Default behaviour of mtrace is to do
exactly that, but it can be redirected too.)

Before this change, if anybody is relying on mtrace behaviour to
redirect logs of cron output, this will fail for some parts of the
search cron output (and some other places like auth plugins).
2017-11-07 11:07:48 +08:00
David Monllao 3c171cae05 Merge branch 'MDL-60424-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-11-06 21:12:28 +01:00
Tobias Reischmann e185931893 MDL-27886 backup: Decision if a setting is fixed based on level
Previously, when a during backup/restore the "Schema"-stage is loaded,
some settings are fixed if they are LOCKED_BY_HIERARCHY. However, user
data fields of activities can be locked, when the section they are
contained in has user data set to false. When this setting is changed on
the same screen, the fixed setting of the activity can not be "unfixed"
by javascript.

This patch adds a settings-level to the call of is_changeable. With this
only those dependency_settings are considered, which belong to parent
settings, which are not changeable on the current stage.
2017-11-06 12:07:57 +01:00
Tobias Reischmann 0a8086fb97 MDL-27886 backup: Enabled unlocking of backup settings
The function is_locked was changed to determine only, if the
dependency_setting want's the dependent setting to be locked.
In the previous version, is_locked did not only check, if the
dependency_setting want's the setting to be locked, but also if the
setting was already locked. A recursive call to the status of the
dependent setting leaded to problems, when unlocking locked settings.

Also the PHPDOC of the is_locked was adjusted to coincide with the current
usage in backup_ui_settings->is_changeable() and
base_setting->set_status(). In both functions all dependency_settings of
a setting are iterated to check if this setting should be or is LOCKED_BY_HIERARCHY.
The actual state of the setting was therefore either checked beforehand
or is not interesting, since the question is, if it shall be changed.
2017-11-06 12:07:57 +01:00
Tobias Reischmann 8b31cbead8 MDL-27886 backup: Added behat tests for user data settings
This new test defines different combinations of global and local user
data settings during the restore process and tests that global defaults
can be overriden.
2017-11-06 12:07:57 +01:00
Damyon Wiese b805234673 Merge branch 'MDL-59858-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-11-06 11:14:06 +08:00
Damyon Wiese 047785fbfd Merge branch 'MDL-60437_33-multilang-html-block-titles' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-11-06 10:11:32 +08:00
Jun Pataleta 2665ad8aea MDL-59858 amd: Focus on the element that actually triggers the modal 2017-11-06 13:20:47 +13:00
AMOS bot ff78163dbd Automatically generated installer lang files 2017-11-05 00:06:04 +00:00
Luca Bösch 70de3574bb MDL-60437 blocks: HTML block title multilang 2017-11-03 16:36:41 +01:00
David Monllao 125d60d769 weekly release 3.3.2+ 2017-11-03 10:25:16 +01:00
Juan Leyva 3ae3f0e2ee MDL-60424 webservice: Allow CORS requests in webservice/upload.php
This will allow to upload files via Web Services using AJAX from
different domains, browser plugins, web apps, etc…
2017-11-03 09:41:44 +01:00
Jake Dallimore e6b5450a2b Merge branch 'MDL-58047-33-fix1' of http://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-03 16:10:53 +08:00
Damyon Wiese f1e8521765 MDL-58047 assign: submission sorting
Only exclude new submission records from the sorting, draft and reopened submission are valid.
2017-11-03 15:56:03 +08:00
David Monllao e60ad856d8 Merge branch 'MDL-58047-33-sortbysubmission' of https://github.com/roperto/moodle into MOODLE_33_STABLE 2017-11-02 16:57:56 +01:00
David Monllao 9446ec2399 Merge branch 'MDL-51945-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-11-02 16:54:45 +01:00
David Monllao c191acfdd6 Merge branch 'MDL-60634-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-11-02 13:25:09 +01:00
David Monllao ffb5996060 Merge branch 'MDL-60633-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-11-02 12:04:20 +01:00
David Monllao b09c936c74 Merge branch 'MDL-53501-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-11-02 08:30:49 +01:00
Jake Dallimore a68cbb2812 Merge branch 'MDL-59798-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-11-02 09:45:24 +08:00
Jake Dallimore 069853b01b Merge branch 'MOODLE_33_STABLE_MDL-60007' of https://github.com/CengageEng/moodle into MOODLE_33_STABLE 2017-11-02 08:51:08 +08:00
Eloy Lafuente (stronk7) f90fb8390b weekly release 3.3.2+ 2017-11-01 13:39:06 +01:00
Eloy Lafuente (stronk7) 46343f8cc2 Merge branch 'MDL-60503-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-01 11:46:01 +01:00
Damyon Wiese bcedb11d99 MDL-60503 npm: Lock required node 8.9.x (LTS) 2017-11-01 14:54:00 +08:00
Daniel Thee Roperto 6afd56af46 MDL-58047 gradebook: fix sort by submission order. 2017-11-01 15:11:50 +11:00
Damyon Wiese 00d6486f73 Merge branch 'MDL-52037-33-fix' of https://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-11-01 11:15:28 +08:00
Andrew Nicols f33e0d5222 MDL-52037 theme: Correct question feedback width
This relates to the cloze question answer when hovered.
2017-11-01 11:13:40 +08:00
Ryan Wyllie 7488f542d3 MDL-59798 assign: show due date calendar event for teachers 2017-11-01 01:36:34 +00:00
Vervoort, Claude 7c202963f7 MDL-60007 mod lti: allow delete without content-type 2017-10-31 09:59:47 -04:00
Juan Leyva 17e1682c4e MDL-60433 mod_data: Fix strict check for groupid 2017-10-31 13:24:13 +01:00
Juan Leyva ec8f2eb07d MDL-60634 tool_mobile: Avoid CURL request to check HTTPS 2017-10-31 12:05:06 +01:00
David Monllao d634a259a2 MDL-52037 theme: Update compiled css 2017-10-31 11:01:35 +01:00
Luca Bösch 2a4c1c7128 MDL-52037 questions: „Whether correct“-feedback marks adaptive width 2017-10-31 10:43:45 +01:00
Jake Dallimore da5d103964 Merge branch 'MDL-60607_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-31 12:59:00 +08:00
Jun Pataleta 73b9bccd80 Merge branch 'MDL-57560-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-10-31 15:40:59 +13:00
Andrew Nicols edb84bc356 Merge branch 'MDL-60139_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-31 09:15:40 +08:00
Andrew Nicols f649aafd98 Merge branch 'MDL-60522-33' of https://github.com/Kathrin84/moodle into MOODLE_33_STABLE 2017-10-31 08:20:05 +08:00
Andrew Nicols 0afb1ecbec MDL-60633 core: Add pendingjs checks for inplace editable 2017-10-31 07:04:33 +08:00
Tim Hunt 9d37a6f117 MDL-60607 quiz reports: catch separate groups & user has no group case 2017-10-30 17:58:40 +00:00
Tim Hunt f74fe038a9 MDL-60607 quiz reports: move duplicate code to superclass method 2017-10-30 17:58:38 +00:00
David Monllao 3572b50b47 Merge branch 'MDL-60528-m33' of https://github.com/micaherne/moodle into MOODLE_33_STABLE 2017-10-30 17:59:09 +01:00
Juan Leyva c6a0e94bd1 MDL-51945 core_user: Prevent duplicated emails in update_users WS 2017-10-30 17:42:42 +01:00
David Monllao 355c4b8d92 Merge branch 'MDL-52037_33-cloze-whether-correct-feedback-width' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-10-30 16:05:55 +01:00
Juan Leyva 7bd64b53c5 MDL-53501 webservice: Avoid values higher than PHP_INT_MAX
Integers coming from site settings needs casting to int to avoid
returning values higher than PHP_INT_MAX.
2017-10-30 16:04:29 +01:00
Michael Aherne ed73eb0dde MDL-60528 grading: Accurate class names in PHPDoc 2017-10-30 14:28:59 +00:00
Tim Hunt e8ca0ae166 MDL-60139 question manual grading: move code to reduce confusion
Move the variable definition closer to where it is used.
2017-10-30 12:58:19 +00:00
Tim Hunt 42bd1cf3be MDL-60139 question manual grading: redisplay mark as typed if editing
When the teacher is upgrading a previously entered grade, we re-display
exactly what they typed before if possible, rather than displaying with
a set number of decimal places.
2017-10-30 12:58:17 +00:00
Tim Hunt ef78406324 MDL-60139 phpunit: Make assertTag verify attribute values with ===
I had a test that cared about the difference between value="5.0" and value="5".
2017-10-30 12:58:15 +00:00
David Monllao c957f2c268 Merge branch 'MDL-60433-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-10-30 13:23:45 +01:00
Juan Leyva 2ec1b93b31 MDL-60433 mod_data: Fix groups in Web Services 2017-10-30 12:51:32 +01:00
David Monllao 20668b9a8a Merge branch 'MDL-60377-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-10-30 11:42:42 +01:00
Luca Bösch 3b59deb429 MDL-52037 questions: „Whether correct“-feedback marks adaptive width 2017-10-30 10:37:33 +00:00
Kathrin Osswald 942d43eeac MDL-60522 message: Removed additional tooltips
I removed the additional tooltips because I think that they are just used
in the notifications and messages context and duplicate the all over used
title tag that gives the same information when hovering. So the whole system
stays more consistently.
2017-10-30 08:02:36 +01:00
Damyon Wiese 3031e3de72 MDL-57560 boost: File upload progress
Copy / adapt some styles from the bootstrap progress widget to match the DOM used for file upload progress.

Bootstrap changed this alot in the current beta so I opted to do a minimal change (affect the scss for boost only), rather
than adapt the HTML to something that will change again anyway when we upgrade to the release version of bootstrap 4.
2017-10-30 13:13:30 +08:00
Jake Dallimore e789d41efc Merge branch 'MDL-59606_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-30 11:23:42 +08:00
Andrew Nicols 1f236c90b2 Merge branch 'MDL-60605-33' of https://github.com/dvdcastro/moodle into MOODLE_33_STABLE 2017-10-30 10:50:52 +08:00
Andrew Nicols 944520fd81 Merge branch 'MOODLE_33_STABLE_MDL-60360_enable_file_indexing_retroactively' of https://github.com/mattporritt/moodle into MOODLE_33_STABLE 2017-10-30 09:20:05 +08:00
Jun Pataleta 4f65073d33 Merge branch 'MDL-60572-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-10-30 10:25:24 +13:00
David Castro 3557004809 MDL-60605 assignment: Added some styles to fix spacing in YUI file tree 2017-10-27 11:05:53 -05:00
Tim Hunt 51b8cd794f MDL-59606 quiz responses: fix edge cases in the report
This patch conbines valuable contributions from Kashmira Nagwekar and
Luca Bösch. Many thanks to them. However, the final form of the fix,
and hence the blame, falls to me -- Tim.

There were several issues here:

* The load_questions_usages_by_activity method in
  question/engine/datalib.php was incorrectly treating the case
  when no data was returned. (Looks like a historic copy-pase from
  other methods that fetch one item by unique id, which therefore
  must exist.)

* The report was not correctly handling the display when the 'Which
  tries' was set to 'with, and without, attempts'.

* It was possible to select the 'All tries' option when also saying
  'Users without attempts'. This combination makes not sense, so
  a disabledIf rule was added to the form.
2017-10-27 16:57:30 +01:00
Matteo Scaramuccia feb69eb8a5 MDL-59099 dml: MySQL8 supports only the Barracuda file format.
The following InnoDB file format configuration parameters were deprecated
in MySQL 5.7.7 and are now removed:
- innodb_file_format
- innodb_file_format_check
- innodb_file_format_max
- innodb_large_prefix

File format configuration parameters were necessary for creating tables
compatible with earlier versions of InnoDB in MySQL 5.1.
Now that MySQL 5.1 has reached the end of its product lifecycle,
the parameters are no longer required.

The FILE_FORMAT column was removed from the INNODB_SYS_TABLES and
INNODB_SYS_TABLESPACES Information Schema tables.

Ref: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-0.html
2017-10-27 17:41:22 +02:00
David Monllao 5992720184 weekly release 3.3.2+ 2017-10-27 12:48:30 +02:00
Juan Leyva c12bfcefdd MDL-60572 admin: Fix forgottenpasswordurl for WS
We should expect URLs in that field.
The tool_mobile change is to not break the WS response if
forgottenpasswordurl does not contain a URL.
2017-10-27 10:41:28 +02:00
Damyon Wiese ccdb33e9a8 MDL-60567 competencies: test list_competencies 2017-10-27 11:52:21 +08:00
Damyon Wiese df4dd003f7 MDL-60567 competencies: list_competencies wrong type
"validate_params" returns arrays in external functions.
2017-10-27 11:52:21 +08:00
Matt Porritt bf3a3c56b1 MDL-60360 Global Search: Enable file indexing message update.
If you have Global Search set up on a site without file
indexing enabled, then at a later date you enable file indexing
files associated with existing objects are not added.

The only way to have files for existing objects indexed is to
run a reindex of all content.

This patches updates the file indexing language string in the
solr search settings of Global Search to make this clear
to the site administrator.
2017-10-27 11:16:52 +11:00
Jun Pataleta 75638047ae Merge branch 'MDL-60265-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-10-27 11:52:25 +13:00
David Monllao 4d415133f8 Merge branch 'wip-MDL-57055-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-10-26 19:17:39 +02:00
David Monllao 8b395d32e5 Merge branch 'MDL-60600_33_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_33_STABLE 2017-10-26 18:34:27 +02:00
Mark Johnson 8edb87a37f MDL-60600 core_output: Clear static icon system cache between unit tests 2017-10-26 15:12:06 +01:00
Jun Pataleta 2b33c0e6d4 Merge branch 'MDL-59909-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-10-26 21:09:28 +13:00
Damyon Wiese cdef8f4e51 Merge branch 'MDL-60366_feedback_upgrade_33' of git://github.com/davosmith/moodle into MOODLE_33_STABLE 2017-10-26 15:40:31 +08:00
Andrew Nicols d6b67e26e3 Merge branch 'wip-MDL-60543-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-10-26 14:32:12 +08:00
Andrew Nicols 0a12ba0807 Merge branch 'MDL-60162_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-26 14:05:52 +08:00
Adrian Greeve 18ea0d75bc MDL-57055 mod_label: Add label administration for boost.
This patch adds the label adminstration settings to the
label edit page.
2017-10-26 13:57:15 +08:00
Andrew Nicols 6188594b52 Merge branch 'MDL-60535_33-questionbank-button-styled' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-10-26 13:18:39 +08:00
Andrew Nicols 0afcdafdbc Merge branch 'wip-MDL-60104-m33' of git://github.com/amygroshek/moodle into MOODLE_33_STABLE 2017-10-26 11:38:28 +08:00
Andrew Nicols 0de940286f Merge branch 'MOODLE_33_MDL-51892' of https://github.com/fwsl/moodle into MOODLE_33_STABLE 2017-10-26 11:30:32 +08:00
Jake Dallimore 23854442d3 Merge branch 'MDL-59686-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-10-26 10:18:04 +08:00
Simey Lameze 46a05ebe6c MDL-59686 form: fix autosave support for editor field 2017-10-26 09:04:11 +08:00
Jun Pataleta 2168da18b7 Merge branch 'MDL-60571_33-manualgrading-savegotonextpage-styled' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-10-26 10:03:03 +13:00
David Monllao 8e14926847 Merge branch 'wip_MDL-60250_M33' of git://github.com/gjb2048/moodle into MOODLE_33_STABLE 2017-10-25 15:13:27 +02:00
David Monllao 32e3f25c95 Merge branch 'MDL-60538-33' of https://github.com/mihailges/moodle into MOODLE_33_STABLE 2017-10-25 15:09:41 +02:00
David Monllao 8375df3227 weekly release 3.3.2+ 2017-10-25 11:13:53 +02:00
David Monllao 92b38fa1a8 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-10-25 11:13:52 +02:00
Damyon Wiese 0203b05f13 MDL-59909 calendar: Try hard not to fail the adhoc task.
Triggering a fatal error in an adhoc task is bad. It will be retried indefinitely.
Even though we are not sure how to get a module instance without a course module record,
it is possible and should not kill the Moodle site.
2017-10-25 15:44:00 +08:00
Andrew Nicols 82938bb562 Merge branch 'MDL-36580_33' of https://github.com/stronk7/moodle into MOODLE_33_STABLE 2017-10-25 12:18:24 +08:00
Andrew Nicols 92126f2ea8 Merge branch 'MDL-36580_33' of https://github.com/stronk7/moodle into MOODLE_33_STABLE 2017-10-25 12:18:23 +08:00
Mihail Geshoski c3ddc8e2fd MDL-60538 lesson: check if max attempts exceeded, use new lang string 2017-10-25 09:08:29 +08:00
Eloy Lafuente (stronk7) e81b7b7487 MDL-36580 backup: Avoid PHP notice restoring old backups
Before this implementation, both resourcekey and password
were not being included in the backups, so old backups are
missing them. To keep upwards compatibility and avoid a PHP
Notice (undefined property), existence is checked via isset(),
that is the usual way all over the restore process.
2017-10-24 23:02:04 +02:00
Tim Hunt 1941f9ab63 MDL-60162 quiz reports: refactor duplicated code into the base class
This is needed to fix the unit test in the last commit.
2017-10-24 18:14:33 +01:00
Tim Hunt 16ae053264 MDL-60162 quiz reports: too many rows fetched on download
This happened if one user had multiple enrolments in a course, and was
quite inefficient.
2017-10-24 18:14:32 +01:00
AMOS bot 78ff74e0d3 Automatically generated installer lang files 2017-10-25 00:05:50 +08:00
Amy Groshek 8b0427a3a9 MDL-60104 mod_scorm: Fix scorm description display overflow 2017-10-24 10:37:02 -05:00
Luca Bösch 8c66b48b85 MDL-60535 quiz: question bank button styled 2017-10-24 16:10:03 +01:00
Luca Bösch dc3a628459 MDL-60571 quiz: Manual grading Save and go to next page button styled 2017-10-24 12:14:00 +01:00
Grzegorz Ziółek 915b7b6914 MDL-51892 logging: Proper description of login errors. 2017-10-24 10:54:48 +02:00
Davo Smith cdd6d0d240 MDL-60366 mod_feedback: fix deletion of valid anonymous duplicates 2017-10-24 09:36:14 +01:00
Andrew Nicols d30613b147 MDL-57477 session: Comment tidyup 2017-10-24 08:13:10 +08:00
Andrew Nicols 729ada251b Merge branch 'MDL-57477_33' of https://github.com/appalachianstate/moodle into MOODLE_33_STABLE 2017-10-24 08:08:27 +08:00
Fred Woolard 58235c3774 MDL-57477 core: If memcached 3.x mimic 2.2.0 lock acquisition behavior 2017-10-23 13:48:08 -04:00
David Monllao 2ea0d1ffde Merge branch 'MDL-60527_33-action-menu-links-missing-spaces-attributes' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-10-23 16:59:10 +02:00
Andrew Nicols 1938195cac MDL-60489 javascript: Add missing promise fails 2017-10-23 20:29:26 +08:00
Andrew Nicols 83a6957d2e Merge branch 'MDL-60489-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-10-23 20:27:16 +08:00
Eloy Lafuente (stronk7) cb00fcc297 Merge branch 'm33_MDL-59100_MySQL8_INFORMATION_SCHEMAs_Need_Lowercasing' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-10-23 12:10:59 +02:00
Gareth J Barnard 4e2d813fb3 MDL-60250 theme_bootstrapbase: Calendar popover misplaced in RTL langs. 2017-10-23 11:08:46 +01:00
Ryan Wyllie 651f9e6c6b MDL-60489 javascript: add animations to modal setBody 2017-10-23 08:03:14 +00:00
Marina Glancy 75d54a7b9b MDL-60543 env: Moodle 3.2 and 3.3 do no support PHP7.2 2017-10-23 14:18:49 +08:00
Damyon Wiese e66e807e81 Merge branch 'MDL-52653-33' of http://github.com/damyon/moodle into MOODLE_33_STABLE 2017-10-23 13:14:49 +08:00
Damyon Wiese 2891fb44b9 Merge branch 'MDL-58605-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-23 11:16:25 +08:00
Andrew Nicols df3a27d865 MDL-58605 mod_scorm: Simplify feature
The singlescobasic_missingorg.zip file includes a modified version of
the javascript which deliberately breaks content.

We need it to have different file names to not break other similar copies
of the file.
2017-10-23 07:56:40 +08:00
Luca Bösch 92be41bf98 MDL-60527 templates: missing spaces round attribute and aria-labelledby 2017-10-22 22:07:35 +01:00
Matteo Scaramuccia 3989a44cfb MDL-59100 dml: Lower the case of INFORMATION_SCHEMA.* fields. 2017-10-21 14:33:46 +02:00
Eloy Lafuente (stronk7) bcca46d630 weekly release 3.3.2+ 2017-10-20 23:55:00 +02:00
Eloy Lafuente (stronk7) c96be3bbef MDL-60485 modgrade: Change string expectation in related test 2017-10-20 18:55:40 +02:00
David Monllao 33336b560e Merge branch 'wip-MDL-60485-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-10-20 04:43:25 +02:00
Andrew Nicols 1c6b0718be Merge branch 'MDL-60456-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-10-20 10:28:45 +08:00
David Monllao d0abd8f9fc Merge branch 'MDL-60123-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-10-20 02:22:26 +02:00
Eloy Lafuente (stronk7) a5adcc8ad4 Merge branch 'MDL-60342-33' of https://github.com/patkira/moodle into MOODLE_33_STABLE 2017-10-19 23:24:58 +02:00
Eloy Lafuente (stronk7) c4cae28841 Merge branch 'wip-MDL-60314-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-10-19 23:19:07 +02:00
Eloy Lafuente (stronk7) 492e044470 Merge branch 'MDL-60449-33-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-10-19 22:21:22 +02:00
Helen Foster bc8665f4dd MDL-60449 lang: Merge English strings from the en_fix language pack
Significant string changes:

* errorretrievingkey in message_airnotifier - improved wording and
  removing reference to Moodle.org
* enddate_help and courseduration_desc in core - clearer wording
  explaining what the date actually does
* restore:viewautomatedfilearea in core_role - changing wording to match
  the behaviour
* dropzones_help in qtype_ddmarker - improved wording
* autologinkeygenerationlockout in tool_mobile - updated error message
* configallowemailaddresses in core_admin - clearer description
* subscriptionmode_helpin mod_forum - removing misleading sentence about
  subscription mode changes not affecting existing users
2017-10-19 18:17:46 +02:00
David Monllao b4d4e7885a Merge branch 'wip-MDL-58915-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-10-19 15:44:25 +02:00
David Monllao 2b1827a6d1 Merge branch 'MDL-60233-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-10-19 13:51:15 +02:00
Nadav Kavalerchik 8304784442 MDL-60182 Glossary: Fix print icon label in RTL mode 2017-10-19 13:36:11 +02:00
David Monllao 4b8c428047 Merge branch 'MDL-60469-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-19 10:53:26 +02:00
David Monllao fc4d0e7f8c Merge branch 'MDL-60247_33-multilang-html-glossary-block-titles' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-10-19 10:34:47 +02:00
David Monllao e940603c99 Merge branch 'MDL-60153-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-10-19 10:19:17 +02:00
Eloy Lafuente (stronk7) 66dc42dc7a MDL-36580 backup: Apply the decrypt() method to lti "secrets" 2017-10-19 10:17:12 +02:00
Eloy Lafuente (stronk7) e76cfde358 MDL-36580 backup: General support for decrypted contents in restore
- Uses site generated (on backup) key.
- Can be applied potentially everywhere in the restore process.
- Covered with unit tests.
- Authentication / integrity aware so can be used between any 2 servers
  (just requires matching key).
2017-10-19 10:17:11 +02:00
Eloy Lafuente (stronk7) 29b66bc2eb MDL-36580 backup: Use the encrypted_final_element for lti "secrets" 2017-10-19 10:17:11 +02:00
Eloy Lafuente (stronk7) d070c63237 MDL-36580 backup: General support for encrypted contents in backups
- Built using standard backup custom fields.
- Can be applied potentially everywhere.
- Automatically addded 'encrypted' attribute.
- Defaults to site generated key.
- Enforces key robutness / provides authentication (hmac integrity)
- Covered with unit tests.
2017-10-19 10:17:07 +02:00
Damyon Wiese e17641e19e MDL-52653 scorm: Comment for cms.completion_status 2017-10-19 14:56:54 +08:00
Christian Lawson-Perfect 35ff3eae2d MDL-52653 SCORM: fix scorm_check_mode on v1.3
SCORM 2004 uses the element 'cmi.completion_status' to store the
completion status of a SCO, not 'cmi.core.lesson_status'.

This amends scorm_check_mode so that the right element is looked up.

When scorm_version_check returns false, SCORM 1.2 is assumed.
2017-10-19 14:56:54 +08:00
Adrian Greeve c2e9ef8d1d MDL-60485 modgrade: Update to mod settings form.
The message for changing the max grade in the module form
was inaccurate for modules that can not rescale.
2017-10-19 14:37:57 +08:00
Mark Nielsen 2cbe558754 MDL-60001 core_files: Use local file for gzopen
The gzopen method does not appear to support
file streams.
2017-10-19 13:12:50 +08:00
Damyon Wiese fe94e2bd14 MDL-60456 javascript: Rebuild npm-shrinkwrap
Build npm-shrinkwrap with the latest node version and only test the latest node version on travis.
2017-10-19 11:54:00 +08:00
Andrew Nicols 6475e2cb5e Merge branch 'MDL-60319-MOODLE_33-google-converter-bug' of https://github.com/mspall/moodle into MOODLE_33_STABLE 2017-10-19 11:29:20 +08:00
Jun Pataleta f4307218e6 Merge branch 'wip-MDL-60335-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-10-19 15:39:36 +13:00
Andrew Nicols 0d18af4621 MDL-60469 behat: Replace I press with I click on 2017-10-19 10:39:27 +08:00
Jun Pataleta 1a58b9a5d1 Merge branch 'mdl59843-moodle33' of https://github.com/tlock/moodle into MOODLE_33_STABLE 2017-10-19 13:21:25 +13:00
Eloy Lafuente (stronk7) 6ba05a7368 weekly release 3.3.2+ 2017-10-19 00:11:11 +02:00
Eloy Lafuente (stronk7) c1a6523782 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-10-19 00:11:09 +02:00
Pat Kira 74ee81e38e MDL-60342 test: Reset user agent after tests
- Add a test that proves this useragent is not being reset after a test
- Reset user agent
2017-10-18 14:02:07 +11:00
Marina Glancy e27dfe0fbc MDL-60335 admin: fix encoding of nonlatin site names in blocked hosts 2017-10-17 12:59:49 +08:00
Eloy Lafuente (stronk7) 2d2e3dc0eb Merge branch 'MDL-60320_33' of git://github.com/aolley/moodle into MOODLE_33_STABLE 2017-10-17 00:06:03 +02:00
David Monllao 2b5948200f Merge branch 'MDL-60373-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-16 18:28:56 +02:00
Jake Dallimore 37340fb27b Merge branch 'wip-MDL-60033-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-10-16 15:37:06 +08:00
Jake Dallimore 3d8e2ef988 MDL-60123 assign: Allow teachers to deselect pdf annotations in editpdf
Clicking a blank area of the canvas will now deselect any currently
selected annotation.
2017-10-16 08:44:23 +08:00
AMOS bot c078a012de Automatically generated installer lang files 2017-10-14 00:08:31 +08:00
Juan Segarra Montesinos 46b8ab729a MDL-55808 mod_glossary: Search glossary entries with ratings enabled doesn't work 2017-10-13 17:24:00 +02:00
Luca Bösch ae565b0e4d MDL-60247 blocks: Multilang in Random glossary and in HTML block titles. 2017-10-13 13:52:27 +02:00
Jake Dallimore 298c1361e8 weekly release 3.3.2+ 2017-10-13 14:33:18 +08:00
Jake Dallimore ad9e004174 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-10-13 14:33:17 +08:00
Marina Glancy d250014ef7 MDL-58915 search_solr: connection to solr can use blocked hosts 2017-10-13 12:18:05 +08:00
Jake Dallimore 747a386ed4 Merge branch 'MDL-60357-33-fix' of https://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-13 11:40:30 +08:00
Andrew Nicols d9810c83cb MDL-60357 search: Ensure that the document is valid
We were previously testing tha the parent is valid, which it was, and
then fetching the current record, before fetching data from it.

However, the way in which the recordset walk works, the valid function
checks whether the _record_ itself is valid, whilst the current allows
for a callback to be applied.

In this instance, the data-entry was failing because the count of
indexfields was < 2. The recordset data itself was valid, but the view
was not, and as a result, the current() function returned false.

This false was not previously handled.

I've changed the logic so that we handle this case, and have removed a
double-negative in the process.
2017-10-13 09:46:28 +08:00
Jun Pataleta 7b4b469720 Merge branch 'MDL-59854-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-10-12 12:27:47 +08:00
Tobias Reischmann 8db207f90f MDL-59854 forum: Created unique db key for forum_subscriptions
Due to race conditions in the function subscribe_user
it was possible to create duplicate forum subscriptions.
This lead to error messages, when displaying the list of
all subscriptions.
This patch removes all existing duplicate entries and
creates a unique db key to prevent this from happening in
the future.
2017-10-12 12:19:49 +08:00
Eloy Lafuente (stronk7) ca3c02b188 Merge branch 'MDL-60357-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-10-11 20:49:46 +02:00
Andrew Nicols 0be75ddb99 Merge branch 'MOODLE_33_STABLE_MDL-60276' of https://github.com/CengageEng/moodle into MOODLE_33_STABLE 2017-10-11 09:39:50 +08:00
Eloy Lafuente (stronk7) 795c5635e0 Merge branch 'MDL-60300-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-10-11 01:40:04 +02:00
Eloy Lafuente (stronk7) 91bc1d0983 Merge branch 'MDL-60346-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-10-11 01:13:33 +02:00
Eloy Lafuente (stronk7) 739d0e33dd Merge branch 'MDL-60364-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-10-11 01:00:37 +02:00
Juan Leyva 0f08e89988 MDL-60377 webservice: Format correctly text returned by WS 2017-10-10 15:12:37 +02:00
Damyon Wiese 564787c47b Merge branch 'MDL-59889-33' of git://github.com/Dagefoerde/moodle into MOODLE_33_STABLE 2017-10-10 13:22:04 +08:00
Adam Olley 3ff2f2d474 MDL-60320 icons: Use PNG icons as the preview thumbnails
Without this change, Moodle fails to provide any data when requesting a
thumbnail for a non-image file as its looking to provide a SVG file that
doesn't exist.
2017-10-10 09:57:41 +10:30
Eloy Lafuente (stronk7) d83185cfae Merge branch 'm33_MDL-60318_Undefined_method_file_storage-move_to_trash' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-10-09 23:12:08 +02:00
AMOS bot 9802346b16 Automatically generated installer lang files 2017-10-10 00:12:00 +08:00
Andrew Nicols 67a4191380 Merge branch 'MDL-60317_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-09 14:10:08 +08:00
Andrew Nicols 0e21a039da MDL-60373 core: Do not show title if there is no title 2017-10-09 12:36:33 +08:00
Jun Pataleta 645c3bdd64 MDL-60153 course_format: Remove irrelevant CSS styles
* The styles ".course-content ul.topics li.section .right img.icon" and
".course-content ul.weeks li.section .right img.icon" are now kind of
irrelevant and are causing course section action menu items in
Bootstrapbase to be rendered without spacing between the action menu
icon and the label.
2017-10-09 10:23:24 +08:00
Tim Lock be60d9e7f7 MDL-60153 theme_bootstrapbase: Fix align of edit section menu 2017-10-09 10:23:24 +08:00
Marina Glancy 96b04bdedc MDL-60314 navigation: fix overriding variable value 2017-10-09 10:19:28 +08:00
sam marshall a685402bd8 MDL-60357 core_search: Future modified times cause serious problems 2017-10-06 14:14:25 +01:00
Jan Dageförde 2d2f32f242 MDL-59889 oauth2: Remove check for storing new refresh token 2017-10-06 14:49:23 +02:00
Neill Magill 6bc6c40f5b MDL-60300 Quiz: Offline update time not set correctly 2017-10-06 13:33:20 +01:00
Neill Magill 598c974d46 MDL-60364 Web service: E_ERROR in course_check_updates web service
The error stated that course_check_updates() is undefined, this function
is in the course lib.php file.
2017-10-06 13:32:54 +01:00
sam marshall 1ba83f0d5a MDL-60346 core_search: Solr connection ignores proxy settings 2017-10-06 12:28:04 +01:00
Jake Dallimore 2ffd848807 weekly release 3.3.2+ 2017-10-06 14:34:39 +08:00
Jake Dallimore b5f9f77e4c Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-10-06 14:34:38 +08:00
Michael Spall 52d65d0970 MDL-60319 Google converter: Add html to convertible types
Add html files to the file types that Google can convert. This allows
the Google Drive converter to convert online submissions to pdf. This
fixes an issue where if online submissions is selected and the Google
Drive converter is used all conversions fail and produce a single
blank pdf. Credit to Peter Svec for the idea for this fix.
2017-10-05 08:13:34 -06:00
Jun Pataleta f46e46c174 Merge branch 'MDL-60352-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-05 16:16:47 +08:00
Juan Leyva aa7f151edd MDL-60355 media_vimeo: Support restricted videos by domain in the app
As reported in MOBILE-1511, Vimeo videos restricted by domain are not
working in the app.

The reason is simple: The restriction is done by the Referer HTTP
header, when a video is embedded via an iframe in the Moodle Site,
Vimeo checks the Referer to see if it matches the specified domain.

When the video is embedded in the mobile app, the Referer is the one
provided by the app Cordova container so Vimeo won't allow playing the
video.

The solution is to add an extra iframe on top of the Vimeo embedding
one (like a proxy), the app will display an iframe pointing to a page
in the site that will include the iframe pointing to vimeo so the
restriction check will work.
2017-10-05 09:53:50 +02:00
Andrew Nicols 3e2afb9d11 MDL-60352 calendar: Do not select original event for collection 2017-10-05 14:43:23 +08:00
Jake Dallimore 6b40b9182b Merge branch 'MDL-57228_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-04 13:43:27 +08:00
Eloy Lafuente (stronk7) 4a56b4efb5 Merge branch 'MDL-59882-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-03 20:52:04 +02:00
Eloy Lafuente (stronk7) e945953705 Merge branch 'MDL-60198-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-10-03 20:15:53 +02:00
AMOS bot a813ed0dd6 Automatically generated installer lang files 2017-10-04 00:10:33 +08:00
Andrew Nicols b278d32999 Merge branch 'MDL-60210-33-upgradecheck' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-10-03 10:33:32 +08:00
Matteo Scaramuccia accc87283a MDL-60318 filestorage: Fixed undefined method move_to_trash() 2017-10-02 23:03:20 +02:00
Tim Hunt b86bb7b4df MDL-60317 quiz reports: fix regression caused by MDL-57511 2017-10-02 18:24:51 +01:00
Andrew Nicols 7129db08e7 Merge branch 'MDL-58790_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-02 15:40:22 +08:00
Andrew Nicols 9ae3d44588 MDL-59882 behat: Update known uses of dialogue CSS 2017-10-02 12:49:34 +08:00
Andrew Nicols 176bb9eec3 MDL-59882 behat: Add newer modal type to selectors 2017-10-02 12:46:14 +08:00
Andrew Nicols f009ad959a Merge branch 'MDL-60306-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-10-02 10:17:25 +08:00
Jun Pataleta 5ef74b0c3d MDL-60306 calendar: Fix rrule_manager unit test
* The calculation of the expected date should depend on the comparison
with the start date's date and not it's exact timestamp.
2017-10-02 09:19:08 +08:00
ddelblanco d68208baa1 MDL-60276 LTI Content Item: does not populate tool url when https 2017-09-28 09:53:31 -07:00
AMOS bot 03152cd95c Automatically generated installer lang files 2017-09-29 00:06:02 +08:00
Juan Leyva ff2a8c5a18 MDL-60265 tool_mobile: Return sitepolicy in tool_mobile_get_config WS 2017-09-28 10:50:54 +02:00
Jake Dallimore d7bee96561 weekly release 3.3.2+ 2017-09-28 14:27:30 +08:00
Tim Lock 41fb3ea48f MDL-59843 mod_choice: Fix horizontal display mode
This re-implements the feature in the boost and bootstrap themes.
2017-09-28 12:30:27 +10:00
Eloy Lafuente (stronk7) 1eb29f17e3 Merge branch 'MDL-60243-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-27 20:48:39 +02:00
Vervoort, Claude c76ac89f80 MDL-60253 lti: also consider securetoolurl for URL match 2017-09-27 13:25:52 -04:00
Jake Dallimore 7d1e74c3da Merge branch 'MDL-59780-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-09-27 13:43:42 +08:00
Ankit Agarwal 00479a197e MDL-59780 mathjax: Make sure mathjax url doesn't become empty 2017-09-27 09:15:16 +05:30
Jake Dallimore 91d9281330 MDL-60243 competencies: fix ordering bug in api_test unit test
list_user_competencies_to_review() orders by shortname, but the test
creates 2 user competencies with the same short name, resulting in
unpredictable results. This patch fixes that.
2017-09-27 09:23:20 +08:00
Eloy Lafuente (stronk7) 3f2082ef15 Merge branch 'MDL-59931_33_STABLE' of https://github.com/ctam/moodle into MOODLE_33_STABLE 2017-09-27 01:16:17 +02:00
Eloy Lafuente (stronk7) c953223f50 Merge branch 'MDL-59220-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-09-27 00:52:11 +02:00
Juan Leyva 7135925f9e MDL-60198 webservice: Add missing MOODLE_INTERNAL checks 2017-09-26 23:04:35 +02:00
Eloy Lafuente (stronk7) 156c08723d Merge branch 'MDL-59645-33-flickr' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-09-26 19:35:08 +02:00
Tim Hunt 2835d3c50d MDL-58790 quiz editing: translate hard-coded new heading string 2017-09-26 11:18:26 +01:00
Juan Leyva d6fee3b572 MDL-60233 mod_assign: Avoid HTML in the item field of external warnings
The item field is defined as PARAM_TEXT (no HTML tags allowed except
for multilang).
Using the s that add quotes to HTML characters we avoid potential Web
Services invalid parameters errors.
2017-09-26 12:13:31 +02:00
Andrew Nicols 76ed567062 Merge branch 'MDL-60141-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-09-26 15:48:07 +08:00
Jake Dallimore 70c7be1c93 Merge branch 'MDL-60121-multi-enrol-backup-MOODLE_33_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_33_STABLE 2017-09-26 15:25:04 +08:00
Juan Leyva cb511fdfb6 MDL-60141 auth_email: Fix sitepolicy field type in get_signup_settings 2017-09-26 09:11:17 +02:00
Simey Lameze 2cb5968d25 MDL-60052 theme_bootstrapbase: proper handling of large modals 2017-09-26 11:20:26 +08:00
Andrew Nicols 2c9e28d2b8 Merge branch 'MDL-60052-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-09-26 09:40:30 +08:00
Andrew Nicols 620a05aa6a Merge branch 'MOODLE_33_STABLE' of https://github.com/ConnorSheremeta/moodle into MOODLE_33_STABLE 2017-09-26 09:26:10 +08:00
Eloy Lafuente (stronk7) 7969d430e1 Merge branch 'MDL-59505-33-gdrive' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-09-26 01:25:53 +02:00
Carson Tam 421a17f2a9 MDL-59931 mod_quiz: Fixing incorrect pagination count. 2017-09-25 12:49:29 -07:00
Eloy Lafuente (stronk7) abf2bf0175 Merge branch 'wip-MDL-60167-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-09-25 20:19:26 +02:00
Shamim Rezaie 0243d08185 MDL-57228 quiz editing: unit test for the move case 2017-09-25 12:55:01 +01:00
Tim Hunt 06a850c19e MDL-57228 quiz: fix editing when there are one-question sections
Fix based on a patch by Joost van der Borg <j.van.der.borg@ssr.nl>.
2017-09-25 12:55:00 +01:00
Marina Glancy 1ce18b558b MDL-60167 upgrade: Fix duplicate site registrations 2017-09-24 18:51:12 +08:00
Dan Poltawski 2f0bd18ad9 weekly release 3.3.2+ 2017-09-22 12:43:18 +01:00
Dan Poltawski fdf3d9bda5 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-09-22 12:43:17 +01:00
David Mudrák a89500f81f MDL-60210 admin: Check if the site needs upgrade on admin/search.php too
The page admin/search.php is the default administration page in Boost
based themes. It should behave the same as admin/index.php or
my/index.php and check if the site needs upgrade.
2017-09-22 13:18:24 +02:00
Jun Pataleta 1a3a805c57 Merge branch 'MDL-37810-33-fix' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-22 10:54:51 +08:00
Ryan Wyllie aecfdf39dd MDL-60052 javascript: fix large styling for modals 2017-09-22 10:00:02 +08:00
Damyon Wiese 1595d0d44f MDL-59220 setuplib: Redirect on https mismatch
When the wwwroot indicates https support and a page is accessed over http,
redirect to the wwwroot. This is a better experience than displaying an error.

Backport of MDL-58318.
2017-09-22 09:46:45 +08:00
David Mudrák d12b219aae MDL-59505 oauth2: Fix storage of access controlled links
When files are copied into the system account's drive, they are put into
folders respecting the structure of contexts. Folder names were based on
context names only and so were likely to collide (such as with users
with the same name).

The patch ads context instance identifiers to the name so that they can
be identified more reliably.
2017-09-21 22:15:47 +02:00
AMOS bot 205ede3084 Automatically generated installer lang files 2017-09-22 00:08:18 +08:00
AMOS bot 4b2ae7cb3f Automatically generated installer lang files 2017-09-22 00:08:18 +08:00
Jake Dallimore bf9e1794d8 MDL-37810 roles: fix profile roles logic to include all roles
If the user has the role:assign capability then the list of profile roles
will include any role assigned in the context or above.
2017-09-21 22:26:18 +08:00
AMOS bot 025ce03039 Automatically generated installer lang files 2017-09-21 00:06:17 +08:00
Eloy Lafuente (stronk7) cf06189838 Merge branch 'MDL-60132-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-09-19 22:38:49 +02:00
David Mudrák 43868ab6d4 MDL-59645 flickrlib: Show debug notice when using legacy authentication 2017-09-19 14:39:43 +02:00
David Mudrák 4a821e2db0 MDL-59645 portfolio_flickr: Make the Flickr portfolio export work again
The patch modifies the Flickr portfolio to make it use of the new oauth1
based client.
2017-09-19 14:39:42 +02:00
David Mudrák e674b4d4a9 MDL-59645 repository_flickr: Drop legacy auth tokens and nsids
The values stored in these user preferences were valid for the old
flickr auth mechanism and are not usable any more. The new oauth1 based
version needs to store both the token (in the flickr_access_token
preference) and the token secret (flickr_access_token_secret). The new
version does not need to store the user's nsid.

The cryptic names of these legacy settings are a result of how dealing
with user preferences was originally implemented.
2017-09-19 14:39:42 +02:00
David Mudrák 4f7ef6fed3 MDL-59645 repository_flickr: Make the Flickr repository work again
The patch makes the Flickr repository use the new oauth1 based client.
Beside that, other improvements include:

* Does not attempt to guess the photo URL any more. Instead uses
  url_sq and url_o extras of the flickr.photos.search call.
* The photos.search does not return the information about the photo size
  so we set it to null (previously was returned as 'unknown' which made
  it be displayed as zero).
* Does not perform additional API request to obtain the manage URL, uses
  https://www.flickr.com/photos/organize instead.
2017-09-19 14:39:42 +02:00
David Mudrák 46ca89ea8b MDL-59645 oauth1: Implement a new simple Flickr API client
Flickr has switched over to OAuth 1.0 based authentication. This is a
simple client allowing Moodle to perform authenticated calls to the
Flickr API.
2017-09-19 14:39:42 +02:00
David Mudrák 54525dd238 MDL-59645 oauth1: Improve reporting of token errors
Provide a more meaningful error message and debuginfo allowing to
diagnose what is going on. In case of flickr, this is typically thrown
when flickr API responses with their "bad, bad panda" HTML page instead
of the expected reply.
2017-09-19 14:39:42 +02:00
David Mudrák fde6b9ef06 MDL-59645 oauth1: Pass oauth_callback only to obtain the request token
As per the oauth1 spec, the oauth_callback is supposed to be passed only
when obtaining the initial request token. The client used to append it
automatically to all requests which broke the request signature.
2017-09-19 14:39:42 +02:00
Matt Petro ae8ce02b74 MDL-60121 enrol: Fix enrol plugin backup
Allow more than one enrol plugin to add backup structure.
2017-09-19 07:07:21 -04:00
Jun Pataleta cacef68723 Merge branch 'MDL-60048-33' of https://github.com/Kathrin84/moodle into MOODLE_33_STABLE 2017-09-19 17:21:25 +08:00
Dan Poltawski 843f487c22 Merge branch 'MDL-60018-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-09-19 07:28:07 +01:00
Eloy Lafuente (stronk7) eb0019a7ac Merge branch 'MDL-60105_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2017-09-19 01:56:45 +02:00
Eloy Lafuente (stronk7) 84ecc2a5eb Merge branch 'MDL-52131-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-09-19 01:53:33 +02:00
Eloy Lafuente (stronk7) 920fe36776 Merge branch 'MDL-37810-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-19 01:48:14 +02:00
Eloy Lafuente (stronk7) aa05704599 Merge branch 'MDL-53244_33_STABLE' of git://github.com/Chocolate-lightning/moodle into MOODLE_33_STABLE 2017-09-19 01:43:25 +02:00
Jake Dallimore bbb818a6e1 MDL-37810 roles: added manager case to test_get_user_roles_in_course()
Managers can assign managers, and should be able to see that role on
the course profile page, as a link to the participants page.
2017-09-18 10:21:07 +08:00
Jun Pataleta b5c6c217d9 Merge branch 'MDL-59994-33-v2' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-09-18 09:10:04 +08:00
Jake Dallimore 71d5abb422 MDL-37810 roles: get_user_roles_in_course returns all relevant roles
Fixed to return both those roles in the profileroles site policy and
any roles which the current user can assign in the respective context,
meaning a user can see a link to any role they can assign.
2017-09-18 09:00:31 +08:00
Jake Dallimore a8f69dbed0 MDL-37810 roles: unit tests for get_profile_roles() 2017-09-18 09:00:31 +08:00
Jake Dallimore 12ede4f87f MDL-37810 roles: fix get_profile_roles() so it returns assignable roles 2017-09-18 09:00:31 +08:00
Simey Lameze f2fc4bccf4 MDL-59994 competency: improve user competency unit test 2017-09-18 08:33:03 +08:00
Simey Lameze 486a9a4d9b MDL-59994 competency: dont list competencies from deleted users 2017-09-18 08:33:03 +08:00
Dan Poltawski 50126511aa weekly release 3.3.2+ 2017-09-15 08:49:29 +01:00
Dan Poltawski 766a2d3364 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-09-15 08:49:28 +01:00
Kathrin Osswald e95beb73b9 MDL-60048 theme_boost: Center logo within the navbar
My solution is to remove the padding that's added within scss/bootstrap/_navbar.scss (line 72)
for the case that a logo (has-logo) is uploaded and displayed within the navbar.
Removing this padding will center the image within the navbar.
2017-09-14 13:51:05 +02:00
Juan Leyva 308bf50e76 MDL-60132 tool_mobile: Handle correctly moodle_url instances
In Moodle there are some functions that can be overridden by themes.
Some themes are returning incorrect value types in those functions
2017-09-14 12:17:56 +02:00
Juan Segarra Montesinos 2352074dc0 MDL-52131 qbehaviour: respect manualcomment format
The format of a manual comment in a question is respected when
the preferred editor is "Plain text area".
2017-09-14 13:31:15 +08:00
Matt Clarkson 3ee0495c62 MDL-60105 mod_folder: Set timemodified on change
Changes to the folder contents were not resulting in the
timemodied of the folder activity being set. This prevented
global search from picking up the changes.
2017-09-13 13:53:29 +02:00
Matt Clarkson d2d9e5a864 MDL-60105 search: Fix fatal error
If an indexed file has been modified or deleted the search index
will still reference the old file. Remove the file from search
results until the change has been indexed.
2017-09-13 13:53:28 +02:00
AMOS bot 6c581c9648 Automatically generated installer lang files 2017-09-13 00:06:45 +08:00
Dan Poltawski 9da6b92faf Merge branch 'MDL-60039_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2017-09-12 11:24:20 +01:00
David Monllao 0d27d706c6 MDL-60039 search: Force messaging search areas to be reindexed 2017-09-12 11:59:13 +02:00
David Monllao 2e35af9cc2 MDL-60039 messaging: global search index using timeread 2017-09-12 11:57:34 +02:00
Dan Poltawski bd50f5f555 Merge branch 'MDL-59929_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-09-12 10:56:01 +01:00
Eloy Lafuente (stronk7) edb25d4f25 Merge branch 'MDL-60086-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-12 09:56:31 +02:00
David Monllao fc24fb7af0 Merge branch 'MDL-59399-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-09-12 08:12:37 +02:00
David Monllao bd1e060c8f Merge branch 'MDL-59867-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-09-12 07:11:03 +02:00
David Monllao e79467c0d8 Merge branch 'MDL-59879-33' of https://github.com/abias/moodle into MOODLE_33_STABLE 2017-09-12 07:04:45 +02:00
Jake Dallimore 822ccfdb31 MDL-60086 travis: Bumping the postgres version to 9.6
3.2 was bumped to 9.6, this makes the change across the board.
2017-09-12 09:35:23 +08:00
Eloy Lafuente (stronk7) f69b9181c6 Merge branch 'MDL-59478-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-09-12 00:23:54 +02:00
Eloy Lafuente (stronk7) 9e5ae58959 Merge branch 'wip-MDL-59808-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-09-12 00:13:43 +02:00
Eloy Lafuente (stronk7) e3db987f32 Merge branch 'MDL-60025-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-09-11 23:50:54 +02:00
Dan Poltawski 1298a03670 Merge branch 'MDL-35849-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-09-11 14:19:49 +01:00
Jun Pataleta 67d18f8804 Merge branch 'MDL-60031-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-09-11 13:57:10 +08:00
Jun Pataleta 5383687f30 Merge branch 'wip-MDL-55849-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-09-11 13:27:50 +08:00
Adrian Greeve 9a1d82de52 MDL-55849 mod_assign: Behat update for group submission reopening. 2017-09-11 12:43:09 +08:00
Adrian Greeve 5a469543b0 MDL-55849 mod_assign: Reopening assignments only increases by one.
Group assignments when being reopened will only increase the
attempt total by one.
2017-09-11 12:43:08 +08:00
Mathew May c92f6d056a MDL-53244 login: Add error message for recaptcha 2017-09-08 13:03:49 +12:00
Damyon Wiese 1f672ef01b MDL-59867 autocomplete: Prevent duplicate ids.
Rendering a form with 2 autocompletes in it can get messed up because of duplicated ids.
2017-09-07 09:33:09 +08:00
Marina Glancy 50464573be MDL-59808 webservice_rest: comply with restformat argument 2017-09-07 08:34:49 +08:00
Juan Leyva 2f373db92b MDL-60025 mod_book: Return correct values for chapters update time
Instead returning the time when the chapter was created or modified we
were returning the time when the book was created or modified.
2017-09-06 12:38:27 +02:00
Juan Leyva 0272abac15 MDL-60018 mod_chat: Fix chatmethod field type in get_chats_by_courses WS 2017-09-06 12:16:33 +02:00
Marina Glancy 65bad3744d MDL-60033 webservice_xmlrpc: extra escaping in the server URL 2017-09-06 13:44:16 +08:00
Ryan Wyllie 8c4508ffb5 MDL-59399 atto: make media plugin shortform explandable 2017-09-06 05:28:03 +00:00
Andrew Nicols 5188941881 MDL-60031 admin: Move risk longtext to pix title 2017-09-06 10:24:11 +08:00
Ankit Agarwal f8da314e59 MDL-35849 login: Add role alert to error messages
Error messages should be prominent to screen readers as well as visual users,
adding the role alert is recommended way to achieve it for screen readers and this is
also what we do for ->notification apis
2017-09-05 12:50:14 +05:30
Connor Sheremeta 2479e3742b MDL-54540 lti: Add allowfullscreen attribute to LTI IFrames 2017-08-29 13:48:19 -06:00
Jun Pataleta 8c49ddd994 MDL-59478 mod_scorm: Fix setting of default completion rule 2017-08-25 20:06:54 +08:00
Tim Hunt abb4e64e37 MDL-59929 signup: inprove usability when duplicate email entered 2017-08-24 16:33:15 +01:00
Alexander Bias 591ff7634d MDL-59879 navigation: Add node key to competencies navigation node 2017-08-21 10:59:00 +02:00
778 changed files with 26353 additions and 2182 deletions
+1
View File
@@ -1,4 +1,5 @@
**/yui/build/** -diff
**/amd/build/** -diff
lib/dml/oci_native_moodle_package.sql text eol=lf
theme/bootstrapbase/style/editor.css -diff
theme/bootstrapbase/style/moodle.css -diff
+3 -6
View File
@@ -17,7 +17,7 @@ php:
- 5.6
addons:
postgresql: "9.3"
postgresql: "9.6"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
@@ -53,12 +53,9 @@ matrix:
fast_finish: true
include:
# Run grunt/npm install on lowest supported npm version
- php: 7.1
env: DB=none TASK=GRUNT NVM_VERSION='4'
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7.1
env: DB=none TASK=GRUNT NVM_VERSION='node'
env: DB=none TASK=GRUNT NVM_VERSION='8.9'
exclude:
# MySQL - it's just too slow.
@@ -95,7 +92,7 @@ install:
sudo service postgresql stop
sudo mv /var/lib/postgresql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/postgresql /var/lib/postgresql
sudo service postgresql start 9.3
sudo service postgresql start 9.6
fi
- >
if [ "$TASK" = 'PHPUNIT' ];
+6
View File
@@ -165,6 +165,12 @@ function print_auth_lock_options($auth, $user_fields, $helptext, $retrieveopts,
// If custom field then pick name from database.
$fieldshortname = str_replace('profile_field_', '', $fieldname);
$fieldname = $customfieldname[$fieldshortname]->name;
if (core_text::strlen($fieldshortname) > 67) {
// If custom profile field name is longer than 67 characters we will not be able to store the setting
// such as 'field_updateremote_profile_field_NOTSOSHORTSHORTNAME' in the database because the character
// limit for the setting name is 100.
continue;
}
} elseif ($fieldname == 'url') {
$fieldname = get_string('webpage');
} else {
+13 -9
View File
@@ -54,14 +54,16 @@ $statusmsg = '';
$errormsg = '';
if ($data = data_submitted() and confirm_sesskey()) {
if (admin_write_settings($data)) {
$statusmsg = get_string('changessaved');
}
$count = admin_write_settings($data);
if (empty($adminroot->errors)) {
switch ($return) {
case 'site': redirect("$CFG->wwwroot/");
case 'admin': redirect("$CFG->wwwroot/$CFG->admin/");
// No errors. Did we change any setting? If so, then indicate success.
if ($count) {
$statusmsg = get_string('changessaved');
} else {
switch ($return) {
case 'site': redirect("$CFG->wwwroot/");
case 'admin': redirect("$CFG->wwwroot/$CFG->admin/");
}
}
} else {
$errormsg = get_string('errorwithsettings', 'admin');
@@ -73,7 +75,7 @@ if ($data = data_submitted() and confirm_sesskey()) {
if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
$buttons = null;
if ($PAGE->user_allowed_editing()) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
@@ -127,7 +129,9 @@ if ($savebutton) {
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_heading($SITE->fullname);
$PAGE->set_button($buttons);
if ($buttons) {
$PAGE->set_button($buttons);
}
echo $OUTPUT->header();
+178
View File
@@ -1754,6 +1754,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1919,6 +1920,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2257,4 +2259,180 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.5" requires="3.1">
<UNICODE level="required">
<FEEDBACK>
<ON_ERROR message="unicoderequired" />
</FEEDBACK>
</UNICODE>
<DATABASE level="required">
<VENDOR name="mariadb" version="5.5.31" />
<VENDOR name="mysql" version="5.5.31" />
<VENDOR name="postgres" version="9.3" />
<VENDOR name="mssql" version="10.0" />
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="7.0.0" level="required">
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
<ON_CHECK message="pcreunicodewarning" />
</FEEDBACK>
</PCREUNICODE>
<PHP_EXTENSIONS>
<PHP_EXTENSION name="iconv" level="required">
<FEEDBACK>
<ON_ERROR message="iconvrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="mbstring" level="optional">
<FEEDBACK>
<ON_CHECK message="mbstringrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="curl" level="required">
<FEEDBACK>
<ON_ERROR message="curlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="openssl" level="required">
<FEEDBACK>
<ON_ERROR message="opensslrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="tokenizer" level="optional">
<FEEDBACK>
<ON_CHECK message="tokenizerrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlrpc" level="optional">
<FEEDBACK>
<ON_CHECK message="xmlrpcrecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="soap" level="optional">
<FEEDBACK>
<ON_CHECK message="soaprecommended" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="ctype" level="required">
<FEEDBACK>
<ON_ERROR message="ctyperequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zip" level="required">
<FEEDBACK>
<ON_ERROR message="ziprequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="zlib" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="gd" level="required">
<FEEDBACK>
<ON_ERROR message="gdrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="simplexml" level="required">
<FEEDBACK>
<ON_ERROR message="simplexmlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="spl" level="required">
<FEEDBACK>
<ON_ERROR message="splrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="pcre" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="dom" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xml" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="xmlreader" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="intl" level="required">
<FEEDBACK>
<ON_ERROR message="intlrequired" />
</FEEDBACK>
</PHP_EXTENSION>
<PHP_EXTENSION name="json" level="required">
</PHP_EXTENSION>
<PHP_EXTENSION name="hash" level="required"/>
<PHP_EXTENSION name="fileinfo" level="required"/>
</PHP_EXTENSIONS>
<PHP_SETTINGS>
<PHP_SETTING name="memory_limit" value="96M" level="required">
<FEEDBACK>
<ON_ERROR message="settingmemorylimit" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="file_uploads" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="settingfileuploads" />
</FEEDBACK>
</PHP_SETTING>
<PHP_SETTING name="opcache.enable" value="1" level="optional">
<FEEDBACK>
<ON_CHECK message="opcacherecommended" />
</FEEDBACK>
</PHP_SETTING>
</PHP_SETTINGS>
<CUSTOM_CHECKS>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_storage_engine" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbstorageengine" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="question/engine/upgrade/upgradelib.php" function="quiz_attempts_upgraded" level="required">
<FEEDBACK>
<ON_ERROR message="quizattemptsupgradedmessage" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_slasharguments" level="optional">
<FEEDBACK>
<ON_CHECK message="slashargumentswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_database_tables_row_format" level="optional">
<FEEDBACK>
<ON_CHECK message="unsupporteddbtablerowformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_unoconv_version" level="optional">
<FEEDBACK>
<ON_CHECK message="unoconvwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_libcurl_version" level="optional">
<FEEDBACK>
<ON_CHECK message="libcurlwarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_format" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfileformat" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_file_per_table" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddbfilepertable" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_large_prefix" level="required">
<FEEDBACK>
<ON_ERROR message="unsupporteddblargeprefix" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_is_https" level="optional">
<FEEDBACK>
<ON_CHECK message="ishttpswarning" />
</FEEDBACK>
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mysql_incomplete_unicode_support" level="optional">
<FEEDBACK>
<ON_CHECK message="incompleteunicodesupport" />
</FEEDBACK>
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
+3 -4
View File
@@ -29,9 +29,10 @@ require_once($CFG->libdir.'/adminlib.php');
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$returnurl = optional_param('returnurl', null, PARAM_LOCALURL);
admin_externalpage_setup('purgecaches');
// If we have got here as a confirmed aciton, do it.
if ($confirm && isloggedin() && confirm_sesskey()) {
require_capability('moodle/site:config', context_system::instance());
if ($confirm && confirm_sesskey()) {
// Valid request. Purge, and redirect the user back to where they came from.
purge_all_caches();
@@ -45,8 +46,6 @@ if ($confirm && isloggedin() && confirm_sesskey()) {
}
// Otherwise, show a button to actually purge the caches.
admin_externalpage_setup('purgecaches');
$actionurl = new moodle_url('/admin/purgecaches.php', array('sesskey'=>sesskey(), 'confirm'=>1));
if ($returnurl) {
$actionurl->param('returnurl', $returnurl);
+1 -1
View File
@@ -245,7 +245,7 @@ if ($roleid) {
$select = new single_select($PAGE->url, 'roleid', $nameswithcounts, $roleid, null);
$select->label = get_string('assignanotherrole', 'core_role');
echo $OUTPUT->render($select);
echo '<p><a href="' . $PAGE->url . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '<p><a href="' . $url . '">' . get_string('backtoallroles', 'core_role') . '</a></p>';
echo '</div>';
} else if (empty($assignableroles)) {
@@ -183,9 +183,14 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
public function get_risk_icon($type) {
global $OUTPUT;
$text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
$alt = get_string("{$type}short", "admin");
$title = get_string($type, "admin");
$text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), $alt, 'moodle', [
'title' => $title,
]);
$action = new popup_action('click', $this->risksurl, 'docspopup');
$riskicon = $OUTPUT->action_link($this->risksurl, $text, $action, array('title'=>get_string($type, 'admin')));
$riskicon = $OUTPUT->action_link($this->risksurl, $text, $action);
return $riskicon;
}
@@ -100,6 +100,8 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
$this->role->shortname = core_text::strtolower(clean_param($this->role->shortname, PARAM_ALPHANUMEXT));
if (empty($this->role->shortname)) {
$this->errors['shortname'] = get_string('errorbadroleshortname', 'core_role');
} else if (core_text::strlen($this->role->shortname) > 100) { // Check if it exceeds the max of 100 characters.
$this->errors['shortname'] = get_string('errorroleshortnametoolong', 'core_role');
}
}
if ($DB->record_exists_select('role', 'shortname = ? and id <> ?', array($this->role->shortname, $this->roleid))) {
@@ -476,7 +478,7 @@ class core_role_define_role_table_advanced extends core_role_capability_table_wi
}
protected function get_shortname_field($id) {
return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="254" value="' . s($this->role->shortname) . '"' .
return '<input type="text" id="' . $id . '" name="' . $id . '" maxlength="100" value="' . s($this->role->shortname) . '"' .
' class="form-control"/>';
}
+14 -5
View File
@@ -5,11 +5,19 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
redirect_if_major_upgrade_required();
$query = trim(optional_param('query', '', PARAM_NOTAGS)); // Search string
$context = context_system::instance();
$PAGE->set_context($context);
$hassiteconfig = has_capability('moodle/site:config', $context);
if ($hassiteconfig && moodle_needs_upgrading()) {
redirect(new moodle_url('/admin/index.php'));
}
admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page
$adminroot = admin_get_root(); // need all settings here
@@ -21,15 +29,16 @@ $focus = '';
// now we'll deal with the case that the admin has submitted the form with changed settings
if ($data = data_submitted() and confirm_sesskey() and isset($data->action) and $data->action == 'save-settings') {
require_capability('moodle/site:config', $context);
if (admin_write_settings($data)) {
redirect($PAGE->url, get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);
}
$count = admin_write_settings($data);
if (!empty($adminroot->errors)) {
$errormsg = get_string('errorwithsettings', 'admin');
$firsterror = reset($adminroot->errors);
$focus = $firsterror->id;
} else {
// No errors. Did we change any setting? If so, then redirect with success.
if ($count) {
redirect($PAGE->url, get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);
}
redirect($PAGE->url);
}
}
@@ -55,7 +64,7 @@ if ($errormsg !== '') {
$showsettingslinks = true;
if (has_capability('moodle/site:config', $context)) {
if ($hassiteconfig) {
require_once("admin_settings_search_form.php");
$form = new admin_settings_search_form();
$form->display();
+7 -3
View File
@@ -39,11 +39,15 @@ $statusmsg = '';
$errormsg = '';
if ($data = data_submitted() and confirm_sesskey()) {
if (admin_write_settings($data)) {
redirect($PAGE->url, get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);
}
$count = admin_write_settings($data);
// Regardless of whether any setting change was written (a positive count), check validation errors for those that didn't.
if (empty($adminroot->errors)) {
// No errors. Did we change any setting? If so, then redirect with success.
if ($count) {
redirect($PAGE->url, get_string('changessaved'), null, \core\output\notification::NOTIFY_SUCCESS);
}
// We didn't change a setting.
switch ($return) {
case 'site': redirect("$CFG->wwwroot/");
case 'admin': redirect("$CFG->wwwroot/$CFG->admin/");
+80
View File
@@ -0,0 +1,80 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Adds privacy and policies links to admin tree.
*
* @package core_privacy
* @copyright 2018 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
if ($hassiteconfig) {
// Privacy settings.
$temp = new admin_settingpage('privacysettings', new lang_string('privacysettings', 'admin'));
$options = array(
0 => get_string('no'),
1 => get_string('yes')
);
$url = new moodle_url('/admin/settings.php?section=supportcontact');
$url = $url->out();
$setting = new admin_setting_configselect('agedigitalconsentverification',
new lang_string('agedigitalconsentverification', 'admin'),
new lang_string('agedigitalconsentverification_desc', 'admin', $url), 0, $options);
$setting->set_force_ltr(true);
$temp->add($setting);
$setting = new admin_setting_agedigitalconsentmap('agedigitalconsentmap',
new lang_string('ageofdigitalconsentmap', 'admin'),
new lang_string('ageofdigitalconsentmap_desc', 'admin'),
// See {@link https://gdpr-info.eu/art-8-gdpr/}.
implode(PHP_EOL, [
'*, 16',
'AT, 14',
'CZ, 13',
'DE, 14',
'DK, 13',
'ES, 13',
'FI, 15',
'GB, 13',
'HU, 14',
'IE, 13',
'LT, 16',
'LU, 16',
'NL, 16',
'PL, 13',
'SE, 13',
]),
PARAM_RAW
);
$temp->add($setting);
$ADMIN->add('privacy', $temp);
// Policy settings.
$temp = new admin_settingpage('policysettings', new lang_string('policysettings', 'admin'));
$temp->add(new admin_settings_sitepolicy_handler_select('sitepolicyhandler', new lang_string('sitepolicyhandler', 'core_admin'),
new lang_string('sitepolicyhandler_desc', 'core_admin')));
$temp->add(new admin_setting_configtext('sitepolicy', new lang_string('sitepolicy', 'core_admin'),
new lang_string('sitepolicy_help', 'core_admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('sitepolicyguest', new lang_string('sitepolicyguest', 'core_admin'),
new lang_string('sitepolicyguest_help', 'core_admin'), (isset($CFG->sitepolicy) ? $CFG->sitepolicy : ''), PARAM_RAW));
$ADMIN->add('privacy', $temp);
}
+1 -2
View File
@@ -49,8 +49,7 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
3600 => new lang_string('numminutes', '', 60))));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', new lang_string('extendedusernamechars', 'admin'), new lang_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configtext('sitepolicy', new lang_string('sitepolicy', 'admin'), new lang_string('sitepolicy_help', 'admin'), '', PARAM_RAW));
$temp->add(new admin_setting_configtext('sitepolicyguest', new lang_string('sitepolicyguest', 'admin'), new lang_string('sitepolicyguest_help', 'admin'), (isset($CFG->sitepolicy) ? $CFG->sitepolicy : ''), PARAM_RAW));
$temp->add(new admin_setting_configcheckbox('extendedusernamechars', new lang_string('extendedusernamechars', 'admin'), new lang_string('configextendedusernamechars', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('keeptagnamecase', new lang_string('keeptagnamecase','admin'),new lang_string('configkeeptagnamecase', 'admin'),'1'));
+1
View File
@@ -35,6 +35,7 @@ $ADMIN->add('root', new admin_category('badges', new lang_string('badges'), empt
$ADMIN->add('root', new admin_category('location', new lang_string('location','admin')));
$ADMIN->add('root', new admin_category('language', new lang_string('language')));
$ADMIN->add('root', new admin_category('modules', new lang_string('plugins', 'admin')));
$ADMIN->add('root', new admin_category('privacy', new lang_string('privacyandpolicies', 'admin')));
$ADMIN->add('root', new admin_category('security', new lang_string('security','admin')));
$ADMIN->add('root', new admin_category('appearance', new lang_string('appearance','admin')));
$ADMIN->add('root', new admin_category('frontpage', new lang_string('frontpage','admin')));
+1 -1
View File
@@ -398,7 +398,7 @@ function print_combined_install_output($processes) {
// Show process name in first row.
foreach ($processes as $name => $process) {
// If we don't have enough space to show full run name then show runX.
if ($lengthofprocessline < strlen($name + 2)) {
if ($lengthofprocessline < strlen($name) + 2) {
$name = substr($name, -5);
}
// One extra padding as we are adding | separator for rest of the data.
+1 -1
View File
@@ -167,7 +167,7 @@ class api {
$params['roleid'] = $roleid;
$params['userid'] = $userid;
$sql = 'SELECT u.id AS userid, ra.id, ctx.id AS contextid
$sql = 'SELECT DISTINCT u.id AS userid, ra.id, ctx.id AS contextid
FROM {user} u
JOIN {cohort_members} cm ON u.id = cm.userid
JOIN {context} ctx ON u.id = ctx.instanceid AND ctx.contextlevel = :usercontext
@@ -98,7 +98,7 @@ class cohort_role_assignments_table extends table_sql {
);
$context = context_helper::instance_by_id($data->cohortcontextid);
$exporter = new \tool_lp\external\cohort_summary_exporter($record, array('context' => $context));
$exporter = new \core_cohort\external\cohort_summary_exporter($record, array('context' => $context));
$cohort = $exporter->export($OUTPUT);
$html = $OUTPUT->render_from_template('tool_cohortroles/cohort-in-list', $cohort);
+5
View File
@@ -159,6 +159,11 @@ class tool_customlang_utils {
$needsupdate = true;
$current[$stringid]->local = $stringlocal;
$current[$stringid]->timecustomized = $now;
} else if (isset($currentlocal) && $stringlocal !== $currentlocal) {
// If local string has been removed, we need to remove also the old local value from DB.
$needsupdate = true;
$current[$stringid]->local = null;
$current[$stringid]->timecustomized = $now;
}
if ($needsupdate) {
@@ -64,6 +64,7 @@
<li>
<a href="#">{{#str}}edit{{/str}}</a><b class="caret"></b>
<ul class="dropdown dropdown-menu">
{{#canmanage}}
<li class="dropdown-item">
<a href="#" data-action="edit">
{{#pix}}t/edit{{/pix}} {{#str}}edit{{/str}}
@@ -89,11 +90,13 @@
{{#pix}}t/down{{/pix}} {{#str}}movedown{{/str}}
</a>
</li>
{{/canmanage}}
<li class="dropdown-item">
<a href="#" data-action="linkedcourses">
{{#pix}}t/viewdetails{{/pix}} {{#str}}linkedcourses, tool_lp{{/str}}
</a>
</li>
{{#canmanage}}
<li class="dropdown-item">
<a href="#" data-action="relatedcompetencies">
{{#pix}}t/add{{/pix}} {{#str}}addcrossreferencedcompetency, tool_lp{{/str}}
@@ -104,6 +107,7 @@
{{#pix}}t/edit{{/pix}} {{#str}}competencyrule, tool_lp{{/str}}
</a>
</li>
{{/canmanage}}
</ul>
</li>
</ul>
@@ -112,11 +116,11 @@
<p data-region="competencyinfo">
{{#str}}nocompetencyselected, tool_lp{{/str}}
</p>
{{#canmanage}}
<div data-region="competencyactions">
{{#canmanage}}
<button class="btn btn-secondary" data-action="add">{{#pix}}t/add{{/pix}} <span data-region="term"></span></button>
{{/canmanage}}
</div>
{{/canmanage}}
</div>
</div>
</div>
+12 -4
View File
@@ -128,7 +128,7 @@ class api {
'rememberusername' => $CFG->rememberusername,
'authloginviaemail' => $CFG->authloginviaemail,
'registerauth' => $CFG->registerauth,
'forgottenpasswordurl' => $CFG->forgottenpasswordurl,
'forgottenpasswordurl' => clean_param($CFG->forgottenpasswordurl, PARAM_URL), // We may expect a mailto: here.
'authinstructions' => $authinstructions,
'authnoneenabled' => (int) is_enabled_auth('none'),
'enablewebservices' => $CFG->enablewebservices,
@@ -152,10 +152,11 @@ class api {
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
$settings['launchurl'] = $url->out(false);
if ($logourl = $OUTPUT->get_logo_url()) {
// Check that we are receiving a moodle_url object, themes can override get_logo_url and may return incorrect values.
if (($logourl = $OUTPUT->get_logo_url()) && $logourl instanceof moodle_url) {
$settings['logourl'] = $logourl->out(false);
}
if ($compactlogourl = $OUTPUT->get_compact_logo_url()) {
if (($compactlogourl = $OUTPUT->get_compact_logo_url()) && $compactlogourl instanceof moodle_url) {
$settings['compactlogourl'] = $compactlogourl->out(false);
}
@@ -210,12 +211,19 @@ class api {
}
if (empty($section) or $section == 'sitepolicies') {
$manager = new \core_privacy\local\sitepolicy\manager();
$settings->sitepolicy = ($sitepolicy = $manager->get_embed_url()) ? $sitepolicy->out(false) : '';
$settings->sitepolicyhandler = $CFG->sitepolicyhandler;
$settings->disableuserimages = $CFG->disableuserimages;
}
if (empty($section) or $section == 'gradessettings') {
require_once($CFG->dirroot . '/user/lib.php');
$settings->mygradesurl = user_mygrades_url()->out(false);
$settings->mygradesurl = user_mygrades_url();
// The previous function may return moodle_url instances or plain string URLs.
if ($settings->mygradesurl instanceof moodle_url) {
$settings->mygradesurl = $settings->mygradesurl->out(false);
}
}
if (empty($section) or $section == 'mobileapp') {
+1
View File
@@ -23,6 +23,7 @@
*/
namespace tool_mobile;
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/externallib.php");
+2 -2
View File
@@ -24,7 +24,7 @@
$string['androidappid'] = 'Android app\'s unique identifier';
$string['androidappid_desc'] = 'This setting may be left as default unless you have a custom Android app.';
$string['autologinkeygenerationlockout'] = 'Auto-login key generation is blocked because of too many requests within an hour.';
$string['autologinkeygenerationlockout'] = 'Auto-login key generation is blocked. You need to wait 6 minutes between requests.';
$string['autologinnotallowedtoadmins'] = 'Auto-login is not allowed for site admins.';
$string['cachedef_plugininfo'] = 'This stores the list of plugins with mobile addons';
$string['clickheretolaunchtheapp'] = 'Click here if the app does not open automatically.';
@@ -74,4 +74,4 @@ $string['smartappbanners'] = 'App Banners';
$string['pluginnotenabledorconfigured'] = 'Plugin not enabled or configured.';
$string['remoteaddons'] = 'Remote add-ons';
$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. If using SSO, autologinguests should be disabled.';
$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.';
@@ -97,11 +97,13 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
set_config('typeoflogin', api::LOGIN_VIA_BROWSER, 'tool_mobile');
set_config('logo', 'mock.png', 'core_admin');
set_config('logocompact', 'mock.png', 'core_admin');
set_config('forgottenpasswordurl', 'mailto:fake@email.zy'); // Test old hack.
list($authinstructions, $notusedformat) = external_format_text($authinstructions, FORMAT_MOODLE, $context->id);
$expected['registerauth'] = 'email';
$expected['authinstructions'] = $authinstructions;
$expected['typeoflogin'] = api::LOGIN_VIA_BROWSER;
$expected['forgottenpasswordurl'] = ''; // Expect empty when it's not an URL.
if ($logourl = $OUTPUT->get_logo_url()) {
$expected['logourl'] = $logourl->out(false);
@@ -123,6 +125,10 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
require_once($CFG->dirroot . '/course/format/lib.php');
$this->resetAfterTest(true);
$mysitepolicy = 'http://mysite.is/policy/';
set_config('sitepolicy', $mysitepolicy);
$result = external::get_config();
$result = external_api::clean_returnvalue(external::get_config_returns(), $result);
@@ -143,6 +149,8 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
array('name' => 'numsections', 'value' => course_get_format($SITE)->get_last_section_number()),
array('name' => 'newsitems', 'value' => $SITE->newsitems),
array('name' => 'commentsperpage', 'value' => $CFG->commentsperpage),
array('name' => 'sitepolicy', 'value' => $mysitepolicy),
array('name' => 'sitepolicyhandler', 'value' => ''),
array('name' => 'disableuserimages', 'value' => $CFG->disableuserimages),
array('name' => 'mygradesurl', 'value' => user_mygrades_url()->out(false)),
array('name' => 'tool_mobile_forcelogout', 'value' => 0),
+3 -3
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="tool/monitor/db" VERSION="20141103" COMMENT="XMLDB file for Moodle tool/monitor"
<XMLDB PATH="admin/tool/monitor/db" VERSION="20141103" COMMENT="XMLDB file for Moodle tool/monitor"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="tool_monitor_rules" COMMENT="Table to store rules">
@@ -79,4 +79,4 @@
</KEYS>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>
@@ -78,6 +78,10 @@ class issuer extends persistent {
$mform->addRule('clientsecret', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addHelpButton('clientsecret', 'issuerclientsecret', 'tool_oauth2');
// Use basic authentication.
$mform->addElement('checkbox', 'basicauth', get_string('usebasicauth', 'tool_oauth2'));
$mform->addHelpButton('basicauth', 'usebasicauth', 'tool_oauth2');
// Login scopes.
$mform->addElement('text', 'loginscopes', get_string('issuerloginscopes', 'tool_oauth2'));
$mform->addRule('loginscopes', null, 'required', null, 'client');
@@ -93,6 +93,8 @@ $string['systemaccountconnected_help'] = 'System accounts are used to provide ad
$string['systemaccountconnected'] = 'System account connected';
$string['systemaccountnotconnected'] = 'System account not connected';
$string['systemauthstatus'] = 'System account connected';
$string['usebasicauth'] = 'Authenticate token requests via HTTP headers';
$string['usebasicauth_help'] = 'Utilise the HTTP Basic authentication scheme when sending client ID and password with a refresh token request. Recommended by the OAuth 2 standard, but may not be available with some issuers.';
$string['userfieldexternalfield'] = 'External field name';
$string['userfieldexternalfield_help'] = 'Name of the field provided by the external OAuth system.';
$string['userfieldinternalfield_help'] = 'Name of the Moodle user field that should be mapped from the external field.';
+3 -3
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="tool/recyclebin/db" VERSION="20160315" COMMENT="XMLDB file for Moodle tool/recyclebin"
<XMLDB PATH="admin/tool/recyclebin/db" VERSION="20160315" COMMENT="XMLDB file for Moodle tool/recyclebin"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="tool_recyclebin_course" COMMENT="A list of items in the course recycle bin">
@@ -38,4 +38,4 @@
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>
@@ -9,6 +9,7 @@ Feature: Basic recycle bin functionality
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher@asd.com |
| student1 | Student | 1 | student@asd.com |
| student2 | Student | 2 | student2@asd.com |
And the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
@@ -16,6 +17,23 @@ Feature: Basic recycle bin functionality
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C2 | editingteacher |
| student1 | C2 | student |
| student2 | C2 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group A | C2 | G1 |
| Group B | C2 | G2 |
| Group C | C2 | G3 |
And the following "group members" exist:
| user | group |
| teacher1 | G1 |
| teacher1 | G2 |
| student1 | G1 |
| student2 | G1 |
| student2 | G2 |
And the following config values are set as admin:
| coursebinenable | 1 | tool_recyclebin |
| categorybinenable | 1 | tool_recyclebin |
@@ -58,6 +76,12 @@ Feature: Basic recycle bin functionality
And I wait to be redirected
And I go to the courses management page
And I should see "Course 2" in the "#course-listing" "css_element"
And I am on "Course 2" course homepage
And I navigate to "Groups" node in "Course administration > Users"
And I follow "Overview"
And "Student 1" "text" should exist in the "Group A" "table_row"
And "Student 2" "text" should exist in the "Group A" "table_row"
And "Student 2" "text" should exist in the "Group B" "table_row"
@javascript
Scenario: Deleting a single item from the recycle bin
@@ -22,6 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_templatelibrary;
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/externallib.php");
+1 -1
View File
@@ -358,7 +358,7 @@ if ($formdata = $mform2->is_cancelled()) {
// add default values for remaining fields
$formdefaults = array();
if ($updatetype != UU_UPDATE_FILEOVERRIDE && $updatetype != UU_UPDATE_NOCHANGES) {
if (!$existinguser || ($updatetype != UU_UPDATE_FILEOVERRIDE && $updatetype != UU_UPDATE_NOCHANGES)) {
foreach ($STD_FIELDS as $field) {
if (isset($user->$field)) {
continue;
+1 -1
View File
@@ -37,7 +37,7 @@ class admin_uploadpicture_form extends moodleform {
$options = array();
$options['accepted_types'] = array('archive');
$options['accepted_types'] = array('.zip');
$mform->addElement('filepicker', 'userpicturesfile', get_string('file'), 'size="40"', $options);
$mform->addRule('userpicturesfile', null, 'required');
@@ -38,6 +38,31 @@ Feature: Upload users
And I set the field "groups" to "Section 1 (1)"
And the "members" select box should contain "Tom Jones"
@javascript
Scenario: Upload users enrolling them on courses and groups applying defaults
Given the following "courses" exist:
| fullname | shortname | category |
| Maths | math102 | 0 |
And the following "groups" exist:
| name | course | idnumber |
| Section 1 | math102 | S1 |
| Section 3 | math102 | S3 |
And I log in as "admin"
And I navigate to "Upload users" node in "Site administration > Users > Accounts"
When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
And I press "Upload users"
And I set the following fields to these values:
| City/town | Brighton |
| Department | Purchasing |
And I press "Upload users"
And I press "Continue"
And I navigate to "Users > Accounts > Browse list of users" in site administration
And I should see "Tom Jones"
And I follow "Tom Jones"
And I follow "Edit profile"
And the field "City/town" matches value "Brighton"
And the field "Department" matches value "Purchasing"
@javascript
Scenario: Upload users with custom profile fields
# Create user profile field.
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
define(["core/ajax","tool_usertours/tour","jquery","core/templates","core/str","core/log","core/notification"],function(a,b,c,d,e,f,g){var h={tourId:null,currentTour:null,context:null,init:function(a,b,d){h.tourId=a,h.context=d,"undefined"==typeof b&&(b=!0),b&&h.fetchTour(a),h.addResetLink(),c("body").on("click",'[data-action="tool_usertours/resetpagetour"]',function(a){a.preventDefault(),h.resetTourState(h.tourId)})},fetchTour:function(b){c.when(a.call([{methodname:"tool_usertours_fetch_and_start_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0],d.render("tool_usertours/tourstep",{})).then(function(a,c){h.startBootstrapTour(b,c[0],a.tourconfig)}).fail(g.exception)},addResetLink:function(){e.get_string("resettouronpage","tool_usertours").done(function(a){c("footer, .logininfo").last().append('<div class="usertour"><a href="#" data-action="tool_usertours/resetpagetour">'+a+"</a></div>")})},startBootstrapTour:function(a,c,d){h.currentTour&&(d.onEnd=null,h.currentTour.endTour(),delete h.currentTour),d.eventHandlers={afterEnd:[h.markTourComplete],afterRender:[h.markStepShown]},d.tourName=d.name,delete d.name,d.template=c,d.steps=d.steps.map(function(a){return"undefined"!=typeof a.element&&(a.target=a.element,delete a.element),"undefined"!=typeof a.reflex&&(a.moveOnClick=!!a.reflex,delete a.reflex),"undefined"!=typeof a.content&&(a.body=a.content,delete a.content),a}),h.currentTour=new b(d),h.currentTour.startTour()},markStepShown:function(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_step_shown",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},markTourComplete:function(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_complete_tour",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},resetTourState:function(b){c.when(a.call([{methodname:"tool_usertours_reset_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0]).then(function(a){a.startTour&&h.fetchTour(a.startTour)}).fail(g.exception)}};return{init:h.init,resetTourState:h.resetTourState}});
define(["core/ajax","tool_usertours/tour","jquery","core/templates","core/str","core/log","core/notification"],function(a,b,c,d,e,f,g){var h={tourId:null,currentTour:null,context:null,init:function(a,b,d){h.tourId=a,h.context=d,"undefined"==typeof b&&(b=!0),b&&h.fetchTour(a),h.addResetLink(),c("body").on("click",'[data-action="tool_usertours/resetpagetour"]',function(a){a.preventDefault(),h.resetTourState(h.tourId)})},fetchTour:function(b){M.util.js_pending("admin_usertour_fetchTour"+b),c.when(a.call([{methodname:"tool_usertours_fetch_and_start_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0],d.render("tool_usertours/tourstep",{})).then(function(a,c){return h.startBootstrapTour(b,c[0],a.tourconfig)}).always(function(){M.util.js_complete("admin_usertour_fetchTour"+b)}).fail(g.exception)},addResetLink:function(){M.util.js_pending("admin_usertour_addResetLink"),e.get_string("resettouronpage","tool_usertours").done(function(a){c("footer, .logininfo").last().append('<div class="usertour"><a href="#" data-action="tool_usertours/resetpagetour">'+a+"</a></div>")}).always(function(){M.util.js_complete("admin_usertour_addResetLink")}).fail()},startBootstrapTour:function(a,c,d){return h.currentTour&&(d.onEnd=null,h.currentTour.endTour(),delete h.currentTour),d.eventHandlers={afterEnd:[h.markTourComplete],afterRender:[h.markStepShown]},d.tourName=d.name,delete d.name,d.template=c,d.steps=d.steps.map(function(a){return"undefined"!=typeof a.element&&(a.target=a.element,delete a.element),"undefined"!=typeof a.reflex&&(a.moveOnClick=!!a.reflex,delete a.reflex),"undefined"!=typeof a.content&&(a.body=a.content,delete a.content),a}),h.currentTour=new b(d),h.currentTour.startTour()},markStepShown:function(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_step_shown",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},markTourComplete:function(){var b=this.getStepConfig(this.getCurrentStepNumber());c.when(a.call([{methodname:"tool_usertours_complete_tour",args:{tourid:h.tourId,context:h.context,pageurl:window.location.href,stepid:b.stepid,stepindex:this.getCurrentStepNumber()}}])[0]).fail(f.error)},resetTourState:function(b){c.when(a.call([{methodname:"tool_usertours_reset_tour",args:{tourid:b,context:h.context,pageurl:window.location.href}}])[0]).then(function(a){a.startTour&&h.fetchTour(a.startTour)}).fail(g.exception)}};return{init:h.init,resetTourState:h.resetTourState}});
+92 -3
View File
@@ -634,6 +634,24 @@ Tour.prototype.processStepListeners = function (stepConfig) {
args: ['click', '[data-role="end"]', $.proxy(this.endTour, this)]
},
// Click backdrop and hide tour.
{
node: $('[data-flexitour="backdrop"]'),
args: ['click', $.proxy(this.hide, this)]
},
// Click out and hide tour without backdrop.
{
node: $('body'),
args: ['click', $.proxy(function (e) {
// Handle click in or click out tour content,
// if click out, hide tour.
if (!this.currentStepNode.is(e.target) && $(e.target).closest('[data-role="flexitour-step"]').length === 0) {
this.hide();
}
}, this)]
},
// Keypresses.
{
node: $('body'),
@@ -904,7 +922,7 @@ Tour.prototype.announceStep = function (stepConfig) {
* @param {EventFacade} e
*/
Tour.prototype.handleKeyDown = function (e) {
var tabbableSelector = 'a[href], link[href], [draggable=true], [contenteditable=true], :input:enabled, [tabindex], button';
var tabbableSelector = 'a[href], link[href], [draggable=true], [contenteditable=true], :input:enabled, [tabindex], button:enabled';
switch (e.keyCode) {
case 27:
this.endTour();
@@ -923,8 +941,17 @@ Tour.prototype.handleKeyDown = function (e) {
var activeElement = $(document.activeElement);
var stepTarget = this.getStepTarget(this.currentStepConfig);
var tabbableNodes = $(tabbableSelector);
var dialogContainer = $('span[data-flexitour="container"]');
var currentIndex = void 0;
tabbableNodes.filter(function (index, element) {
// Filter out element which is not belong to target section or dialogue.
if (stepTarget) {
tabbableNodes = tabbableNodes.filter(function (index, element) {
return stepTarget != null && (stepTarget.has(element).length || dialogContainer.has(element).length || stepTarget.is(element) || dialogContainer.is(element));
});
}
// Find index of focusing element.
tabbableNodes.each(function (index, element) {
if (activeElement.is(element)) {
currentIndex = index;
return false;
@@ -934,7 +961,7 @@ Tour.prototype.handleKeyDown = function (e) {
var nextIndex = void 0;
var nextNode = void 0;
var focusRelevant = void 0;
if (currentIndex) {
if (currentIndex != void 0) {
var direction = 1;
if (e.shiftKey) {
direction = -1;
@@ -1090,6 +1117,16 @@ Tour.prototype.hide = function (transition) {
$(this).remove();
});
// Remove aria-describedby and tabindex attributes.
if (this.currentStepNode && this.currentStepNode.length) {
var stepId = this.currentStepNode.attr('id');
if (stepId) {
var currentStepElement = '[aria-describedby="' + stepId + '-body"]';
$(currentStepElement).removeAttr('tabindex');
$(currentStepElement).removeAttr('aria-describedby');
}
}
// Reset the listeners.
this.resetStepListeners();
@@ -1224,6 +1261,58 @@ Tour.prototype.positionStep = function (stepConfig) {
arrow: {
element: '[data-role="arrow"]'
}
},
onCreate: function onCreate(data) {
recalculateArrowPosition(data);
},
onUpdate: function onUpdate(data) {
recalculateArrowPosition(data);
}
};
var recalculateArrowPosition = function recalculateArrowPosition(data) {
var placement = data.placement.split('-')[0];
var isVertical = ['left', 'right'].indexOf(placement) !== -1;
var arrowElement = data.instance.popper.querySelector('[data-role="arrow"]');
var stepElement = $(data.instance.popper.querySelector('[data-role="flexitour-step"]'));
if (isVertical) {
var arrowHeight = parseFloat(window.getComputedStyle(arrowElement).height);
var arrowOffset = parseFloat(window.getComputedStyle(arrowElement).top);
var popperHeight = parseFloat(window.getComputedStyle(data.instance.popper).height);
var popperOffset = parseFloat(window.getComputedStyle(data.instance.popper).top);
var popperBorderWidth = parseFloat(stepElement.css('borderTopWidth'));
var popperBorderRadiusWidth = parseFloat(stepElement.css('borderTopLeftRadius')) * 2;
var arrowPos = arrowOffset + arrowHeight / 2;
var maxPos = popperHeight + popperOffset - popperBorderWidth - popperBorderRadiusWidth;
var minPos = popperOffset + popperBorderWidth + popperBorderRadiusWidth;
if (arrowPos >= maxPos || arrowPos <= minPos) {
var newArrowPos = 0;
if (arrowPos > popperHeight / 2) {
newArrowPos = maxPos - arrowHeight;
} else {
newArrowPos = minPos + arrowHeight;
}
$(arrowElement).css('top', newArrowPos);
}
} else {
var arrowWidth = parseFloat(window.getComputedStyle(arrowElement).width);
var _arrowOffset = parseFloat(window.getComputedStyle(arrowElement).left);
var popperWidth = parseFloat(window.getComputedStyle(data.instance.popper).width);
var _popperOffset = parseFloat(window.getComputedStyle(data.instance.popper).left);
var _popperBorderWidth = parseFloat(stepElement.css('borderTopWidth'));
var _popperBorderRadiusWidth = parseFloat(stepElement.css('borderTopLeftRadius')) * 2;
var _arrowPos = _arrowOffset + arrowWidth / 2;
var _maxPos = popperWidth + _popperOffset - _popperBorderWidth - _popperBorderRadiusWidth;
var _minPos = _popperOffset + _popperBorderWidth + _popperBorderRadiusWidth;
if (_arrowPos >= _maxPos || _arrowPos <= _minPos) {
var _newArrowPos = 0;
if (_arrowPos > popperWidth / 2) {
_newArrowPos = _maxPos - arrowWidth;
} else {
_newArrowPos = _minPos + arrowWidth;
}
$(arrowElement).css('left', _newArrowPos);
}
}
};
+16 -3
View File
@@ -54,6 +54,7 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
* @param {Number} tourId The ID of the tour to start.
*/
fetchTour: function(tourId) {
M.util.js_pending('admin_usertour_fetchTour' + tourId);
$.when(
ajax.call([
{
@@ -67,7 +68,11 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
])[0],
templates.render('tool_usertours/tourstep', {})
).then(function(response, template) {
usertours.startBootstrapTour(tourId, template[0], response.tourconfig);
return usertours.startBootstrapTour(tourId, template[0], response.tourconfig);
}).always(function() {
M.util.js_complete('admin_usertour_fetchTour' + tourId);
return;
}).fail(notification.exception);
},
@@ -77,6 +82,7 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
* @method addResetLink
*/
addResetLink: function() {
M.util.js_pending('admin_usertour_addResetLink');
str.get_string('resettouronpage', 'tool_usertours')
.done(function(s) {
// Grab the last item in the page of these.
@@ -89,7 +95,13 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
'</a>' +
'</div>'
);
});
})
.always(function() {
M.util.js_complete('admin_usertour_addResetLink');
return;
})
.fail();
},
/**
@@ -99,6 +111,7 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
* @param {Number} tourId The ID of the tour to start.
* @param {String} template The template to use.
* @param {Object} tourConfig The tour configuration.
* @return {Object}
*/
startBootstrapTour: function(tourId, template, tourConfig) {
if (usertours.currentTour) {
@@ -142,7 +155,7 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
});
usertours.currentTour = new BootstrapTour(tourConfig);
usertours.currentTour.startTour();
return usertours.currentTour.startTour();
},
/**
@@ -0,0 +1,95 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for tool_usertours.
*
* @package tool_usertours
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_usertours\privacy;
use \core_privacy\local\request\writer;
use \core_privacy\local\metadata\collection;
use \core_privacy\local\request\transform;
defined('MOODLE_INTERNAL') || die();
/**
* Implementation of the privacy subsystem plugin provider for the user tours feature.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements
// This plugin has data.
\core_privacy\local\metadata\provider,
// This plugin has some sitewide user preferences to export.
\core_privacy\local\request\user_preference_provider
{
/**
* Returns meta data about this system.
*
* @param collection $itemcollection The initialised item collection to add items to.
* @return collection A listing of user data stored through this system.
*/
public static function get_metadata(collection $items) {
// There are several user preferences.
$items->add_user_preference(\tool_usertours\tour::TOUR_REQUESTED_BY_USER, 'privacy:metadata:preference:requested');
$items->add_user_preference(\tool_usertours\tour::TOUR_LAST_COMPLETED_BY_USER, 'privacy:metadata:preference:completed');
return $items;
}
/**
* Store all user preferences for the plugin.
*
* @param int $userid The userid of the user whose data is to be exported.
*/
public static function export_user_preferences($userid) {
$preferences = get_user_preferences();
foreach ($preferences as $name => $value) {
$descriptionidentifier = null;
$tourid = null;
if (strpos($name, \tool_usertours\tour::TOUR_REQUESTED_BY_USER) === 0) {
$descriptionidentifier = 'privacy:request:preference:requested';
$tourid = substr($name, strlen(\tool_usertours\tour::TOUR_REQUESTED_BY_USER));
} else if (strpos($name, \tool_usertours\tour::TOUR_LAST_COMPLETED_BY_USER) === 0) {
$descriptionidentifier = 'privacy:request:preference:completed';
$tourid = substr($name, strlen(\tool_usertours\tour::TOUR_LAST_COMPLETED_BY_USER));
}
if ($descriptionidentifier !== null) {
$time = transform::datetime($value);
$tour = \tool_usertours\tour::instance($tourid);
writer::export_user_preference(
'tool_usertours',
$name,
$time,
get_string($descriptionidentifier, 'tool_usertours', (object) [
'name' => $tour->get_name(),
'time' => $time,
])
);
}
}
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="tool/usertours/db" VERSION="20160830" COMMENT="XMLDB file for Moodle tool/usertours"
<XMLDB PATH="admin/tool/usertours/db" VERSION="20160830" COMMENT="XMLDB file for Moodle tool/usertours"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"
xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
<TABLES>
<TABLE NAME="tool_usertours_tours" COMMENT="List of tours">
@@ -169,3 +169,7 @@ $string['tour2_title_addingblocks'] = 'Adding blocks';
$string['tour2_content_addingblocks'] = 'You can add blocks to this page using this button. However, think carefully about including any blocks on your pages. Blocks are not shown on the Moodle Mobile app, so for the best user experience it is better to make sure your course works well without any blocks.';
$string['tour2_title_end'] = 'End of tour';
$string['tour2_content_end'] = 'This is the end of your user tour. It won\'t show again unless you reset it using the link in the footer. The site admin can also create further tours for this site if required.';
$string['privacy:metadata:preference:requested'] = 'The time that a user last manually requested a user tour.';
$string['privacy:metadata:preference:completed'] = 'The time that a user last completed a user tour.';
$string['privacy:request:preference:requested'] = 'You last requested the "{$a->name}" user tour on {$a->time}';
$string['privacy:request:preference:completed'] = 'You last marked the "{$a->name}" user tour as completed on {$a->time}';
@@ -62,7 +62,16 @@ class behat_tool_usertours extends behat_base {
public function i_add_steps_to_the_named_tour($tourname, TableNode $table) {
$this->execute('behat_tool_usertours::i_open_the_user_tour_settings_page');
$this->execute('behat_general::click_link', $this->escape($tourname));
$this->execute('behat_tool_usertours::i_add_steps_to_the_tour', $table);
}
/**
* Add new steps to the current user tour.
*
* @Given /^I add steps to the tour:$/
* @param TableNode $table
*/
public function i_add_steps_to_the_tour(TableNode $table) {
foreach ($table->getHash() as $step) {
$this->execute('behat_general::click_link', get_string('newstep', 'tool_usertours'));
@@ -0,0 +1,85 @@
@tool @tool_usertours
Feature: Apply accessibility to a tour
Background:
Given I log in as "admin"
And I add a new user tour with:
| Name | First tour |
| Description | My first tour |
| Apply to URL match | FRONTPAGE |
| Tour is enabled | 1 |
| Show with backdrop | 1 |
And I add steps to the "First tour" tour:
| targettype | Title | Content |
| Display in middle of page | Welcome | Welcome tour. |
And I add steps to the tour:
| targettype | targetvalue_selector | Title | Content |
| Selector | .usermenu | User menu | Next page |
| Selector | input,button | Page 2 | Next page |
And I add steps to the tour:
| targettype | Title | Content |
| Display in middle of page | Page 3 | Final page. |
@javascript
Scenario: Check tabbing working correctly.
Given I am on site homepage
And I wait "1" seconds
And I should see "Welcome"
# First dialogue of the tour, "Welcome". It has Close, Next and End buttons.
# Nothing highlighted on the page. Initially whole dialogue focused.
When I press tab
Then the focused element is ".close" "css_element" in the "Welcome" "dialogue"
When I press tab
Then the focused element is "Next" "button" in the "Welcome" "dialogue"
When I press tab
Then the focused element is "End tour" "button" in the "Welcome" "dialogue"
When I press tab
# Here the focus loops round to the whole dialogue again.
And I press tab
Then the focused element is ".close" "css_element" in the "Welcome" "dialogue"
# Check looping works properly going backwards too.
When I press shift tab
And I press shift tab
Then the focused element is "End tour" "button" in the "Welcome" "dialogue"
When I press "Next"
# Now we are on the "User menu" step, so Previous is also enabled.
# Also, the user menu section in the page is highlighted, and this
# section contain a hyperlink so the focus have to go though and back to the dialogue.
And I wait "1" seconds
And I press tab
Then the focused element is ".close" "css_element" in the "User menu" "dialogue"
When I press tab
Then the focused element is "Previous" "button" in the "User menu" "dialogue"
When I press tab
Then the focused element is "Next" "button" in the "User menu" "dialogue"
When I press tab
Then the focused element is "End tour" "button" in the "User menu" "dialogue"
# We tab 3 times from "End Tour" button to header container, drop down then go to "Dashboard" link.
When I press tab
Then the focused element is ".usermenu" "css_element"
When I press tab
Then the focused element is "Admin User" "link" in the ".usermenu" "css_element"
When I press tab
And I press tab
Then the focused element is ".close" "css_element" in the "User menu" "dialogue"
# Press shift-tab twice should lead us back to "Admin user" link.
When I press shift tab
And I press shift tab
Then the focused element is "Admin User" "link" in the ".usermenu" "css_element"
@javascript
Scenario: Aria tags should not exist
And I am on site homepage
When I click on "Next" "button"
And I click on "Next" "button"
Then "input[aria-describedby^='tour-step-tool_usertours'],button[aria-describedby^='tour-step-tool_usertours']" "css_element" should exist
And "input[tabindex],button[tabindex]" "css_element" should exist
When I click on "Next" "button"
Then "input[aria-describedby^='tour-step-tool_usertours'],button[aria-describedby^='tour-step-tool_usertours']" "css_element" should not exist
And "input[tabindex],button[tabindex]" "css_element" should not exist
When I click on "Previous" "button"
Then "input[aria-describedby^='tour-step-tool_usertours'],button[aria-describedby^='tour-step-tool_usertours']" "css_element" should exist
And "input[tabindex],button[tabindex]" "css_element" should exist
When I click on "End tour" "button"
Then "input[aria-describedby^='tour-step-tool_usertours'],button[aria-describedby^='tour-step-tool_usertours']" "css_element" should not exist
And "input[tabindex],button[tabindex]" "css_element" should not exist
@@ -0,0 +1,115 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the block_html implementation of the privacy API.
*
* @package block_html
* @category test
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
use \core_privacy\local\metadata\collection;
use \core_privacy\local\request\writer;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\deletion_criteria;
use \tool_usertours\tour;
use \tool_usertours\privacy\provider;
/**
* Unit tests for the block_html implementation of the privacy API.
*
* @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_usertours_privacy_testcase extends \core_privacy\tests\provider_testcase {
/**
* Ensure that get_metadata exports valid content.
*/
public function test_get_metadata() {
$items = new collection('tool_usertours');
$result = provider::get_metadata($items);
$this->assertSame($items, $result);
$this->assertInstanceOf(collection::class, $result);
}
/**
* Ensure that export_user_preferences returns no data if the user has completed no tours.
*/
public function test_export_user_preferences_no_pref() {
$user = \core_user::get_user_by_username('admin');
provider::export_user_preferences($user->id);
$writer = writer::with_context(\context_system::instance());
$this->assertFalse($writer->has_any_data());
}
/**
* Ensure that export_user_preferences returns request completion data.
*/
public function test_export_user_preferences_completed() {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
$alltours = $DB->get_records('tool_usertours_tours');
$tourdata = reset($alltours);
$user = \core_user::get_user_by_username('admin');
$tour = tour::instance($tourdata->id);
$tour->mark_user_completed();
provider::export_user_preferences($user->id);
$writer = writer::with_context(\context_system::instance());
$this->assertTrue($writer->has_any_data());
$prefs = $writer->get_user_preferences('tool_usertours');
$this->assertCount(1, (array) $prefs);
}
/**
* Ensure that export_user_preferences returns request completion data.
*/
public function test_export_user_preferences_requested() {
global $DB;
$this->resetAfterTest();
$this->setAdminUser();
$alltours = $DB->get_records('tool_usertours_tours');
$tourdata = reset($alltours);
$user = \core_user::get_user_by_username('admin');
$tour = tour::instance($tourdata->id);
$tour->mark_user_completed();
$tour->request_user_reset();
provider::export_user_preferences($user->id);
$writer = writer::with_context(\context_system::instance());
$this->assertTrue($writer->has_any_data());
$prefs = $writer->get_user_preferences('tool_usertours');
$this->assertCount(2, (array) $prefs);
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<location>amd/src/tour.js</location>
<name>Flexitour</name>
<license>GPLv3</license>
<version>0.10.0</version>
<version>0.12.2</version>
<licenseversion>3</licenseversion>
</library>
<library>
+8 -2
View File
@@ -262,11 +262,17 @@
$users[$key]->country = $countries[$user->country];
}
}
if ($sort == "country") { // Need to resort by full country name, not code
if ($sort == "country") {
// Need to resort by full country name, not code.
foreach ($users as $user) {
$susers[$user->id] = $user->country;
}
asort($susers);
// Sort by country name, according to $dir.
if ($dir === 'DESC') {
arsort($susers);
} else {
asort($susers);
}
foreach ($susers as $key => $value) {
$nusers[] = $users[$key];
}
+106
View File
@@ -0,0 +1,106 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Contains helper class for digital consent.
*
* @package core_auth
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_auth;
defined('MOODLE_INTERNAL') || die();
/**
* Helper class for digital consent.
*
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class digital_consent {
/**
* Returns true if age and location verification is enabled in the site.
*
* @return bool
*/
public static function is_age_digital_consent_verification_enabled() {
global $CFG;
return !empty($CFG->agedigitalconsentverification);
}
/**
* Checks if a user is a digital minor.
*
* @param int $age
* @param string $country The country code (ISO 3166-2)
* @return bool
*/
public static function is_minor($age, $country) {
global $CFG;
$ageconsentmap = $CFG->agedigitalconsentmap;
$agedigitalconsentmap = self::parse_age_digital_consent_map($ageconsentmap);
return array_key_exists($country, $agedigitalconsentmap) ?
$age < $agedigitalconsentmap[$country] : $age < $agedigitalconsentmap['*'];
}
/**
* Parse the agedigitalconsentmap setting into an array.
*
* @param string $ageconsentmap The value of the agedigitalconsentmap setting
* @return array $ageconsentmapparsed
*/
public static function parse_age_digital_consent_map($ageconsentmap) {
$ageconsentmapparsed = array();
$countries = get_string_manager()->get_list_of_countries();
$isdefaultvaluepresent = false;
$lines = preg_split('/\r|\n/', $ageconsentmap, -1, PREG_SPLIT_NO_EMPTY);
foreach ($lines as $line) {
$arr = explode(",", $line);
// Handle if there is more or less than one comma separator.
if (count($arr) != 2) {
throw new \moodle_exception('agedigitalconsentmapinvalidcomma', 'error', '', $line);
}
$country = trim($arr[0]);
$age = trim($arr[1]);
// Check if default.
if ($country == "*") {
$isdefaultvaluepresent = true;
}
// Handle if the presented value for country is not valid.
if ($country !== "*" && !array_key_exists($country, $countries)) {
throw new \moodle_exception('agedigitalconsentmapinvalidcountry', 'error', '', $country);
}
// Handle if the presented value for age is not valid.
if (!is_numeric($age)) {
throw new \moodle_exception('agedigitalconsentmapinvalidage', 'error', '', $age);
}
$ageconsentmapparsed[$country] = $age;
}
// Handle if a default value does not exist.
if (!$isdefaultvaluepresent) {
throw new \moodle_exception('agedigitalconsentmapinvaliddefault');
}
return $ageconsentmapparsed;
}
}
+121
View File
@@ -121,4 +121,125 @@ class core_auth_external extends external_api {
)
);
}
/**
* Describes the parameters for the digital minor check.
*
* @return external_function_parameters
* @since Moodle 3.4
*/
public static function is_minor_parameters() {
return new external_function_parameters(
array(
'age' => new external_value(PARAM_INT, 'Age'),
'country' => new external_value(PARAM_ALPHA, 'Country of residence'),
)
);
}
/**
* Requests a check if a user is digital minor.
*
* @param int $age User age
* @param string $country Country of residence
* @return array status (true if the user is a minor, false otherwise)
* @since Moodle 3.4
* @throws moodle_exception
*/
public static function is_minor($age, $country) {
global $CFG, $PAGE;
require_once($CFG->dirroot . '/login/lib.php');
$params = self::validate_parameters(
self::is_minor_parameters(),
array(
'age' => $age,
'country' => $country,
)
);
if (!array_key_exists($params['country'], get_string_manager()->get_list_of_countries())) {
throw new invalid_parameter_exception('Invalid value for country parameter (value: '.
$params['country'] .')');
}
$context = context_system::instance();
$PAGE->set_context($context);
// Check if verification of age and location (minor check) is enabled.
if (!\core_auth\digital_consent::is_age_digital_consent_verification_enabled()) {
throw new moodle_exception('nopermissions', 'error', '',
get_string('agelocationverificationdisabled', 'error'));
}
$status = \core_auth\digital_consent::is_minor($params['age'], $params['country']);
return array(
'status' => $status
);
}
/**
* Describes the is_minor return value.
*
* @return external_single_structure
* @since Moodle 3.4
*/
public static function is_minor_returns() {
return new external_single_structure(
array(
'status' => new external_value(PARAM_BOOL, 'True if the user is considered to be a digital minor,
false if not')
)
);
}
/**
* Describes the parameters for is_age_digital_consent_verification_enabled.
*
* @return external_function_parameters
* @since Moodle 3.3
*/
public static function is_age_digital_consent_verification_enabled_parameters() {
return new external_function_parameters(array());
}
/**
* Checks if age digital consent verification is enabled.
*
* @return array status (true if digital consent verification is enabled, false otherwise.)
* @since Moodle 3.3
* @throws moodle_exception
*/
public static function is_age_digital_consent_verification_enabled() {
global $PAGE;
$context = context_system::instance();
$PAGE->set_context($context);
$status = false;
// Check if verification is enabled.
if (\core_auth\digital_consent::is_age_digital_consent_verification_enabled()) {
$status = true;
}
return array(
'status' => $status
);
}
/**
* Describes the is_age_digital_consent_verification_enabled return value.
*
* @return external_single_structure
* @since Moodle 3.3
*/
public static function is_age_digital_consent_verification_enabled_returns() {
return new external_single_structure(
array(
'status' => new external_value(PARAM_BOOL, 'True if digital consent verification is enabled,
false otherwise.')
)
);
}
}
@@ -0,0 +1,62 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Age and location verification mform.
*
* @package core_auth
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_auth\form;
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir.'/formslib.php');
use moodleform;
/**
* Age and location verification mform class.
*
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class verify_age_location_form extends moodleform {
/**
* Defines the form fields.
*/
public function definition() {
global $CFG;
$mform = $this->_form;
$mform->addElement('text', 'age', get_string('whatisyourage'), array('optional' => false));
$mform->setType('age', PARAM_RAW);
$mform->addRule('age', null, 'required', null, 'client');
$mform->addRule('age', null, 'numeric', null, 'client');
$countries = get_string_manager()->get_list_of_countries();
$defaultcountry[''] = get_string('selectacountry');
$countries = array_merge($defaultcountry, $countries);
$mform->addElement('select', 'country', get_string('wheredoyoulive'), $countries);
$mform->addRule('country', null, 'required', null, 'client');
$mform->setDefault('country', $CFG->country);
$this->add_action_buttons(true, get_string('proceed'));
}
}
@@ -0,0 +1,63 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Digital minor renderable.
*
* @package core_auth
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_auth\output;
defined('MOODLE_INTERNAL') || die();
use renderable;
use renderer_base;
use templatable;
/**
* Digital minor renderable class.
*
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class digital_minor_page implements renderable, templatable {
/**
* Export the page data for the mustache template.
*
* @param renderer_base $output renderer to be used to render the page elements.
* @return stdClass
*/
public function export_for_template(renderer_base $output) {
global $SITE, $CFG;
$sitename = format_string($SITE->fullname);
$supportname = $CFG->supportname;
$supportemail = $CFG->supportemail;
$context = [
'sitename' => $sitename,
'supportname' => $supportname,
'supportemail' => $supportemail,
'homelink' => new \moodle_url('/')
];
return $context;
}
}
@@ -0,0 +1,81 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Age and location verification renderable.
*
* @package core_auth
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace core_auth\output;
defined('MOODLE_INTERNAL') || die();
use renderable;
use renderer_base;
use templatable;
require_once($CFG->libdir.'/formslib.php');
/**
* Age and location verification renderable class.
*
* @copyright 2018 Mihail Geshoski <mihail@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class verify_age_location_page implements renderable, templatable {
/** @var mform The form object */
protected $form;
/** @var string Error message */
protected $errormessage;
/**
* Constructor
*
* @param mform $form The form object
* @param string $errormessage The error message.
*/
public function __construct($form, $errormessage = null) {
$this->form = $form;
$this->errormessage = $errormessage;
}
/**
* Export the page data for the mustache template.
*
* @param renderer_base $output renderer to be used to render the page elements.
* @return stdClass
*/
public function export_for_template(renderer_base $output) {
global $SITE;
$sitename = format_string($SITE->fullname);
$formhtml = $this->form->render();
$error = $this->errormessage;
$context = [
'sitename' => $sitename,
'formhtml' => $formhtml,
'error' => $error
];
return $context;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ $string['auth_dbname'] = 'Name of the database itself. Leave empty if using an O
$string['auth_dbname_key'] = 'DB name';
$string['auth_dbpass'] = 'Password matching the above username';
$string['auth_dbpass_key'] = 'Password';
$string['auth_dbpasstype'] = '<p>Specify the format that the password field is using. MD5 hashing is useful for connecting to other common web applications like PostNuke.</p> <p>Use \'internal\' if you want the external database to manage usernames and email addresses, but Moodle to manage passwords. If you use \'internal\', you <i>must</i> provide a populated email address field in the external database, and you must execute both admin/cron.php and auth/db/cli/sync_users.php regularly. Moodle will send an email to new users with a temporary password.</p>';
$string['auth_dbpasstype'] = '<p>Specify the format that the password field is using.</p> <p>Use \'internal\' if you want the external database to manage usernames and email addresses, but Moodle to manage passwords. If you use \'internal\', you <i>must</i> provide a populated email address field in the external database, and you must execute both admin/cron.php and auth/db/cli/sync_users.php regularly. Moodle will send an email to new users with a temporary password.</p>';
$string['auth_dbpasstype_key'] = 'Password format';
$string['auth_dbreviveduser'] = 'Revived user {$a->name} id {$a->id}';
$string['auth_dbrevivedusererror'] = 'Error reviving user {$a}';
+14 -12
View File
@@ -88,8 +88,9 @@ class auth_email_external extends external_api {
if (!empty($CFG->passwordpolicy)) {
$result['passwordpolicy'] = print_password_policy();
}
if (!empty($CFG->sitepolicy)) {
$result['sitepolicy'] = $CFG->sitepolicy;
$manager = new \core_privacy\local\sitepolicy\manager();
if ($sitepolicy = $manager->get_embed_url()) {
$result['sitepolicy'] = $sitepolicy->out(false);
}
if (!empty($CFG->defaultcity)) {
$result['defaultcity'] = $CFG->defaultcity;
@@ -112,11 +113,11 @@ class auth_email_external extends external_api {
}
if (signup_captcha_enabled()) {
require_once($CFG->libdir . '/recaptchalib.php');
// We return the public key, maybe we want to use the javascript api to get the image.
// With reCAPTCHA v2 the captcha will be rendered by the mobile client using just the publickey.
// For now include placeholders for the v1 paramaters to support older mobile app versions.
$result['recaptchapublickey'] = $CFG->recaptchapublickey;
list($result['recaptchachallengehash'], $result['recaptchachallengeimage'], $result['recaptchachallengejs']) =
recaptcha_get_challenge_hash_and_urls(RECAPTCHA_API_SECURE_SERVER, $CFG->recaptchapublickey);
array('', '', '');
}
$result['warnings'] = array();
@@ -137,7 +138,7 @@ class auth_email_external extends external_api {
new external_value(PARAM_NOTAGS, 'The order of the name fields')
),
'passwordpolicy' => new external_value(PARAM_RAW, 'Password policy', VALUE_OPTIONAL),
'sitepolicy' => new external_value(PARAM_URL, 'Site policy url', VALUE_OPTIONAL),
'sitepolicy' => new external_value(PARAM_RAW, 'Site policy', VALUE_OPTIONAL),
'defaultcity' => new external_value(PARAM_NOTAGS, 'Default city', VALUE_OPTIONAL),
'country' => new external_value(PARAM_ALPHA, 'Default country', VALUE_OPTIONAL),
'profilefields' => new external_multiple_structure(
@@ -287,7 +288,8 @@ class auth_email_external extends external_api {
$data = $params;
$data['email2'] = $data['email'];
// Force policy agreed if a site policy is set. The client is responsible of implementing the interface check.
if (!empty($CFG->sitepolicy)) {
$manager = new \core_privacy\local\sitepolicy\manager();
if (!$manager->is_defined()) {
$data['policyagreed'] = 1;
}
unset($data['recaptcharesponse']);
@@ -307,11 +309,11 @@ class auth_email_external extends external_api {
// Validate recaptcha.
if (signup_captcha_enabled()) {
require_once($CFG->libdir . '/recaptchalib.php');
$response = recaptcha_check_answer($CFG->recaptchaprivatekey, getremoteaddr(), $params['recaptchachallengehash'],
$params['recaptcharesponse'], true);
if (!$response->is_valid) {
$errors['recaptcharesponse'] = $response->error;
require_once($CFG->libdir . '/recaptchalib_v2.php');
$response = recaptcha_check_response(RECAPTCHA_VERIFY_URL, $CFG->recaptchaprivatekey,
getremoteaddr(), $params['recaptcharesponse']);
if (!$response['isvalid']) {
$errors['recaptcharesponse'] = $response['error'];
}
}
@@ -0,0 +1,54 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Step definition for auth_email
*
* @package auth_email
* @category test
* @copyright 2018 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(__DIR__ . '/../../../../lib/behat/behat_base.php');
/**
* Step definition for auth_email.
*
* @package auth_email
* @category test
* @copyright 2018 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class behat_auth_email extends behat_base {
/**
* Emulate clicking on confirmation link from the email
*
* @When /^I confirm email for "(?P<username>(?:[^"]|\\")*)"$/
*
* @param string $username
*/
public function i_confirm_email_for($username) {
global $DB;
$secret = $DB->get_field('user', 'secret', ['username' => $username], MUST_EXIST);
$confirmationurl = new moodle_url('/login/confirm.php');
$confirmationpath = $confirmationurl->out_as_local_url(false);
$url = $confirmationpath . '?' . 'data='. $secret .'/'. $username;
$this->getSession()->visit($this->locate_path($url));
}
}
+65
View File
@@ -0,0 +1,65 @@
@auth @auth_email
Feature: User must accept policy when logging in and signing up
In order to record user agreement to use the site
As a user
I need to be able to accept site policy during sign up
Scenario: Accept policy on sign up, no site policy
Given the following config values are set as admin:
| registerauth | email |
| passwordpolicy | 0 |
And I am on site homepage
And I follow "Log in"
When I press "Create new account"
Then I should not see "I understand and agree"
And I set the following fields to these values:
| Username | user1 |
| Password | user1 |
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
And I confirm email for "user1"
And I should see "Thanks, User1 L1"
And I should see "Your registration has been confirmed"
And I open my profile in edit mode
And the field "First name" matches value "User1"
And I log out
# Confirm that user can login and browse the site (edit their profile).
And I log in as "user1"
And I open my profile in edit mode
And the field "First name" matches value "User1"
Scenario: Accept policy on sign up, with site policy
Given the following config values are set as admin:
| registerauth | email |
| passwordpolicy | 0 |
| sitepolicy | https://moodle.org |
And I am on site homepage
And I follow "Log in"
When I press "Create new account"
Then the field "I understand and agree" matches value "0"
And I set the following fields to these values:
| Username | user1 |
| Password | user1 |
| Email address | user1@address.invalid |
| Email (again) | user1@address.invalid |
| First name | User1 |
| Surname | L1 |
| I understand and agree | 1 |
And I press "Create my new account"
And I should see "Confirm your account"
And I should see "An email should have been sent to your address at user1@address.invalid"
And I confirm email for "user1"
And I should see "Thanks, User1 L1"
And I should see "Your registration has been confirmed"
And I open my profile in edit mode
And the field "First name" matches value "User1"
And I log out
# Confirm that user is not asked to agree to site policy again after the next login.
And I log in as "user1"
And I open my profile in edit mode
And the field "First name" matches value "User1"
+104 -37
View File
@@ -836,23 +836,7 @@ class auth_plugin_ldap extends auth_plugin_base {
/// User Updates - time-consuming (optional)
if ($do_updates) {
// Narrow down what fields we need to update
$all_keys = array_keys(get_object_vars($this->config));
$updatekeys = array();
foreach ($all_keys as $key) {
if (preg_match('/^field_updatelocal_(.+)$/', $key, $match)) {
// If we have a field to update it from
// and it must be updated 'onlogin' we
// update it on cron
if (!empty($this->config->{'field_map_'.$match[1]})
and $this->config->{$match[0]} === 'onlogin') {
array_push($updatekeys, $match[1]); // the actual key name
}
}
}
if ($this->config->suspended_attribute && $this->config->sync_suspended) {
$updatekeys[] = 'suspended';
}
unset($all_keys); unset($key);
$updatekeys = $this->get_profile_keys();
} else {
print_string('noupdatestobedone', 'auth_ldap');
@@ -960,6 +944,9 @@ class auth_plugin_ldap extends auth_plugin_base {
role_assign($creatorrole->id, $id, $sitecontext->id, $this->roleauth);
}
// Save custom profile fields.
$updatekeys = $this->get_profile_keys(true);
$this->update_user_record($user->username, $updatekeys, false);
}
$transaction->allow_commit();
unset($add_users); // free mem
@@ -990,6 +977,8 @@ class auth_plugin_ldap extends auth_plugin_base {
function update_user_record($username, $updatekeys = false, $triggerevent = false) {
global $CFG, $DB;
require_once($CFG->dirroot.'/user/profile/lib.php');
// Just in case check text case
$username = trim(core_text::strtolower($username));
@@ -1004,6 +993,8 @@ class auth_plugin_ldap extends auth_plugin_base {
// Protect the userid from being overwritten
$userid = $user->id;
$needsupdate = false;
if ($newinfo = $this->get_userinfo($username)) {
$newinfo = truncate_userinfo($newinfo);
@@ -1016,6 +1007,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$newuser->id = $userid;
// The cast to int is a workaround for MDL-53959.
$newuser->suspended = (int)$this->is_user_suspended((object) $newinfo);
// Get all custom fields.
$profilefields = (array) profile_user_record($user->id, false);
$newprofilefields = [];
foreach ($updatekeys as $key) {
if (isset($newinfo[$key])) {
@@ -1025,18 +1019,50 @@ class auth_plugin_ldap extends auth_plugin_base {
}
if (!empty($this->config->{'field_updatelocal_' . $key})) {
// Only update if it's changed.
if ($user->{$key} != $value) {
if (preg_match('/^profile_field_(.*)$/', $key, $match)) {
// Custom field.
$field = $match[1];
$currentvalue = isset($profilefields[$field]) ? $profilefields[$field] : null;
$newprofilefields[$field] = $value;
} else {
// Standard field.
$currentvalue = isset($user->$key) ? $user->$key : null;
$newuser->$key = $value;
}
}
// Only update if it's changed.
if ($currentvalue !== $value) {
$needsupdate = true;
}
}
user_update_user($newuser, false, $triggerevent);
}
} else {
return false;
if ($needsupdate) {
user_update_user($newuser, false, $triggerevent);
// Now, save the profile fields if the user has any.
if ($fields = $DB->get_records('user_info_field')) {
foreach ($fields as $field) {
if (isset($newprofilefields[$field->shortname])) {
$conditions = array('fieldid' => $field->id, 'userid' => $newuser->id);
$id = $DB->get_field('user_info_data', 'id', $conditions);
$data = $newprofilefields[$field->shortname];
if ($id) {
$DB->set_field('user_info_data', 'data', $data, array('id' => $id));
} else {
$record = array('fieldid' => $field->id, 'userid' => $newuser->id, 'data' => $data);
$DB->insert_record('user_info_data', $record);
}
}
}
}
return $DB->get_record('user', array('id' => $userid, 'deleted' => 0));
}
}
return $DB->get_record('user', array('id'=>$userid, 'deleted'=>0));
return false;
}
/**
@@ -1141,7 +1167,9 @@ class auth_plugin_ldap extends auth_plugin_base {
*
*/
function user_update($olduser, $newuser) {
global $USER;
global $CFG;
require_once($CFG->dirroot . '/user/profile/lib.php');
if (isset($olduser->username) and isset($newuser->username) and $olduser->username != $newuser->username) {
error_log($this->errorlogtag.get_string('renamingnotallowed', 'auth_ldap'));
@@ -1186,6 +1214,14 @@ class auth_plugin_ldap extends auth_plugin_base {
return false;
}
// Load old custom fields.
$olduserprofilefields = (array) profile_user_record($olduser->id, false);
$fields = array();
foreach (profile_get_custom_fields(false) as $field) {
$fields[$field->shortname] = $field;
}
$success = true;
$user_info_result = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($user_info_result) {
@@ -1204,19 +1240,24 @@ class auth_plugin_ldap extends auth_plugin_base {
$user_entry = $user_entry[0];
foreach ($attrmap as $key => $ldapkeys) {
$profilefield = '';
// Only process if the moodle field ($key) has changed and we
// are set to update LDAP with it
$customprofilefield = 'profile_field_' . $key;
if (isset($olduser->$key) and isset($newuser->$key)
and ($olduser->$key !== $newuser->$key)) {
$profilefield = $key;
} else if (isset($olduser->$customprofilefield) && isset($newuser->$customprofilefield)
&& $olduser->$customprofilefield !== $newuser->$customprofilefield) {
$profilefield = $customprofilefield;
if (preg_match('/^profile_field_(.*)$/', $key, $match)) {
// Custom field.
$fieldname = $match[1];
if (isset($fields[$fieldname])) {
$class = 'profile_field_' . $fields[$fieldname]->datatype;
$formfield = new $class($fields[$fieldname]->id, $olduser->id);
$oldvalue = isset($olduserprofilefields[$fieldname]) ? $olduserprofilefields[$fieldname] : null;
} else {
$oldvalue = null;
}
$newvalue = $formfield->edit_save_data_preprocess($newuser->{$formfield->inputname}, new stdClass);
} else {
// Standard field.
$oldvalue = isset($olduser->$key) ? $olduser->$key : null;
$newvalue = isset($newuser->$key) ? $newuser->$key : null;
}
if (!empty($profilefield) && !empty($this->config->{'field_updateremote_' . $key})) {
if ($newvalue !== null and $newvalue !== $oldvalue and !empty($this->config->{'field_updateremote_' . $key})) {
// For ldap values that could be in more than one
// ldap key, we will do our best to match
// where they came from
@@ -1229,9 +1270,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$ambiguous = false;
}
$nuvalue = core_text::convert($newuser->$profilefield, 'utf-8', $this->config->ldapencoding);
$nuvalue = core_text::convert($newvalue, 'utf-8', $this->config->ldapencoding);
empty($nuvalue) ? $nuvalue = array() : $nuvalue;
$ouvalue = core_text::convert($olduser->$profilefield, 'utf-8', $this->config->ldapencoding);
$ouvalue = core_text::convert($oldvalue, 'utf-8', $this->config->ldapencoding);
foreach ($ldapkeys as $ldapkey) {
$ldapkey = $ldapkey;
@@ -2151,4 +2192,30 @@ class auth_plugin_ldap extends auth_plugin_base {
echo $OUTPUT->notification(get_string('ldapnotconfigured', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
}
}
/**
* Get the list of profile fields.
*
* @param bool $fetchall Fetch all, not just those for update.
* @return array
*/
protected function get_profile_keys($fetchall = false) {
$keys = array_keys(get_object_vars($this->config));
$updatekeys = [];
foreach ($keys as $key) {
if (preg_match('/^field_updatelocal_(.+)$/', $key, $match)) {
// If we have a field to update it from and it must be updated 'onlogin' we update it on cron.
if (!empty($this->config->{'field_map_'.$match[1]})) {
if ($fetchall || $this->config->{$match[0]} === 'onlogin') {
array_push($updatekeys, $match[1]); // the actual key name
}
}
}
}
if ($this->config->suspended_attribute && $this->config->sync_suspended) {
$updatekeys[] = 'suspended';
}
return $updatekeys;
}
} // End of the class
+10 -10
View File
@@ -43,12 +43,12 @@ $string['auth_ldapdescription'] = 'This method provides authentication against a
entry in its database. This module can read user attributes from LDAP and prefill
wanted fields in Moodle. For following logins only the username and
password are checked.';
$string['auth_ldap_expiration_desc'] = 'Select No to disable expired password checking or LDAP to read passwordexpiration time directly from LDAP';
$string['auth_ldap_expiration_key'] = 'Expiration';
$string['auth_ldap_expiration_warning_desc'] = 'Number of days before password expiration warning is issued.';
$string['auth_ldap_expiration_warning_key'] = 'Expiration warning';
$string['auth_ldap_expireattr_desc'] = 'Optional: Overrides the LDAP attribute that stores password expiration time.';
$string['auth_ldap_expireattr_key'] = 'Expiration attribute';
$string['auth_ldap_expiration_desc'] = 'Select \'{$a->no}\' to disable expired password checking or \'{$a->ldapserver}\' to read the password expiry time directly from the LDAP server.';
$string['auth_ldap_expiration_key'] = 'Expiry';
$string['auth_ldap_expiration_warning_desc'] = 'Number of days before password expiry warning is issued.';
$string['auth_ldap_expiration_warning_key'] = 'Expiry warning';
$string['auth_ldap_expireattr_desc'] = 'Optional: Overrides the LDAP attribute that stores password expiry time.';
$string['auth_ldap_expireattr_key'] = 'Expiry attribute';
$string['auth_ldapextrafields'] = 'These fields are optional. You can choose to pre-fill some Moodle user fields with information from the <b>LDAP fields</b> that you specify here. <p>If you leave these fields blank, then nothing will be transferred from LDAP and Moodle defaults will be used instead.</p><p>In either case, the user will be able to edit all of these fields after they log in.</p>';
$string['auth_ldap_graceattr_desc'] = 'Optional: Overrides gracelogin attribute';
$string['auth_ldap_gracelogin_key'] = 'Grace login attribute';
@@ -77,7 +77,7 @@ $string['auth_ldap_opt_deref'] = 'Determines how aliases are handled during sear
$string['auth_ldap_opt_deref_key'] = 'Dereference aliases';
$string['auth_ldap_passtype'] = 'Specify the format of new or changed passwords in LDAP server.';
$string['auth_ldap_passtype_key'] = 'Password format';
$string['auth_ldap_passwdexpire_settings'] = 'LDAP password expiration settings';
$string['auth_ldap_passwdexpire_settings'] = 'LDAP password expiry settings';
$string['auth_ldap_preventpassindb'] = 'Select yes to prevent passwords from being stored in Moodle\'s DB.';
$string['auth_ldap_preventpassindb_key'] = 'Prevent password caching';
$string['auth_ldap_search_sub'] = 'Search users from subcontexts.';
@@ -91,7 +91,7 @@ $string['auth_ldap_suspended_attribute'] = 'Optional: When provided this attribu
$string['auth_ldap_suspended_attribute_key'] = 'Suspended attribute';
$string['auth_ldap_user_exists'] = 'LDAP username already exists.';
$string['auth_ldap_user_settings'] = 'User lookup settings';
$string['auth_ldap_user_type'] = 'Select how users are stored in LDAP. This setting also specifies how login expiration, grace logins and user creation will work.';
$string['auth_ldap_user_type'] = 'Select how users are stored in LDAP. This setting also specifies how login expiry, grace logins and user creation will work.';
$string['auth_ldap_user_type_key'] = 'User type';
$string['auth_ldap_usertypeundefined'] = 'config.user_type not defined or function ldap_expirationtime2unix does not support selected type!';
$string['auth_ldap_usertypeundefined2'] = 'config.user_type not defined or function ldap_unixi2expirationtime does not support selected type!';
@@ -121,7 +121,7 @@ $string['didntgetusersfromldap'] = "Did not get any users from LDAP -- error? --
$string['gotcountrecordsfromldap'] = "Got {\$a} records from LDAP\n";
$string['ldapnotconfigured'] = 'The LDAP host url is currently not configured';
$string['morethanoneuser'] = 'Strange! More than one user record found in ldap. Only using the first one.';
$string['needbcmath'] = 'You need the BCMath extension to use grace logins with Active Directory';
$string['needbcmath'] = 'You need the BCMath extension to use expired password checking with Active Directory.';
$string['needmbstring'] = 'You need the mbstring extension to change passwords in Active Directory';
$string['nodnforusername'] = 'Error in user_update_password(). No DN for: {$a->username}';
$string['noemail'] = 'Tried to send you an email but failed!';
@@ -147,7 +147,7 @@ $string['start_tls_key'] = 'Use TLS';
$string['updateremfail'] = 'Error updating LDAP record. Error code: {$a->errno}; Error string: {$a->errstring}<br/>Key ({$a->key}) - old moodle value: \'{$a->ouvalue}\' new value: \'{$a->nuvalue}\'';
$string['updateremfailamb'] = 'Failed to update LDAP with ambiguous field {$a->key}; old moodle value: \'{$a->ouvalue}\', new value: \'{$a->nuvalue}\'';
$string['updatepasserror'] = 'Error in user_update_password(). Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpire'] = 'Error in user_update_password() when reading password expiration time. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpire'] = 'Error in user_update_password() when reading password expiry time. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpiregrace'] = 'Error in user_update_password() when modifying expirationtime and/or gracelogins. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updateusernotfound'] = 'Could not find user while updating externally. Details follow: search base: \'{$a->userdn}\'; search filter: \'(objectClass=*)\'; search attributes: {$a->attribs}';
$string['user_activatenotsupportusertype'] = 'auth: ldap user_activate() does not support selected usertype: {$a}';
+15 -3
View File
@@ -185,12 +185,24 @@ if ($ADMIN->fulltree) {
new lang_string('auth_ldap_passwdexpire_settings', 'auth_ldap'), ''));
// Password Expiration.
// Create the description lang_string object.
$strno = get_string('no');
$strldapserver = get_string('pluginname', 'auth_ldap');
$langobject = new stdClass();
$langobject->no = $strno;
$langobject->ldapserver = $strldapserver;
$description = new lang_string('auth_ldap_expiration_desc', 'auth_ldap', $langobject);
// Now create the options.
$expiration = array();
$expiration['0'] = 'no';
$expiration['1'] = 'LDAP';
$expiration['0'] = $strno;
$expiration['1'] = $strldapserver;
// Add the setting.
$settings->add(new admin_setting_configselect('auth_ldap/expiration',
new lang_string('auth_ldap_expiration_key', 'auth_ldap'),
new lang_string('auth_ldap_expiration_desc', 'auth_ldap'), 0 , $expiration));
$description, 0 , $expiration));
// Password Expiration warning.
$settings->add(new admin_setting_configtext('auth_ldap/expiration_warning',
+14 -1
View File
@@ -403,7 +403,20 @@ class auth extends \auth_plugin_base {
if (!empty($linkedlogin) && empty($linkedlogin->get('confirmtoken'))) {
$mappeduser = get_complete_user_data('id', $linkedlogin->get('userid'));
if ($mappeduser && $mappeduser->confirmed) {
if ($mappeduser && $mappeduser->suspended) {
$failurereason = AUTH_LOGIN_SUSPENDED;
$event = \core\event\user_login_failed::create([
'userid' => $mappeduser->id,
'other' => [
'username' => $userinfo['username'],
'reason' => $failurereason
]
]);
$event->trigger();
$SESSION->loginerrormsg = get_string('invalidlogin');
$client->log_out();
redirect(new moodle_url('/login/index.php'));
} else if ($mappeduser && $mappeduser->confirmed) {
$userinfo = (array) $mappeduser;
$userwasmapped = true;
} else {
@@ -0,0 +1,68 @@
@core @verify_age_location
Feature: Test validation of 'Age of digital consent' setting.
In order to set the 'Age of digital consent' setting
As an admin
I need to provide valid data and valid format
Background:
Given I log in as "admin"
And I navigate to "Privacy settings" node in "Site administration > Privacy and policies"
Scenario: Admin provides valid value for 'Age of digital consent'.
Given I set the field "s__agedigitalconsentmap" to multiline:
"""
*, 16
AT, 14
BE, 14
"""
When I press "Save changes"
Then I should see "Changes saved"
And I should not see "Some settings were not changed due to an error."
And I should not see "The digital age of consent is not valid:"
Scenario: Admin provides invalid format for 'Age of digital consent'.
# Try to set a value with missing space separator
Given I set the field "s__agedigitalconsentmap" to multiline:
"""
*16
AT, 14
BE, 14
"""
When I press "Save changes"
Then I should not see "Changes saved"
And I should see "Some settings were not changed due to an error."
And I should see "The digital age of consent is not valid: \"*16\" has more or less than one comma separator."
# Try to set a value with missing default age of consent
When I set the field "s__agedigitalconsentmap" to multiline:
"""
AT, 14
BE, 14
"""
And I press "Save changes"
Then I should not see "Changes saved"
And I should see "Some settings were not changed due to an error."
And I should see "The digital age of consent is not valid: Default (*) value is missing."
Scenario: Admin provides invalid age of consent or country for 'Age of digital consent'.
# Try to set a value containing invalid age of consent
Given I set the field "s__agedigitalconsentmap" to multiline:
"""
*, 16
AT, age
BE, 14
"""
When I press "Save changes"
Then I should not see "Changes saved"
And I should see "Some settings were not changed due to an error."
And I should see "The digital age of consent is not valid: \"age\" is not a valid value for age."
# Try to set a value containing invalid country
When I set the field "s__agedigitalconsentmap" to multiline:
"""
*, 16
COUNTRY, 14
BE, 14
"""
And I press "Save changes"
Then I should not see "Changes saved"
And I should see "Some settings were not changed due to an error."
And I should see "The digital age of consent is not valid: \"COUNTRY\" is not a valid value for country."
@@ -0,0 +1,45 @@
@core @verify_age_location
Feature: Test the 'Digital age of consent verification' feature works.
In order to self-register on the site
As an user
I need be to be over the age of digital consent
Background:
Given the following config values are set as admin:
| registerauth | email |
| agedigitalconsentverification | 1 |
Scenario: User that is not considered a digital minor attempts to self-register on the site.
# Try to access the sign up page.
Given I am on homepage
When I click on "Log in" "link" in the ".logininfo" "css_element"
And I press "Create new account"
Then I should see "Age and location verification"
When I set the field "What is your age?" to "16"
And I set the field "In which country do you live?" to "DZ"
And I press "Proceed"
Then I should see "New account"
And I should see "Choose your username and password"
# Try to access the sign up page again.
When I press "Cancel"
And I press "Create new account"
Then I should see "New account"
And I should see "Choose your username and password"
Scenario: User that is considered a digital minor attempts to self-register on the site.
# Try to access the sign up page.
Given I am on homepage
When I click on "Log in" "link" in the ".logininfo" "css_element"
And I press "Create new account"
Then I should see "Age and location verification"
When I set the field "What is your age?" to "12"
And I set the field "In which country do you live?" to "AT"
And I press "Proceed"
Then I should see "You are considered to be a digital minor."
And I should see "To create an account on this site please have your parent/guardian contact the following person."
# Try to access the sign up page again.
When I click on "Back to the site home" "link"
And I click on "Log in" "link" in the ".logininfo" "css_element"
And I press "Create new account"
Then I should see "You are considered to be a digital minor."
And I should see "To create an account on this site please have your parent/guardian contact the following person."
+182
View File
@@ -0,0 +1,182 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for core_auth\digital_consent.
*
* @package core_auth
* @copyright 2018 Mihail Geshoski
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
/**
* Digital consent helper testcase.
*
* @package core_auth
* @copyright 2018 Mihail Geshoski
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class core_auth_digital_consent_testcase extends advanced_testcase {
public function test_is_age_digital_consent_verification_enabled() {
global $CFG;
$this->resetAfterTest();
// Age of digital consent verification is enabled.
$CFG->agedigitalconsentverification = 0;
$isenabled = \core_auth\digital_consent::is_age_digital_consent_verification_enabled();
$this->assertFalse($isenabled);
}
public function test_is_minor() {
global $CFG;
$this->resetAfterTest();
$agedigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, 14',
'CZ, 13',
'DE, 14',
'DK, 13',
]);
$CFG->agedigitalconsentmap = $agedigitalconsentmap;
$usercountry1 = 'DK';
$usercountry2 = 'AU';
$userage1 = 12;
$userage2 = 14;
$userage3 = 16;
// Test country exists in agedigitalconsentmap and user age is below the particular digital minor age.
$isminor = \core_auth\digital_consent::is_minor($userage1, $usercountry1);
$this->assertTrue($isminor);
// Test country exists in agedigitalconsentmap and user age is above the particular digital minor age.
$isminor = \core_auth\digital_consent::is_minor($userage2, $usercountry1);
$this->assertFalse($isminor);
// Test country does not exists in agedigitalconsentmap and user age is below the particular digital minor age.
$isminor = \core_auth\digital_consent::is_minor($userage2, $usercountry2);
$this->assertTrue($isminor);
// Test country does not exists in agedigitalconsentmap and user age is above the particular digital minor age.
$isminor = \core_auth\digital_consent::is_minor($userage3, $usercountry2);
$this->assertFalse($isminor);
}
public function test_parse_age_digital_consent_map_valid_format() {
// Value of agedigitalconsentmap has a valid format.
$agedigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, 14',
'BE, 13'
]);
$ageconsentmapparsed = \core_auth\digital_consent::parse_age_digital_consent_map($agedigitalconsentmap);
$this->assertEquals([
'*' => 16,
'AT' => 14,
'BE' => 13
], $ageconsentmapparsed
);
}
public function test_parse_age_digital_consent_map_invalid_format_missing_spaces() {
// Value of agedigitalconsentmap has an invalid format (missing space separator between values).
$agedigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT14',
]);
$this->expectException('moodle_exception');
$this->expectExceptionMessage(get_string('agedigitalconsentmapinvalidcomma', 'error', 'AT14'));
\core_auth\digital_consent::parse_age_digital_consent_map($agedigitalconsentmap);
}
public function test_parse_age_digital_consent_map_invalid_format_missing_default_value() {
// Value of agedigitalconsentmap has an invalid format (missing default value).
$agedigitalconsentmap = implode(PHP_EOL, [
'BE, 16',
'AT, 14'
]);
$this->expectException('moodle_exception');
$this->expectExceptionMessage(get_string('agedigitalconsentmapinvaliddefault', 'error'));
\core_auth\digital_consent::parse_age_digital_consent_map($agedigitalconsentmap);
}
public function test_parse_age_digital_consent_map_invalid_format_invalid_country() {
// Value of agedigitalconsentmap has an invalid format (invalid value for country).
$agedigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'TEST, 14'
]);
$this->expectException('moodle_exception');
$this->expectExceptionMessage(get_string('agedigitalconsentmapinvalidcountry', 'error', 'TEST'));
\core_auth\digital_consent::parse_age_digital_consent_map($agedigitalconsentmap);
}
public function test_parse_age_digital_consent_map_invalid_format_invalid_age_string() {
// Value of agedigitalconsentmap has an invalid format (string value for age).
$agedigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, ten'
]);
$this->expectException('moodle_exception');
$this->expectExceptionMessage(get_string('agedigitalconsentmapinvalidage', 'error', 'ten'));
\core_auth\digital_consent::parse_age_digital_consent_map($agedigitalconsentmap);
}
public function test_parse_age_digital_consent_map_invalid_format_missing_age() {
// Value of agedigitalconsentmap has an invalid format (missing value for age).
$agedigitalconsentmap = implode(PHP_EOL, [
'*, 16',
'AT, '
]);
$this->expectException('moodle_exception');
$this->expectExceptionMessage(get_string('agedigitalconsentmapinvalidage', 'error', ''));
\core_auth\digital_consent::parse_age_digital_consent_map($agedigitalconsentmap);
}
public function test_parse_age_digital_consent_map_invalid_format_missing_country() {
// Value of agedigitalconsentmap has an invalid format (missing value for country).
$agedigitalconsentmap = implode(PHP_EOL, [
'*, 16',
', 12'
]);
$this->expectException('moodle_exception');
$this->expectExceptionMessage(get_string('agedigitalconsentmapinvalidcountry', 'error', ''));
\core_auth\digital_consent::parse_age_digital_consent_map($agedigitalconsentmap);
}
}
+26
View File
@@ -89,4 +89,30 @@ class core_auth_external_testcase extends externallib_advanced_testcase {
$this->expectExceptionMessage(get_string('invalidconfirmdata', 'error'));
$result = core_auth_external::confirm_user($username, 'zzZZzz');
}
/**
* Test age digital consent not enabled.
*/
public function test_age_digital_consent_verification_is_not_enabled() {
global $CFG;
$CFG->agedigitalconsentverification = 0;
$result = core_auth_external::is_age_digital_consent_verification_enabled();
$result = external_api::clean_returnvalue(
core_auth_external::is_age_digital_consent_verification_enabled_returns(), $result);
$this->assertFalse($result['status']);
}
/**
* Test age digital consent is enabled.
*/
public function test_age_digital_consent_verification_is_enabled() {
global $CFG;
$CFG->agedigitalconsentverification = 1;
$result = core_auth_external::is_age_digital_consent_verification_enabled();
$result = external_api::clean_returnvalue(
core_auth_external::is_age_digital_consent_verification_enabled_returns(), $result);
$this->assertTrue($result['status']);
}
}
+5
View File
@@ -1,6 +1,11 @@
This files describes API changes in /auth/* - plugins,
information provided here is intended especially for developers.
=== 3.3.5 ===
* Self registration plugins should use core_privacy\local\sitepolicy\manager instead of directly checking
$CFG->sitepolicy , especially in custom signup forms. See https://docs.moodle.org/dev/Site_policy_handler
=== 3.3 ===
* Authentication plugins have been migrated to use the admin settings API. Plugins should use a settings.php file to
+9
View File
@@ -141,6 +141,15 @@ abstract class backup implements checksumable {
* Usually same than major release zero version, mainly for informative/historic purposes.
*/
const RELEASE = '3.3';
/**
* Cipher to be used in backup and restore operations.
*/
const CIPHER = 'aes-256-cbc';
/**
* Bytes enforced for key, using the cypher above. Restrictive? Yes, but better than unsafe lengths
*/
const CIPHERKEYLEN = 32;
}
/*
+1 -1
View File
@@ -112,7 +112,7 @@ class cc_forum extends entities {
public function get_topic_data ($instance) {
$topic_data = '';
$topic_data = array();
$topic_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -68,7 +68,7 @@ class cc_quiz extends entities {
$last_question_id = 0;
$last_answer_id = 0;
$instances = '';
$instances = array();
$types = array(MOODLE_TYPE_QUIZ, MOODLE_TYPE_QUESTION_BANK);
+1 -1
View File
@@ -87,7 +87,7 @@ class cc11_basiclti extends entities11 {
public function get_basiclti_data($instance) {
$topic_data = '';
$topic_data = array();
$basiclti_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -111,7 +111,7 @@ class cc11_forum extends entities11 {
public function get_topic_data ($instance) {
$topic_data = '';
$topic_data = array();
$topic_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -82,7 +82,7 @@ class cc11_lti extends entities11 {
public function get_basiclti_data($instance) {
$topic_data = '';
$topic_data = array();
$basiclti_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -68,7 +68,7 @@ class cc11_quiz extends entities11 {
$last_question_id = 0;
$last_answer_id = 0;
$instances = '';
$instances = array();
$types = array(MOODLE_TYPE_QUIZ, MOODLE_TYPE_QUESTION_BANK);
+1 -1
View File
@@ -99,7 +99,7 @@ class cc11_resource extends entities11 {
$link = 'http://invalidurldetected/';
}
} else {
$link = $rawlink;
$link = htmlspecialchars(trim($rawlink), ENT_COMPAT, 'UTF-8', false);
}
}
}
+132
View File
@@ -97,6 +97,138 @@ class base64_encode_final_element extends backup_final_element {
}
}
/**
* Implementation of {@link backup_final_element} that provides symmetric-key AES-256 encryption of contents.
*
* This final element transparently encrypts, for secure storage and transport, any content
* that shouldn't be shown normally in plain text. Usually, passwords or keys that cannot use
* hashing algorithms, although potentially can encrypt any content. All information is encoded
* using base64.
*
* Features:
* - requires openssl extension to work. Without it contents are completely omitted.
* - automatically creates an appropriate default key for the site and stores it into backup_encryptkey config (bas64 encoded).
* - uses a different appropriate init vector for every operation, which is transmited with the encrypted contents.
* - all generated data is base64 encoded for safe transmission.
* - automatically adds "encrypted" attribute for easier detection.
* - implements HMAC for providing integrity.
*
* @copyright 2017 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class encrypted_final_element extends backup_final_element {
/** @var string cypher appropiate raw key for backups in the site. Defaults to backup_encryptkey config. */
protected $key = null;
/**
* Constructor - instantiates a encrypted_final_element, specifying its basic info.
*
* Overridden to automatically add the 'encrypted' attribute if missing.
*
* @param string $name name of the element
* @param array $attributes attributes this element will handle (optional, defaults to null)
*/
public function __construct($name, $attributes = null) {
parent::__construct($name, $attributes);
if (! $this->get_attribute('encrypted')) {
$this->add_attributes('encrypted');
}
}
/**
* Set the encryption key manually, overriding default backup_encryptkey config.
*
* @param string $key key to be used for encrypting. Required to be 256-bit key.
* Use a safe generation technique. See self::generate_encryption_random_key() below.
*/
protected function set_key($key) {
$bytes = strlen($key); // Get key length in bytes.
// Only accept keys with the expected (backup::CIPHERKEYLEN) key length. There are a number of hashing,
// random generators to achieve this esasily, like the one shown below to create the default
// site encryption key and ivs.
if ($bytes !== backup::CIPHERKEYLEN) {
$info = (object)array('expected' => backup::CIPHERKEYLEN, 'found' => $bytes);
throw new base_element_struct_exception('encrypted_final_element incorrect key length', $info);
}
// Everything went ok, store the key.
$this->key = $key;
}
/**
* Set the value of the field.
*
* This method sets the value of the element, encrypted using the specified key for it,
* defaulting to (and generating) backup_encryptkey config. HMAC is used for integrity.
*
* @param string $value plain-text content the will be stored encrypted and encoded.
*/
public function set_value($value) {
// No openssl available, skip this field completely.
if (!function_exists('openssl_encrypt')) {
return;
}
// No hmac available, skip this field completely.
if (!function_exists('hash_hmac')) {
return;
}
// Cypher not available, skip this field completely.
if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
return;
}
// Ensure we have a good key, manual or default.
if (empty($this->key)) {
// The key has not been set manually, look for it at config (base64 encoded there).
$enckey = get_config('backup', 'backup_encryptkey');
if ($enckey === false) {
// Has not been set, calculate and save an appropiate random key automatically.
$enckey = base64_encode(self::generate_encryption_random_key(backup::CIPHERKEYLEN));
set_config('backup_encryptkey', $enckey, 'backup');
}
$this->set_key(base64_decode($enckey));
}
// Now we need an iv for this operation.
$iv = self::generate_encryption_random_key(openssl_cipher_iv_length(backup::CIPHER));
// Everything is ready, let's encrypt and prepend the 1-shot iv.
$value = $iv . openssl_encrypt($value, backup::CIPHER, $this->key, OPENSSL_RAW_DATA, $iv);
// Calculate the hmac of the value (iv + encrypted) and prepend it.
$hmac = hash_hmac('sha256', $value, $this->key, true);
$value = $hmac . $value;
// Ready, set the encoded value.
parent::set_value(base64_encode($value));
// Finally, if the field has an "encrypted" attribute, set it to true.
if ($att = $this->get_attribute('encrypted')) {
$att->set_value('true');
}
}
/**
* Generate an appropiate random key to be used for encrypting backup information.
*
* Normally used as site default encryption key (backup_encryptkey config) and also
* for calculating the init vectors.
*
* Note that until PHP 5.6.12 openssl_random_pseudo_bytes() did NOT
* use a "cryptographically strong algorithm" {@link https://bugs.php.net/bug.php?id=70014}
* But it's beyond my crypto-knowledge when it's worth finding a *real* better alternative.
*
* @param int $bytes Number of bytes to determine the key length expected.
*/
protected static function generate_encryption_random_key($bytes) {
return openssl_random_pseudo_bytes($bytes);
}
}
/**
* Implementation of backup_nested_element that provides special handling of files
*
+1 -1
View File
@@ -529,7 +529,7 @@ class backup_enrolments_structure_step extends backup_structure_step {
$enrol->annotate_ids('role', 'roleid');
// Add enrol plugin structure.
$this->add_plugin_structure('enrol', $enrol, false);
$this->add_plugin_structure('enrol', $enrol, true);
return $enrolments;
}
@@ -0,0 +1,116 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for the handling of encrypted contents in backup and restore.
*
* @package core_backup
* @copyright 2016 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_custom_fields.php');
class core_backup_encrypted_content_testscase extends advanced_testcase {
public function setUp() {
if (!function_exists('openssl_encrypt')) {
$this->markTestSkipped('OpenSSL extension is not loaded.');
} else if (!function_exists('hash_hmac')) {
$this->markTestSkipped('Hash extension is not loaded.');
} else if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
$this->markTestSkipped('Expected cipher not available: ' . backup::CIPHER);
}
}
public function test_encrypted_final_element() {
$this->resetAfterTest(true);
// Some basic verifications.
$efe = new encrypted_final_element('test', array('encrypted'));
$this->assertInstanceOf('encrypted_final_element', $efe);
$this->assertSame('test', $efe->get_name());
$atts = $efe->get_attributes();
$this->assertCount(1, $atts);
$att = reset($atts);
$this->assertInstanceOf('backup_attribute', $att);
$this->assertSame('encrypted', $att->get_name());
// Using a manually defined (incorrect length) key.
$efe = new encrypted_final_element('test', array('encrypted'));
$key = 'this_in_not_correct_32_byte_key';
try {
set_config('backup_encryptkey', base64_encode($key), 'backup');
$efe->set_value('tiny_secret');
$this->fail('Expecting base_element_struct_exception exception, none happened');
} catch (exception $e) {
$this->assertInstanceOf('base_element_struct_exception', $e);
$this->assertEquals('encrypted_final_element incorrect key length', $e->errorcode);
}
// Using a manually defined (correct length) key.
$efe = new encrypted_final_element('test', array('testattr', 'encrypted'));
$key = hash('md5', 'Moodle rocks and this is not secure key, who cares, it is a test');
set_config('backup_encryptkey', base64_encode($key), 'backup');
$this->assertEmpty($efe->get_value());
$secret = 'This is a secret message that nobody else will be able to read but me 💩 ';
$efe->set_value($secret);
$atts = $efe->get_attributes();
$this->assertCount(2, $atts);
$this->assertArrayHasKey('encrypted', $atts); // We added it explicitly.
$this->assertTrue($atts['encrypted']->is_set());
$this->assertSame('true', $atts['encrypted']->get_value());
$this->assertNotEmpty($efe->get_value());
$this->assertTrue($efe->is_set());
// Get the crypted content and decrypt it manually.
$ctext = $efe->get_value();
$hmaclen = 32; // SHA256 is 32 bytes.
$ivlen = openssl_cipher_iv_length(backup::CIPHER);
list($hmac, $iv, $text) = array_values(unpack("a{$hmaclen}hmac/a{$ivlen}iv/a*text", base64_decode($ctext)));
$this->assertSame(hash_hmac('sha256', $iv . $text, $key, true), $hmac);
$this->assertSame($secret, openssl_decrypt($text, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv));
// Using the default site-generated key.
$efe = new encrypted_final_element('test', array('testattr'));
$this->assertEmpty($efe->get_value());
$secret = 'This is a secret message that nobody else will be able to read but me 💩 ';
$efe->set_value($secret);
$atts = $efe->get_attributes();
$this->assertCount(2, $atts);
$this->assertArrayHasKey('encrypted', $atts); // Was added automatcally, we did not specify it.
$this->assertTrue($atts['encrypted']->is_set());
$this->assertSame('true', $atts['encrypted']->get_value());
$this->assertNotEmpty($efe->get_value());
$this->assertTrue($efe->is_set());
// Get the crypted content and decrypt it manually.
$ctext = $efe->get_value();
$hmaclen = 32; // SHA256 is 32 bytes.
$ivlen = openssl_cipher_iv_length(backup::CIPHER);
list($hmac, $iv, $text) = array_values(unpack("a{$hmaclen}hmac/a{$ivlen}iv/a*text", base64_decode($ctext)));
$key = base64_decode(get_config('backup', 'backup_encryptkey'));
$this->assertSame(hash_hmac('sha256', $iv . $text, $key, true), $hmac);
$this->assertSame($secret, openssl_decrypt($text, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv));
}
}
+60
View File
@@ -94,6 +94,66 @@ abstract class restore_step extends base_step {
// Return the passed value with cached offset applied.
return $value + $cache[$this->get_restoreid()];
}
/**
* Returns symmetric-key AES-256 decryption of base64 encoded contents.
*
* This method is used in restore operations to decrypt contents encrypted with
* {@link encrypted_final_element} automatically decoding (base64) and decrypting
* contents using the key stored in backup_encryptkey config.
*
* Requires openssl, cipher availability, and key existence (backup
* automatically sets it if missing). Integrity is provided via HMAC.
*
* @param string $value {@link encrypted_final_element} value to decode and decrypt.
* @return string|null decoded and decrypted value or null if the operation can not be performed.
*/
public function decrypt($value) {
// No openssl available, skip this field completely.
if (!function_exists('openssl_encrypt')) {
return null;
}
// No hash available, skip this field completely.
if (!function_exists('hash_hmac')) {
return null;
}
// Cypher not available, skip this field completely.
if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
return null;
}
// Get the decrypt key. Skip if missing.
$key = get_config('backup', 'backup_encryptkey');
if ($key === false) {
return null;
}
// And decode it.
$key = base64_decode($key);
// Arrived here, let's proceed with authentication (provides integrity).
$hmaclen = 32; // SHA256 is 32 bytes.
$ivlen = openssl_cipher_iv_length(backup::CIPHER);
list($hmac, $iv, $text) = array_values(unpack("a{$hmaclen}hmac/a{$ivlen}iv/a*text", base64_decode($value)));
// Verify HMAC matches expectations, skip if not (integrity failed).
if (!hash_equals($hmac, hash_hmac('sha256', $iv . $text, $key, true))) {
return null;
}
// Arrived here, integrity is ok, let's decrypt.
$result = openssl_decrypt($text, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv);
// For some reason decrypt failed (strange, HMAC check should have deteted it), skip this field completely.
if ($result === false) {
return null;
}
return $result;
}
}
/*
+46
View File
@@ -91,6 +91,52 @@ class backup_step_testcase extends advanced_testcase {
$bc->destroy();
}
/**
* test restore_step class, decrypt method
*/
public function test_restore_step_decrypt() {
$this->resetAfterTest(true);
if (!function_exists('openssl_encrypt')) {
$this->markTestSkipped('OpenSSL extension is not loaded.');
} else if (!function_exists('hash_hmac')) {
$this->markTestSkipped('Hash extension is not loaded.');
} else if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
$this->markTestSkipped('Expected cipher not available: ' . backup::CIPHER);
}
$bt = new mock_restore_task_basepath('taskname');
$bs = new mock_restore_structure_step('steptest', null, $bt);
$this->assertTrue(method_exists($bs, 'decrypt'));
// Let's prepare a string for being decrypted.
$secret = 'This is a secret message that nobody else will be able to read but me 💩 ';
$key = hash('md5', 'Moodle rocks and this is not secure key, who cares, it is a test');
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(backup::CIPHER));
$message = $iv . openssl_encrypt($secret, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv);
$hmac = hash_hmac('sha256', $message, $key, true);
$crypt = base64_encode($hmac . $message);
// Running it without a key configured, returns null.
$this->assertNull($bs->decrypt($crypt));
// Store the key into config.
set_config('backup_encryptkey', base64_encode($key), 'backup');
// Verify decrypt works and returns original.
$this->assertSame($secret, $bs->decrypt($crypt));
// Finally, test the integrity failure detection is working.
// (this can be caused by changed hmac, key or message, in
// this case we are just forcing it via changed hmac).
$hmac = md5($message);
$crypt = base64_encode($hmac . $message);
$this->assertNull($bs->decrypt($crypt));
}
/**
* test backup_structure_step class
*/
@@ -65,6 +65,7 @@ abstract class base_setting {
protected $name; // name of the setting
protected $value; // value of the setting
protected $unlockedvalue; // Value to set after the setting is unlocked.
protected $vtype; // type of value (setting_base::IS_BOOLEAN/setting_base::IS_INTEGER...)
protected $visibility; // visibility of the setting (setting_base::VISIBLE/setting_base::HIDDEN)
@@ -118,6 +119,7 @@ abstract class base_setting {
$this->value = $value;
$this->visibility = $visibility;
$this->status = $status;
$this->unlockedvalue = $this->value;
// Generate a default ui
$this->uisetting = new base_setting_ui($this);
@@ -225,6 +227,11 @@ abstract class base_setting {
$this->status = $status;
if ($status !== $oldstatus) { // Status has changed, let's inform dependencies
$this->inform_dependencies(self::CHANGED_STATUS, $oldstatus);
if ($status == base_setting::NOT_LOCKED) {
// When setting gets unlocked set it to the original value.
$this->set_value($this->unlockedvalue);
}
}
}
@@ -153,7 +153,7 @@ abstract class setting_dependency {
*/
abstract public function get_moodleform_properties();
/**
* Returns true if the dependent setting is locked.
* Returns true if the dependent setting is locked by this setting_dependency.
* @return bool
*/
abstract public function is_locked();
@@ -185,7 +185,7 @@ class setting_dependency_disabledif_equals extends setting_dependency {
$this->value = ($value)?(string)$value:0;
}
/**
* Returns true if the dependent setting is locked.
* Returns true if the dependent setting is locked by this setting_dependency.
* @return bool
*/
public function is_locked() {
@@ -193,8 +193,8 @@ class setting_dependency_disabledif_equals extends setting_dependency {
if ($this->setting->get_status() !== base_setting::NOT_LOCKED || $this->setting->get_value() == $this->value) {
return true;
}
// Else return based upon the dependent settings status
return ($this->dependentsetting->get_status() !== base_setting::NOT_LOCKED);
// Else the dependent setting is not locked by this setting_dependency.
return false;
}
/**
* Processes a value change in the primary setting
@@ -343,7 +343,7 @@ class setting_dependency_disabledif_equals2 extends setting_dependency {
$this->value = $value;
}
/**
* Returns true if the dependent setting is locked.
* Returns true if the dependent setting is locked by this setting_dependency.
* @return bool
*/
public function is_locked() {
@@ -351,8 +351,8 @@ class setting_dependency_disabledif_equals2 extends setting_dependency {
if ($this->setting->get_status() !== base_setting::NOT_LOCKED || in_array($this->setting->get_value(), $this->value)) {
return true;
}
// Else return based upon the dependent settings status
return ($this->dependentsetting->get_status() !== base_setting::NOT_LOCKED);
// Else the dependent setting is not locked by this setting_dependency.
return false;
}
/**
* Processes a value change in the primary setting
@@ -537,7 +537,7 @@ class setting_dependency_disabledif_not_empty extends setting_dependency_disable
}
/**
* Returns true if the dependent setting is locked.
* Returns true if the dependent setting is locked by this setting_dependency.
* @return bool
*/
public function is_locked() {
@@ -545,8 +545,8 @@ class setting_dependency_disabledif_not_empty extends setting_dependency_disable
if ($this->setting->get_status() !== base_setting::NOT_LOCKED || !empty($value)) {
return true;
}
// Else return based upon the dependent settings status
return ($this->dependentsetting->get_status() !== base_setting::NOT_LOCKED);
// Else the dependent setting is not locked by this setting_dependency.
return false;
}
}
@@ -601,7 +601,7 @@ class setting_dependency_disabledif_empty extends setting_dependency_disabledif_
return ($prevalue != $this->dependentsetting->get_value());
}
/**
* Returns true if the dependent setting is locked.
* Returns true if the dependent setting is locked by this setting_dependency.
* @return bool
*/
public function is_locked() {
@@ -609,7 +609,7 @@ class setting_dependency_disabledif_empty extends setting_dependency_disabledif_
if ($this->setting->get_status() !== base_setting::NOT_LOCKED || empty($value)) {
return true;
}
// Else return based upon the dependent settings status
return ($this->dependentsetting->get_status() !== base_setting::NOT_LOCKED);
// Else the dependent setting is not locked by this setting_dependency.
return false;
}
}
@@ -122,6 +122,8 @@ class backup_confirmation_form extends backup_moodleform {
if (!array_key_exists('setting_root_filename', $errors)) {
if (trim($data['setting_root_filename']) == '') {
$errors['setting_root_filename'] = get_string('errorfilenamerequired', 'backup');
} else if (strlen(trim($data['setting_root_filename'])) > 255) {
$errors['setting_root_filename'] = get_string('errorfilenametoolong', 'backup');
} else if (!preg_match('#\.mbz$#i', $data['setting_root_filename'])) {
$errors['setting_root_filename'] = get_string('errorfilenamemustbezip', 'backup');
}
+25 -10
View File
@@ -307,10 +307,12 @@ abstract class backup_setting_ui extends base_setting_ui {
* 2. The setting is locked but only by settings that are of the same level (same page)
*
* Condition 2 is really why we have this function
*
* @param int $level Optional, if provided only depedency_settings below or equal to this level are considered,
* when checking if the ui_setting is changeable. Although dependencies might cause a lock on this setting,
* they could be changeable in the same view.
* @return bool
*/
public function is_changeable() {
public function is_changeable($level = null) {
if ($this->setting->get_status() === backup_setting::NOT_LOCKED) {
// Its not locked so its chanegable.
return true;
@@ -319,6 +321,9 @@ abstract class backup_setting_ui extends base_setting_ui {
return false;
} else if ($this->setting->has_dependencies_on_settings()) {
foreach ($this->setting->get_settings_depended_on() as $dependency) {
if ($level && $dependency->get_setting()->get_level() >= $level) {
continue;
}
if ($dependency->is_locked() && $dependency->get_setting()->get_level() !== $this->setting->get_level()) {
// Its not changeable because one or more dependancies arn't changeable.
return false;
@@ -355,7 +360,8 @@ class backup_setting_ui_text extends backup_setting_ui {
*/
public function get_element_properties(base_task $task = null, renderer_base $output = null) {
$icon = $this->get_icon();
$label = $this->get_label($task);
$context = context_course::instance($task->get_courseid());
$label = format_string($this->get_label($task), true, array('context' => $context));
if (!empty($icon)) {
$label .= $output->render($icon);
}
@@ -418,7 +424,8 @@ class backup_setting_ui_checkbox extends backup_setting_ui {
public function get_element_properties(base_task $task = null, renderer_base $output = null) {
// Name, label, text, attributes.
$icon = $this->get_icon();
$label = $this->get_label($task);
$context = context_course::instance($task->get_courseid());
$label = format_string($this->get_label($task), true, array('context' => $context));
if (!empty($icon)) {
$label .= $output->render($icon);
}
@@ -456,13 +463,16 @@ class backup_setting_ui_checkbox extends backup_setting_ui {
/**
* Returns true if the setting is changeable
* @param int $level Optional, if provided only depedency_settings below or equal to this level are considered,
* when checking if the ui_setting is changeable. Although dependencies might cause a lock on this setting,
* they could be changeable in the same view.
* @return bool
*/
public function is_changeable() {
public function is_changeable($level = null) {
if ($this->changeable === false) {
return false;
} else {
return parent::is_changeable();
return parent::is_changeable($level);
}
}
@@ -525,7 +535,8 @@ class backup_setting_ui_radio extends backup_setting_ui {
*/
public function get_element_properties(base_task $task = null, renderer_base $output = null) {
$icon = $this->get_icon();
$label = $this->get_label($task);
$context = context_course::instance($task->get_courseid());
$label = format_string($this->get_label($task), true, array('context' => $context));
if (!empty($icon)) {
$label .= $output->render($icon);
}
@@ -602,7 +613,8 @@ class backup_setting_ui_select extends backup_setting_ui {
*/
public function get_element_properties(base_task $task = null, renderer_base $output = null) {
$icon = $this->get_icon();
$label = $this->get_label($task);
$context = context_course::instance($task->get_courseid());
$label = format_string($this->get_label($task), true, array('context' => $context));
if (!empty($icon)) {
$label .= $output->render($icon);
}
@@ -635,13 +647,16 @@ class backup_setting_ui_select extends backup_setting_ui {
/**
* Returns true if the setting is changeable, false otherwise
*
* @param int $level Optional, if provided only depedency_settings below or equal to this level are considered,
* when checking if the ui_setting is changeable. Although dependencies might cause a lock on this setting,
* they could be changeable in the same view.
* @return bool
*/
public function is_changeable() {
public function is_changeable($level = null) {
if (count($this->values) == 1) {
return false;
} else {
return parent::is_changeable();
return parent::is_changeable($level);
}
}
+14 -2
View File
@@ -183,11 +183,22 @@ abstract class base_moodleform extends moodleform {
public function add_settings(array $settingstasks) {
global $OUTPUT;
// Determine highest setting level, which is displayed in this stage. This is relevant for considering only
// locks of dependency settings for parent settings, which are not displayed in this stage.
$highestlevel = backup_setting::ACTIVITY_LEVEL;
foreach ($settingstasks as $st) {
list($setting, $task) = $st;
if ($setting->get_level() < $highestlevel) {
$highestlevel = $setting->get_level();
}
}
$defaults = array();
foreach ($settingstasks as $st) {
list($setting, $task) = $st;
// If the setting cant be changed or isn't visible then add it as a fixed setting.
if (!$setting->get_ui()->is_changeable() || $setting->get_visibility() != backup_setting::VISIBLE) {
if (!$setting->get_ui()->is_changeable($highestlevel) ||
$setting->get_visibility() != backup_setting::VISIBLE) {
$this->add_fixed_setting($setting, $task);
continue;
}
@@ -302,7 +313,8 @@ abstract class base_moodleform extends moodleform {
$icon = '';
break;
}
$label = $settingui->get_label($task);
$context = context_course::instance($task->get_courseid());
$label = format_string($settingui->get_label($task), true, array('context' => $context));
$labelicon = $settingui->get_icon();
if (!empty($labelicon)) {
$label .= '&nbsp;'.$OUTPUT->render($labelicon);
@@ -0,0 +1,125 @@
@core @core_backup
Feature: Restore Moodle 2 course backups with different user data settings
In order to decide upon including user data during backup and restore of courses
As a teacher and an admin
I need to be able to set and override backup and restore settings
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist:
| activity | name | intro | course | idnumber |
| data | Test database name | n | C1 | data1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I add a "Text input" field to "Test database name" database and I fill the form with:
| Field name | Test field name |
| Field description | Test field description |
And I follow "Templates"
And I wait until the page is ready
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I add an entry to "Test database name" database with:
| Test field name | Student entry |
And I press "Save and view"
And I log out
And I log in as "admin"
And I backup "Course 1" course using this options:
| Initial | Include enrolled users | 1 |
| Confirmation | Filename | test_backup.mbz |
@javascript
Scenario: Restore a backup with user data
# "User data" marks the user data field for the section
# "-" marks the user data field for the data activity
When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 1 |
| Schema | User data | 1 |
| Schema | - | 1 |
Then I should see "Test database name"
When I follow "Test database name"
Then I should see "Student entry"
@javascript
Scenario: Restore a backup without user data for data activity
# "User data" marks the user data field for the section
# "-" marks the user data field for the data activity
When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 1 |
| Schema | User data | 1 |
| Schema | - | 0 |
Then I should see "Test database name"
When I follow "Test database name"
Then I should not see "Student entry"
@javascript
Scenario: Restore a backup without user data for section and data activity
# "User data" marks the user data field for the section
# "-" marks the user data field for the data activity
When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 1 |
| Schema | User data | 0 |
| Schema | - | 0 |
Then I should see "Test database name"
When I follow "Test database name"
Then I should not see "Student entry"
@javascript
Scenario: Restore a backup without user data for section
# "User data" marks the user data field for the section
# "-" marks the user data field for the data activity
When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 1 |
| Schema | - | 1 |
| Schema | User data | 0 |
Then I should see "Test database name"
When I follow "Test database name"
Then I should not see "Student entry"
@javascript
Scenario: Restore a backup with user data with local config for including users set to 0
And I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 0 |
Then I should see "Test database name"
When I follow "Test database name"
Then I should not see "Student entry"
@javascript
Scenario: Restore a backup with user data with site config for including users set to 0
Given I navigate to "General restore defaults" node in "Site administration > Courses > Backups"
And I set the field "s_restore_restore_general_users" to ""
And I press "Save changes"
And I am on "Course 1" course homepage
And I navigate to "Restore" node in "Course administration"
# "User data" marks the user data field for the section
# "-" marks the user data field for the data activity
And I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 1 |
| Schema | User data | 1 |
| Schema | - | 1 |
Then I should see "Test database name"
When I follow "Test database name"
Then I should see "Student entry"
@javascript
Scenario: Restore a backup with user data with local and site config config for including users set to 0
Given I navigate to "General restore defaults" node in "Site administration > Courses > Backups"
And I set the field "s_restore_restore_general_users" to ""
And I press "Save changes"
And I am on "Course 1" course homepage
And I navigate to "Restore" node in "Course administration"
When I restore "test_backup.mbz" backup into a new course using this options:
| Settings | Include enrolled users | 0 |
Then I should see "Test database name"
When I follow "Test database name"
Then I should not see "Student entry"
+12 -8
View File
@@ -27,18 +27,22 @@ function check_site_access() {
var callback = {
method: "GET",
on: {
success: function(id, o, args) {
var data = Y.JSON.parse(o.responseText);
if (data.code == 'http-unreachable') {
add.setHTML(data.response);
add.removeClass('hide');
}
},
failure: function(o) { }
success: function(id, o) {
var data = Y.JSON.parse(o.responseText);
if (data.code == 'http-unreachable') {
add.setHTML(data.response);
add.removeClass('hide');
}
M.util.js_complete('badge/backpack::check_site_access');
},
failure: function() {
M.util.js_complete('badge/backpack::check_site_access');
}
}
};
Y.use('io-base', function(Y) {
M.util.js_pending('badge/backpack::check_site_access');
Y.io('ajax.php', callback);
});
+4 -4
View File
@@ -61,10 +61,10 @@ class edit_backpack_form extends moodleform {
array('class' => 'notconnected', 'id' => 'connection-status'));
$mform->addElement('static', 'status', get_string('status'), $status);
$mform->addElement('hidden', 'email', $this->_customdata['email']);
$mform->setType('email', PARAM_RAW_TRIMMED);
$mform->setType('email', PARAM_EMAIL);
$mform->hardFreeze(['email']);
$status = html_writer::tag('span', $this->_customdata['email'], []);
$mform->addElement('static', 'emailverify', get_string('email'), $status);
$emailverify = html_writer::tag('span', s($this->_customdata['email']), []);
$mform->addElement('static', 'emailverify', get_string('email'), $emailverify);
$buttonarray = [];
$buttonarray[] = &$mform->createElement('submit', 'submitbutton',
get_string('backpackconnectionresendemail', 'badges'));
@@ -80,7 +80,7 @@ class edit_backpack_form extends moodleform {
$mform->addElement('text', 'email', get_string('email'), 'maxlength="100" size="30"');
$mform->addHelpButton('email', 'backpackemail', 'badges');
$mform->addRule('email', get_string('required'), 'required', null, 'client');
$mform->setType('email', PARAM_RAW_TRIMMED);
$mform->setType('email', PARAM_EMAIL);
$this->add_action_buttons(false, get_string('backpackconnectionconnect', 'badges'));
}
}
+2 -2
View File
@@ -48,8 +48,8 @@ class edit_details_form extends moodleform {
$mform->addElement('header', 'badgedetails', get_string('badgedetails', 'badges'));
$mform->addElement('text', 'name', get_string('name'), array('size' => '70'));
// Using PARAM_FILE to avoid problems later when downloading badge files.
$mform->setType('name', PARAM_FILE);
// When downloading badge, it will be necessary to clean the name as PARAM_FILE.
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required');
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
+1
View File
@@ -72,6 +72,7 @@ if ($hide) {
require_sesskey();
$badge = new badge($download);
$name = str_replace(' ', '_', $badge->name) . '.png';
$name = clean_param($name, PARAM_FILE);
$filehash = badges_bake($hash, $download, $USER->id, true);
$fs = get_file_storage();
$file = $fs->get_file_by_hash($filehash);
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_activity_modules.
*
* @package block_activity_modules
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_activity_modules\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_activity_modules implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}
@@ -24,3 +24,4 @@
$string['activity_modules:addinstance'] = 'Add a new activities block';
$string['pluginname'] = 'Activities';
$string['privacy:metadata'] = 'The Activites block only shows data stored in other locations.';
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_activity_results.
*
* @package block_activity_results
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_activity_results\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_activity_results implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}
@@ -65,3 +65,4 @@ $string['worstgrade'] = 'The lowest grade:';
$string['worstgrades'] = 'The {$a} lowest grades:';
$string['worstgroupgrade'] = 'The group with the lowest average:';
$string['worstgroupgrades'] = 'The {$a} groups with the lowest average:';
$string['privacy:metadata'] = 'The Activites results block only shows data stored in other locations.';
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_admin_bookmarks.
*
* @package block_admin_bookmarks
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_admin_bookmarks\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_admin_bookmarks implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}
@@ -25,3 +25,4 @@
$string['admin_bookmarks:addinstance'] = 'Add a new admin bookmarks block';
$string['admin_bookmarks:myaddinstance'] = 'Add a new admin bookmarks block to Dashboard';
$string['pluginname'] = 'Admin bookmarks';
$string['privacy:metadata'] = 'The Admin bookmarks block only shows data stored in other locations.';
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_badges.
*
* @package block_badges
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_badges\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_badges implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}
+1
View File
@@ -28,3 +28,4 @@ $string['numbadgestodisplay'] = 'Number of latest badges to display';
$string['nothingtodisplay'] = 'You have no badges to display';
$string['badges:addinstance'] = 'Add a new My latest badges block';
$string['badges:myaddinstance'] = 'Add a new My latest badges block to Dashboard';
$string['privacy:metadata'] = 'The Badges block only shows data stored in other locations.';
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_blog_menu.
*
* @package block_blog_menu
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_blog_menu\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_blog_menu implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}
@@ -25,3 +25,4 @@
$string['blog_menu:addinstance'] = 'Add a new blog menu block';
$string['pluginname'] = 'Blog menu';
$string['privacy:metadata'] = 'The Blog menu block only shows data stored in other locations.';
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_blog_recent.
*
* @package block_blog_recent
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_blog_recent\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_blog_recent implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}
@@ -28,3 +28,4 @@ $string['norecentblogentries'] = 'No recent entries';
$string['numentriestodisplay'] = 'Number of recent entries to display';
$string['pluginname'] = 'Recent blog entries';
$string['recentinterval'] = 'Interval of time considered "recent"';
$string['privacy:metadata'] = 'The Recent blog entries block only shows data stored in other locations.';
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_blog_tags.
*
* @package block_blog_tags
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_blog_tags\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_blog_tags implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}
@@ -24,3 +24,4 @@
$string['blog_tags:addinstance'] = 'Add a new blog tags block';
$string['pluginname'] = 'Blog tags';
$string['privacy:metadata'] = 'The Blog tags block only shows data stored in other locations.';
@@ -0,0 +1,46 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Privacy Subsystem implementation for block_calendar_month.
*
* @package block_calendar_month
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_calendar_month\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem for block_calendar_month implementing null_provider.
*
* @copyright 2018 Zig Tan <zig@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason() {
return 'privacy:metadata';
}
}

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