Compare commits

...

399 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) c9236c6860 Moodle release 3.4.1 2018-01-12 20:35:46 +01: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
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
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
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
788 changed files with 5510 additions and 1826 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 {
+9 -7
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');
+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');
}
+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/");
@@ -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).
+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;
}
+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 -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
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)
@@ -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;
@@ -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
+57 -21
View File
@@ -619,26 +619,43 @@ Tour.prototype.addEventHandler = function (eventName, handler) {
*/
Tour.prototype.processStepListeners = function (stepConfig) {
this.listeners.push(
// Next/Previous buttons.
{
node: this.currentStepNode,
args: ['click', '[data-role="next"]', $.proxy(this.next, this)]
}, {
node: this.currentStepNode,
args: ['click', '[data-role="previous"]', $.proxy(this.previous, this)]
},
// Next/Previous buttons.
{
node: this.currentStepNode,
args: ['click', '[data-role="next"]', $.proxy(this.next, this)]
}, {
node: this.currentStepNode,
args: ['click', '[data-role="previous"]', $.proxy(this.previous, this)]
},
// Close and end tour buttons.
{
node: this.currentStepNode,
args: ['click', '[data-role="end"]', $.proxy(this.endTour, this)]
},
// Close and end tour buttons.
{
node: this.currentStepNode,
args: ['click', '[data-role="end"]', $.proxy(this.endTour, this)]
},
// Keypresses.
{
node: $('body'),
args: ['keydown', $.proxy(this.handleKeyDown, 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'),
args: ['keydown', $.proxy(this.handleKeyDown, this)]
});
if (stepConfig.moveOnClick) {
var targetNode = this.getStepTarget(stepConfig);
@@ -904,7 +921,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 +940,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 +960,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 +1116,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();
+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;
}
@@ -157,3 +157,23 @@ Feature: Apply tour filters to a tour
When I am on "Course 2" course homepage
And I wait until the page is ready
Then I should not see "Welcome to your course tour."
@javascript
Scenario: Aria tags should not exist
Given I log in as "admin"
And I open the User tour settings page
# Turn on default tour for boost theme.
And I click on "Enable" "link" in the "Boost - administrator" "table_row"
And I am on site homepage
When I click on "Next" "button"
Then "button[aria-describedby^='tour-step-tool_usertours']" "css_element" should exist
And "button[tabindex]" "css_element" should exist
When I click on "Next" "button"
Then "button[aria-describedby^='tour-step-tool_usertours']" "css_element" should not exist
And "button[tabindex]" "css_element" should not exist
When I click on "Previous" "button"
Then "button[aria-describedby^='tour-step-tool_usertours']" "css_element" should exist
And "button[tabindex]" "css_element" should exist
When I click on "End tour" "button"
Then "button[aria-describedby^='tour-step-tool_usertours']" "css_element" should not exist
And "button[tabindex]" "css_element" should not exist
+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.0</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);
+3
View File
@@ -45,5 +45,8 @@ function xmldb_auth_db_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 = 'auth_db'; // Full name of the plugin (used for diagnostics)
+3
View File
@@ -45,5 +45,8 @@ function xmldb_auth_email_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 = 'auth_email'; // Full name of the plugin (used for diagnostics)
+105 -39
View File
@@ -837,23 +837,7 @@ class auth_plugin_ldap extends auth_plugin_base {
/// User Updates - time-consuming (optional)
if ($do_updates) {
// Narrow down what fields we need to update
$all_keys = array_keys(get_object_vars($this->config));
$updatekeys = array();
foreach ($all_keys as $key) {
if (preg_match('/^field_updatelocal_(.+)$/', $key, $match)) {
// If we have a field to update it from
// and it must be updated 'onlogin' we
// update it on cron
if (!empty($this->config->{'field_map_'.$match[1]})
and $this->config->{$match[0]} === 'onlogin') {
array_push($updatekeys, $match[1]); // the actual key name
}
}
}
if ($this->config->suspended_attribute && $this->config->sync_suspended) {
$updatekeys[] = 'suspended';
}
unset($all_keys); unset($key);
$updatekeys = $this->get_profile_keys();
} else {
print_string('noupdatestobedone', 'auth_ldap');
@@ -928,14 +912,18 @@ class auth_plugin_ldap extends auth_plugin_base {
$id = user_create_user($user, false);
echo "\t"; print_string('auth_dbinsertuser', 'auth_db', array('name'=>$user->username, 'id'=>$id)); echo "\n";
$user = $DB->get_record('user', array('id' => $id));
$euser = $DB->get_record('user', array('id' => $id));
if (!empty($this->config->forcechangepassword)) {
set_user_preference('auth_forcepasswordchange', 1, $id);
}
// Save custom profile fields.
$updatekeys = $this->get_profile_keys(true);
$this->update_user_record($user->username, $updatekeys, false);
// Add roles if needed.
$this->sync_roles($user);
$this->sync_roles($euser);
}
$transaction->allow_commit();
@@ -967,6 +955,8 @@ class auth_plugin_ldap extends auth_plugin_base {
function update_user_record($username, $updatekeys = false, $triggerevent = false) {
global $CFG, $DB;
require_once($CFG->dirroot.'/user/profile/lib.php');
// Just in case check text case
$username = trim(core_text::strtolower($username));
@@ -981,6 +971,8 @@ class auth_plugin_ldap extends auth_plugin_base {
// Protect the userid from being overwritten
$userid = $user->id;
$needsupdate = false;
if ($newinfo = $this->get_userinfo($username)) {
$newinfo = truncate_userinfo($newinfo);
@@ -993,6 +985,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$newuser->id = $userid;
// The cast to int is a workaround for MDL-53959.
$newuser->suspended = (int)$this->is_user_suspended((object) $newinfo);
// Get all custom fields.
$profilefields = (array) profile_user_record($user->id, false);
$newprofilefields = [];
foreach ($updatekeys as $key) {
if (isset($newinfo[$key])) {
@@ -1002,18 +997,50 @@ class auth_plugin_ldap extends auth_plugin_base {
}
if (!empty($this->config->{'field_updatelocal_' . $key})) {
// Only update if it's changed.
if ($user->{$key} != $value) {
if (preg_match('/^profile_field_(.*)$/', $key, $match)) {
// Custom field.
$field = $match[1];
$currentvalue = isset($profilefields[$field]) ? $profilefields[$field] : null;
$newprofilefields[$field] = $value;
} else {
// Standard field.
$currentvalue = isset($user->$key) ? $user->$key : null;
$newuser->$key = $value;
}
}
// Only update if it's changed.
if ($currentvalue !== $value) {
$needsupdate = true;
}
}
user_update_user($newuser, false, $triggerevent);
}
} else {
return false;
if ($needsupdate) {
user_update_user($newuser, false, $triggerevent);
// Now, save the profile fields if the user has any.
if ($fields = $DB->get_records('user_info_field')) {
foreach ($fields as $field) {
if (isset($newprofilefields[$field->shortname])) {
$conditions = array('fieldid' => $field->id, 'userid' => $newuser->id);
$id = $DB->get_field('user_info_data', 'id', $conditions);
$data = $newprofilefields[$field->shortname];
if ($id) {
$DB->set_field('user_info_data', 'data', $data, array('id' => $id));
} else {
$record = array('fieldid' => $field->id, 'userid' => $newuser->id, 'data' => $data);
$DB->insert_record('user_info_data', $record);
}
}
}
}
return $DB->get_record('user', array('id' => $userid, 'deleted' => 0));
}
}
return $DB->get_record('user', array('id'=>$userid, 'deleted'=>0));
return false;
}
/**
@@ -1201,6 +1228,14 @@ class auth_plugin_ldap extends auth_plugin_base {
return false;
}
// Load old custom fields.
$olduserprofilefields = (array) profile_user_record($olduser->id, false);
$fields = array();
foreach (profile_get_custom_fields(false) as $field) {
$fields[$field->shortname] = $field;
}
$success = true;
$user_info_result = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($user_info_result) {
@@ -1219,19 +1254,24 @@ class auth_plugin_ldap extends auth_plugin_base {
$user_entry = $user_entry[0];
foreach ($attrmap as $key => $ldapkeys) {
$profilefield = '';
// Only process if the moodle field ($key) has changed and we
// are set to update LDAP with it
$customprofilefield = 'profile_field_' . $key;
if (isset($olduser->$key) and isset($newuser->$key)
and ($olduser->$key !== $newuser->$key)) {
$profilefield = $key;
} else if (isset($olduser->$customprofilefield) && isset($newuser->$customprofilefield)
&& $olduser->$customprofilefield !== $newuser->$customprofilefield) {
$profilefield = $customprofilefield;
if (preg_match('/^profile_field_(.*)$/', $key, $match)) {
// Custom field.
$fieldname = $match[1];
if (isset($fields[$fieldname])) {
$class = 'profile_field_' . $fields[$fieldname]->datatype;
$formfield = new $class($fields[$fieldname]->id, $olduser->id);
$oldvalue = isset($olduserprofilefields[$fieldname]) ? $olduserprofilefields[$fieldname] : null;
} else {
$oldvalue = null;
}
$newvalue = $formfield->edit_save_data_preprocess($newuser->{$formfield->inputname}, new stdClass);
} else {
// Standard field.
$oldvalue = isset($olduser->$key) ? $olduser->$key : null;
$newvalue = isset($newuser->$key) ? $newuser->$key : null;
}
if (!empty($profilefield) && !empty($this->config->{'field_updateremote_' . $key})) {
if ($newvalue !== null and $newvalue !== $oldvalue and !empty($this->config->{'field_updateremote_' . $key})) {
// For ldap values that could be in more than one
// ldap key, we will do our best to match
// where they came from
@@ -1244,9 +1284,9 @@ class auth_plugin_ldap extends auth_plugin_base {
$ambiguous = false;
}
$nuvalue = core_text::convert($newuser->$profilefield, 'utf-8', $this->config->ldapencoding);
$nuvalue = core_text::convert($newvalue, 'utf-8', $this->config->ldapencoding);
empty($nuvalue) ? $nuvalue = array() : $nuvalue;
$ouvalue = core_text::convert($olduser->$profilefield, 'utf-8', $this->config->ldapencoding);
$ouvalue = core_text::convert($oldvalue, 'utf-8', $this->config->ldapencoding);
foreach ($ldapkeys as $ldapkey) {
$ldapkey = $ldapkey;
@@ -1684,7 +1724,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$sesskey = sesskey();
redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_magic.php?sesskey='.$sesskey);
} else if ($this->config->ntlmsso_ie_fastpath == AUTH_NTLM_FASTPATH_YESFORM) {
redirect($CFG-wwwroot.'/login/index.php?authldap_skipntlmsso=1');
redirect($CFG->wwwroot.'/login/index.php?authldap_skipntlmsso=1');
}
}
redirect($CFG->wwwroot.'/auth/ldap/ntlmsso_attempt.php');
@@ -2170,4 +2210,30 @@ class auth_plugin_ldap extends auth_plugin_base {
echo $OUTPUT->notification(get_string('ldapnotconfigured', 'auth_ldap'), \core\output\notification::NOTIFY_INFO);
}
}
/**
* Get the list of profile fields.
*
* @param bool $fetchall Fetch all, not just those for update.
* @return array
*/
protected function get_profile_keys($fetchall = false) {
$keys = array_keys(get_object_vars($this->config));
$updatekeys = [];
foreach ($keys as $key) {
if (preg_match('/^field_updatelocal_(.+)$/', $key, $match)) {
// If we have a field to update it from and it must be updated 'onlogin' we update it on cron.
if (!empty($this->config->{'field_map_'.$match[1]})) {
if ($fetchall || $this->config->{$match[0]} === 'onlogin') {
array_push($updatekeys, $match[1]); // the actual key name
}
}
}
}
if ($this->config->suspended_attribute && $this->config->sync_suspended) {
$updatekeys[] = 'suspended';
}
return $updatekeys;
}
} // End of the class
+3
View File
@@ -66,5 +66,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
}
}
// Automatically generated Moodle v3.4.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+9 -9
View File
@@ -41,12 +41,12 @@ $string['auth_ldapdescription'] = 'This method provides authentication against a
entry in its database. This module can read user attributes from LDAP and prefill
wanted fields in Moodle. For following logins only the username and
password are checked.';
$string['auth_ldap_expiration_desc'] = 'Select No to disable expired password checking or LDAP to read passwordexpiration time directly from LDAP';
$string['auth_ldap_expiration_key'] = 'Expiration';
$string['auth_ldap_expiration_warning_desc'] = 'Number of days before password expiration warning is issued.';
$string['auth_ldap_expiration_warning_key'] = 'Expiration warning';
$string['auth_ldap_expireattr_desc'] = 'Optional: Overrides the LDAP attribute that stores password expiration time.';
$string['auth_ldap_expireattr_key'] = 'Expiration attribute';
$string['auth_ldap_expiration_desc'] = 'Select \'{$a->no}\' to disable expired password checking or \'{$a->ldapserver}\' to read the password expiry time directly from the LDAP server.';
$string['auth_ldap_expiration_key'] = 'Expiry';
$string['auth_ldap_expiration_warning_desc'] = 'Number of days before password expiry warning is issued.';
$string['auth_ldap_expiration_warning_key'] = 'Expiry warning';
$string['auth_ldap_expireattr_desc'] = 'Optional: Overrides the LDAP attribute that stores password expiry time.';
$string['auth_ldap_expireattr_key'] = 'Expiry attribute';
$string['auth_ldapextrafields'] = 'These fields are optional. You can choose to pre-fill some Moodle user fields with information from the <b>LDAP fields</b> that you specify here. <p>If you leave these fields blank, then nothing will be transferred from LDAP and Moodle defaults will be used instead.</p><p>In either case, the user will be able to edit all of these fields after they log in.</p>';
$string['auth_ldap_graceattr_desc'] = 'Optional: Overrides gracelogin attribute';
$string['auth_ldap_gracelogin_key'] = 'Grace login attribute';
@@ -75,7 +75,7 @@ $string['auth_ldap_opt_deref'] = 'Determines how aliases are handled during sear
$string['auth_ldap_opt_deref_key'] = 'Dereference aliases';
$string['auth_ldap_passtype'] = 'Specify the format of new or changed passwords in LDAP server.';
$string['auth_ldap_passtype_key'] = 'Password format';
$string['auth_ldap_passwdexpire_settings'] = 'LDAP password expiration settings';
$string['auth_ldap_passwdexpire_settings'] = 'LDAP password expiry settings';
$string['auth_ldap_preventpassindb'] = 'Select yes to prevent passwords from being stored in Moodle\'s DB.';
$string['auth_ldap_preventpassindb_key'] = 'Prevent password caching';
$string['auth_ldap_rolecontext'] = '{$a->localname} context';
@@ -91,7 +91,7 @@ $string['auth_ldap_suspended_attribute'] = 'Optional: When provided this attribu
$string['auth_ldap_suspended_attribute_key'] = 'Suspended attribute';
$string['auth_ldap_user_exists'] = 'LDAP username already exists.';
$string['auth_ldap_user_settings'] = 'User lookup settings';
$string['auth_ldap_user_type'] = 'Select how users are stored in LDAP. This setting also specifies how login expiration, grace logins and user creation will work.';
$string['auth_ldap_user_type'] = 'Select how users are stored in LDAP. This setting also specifies how login expiry, grace logins and user creation will work.';
$string['auth_ldap_user_type_key'] = 'User type';
$string['auth_ldap_usertypeundefined'] = 'config.user_type not defined or function ldap_expirationtime2unix does not support selected type!';
$string['auth_ldap_usertypeundefined2'] = 'config.user_type not defined or function ldap_unixi2expirationtime does not support selected type!';
@@ -149,7 +149,7 @@ $string['start_tls_key'] = 'Use TLS';
$string['updateremfail'] = 'Error updating LDAP record. Error code: {$a->errno}; Error string: {$a->errstring}<br/>Key ({$a->key}) - old moodle value: \'{$a->ouvalue}\' new value: \'{$a->nuvalue}\'';
$string['updateremfailamb'] = 'Failed to update LDAP with ambiguous field {$a->key}; old moodle value: \'{$a->ouvalue}\', new value: \'{$a->nuvalue}\'';
$string['updatepasserror'] = 'Error in user_update_password(). Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpire'] = 'Error in user_update_password() when reading password expiration time. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpire'] = 'Error in user_update_password() when reading password expiry time. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updatepasserrorexpiregrace'] = 'Error in user_update_password() when modifying expirationtime and/or gracelogins. Error code: {$a->errno}; Error string: {$a->errstring}';
$string['updateusernotfound'] = 'Could not find user while updating externally. Details follow: search base: \'{$a->userdn}\'; search filter: \'(objectClass=*)\'; search attributes: {$a->attribs}';
$string['user_activatenotsupportusertype'] = 'auth: ldap user_activate() does not support selected usertype: {$a}';
+15 -3
View File
@@ -185,12 +185,24 @@ if ($ADMIN->fulltree) {
new lang_string('auth_ldap_passwdexpire_settings', 'auth_ldap'), ''));
// Password Expiration.
// Create the description lang_string object.
$strno = get_string('no');
$strldapserver = get_string('pluginname', 'auth_ldap');
$langobject = new stdClass();
$langobject->no = $strno;
$langobject->ldapserver = $strldapserver;
$description = new lang_string('auth_ldap_expiration_desc', 'auth_ldap', $langobject);
// Now create the options.
$expiration = array();
$expiration['0'] = 'no';
$expiration['1'] = 'LDAP';
$expiration['0'] = $strno;
$expiration['1'] = $strldapserver;
// Add the setting.
$settings->add(new admin_setting_configselect('auth_ldap/expiration',
new lang_string('auth_ldap_expiration_key', 'auth_ldap'),
new lang_string('auth_ldap_expiration_desc', 'auth_ldap'), 0 , $expiration));
$description, 0 , $expiration));
// Password Expiration warning.
$settings->add(new admin_setting_configtext('auth_ldap/expiration_warning',
+2 -2
View File
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017080100; // 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_ldap'; // 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 (3.1).
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017110800; // Requires this Moodle version.
$plugin->component = 'auth_lti'; // Full name of the plugin (used for diagnostics).
+3
View File
@@ -48,5 +48,8 @@ function xmldb_auth_manual_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 = 'auth_manual'; // Full name of the plugin (used for diagnostics)
+3
View File
@@ -47,5 +47,8 @@ function xmldb_auth_mnet_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 = 'auth_mnet'; // 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 = 'auth_nologin'; // Full name of the plugin (used for diagnostics)
+3
View File
@@ -45,5 +45,8 @@ function xmldb_auth_none_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 = 'auth_none'; // Full name of the plugin (used for diagnostics)
+3
View File
@@ -41,5 +41,8 @@ function xmldb_auth_oauth2_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 = 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 = 'auth_oauth2'; // Full name of the plugin (used for diagnostics).
+3
View File
@@ -45,5 +45,8 @@ function xmldb_auth_shibboleth_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
@@ -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 = 'auth_shibboleth'; // 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 = 'auth_webservice'; // Full name of the plugin (used for diagnostics)

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