Compare commits

...

691 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) c485e42447 Moodle release 3.4.2 2018-03-17 01:18:36 +01:00
Jake Dallimore 263e505748 weekly release 3.4.1+ 2018-03-16 10:08:55 +08:00
Eloy Lafuente (stronk7) cb46936de8 Merge branch 'MDL-61570-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-16 01:15:25 +01:00
Eloy Lafuente (stronk7) bc514fac18 Merge branch 'MDL-61566-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-16 00:29:48 +01:00
Andrew Nicols ea59dfbb81 MDL-61571 atto: Implement null provider for atto plugins 2018-03-15 23:49:53 +01:00
Jake Dallimore 8b1b0011f0 Merge branch 'wip-MDL-61477-34-behat' of https://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-03-15 16:44:25 +08:00
Marina Glancy e6571f9af9 MDL-61477 auth_email: behat tests for sign up 2018-03-15 16:22:57 +08:00
Jake Dallimore dea705b6b1 Merge branch 'wip-MDL-61477-34-manager' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-03-15 11:38:45 +08:00
Marina Glancy aef659d1e2 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:32:13 +08:00
David Mudrák 94e7b022c7 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:59 +08:00
Eloy Lafuente (stronk7) 98e4385879 Merge branch 'MDL-61600-34' of git://github.com/dpalou/moodle into MOODLE_34_STABLE 2018-03-14 14:43:38 +01:00
Eloy Lafuente (stronk7) 81eec779d9 Merge branch 'MDL-61620_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-03-14 13:38:50 +01:00
David Monllao 735da2261b MDL-61620 output: New action_menu options 2018-03-14 11:38:25 +01:00
Eloy Lafuente (stronk7) ad3fe959fd Merge branch 'MDL-61398-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-14 11:22:25 +01:00
Eloy Lafuente (stronk7) 66af90fde4 Merge branch 'MDL-61475-34-v3' of git://github.com/snake/moodle into MOODLE_34_STABLE 2018-03-14 11:01:07 +01:00
Dani Palou d9aa39baad MDL-61600 recaptcha: Create a script to display recaptcha 2018-03-14 10:33:52 +01:00
Andrew Nicols c71654fd2c Merge branch 'MDL-60398-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-03-14 10:33:44 +08:00
Jake Dallimore 8f72459f1a Merge branch 'MDL-61307-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-14 09:43:50 +08:00
Jake Dallimore 89985f5c5b 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:14 +08:00
Jake Dallimore 4d07ed6b17 MDL-61475 mod_choice: Update core_privacy implementation 2018-03-14 09:37:14 +08:00
Jun Pataleta 42c3218b2c MDL-61475 mod_choice: Add implementation of Privacy API 2018-03-14 09:37:14 +08:00
Andrew Nicols 1706ca6140 MDL-61398 block_html: Implement privacy API 2018-03-14 09:33:16 +08:00
Andrew Nicols 06ae551f04 MDL-61307 core_privacy: Add unit test to check installed providers 2018-03-14 09:32:28 +08:00
David Mudrák c22ea810ee MDL-61392 enrol_paypal: Improve IPN input parameters checking 2018-03-14 09:11:36 +08:00
David Mudrák 0167ce3ded 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:11:36 +08:00
Eloy Lafuente (stronk7) c6f4528a7f Merge branch 'MDL-61625_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-03-14 00:59:53 +01:00
David Mudrák b3016e0e1b 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 09:13:50 +01:00
Jake Dallimore 7286f62c01 Merge branch 'm34_MDL-61626_PgSQL_Table_Name_Could_Be_Schema_Qualified' of https://github.com/scara/moodle into MOODLE_34_STABLE 2018-03-13 15:37:43 +08:00
Andrew Nicols 50dcf3bdae Merge branch 'MDL-60828-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-13 15:29:13 +08:00
Andrew Nicols e8dae4203d Merge branch 'MDL-59070-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-13 13:23:10 +08:00
Andrew Nicols 30279d16dd Merge branch 'MDL-61397-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-03-13 12:36:37 +08:00
Andrew Nicols 8088ae2b3c Merge branch 'MDL-61567-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-03-13 12:21:00 +08:00
Zig Tan 362a7ed6fe MDL-61567 mod_url: Implement null provider mod_url 2018-03-13 11:14:12 +08:00
Zig Tan 2298b97814 MDL-61567 mod_resource: Implement null provider mod_resource 2018-03-13 11:14:12 +08:00
Zig Tan f2289ba9a2 MDL-61567 mod_page: Implement null provider mod_page 2018-03-13 11:14:12 +08:00
Zig Tan 731f9bd3f2 MDL-61567 mod_label: Implement null provider mod_label 2018-03-13 11:14:12 +08:00
Zig Tan 804e7a6142 MDL-61567 mod_folder: Implement null provider mod_folder 2018-03-13 11:14:12 +08:00
Eloy Lafuente (stronk7) c1bb75a533 Merge branch 'MDL-61307-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-13 03:27:41 +01:00
Zig Tan e319a383dc MDL-61397 blocks: Fix null_provider namespace for blocks 2018-03-13 09:59:21 +08:00
Andrew Nicols 72999a7eb9 MDL-61307 core: Language changes 2018-03-13 09:42:21 +08:00
Andrew Nicols cd505acf19 MDL-61307 privacy: Rename deletion functions 2018-03-13 08:49:03 +08:00
Andrew Nicols cf9ef3275d MDL-61307 core: Remove deletion_criteria 2018-03-13 08:48:59 +08:00
Eloy Lafuente (stronk7) 11e2c441cd Merge branch 'MDL-48501-mdl34' of git://github.com/jswebster/moodle into MOODLE_34_STABLE 2018-03-12 23:50:35 +01:00
Matteo Scaramuccia c499b15fe0 MDL-61626 core_dml: pgsql and schema qualification. 2018-03-12 22:51:38 +01:00
Eloy Lafuente (stronk7) 21f2c3435b Merge branch 'wip-MDL-60241-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-03-12 18:28:50 +01:00
Eloy Lafuente (stronk7) 61305a7684 Merge branch 'MDL-61397-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-12 17:31:27 +01:00
Eloy Lafuente (stronk7) 85eec82bc7 Merge branch 'MDL-61622-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-03-12 11:36:36 +01:00
David Monllao 841d54bc4a MDL-61625 persistent form: Add missing param to the constructor 2018-03-12 08:10:02 +01:00
Andrew Nicols e842b68d67 Merge branch 'MDL-61365-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-12 13:44:56 +08:00
Andrew Nicols 0fbe9dfb95 MDL-61570 tool_usertours: Implement Privacy API 2018-03-12 13:34:35 +08:00
Andrew Nicols 6f8ea0e2ea MDL-61566 theme: Add Privacy providers for all core themes 2018-03-12 13:26:06 +08:00
Andrew Nicols 63a54665f2 Merge branch 'MDL-61513-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-03-12 12:26:28 +08:00
Andrew Nicols 69b0484c6b Merge branch 'MDL-61498-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-12 12:07:49 +08:00
Andrew Nicols bcc0d0e9eb Merge branch 'MDL-61261-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-12 11:52:00 +08:00
Zig Tan 80d7a98d84 MDL-61397 blocks: Add null_providers for blocks with no user data 2018-03-12 08:44:19 +08:00
Juan Leyva 19ff10cf06 MDL-61622 auth: New WS is_age_digital_consent_verification_enabled 2018-03-09 18:07:30 +01:00
Sara Arjona 71a1d2bd85 MDL-60828 user: Reset current page when filtering/searching users
Added baseurl parameter to core_user\output\unified_filter to let specify
different URL, instead of using always $PAGE->url.
2018-03-09 08:36:39 +01:00
Jake Dallimore 3dacb31271 Merge branch 'MDL-61307-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-03-09 13:36:55 +08:00
Andrew Nicols 15a4560637 MDL-61307 core_plagiarism: Add implementation of Privacy API 2018-03-09 12:25:11 +08:00
Adrian Greeve 6010b427b4 MDL-61307 core_comment: Add implementation of privacy API 2018-03-09 12:25:10 +08:00
Andrew Nicols c0ca1a22bf MDL-61307 core_rating: Add implementation of Privacy API 2018-03-09 12:25:10 +08:00
Zig Tan e143bae8ea MDL-61307 core_tag: Unit tests for privacy implementation 2018-03-09 12:25:10 +08:00
Andrew Nicols 51da83291b MDL-61307 core_tag: Add implementation of privacy API 2018-03-09 12:25:10 +08:00
Andrew Nicols def77d7882 MDL-61307 core_privacy: Implementation of itself 2018-03-09 12:25:10 +08:00
Andrew Nicols 3f1cc42f4b 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:25:09 +08:00
Jake Dallimore 164034c4ec MDL-61307 core_privacy: Add the privacy manager 2018-03-09 12:25:09 +08:00
Andrew Nicols 289fe1ef76 MDL-61307 core_privacy: Define and test providers 2018-03-09 12:25:09 +08:00
Andrew Nicols 1d58d59c86 MDL-61307 core: Add component_class_callback functionality 2018-03-09 12:25:09 +08:00
Andrew Nicols 24125dd102 MDL-61307 core: Define a new privacy component 2018-03-09 12:25:08 +08:00
Marina Glancy 1263887287 MDL-60241 course: General section always visible (topics, weeks) 2018-03-09 12:08:52 +08:00
Jeff Webster a8d1cc6598 MDL-48501 auth/email: update external class to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster d0c9577d6c MDL-48501 mod_feedback: update feedback to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster 17e1f9a22d MDL-48501 login: update signup_form to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster b526202a35 MDL-48501 form/recaptcha: update to use reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster 3ff16f4ed9 MDL-48501 recaptchalib_v2: add new lib to support reCAPTCHA v2 2018-03-08 14:48:08 -05:00
Jeff Webster 1fca1d68b5 MDL-48501 lang: update reCAPTCHA language strings 2018-03-08 14:48:08 -05:00
Luca Bösch 86a1fa9984 MDL-59070 enrol_database: Take enablecompletion from template 2018-03-08 17:23:45 +01:00
Luca Bösch 1840aa4cb1 MDL-61498 lesson: link to next activity in boost 2018-03-08 17:23:19 +01:00
Eloy Lafuente (stronk7) f4e99c54bb weekly release 3.4.1+ 2018-03-08 13:29:17 +01:00
Eloy Lafuente (stronk7) 1c6506769a NOBUG: Fixed SVG browser compatibility 2018-03-08 13:29:15 +01:00
Eloy Lafuente (stronk7) d13fa3fb6d Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-03-08 13:29:14 +01:00
Andrew Nicols 6418439f08 Merge branch 'MDL-61423-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-03-08 15:27:32 +08:00
Mihail Geshoski 1ae5e63101 MDL-61423 authentication: Add digital minor verification upon signup 2018-03-08 15:02:16 +08:00
Eloy Lafuente (stronk7) 70902e0f9c Merge branch 'MDL-60445-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-07 19:20:10 +01:00
Jesse Ritchey b005459b1e MDL-60445 theme_boost: remove fieldset tag 2018-03-07 11:09:12 +01:00
Andrew Nicols 74653366f3 Merge branch 'WIP-MDL-60658-34' of https://github.com/chkhanu/moodle into MOODLE_34_STABLE 2018-03-07 11:37:37 +08:00
Andrew Nicols e0008d0ae3 Merge branch 'wip-MDL-61322-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-03-07 10:57:46 +08:00
Andrew Nicols 7d0f502483 Merge branch 'MDL-61497-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-07 10:27:39 +08:00
AMOS bot 0301d8bd62 Automatically generated installer lang files 2018-03-07 00:06:26 +00:00
Eloy Lafuente (stronk7) ed154400cd Merge branch 'MDL-61312-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-03-07 00:49:41 +01:00
Eloy Lafuente (stronk7) 21f3353471 Merge branch 'MDL-36157-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-03-06 02:49:12 +01:00
Luca Bösch 3b1041475e MDL-36157 block_rss_client: Don't double escape titles. 2018-03-06 00:20:40 +01:00
Luca Bösch 3e74f4c3ce MDL-36157 block_rss_client: Don't double escape titles. 2018-03-06 00:20:40 +01:00
Eloy Lafuente (stronk7) 0af73bec89 Merge branch 'MDL-61211-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-03-05 23:33:25 +01:00
Eloy Lafuente (stronk7) 059ac53abb Merge branch 'MDL-55153-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-03-05 23:26:03 +01:00
Eloy Lafuente (stronk7) d968714802 Merge branch 'MDL-61549-34' of git://github.com/Dagefoerde/moodle into MOODLE_34_STABLE 2018-03-05 23:22:55 +01:00
Andrew Nicols ff74536adb MDL-61268 core: Fix empty string DB cehck
(amended by stronk7 to use the helper better)
2018-03-02 16:32:19 +01:00
Andrew Nicols 8221c18d51 Merge branch 'wip-MDL-61268-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-03-02 10:03:28 +08:00
Andrew Nicols a40d205eb5 Merge branch 'MDL-61196_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-03-02 09:34:46 +08:00
Adrian Greeve ec72828d18 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:28:05 +08:00
Adrian Greeve e8e497f4d4 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:27:10 +08:00
Eloy Lafuente (stronk7) 6b1a68d2b5 Merge branch 'MDL-61533-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-03-02 01:42:56 +01:00
Helen Foster 8756f250eb 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:29:43 +01:00
Luca Bösch 52902fb436 MDL-61497 repository_onedrive: Use post 2015 icon 2018-03-01 08:58:21 +01:00
Chernyavskiy Leonid 24112d09b9 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:29 +07:00
Mihail Geshoski e1a1f5652f MDL-61211 lesson: Error when answer or response contains break tag 2018-03-01 09:51:44 +08:00
Andrew Nicols 413d6b046b Merge branch 'MDL-61453-34-userpicturefiletype' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-03-01 08:46:20 +08:00
Eloy Lafuente (stronk7) fa19d59444 weekly release 3.4.1+ 2018-02-28 12:58:23 +01:00
Jan Dageförde 6bfebfc7b8 MDL-61549 user: Remove $already columns because none were loaded yet 2018-02-27 14:47:59 +01:00
Jake Dallimore 6f7a1abba4 Merge branch 'wip-MDL-61485-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-02-27 09:39:51 +08:00
Jake Dallimore f3e2bf2b7c Merge branch 'MDL-61480-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-27 09:05:21 +08:00
Eloy Lafuente (stronk7) 1c3887d692 Merge branch 'MDL-61249-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-02-26 23:10:32 +01:00
Mihail Geshoski 40df9d3653 MDL-60398 resource: Unable to download folder resource 2018-02-26 16:52:23 +08:00
Andrew Nicols 85270722f5 MDL-61480 core: Check plugin installed before returning 2018-02-26 12:11:54 +08:00
Andrew Nicols 5cff9f0e9a Merge branch 'MDL-60547-34' of git://github.com/cescobedo/moodle into MOODLE_34_STABLE 2018-02-26 10:27:29 +08:00
Andrew Nicols bdf49f89f5 Merge branch 'MDL-61462-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-26 10:16:09 +08:00
Sara Arjona 59f3aac4ac MDL-61249 enrol_manual: Fix end date calculation
This patch has been given by Bruno Malaval.
2018-02-23 08:21:05 +01:00
Jake Dallimore 1126aaf1a2 weekly release 3.4.1+ 2018-02-23 11:51:37 +08:00
Jake Dallimore ceb90e7131 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-02-23 11:51:36 +08:00
Jun Pataleta 3191a94345 MDL-61513 admin: Fix undefined $buttons variable 2018-02-22 10:22:49 +08:00
Eloy Lafuente (stronk7) e45feac1ad Merge branch 'MDL-61324_lti_sync_34' of git://github.com/davosmith/moodle into MOODLE_34_STABLE 2018-02-22 08:31:30 +08:00
Dan Marsden 5e35fa16d5 MDL-61005 core_cohort: Allow teachers to view site-wide cohorts 2018-02-22 08:31:29 +08:00
Luca Bösch 08b3b1b449 MDL-58845 mod_choice: Fix behat related tests 2018-02-22 08:31:29 +08:00
Andrew Nicols 1af36b5ffd Merge branch 'MDL-61421-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-02-22 08:31:28 +08:00
Andrew Nicols 058ba89dab Merge branch 'MDL-61408-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-22 08:31:27 +08:00
Carlos 16e0ea970e MDL-60547 message_popup: adding preventDefault at notification popover 2018-02-21 23:36:03 +01:00
Sara Arjona fa5e817df9 MDL-55153 customlang: Remove local DB entries when deleting local file 2018-02-21 21:03:11 +01:00
Mihail Geshoski ac424c9bb6 MDL-61485 authentication: Add callback 'pre_signup_requests' 2018-02-20 10:01:50 +08:00
AMOS bot b7eab5a554 Automatically generated installer lang files 2018-02-20 00:06:25 +00:00
Eloy Lafuente (stronk7) a6a174d817 Merge branch 'MDL-58845-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-19 02:12:48 +01:00
Andrew Nicols d0064b9d05 Merge branch 'MDL-61289-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-19 09:06:54 +08:00
Jun Pataleta cf32b66e19 MDL-61289 mod_choice: Add extra user fields to response data 2018-02-19 08:54:50 +08:00
AMOS bot c56217eee1 Automatically generated installer lang files 2018-02-19 00:06:23 +00:00
AMOS bot 29570a7a84 Automatically generated installer lang files 2018-02-17 00:06:25 +00:00
Luca Bösch b0199478df MDL-61408 qbehaviour: Correct "Check" button styling. 2018-02-16 08:45:09 +01:00
Luca Bösch 5b1cfc900d MDL-58845 mod_choice: In reports, respect "Show column for unanswered" 2018-02-16 08:45:02 +01:00
Jun Pataleta 02804d1cec MDL-61462 admin_roles: Point back to roles link to the correct URL 2018-02-16 10:33:37 +08:00
Eloy Lafuente (stronk7) 4ce48de8d6 weekly release 3.4.1+ 2018-02-15 17:10:32 +01:00
David Mudrák 32324be121 MDL-61453 user: Fix accepted file type when uploading user pictures
Not all archives are supported, only ZIP files are.
2018-02-14 18:08:10 +01:00
Andrew Nicols 80528b181a Merge branch 'wip-34-MDL-61344' of https://github.com/ndunand/moodle into MOODLE_34_STABLE 2018-02-13 09:04:27 +08:00
Andrew Nicols e037ee80fb Merge branch 'MDL-61150_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-02-13 09:02:31 +08:00
David Monllao fc649d6700 Merge branch 'MDL-61236-34' of git://github.com/farhan6318/moodle into MOODLE_34_STABLE 2018-02-12 12:14:23 +01:00
Nicolas Dunand 96baa3d320 MDL-61344 mod_assign: Show additional files when adding submission 2018-02-12 11:16:49 +01:00
David Monllao eadb6a737e Merge branch 'MDL-61153-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-02-12 10:56:01 +01:00
David Monllao 9a88b86217 Merge branch 'MDL-61375_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-02-12 09:40:56 +01:00
Nick Phillips 77c2211b75 MDL-56688 grade: fix ordering of grade items in grade_seq::flatten 2018-02-12 09:35:11 +01:00
Davo Smith e2bb36513f MDL-61324 enrol_lti: fix detection of changed grades during sync 2018-02-12 08:24:59 +00:00
David Monllao 664308286c Merge branch 'mod-lti-fix-test-with-hardcoded-url-mdl34' of https://github.com/peikk0/moodle into MOODLE_34_STABLE 2018-02-12 09:20:56 +01:00
David Monllao 8553738434 Merge branch 'MDL-61425-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-12 09:13:13 +01:00
Sara Arjona 7a414b0522 MDL-61421 cohort: Fix cohort_role_sync when a user is in two cohorts 2018-02-12 08:57:55 +01:00
Andrew Nicols ba27a4f741 Merge branch 'MDL-61366_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-02-12 15:26:16 +08:00
Ryan Wyllie 18ea34c2a5 MDL-60958 calendar: fix test helper action factory 2018-02-12 13:52:19 +08:00
Andrew Nicols db75447658 Merge branch 'MDL-60958-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-02-12 13:35:03 +08:00
Ryan Wyllie f594f67868 MDL-60958 calendar: stop db query in repeat collection constructor
Stop loading the parent record in the constructor because it is an
unnecessary DB query for each event instantiation.

Return null on get_repeats() for events that don't have repeats.
2018-02-12 05:31:41 +00:00
Shamim Rezaie 77786dec80 MDL-61425 theme_boost: Made question labels width full in question bank 2018-02-12 14:54:44 +11:00
Andrew Nicols 01dc5c1a45 Merge branch 'MDL-61305-34-fix' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-12 11:31:43 +08:00
Andrew Nicols 45202e1154 MDL-61305 modinfo: Add back missing require for course 2018-02-12 10:38:33 +08:00
Andrew Nicols 8c12581e12 Merge branch 'MDL-61305-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2018-02-12 09:07:45 +08:00
Pierre Guinoiseau 6bbba0d921 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:11 +13:00
Andrew Nicols 0d3166adb5 Merge branch 'MDL-61413_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-02-12 08:08:38 +08:00
Marina Glancy 5a43147f56 MDL-61150 xmldb: correct path to schema in install.xml 2018-02-11 23:07:48 +01:00
Eloy Lafuente (stronk7) 3e3c2994be MDL-61150 xmldb: Fix wrong PATH attributes in core 2018-02-11 23:07:48 +01:00
Farhan Karmali 4448ddc159 MDL-61236 enrol: Course welcome message to be sent from correct contact 2018-02-11 20:49:56 +05:30
Eloy Lafuente (stronk7) d293116fda MDL-61413 mod_lti: Use sql_compare_text() for comparing TEXTs 2018-02-11 02:17:52 +01:00
Mark Nelson 2f2d7e6358 MDL-61196 message_popup: clean params before returning via WS 2018-02-09 17:37:16 +08:00
Mark Nelson db6cff3f7a MDL-61375 mod_chat: specify the 'eventtype' to avoid duplicate rows 2018-02-09 14:47:02 +08:00
sam marshall 283f265fbe 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:49:10 +00:00
David Monllao 091b2fad14 weekly release 3.4.1+ 2018-02-08 09:29:16 +01:00
Sara Arjona aba9cc490d MDL-61365 group: Fix default filter when group mode is visible 2018-02-07 18:10:34 +01:00
Andrew Nicols 9cb9c85728 Merge branch 'MDL-61377-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-07 12:52:42 +08:00
Shamim Rezaie 7edc187fb7 MDL-61377 Core: Fixed faulty warning when using progress_bar 2018-02-07 14:49:00 +11:00
Eloy Lafuente (stronk7) 3b35ab9fd5 MDL-52832 quiz: sql fixing couple of incorrect group by uses 2018-02-07 07:09:15 +08:00
Tim Hunt 5678028de7 MDL-61366 setuplib: safely construct the ajax renderer when needed 2018-02-06 12:13:02 +00:00
David Monllao 100e9f3d12 Merge branch 'MDL-52832-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-06 12:20:04 +01:00
Dan Marsden 5bcc32e756 MDL-60421 tool_cohortroles: fix deprecated call. 2018-02-06 10:51:44 +01:00
Eloy Lafuente (stronk7) 202affd1a2 Merge branch 'MDL-61168-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-05 20:40:26 +01:00
Eloy Lafuente (stronk7) ab72dbee64 Merge branch 'MDL-61341-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-05 20:08:20 +01:00
David Monllao 496a40a49b Merge branch 'MDL-61027-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-05 11:56:28 +01:00
David Monllao 1a24b6b2d7 Merge branch 'MDL-61251-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-05 11:50:48 +01:00
David Monllao 38f9a7b1c8 Merge branch 'MDL-42764_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-02-05 11:18:46 +01:00
Andrew Nicols ab121de9de Merge branch 'MDL-61269_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-02-05 17:30:32 +08:00
Andrew Nicols 429ea1545c Merge branch 'MDL-51189-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-02-05 15:52:28 +08:00
Eloy Lafuente (stronk7) 9c397f9f63 MDL-61269 composer: better license GPL-3.0-or-later
Source: https://spdx.org/licenses/
2018-02-04 19:40:02 +01:00
Sara Arjona 85fea314bb MDL-61261 badges: Add email validation during backpack configuration 2018-02-02 11:35:28 +01:00
Andrew Nicols 58f7ad98d7 MDL-61341 theme_boost: Fix usertour zindex calculations 2018-02-02 11:31:55 +08:00
Andrew Nicols 422889d0eb MDL-61341 theme_boost: Modify variables used for calculations
Variables must be of the same type for Math to take place. We cannot
mix REM and EM because they have different relative roots.
2018-02-02 11:31:54 +08:00
Jun Pataleta bb279dc22e MDL-61168 mod_assign: Truncate only the online text submission 2018-02-02 09:21:53 +08:00
Luca Bösch 507ab4cf6b MDL-61251 admin: configenablerssfeedsdisabled2 string more correct. 2018-02-01 22:57:34 +01:00
Luca Bösch 36877227fb MDL-52832 quiz: timeclose in activities block looks after overrides. 2018-02-01 22:52:13 +01:00
David Monllao b08db1daa2 weekly release 3.4.1+ 2018-02-01 14:26:45 +01:00
David Monllao 65970afe4e Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-02-01 14:26:44 +01:00
Jake Dallimore 9cb1ac35c2 Merge branch 'MDL-60077-34-fix' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-01 14:56:11 +08:00
Andrew Nicols 9089f50463 MDL-60077 tool_usertours: Pull v0.12.2 of usertours for triangle fix 2018-02-01 14:28:54 +08:00
David Mudrák 4d3651a151 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:00 +08:00
Eloy Lafuente (stronk7) d977e539d5 Merge branch 'MDL-61058-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:59 +08:00
Eloy Lafuente (stronk7) 2b89024ea2 Merge branch 'MDL-61023-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:59 +08:00
Andrew Nicols a9bb5dbe8d Merge branch 'MDL-61313_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-02-01 10:33:59 +08:00
Eloy Lafuente (stronk7) 8aa07c75a1 Merge branch 'MDL-44612-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:58 +08:00
Eloy Lafuente (stronk7) ed21686174 Merge branch 'MDL-61281_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2018-02-01 10:33:58 +08:00
David Monllao 60af40cbfd Merge branch 'MDL-60646-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:58 +08:00
David Monllao 17fed89644 Merge branch 'MDL-60997-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:57 +08:00
David Monllao 350e280741 Merge branch 'MDL-61152-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-02-01 10:33:57 +08:00
David Monllao a9c01e8c52 Merge branch 'MDL-61260_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-02-01 10:33:57 +08:00
Jake Dallimore e44cedd104 Merge branch 'MDL-61253-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-02-01 10:33:56 +08:00
Andrew Nicols 82f5d60aa6 Merge branch 'MDL-60077-34' of https://github.com/HuongNV13/moodle into MOODLE_34_STABLE 2018-02-01 10:33:56 +08:00
Andrew Nicols c5910cb7dc Merge branch 'MDL-61250-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2018-02-01 10:33:56 +08:00
Adrian Greeve 9dd8490aa6 MDL-61322 reports: Reformated the display date to include the year. 2018-02-01 08:28:35 +08:00
AMOS bot 3486243420 Automatically generated installer lang files 2018-02-01 00:06:45 +00:00
AMOS bot 79e685233f Automatically generated installer lang files 2018-01-31 00:06:34 +00:00
David Monllao 38c0a5d05f MDL-61313 behat: Move future events further 2018-01-30 18:17:24 +01:00
Juan Leyva 444b165c09 MDL-61312 completion: Return completion for teachers via WS
core_completion_get_activities_completion_status was not returning
completion information for users with the teacher role only (when it
wasn’t a role allowed to track completion).
2018-01-30 12:20:16 +01:00
AMOS bot 060b55064f Automatically generated installer lang files 2018-01-30 00:06:37 +00:00
AMOS bot 05818d70eb Automatically generated installer lang files 2018-01-30 00:06:36 +00:00
Mark Nelson 4c86ca6666 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:22 +08:00
Huong Nguyen 718235f569 MDL-60077 User tours: pop-up triangle look bad next to the corners 2018-01-29 10:33:08 +07:00
Mark Nelson 8dcd8b8132 MDL-61260 auth_ldap: require /user/profile/lib.php file 2018-01-29 11:31:24 +08:00
Eloy Lafuente (stronk7) eed3f1a83d Merge branch 'wip-MDL-61242-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-01-29 01:41:14 +01:00
Andrew Nicols 95fab37f66 Merge branch 'MDL-58410_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-29 08:19:57 +08:00
Eloy Lafuente (stronk7) 3c7eb5f50c Merge branch 'MDL-61218-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2018-01-29 00:06:15 +01:00
David Monllao 512f9e294f MDL-61281 search_solr: PHP 7.2 compatible counts 2018-01-28 19:00:45 +01:00
Luca Bösch 831b569c5f MDL-61250 questions: Omit leading space in question preview link 2018-01-25 14:25:29 +01:00
Jun Pataleta 34f90c2bdd MDL-60997 core_message: Add replytoname in unit test 2018-01-25 16:48:01 +08:00
Arnaud Trouvé fa72c683bd MDL-60997 messages: add property replytoname 2018-01-25 16:48:00 +08:00
Andrew Nicols 3f8287efe3 weekly release 3.4.1+ 2018-01-25 15:14:41 +08:00
Andrew Nicols 4a086154fa Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-01-25 15:14:38 +08:00
Jake Dallimore 75ba3e39d5 Merge branch 'MDL-60078-34-fix' of https://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-25 14:48:47 +08:00
Andrew Nicols 2b9d5423de MDL-60078 tool_usertours: Adjust accessibility checks for all themes 2018-01-25 12:46:29 +08:00
Eloy Lafuente (stronk7) 5e8961ebe0 MDL-61269 behat-extension: bump to fix some caps & defaults 2018-01-24 22:27:14 +01:00
Jun Pataleta 8737636d72 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:33 +08:00
Jun Pataleta c9950e69a2 MDL-44612 mod_forum: Confirm forum post listing in recent activity block 2018-01-24 16:39:33 +08:00
Damyon Wiese 0f9cf691a8 MDL-61023 behat: Automate MDLQA-8158
Verify the general section does not appear in the navigation when it is empty.
2018-01-24 16:38:35 +08:00
Damyon Wiese e5e71433c4 MDL-61058 behat: Automate MDLQA-8146
Verify that the keyholder is displayed on the self enrolment page.
2018-01-24 16:36:55 +08:00
Igor Sazonov 3b2e74d33e MDL-58410 user: add support for alternative name search
The solution about searching all external names fields (middlename etc) from course enrolment page (enrolled and enrolling pages)
2018-01-24 11:16:15 +08:00
Andrew Nicols d0d8b19dab MDL-61234 tool_usertours: Rewrite feature to work with all themes 2018-01-24 03:15:41 +01:00
Simey Lameze c4b5d16556 MDL-61218 lib: set chart border color to white 2018-01-23 12:06:00 +08:00
Andrew Nicols 04881b93f1 MDL-61253 repository: Add referenced files to archives 2018-01-23 11:51:55 +08:00
Jun Pataleta 89d0471764 MDL-61152 calendar: Remove usage of undefined variable 2018-01-23 10:50:55 +08:00
Eloy Lafuente (stronk7) 679f5d18ff Merge branch 'MDL-60814_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-23 01:55:21 +01:00
Shamim Rezaie 6aa7833c71 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:50 +11:00
Eloy Lafuente (stronk7) df4a6bbcc2 Merge branch 'MDL-60918-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-01-22 20:17:33 +01:00
Eloy Lafuente (stronk7) 6c375449df Merge branch 'MDL-58006-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-01-22 20:00:10 +01:00
Eloy Lafuente (stronk7) 0555022bc2 Merge branch 'MDL-60812-34' of https://github.com/mwehr/moodle into MOODLE_34_STABLE 2018-01-22 16:33:18 +01:00
Eloy Lafuente (stronk7) 6d05b0db52 Merge branch 'MDL-60181-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-01-22 12:51:29 +01:00
Shamim Rezaie ca40c1f4ee MDL-61027 calendar: Fix datetime profile field issue with non-Gregorian 2018-01-22 19:06:19 +11:00
Mihail Geshoski 1bd8a0a2aa MDL-60181 glossary: Glossary rating is displayed wrongly 2018-01-22 13:58:02 +08:00
Andrew Nicols e4fac0f267 Merge branch 'MDL-61240_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2018-01-22 11:39:33 +08:00
Zig Tan 8be3607c28 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:18 +08:00
Andrew Nicols ac7aae0dd2 MDL-60078 behat: Convert ErrorException to DriverException 2018-01-22 11:29:59 +08:00
Andrew Nicols ab4d19f260 Merge branch 'MDL-60078-34' of https://github.com/nashtechdev01/moodle into MOODLE_34_STABLE 2018-01-22 11:29:55 +08:00
Eloy Lafuente (stronk7) f18f4c297d Merge branch 'MDL-61077_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-01-22 02:26:11 +01:00
Eloy Lafuente (stronk7) ee121e7fc3 Merge branch 'MDL-61234-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-22 02:03:40 +01:00
Eloy Lafuente (stronk7) e82f7b14b8 Merge branch 'wip-MDL-61175-MOODLE_34_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_34_STABLE 2018-01-22 01:24:52 +01:00
Eloy Lafuente (stronk7) 3ed13a332c Merge branch 'MDL-61224_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-22 01:23:17 +01:00
Adrian Greeve 780fe61954 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:01:09 +08:00
Andrew Nicols a588c0f85b MDL-61234 tool_usertours: Wrap library calls in pendingjs 2018-01-19 15:55:24 +08:00
AMOS bot b5e4c94307 Automatically generated installer lang files 2018-01-19 00:07:00 +00:00
Eloy Lafuente (stronk7) 4f5d1c5cbf MDL-61240 dml: php72 compatibility, avoid counting on non-countables
This was not detected earlier because we have been unable to
run sqlsrv + php72 till now (not available).
2018-01-19 01:01:36 +01:00
Kevin Wiliarty a19ee0e707 MDL-61175 mod_assign: roll grade-by reminder on restore 2018-01-18 08:39:49 -05:00
Jun Pataleta f5bb389882 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:26:53 +08:00
Andrew Nicols 95bce65a9f weekly release 3.4.1+ 2018-01-18 12:48:03 +08:00
Andrew Nicols 7cdd1a5c8e Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-01-18 12:48:01 +08:00
Mark Nelson c8d028d3f1 MDL-60814 auth_ldap: prevent setting names breaking site upgrades 2018-01-17 14:18:28 +08:00
AMOS bot 961fd545cf Automatically generated installer lang files 2018-01-17 00:06:29 +00:00
Jun Pataleta 6bbcb9c2e5 Merge branch 'MDL-61221-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-16 23:01:14 +08:00
KietLy 93482c3a53 MDL-60078 User tours accessibility: Tab should go back into the pop-up 2018-01-16 17:43:00 +07:00
Mark Nelson f393faa86c MDL-61224 core_role: prevent short name from exceeding 100 chars 2018-01-16 18:17:51 +08:00
David Monllao 69f18d2a63 Merge branch 'MDL-61010-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-16 09:25:23 +01:00
Adam Olley d41b8d3f32 MDL-60918 core_message: update preferences of user behat test 2018-01-16 05:27:09 +00:00
Ryan Wyllie ec40f18efb MDL-60918 message: use current user in message preference update 2018-01-16 05:27:09 +00:00
Andrew Nicols 645bc22468 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:17 +08:00
Andrew Nicols 92eb0a6d9c Merge branch 'MDL-60815-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2018-01-16 12:29:59 +08:00
Ryan Wyllie c5098c6704 MDL-60815 theme: fix loading editor styles 2018-01-16 03:41:03 +00:00
David Knuplesch 07dc19ad69 MDL-60549 lti: support for moving embedded lti into separate tab 2018-01-16 10:12:05 +08:00
Eloy Lafuente (stronk7) fbf616e651 Merge branch 'MDL-61204-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-16 02:16:53 +01:00
Andrew Nicols 1ddeb827a3 MDL-61010 mod_forum: Add unread link to blog view 2018-01-16 08:07:31 +08:00
AMOS bot bcd507a3f7 Automatically generated installer lang files 2018-01-16 00:06:38 +00:00
Eloy Lafuente (stronk7) c45b1e62dd Merge branch 'MDL-61081-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-01-16 00:27:53 +01:00
Eloy Lafuente (stronk7) b36c124f3d Merge branch 'MDL-37390-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2018-01-16 00:25:33 +01:00
Eloy Lafuente (stronk7) 43b5384168 Merge branch 'MDL-61162-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2018-01-15 22:58:04 +01:00
Tim Hunt ffb43a83b0 MDL-61077 question stats: make calculations more robust 2018-01-15 16:08:31 +00:00
Eloy Lafuente (stronk7) 3e9d0de501 Merge branch 'MDL-61166-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2018-01-15 10:57:46 +01:00
David Monllao 440989aeab Merge branch 'MDL-55382-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-01-15 10:07:44 +01:00
Andrew Nicols c4107dec84 Merge branch 'MDL-61156-34' of https://github.com/mwehr/moodle into MOODLE_34_STABLE 2018-01-15 13:49:03 +08:00
Shamim Rezaie 3f81c4a322 MDL-61166 Groups: Fixed a typo in PHPDoc 2018-01-14 09:22:48 +11:00
Eloy Lafuente (stronk7) c9236c6860 Moodle release 3.4.1 2018-01-12 20:35:46 +01:00
wehr 960252e17e MDL-60812 enrol_manual: Fixes not working default role 2018-01-12 16:05:52 +01:00
Farhan Karmali 9b55ca16d5 MDL-37390 course: Set startdate and enddate properly for approved course
Once a course is approved the startdate and enddate were not set properly
This patch sets current date as startdate and enddate is startdate +
default duration of the course
2018-01-12 10:03:05 +01:00
Farhan Karmali 17147e5204 MDL-61081 enrol: Start and end date for courses created by external db
Course created by external db enrolment plugin should have start date as current date
and end date is todays date + default course duration
2018-01-12 09:58:37 +01:00
wehr a9369b1941 MDL-61156 enrol_manual: Fixes not working manual quick enrolment in IE11 2018-01-12 08:59:18 +01:00
Andrew Nicols 89fc5ef888 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-12 09:52:17 +08:00
Eloy Lafuente (stronk7) 5dcd9c53e3 weekly release 3.4+ 2018-01-12 02:12:44 +01:00
Jake Dallimore 758066eda4 Merge branch 'MDL-61177-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-11 09:22:47 +08:00
Cameron Ball 6a12f2de83 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:20 +08:00
Andrew Nicols fe8663110a Merge branch 'MDL-61061_hideif_group_34' of git://github.com/davosmith/moodle into MOODLE_34_STABLE 2018-01-10 08:55:24 +08:00
Andrew Nicols 0f6761962a MDL-61177 badges: JS pending checks in connection test 2018-01-10 08:13:45 +08:00
Adrian Greeve bc066df1f6 MDL-61131 repositories: Added a key to verify incoming urls. 2018-01-09 11:34:44 +01:00
Cameron Ball 246b39cba9 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:31 +08:00
Cameron Ball facd24b4c7 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:31 +08:00
Cameron Ball b7b3b75b2c MDL-61143 core_files: Check all A records when testing blocked IPs 2018-01-09 16:54:31 +08:00
Juan Leyva 98ac97e2a0 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:31 +08:00
David Monllao 9aa6e8bfa4 Merge branch 'wip-MDL-60742-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2018-01-09 09:52:56 +01:00
Davo Smith 03a65d8916 MDL-61061 formslib: make sure hideIf rules hide labels within groups 2018-01-09 08:48:23 +00:00
Davo Smith 5e430e98cb MDL-61061 formslib: add data-groupname to groups to fix hideIf rules 2018-01-09 08:48:23 +00:00
David Monllao 068f22aee0 Merge branch 'MDL-60079-34' of https://github.com/nashtechdev01/moodle into MOODLE_34_STABLE 2018-01-09 08:10:43 +01:00
Andrew Nicols 99d570fef4 Merge branch 'wip-MDL-60415-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2018-01-09 14:31:01 +08:00
David Knuplesch 4a2bc331fb MDL-60415 mod_lti: avoid confusing error-message 2018-01-09 14:02:09 +08:00
Thinh Pham 3fef39fc68 MDL-60079 User tours: leave unnecessary aria tags in the page 2018-01-09 10:35:57 +07:00
Jun Pataleta 5d434d4d19 Merge branch 'MDL-61068-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-09 09:53:31 +08:00
Andrew Nicols 440113b457 MDL-61068 mod_forum: Fix neighbour test dates 2018-01-09 09:49:14 +08:00
Eloy Lafuente (stronk7) 41ff45a7a7 Merge branch 'MDL-60943-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2018-01-09 00:52:29 +01:00
Eloy Lafuente (stronk7) fa4274319d Merge branch 'MDL-61098-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2018-01-08 21:06:34 +01:00
Eloy Lafuente (stronk7) 06c5a9e6ff Merge branch 'm34_MDL-61050' of https://github.com/danmarsden/moodle into MOODLE_34_STABLE 2018-01-08 20:38:43 +01:00
Eloy Lafuente (stronk7) ca3605500e Merge branch 'MDL-61068-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-08 19:56:33 +01:00
David Monllao 6beb56ba1f Merge branch 'MDL-61169-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-08 14:59:07 +01:00
Andrew Nicols f83fc14e4d MDL-61169 iplookup: Change to github.com IP 2018-01-08 17:15:57 +08:00
Eloy Lafuente (stronk7) 844eae52fb Merge branch 'MDL-61046-34-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2018-01-08 10:07:30 +01:00
Andrew Nicols cf304a8870 Merge branch 'MDL-57786-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2018-01-08 15:17:25 +08:00
Andrew Nicols 8ec36b0fe2 Merge branch 'MDL-43042-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-01-08 15:13:21 +08:00
Andrew Nicols 31a9ee8172 Merge branch 'MDL-53985-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2018-01-08 12:50:12 +08:00
Jun Pataleta 2787a52470 MDL-61162 mod_forum: Remove unnecessary forum creation step 2018-01-08 10:57:43 +08:00
Andrew Nicols d0308d8d76 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:34 +08:00
Mihail Geshoski 144c240841 MDL-43042 lesson: Confusing feedback order in multiple answer questions 2018-01-05 15:35:27 +08:00
Dan Marsden 434c5f8a56 MDL-61050 auth_ldap: fix regression caused by MDL-42834 2018-01-05 10:42:50 +13:00
sam marshall 0ce4a24888 MDL-60943 core_search: Improve exception for preg_replace errors 2018-01-04 17:28:45 +00:00
Helen Foster bfd1dd07d8 MDL-61046 lang: Merge English strings from the en_fix language pack
Significant string changes:

* pluginname_desc, enrol_category - improved explanation
* pathtopythondesc, core_admin - mentioning Python version
* configdeleteunconfirmed, core_admin - setting applies to more than
  just email-based self-registration
2018-01-04 11:56:43 +01:00
David Monllao 51e05c09c3 weekly release 3.4+ 2018-01-04 11:02:43 +01:00
David Monllao 02990bd6b9 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2018-01-04 11:02:42 +01:00
Mihail Geshoski 6d38596df0 MDL-61153 lesson: Inconsistent column sizing in detailed statistics 2018-01-04 15:47:57 +08:00
Marina Glancy a66195b8b9 MDL-60742 calendar: allow customisation of 12/24h time format strings 2018-01-04 15:15:30 +08:00
Jun Pataleta ae7953ff01 Merge branch 'MDL-40613-34-ldap' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2018-01-04 14:57:50 +08:00
Andrew Nicols e5dc80a10c MDL-40613 auth_ldap: Call update_user_record on create 2018-01-04 14:41:03 +08:00
Jun Pataleta f080964380 Merge branch 'MDL-40613_34-fix' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-04 09:58:05 +08:00
AMOS bot 2ea79c66cf Automatically generated installer lang files 2018-01-04 00:07:02 +00:00
Mark Nelson 36b738c185 MDL-40613 auth_ldap: removed usage of profile_load_custom_fields() 2018-01-03 18:08:57 +08:00
AMOS bot 1a89875c36 Automatically generated installer lang files 2018-01-03 00:06:24 +00:00
Eloy Lafuente (stronk7) c29b6e8c15 Merge branch 'MDL-23887-34-2' of https://github.com/snake/moodle into MOODLE_34_STABLE 2018-01-03 00:24:59 +01:00
David Monllao ff710b83c3 Merge branch 'MDL-57727-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2018-01-02 12:33:56 +01:00
Jake Dallimore c619279f5e MDL-23887 database: fix use of deprecated system tables for mssql
Catalog views are available which we should use instead.
2018-01-02 17:20:25 +08:00
Jun Pataleta 5772b0fba2 Merge branch 'MDL-40613_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2018-01-02 16:50:59 +08:00
David Monllao c89d473133 Merge branch 'MDL-61107_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2018-01-02 08:34:48 +01:00
Zig Tan 0e540897e6 MDL-57786 mod_assign: Fix word count for online text submissions 2018-01-02 13:12:34 +08:00
David Monllao 27e2fe6981 weekly release 3.4+ 2017-12-28 12:35:19 +01:00
David Monllao e35bc644de MDL-51089 mod_quiz: Hide first page last node 2017-12-28 11:46:50 +01:00
Eloy Lafuente (stronk7) 5d7d6cb52b Merge branch 'MDL-60363-34' of https://github.com/Kathrin84/moodle into MOODLE_34_STABLE 2017-12-27 17:56:11 +01:00
David Monllao 913abd448b Merge branch 'MDL-51089-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-27 17:56:10 +01:00
David Monllao dfe9aa213b Merge branch 'MDL-58983-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-27 17:56:10 +01:00
David Monllao dc24b81fef Merge branch 'MDL-61056-34-feedbackresponsenav' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2017-12-27 17:56:09 +01:00
David Monllao cff1f1943e Merge branch 'MDL-33886-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2017-12-27 17:56:09 +01:00
David Monllao fe5d17b166 MDL-60439 block_tags: Removing extra var assign 2017-12-27 17:56:09 +01:00
David Monllao cdda22dad7 Merge branch 'MDL-60439-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-27 17:56:08 +01:00
David Monllao 641a281bef Merge branch 'MDL-60942-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2017-12-27 17:56:07 +01:00
David Monllao e70b33b720 Merge branch 'MDL-60359-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-27 17:56:07 +01:00
David Monllao 8578d28631 MDL-61062 analytics: Fix unit test wrong statement 2017-12-26 00:53:12 +01:00
Eloy Lafuente (stronk7) c7a1ecd9f6 Merge branch 'MDL-61055-34-v2' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-26 00:45:52 +01:00
Eloy Lafuente (stronk7) 829adb5f21 Merge branch 'MDL-43827-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-26 00:25:37 +01:00
Tim Hunt b6e79ab8d8 MDL-61107 quiz editing: handle invalid Maximum grade input 2017-12-22 13:35:48 +00:00
Kathrin Osswald 2ba2d02202 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:11:15 +01:00
Luca Bösch 2d117605b8 MDL-60439 blocks: Tags block title multilang 2017-12-22 09:24:21 +01:00
Luca Bösch 237e1a85ce MDL-51089 quiz: "Add" menu in edit quiz more keyboard accessible 2017-12-22 09:23:00 +01:00
Luca Bösch 5cb64c1faa MDL-60359 theme_boost: have correct mc question check mark not overlap 2017-12-22 09:20:41 +01:00
Zig Tan e714f3cee9 MDL-33886 backup: Add backup filename length < 255 char validation 2017-12-22 13:12:43 +08:00
Jun Pataleta 16deaa8611 weekly release 3.4+ 2017-12-22 14:42:06 +13:00
Jun Pataleta ffa36a4bbe Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2017-12-22 14:42:05 +13:00
Juan Leyva 5ed65e12e1 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:30 +01:00
Mihail Geshoski d1c15a50c9 MDL-43827 filepicker: Multiple actions not accessible using keyboard 2017-12-21 14:08:43 +08:00
Simey Lameze bc121625c3 MDL-61055 calendar: guest user cannot create events 2017-12-20 12:44:35 +08:00
Damyon Wiese 251a824d8e MDL-60567 competencies: test list_competencies 2017-12-19 11:30:35 +01:00
Damyon Wiese efde049bdf MDL-60567 competencies: list_competencies wrong type
"validate_params" returns arrays in external functions.
2017-12-19 11:30:34 +01:00
David Monllao 88498220a1 Merge branch 'MDL-60938-34-2' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-19 07:53:20 +01:00
Mark Nelson dfdadbdbe2 MDL-40613 auth_ldap: sync user profile fields 2017-12-19 14:22:23 +08:00
David Monllao fb8b947963 Merge branch 'MDL-61045_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2017-12-19 06:43:27 +01:00
David Monllao b844baf8be Merge branch 'MDL-61016_hideif_disabledif_34' of git://github.com/davosmith/moodle into MOODLE_34_STABLE 2017-12-19 06:16:23 +01:00
Simey Lameze 0c794fc199 MDL-57431 mod_quiz: remove unnecessary class from selector 2017-12-19 12:49:45 +08:00
Damyon Wiese 2f4feacac7 Merge branch 'MDL-60767-34-3' of https://github.com/snake/moodle into MOODLE_34_STABLE 2017-12-19 11:26:12 +08:00
Damyon Wiese 7d7edc8820 Merge branch 'MDL-59999-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-19 11:04:01 +08:00
Marcus Fabriczy 18c838f586 MDL-59709 mod_assign: Export to portfolio button not working
Changed the button to a text link
2017-12-19 13:29:48 +13:00
Eloy Lafuente (stronk7) 21c63124ab Merge branch 'MDL-59200-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-19 01:10:33 +01:00
Eloy Lafuente (stronk7) 350cefe41e Merge branch 'MDL-58888-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-19 01:05:01 +01:00
Eloy Lafuente (stronk7) 47c56f3475 Merge branch 'MDL-60750-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-19 00:59:36 +01:00
Eloy Lafuente (stronk7) 4b5ac4ceae Merge branch 'wip-MDL-60594-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-19 00:46:05 +01:00
Jun Pataleta 8ed193c3ee Merge branch 'm34_MDL-60793_Mod_Chat_Reserved_Words_In_MySQL8p0p3_And_Above' of https://github.com/scara/moodle into MOODLE_34_STABLE 2017-12-19 12:13:57 +13:00
David Mudrák 40e430e634 MDL-61056 feedback: Fix the response navigation links
Floats are evil and unreliable. Even with the clearfix class added to
the response_navigation wrapper, the Next link would remain unaligned.
We need a proper three columns layout here.

It did not feel necessary to introduce a special template here so I'm
making use of the core one.
2017-12-18 21:54:47 +01:00
David Monllao aaf94b8f75 Merge branch 'MDL-60653-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2017-12-18 17:59:48 +01:00
David Monllao 18e6878f5a Merge branch 'MDL-61042-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-18 17:26:55 +01:00
David Monllao 1041ccaf2e Merge branch 'MDL-61040-34' of git://github.com/junpataleta/moodle into MOODLE_34_STABLE 2017-12-18 17:25:07 +01:00
Eloy Lafuente (stronk7) fb7b0157c1 Merge branch 'wip-MDL-60161-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2017-12-18 16:11:47 +01:00
Matteo Scaramuccia 8827e7fc3f MDL-60793 mod_chat: Renamed 'system' into 'issystem'
'system' is now a reserved word in MySQL 8.0.3+.
2017-12-18 15:26:20 +01:00
David Monllao b85ec901dd Merge branch 'MDL-31521-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-18 13:14:33 +01:00
Eloy Lafuente (stronk7) 2faa795209 Merge branch 'MDL-56932-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-18 12:15:22 +01:00
Damyon Wiese ca5a9de8c5 MDL-61022 recyclebin: Verify groups are restored 2017-12-18 10:22:12 +01:00
David Monllao b9287872eb Merge branch 'wip-MDL-52100-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2017-12-18 10:08:21 +01:00
Davo Smith 8b448de4b0 MDL-61016 form: fix handling disabledIf + hideIf with same dependency 2017-12-18 08:03:31 +00:00
Andrew Nicols 06588b2cc0 Merge branch 'MDL-42676-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2017-12-18 15:32:51 +08:00
Adrian Greeve e8e4566aaa MDL-52100 filelib: Update to unit tests for maxbytes. 2017-12-18 13:16:43 +08:00
Adrian Greeve 94ccf35860 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:16:14 +08:00
Damyon Wiese cf0386e763 Merge branch 'MDL-34389-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-18 13:00:10 +08:00
Damyon Wiese a603f86d65 Merge branch 'MDL-57431-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-18 12:54:03 +08:00
Damyon Wiese 265e374204 Merge branch 'MDL-54967-34' of git://github.com/zig-moodle/moodle into MOODLE_34_STABLE 2017-12-18 12:48:16 +08:00
Damyon Wiese e62e93aa0d Merge branch 'wip-MDL-49995-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-18 12:01:28 +08:00
Andrew Nicols d00a6f52b4 Merge branch 'MDL-57564-34-courseorder' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2017-12-18 11:24:02 +08:00
Jake Dallimore 0c75121648 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:23:30 +08:00
Mihail Geshoski 5681222a0b 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:17:06 +08:00
AMOS bot a45b7aa7ee Automatically generated installer lang files 2017-12-18 00:06:19 +00:00
Tim Hunt 3093cc28f1 MDL-61045 quiz settings: add back missing disabledIf
This got broken in Moodle 2.1 by MDL-20636.
2017-12-15 13:15:12 +00:00
Damyon Wiese 60f544f331 MDL-55382 assign: Sort editpdf quick list 2017-12-15 14:57:21 +08:00
Jun Pataleta 0ff581cece MDL-61042 mod_lesson: Initialise pageid variable 2017-12-15 17:42:08 +13:00
Damyon Wiese b93a787b3e 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:32 +08:00
Jun Pataleta 4ab37af070 MDL-58888 mod_choice: Sort choice_get_my_response() results by optionid 2017-12-15 15:56:28 +13:00
Jun Pataleta f85f002b37 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:28 +13:00
Zig Tan f7bdcf959f 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:37:31 +08:00
Jun Pataleta 64abea941e MDL-61040 mod_choice: Save my choice button needs some space 2017-12-15 13:07:30 +13:00
Jun Pataleta b9bebd0e36 MDL-60938 mod_choice: Fix rendering of users for choice results 2017-12-15 12:52:54 +13:00
Matteo Scaramuccia de703e70e7 MDL-60793 core_ddl: Added the new MySQL 8 reserved words 2017-12-14 22:58:22 +01:00
Luca Bösch b35acd2249 MDL-31521 questions: Allow more than one unit with multiplier equal to 1 2017-12-14 22:34:01 +01:00
Eloy Lafuente (stronk7) a45c466000 weekly release 3.4+ 2017-12-14 14:47:47 +01:00
Eloy Lafuente (stronk7) 3b7f331372 Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2017-12-14 14:47:46 +01:00
Marina Glancy 3145f21de1 MDL-31436 registration: do not send false in update request 2017-12-14 16:05:45 +13:00
AMOS bot f8550e7982 Automatically generated installer lang files 2017-12-14 00:06:11 +00:00
Simey Lameze ab0847d328 MDL-56932 theme_boost: fix quiz max mark input height 2017-12-13 11:48:53 +08:00
Adrian Greeve 54339683ac MDL-60161 filelib: Unit test for duplicate curl headers. 2017-12-13 11:13:12 +08:00
Carson Tam 65e260281b MDL-60161 class curl in filelib: Cleaned up doc block. 2017-12-13 11:13:00 +08:00
Carson Tam f29bd28d6a MDL-60161 class curl in filelib: Avoid duplicate params in http header 2017-12-13 11:12:37 +08:00
AMOS bot 9654f2cd71 Automatically generated installer lang files 2017-12-13 00:06:16 +00:00
Jun Pataleta 2337078a30 Merge branch 'MDL-58200-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-12 19:13:25 +13:00
Jun Pataleta 29d9535277 Merge branch 'MDL-59970-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-12 18:52:43 +13:00
Andrew Nicols 4b162c766d Merge branch 'M3.4-MDL-59866' of https://github.com/marcusboon/moodle into MOODLE_34_STABLE 2017-12-12 13:47:54 +08:00
Andrew Nicols 606c17e6ef Merge branch 'wip-MDL-56864-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-12 13:39:50 +08:00
Damyon Wiese daf44482e9 Merge branch 'MDL-44660-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-12 12:50:38 +08:00
Marcus Boon 7da0e04ca3 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:48:26 +10:00
Damyon Wiese 45c42e01a3 Merge branch 'MDL-60861-34' of git://github.com/ankitagarwal/moodle into MOODLE_34_STABLE 2017-12-12 12:38:39 +08:00
Tyler Bannister 74af3b176d 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:34:57 +08:00
Simey Lameze 7e9f55f138 MDL-60750 mod_quiz: only apply form css rules on clean theme 2017-12-12 12:14:02 +08:00
Damyon Wiese 7354b4ea0e Merge branch 'MDL-58058-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-12 12:10:40 +08:00
Damyon Wiese 9f6edf2171 Merge branch 'MDL-60945-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2017-12-12 11:35:34 +08:00
Damyon Wiese 511c9addfa Merge branch 'MDL-60965-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2017-12-12 11:15:36 +08:00
Damyon Wiese 8616e10e89 Merge branch 'MDL-60969_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2017-12-12 11:08:30 +08:00
Andrew Nicols 91406c9103 Merge branch 'MDL-60983_34' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2017-12-12 10:57:55 +08:00
Damyon Wiese aa383f1b47 Merge branch 'MDL-52538-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-12 10:40:35 +08:00
Damyon Wiese 8bb22c4544 Merge branch 'MDL-44667-34' of https://github.com/snake/moodle into MOODLE_34_STABLE 2017-12-12 10:26:18 +08:00
Damyon Wiese ff383cdd57 Merge branch 'MDL-60968-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-12-12 10:19:24 +08:00
Matt Clarkson 23e190ead5 MDL-60976 dml: Optimise replace_all_text()
Avoid updating fields that do not match the search string.
2017-12-12 10:07:40 +08:00
Mathew May d997069c62 MDL-57431 mod_quiz: Quiz editing help icon fix 2017-12-12 09:57:46 +08:00
Mihail Geshoski 96cc77d435 MDL-57727 reports: Activity completion report sorting problem 2017-12-12 09:53:16 +08:00
Brendan Heywood 1daf3fafc0 MDL-60968 auth: Allow more flexibility with mapping attributes 2017-12-12 09:38:20 +08:00
Damyon Wiese 7522b6a2e3 Merge branch 'MDL-60041-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2017-12-12 09:21:59 +08:00
Zig Tan ece94bb4e2 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:04:59 +08:00
Mihail Geshoski cd44d4e463 MDL-52538 lesson: Grade info displayed while ongoing score disabled 2017-12-12 09:03:23 +08:00
Damyon Wiese 395c985759 Merge branch 'MDL-54021-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-12 08:59:23 +08:00
Damyon Wiese 684d866e20 Merge branch 'MDL-40790-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE
Conflicts:
	theme/boost/scss/moodle/modules.scss
2017-12-11 16:56:33 +08:00
Damyon Wiese 3b2e8b4a0a Merge branch 'MDL-56197-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-12-11 16:47:40 +08:00
Neill Magill 816e06e809 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:42:39 +00:00
Neill Magill 6924954471 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:42:24 +00:00
Mihail Geshoski 2875ff2934 MDL-56197 lesson: Multichoice answers not on same line as radio button 2017-12-11 15:52:44 +08:00
Andrew Nicols b1ddacfc8e Merge branch 'MDL-58272-34-2' of https://github.com/snake/moodle into MOODLE_34_STABLE 2017-12-11 15:02:27 +08:00
Marina Glancy 6d353a7918 MDL-60594 xmlrpc: wrapper for buggy xmlrpc_decode 2017-12-11 14:26:29 +08:00
Ankit Agarwal f9e09bd963 MDL-60861 analytics: Remove enable menu, if no timesplitting method 2017-12-11 10:47:44 +05:30
Ankit Agarwal 4f657eeed9 MDL-60861 analytics: Enabling a model requires timesplitting 2017-12-11 10:47:44 +05:30
Damyon Wiese 60e57b8448 Merge branch 'wip-MDL-45500-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-11 13:14:05 +08:00
Damyon Wiese 628f99bf45 Merge branch 'MDL-60948-34' of git://github.com/andrewnicols/moodle into MOODLE_34_STABLE 2017-12-11 12:53:18 +08:00
Andrew Nicols 68e670d8ea MDL-60948 tool_httpsreplace: Correct use of test URLs 2017-12-11 12:06:22 +08:00
Damyon Wiese af9b21a388 Merge branch 'MDL-54106-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-11 11:38:04 +08:00
Damyon Wiese de08d71fc8 Merge branch 'wip-MDL-31436-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-11 11:29:20 +08:00
Luca Bösch 4846674f5c MDL-44660 grade: Typos @package core_grade instead of core_grades 2017-12-08 14:21:28 +01:00
Luca Bösch ac66136751 MDL-54106 task: Deleting unconfirmed users after $CFG->deleteunconfirmed 2017-12-08 14:12:49 +01:00
Tim Hunt 5617f26568 MDL-60983 get_user_capability_course: fix buggy edge cases
There were basically two problems, which are demostrated by
the new test users u7 and u8 in the unit test.

1. There was a problem if a role was overridden in a context above the
one where it was assigned. E.g. User has teacher role in a course, and
there is a role override in the course-category context. That was being
ignored.

2. Problems with the handling of PROHIBITs. It should be the case that
if there is a PROHIBIT in force, then it cannot be overridden by another
role, or by a role override. However, this was not working in all cases.

Also, I had to add comments to the unit test so that I could understand
it. Hopefully these will be hepful to other developers too.
2017-12-08 12:07:27 +00:00
Simey Lameze ad81f22148 MDL-58058 competency: replace other sortorder usages 2017-12-08 16:01:12 +08:00
Frederic Massart aabf264460 MDL-58058 competency: Allow unspecified sortorder for new competencies 2017-12-08 16:01:12 +08:00
Mihail Geshoski c22d3a30a1 MDL-40790 lesson: Lesson content button runs off the edge of the page 2017-12-08 09:57:25 +08:00
Mihail Geshoski 64d3271039 MDL-54021 blocks: Course completion block lang problem 2017-12-08 09:26:11 +08:00
AMOS bot c83c2c0f47 Automatically generated installer lang files 2017-12-08 00:09:50 +00:00
Jun Pataleta 5fdb912a82 weekly release 3.4+ 2017-12-08 09:10:06 +13:00
Mark Nelson 7a06e15952 MDL-60969 auth_ldap: replace hardcoded strings in config settings 2017-12-07 14:04:31 +08:00
Jun Pataleta b64f314662 Merge branch 'MDL-60951-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-07 17:33:30 +13:00
David Mudrák e5994e8c04 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:51:52 +01:00
Damyon Wiese 1fb4f49cca MDL-60951 travis: Disable redis on travis
Redis unit tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
2017-12-06 11:23:35 +08:00
Andrew Nicols 32b4b57b26 Merge branch 'MDL-59159_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2017-12-06 10:04:42 +08:00
Jun Pataleta fd7e75a8a5 Merge branch 'MDL-32350-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-12-06 11:30:52 +13:00
Luca Bösch abd7d4394b MDL-32350 admin: Sort users by country ASC and DESC 2017-12-05 07:22:56 +01:00
Jun Pataleta e4256cd769 Merge branch 'wip-MDL-60926-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-05 19:03:36 +13:00
David Herney 5a6a4cef8b 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:52:36 +08:00
Jun Pataleta 8721afb2c6 Merge branch 'wip-MDL-34161-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-05 17:59:53 +13:00
Andrew Nicols 0e199a5aec Merge branch 'MDL-60801_34' of https://github.com/andrewhancox/moodle into MOODLE_34_STABLE 2017-12-05 12:52:25 +08:00
Andrew Nicols 320947908b Merge branch 'MDL-60899-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-05 11:55:16 +08:00
Andrew Nicols 2e55209603 MDL-60965 behat: Correct strlen use 2017-12-05 11:19:42 +08:00
Andrew Nicols f8979fac97 Merge branch 'MDL-47114-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2017-12-05 09:52:42 +08:00
Adrian Greeve 6a33a850fc 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-12-05 09:46:31 +08:00
Jake Dallimore 9164ab6e39 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-04 18:01:34 +08:00
Damyon Wiese 2af1421e34 Merge branch 'MDL-60219-34' of https://github.com/abias/moodle into MOODLE_34_STABLE 2017-12-04 16:28:39 +08:00
Marina Glancy 5a9fa0fe57 MDL-34161 mod_lti: backup and restore of submissions 2017-12-04 15:05:58 +08:00
Marina Glancy c1db07d55b 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:58 +08:00
Tim Lock c5b7a25ee6 MDL-34161 mod_lti: Added Behat tests 2017-12-04 15:05:58 +08:00
Gregory Faller 7cc665e9c7 MDL-34161 mod_lti: Add support for restoring site tool 2017-12-04 15:05:57 +08:00
Jun Pataleta 05fd85142e Merge branch 'wip-MDL-60887-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-12-04 18:23:52 +13:00
Jun Pataleta e62ea2b803 Merge branch 'MDL-60925-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-12-04 14:32:00 +13:00
Eloy Lafuente (stronk7) 972142a9af MDL-59159 environment: 3.1 (LTS) required 2017-12-04 02:03:34 +01:00
Eloy Lafuente (stronk7) b25f3693bb 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:03:17 +01:00
Jun Pataleta 369caa6183 Merge branch 'MDL-60914_34' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2017-12-04 12:49:48 +13:00
Shamim Rezaie 00268741c2 MDL-47114 core: Improved function description 2017-12-02 07:44:27 +08:00
Marina Glancy 605b0547de MDL-60926 auth: do not map very long profile fields 2017-12-01 17:51:54 +08:00
Ryan Wyllie eea1aff443 MDL-60942 filters: include filter in format_string cache key 2017-12-01 06:51:58 +00:00
Eloy Lafuente (stronk7) 1bc5a5abe9 weekly release 3.4+ 2017-11-30 17:05:23 +01:00
Marina Glancy be4ea98f29 MDL-31436 hub: never use xmlrpc, always use REST 2017-11-30 11:27:41 +08:00
Damyon Wiese 845215d826 MDL-60925 theme: Fix SCSS precompilation.
There is no point pre-compiling the theme SCSS if it is not stored somewhere that is available
to all webserving nodes. Localcache needs to be backed by the MUC cache.
2017-11-29 17:08:23 +08:00
Alexander Bias 2a9c11965b MDL-60219 lti: Replace pagelayout frametop with incourse 2017-11-29 09:58:45 +01:00
Damyon Wiese 8c3d8a68f7 MDL-58200 competencies: Student can view linked courses 2017-11-29 16:07:42 +08:00
João Umberto Ciocca de Almeida 969010296d MDL-60654 calendar: Clean up lines 140-154
The if+switch code between lines 140 and 154, even though they selected 3 different choices, all of them gave the same result.
Therefore, it'd be cleaner to replace those 16 lines for just two.
2017-11-29 06:56:16 +01:00
Jun Pataleta 87186b9710 Merge branch 'wip-MDL-45068-34-fix' of https://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-11-29 16:59:41 +13:00
Marina Glancy 539ad434cb MDL-45068 groups: corrected check for idnumber '0' 2017-11-29 11:53:56 +08:00
Eloy Lafuente (stronk7) af4fa2a55b Merge branch 'wip-MDL-60591-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-11-28 22:38:37 +01:00
Eloy Lafuente (stronk7) 15aec0b054 Merge branch 'MDL-60738-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-28 20:59:34 +01:00
Eloy Lafuente (stronk7) 7974bbcaf7 Merge branch 'MDL-60838-m34' of https://github.com/sammarshallou/moodle into MOODLE_34_STABLE 2017-11-28 20:48:27 +01:00
Damyon Wiese b4cbad15de 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:55 +08:00
Marina Glancy fe1eb00c0f MDL-49995 files: delete old file when overwriting 2017-11-28 15:03:29 +08:00
Damyon Wiese 03df75c0de 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:33 +08:00
Damyon Wiese 21c6513a7c 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:18 +08:00
Damyon Wiese 8938d826d9 Merge branch 'MDL-53004-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE
Conflicts:
	mod/assign/styles.css
2017-11-28 12:50:57 +08:00
Marina Glancy e71a526011 MDL-45500 gradingform: allow plugin uninstall 2017-11-28 12:27:26 +08:00
Jun Pataleta f3f6960d3e Merge branch 'MDL-46768-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-28 17:19:00 +13:00
Damyon Wiese 8952d3f100 Merge branch 'MDL-24678-MOODLE_34-chat_get_latest_message' of https://github.com/bozoh/moodle into MOODLE_34_STABLE 2017-11-28 12:14:49 +08:00
Tobias Reischmann 0bb9e2d8d7 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-28 12:06:25 +08:00
Mark Nelson 07b6c89868 MDL-60914 mod_lti: ensure grade_update() is defined during upgrade 2017-11-28 11:38:09 +08:00
Marina Glancy ffba0168b1 MDL-60887 registration: allow plugins to register on custom hubs 2017-11-28 11:21:46 +08:00
Eloy Lafuente (stronk7) 26a276cea1 Merge branch 'MDL-60249-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-11-28 00:48:55 +01:00
Damyon Wiese 3e2eb62931 Merge branch 'MDL-60188-34' of git://github.com/rezaies/moodle into MOODLE_34_STABLE 2017-11-27 15:56:53 +08:00
Jun Pataleta 62104652c8 Merge branch 'MDL-57569-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-27 19:43:57 +13:00
Jun Pataleta c950c91696 Merge branch 'wip-MDL-45068-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE 2017-11-27 19:36:10 +13:00
Marina Glancy 73e4f14d1b MDL-60591 mod_forum: inline attachments are not displayed in plain text 2017-11-27 14:29:33 +08:00
Marina Glancy 87d3c32f2e 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:19 +08:00
Shamim Rezaie b8e0488c90 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:42:56 +08:00
Jake Dallimore 6c23087aa7 Merge branch 'MDL-60830-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-27 10:30:24 +08:00
Jun Pataleta a6d9966786 Merge branch 'MDL-58887-34' of git://github.com/ryanwyllie/moodle into MOODLE_34_STABLE 2017-11-27 15:06:11 +13:00
Jake Dallimore 1a8167e781 Merge branch 'MDL-27230-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-11-27 09:44:18 +08:00
Ryan Wyllie 47dd1d85aa 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-27 01:28:54 +00:00
Andrew Hancox c29edc7551 MDL-60801 tool_uploaduser: Fix issue with defaults being ignored 2017-11-25 11:40:56 +00:00
Carlos Alexandre S. da Fonseca fdddb80b70 MDL-24678 mod_chat: Fixed race condition on chat module 2017-11-24 10:36:15 -02:00
sam marshall 70a804d98e MDL-60838 core_search: File upload does not honour timeout 2017-11-24 11:02:32 +00:00
Sara Arjona c12caea3d4 MDL-57569 core_files: Fix to let show generated f3 image 2017-11-24 11:51:29 +01:00
Sara Arjona 191a7fd205 MDL-46768 core_badges: changed badge name type from FILE to TEXT 2017-11-24 11:37:59 +01:00
Luca Bösch b0cb0168f4 MDL-34389 course: switch to subcategory w/ course:changecategory perms 2017-11-23 16:50:28 +01:00
Luca Bösch fb762d4e5c MDL-53004 assignment: Separate label and pulldown in grading (Clean) 2017-11-23 16:42:11 +01:00
Luca Bösch ed0e988020 MDL-27230 quiz: remove and update group overrides in calendar 2017-11-23 16:42:05 +01:00
David Monllao 20cb5f4086 weekly release 3.4+ 2017-11-23 13:35:20 +01:00
David Monllao de5d2667ab Merge branch 'install_34_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_34_STABLE 2017-11-23 13:35:18 +01:00
Marina Glancy 4a54efd42a MDL-27886 backup: When setting is unlocked set it to original value 2017-11-23 12:29:59 +08:00
Jake Dallimore 5769d5fc86 Merge branch 'MDL-60831-34' of git://github.com/ankitagarwal/moodle into MOODLE_34_STABLE 2017-11-22 13:25:33 +01:00
Adrian Greeve 0225f34969 MDL-60546 mod_choice: Update to select all functionality. 2017-11-22 13:25:33 +01:00
Marcus Fabriczy 23c69f1ef0 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 13:25:32 +01:00
Jun Pataleta 6e6b38e0b5 Merge branch 'MDL-60813-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-22 13:25:32 +01:00
Jun Pataleta 2e3892e951 Merge branch 'MDL-60526-34-fix1' of http://github.com/damyon/moodle into MOODLE_34_STABLE 2017-11-22 13:25:31 +01:00
Matteo Scaramuccia abe62e33e6 MDL-60745 phpunit: Bump phpunit from 6.4.3 to 6.4.4
$ php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 3 updates, 0 removals
  - Updating sebastian/comparator (2.0.2 => 2.1.0): Downloading (100%)
  - Updating phpunit/php-code-coverage (5.2.2 => 5.2.3): Downloading (100%)
  - Updating phpunit/phpunit (6.4.3 => 6.4.4): Downloading (100%)
Writing lock file
Generating autoload files
2017-11-22 13:25:31 +01:00
Damyon Wiese 78731d0b96 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:25:31 +01:00
David Monllao 56a58d538c MDL-59512 version: Following 2 digits scheme 2017-11-22 13:25:30 +01:00
David Monllao ef1c918973 Merge branch 'MDL-59512-34' of git://github.com/Dagefoerde/moodle into MOODLE_34_STABLE 2017-11-22 13:25:30 +01:00
Jun Pataleta 3b9fce4e1c Merge branch 'mdl58817-moodle34' of https://github.com/tlock/moodle into MOODLE_34_STABLE 2017-11-22 13:25:29 +01:00
Jun Pataleta 7b9e9eb98d Merge branch 'MDL-60637-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-11-22 13:25:29 +01:00
Ankit Agarwal 0456d880f0 MDL-60796 analytics: Fix phpdoc issues 2017-11-22 13:25:29 +01:00
Jun Pataleta 705776211a Merge branch 'MDL-60780_34' of git://github.com/dmonllao/moodle into MOODLE_34_STABLE 2017-11-22 13:25:28 +01:00
Simey Lameze 94b8228ba1 MDL-60751 core_calendar: remove useless NULL_ALLOWED parameter 2017-11-22 13:25:28 +01:00
Sara Arjona 0b7d0d0f79 MDL-60830 core_enrol: Added email when searching users in course enrol 2017-11-22 13:19:49 +01:00
Damyon Wiese c29501c06d 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:19 +08:00
Ankit Agarwal c152025706 MDL-60831 search: add BS classes to block elements 2017-11-22 12:31:56 +05:30
AMOS bot 0444dd2b70 Automatically generated installer lang files 2017-11-22 00:05:56 +00:00
Marina Glancy 15aded1e2a MDL-56864 forms: allow to remove last tag with forced standard tags 2017-11-21 15:21:50 +08:00
Marina Glancy cbff142b8e MDL-56864 forms: boost templates don't allow remove last tag 2017-11-21 15:21:50 +08:00
Simey Lameze ee16cb39bf MDL-60637 core_group: fix unit tests failures 2017-11-21 10:02:16 +08:00
Simey Lameze 7f0eba32de MDL-60637 group: remove useless id number validation on web services 2017-11-21 10:02:16 +08:00
David Monllao 144c9ba7c3 Merge branch 'MDL-60526-34' of git://github.com/damyon/moodle into MOODLE_34_STABLE 2017-11-20 13:44:02 +01:00
David Monllao b676ff39a4 Merge branch 'MDL-60436-m34' of https://github.com/NeillM/moodle into MOODLE_34_STABLE 2017-11-20 13:26:12 +01:00
David Monllao fe709d665d Merge branch 'MDL-56253-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-11-20 12:55:39 +01:00
Simey Lameze d692104051 MDL-60823 calendar: use first day of week on prepadding calc 2017-11-20 12:08:30 +01:00
Jake Dallimore 17ebd603e1 Merge branch 'MDL-60708-34' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-20 17:58:07 +08:00
David Monllao b24eb6c565 Merge branch 'MDL-60842-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-11-20 10:30:28 +01:00
Juan Leyva c449504287 MDL-60708 mod_workshop: Return author feedback for submission
The feedback and grade information for submission should be returned
for teachers in the evaluation and closed phases.
2017-11-20 10:08:20 +01:00
Simey Lameze 8df6b374bb MDL-60842 calendar: do not load all course fields 2017-11-20 16:55:24 +08:00
Juan Leyva e84e1bbff3 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:03 +01:00
Jakob Ackermann 3cfc322bdf 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 21:33:50 +13:00
Damyon Wiese 6da402bf34 Merge branch 'MDL-60810_master' of git://github.com/markn86/moodle into MOODLE_34_STABLE 2017-11-20 15:58:58 +08:00
Damyon Wiese 126c58ede4 Merge branch 'MDL-60809-34' of git://git.cameron1729.xyz/moodle into MOODLE_34_STABLE 2017-11-20 15:31:08 +08:00
Damyon Wiese 6217d91173 Merge branch 'MDL-60806-34' of git://github.com/lameze/moodle into MOODLE_34_STABLE 2017-11-20 15:25:44 +08:00
Jake Dallimore d28be61fb5 Merge branch 'MDL-60824-34-profilefield' of git://github.com/mudrd8mz/moodle into MOODLE_34_STABLE 2017-11-20 15:07:00 +08:00
Luca Bösch a96ef27857 MDL-56253 grade: have coursemodule name pass filters. 2017-11-20 06:44:25 +01:00
Damyon Wiese 255541d592 Merge branch 'MDL-27886-master' of git://github.com/tobiasreischmann/moodle into MOODLE_34_STABLE 2017-11-20 13:26:06 +08:00
Simey Lameze 19b4c997e9 MDL-60806 core_calendar: return hidden categories 2017-11-20 12:18:24 +08:00
Jake Dallimore 93819366a4 Merge branch 'MDL-60835-34' of git://github.com/crazyserver/moodle into MOODLE_34_STABLE 2017-11-20 11:31:57 +08:00
Jun Pataleta 7726e2e2d6 Merge branch 'master_MDL-60253' of https://github.com/CengageEng/moodle into MOODLE_34_STABLE 2017-11-20 13:21:47 +13:00
AMOS bot d95ccdd4ec Automatically generated installer lang files 2017-11-20 00:05:51 +00:00
Jun Pataleta 5698d90e6a Merge branch 'MDL-55808_master' of git://github.com/juancs/moodle into MOODLE_34_STABLE 2017-11-20 10:35:54 +13:00
Neill Magill 44b87b5d95 MDL-60436 blocks: Unit test for dashboard block positioning 2017-11-17 14:11:01 +00:00
Neill Magill 334412f1cc MDL-60436 blocks: Improve performance of block loading 2017-11-17 14:10:12 +00:00
yair.spielmann afcb4cd69a MDL-59512 tool_oauth2: add option for basic authentication 2017-11-17 10:22:01 +01:00
Damyon Wiese d8a7c52ee6 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-17 14:55:46 +08:00
Andrew Nicols 05a70bac38 MDL-60773 core: Add pendingJS checks for autocomplete interactions 2017-11-17 14:11:56 +08:00
David Mudrák 951f10fd3e MDL-60824 profile: Fix handling of to-be-created user id
The script user/editadvanced.php uses special value of userid = -1 for
the case when a new user is being created. Such a value passes the
non-empty check and would lead to "invaliduser" error.
2017-11-16 22:11:13 +01:00
Juan Leyva 10a5e2a8de MDL-60813 calendar: Fix core_calendar_get_calendar_events for categories
Users couldn’t see category events when filtering by categories in the
core_calendar_get_calendar_events WS.
2017-11-16 19:16:46 +01:00
Pau Ferrer Ocaña 82c32f9a80 MDL-60835 completion: Add overrideby field to completion status WS 2017-11-16 16:37:35 +01:00
David Monllao 17ae93679d MDL-60780 analytics: Prevent timing issues 2017-11-16 09:18:31 +01:00
Jake Dallimore 27ffa62131 MDL-58272 core_files: get converters from file extension not mimetype 2017-11-16 15:50:58 +08:00
Cameron Ball 97a4db9c97 MDL-60809 xmlrpc: Include filelib when making xmlrpc call 2017-11-16 14:47:41 +08:00
Jake Dallimore 6f1a49b8b7 weekly release 3.4+ 2017-11-16 11:13:12 +08:00
David Monllao 740807d2e3 Merge branch 'MDL-60789-34' of git://github.com/sarjona/moodle into MOODLE_34_STABLE 2017-11-15 10:37:57 +01:00
Damyon Wiese 066b01a788 Merge branch 'wip-MDL-59876-34' of git://github.com/abgreeve/moodle into MOODLE_34_STABLE 2017-11-15 10:37:56 +01:00
Damyon Wiese e7b4c991ee 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:21 +08:00
Adrian Greeve 42ee1fc276 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:49:18 +08:00
Damyon Wiese d56935d66f Merge branch 'MDL-60675-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-11-14 17:07:08 +08:00
Mihail Geshoski 9e2565d84d MDL-60675 analytics: Apply strict comparison check 2017-11-14 16:31:13 +08:00
Sara Arjona 73c72b4148 MDL-60789 workshop: Check title submission maxlength 2017-11-14 08:46:46 +01:00
Jake Dallimore 244af9a0da Merge branch 'MDL-60741' of git://github.com/timhunt/moodle into MOODLE_34_STABLE 2017-11-14 15:28:38 +08:00
Jun Pataleta 2eb043fb36 Merge branch 'm34_MDL-59099_MySQL8_InnoDB_Params_Removed' of https://github.com/scara/moodle into MOODLE_34_STABLE 2017-11-14 12:23:09 +13:00
Damyon Wiese 2454da368a Merge branch 'MDL-60693_34-backup-multilang-activities' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE 2017-11-13 14:38:04 +08:00
Damyon Wiese 8e899e949d Merge branch 'MDL-60675-master' of git://github.com/mihailges/moodle into MOODLE_34_STABLE 2017-11-13 14:11:33 +08:00
Jake Dallimore 6b0b697fb8 Merge branch 'MDL-60707' of git://github.com/aolley/moodle into MOODLE_34_STABLE 2017-11-13 13:27:14 +08:00
Damyon Wiese 9a854a2fc9 Merge branch 'MDL-59876-master' of git://github.com/jleyva/moodle into MOODLE_34_STABLE 2017-11-13 11:07:25 +08:00
Damyon Wiese b6f1cf03e3 Merge branch 'MDL-60784_34' of git://github.com/stronk7/moodle into MOODLE_34_STABLE 2017-11-13 10:41:05 +08:00
Tim Lock d26cdca687 MDL-58817 mod_lti: cartridge: maintain custom icons 2017-11-13 10:18:02 +10:30
Eloy Lafuente (stronk7) dbeee32b59 MDL-60784 upgrade: add 3.4.0 separation line to all upgrade scripts 2017-11-12 18:46:00 +01:00
Luca Bösch 0a8663b425 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:56:14 +01:00
Eloy Lafuente (stronk7) 665c3ac59c Moodle release 3.4 2017-11-11 19:31:19 +01:00
Eloy Lafuente (stronk7) 07c0bb10fb NOBUG: Change travis.yml to MOODLE_34_STABLE 2017-11-11 19:31:18 +01:00
Eloy Lafuente (stronk7) cf57ee9285 Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2017-11-11 19:31:14 +01:00
Eloy Lafuente (stronk7) d334aea208 Merge branch 'MDL-60779-master' of git://github.com/junpataleta/moodle 2017-11-11 13:03:54 +01:00
Jun Pataleta 0cf288757d MDL-60779 calendar: Pass correct parameters for get_calendar_X_view() 2017-11-11 22:28:38 +13:00
AMOS bot 695cd06817 Automatically generated installer lang files 2017-11-11 00:05:36 +00:00
David Monllao ab9936962e Moodle release 3.4rc3 2017-11-10 15:15:37 +01:00
David Monllao d39fcc420e Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install 2017-11-10 15:15:35 +01:00
David Monllao 08641175b3 Merge branch 'MDL-60764' of git://github.com/stronk7/moodle 2017-11-10 10:20:25 +01:00
Eloy Lafuente (stronk7) 66aee746e3 MDL-60764 versions: remove some outdated releases in requires 2017-11-10 09:45:56 +01:00
Damyon Wiese f738fc8efd Merge branch 'MDL-60763-master' of git://github.com/andrewnicols/moodle 2017-11-10 13:57:04 +08:00
Andrew Nicols 27973b545c MDL-60763 calendar: Use PHP concat, not JS 2017-11-10 13:56:39 +08:00
Damyon Wiese 3192438075 Merge branch 'MDL-60763-master' of git://github.com/andrewnicols/moodle 2017-11-10 13:47:05 +08:00
Andrew Nicols 41b7375c07 MDL-60763 core_calendar: Deprecate calendar_get_upcoming 2017-11-10 13:45:32 +08:00
Jun Pataleta cb04dcf4ce Merge branch 'MDL-60771-master' of git://github.com/lameze/moodle 2017-11-10 18:03:49 +13:00
Jun Pataleta c3925187ed Merge branch 'MDL-60758_master' of git://github.com/dmonllao/moodle 2017-11-10 17:21:15 +13:00
Damyon Wiese 4ceece6ea1 Merge branch 'MDL-60749-master' of git://github.com/sarjona/moodle 2017-11-10 12:05:46 +08:00
Jun Pataleta cfbc820e1b Merge branch 'MDL-60766-master' of git://github.com/ryanwyllie/moodle 2017-11-10 17:02:41 +13:00
Simey Lameze fbbcf45ef2 MDL-60771 mod_scorm: typecast score to integer 2017-11-10 12:00:17 +08:00
Andrew Nicols 6e2d8c121b Merge branch 'MDL-52838-master' of git://github.com/damyon/moodle 2017-11-10 11:38:13 +08:00
Damyon Wiese 6b2a9a6fb8 Merge branch 'MDL-60765-master' of git://github.com/andrewnicols/moodle 2017-11-10 10:55:09 +08:00
Mihail Geshoski ae4522ff55 MDL-60675 analytics: Error when selecting invalid insight 2017-11-10 10:43:51 +08:00
Andrew Nicols fb5bbf1424 MDL-60765 theme: Make inplace-autocomplete rule more specific
This change was intended to fix an issue with the autocomplete in RTL,
but was applied to all inplace-editables.
2017-11-10 10:29:11 +08:00
Damyon Wiese ce225e1c5e 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:27 +08:00
Ryan Wyllie 08b7558483 MDL-60766 block_calendar_upcoming: stop summary modal not logged in
Stopped the JS from running on the block when the user is not logged in
because it attempts to load a summary modal when an event is clicked on
which results in a failed call to a webservice.
2017-11-10 02:20:32 +00:00
Andrew Nicols 9dead25fd5 MDL-60763 core_calendar: Revert removal of calendar_get_upcoming
This reverts part of commit 522b84be04.
2017-11-10 10:11:42 +08:00
Ryan Wyllie eac88b955f MDL-60766 block_calendar_month: hide nav when not logged in 2017-11-10 02:07:50 +00:00
Eloy Lafuente (stronk7) 438c98cc98 MDL-60764 versions: main version bump 2017-11-10 02:56:14 +01:00
Eloy Lafuente (stronk7) ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
Jake Dallimore f5b63fc829 Merge branch 'MDL-60760_master' of git://github.com/dmonllao/moodle 2017-11-10 09:32:17 +08:00
Andrew Nicols 6996fbaa0e MDL-60763 core_calendar: Revert removal of calendar_get_upcoming
Revert "MDL-60092 core_calendar: remove unused calendar_get_upcoming method"

This reverts commit 4259387ebb.
2017-11-10 08:11:36 +08:00
David Monllao 20305a8a8f MDL-60758 tool_analytics: Skip guess start if higher than guess end 2017-11-09 17:11:34 +01:00
David Monllao 5da020169e MDL-60760 tool_analytics: No onlycli link for managers 2017-11-09 17:05:08 +01:00
Sara Arjona 2f673d8b6a MDL-60749 scorm: Remove &nbsp; from files when downloading 2017-11-09 10:15:03 +01:00
Sara Arjona 4bcb0a9a1d MDL-60550 user: Add more restrictions in keyword searches
Original patch provided by Tim Schroeder.
2017-11-09 16:29:29 +08:00
David Monllao a4e0b7468c Merge branch 'MDL-60718-master' of git://github.com/sarjona/moodle 2017-11-09 09:27:01 +01:00
David Monllao 7fdcdc04ff Merge branch 'MDL-60615-master' of git://github.com/damyon/moodle 2017-11-09 08:48:48 +01:00
Damyon Wiese bef5a8ca10 Merge branch 'MDL-60752-master' of git://github.com/andrewnicols/moodle 2017-11-09 15:08:11 +08:00
Damyon Wiese 246698e779 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:05:36 +08:00
Jake Dallimore 4f3262fede Merge branch 'MDL-60753_master' of git://github.com/markn86/moodle 2017-11-09 14:47:23 +08:00
Andrew Nicols f169f4fd21 MDL-60752 lti: Compare text in types_config properly 2017-11-09 14:25:51 +08:00
Mark Nelson d48d1ba19a MDL-60753 report_competency: fixed dialogue failing to show 2017-11-09 14:11:24 +08:00
Jun Pataleta 7a571b813a Merge branch 'MDL-60628-master' of git://github.com/lameze/moodle 2017-11-09 17:08:46 +13:00
Simey Lameze 754016ab33 MDL-60628 calendar: amend web service unit test 2017-11-09 11:43:49 +08:00
Simey Lameze 10c17dcc10 MDL-60628 calendar: support category events on get_calendar_events ws 2017-11-09 11:29:07 +08:00
Andrew Nicols 5518a32de5 Merge branch 'MDL-60579-master-fix2' of https://github.com/damyon/moodle 2017-11-09 11:18:14 +08:00
Damyon Wiese 56f05f23c6 MDL-60579 user: Don't lose text filters
When replacing a group filter with a different group filter - don't forget all the current text filters that have
been applied.
2017-11-09 11:06:30 +08:00
Damyon Wiese bb869f05e8 MDL-60579 user: Move defines into library
Entry page user/index.php was defining constants that were used by the renderer.
This means the renderer was tied to user/index.php.
2017-11-09 11:06:30 +08:00
Andrew Nicols 7cf4331a6f MDL-60579 user: Correct PARAM type for filters
Damyon pointed out during the integration of this fixset, that the
PARAM type is incorrect.
2017-11-09 10:07:13 +08:00
Andrew Nicols 762f8dc1db MDL-60579 user: Add missing case breaks 2017-11-09 09:07:34 +08:00
Andrew Nicols a997dc9da5 MDL-60579 user: Correct search for strings 2017-11-09 09:07:21 +08:00
Andrew Nicols 446b21b512 MDL-60579 user: Check filter strings have correct part count 2017-11-09 09:07:02 +08:00
Andrew Nicols 3968d2ca7e MDL-60579 user: Prevent behat from interacting til setup complete 2017-11-09 09:05:22 +08:00
Adam Olley 7f83e99e5f MDL-60707 core_search: In tests, use faked time for indexing length
Without this change its possible that the unit tests will fail at any time.
Before this change the indexing time is measured by real-time, not fake time,
making all index timings 0.

This happens as PHP offers no guarantee around the sort-order of an array for
any given two members that equate as equal. It just happens to pass for the
current array of search areas in vanilla Moodle.
2017-11-09 10:49:53 +10:30
AMOS bot 68c580c903 Automatically generated installer lang files 2017-11-09 00:05:00 +00:00
Sara Arjona 0c0d460e8b MDL-60718 analytics: Avoid duplicates for users with 2 enrolments 2017-11-08 19:12:59 +01:00
David Monllao ed0e2cea00 Merge branch 'MDL-60732-master' of git://github.com/damyon/moodle 2017-11-08 17:48:07 +01:00
David Monllao 7effd6dd79 Merge branch 'MDL-60720-master' of https://github.com/sammarshallou/moodle 2017-11-08 17:27:15 +01:00
David Monllao 29adfbc3c8 Merge branch 'MDL-58699-master' of git://github.com/damyon/moodle 2017-11-08 15:56:25 +01:00
Tim Hunt d00007bc45 MDL-60741 purgecaches: did not correctly setup the admin page
Note that, admin_externalpage_setup does the right capability check.
2017-11-08 14:30:27 +00:00
David Monllao 4e73acf3cf Merge branch 'MDL-60579-master' of https://github.com/mihailges/moodle 2017-11-08 12:16:20 +01:00
David Monllao fcafb22c22 MDL-60733 oauth: Remove outdated comment 2017-11-08 12:04:31 +01:00
David Monllao 6463a047a2 Merge branch 'MDL-60733-master' of git://github.com/damyon/moodle 2017-11-08 12:03:43 +01:00
Damyon Wiese a471bc4971 MDL-60732 core_user: Show group filters
Always show the group filters, even if the course is in NO_GROUPS mode.
2017-11-08 16:45:42 +08:00
Damyon Wiese d3882ea4a3 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:41:53 +08:00
sam marshall 4b0facc984 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:36:37 +00:00
Juan Leyva abdb8f59a5 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-07 16:44:48 +01:00
Mihail Geshoski c835126185 MDL-60579 enrolments: Applied filters lost on certain actions
AMOS BEGIN
    CPY [invalidrequest,enrol_lti],[invalidrequest,enrol]
AMOS END
2017-11-07 16:17:00 +08:00
Damyon Wiese 65c52e05d1 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:48:21 +08:00
Tobias Reischmann 34eb2faa0d 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:20 +01:00
Tobias Reischmann 8c067bb86d 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:20 +01:00
Tobias Reischmann 77a4d33755 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:20 +01:00
Matteo Scaramuccia 740a9315c3 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:38:36 +02:00
Juan Segarra Montesinos f8c0b9e71f MDL-55808 mod_glossary: Search glossary entries with ratings enabled doesn't work 2017-10-13 17:12:37 +02:00
Vervoort, Claude 18ae59bea1 MDL-60253 lti: also consider securetoolurl for URL match 2017-09-27 13:26:42 -04:00
1190 changed files with 25384 additions and 2509 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
+9 -6
View File
@@ -23,8 +23,9 @@ addons:
- mysql-client-core-5.6
- mysql-client-5.6
services:
- redis-server
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# services:
# - redis-server
env:
# Although we want to run these jobs and see failures as quickly as possible, we also want to get the slowest job to
@@ -99,8 +100,9 @@ install:
fi
# Enable Redis.
echo 'extension="redis.so"' > /tmp/redis.ini
phpenv config-add /tmp/redis.ini
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# echo 'extension="redis.so"' > /tmp/redis.ini
# phpenv config-add /tmp/redis.ini
# Install composer dependencies.
# We need --no-interaction in case we hit API limits for composer. This causes it to fall back to a standard clone.
@@ -171,10 +173,11 @@ before_script:
mkdir -p "$HOME"/roots/phpunit
# The phpunit dataroot and prefix..
# Redis tests are currently failing on php 7.2 due to https://bugs.php.net/bug.php?id=75628
# -e "/require_once/i \\define('TEST_SESSION_REDIS_HOST', '127.0.0.1');" \
sed -i \
-e "/require_once/i \\\$CFG->phpunit_dataroot = '\/home\/travis\/roots\/phpunit';" \
-e "/require_once/i \\\$CFG->phpunit_prefix = 'p_';" \
-e "/require_once/i \\define('TEST_SESSION_REDIS_HOST', '127.0.0.1');" \
config.php ;
# Initialise PHPUnit for Moodle.
@@ -204,7 +207,7 @@ before_script:
# We need the official upstream for comparison
git remote add upstream https://github.com/moodle/moodle.git;
git fetch upstream master;
git fetch upstream MOODLE_34_STABLE;
export GIT_PREVIOUS_COMMIT="`git merge-base FETCH_HEAD $TRAVIS_COMMIT`";
export GIT_COMMIT="$TRAVIS_COMMIT";
export UPSTREAM_FETCH_HEAD=`git rev-parse FETCH_HEAD`
+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();
+176
View File
@@ -2259,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);
@@ -46,6 +46,14 @@ $error = optional_param('error', '', PARAM_ALPHANUM);
admin_externalpage_setup('registrationmoodleorg');
if ($url !== HUB_MOODLEORGHUBURL) {
// Allow other plugins to confirm registration on hubs other than moodle.net . Plugins implementing this
// callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration .
$callbacks = get_plugins_with_function('hub_registration');
foreach ($callbacks as $plugintype => $plugins) {
foreach ($plugins as $plugin => $callback) {
$callback('confirm');
}
}
throw new moodle_exception('errorotherhubsnotsupported', 'hub');
}
+8
View File
@@ -40,6 +40,14 @@ $token = optional_param('token', '', PARAM_TEXT);
admin_externalpage_setup('registrationmoodleorg');
if ($url !== HUB_MOODLEORGHUBURL) {
// Allow other plugins to renew registration on hubs other than moodle.net . Plugins implementing this
// callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration .
$callbacks = get_plugins_with_function('hub_registration');
foreach ($callbacks as $plugintype => $plugins) {
foreach ($plugins as $plugin => $callback) {
$callback('renew');
}
}
throw new moodle_exception('errorotherhubsnotsupported', 'hub');
}
+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)) {
@@ -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"/>';
}
+5 -4
View File
@@ -32,15 +32,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);
}
}
+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
@@ -54,8 +54,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
@@ -29,6 +29,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')));
@@ -119,6 +119,9 @@ class models_list implements \renderable, \templatable {
debugging("The time splitting method '{$modeldata->timesplitting}' should include a '{$identifier}_help'
string to describe its purpose.", DEBUG_DEVELOPER);
}
} else {
$helpicon = new \help_icon('timesplittingnotdefined', 'tool_analytics');
$modeldata->timesplittinghelp = $helpicon->export_for_template($output);
}
// Has this model generated predictions?.
@@ -207,19 +210,22 @@ class models_list implements \renderable, \templatable {
}
// Enable / disable.
if ($model->is_enabled()) {
$action = 'disable';
$text = get_string('disable');
$icontype = 't/block';
} else {
$action = 'enable';
$text = get_string('enable');
$icontype = 'i/checked';
if ($model->is_enabled() || !empty($modeldata->timesplitting)) {
// If there is no timesplitting method set, the model can not be enabled.
if ($model->is_enabled()) {
$action = 'disable';
$text = get_string('disable');
$icontype = 't/block';
} else {
$action = 'enable';
$text = get_string('enable');
$icontype = 'i/checked';
}
$urlparams['action'] = $action;
$url = new \moodle_url('model.php', $urlparams);
$icon = new \action_menu_link_secondary($url, new \pix_icon($icontype, $text), $text);
$actionsmenu->add($icon);
}
$urlparams['action'] = $action;
$url = new \moodle_url('model.php', $urlparams);
$icon = new \action_menu_link_secondary($url, new \pix_icon($icontype, $text), $text);
$actionsmenu->add($icon);
// Export training data.
if (!$model->is_static() && $model->is_trained()) {
@@ -264,8 +270,13 @@ class models_list implements \renderable, \templatable {
} else {
$url = new \moodle_url('/admin/settings.php', array('section' => 'analyticssettings'),
'id_s_analytics_onlycli');
$langstrid = 'clievaluationandpredictionsnoadmin';
if (is_siteadmin()) {
$langstrid = 'clievaluationandpredictions';
}
$data->infos = array(
(object)array('message' => get_string('clievaluationandpredictions', 'tool_analytics', $url->out()),
(object)array('message' => get_string($langstrid, 'tool_analytics', $url->out()),
'closebutton' => true)
);
}
@@ -117,12 +117,21 @@ function tool_analytics_calculate_course_dates($course, $options) {
$notification = $course->shortname . ' (id = ' . $course->id . '): ';
$originalenddate = null;
$guessedstartdate = null;
$guessedenddate = null;
$samestartdate = null;
$lowerenddate = null;
if ($options['guessstart'] || $options['guessall']) {
$originalstartdate = $course->startdate;
$guessedstartdate = $courseman->guess_start();
if ($guessedstartdate == $originalstartdate) {
$samestartdate = ($guessedstartdate == $originalstartdate);
$lowerenddate = ($course->enddate && ($course->enddate < $guessedstartdate));
if ($samestartdate) {
if (!$guessedstartdate) {
$notification .= PHP_EOL . ' ' . get_string('cantguessstartdate', 'tool_analytics');
} else {
@@ -131,6 +140,9 @@ function tool_analytics_calculate_course_dates($course, $options) {
}
} else if (!$guessedstartdate) {
$notification .= PHP_EOL . ' ' . get_string('cantguessstartdate', 'tool_analytics');
} else if ($lowerenddate) {
$notification .= PHP_EOL . ' ' . get_string('cantguessstartdate', 'tool_analytics') . ': ' .
get_string('enddatebeforestartdate', 'error') . ' - ' . userdate($guessedstartdate);
} else {
// Update it to something we guess.
@@ -151,6 +163,10 @@ function tool_analytics_calculate_course_dates($course, $options) {
if ($options['guessend'] || $options['guessall']) {
if (!empty($lowerenddate) && !empty($guessedstartdate)) {
$course->startdate = $guessedstartdate;
}
$originalenddate = $course->enddate;
$format = course_get_format($course);
@@ -196,10 +212,8 @@ function tool_analytics_calculate_course_dates($course, $options) {
$updateit = true;
}
if ($options['update']) {
if ($course->enddate > $course->startdate) {
update_course($course);
}
if ($options['update'] && $updateit) {
update_course($course);
}
}
}
@@ -33,6 +33,7 @@ $string['clearpredictions'] = 'Clear predictions';
$string['clearmodelpredictions'] = 'Are you sure you want to clear all "{$a}" predictions?';
$string['clienablemodel'] = 'You can enable the model by selecting a time-splitting method by its ID. Note that you can also enable it later using the web interface (\'none\' to exit).';
$string['clievaluationandpredictions'] = 'A scheduled task iterates through enabled models and gets predictions. Models evaluation via the web interface is disabled. You can allow these processes to be executed manually via the web interface by disabling the <a href="{$a}">\'onlycli\'</a> analytics setting.';
$string['clievaluationandpredictionsnoadmin'] = 'A scheduled task iterates through enabled models and gets predictions. Models evaluation via the web interface is disabled. It may be enabled by a site administrator.';
$string['editmodel'] = 'Edit "{$a}" model';
$string['edittrainedwarning'] = 'This model has already been trained. Note that changing its indicators or its time-splitting method will delete its previous predictions and start generating new predictions.';
$string['enabled'] = 'Enabled';
@@ -82,6 +83,8 @@ $string['previouspage'] = 'Previous page';
$string['samestartdate'] = 'Current start date is good';
$string['sameenddate'] = 'Current end date is good';
$string['target'] = 'Target';
$string['timesplittingnotdefined'] = 'Time splitting is not defined.';
$string['timesplittingnotdefined_help'] = 'You need to select a time-splitting method before enabling the model.';
$string['trainandpredictmodel'] = 'Training model and calculating predictions';
$string['trainingprocessfinished'] = 'Training process finished';
$string['trainingresults'] = 'Training results';
@@ -160,6 +160,9 @@
{{/timesplitting}}
{{^timesplitting}}
{{#str}}notdefined, tool_analytics{{/str}}
{{#timesplittinghelp}}
{{>core/help_icon}}
{{/timesplittinghelp}}
{{/timesplitting}}
</td>
<td>
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_analytics'; // Full name of the plugin (used for diagnostics).
+3 -3
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->component = 'tool_assignmentupgrade';
$plugin->dependencies = array('mod_assign' => 2017050500);
$plugin->dependencies = array('mod_assign' => 2017110800);
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->component = 'tool_availabilityconditions';
+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.
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_behat'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_capability'; // Full name of the plugin (used for diagnostics).
+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);
+2 -2
View File
@@ -25,8 +25,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_cohortroles'; // Full name of the plugin (used for diagnostics).
$plugin->dependencies = array(
+3
View File
@@ -38,5 +38,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+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) {
+2 -2
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->component = 'tool_customlang'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_dbtransfer'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->component = 'tool_filetypes';
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->component = 'tool_generator';
+2 -2
View File
@@ -25,8 +25,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_health'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
@@ -47,12 +47,12 @@ class httpsreplace_test extends \advanced_testcase {
"Test image from another site should be replaced" => [
"content" => '<img src="' . $this->getExternalTestFileUrl('/test.jpg', false) . '">',
"outputregex" => '/UPDATE/',
"expectedcontent" => '<img src="' . $this->getExternalTestFileUrl('/test.jpg', true) . '">',
"expectedcontent" => '<img src="' . $this->get_converted_http_link('/test.jpg') . '">',
],
"Test object from another site should be replaced" => [
"content" => '<object data="' . $this->getExternalTestFileUrl('/test.swf', false) . '">',
"outputregex" => '/UPDATE/',
"expectedcontent" => '<object data="' . $this->getExternalTestFileUrl('/test.swf', true) . '">',
"expectedcontent" => '<object data="' . $this->get_converted_http_link('/test.swf') . '">',
],
"Test image from a site with international name should be replaced" => [
"content" => '<img src="http://中国互联网络信息中心.中国/logosy/201706/W01.png">',
@@ -82,7 +82,7 @@ class httpsreplace_test extends \advanced_testcase {
"Search for params should be case insensitive" => [
"content" => '<object DATA="' . $this->getExternalTestFileUrl('/test.swf', false) . '">',
"outputregex" => '/UPDATE/',
"expectedcontent" => '<object DATA="' . $this->getExternalTestFileUrl('/test.swf', true) . '">',
"expectedcontent" => '<object DATA="' . $this->get_converted_http_link('/test.swf') . '">',
],
"URL should be case insensitive" => [
"content" => '<object data="HTTP://some.site/path?query">',
@@ -93,7 +93,7 @@ class httpsreplace_test extends \advanced_testcase {
"content" => '<img alt="A picture" src="' . $this->getExternalTestFileUrl('/test.png', false) .
'" width="1”><p style="font-size: \'20px\'"></p>',
"outputregex" => '/UPDATE/',
"expectedcontent" => '<img alt="A picture" src="' . $this->getExternalTestFileUrl('/test.png', true) .
"expectedcontent" => '<img alt="A picture" src="' . $this->get_converted_http_link('/test.png') .
'" width="1”><p style="font-size: \'20px\'"></p>',
],
"Broken URL should not be changed" => [
@@ -113,11 +113,25 @@ class httpsreplace_test extends \advanced_testcase {
$this->getExternalTestFileUrl('/test.jpg', false) . '"></a>',
"outputregex" => '/UPDATE/',
"expectedcontent" => '<a href="' . $this->getExternalTestFileUrl('/test.png', false) . '"><img src="' .
$this->getExternalTestFileUrl('/test.jpg', true) . '"></a>',
$this->get_converted_http_link('/test.jpg') . '"></a>',
],
];
}
/**
* Convert the HTTP external test file URL to use HTTPS.
*
* Note: We *must not* use getExternalTestFileUrl with the True option
* here, becase it is reasonable to have only one of these set due to
* issues with SSL certificates.
*
* @param string $path Path to be rewritten
* @return string
*/
protected function get_converted_http_link($path) {
return preg_replace('/^http:/', 'https:', $this->getExternalTestFileUrl($path, false));
}
/**
* Test upgrade_http_links
* @param string $content Example content that we'll attempt to replace.
@@ -152,7 +166,7 @@ class httpsreplace_test extends \advanced_testcase {
// Get the http url, since the default test wwwroot is https.
$wwwrootdomain = 'www.example.com';
$wwwroothttp = preg_replace('/^https:/', 'http:', $CFG->wwwroot);
$testdomain = 'download.moodle.org';
$testdomain = $this->get_converted_http_link('');
return [
"Test image from an available site so shouldn't be reported" => [
"content" => '<img src="' . $this->getExternalTestFileUrl('/test.jpg', false) . '">',
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017082500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017082400; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_httpsreplace'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_innodb'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'tool_installaddon';
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->maturity = MATURITY_STABLE;
+2 -2
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_langimport'; // Full name of the plugin (used for diagnostics)
+3
View File
@@ -42,5 +42,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -36,5 +36,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017062600; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'logstore_database'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'logstore_legacy'; // Full name of the plugin (used for diagnostics).
@@ -36,5 +36,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'logstore_standard'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_log'; // Full name of the plugin (used for diagnostics).
@@ -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>
+2 -2
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017062700; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_lp'; // Full name of the plugin (used for diagnostics).
+3 -3
View File
@@ -25,8 +25,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_lpimportcsv'; // Full name of the plugin (used for diagnostics).
$plugin->dependencies = array('tool_lp' => 2017050500);
$plugin->dependencies = array('tool_lp' => 2017110800);
+2 -2
View File
@@ -24,8 +24,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_lpmigrate'; // Full name of the plugin (used for diagnostics).
$plugin->dependencies = array(
'tool_lp' => ANY_VERSION
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->component = 'tool_messageinbound';
+3 -1
View File
@@ -223,7 +223,9 @@ class api {
}
if (empty($section) or $section == 'sitepolicies') {
$settings->sitepolicy = $CFG->sitepolicy;
$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;
}
+1 -1
View File
@@ -87,5 +87,5 @@ $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.';
$string['getmoodleonyourmobile'] = 'Get the mobile app';
@@ -150,6 +150,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
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
@@ -23,9 +23,9 @@
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051501; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_mobile'; // Full name of the plugin (used for diagnostics).
$plugin->dependencies = array(
'webservice_rest' => 2017050500
'webservice_rest' => 2017110800
);
+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>
+3
View File
@@ -76,5 +76,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+2 -2
View File
@@ -26,6 +26,6 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_monitor'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_multilangupgrade'; // Full name of the plugin (used for diagnostics)
@@ -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');
@@ -95,6 +95,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.';
+2 -2
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_oauth2'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_phpunit'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_profiling'; // Full name of the plugin (used for diagnostics)
+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
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_recyclebin'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -25,8 +25,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_replace'; // Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_ALPHA; // this version's maturity level
+2 -2
View File
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500;
$plugin->requires = 2017050500;
$plugin->version = 2017111300;
$plugin->requires = 2017110800;
$plugin->component = 'tool_spamcleaner'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_task'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -21,6 +21,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_templatelibrary'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_unsuproles'; // Full name of the plugin (used for diagnostics)
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_uploadcourse'; // Full name of the plugin (used for diagnostics).
+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.
+2 -2
View File
@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_uploaduser'; // Full name of the plugin (used for diagnostics)
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(){var a;a=c(c(".tool_usertours-resettourcontainer").length?".tool_usertours-resettourcontainer":c(".logininfo").length?".logininfo":c("footer").length?"footer":"body"),d.render("tool_usertours/resettour",{}).done(function(b,c){d.appendNodeContents(a,b,c)})},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(){var a;M.util.js_pending("admin_usertour_addResetLink"),a=c(c(".tool_usertours-resettourcontainer").length?".tool_usertours-resettourcontainer":c(".logininfo").length?".logininfo":c("footer").length?"footer":"body"),d.render("tool_usertours/resettour",{}).done(function(b,c){d.appendNodeContents(a,b,c)}).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,10 @@ 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);
},
@@ -79,6 +83,8 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
*/
addResetLink: function() {
var ele;
M.util.js_pending('admin_usertour_addResetLink');
// Append the link to the most suitable place on the page
// with fallback to legacy selectors and finally the body
// if there is no better place.
@@ -94,7 +100,13 @@ function(ajax, BootstrapTour, $, templates, str, log, notification) {
templates.render('tool_usertours/resettour', {})
.done(function(html, js) {
templates.appendNodeContents(ele, html, js);
});
return;
}).always(function() {
M.util.js_complete('admin_usertour_addResetLink');
return;
}).fail();
},
/**
@@ -104,6 +116,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) {
@@ -147,7 +160,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) : collection {
// 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(int $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">
+3
View File
@@ -48,5 +48,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -175,3 +175,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>
+2 -2
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'tool_usertours'; // Full name of the plugin (used for diagnostics).
+2 -2
View File
@@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'tool_xmldb'; // Full name of the plugin (used for diagnostics)
+8 -2
View File
@@ -256,11 +256,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];
}
+8 -8
View File
@@ -134,7 +134,7 @@ class course implements \core_analytics\analysable {
*
* Lazy load of course data, students and teachers.
*
* @param int|stdClass $course Course id
* @param int|\stdClass $course Course id
* @return void
*/
public function __construct($course) {
@@ -152,7 +152,7 @@ class course implements \core_analytics\analysable {
*
* Lazy load of course data, students and teachers.
*
* @param int|stdClass $course Course object or course id
* @param int|\stdClass $course Course object or course id
* @return \core_analytics\course
*/
public static function instance($course) {
@@ -184,7 +184,7 @@ class course implements \core_analytics\analysable {
/**
* Loads the analytics course object.
*
* @return null
* @return void
*/
protected function load() {
@@ -356,7 +356,7 @@ class course implements \core_analytics\analysable {
$monthsago = time() - (WEEKSECS * 4 * 2);
$select = $filterselect . ' AND timeaccess > :timeaccess';
$params = $filterparams + array('timeaccess' => $monthsago);
$sql = "SELECT timeaccess FROM {user_lastaccess} ula
$sql = "SELECT DISTINCT timeaccess FROM {user_lastaccess} ula
JOIN {enrol} e ON e.courseid = ula.courseid
JOIN {user_enrolments} ue ON e.id = ue.enrolid AND ue.userid = ula.userid
WHERE $select";
@@ -364,7 +364,7 @@ class course implements \core_analytics\analysable {
return 0;
}
$sql = "SELECT timeaccess FROM {user_lastaccess} ula
$sql = "SELECT DISTINCT timeaccess FROM {user_lastaccess} ula
JOIN {enrol} e ON e.courseid = ula.courseid
JOIN {user_enrolments} ue ON e.id = ue.enrolid AND ue.userid = ula.userid
WHERE $filterselect AND ula.timeaccess != 0
@@ -451,7 +451,7 @@ class course implements \core_analytics\analysable {
/**
* Returns the course students.
*
* @return stdClass[]
* @return int[]
*/
public function get_students() {
@@ -595,7 +595,7 @@ class course implements \core_analytics\analysable {
*
* Keys are ignored.
*
* @param int|float $values Sorted array of values
* @param int[]|float[] $values Sorted array of values
* @return int
*/
protected function median($values) {
@@ -605,7 +605,7 @@ class course implements \core_analytics\analysable {
return reset($values);
}
$middlevalue = floor(($count - 1) / 2);
$middlevalue = (int)floor(($count - 1) / 2);
if ($count % 2) {
// Odd number, middle is the median.
+4
View File
@@ -1013,6 +1013,10 @@ class model {
if (!$this->is_static()) {
$this->model->trained = 0;
}
} else if (empty($this->model->timesplitting)) {
// A valid timesplitting method needs to be supplied before a model can be enabled.
throw new \moodle_exception('invalidtimesplitting', 'analytics', '', $this->model->id);
}
// Purge pages with insights as this may change things.
+1
View File
@@ -138,6 +138,7 @@ class dataset_manager_testcase extends advanced_testcase {
// Training and prediction files are not mixed up.
$trainingfile1 = \core_analytics\dataset_manager::merge_datasets(array($file), $fakemodelid,
'\core\analytics\time_splitting\quarters', \core_analytics\dataset_manager::LABELLED_FILEAREA, false);
$this->waitForSecond();
$trainingfile2 = \core_analytics\dataset_manager::merge_datasets(array($file), $fakemodelid,
'\core\analytics\time_splitting\quarters', \core_analytics\dataset_manager::LABELLED_FILEAREA, false);
+8 -4
View File
@@ -226,13 +226,17 @@ class analytics_model_testcase extends advanced_testcase {
$this->model->mark_as_trained();
$this->assertEquals($originaluniqueid, $this->model->get_unique_id());
$this->model->enable();
$this->assertEquals($originaluniqueid, $this->model->get_unique_id());
// Wait for the current timestamp to change.
$this->waitForSecond();
$this->model->enable('\core\analytics\time_splitting\deciles');
$this->assertNotEquals($originaluniqueid, $this->model->get_unique_id());
$uniqueid = $this->model->get_unique_id();
// Wait 1 sec so the timestamp changes.
sleep(1);
// Wait for the current timestamp to change.
$this->waitForSecond();
$this->model->enable('\core\analytics\time_splitting\quarters');
$this->assertNotEquals($originaluniqueid, $this->model->get_unique_id());
$this->assertNotEquals($uniqueid, $this->model->get_unique_id());
}
/**
+3
View File
@@ -48,5 +48,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3 -3
View File
@@ -26,8 +26,8 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017050500; // Requires this Moodle version
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2017110800; // Requires this Moodle version
$plugin->component = 'auth_cas'; // Full name of the plugin (used for diagnostics)
$plugin->dependencies = array('auth_ldap' => 2017050500);
$plugin->dependencies = array('auth_ldap' => 2017110800);
+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;
}
}

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