Compare commits

...

965 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 22bce961b7 Moodle release 3.3.3 2017-11-11 19:29:38 +01:00
AMOS bot ec6731b117 Automatically generated installer lang files 2017-11-11 00:05:47 +00:00
David Monllao c99581ca26 weekly release 3.3.2+ 2017-11-10 15:15:25 +01:00
David Monllao 32ae0dd852 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-11-10 15:15:23 +01:00
Jun Pataleta 3d7db9e878 Merge branch 'MDL-60771-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-11-10 18:03:31 +13:00
Damyon Wiese e6b9178eaa Merge branch 'MDL-60749-33' of git://github.com/sarjona/moodle into MOODLE_33_STABLE 2017-11-10 12:06:35 +08:00
Simey Lameze 5c7be99010 MDL-60771 mod_scorm: typecast score to integer 2017-11-10 12:02:48 +08:00
Andrew Nicols 77952f9b6f Merge branch 'MDL-52838-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-10 11:50:03 +08:00
Damyon Wiese 2fa0109fbf MDL-52838 workshop: Each criterion > 0 levels
Add validation to the edit assessment form so each criterion in a rubric requires at least one level.
2017-11-10 10:22:33 +08:00
Sara Arjona f3e4a11dce MDL-60749 scorm: Remove   from files when downloading 2017-11-09 10:19:36 +01:00
Sara Arjona 038bc7f900 MDL-60550 user: Add more restrictions in keyword searches
Original patch provided by Tim Schroeder.
2017-11-09 15:50:29 +08:00
David Monllao b7abe12fb7 Merge branch 'MDL-60615-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-11-09 08:49:03 +01:00
Damyon Wiese 5e06871c05 Merge branch 'MDL-60752-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-11-09 15:10:30 +08:00
Damyon Wiese 365a403c25 MDL-60615 imscc: string to array fix
Sloppy typing in the imscc converter is causing errors on php7.1

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

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

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

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

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

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

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

There were several issues here:

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

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

* It was possible to select the 'All tries' option when also saying
  'Users without attempts'. This combination makes not sense, so
  a disabledIf rule was added to the form.
2017-10-27 16:57:30 +01:00
David Monllao 5992720184 weekly release 3.3.2+ 2017-10-27 12:48:30 +02:00
Juan Leyva c12bfcefdd MDL-60572 admin: Fix forgottenpasswordurl for WS
We should expect URLs in that field.
The tool_mobile change is to not break the WS response if
forgottenpasswordurl does not contain a URL.
2017-10-27 10:41:28 +02:00
Matt Porritt bf3a3c56b1 MDL-60360 Global Search: Enable file indexing message update.
If you have Global Search set up on a site without file
indexing enabled, then at a later date you enable file indexing
files associated with existing objects are not added.

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

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

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

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

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

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

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

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

This false was not previously handled.

I've changed the logic so that we handle this case, and have removed a
double-negative in the process.
2017-10-13 09:46:28 +08:00
Jun Pataleta 7b4b469720 Merge branch 'MDL-59854-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-10-12 12:27:47 +08:00
Tobias Reischmann 8db207f90f MDL-59854 forum: Created unique db key for forum_subscriptions
Due to race conditions in the function subscribe_user
it was possible to create duplicate forum subscriptions.
This lead to error messages, when displaying the list of
all subscriptions.
This patch removes all existing duplicate entries and
creates a unique db key to prevent this from happening in
the future.
2017-10-12 12:19:49 +08:00
Eloy Lafuente (stronk7) ca3c02b188 Merge branch 'MDL-60357-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-10-11 20:49:46 +02:00
Andrew Nicols 0be75ddb99 Merge branch 'MOODLE_33_STABLE_MDL-60276' of https://github.com/CengageEng/moodle into MOODLE_33_STABLE 2017-10-11 09:39:50 +08:00
Eloy Lafuente (stronk7) 795c5635e0 Merge branch 'MDL-60300-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-10-11 01:40:04 +02:00
Eloy Lafuente (stronk7) 91bc1d0983 Merge branch 'MDL-60346-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-10-11 01:13:33 +02:00
Eloy Lafuente (stronk7) 739d0e33dd Merge branch 'MDL-60364-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-10-11 01:00:37 +02:00
Juan Leyva 0f08e89988 MDL-60377 webservice: Format correctly text returned by WS 2017-10-10 15:12:37 +02:00
Damyon Wiese 564787c47b Merge branch 'MDL-59889-33' of git://github.com/Dagefoerde/moodle into MOODLE_33_STABLE 2017-10-10 13:22:04 +08:00
Adam Olley 3ff2f2d474 MDL-60320 icons: Use PNG icons as the preview thumbnails
Without this change, Moodle fails to provide any data when requesting a
thumbnail for a non-image file as its looking to provide a SVG file that
doesn't exist.
2017-10-10 09:57:41 +10:30
Eloy Lafuente (stronk7) d83185cfae Merge branch 'm33_MDL-60318_Undefined_method_file_storage-move_to_trash' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-10-09 23:12:08 +02:00
AMOS bot 9802346b16 Automatically generated installer lang files 2017-10-10 00:12:00 +08:00
Andrew Nicols 67a4191380 Merge branch 'MDL-60317_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-09 14:10:08 +08:00
Andrew Nicols 0e21a039da MDL-60373 core: Do not show title if there is no title 2017-10-09 12:36:33 +08:00
Jun Pataleta 645c3bdd64 MDL-60153 course_format: Remove irrelevant CSS styles
* The styles ".course-content ul.topics li.section .right img.icon" and
".course-content ul.weeks li.section .right img.icon" are now kind of
irrelevant and are causing course section action menu items in
Bootstrapbase to be rendered without spacing between the action menu
icon and the label.
2017-10-09 10:23:24 +08:00
Tim Lock be60d9e7f7 MDL-60153 theme_bootstrapbase: Fix align of edit section menu 2017-10-09 10:23:24 +08:00
Marina Glancy 96b04bdedc MDL-60314 navigation: fix overriding variable value 2017-10-09 10:19:28 +08:00
sam marshall a685402bd8 MDL-60357 core_search: Future modified times cause serious problems 2017-10-06 14:14:25 +01:00
Jan Dageförde 2d2f32f242 MDL-59889 oauth2: Remove check for storing new refresh token 2017-10-06 14:49:23 +02:00
Neill Magill 6bc6c40f5b MDL-60300 Quiz: Offline update time not set correctly 2017-10-06 13:33:20 +01:00
Neill Magill 598c974d46 MDL-60364 Web service: E_ERROR in course_check_updates web service
The error stated that course_check_updates() is undefined, this function
is in the course lib.php file.
2017-10-06 13:32:54 +01:00
sam marshall 1ba83f0d5a MDL-60346 core_search: Solr connection ignores proxy settings 2017-10-06 12:28:04 +01:00
Jake Dallimore 2ffd848807 weekly release 3.3.2+ 2017-10-06 14:34:39 +08:00
Jake Dallimore b5f9f77e4c Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-10-06 14:34:38 +08:00
Michael Spall 52d65d0970 MDL-60319 Google converter: Add html to convertible types
Add html files to the file types that Google can convert. This allows
the Google Drive converter to convert online submissions to pdf. This
fixes an issue where if online submissions is selected and the Google
Drive converter is used all conversions fail and produce a single
blank pdf. Credit to Peter Svec for the idea for this fix.
2017-10-05 08:13:34 -06:00
Jun Pataleta f46e46c174 Merge branch 'MDL-60352-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-05 16:16:47 +08:00
Andrew Nicols 3e2afb9d11 MDL-60352 calendar: Do not select original event for collection 2017-10-05 14:43:23 +08:00
Jake Dallimore 6b40b9182b Merge branch 'MDL-57228_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-04 13:43:27 +08:00
Eloy Lafuente (stronk7) 4a56b4efb5 Merge branch 'MDL-59882-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-10-03 20:52:04 +02:00
Eloy Lafuente (stronk7) e945953705 Merge branch 'MDL-60198-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-10-03 20:15:53 +02:00
AMOS bot a813ed0dd6 Automatically generated installer lang files 2017-10-04 00:10:33 +08:00
Andrew Nicols b278d32999 Merge branch 'MDL-60210-33-upgradecheck' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-10-03 10:33:32 +08:00
Matteo Scaramuccia accc87283a MDL-60318 filestorage: Fixed undefined method move_to_trash() 2017-10-02 23:03:20 +02:00
Tim Hunt b86bb7b4df MDL-60317 quiz reports: fix regression caused by MDL-57511 2017-10-02 18:24:51 +01:00
Andrew Nicols 7129db08e7 Merge branch 'MDL-58790_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-10-02 15:40:22 +08:00
Andrew Nicols 9ae3d44588 MDL-59882 behat: Update known uses of dialogue CSS 2017-10-02 12:49:34 +08:00
Andrew Nicols 176bb9eec3 MDL-59882 behat: Add newer modal type to selectors 2017-10-02 12:46:14 +08:00
Andrew Nicols f009ad959a Merge branch 'MDL-60306-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-10-02 10:17:25 +08:00
Jun Pataleta 5ef74b0c3d MDL-60306 calendar: Fix rrule_manager unit test
* The calculation of the expected date should depend on the comparison
with the start date's date and not it's exact timestamp.
2017-10-02 09:19:08 +08:00
ddelblanco d68208baa1 MDL-60276 LTI Content Item: does not populate tool url when https 2017-09-28 09:53:31 -07:00
AMOS bot 03152cd95c Automatically generated installer lang files 2017-09-29 00:06:02 +08:00
Juan Leyva ff2a8c5a18 MDL-60265 tool_mobile: Return sitepolicy in tool_mobile_get_config WS 2017-09-28 10:50:54 +02:00
Jake Dallimore d7bee96561 weekly release 3.3.2+ 2017-09-28 14:27:30 +08:00
Tim Lock 41fb3ea48f MDL-59843 mod_choice: Fix horizontal display mode
This re-implements the feature in the boost and bootstrap themes.
2017-09-28 12:30:27 +10:00
Eloy Lafuente (stronk7) 1eb29f17e3 Merge branch 'MDL-60243-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-27 20:48:39 +02:00
Jake Dallimore 7d1e74c3da Merge branch 'MDL-59780-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-09-27 13:43:42 +08:00
Ankit Agarwal 00479a197e MDL-59780 mathjax: Make sure mathjax url doesn't become empty 2017-09-27 09:15:16 +05:30
Jake Dallimore 91d9281330 MDL-60243 competencies: fix ordering bug in api_test unit test
list_user_competencies_to_review() orders by shortname, but the test
creates 2 user competencies with the same short name, resulting in
unpredictable results. This patch fixes that.
2017-09-27 09:23:20 +08:00
Eloy Lafuente (stronk7) 3f2082ef15 Merge branch 'MDL-59931_33_STABLE' of https://github.com/ctam/moodle into MOODLE_33_STABLE 2017-09-27 01:16:17 +02:00
Eloy Lafuente (stronk7) c953223f50 Merge branch 'MDL-59220-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-09-27 00:52:11 +02:00
Juan Leyva 7135925f9e MDL-60198 webservice: Add missing MOODLE_INTERNAL checks 2017-09-26 23:04:35 +02:00
Eloy Lafuente (stronk7) 156c08723d Merge branch 'MDL-59645-33-flickr' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-09-26 19:35:08 +02:00
Tim Hunt 2835d3c50d MDL-58790 quiz editing: translate hard-coded new heading string 2017-09-26 11:18:26 +01:00
Juan Leyva d6fee3b572 MDL-60233 mod_assign: Avoid HTML in the item field of external warnings
The item field is defined as PARAM_TEXT (no HTML tags allowed except
for multilang).
Using the s that add quotes to HTML characters we avoid potential Web
Services invalid parameters errors.
2017-09-26 12:13:31 +02:00
Andrew Nicols 76ed567062 Merge branch 'MDL-60141-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-09-26 15:48:07 +08:00
Jake Dallimore 70c7be1c93 Merge branch 'MDL-60121-multi-enrol-backup-MOODLE_33_STABLE' of https://github.com/mpetrowi/moodle into MOODLE_33_STABLE 2017-09-26 15:25:04 +08:00
Juan Leyva cb511fdfb6 MDL-60141 auth_email: Fix sitepolicy field type in get_signup_settings 2017-09-26 09:11:17 +02:00
Simey Lameze 2cb5968d25 MDL-60052 theme_bootstrapbase: proper handling of large modals 2017-09-26 11:20:26 +08:00
Andrew Nicols 2c9e28d2b8 Merge branch 'MDL-60052-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-09-26 09:40:30 +08:00
Andrew Nicols 620a05aa6a Merge branch 'MOODLE_33_STABLE' of https://github.com/ConnorSheremeta/moodle into MOODLE_33_STABLE 2017-09-26 09:26:10 +08:00
Eloy Lafuente (stronk7) 7969d430e1 Merge branch 'MDL-59505-33-gdrive' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-09-26 01:25:53 +02:00
Carson Tam 421a17f2a9 MDL-59931 mod_quiz: Fixing incorrect pagination count. 2017-09-25 12:49:29 -07:00
Eloy Lafuente (stronk7) abf2bf0175 Merge branch 'wip-MDL-60167-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-09-25 20:19:26 +02:00
Shamim Rezaie 0243d08185 MDL-57228 quiz editing: unit test for the move case 2017-09-25 12:55:01 +01:00
Tim Hunt 06a850c19e MDL-57228 quiz: fix editing when there are one-question sections
Fix based on a patch by Joost van der Borg <j.van.der.borg@ssr.nl>.
2017-09-25 12:55:00 +01:00
Marina Glancy 1ce18b558b MDL-60167 upgrade: Fix duplicate site registrations 2017-09-24 18:51:12 +08:00
Dan Poltawski 2f0bd18ad9 weekly release 3.3.2+ 2017-09-22 12:43:18 +01:00
Dan Poltawski fdf3d9bda5 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-09-22 12:43:17 +01:00
David Mudrák a89500f81f MDL-60210 admin: Check if the site needs upgrade on admin/search.php too
The page admin/search.php is the default administration page in Boost
based themes. It should behave the same as admin/index.php or
my/index.php and check if the site needs upgrade.
2017-09-22 13:18:24 +02:00
Jun Pataleta 1a3a805c57 Merge branch 'MDL-37810-33-fix' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-22 10:54:51 +08:00
Ryan Wyllie aecfdf39dd MDL-60052 javascript: fix large styling for modals 2017-09-22 10:00:02 +08:00
Damyon Wiese 1595d0d44f MDL-59220 setuplib: Redirect on https mismatch
When the wwwroot indicates https support and a page is accessed over http,
redirect to the wwwroot. This is a better experience than displaying an error.

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

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

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

* Does not attempt to guess the photo URL any more. Instead uses
  url_sq and url_o extras of the flickr.photos.search call.
* The photos.search does not return the information about the photo size
  so we set it to null (previously was returned as 'unknown' which made
  it be displayed as zero).
* Does not perform additional API request to obtain the manage URL, uses
  https://www.flickr.com/photos/organize instead.
2017-09-19 14:39:42 +02:00
David Mudrák 46ca89ea8b MDL-59645 oauth1: Implement a new simple Flickr API client
Flickr has switched over to OAuth 1.0 based authentication. This is a
simple client allowing Moodle to perform authenticated calls to the
Flickr API.
2017-09-19 14:39:42 +02:00
David Mudrák 54525dd238 MDL-59645 oauth1: Improve reporting of token errors
Provide a more meaningful error message and debuginfo allowing to
diagnose what is going on. In case of flickr, this is typically thrown
when flickr API responses with their "bad, bad panda" HTML page instead
of the expected reply.
2017-09-19 14:39:42 +02:00
David Mudrák fde6b9ef06 MDL-59645 oauth1: Pass oauth_callback only to obtain the request token
As per the oauth1 spec, the oauth_callback is supposed to be passed only
when obtaining the initial request token. The client used to append it
automatically to all requests which broke the request signature.
2017-09-19 14:39:42 +02:00
Matt Petro ae8ce02b74 MDL-60121 enrol: Fix enrol plugin backup
Allow more than one enrol plugin to add backup structure.
2017-09-19 07:07:21 -04:00
Jun Pataleta cacef68723 Merge branch 'MDL-60048-33' of https://github.com/Kathrin84/moodle into MOODLE_33_STABLE 2017-09-19 17:21:25 +08:00
Dan Poltawski 843f487c22 Merge branch 'MDL-60018-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-09-19 07:28:07 +01:00
Eloy Lafuente (stronk7) eb0019a7ac Merge branch 'MDL-60105_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2017-09-19 01:56:45 +02:00
Eloy Lafuente (stronk7) 84ecc2a5eb Merge branch 'MDL-52131-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-09-19 01:53:33 +02:00
Eloy Lafuente (stronk7) 920fe36776 Merge branch 'MDL-37810-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-19 01:48:14 +02:00
Eloy Lafuente (stronk7) aa05704599 Merge branch 'MDL-53244_33_STABLE' of git://github.com/Chocolate-lightning/moodle into MOODLE_33_STABLE 2017-09-19 01:43:25 +02:00
Jake Dallimore bbb818a6e1 MDL-37810 roles: added manager case to test_get_user_roles_in_course()
Managers can assign managers, and should be able to see that role on
the course profile page, as a link to the participants page.
2017-09-18 10:21:07 +08:00
Jun Pataleta b5c6c217d9 Merge branch 'MDL-59994-33-v2' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-09-18 09:10:04 +08:00
Jake Dallimore 71d5abb422 MDL-37810 roles: get_user_roles_in_course returns all relevant roles
Fixed to return both those roles in the profileroles site policy and
any roles which the current user can assign in the respective context,
meaning a user can see a link to any role they can assign.
2017-09-18 09:00:31 +08:00
Jake Dallimore a8f69dbed0 MDL-37810 roles: unit tests for get_profile_roles() 2017-09-18 09:00:31 +08:00
Jake Dallimore 12ede4f87f MDL-37810 roles: fix get_profile_roles() so it returns assignable roles 2017-09-18 09:00:31 +08:00
Simey Lameze f2fc4bccf4 MDL-59994 competency: improve user competency unit test 2017-09-18 08:33:03 +08:00
Simey Lameze 486a9a4d9b MDL-59994 competency: dont list competencies from deleted users 2017-09-18 08:33:03 +08:00
Dan Poltawski 50126511aa weekly release 3.3.2+ 2017-09-15 08:49:29 +01:00
Dan Poltawski 766a2d3364 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-09-15 08:49:28 +01:00
Kathrin Osswald e95beb73b9 MDL-60048 theme_boost: Center logo within the navbar
My solution is to remove the padding that's added within scss/bootstrap/_navbar.scss (line 72)
for the case that a logo (has-logo) is uploaded and displayed within the navbar.
Removing this padding will center the image within the navbar.
2017-09-14 13:51:05 +02:00
Juan Leyva 308bf50e76 MDL-60132 tool_mobile: Handle correctly moodle_url instances
In Moodle there are some functions that can be overridden by themes.
Some themes are returning incorrect value types in those functions
2017-09-14 12:17:56 +02:00
Juan Segarra Montesinos 2352074dc0 MDL-52131 qbehaviour: respect manualcomment format
The format of a manual comment in a question is respected when
the preferred editor is "Plain text area".
2017-09-14 13:31:15 +08:00
Matt Clarkson 3ee0495c62 MDL-60105 mod_folder: Set timemodified on change
Changes to the folder contents were not resulting in the
timemodied of the folder activity being set. This prevented
global search from picking up the changes.
2017-09-13 13:53:29 +02:00
Matt Clarkson d2d9e5a864 MDL-60105 search: Fix fatal error
If an indexed file has been modified or deleted the search index
will still reference the old file. Remove the file from search
results until the change has been indexed.
2017-09-13 13:53:28 +02:00
AMOS bot 6c581c9648 Automatically generated installer lang files 2017-09-13 00:06:45 +08:00
Dan Poltawski 9da6b92faf Merge branch 'MDL-60039_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2017-09-12 11:24:20 +01:00
David Monllao 0d27d706c6 MDL-60039 search: Force messaging search areas to be reindexed 2017-09-12 11:59:13 +02:00
David Monllao 2e35af9cc2 MDL-60039 messaging: global search index using timeread 2017-09-12 11:57:34 +02:00
Dan Poltawski bd50f5f555 Merge branch 'MDL-59929_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-09-12 10:56:01 +01:00
Eloy Lafuente (stronk7) edb25d4f25 Merge branch 'MDL-60086-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-09-12 09:56:31 +02:00
David Monllao fc24fb7af0 Merge branch 'MDL-59399-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-09-12 08:12:37 +02:00
David Monllao bd1e060c8f Merge branch 'MDL-59867-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-09-12 07:11:03 +02:00
David Monllao e79467c0d8 Merge branch 'MDL-59879-33' of https://github.com/abias/moodle into MOODLE_33_STABLE 2017-09-12 07:04:45 +02:00
Jake Dallimore 822ccfdb31 MDL-60086 travis: Bumping the postgres version to 9.6
3.2 was bumped to 9.6, this makes the change across the board.
2017-09-12 09:35:23 +08:00
Eloy Lafuente (stronk7) f69b9181c6 Merge branch 'MDL-59478-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-09-12 00:23:54 +02:00
Eloy Lafuente (stronk7) 9e5ae58959 Merge branch 'wip-MDL-59808-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-09-12 00:13:43 +02:00
Eloy Lafuente (stronk7) e3db987f32 Merge branch 'MDL-60025-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-09-11 23:50:54 +02:00
Dan Poltawski 1298a03670 Merge branch 'MDL-35849-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-09-11 14:19:49 +01:00
Jun Pataleta 67d18f8804 Merge branch 'MDL-60031-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-09-11 13:57:10 +08:00
Jun Pataleta 5383687f30 Merge branch 'wip-MDL-55849-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-09-11 13:27:50 +08:00
Adrian Greeve 9a1d82de52 MDL-55849 mod_assign: Behat update for group submission reopening. 2017-09-11 12:43:09 +08:00
Adrian Greeve 5a469543b0 MDL-55849 mod_assign: Reopening assignments only increases by one.
Group assignments when being reopened will only increase the
attempt total by one.
2017-09-11 12:43:08 +08:00
Eloy Lafuente (stronk7) 3d77676d51 Moodle release 3.3.2 2017-09-09 22:48:09 +02:00
Mathew May c92f6d056a MDL-53244 login: Add error message for recaptcha 2017-09-08 13:03:49 +12:00
David Monllao 491ebf2b10 weekly release 3.3.1+ 2017-09-07 11:39:09 +02:00
Eloy Lafuente (stronk7) 00c0582729 Merge branch 'MDL-59983-33-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-09-07 11:01:11 +02:00
David Mudrák dd2d372477 MDL-59969 admin: Warn admins if a development libs directory exists
We can't really control the direct web access to directories in dirroot,
that is part of the server setup. So we at least warn admins as they may
not realize the risks of having directories like vendor or node_modules
exposed.

Credit goes to Petr Škoda for mentioning the PHPUnit issue CVE-2017-9841
to me.
2017-09-07 11:01:11 +02:00
Marina Glancy 290b3a6095 MDL-59972 mod_feedback: escape subject when showing the contact form 2017-09-07 11:01:10 +02:00
Jake Dallimore 8c8139d093 MDL-58953 user: additional test case for user_can_view_profile() 2017-09-07 11:01:10 +02:00
Jake Dallimore 5968db869a MDL-58953 user: fix course checking logic in user_can_view_profile()
Make sure to check that $user in enrolled in $course before checking
whether the current user has capabilities in that course, and make sure
that we don't check user context caps when handling a specific course.
2017-09-07 11:01:09 +02:00
Simey Lameze a6acc25b38 MDL-59776 core_calendar: unit tests of module events deletion 2017-09-07 11:01:09 +02:00
Simey Lameze 233d271a91 MDL-59776 core_calendar: prevent deletion of module events 2017-09-07 11:01:09 +02:00
Juan Leyva 2da5effd17 MDL-58762 core: Get full course objects on navigation
The course object passed as parameter to extend_navigation_user
callback contained only a few parameters, some parameters like
showgrades or showreports were missing.
The callback should receive a full course object.
2017-09-07 11:01:08 +02:00
Juan Leyva 2dca45d720 MDL-58762 report: Check group permissions in course user reports
Teachers were able to see any student report even with forced separated
groups and capability moodle/course:accessallgroups off.
2017-09-07 11:01:08 +02:00
Jun Pataleta e217354c8b Merge branch 'm33_MDL-59635_Properly_Escape_Column_Names_Reserved_Words_Proof' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-09-07 11:01:07 +02:00
Eloy Lafuente (stronk7) eafcaa4e41 Merge branch 'MDL-59696-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-09-07 11:01:06 +02:00
Eloy Lafuente (stronk7) 8ae7ad0294 Merge branch 'MDL-59198-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-09-07 11:01:05 +02:00
David Monllao aed06e3b9d MDL-59768 unittest: Remove references to unexisting method 2017-09-07 11:01:05 +02:00
David Monllao 064739b3df Merge branch 'wip-MDL-59768-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-09-07 11:01:05 +02:00
David Monllao e9e0083e30 Merge branch 'MOODLE_33_STABLE-MDL-59799' of https://github.com/jojoob/moodle into MOODLE_33_STABLE 2017-09-07 11:01:04 +02:00
Dan Poltawski 69bcff98e2 Merge branch 'wip-MDL-59992-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-09-07 11:01:04 +02:00
David Monllao 35f2a315a0 Merge branch 'wip-MDL-59815-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-09-07 11:01:03 +02:00
David Monllao cf6d37c10a Merge branch 'MDL-59846-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-09-07 11:01:03 +02:00
Dan Poltawski 1b9cafb3e8 Merge branch 'MOODLE_33_STABLE-MDL_59834-Indexing_of_personal_messages' of https://github.com/mattporritt/moodle into MOODLE_33_STABLE 2017-09-07 11:01:02 +02:00
David Monllao 42b8955e28 Merge branch 'wip-MDL-59898-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-09-07 11:01:02 +02:00
David Monllao 3909dc6316 Merge branch 'MDL-59963_33-report-logs-origin-pagination' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-09-07 11:01:01 +02:00
Damyon Wiese 1f672ef01b MDL-59867 autocomplete: Prevent duplicate ids.
Rendering a form with 2 autocompletes in it can get messed up because of duplicated ids.
2017-09-07 09:33:09 +08:00
Marina Glancy 50464573be MDL-59808 webservice_rest: comply with restformat argument 2017-09-07 08:34:49 +08:00
Juan Leyva 2f373db92b MDL-60025 mod_book: Return correct values for chapters update time
Instead returning the time when the chapter was created or modified we
were returning the time when the book was created or modified.
2017-09-06 12:38:27 +02:00
Juan Leyva 0272abac15 MDL-60018 mod_chat: Fix chatmethod field type in get_chats_by_courses WS 2017-09-06 12:16:33 +02:00
Marina Glancy 65bad3744d MDL-60033 webservice_xmlrpc: extra escaping in the server URL 2017-09-06 13:44:16 +08:00
Ryan Wyllie 8c4508ffb5 MDL-59399 atto: make media plugin shortform explandable 2017-09-06 05:28:03 +00:00
Andrew Nicols 5188941881 MDL-60031 admin: Move risk longtext to pix title 2017-09-06 10:24:11 +08:00
Helen Foster ae1980d5d3 MDL-59983 lang: Merge English strings from the en_fix language pack
Significant string change:

* custommenuitems_desc in tool_mobile - improved wording
2017-09-05 11:03:28 +02:00
Ankit Agarwal f8da314e59 MDL-35849 login: Add role alert to error messages
Error messages should be prominent to screen readers as well as visual users,
adding the role alert is recommended way to achieve it for screen readers and this is
also what we do for ->notification apis
2017-09-05 12:50:14 +05:30
Matteo Scaramuccia 1c741c25c4 MDL-59635 tool_replace: Escape the column name. 2017-09-04 13:36:41 +02:00
Matteo Scaramuccia 7e05307cdf MDL-59635 ddl: Added test_get_enc_quoted(). 2017-09-04 13:36:41 +02:00
Jun Pataleta 26c37c0024 MDL-59696 theme_bootstrapbase: Set max-width for custom-select elements
* Set custom-select elements with a maximum width of 100% of their
container.
2017-09-04 10:12:06 +08:00
Jun Pataleta e3cd9de694 MDL-59696 templates: Remove form-group div for url-select template
* Removed the div with the class 'form-group' that's enclosing the
select element and friends. It's not needed since the urlselect template
is an inline form.
* Also, for completeness, I added the helpicon data for the template's
context.
2017-09-04 10:12:06 +08:00
Tobias Garske 29786b259a MDL-59898 access: Added Icon references. 2017-09-04 09:55:59 +08:00
Simey Lameze 2fb9bb8eac MDL-59846 core_calendar: add styling to action link 2017-09-04 08:40:22 +08:00
Matt Porritt e396e62df5 MDL-59834 Global Search: Indexing user messages
Make indexing of user messages tolerant to user deletion.
When creating the search document for user messages,
add a check to see if the user has been deleted in the
system. If they have been deleted abort creating the search
document.
This is to avoid rasining an error when trying to get the
user context for a deleted user.
2017-09-04 09:18:34 +10:00
Johannes Burk 55a0d1d09a MDL-59799 course: Include course/lib.php before using move_courses(). 2017-09-01 16:45:49 +02:00
Luca Bösch e024daa740 MDL-59963 reports: origin parameter looked at in log reports 2017-09-01 11:50:03 +02:00
Luca Bösch 8c08dca80e MDL-53936 reports: State default index page explicitly in pagination url 2017-09-01 11:49:25 +02:00
Jun Pataleta 77a6a09950 weekly release 3.3.1+ 2017-09-01 13:27:03 +08:00
Jun Pataleta 458f8d8d63 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-09-01 13:27:01 +08:00
Andrew Nicols c7b53f80a6 Merge branch 'MDL-56646-33-fix' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-08-31 15:00:39 +08:00
John Okely 0fe8062c08 MDL-56646 mod_assign: Improve grade fix strings 2017-08-31 14:46:47 +08:00
John Okely 41982ebc63 MDL-56646 mod_assign: Make rescale behat more specific 2017-08-31 14:46:38 +08:00
Marina Glancy fceada2c4e MDL-59768 tasks: schedule task only if it is not scheduled 2017-08-31 14:34:59 +08:00
Marina Glancy a13ecae829 MDL-59992 webservice: fix debugging message event context already set 2017-08-31 12:14:13 +08:00
Eloy Lafuente (stronk7) 2261278338 Merge branch 'MDL-59927-33-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-08-30 11:06:03 +02:00
Peter Spicer 84dc1b0d17 MDL-59815 access: Fix definition of risks for user:delete. 2017-08-30 11:38:21 +08:00
Connor Sheremeta 2479e3742b MDL-54540 lti: Add allowfullscreen attribute to LTI IFrames 2017-08-29 13:48:19 -06:00
Helen Foster b7799e2da3 MDL-59927 lang: Merge English strings from the en_fix language pack
Significant string changes:

- firstpagetitle_help,mod_wiki - improved wording
- completionicons_help,core_completion - removing confusing sentence
  about the tick being optional
2017-08-29 15:42:22 +02:00
Dan Poltawski b3abfa22e0 Merge branch 'MDL-59195_assign_comment_permissions_33' of git://github.com/davosmith/moodle into MOODLE_33_STABLE 2017-08-29 11:55:15 +01:00
Jun Pataleta 733222c626 Merge branch 'MDL-59908-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-08-29 17:42:05 +08:00
Andrew Nicols f26fc77aac Merge branch 'MDL-56646-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-08-29 15:51:44 +08:00
Andrew Nicols 23a2f3eaac Merge branch 'MDL-59820-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-08-29 15:27:26 +08:00
John Okely 127992bfaf MDL-56646 assign: Fix negative grades in restore 2017-08-29 07:15:08 +00:00
John Okely 76eefdded3 MDL-56646 assign: Add ability to fix errant grades 2017-08-29 07:15:08 +00:00
Jun Pataleta c71370fe69 Merge branch 'MDL-59885-33' of git://github.com/cameron1729/moodle into MOODLE_33_STABLE 2017-08-29 14:48:15 +08:00
Ankit Agarwal 3458f178a9 MDL-59198 lti: Make params LTI2 compatible
LTI2 recommends to include both upper case and lower case of custom params.
This patch makes our implementation confer to that standard.
2017-08-29 11:43:38 +05:30
Andrew Nicols bd90cb526f Merge branch 'MDL-35290-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-08-29 13:15:01 +08:00
Jun Pataleta 7d753e1403 Merge branch 'MDL-59855-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-08-29 11:45:42 +08:00
Jun Pataleta 8ab8763d47 MDL-59855 oauth2: More PHPDocs fixes
* Fix PHPDoc return type for api::get_system_account()
* Fix PHPDoc for the $contenttype parameter in \core\oauth2\rest::call()
2017-08-29 11:19:32 +08:00
Jan Dageförde c9e2c1b44c MDL-59855 oauth2: Fix PHPDoc type hints 2017-08-29 11:19:32 +08:00
Jake Dallimore 67fa4b55b9 MDL-35290 files: File manager reports files which can't be read 2017-08-29 11:14:46 +08:00
Jun Pataleta 6223245206 Merge branch 'MDL-59869-33' of git://github.com/Dagefoerde/moodle into MOODLE_33_STABLE 2017-08-29 10:43:29 +08:00
Eloy Lafuente (stronk7) f668ffe97a Merge branch 'MDL-59887-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-08-29 01:37:01 +02:00
Eloy Lafuente (stronk7) 888a005fa4 Merge branch 'MDL-59870_33-participants-th-top-vertical-aligned' of http://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-08-29 00:54:39 +02:00
AMOS bot ee0f446169 Automatically generated installer lang files 2017-08-29 00:07:56 +08:00
John Okely ef2c635fdc MDL-56646 assign: Don't rescale any negative grades 2017-08-28 07:28:21 +00:00
John Okely f847ce94c9 MDL-56646 assign: Behat test rescaling after viewing student 2017-08-28 07:28:21 +00:00
Jun Pataleta 41c4762440 Merge branch 'wip-MDL-59708-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-08-28 15:02:11 +08:00
AMOS bot 924290eb14 Automatically generated installer lang files 2017-08-28 00:09:31 +08:00
Jan Dageförde 18264ac63d MDL-59869 oauth2: Fix notification method 2017-08-26 15:41:56 +02:00
Jan Dageförde a671402655 MDL-59869 oauth2: Send expiry notification on exceptions, too 2017-08-26 15:41:56 +02:00
AMOS bot d26dd29aa3 Automatically generated installer lang files 2017-08-26 00:07:17 +08:00
Jun Pataleta 8c49ddd994 MDL-59478 mod_scorm: Fix setting of default completion rule 2017-08-25 20:06:54 +08:00
Eloy Lafuente (stronk7) 42ae181f6c Merge branch 'wip-MDL-59881-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-08-25 00:59:57 +02:00
Luca Bösch 3e84f0e262 MDL-59870 users: Default align participant table header row.
Instead of putting vertical-align: middle as indication for participants table
headers, none is set which leads to theme default, i.e. bottom in Clean and Boost.
2017-08-25 00:12:17 +02:00
AMOS bot 1dabdae506 Automatically generated installer lang files 2017-08-25 00:05:39 +08:00
AMOS bot cbbd71bdb6 Automatically generated installer lang files 2017-08-25 00:05:39 +08:00
Tim Hunt abb4e64e37 MDL-59929 signup: inprove usability when duplicate email entered 2017-08-24 16:33:15 +01:00
Eloy Lafuente (stronk7) af129014b1 weekly release 3.3.1+ 2017-08-24 14:14:27 +02:00
Ankit Agarwal 316446e5b3 MDL-59908 backup: Backup rule should use both http and https schemes 2017-08-24 11:33:53 +05:30
Ankit Agarwal 3a5f11af69 MDL-59908 backup: Add tests to make sure both http(s) schemes are parsed 2017-08-24 11:33:53 +05:30
Simey Lameze 16434faf50 MDL-59887 block_myoverview: dont escape course and module names 2017-08-24 10:42:58 +08:00
Eloy Lafuente (stronk7) ab5d142ff3 Merge branch 'MDL-59790-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-08-23 11:35:43 +02:00
Andrew Nicols e7294cf68e Merge branch 'MDL-57412-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-08-23 16:56:54 +08:00
John Okely a4b061580b MDL-57412 adminlib: change linkcoursesections default to 1 2017-08-23 15:08:14 +08:00
John Okely a73d721669 MDL-57412 upgrade: Set linkcoursesections to 1 if boost in use 2017-08-23 15:08:14 +08:00
Simey Lameze 50fa49c852 MDL-59790 core: fix tooltip for pie chart 2017-08-23 12:28:10 +08:00
Jun Pataleta 19c75ebc5f Merge branch 'MDL-59784-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-08-23 10:48:00 +08:00
Andrew Nicols d7b6c78b7d MDL-59784 core: Check for non-promises rather than string
If a malformed value was passed, it may be that we can still display it.
We should not assume that, if a string is not passed, that we are
dealing with a promise.
2017-08-23 10:30:29 +08:00
Jun Pataleta 1a451df26c Merge branch 'MDL-59797-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-08-23 10:06:21 +08:00
Andrew Nicols 536566efaf Merge branch 'MDL-51827_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-08-23 09:38:32 +08:00
Simey Lameze 883755af77 MDL-59797 core_course: dont escape module and section names 2017-08-23 09:21:04 +08:00
Eloy Lafuente (stronk7) f434892cb6 Merge branch 'MDL-59663-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-08-22 21:03:49 +02:00
Tim Hunt 90984ae3b5 MDL-51827 account confirm: take users to their dashboard
This is an old bit of UI inconsistency. For some reason it used to take
people to the list of all courses. Given modern Moodle usability
conventions, that does not really make sense any more.
2017-08-22 14:34:38 +01:00
Eloy Lafuente (stronk7) a35a27e819 Merge branch 'MDL-59784-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-08-22 12:28:44 +02:00
Andrew Nicols 69c4972afb Merge branch 'MDL-59826-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-08-22 15:57:27 +08:00
Andrew Nicols 9ca48527aa Merge branch 'MDL-59825-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-08-22 15:27:29 +08:00
Jun Pataleta ef55758462 Merge branch 'MDL-57775-33-xmlrpc' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-08-22 15:00:14 +08:00
Andrew Nicols 22b3c71aa3 Merge branch 'MDL-59893-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-08-22 14:32:05 +08:00
Simey Lameze 60e1659fba MDL-59820 core_calendar: remove unnecessary css class 2017-08-22 13:01:54 +08:00
Jake Dallimore 9bae6bc2d6 MDL-59893 assign: don't prefix file links when downloading as folders
Change to download_rewrite_pluginfile_urls() ensuring prefix isn't
added to file links when downloading with the  downloadasfolders
user preference set to true. Links to files in onlinetext now work
when downloading as folders.
2017-08-22 12:58:14 +08:00
Jake Dallimore cb7cf012f6 MDL-59893 assign: fixes for groupname prefix when downloading
assign->download_submissions():
- groupname now only added to zip file name if not empty, fixing a
double hyphen bug in the file name.
assign->download_rewrite_pluginfile_urls():
- groupname is now correctly determined using get_submission_group()
instead of using groups_get_activity_group() which fails when there
is no active activity group set. Uses the same logic that
download_submission() uses to prefix file names. Fixes a bug where an
empty groupname prefix was generated, resulting in broken links.
2017-08-22 12:58:07 +08:00
Andrew Nicols 030923e487 Merge branch 'MDL-57246-33-forumredirect' of git://github.com/roperto/moodle into MOODLE_33_STABLE 2017-08-22 12:29:24 +08:00
Adrian Greeve 3298e737cf MDL-59881 question bank: Use supplied function parameters.
question_usage_by_activity::start_all_questions now uses all
three of the parameters that are defined.
2017-08-22 09:32:57 +08:00
Eloy Lafuente (stronk7) 2cb47a734f Merge branch 'MDL-55937-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-08-21 23:21:47 +02:00
Eloy Lafuente (stronk7) f688c1f8f4 Merge branch 'MDL-59049-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-08-21 23:09:18 +02:00
Davo Smith 0d5f10d1ff MDL-59195 mod_assign: add behat tests for comments error 2017-08-21 10:25:31 +01:00
Davo Smith 0ef74b27be MDL-59195 assignsubmission_comments: fix permission checks 2017-08-21 10:25:31 +01:00
Alexander Bias 591ff7634d MDL-59879 navigation: Add node key to competencies navigation node 2017-08-21 10:59:00 +02:00
Cameron Ball 345d2486fc MDL-59885 assignfeedback_editpdf: Correctly report combination status 2017-08-21 16:23:19 +08:00
John Okely 22efbe807d MDL-57412 course: Unit test get_view_url for course formats 2017-08-21 12:55:31 +08:00
John Okely 6f3e403a28 MDL-57412 navigationlib: Respect linkcoursesections again 2017-08-21 12:55:30 +08:00
Jun Pataleta b24ffdb774 MDL-59663 course: Render the appropriate course-category tree action 2017-08-21 10:02:13 +08:00
Eloy Lafuente (stronk7) d17e000f45 Merge branch 'MDL-59836-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-08-18 12:36:28 +02:00
Jake Dallimore 01d058a037 MDL-59825 user: user_can_view_profile() checks all of a $user's courses
This function used to check only those courses shared by both users
when it should have been checking all courses in which $user is
enrolled. Managers can view a user's course profile without necessarily
sharing the course (being enrolled in) with the $user.
2017-08-18 11:37:10 +08:00
Jun Pataleta 214ddb8c0f MDL-59836 core_amd: Use only one input event handler
* We have duplicate input event handlers for the autocomplete element
which are both firing when the input element's value is being set.
In case an AJAX handler is defined for the autocomplete suggestions,
this causes the autocomplete suggestions so show "No suggestions" first
and then load the results from the AJAX handler a little bit later.
2017-08-18 11:37:07 +08:00
Jake Dallimore 5fe2965cab MDL-59826 output: make context_header() aware of page context.
There are times, such as when viewing a user profile within a course,
when user_can_view_profile() should be passed a course to force it to
restrict its capability checks to only the supplied course. This change
makes sure that core_renderer->context_header() calls this correctly.
2017-08-18 11:32:16 +08:00
Andrew Nicols 1896e257aa MDL-59784 core: Modal factory should listen before fetching templates 2017-08-18 11:17:04 +08:00
Andrew Nicols 5607739ed7 MDL-59784 core: Modal should accept title as a promise 2017-08-18 11:17:04 +08:00
Jake Dallimore 749057c529 MDL-59049 badges: allows users to view badges from deleted courses 2017-08-18 10:52:02 +08:00
Andrew Nicols 6fd7ea810b MDL-59784 core: Refactor addblock to listen earlier 2017-08-18 09:37:45 +08:00
Eloy Lafuente (stronk7) 1c6106e8a8 weekly release 3.3.1+ 2017-08-17 10:39:27 +02:00
Eloy Lafuente (stronk7) f091016984 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-08-17 10:39:25 +02:00
AMOS bot b5d7bd720b Automatically generated installer lang files 2017-08-17 00:08:33 +08:00
Eloy Lafuente (stronk7) a462338e1b Merge branch 'MDL-58435-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-08-15 16:35:35 +02:00
David Mudrák e6512e910f MDL-57775 xmlrpc: Formal fix of coding style and phpdocs
- There was missing MOODLE_INTERNAL check.
- The client is not used for unit tests only so the class description
  was obsolete.
2017-08-15 14:16:58 +02:00
David Mudrák bfad177b5d MDL-57775 xmlrpc: Test webservice_xmlrpc_client request encoding
The patch wraps the underlying xmlrpc_encode_request() call into a
standalone method that can be then unit-tested.
2017-08-15 14:11:16 +02:00
David Mudrák e70a466017 MDL-57775 xmlrpc: Pass escaping to xmlrpc_encode_request() calls
This patch adds the missing 'escaping' option to all remaining
xmlrpc_encode_request() calls in the moodle core code.

Without this, the xmlrpc_decode_request() call on the server side may
lead to wrongly decoded non-ascii characters.
2017-08-15 13:42:08 +02:00
Eloy Lafuente (stronk7) 9aed01738e Merge branch 'MDL-59667-33-2' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-08-15 13:13:12 +02:00
Neill Magill 72d8a09e09 MDL-58435 behat: Update existing tests to use section editing steps 2017-08-15 09:29:30 +01:00
Ankit Agarwal 9bece224f9 MDL-55937 assign: Check for group submission caps when userid=0 2017-08-15 11:15:43 +05:30
Andrew Nicols e01475d537 Merge branch 'MDL-59746-33' of git://github.com/Dagefoerde/moodle into MOODLE_33_STABLE 2017-08-15 13:40:44 +08:00
Jun Pataleta 9db556dc6a Merge branch 'MDL-57611-moodle33' of https://github.com/jebarviabb/moodle into MOODLE_33_STABLE 2017-08-15 11:50:24 +08:00
gthomas2 c83f37600a MDL-59708 file: Add CUD callbacks, backport of MDL-57476 2017-08-15 09:46:48 +08:00
Ryan Wyllie 1bda7d963a MDL-59667 form: stop datepicker from rendering outside viewport
Stop the date picker panel from being rendered outside of the
viewport, for example when being displayed in a modal.
2017-08-15 01:25:50 +00:00
Jun Pataleta 5596bad458 Merge branch 'MDL-59785-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-08-14 16:56:42 +08:00
Jun Pataleta 8a5e5ce049 Merge branch 'MDL-59740_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-08-14 13:48:16 +08:00
Andrew Nicols 9adeff603a Merge branch 'wip-MDL-57188-33-2' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-08-14 13:15:58 +08:00
Andrew Nicols 1fc0f4e340 Merge branch 'MDL-59737_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-08-14 12:26:48 +08:00
Jun Pataleta 2564f4989f Merge branch 'MDL-59492-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-08-14 12:16:26 +08:00
Simey Lameze 349508d9cc MDL-59492 block_myoverview: make view course buttons consistent 2017-08-14 11:58:58 +08:00
Simey Lameze bcc8cb63b9 MDL-59492 block_myoverview: fix remaining course links visibility 2017-08-14 11:58:58 +08:00
Charles Fulton 51cd49be15 MDL-59492 block_myoverview: handle course visibility style 2017-08-14 11:58:58 +08:00
Simey Lameze 7f1e907a7e MDL-59785 mod_book: all navigation styles must mark as completed 2017-08-14 11:43:50 +08:00
Eloy Lafuente (stronk7) 14b7a15960 Merge branch 'MDL-59741-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-08-14 02:36:51 +02:00
AMOS bot ec76694054 Automatically generated installer lang files 2017-08-14 00:08:34 +08:00
Josh Ebarvia 271f309e91 MDL-57611 report_log: Fix capability checks for viewing logs 2017-08-11 13:05:48 +09:30
David Monllao 65097503ac weekly release 3.3.1+ 2017-08-10 09:11:35 +02:00
David Monllao 8e13a950fc NOBUG: Fixed SVG browser compatibility 2017-08-10 09:11:34 +02:00
Neill Magill 2ba469aaa3 MDL-58435 behat: Behat section editing step should work on section 0 2017-08-09 15:22:59 +01:00
Marina Glancy 5568ad4923 MDL-57188 course: correct return url to manage page 2017-08-08 14:49:16 +08:00
Andrew Nicols 7650988974 Merge branch 'MDL-59666-33-fix' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-08-08 12:55:19 +08:00
Jun Pataleta d95b923ed3 MDL-59666 mod_assign: Disable remind to grade by field in override tests 2017-08-08 12:38:35 +08:00
Jan Dageförde cc85a41175 MDL-59746 oauth2: urlencode parameters for post requests 2017-08-07 22:23:46 +02:00
Eloy Lafuente (stronk7) e9cd408e25 Merge branch 'MDL-59506-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-08-07 19:55:26 +02:00
Eloy Lafuente (stronk7) 53003974f3 Merge branch 'MDL-59504-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-08-07 19:19:48 +02:00
Dan Poltawski 587a8af21c Merge branch 'MDL-59172-33' of https://github.com/snake/moodle into MOODLE_33_STABLE 2017-08-07 16:20:14 +01:00
David Monllao a8f61169c6 Merge branch 'MDL-59642-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-08-07 14:41:40 +02:00
Mark Nelson f925fa4d6b MDL-59740 core_form: add ability to specify if a button is primary 2017-08-07 17:38:18 +08:00
Mark Nelson f5c8b599c3 MDL-59737 core_backup: changed reference to domain doesntexist.com 2017-08-07 17:18:37 +08:00
Juan Leyva c7ebab9725 MDL-59741 auth: Always check the type of iconurls
We need to check always if iconurl is an instance of moodle_url to
avoid Web Services returning iconurls from identity providers to fail.
2017-08-07 11:03:01 +02:00
Dan Poltawski e16710f3c5 Merge branch 'MDL-59666-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-08-07 09:32:08 +01:00
David Monllao a33d238648 Merge branch 'MDL-59532-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-08-07 09:42:17 +02:00
David Monllao f36eb9d982 Merge branch 'MDL-59644-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-08-07 09:34:42 +02:00
David Monllao 5d407594f2 Merge branch 'wip-MDL-59655-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-08-07 09:27:52 +02:00
David Monllao e8f932a0fd Merge branch 'wip-MDL-59055-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-08-07 09:22:00 +02:00
Andrew Nicols 4d7df0162e Merge branch 'MDL-51745-moodle33' of https://github.com/jebarviabb/moodle into MOODLE_33_STABLE 2017-08-07 14:48:20 +08:00
Josh Ebarvia b7acf0aaf7 MDL-51745 mod_lesson: Use format_text in response feedback 2017-08-07 15:48:40 +09:30
Andrew Nicols 235742c624 Merge branch 'MDL-59662_33-errors-typo' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-08-07 13:35:20 +08:00
Andrew Nicols 05f9a38375 Merge branch 'MDL-59698-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-08-07 12:56:27 +08:00
Andrew Nicols 7fd28388e2 Merge branch 'MDL-59728_33-boost-question-bank-header-align' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-08-07 12:39:51 +08:00
Damyon Wiese 146d4c9abf MDL-59055 grades: behat test 2017-08-07 10:09:40 +08:00
Marina Glancy 299e5de1a7 MDL-59055 grades: provide backward-compatibility of changes 2017-08-07 10:09:40 +08:00
Marina Glancy a4f645775a MDL-59055 grades: fix bug displaying item id instead of grade
Thanks to Marcelo Santos for initial patch
2017-08-07 10:09:40 +08:00
Andrew Nicols 5f295e2ce8 MDL-59506 core_lock: use a null lock during install
Use a different lock factory during installation which does not actually
lock at all.
2017-08-07 10:00:39 +08:00
Jake Dallimore 89e7d6eb7a MDL-59172 user: user_can_view_profile() now checks viewalldetails cap 2017-08-07 09:28:50 +08:00
Pierre Guinoiseau 1fd7f60706 MDL-59504 pix: update icon for Mahara 2017-08-07 09:02:04 +08:00
Luca Bösch 2164a6ce79 MDL-59728 questions: Align question bank headers. 2017-08-04 15:29:06 +02:00
Luca Bösch f2f66bb3e4 MDL-59662 database: Typo in variable name. 2017-08-04 10:31:34 +02:00
Andrew Nicols f3b4f02998 MDL-59642 stats: Correct random unit test failure
The unit test was creating four events, and then relying on them being
retrieved in the order in which they were created.

I've modified the test to:
* ensure timecreated are spaced apart; and
* add an order by timecreated when fetching them.
2017-08-04 15:07:26 +08:00
Jun Pataleta 63b096ccb7 MDL-59666 mod_assign: Add validation for grading due date 2017-08-04 14:43:03 +08:00
Andrew Nicols 6aaea768a1 weekly release 3.3.1+ 2017-08-04 11:50:29 +08:00
Andrew Nicols 3124d6ec6d Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-08-04 11:50:10 +08:00
Simey Lameze dc48f38b16 MDL-59644 core_output: fix font awesome mapping for lock icons 2017-08-04 09:04:07 +08:00
Juan Leyva 4a99cae69d MDL-59532 mod_lesson: Fix check_updates_since with groups
There were a couple of incorrect SQL queries when the user calling the
function is a teacher and the activity uses separate groups.
2017-08-03 12:11:16 +02:00
Andrew Nicols f499964d3d Merge branch 'MDL-59582-33' of git://github.com/danpoltawski/moodle into MOODLE_33_STABLE 2017-08-03 15:49:58 +08:00
Dan Poltawski aabf3e9ab8 MDL-59582 npm: update shrinkwrap file for npm 8.2.0 2017-08-03 08:26:36 +01:00
Andrew Nicols 2654b0c931 Merge branch 'm33_MDL-59583_Fix_MariaDB_10d2d7_Breaking_Change' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-08-03 12:32:09 +08:00
Damyon Wiese f0ce31da5e MDL-59698 behat: Remove bad tests
These tests are an abuse and should not have been accepted. Behat tests should use real pages.
Adding testing only entry points to Moodle is a bad security practice and is not the purpose of behat.
2017-08-03 10:28:54 +08:00
Matteo Scaramuccia bef2ae41a5 MDL-59583 dml: fixed NULL values w/ MariaDB 10.2.7+ 2017-08-03 00:28:37 +02:00
Andrew Nicols 93f9d56886 Merge branch 'MDL-57259-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-08-02 13:39:49 +08:00
Ryan Wyllie 9b639d9cb7 MDL-57259 external: fix page url debug in fragment loading 2017-08-02 03:44:33 +00:00
Andrew Nicols d40a73d8cc Merge branch 'MDL-55364-33-fix' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-08-02 10:52:11 +08:00
John Okely 58215dcf07 MDL-55364 forum: Combine user picture and user name rows 2017-08-02 10:30:46 +08:00
Dan Poltawski b29ffd3629 Merge branch 'MDL-55364-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-08-01 11:36:31 +01:00
Dan Poltawski e913d4a3a2 Merge branch 'MDL-59658-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-08-01 10:15:48 +01:00
David Monllao 975e31d441 Merge branch 'wip-MDL-53492-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-08-01 09:22:52 +02:00
Andrew Nicols 45aabba243 Merge branch 'MDL-58928_33-alt-attribute-enrolment-edit-delete-icons' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-08-01 14:56:10 +08:00
Jun Pataleta 75fe99dad0 MDL-59658 core: Add login/logout steps for course participants scenario
* Add student1 and student2 login/logout steps for the course
  participants filtering scenario in order to have last access data
  for students 1 and 2 since the participants table is sorted by last
  access by default.
* Convert the two course participants scenario to a scenario outline.
  The steps are basically the same. Only the view mode is different.
* Remove @javascript tags for the following scenario:
  - Filter users on assignment submission page
  - Filter users on view gradebook page
  - Filter users on course participants page
  JS is not really necessary in these scenario and we can get faster
  execution time.
2017-08-01 13:57:40 +08:00
Andrew Nicols 92502d78d7 Merge branch 'MDL-59473-MOODLE_33_STABLE' of https://github.com/sytabaresa/moodle into MOODLE_33_STABLE 2017-08-01 10:49:26 +08:00
Luca Bösch eef089cd57 MDL-58928 enrol: delete and edit icon alt attribute 2017-07-31 17:32:55 +02:00
David Monllao ebe2c2e3bd Merge branch 'wip-MDL-59496-33-3' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-31 17:15:05 +02:00
Dan Poltawski dcde4768c9 MDL-59627 mod_data: fix incorrect use of sortorder 2017-07-31 14:28:53 +01:00
David Monllao 2ecaa395b8 Merge branch 'wip-MDL-59311-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-31 14:47:28 +02:00
David Monllao 335f6f65bc Merge branch 'MDL-59535-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-07-31 14:20:01 +02:00
David Monllao 8308e1939a Merge branch 'MDL-57546-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-07-31 14:10:05 +02:00
Dan Poltawski 3d92d04aee Merge branch 'MDL-59619-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-07-31 11:48:54 +01:00
Dan Poltawski 9646369c9a Merge branch 'MDL-59627-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-07-31 11:44:56 +01:00
Dan Poltawski 4e6cda17b8 Merge branch 'MDL-59632_33' of git://github.com/dmonllao/moodle into MOODLE_33_STABLE 2017-07-31 11:42:55 +01:00
David Monllao a74ae654a3 Merge branch 'MDL-59511-33-oauthsysmail' of git://github.com/Dagefoerde/moodle into MOODLE_33_STABLE 2017-07-31 11:46:49 +02:00
Dan Poltawski 9ab1486be6 Merge branch 'wip-MDL-59476-33-2' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-31 10:22:03 +01:00
Andrew Nicols 3ebca8165d Merge branch 'MDL-58196-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-07-31 15:28:06 +08:00
David Monllao ac4c870148 Merge branch 'MDL-59649-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-07-31 09:00:50 +02:00
David Monllao db495bf3a0 Merge branch 'MDL-58744-33' of https://github.com/jacac/moodle into MOODLE_33_STABLE 2017-07-31 08:36:36 +02:00
Ankit Agarwal 268acaeb93 MDL-58196 availability: Fix UI for pass/fail config
For pass/fail setting to work properly, activities must have 'Require grade' completion set,
just make sure we don't allow activities without this setting to be set
2017-07-31 11:56:21 +05:30
Ankit Agarwal b198bfbfe9 MDL-58196 availability: Add appropriate dependencies in mform 2017-07-31 11:56:21 +05:30
Marina Glancy 454bf4c2f0 MDL-59655 course: visibleoncoursepage is not mandatory 2017-07-31 14:16:07 +08:00
Andrew Nicols dd4855cb99 Merge branch 'm33_MDL-59583_Fix_MariaDB_10d2d7_Breaking_Change' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-07-31 11:50:51 +08:00
Marina Glancy 1b70297cb3 MDL-53492 registration: Moodle.net is more correct than Moodle.org 2017-07-31 11:36:21 +08:00
Marina Glancy 94a8d2e2e2 MDL-53492 registration: use https://moodle.net as hub url 2017-07-31 11:36:18 +08:00
Daniel Materka 638bae2e6c MDL-55364 forum: fix overlapping columns in the table at low resolutions 2017-07-31 11:24:24 +08:00
Marina Glancy a6a6b523ec MDL-59496 registration: display unregistered warning consistently 2017-07-31 11:23:14 +08:00
AMOS bot 31b1855a3d Automatically generated installer lang files 2017-07-31 00:10:16 +08:00
AMOS bot 1cbf0036b3 Automatically generated installer lang files 2017-07-29 00:10:27 +08:00
Juan Leyva e81dc75977 MDL-59649 mod_data: Fix content exporter
The content3 and content4 fields should be type PARAM_RAW
2017-07-28 14:03:16 +02:00
Jan Dageförde 0af9a77f89 MDL-59511 oauth2: Allow empty email in system account 2017-07-28 10:01:22 +02:00
Simey Lameze 1a019bd8cd MDL-59535 tool_behat: fix fatal error if there is no setup 2017-07-28 08:47:29 +08:00
Jakob Ackermann c2de62bc43 MDL-58744 blocks: Add system context block position in non user context. 2017-07-27 09:08:42 -07:00
AMOS bot c264dab3a9 Automatically generated installer lang files 2017-07-28 00:07:35 +08:00
Dan Poltawski eb560d0745 weekly release 3.3.1+ 2017-07-27 10:10:52 +01:00
Dan Poltawski aefdf49b36 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-07-27 10:10:51 +01:00
David Monllao 42a01ee396 MDL-59632 search: Style search box for boost 2017-07-27 11:01:11 +02:00
Marina Glancy 44dc52f266 MDL-59311 course: duplicate module rebuilds cache twice
slightly refactor duplicate_module() code so it does not rebuild course cache
twice and also we do not need to move module if it is already the last module in a section
2017-07-27 08:17:17 +08:00
David Monllao 1abc345a3d Merge branch 'MDL-58906-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-07-26 14:43:04 +02:00
Dan Poltawski f30ca335fe Merge branch 'MDL-57698-33-fix' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-07-26 09:43:54 +01:00
Ankit Agarwal de99cab5e4 MDL-58906 calendar: Remove check for _refresh_events exists 2017-07-26 12:59:07 +05:30
Andrew Nicols b56b5ee8d6 Merge branch 'MDL-59499-33-classfix' of github.com:snake/moodle into MOODLE_33_STABLE 2017-07-26 14:57:03 +08:00
Jake Dallimore 6dc120fb5e MDL-59499 admin: class fix for course category expansion icons 2017-07-26 11:24:19 +08:00
John Okely bf164227cc MDL-57698 backup: Decrease deadlock fixture size 2017-07-26 10:43:23 +08:00
Andrew Nicols 860db28945 MDL-57546 mediaplayer_youtube: Respect mobile URLs 2017-07-26 10:41:16 +08:00
Juan Leyva 957b5180db MDL-59627 mod_data: Fix totalcount calculation in search_entries
totalcount was incorrectly calculated for normal search.
For advanced search it was working as expected.
This was making searched entries pagination behave incorrectly.
2017-07-25 19:04:36 +02:00
AMOS bot f280f97b9a Automatically generated installer lang files 2017-07-26 00:07:31 +08:00
Juan Leyva 5a55f2049a MDL-59619 mod_data: Fix get_fields WS for databases without fields 2017-07-25 14:45:49 +02:00
Dan Poltawski c74bfe4847 Merge branch 'MDL-57698-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-07-25 11:48:10 +01:00
Matteo Scaramuccia 8ebc6bd2b0 MDL-59583 dml: fixed breaking change added w/ MariaDB 10.2.7+ 2017-07-25 12:35:15 +02:00
Matteo Scaramuccia 18c977f996 MDL-59583 dml: improve perfs by unsetting the key. 2017-07-25 12:28:38 +02:00
gthomas2 2e50939069 MDL-58761 behat: Fix regex in i_open_my_profile_in_edit_mode step 2017-07-25 11:06:51 +01:00
David Monllao db52eda16f Merge branch 'MDL-59453-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-07-25 11:43:36 +02:00
David Monllao ae5b1611ff Merge branch 'MDL-59485-33' of https://github.com/IMSGlobal/moodle into MOODLE_33_STABLE 2017-07-25 11:11:16 +02:00
David Monllao 106d704caf Merge branch 'MDL-59578-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-07-25 11:09:55 +02:00
Dan Poltawski 9e8a23682a Merge branch 'MDL-59432-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-07-25 07:58:41 +01:00
Marina Glancy 78b0c340ba MDL-59476 dml: temporary mysql tables should not use compressed rows 2017-07-25 14:25:41 +08:00
Andrew Davidson 47125f1da3 MDL-59499 coursemanagement: Rewitten expand and collapse
Also replace M.util.get_string() calls with core/str module
2017-07-24 13:56:52 +02:00
Andrew Davidson 93ab68385d MDL-59499 - Fixed collapsing category javascript to use template rendering 2017-07-24 13:56:37 +02:00
David Monllao 0d7e0ccf4e Merge branch 'MDL-59509-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-07-24 13:03:52 +02:00
David Monllao d413b817e8 Merge branch 'MDL-58906-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-07-24 12:23:15 +02:00
Dan Poltawski b82734e916 Merge branch 'MDL-58174-33' of https://github.com/abias/moodle into MOODLE_33_STABLE 2017-07-24 09:05:33 +01:00
Andrew Nicols 401cbb6c83 Merge branch 'wip-MDL-38129-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-24 15:24:24 +08:00
Ankit Agarwal 1839865599 MDL-58906 completion: Fix incorrect phpdoc 2017-07-24 11:45:47 +05:30
Ankit Agarwal a36a732b69 MDL-58906 restore: Do not backup/restore action events 2017-07-24 11:45:20 +05:30
Ankit Agarwal b5527f5389 MDL-58906 restore: Call action event refresh task during restore 2017-07-24 11:45:20 +05:30
Andrew Nicols 0c534d99c2 Merge branch 'wip-MDL-59561-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-07-24 13:21:49 +08:00
Andrew Nicols 875ea2a421 Merge branch 'MDL-59490-33' of https://github.com/spvickers/moodle into MOODLE_33_STABLE 2017-07-24 12:51:32 +08:00
AMOS bot ea6f61cda7 Automatically generated installer lang files 2017-07-23 00:08:25 +08:00
AMOS bot 98aff30461 Automatically generated installer lang files 2017-07-22 00:07:39 +08:00
John Okely 58db506aa7 MDL-57698 sqlsrv: Unit test NOLOCK 2017-07-21 14:44:21 +08:00
John Okely 767fa6af9e MDL-57698 sqlsrv: Query temp tables with no lock 2017-07-21 14:44:21 +08:00
John Okely 6b152ab7cd MDL-57698 sqlsrv: Unit test deadlock case 2017-07-21 14:44:21 +08:00
Andrew Nicols 823b857617 MDL-59509 dml: sqlsrv should respect port setting
Details of how to connect to a specific port are available at
https://docs.microsoft.com/en-us/sql/connect/php/how-to-connect-on-a-specified-port
2017-07-21 13:23:57 +08:00
Adrian Greeve cef052dff8 MDL-59561 database: Update to creating new indexes in mysql.
When updating the mysql system to utf8mb4 not all tables are
converted to the row format of compressed or dynamic. If a new
index is created there is a possibility that the table could be
using compact or redundant and then an error will be shown saying
that the index size is too large. This fix handles this exception
and converts the table over to compressed.
2017-07-21 09:30:24 +08:00
AMOS bot e3ee66b5c0 Automatically generated installer lang files 2017-07-21 00:06:48 +08:00
Dan Poltawski 32269b20e7 weekly release 3.3.1+ 2017-07-20 13:20:56 +01:00
Dan Poltawski b9109141d5 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-07-20 13:20:55 +01:00
Marco Ferrante d7360d798e MDL-59432 auth_db: add aliases to field mapping query
This patch fixes an issue with mapping different internal fields
to the same external field.
2017-07-20 14:59:50 +08:00
Andrew Nicols 4cf4453962 Merge branch 'MDL-59527-33-fix1' of http://github.com/damyon/moodle into MOODLE_33_STABLE 2017-07-20 10:43:40 +08:00
Andrew Nicols c428d5891f Merge branch 'wip-MDL-57649-33-fix2' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-07-20 10:23:01 +08:00
Damyon Wiese 07bdc85316 MDL-59527 autocomplete: Don't fetch ajax twice 2017-07-20 10:00:22 +08:00
Adrian Greeve ede53ca719 MDL-57649 mod_lesson: Improvement to upgrade query.
We only need one record for each filearea that we
are removing.
2017-07-20 09:59:42 +08:00
Jun Pataleta d258b76a80 MDL-59578 core: Remove unnecessary steps in alpha_chooser.feature
* The steps at the end of the Background scenario don't make sense and
  just adds to the execution time of the test.
2017-07-20 09:44:07 +08:00
AMOS bot 0b3e56b10c Automatically generated installer lang files 2017-07-20 00:06:27 +08:00
Dan Poltawski c1f1327009 Merge branch 'wip-MDL-57649-33-fix' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-07-19 09:33:12 +01:00
Adrian Greeve 8c69d94957 MDL-57649 mod_lesson: Additional refinement to upgrade script. 2017-07-19 15:47:46 +08:00
Dan Poltawski 2bd93697c1 Merge branch 'MDL-59569-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-07-19 08:43:57 +01:00
Andrew Nicols 043bd4ca1e MDL-59569 travis: Remove haveged 2017-07-19 12:22:12 +08:00
Juan Leyva 8388f22e60 MDL-59453 mod_lesson: Return lesson contents without html cleaning
This is consistent to what is done in the web interface.
2017-07-18 12:40:48 +01:00
Dan Poltawski 8303207140 Merge branch 'MDL-59255-MOODLE_33_STABLE' of github.com:lucisgit/moodle into MOODLE_33_STABLE 2017-07-18 10:54:06 +01:00
Marina Glancy 596a156134 MDL-59255 media: support rtmp:// in URLs 2017-07-18 10:27:11 +01:00
David Monllao cab4f7efcb Merge branch 'wip-MDL-39471-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-07-18 10:49:25 +02:00
Dan Poltawski 9ee78ba22e Merge branch 'm33_MDL-59109_Backup_Missing_AutoCommit' of https://github.com/scara/moodle into MOODLE_33_STABLE 2017-07-18 09:45:23 +01:00
David Monllao 9f986cdefb Merge branch 'MDL-57991-m33' of https://github.com/micaherne/moodle into MOODLE_33_STABLE 2017-07-18 09:40:26 +02:00
David Monllao f16e2a6860 Merge branch 'wip-MDL-58362-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-18 09:08:50 +02:00
Marina Glancy 33b49fe9c9 MDL-38129 gradeexport: custom profile fields case problem
Do not use custom pfofile field name as a field alias in DB query, use field id instead.
DML lowercases all column aliases and fields with uppercase letters no longer match.
2017-07-18 11:06:17 +08:00
David Monllao 3f62f69d32 MDL-59411 course: Fix unavailable typo 2017-07-17 16:40:36 +02:00
David Monllao 8765200f2c Merge branch 'wip-MDL-59411-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-17 15:48:22 +02:00
David Monllao d13837d259 Merge branch 'MDL-59527-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-07-17 14:08:28 +02:00
Alexander Bias 2d3ac258cc MDL-58174 themes: Make build_action_menu_from_navigation() protected 2017-07-17 11:17:07 +02:00
David Monllao fda4dac9a2 Merge branch 'wip-MDL-59377-33-3' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-17 11:05:15 +02:00
Dan Poltawski 4bca803817 Merge branch 'MDL-59442-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-07-17 09:16:23 +01:00
David Monllao aa11add8a6 Merge branch 'MDL-59539-33' of git://github.com/tobiasreischmann/moodle into MOODLE_33_STABLE 2017-07-17 10:15:05 +02:00
Dani Palou 7ebaf90cfe MDL-59068 lesson: Revert MDL-54849
MDL-54859 made the 'wrong jump' setting useless, since clicking 'No' always sends the user to the next page.
2017-07-17 10:09:58 +02:00
Dan Poltawski 3841028a98 Merge branch 'wip-MDL-57649-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-07-17 09:01:33 +01:00
David Monllao 3b61a615bb Merge branch 'MDL-54607-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-07-17 09:32:07 +02:00
David Monllao f00cf2b8cd Merge branch 'wip-MDL-55912-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-07-17 09:09:09 +02:00
Marina Glancy 17a4f1f382 MDL-59377 mod_label: set showdescription to be always 1 2017-07-17 13:44:20 +08:00
Marina Glancy ba73baff14 MDL-59377 course: when module intro is visible display embedded files
Even when course module is not available the intro text can still be visible on the
course page. In this case the availability restriction is displayed to the student
but link to the activity is not available
2017-07-17 13:44:05 +08:00
Andrew Nicols 57158d7df5 Merge branch 'mdl55979-moodle33' of https://github.com/tlock/moodle into MOODLE_33_STABLE 2017-07-17 12:29:30 +08:00
Andrew Nicols 0c09410799 Merge branch 'MDL-59371-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-07-17 10:24:06 +08:00
Adrian Greeve 2722f49fee MDL-39471 mod_assign: Comment visibility in blind marking.
Students can now see the identity of anyone making comments.
Markers on the otherhand can only see the identity of themselves
when making comments.
2017-07-17 09:25:55 +08:00
Adrian Greeve 4846429ebd MDL-55912 mod_assign: Set grader details to the correct user. 2017-07-17 09:22:29 +08:00
Adrian Greeve 93dbfb431c MDL-57649 mod_lesson: Delete answer files correctly.
The files associated with answers and responses were
not being deleted due to the fact that the wrong itemid
was being used.
2017-07-17 09:17:23 +08:00
AMOS bot d2ef7c32a6 Automatically generated installer lang files 2017-07-17 00:06:39 +08:00
Matteo Scaramuccia bea214a406 MDL-59109 scorm: Save autocommit setting in the backup. 2017-07-15 00:12:55 +02:00
Dan Poltawski 4b4243113f weekly release 3.3.1+ 2017-07-14 11:46:50 +01:00
Dan Poltawski ce3aeb2181 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-07-14 11:46:49 +01:00
Tobias Reischmann 4699f2adf5 MDL-59539 oauth2/issuer: Changed baseurl for guessing image URL
The url, which was used for guessing the image, was queried with the
key 'discoveryurl', which is not defined in the context of an issuer.
The baseurl should be sufficient to retrieve the favicon.ico from a
server. That's why the key for was changed from 'discoveryurl' to
'baseurl'.
2017-07-14 11:27:40 +02:00
Damyon Wiese 6559958115 MDL-59527 forms: Race cond with ajax autocomplete
Sometimes (rarely) the auto complete will show "No suggestions" when there are valid suggestions.
2017-07-14 12:44:47 +08:00
Ankit Agarwal b7ab2ac6b0 MDL-54607 calendar: Export 0 duration events properly
Thanks to Paul Prencis for initial suggestion of this patch
2017-07-14 09:36:25 +05:30
Ankit Agarwal 23a4ce8320 MDL-54607 calendar: Update benu lib to allow for instantaneous events 2017-07-14 09:36:24 +05:30
Simey Lameze 96ce433fc4 MDL-59442 core_course: apply css classes to activity icons 2017-07-13 15:24:56 +08:00
Simey Lameze 143bf83482 MDL-59371 gradereport_overview: allow auth user role to view report 2017-07-12 17:53:48 +08:00
Simey Lameze 2c94e7aa97 MDL-59371 gradereport_overview: add missing course id to url 2017-07-12 17:53:48 +08:00
Andrew Nicols 9593b1597f MDL-59431 requirejs: Prioritise errors 2017-07-12 10:06:25 +08:00
Andrew Nicols 6007c2265e MDL-59431 requirejs: Correct failed JS check 2017-07-12 10:06:25 +08:00
AMOS bot f3c10bd588 Automatically generated installer lang files 2017-07-12 00:14:00 +08:00
Eloy Lafuente (stronk7) 9123df91ba MDL-56629 dataformat_html: Adding UTF-8 charset
Also adding the HEAD tag which was missing.

(credit goes to Frédéric Massart - FMCorz, thanks!)
2017-07-11 13:54:46 +02:00
Eloy Lafuente (stronk7) 5fbd782f16 Merge branch 'MDL-54965-33' of git://github.com/tobiasreischmann/moodle into MOODLE_33_STABLE 2017-07-11 13:41:43 +02:00
David Monllao 88e51d2279 Merge branch 'wip-MDL-59363-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-11 12:37:09 +02:00
Dan Poltawski cd8133b891 MDL-59287 upgrade.txt: avoid misleading versions 2017-07-11 11:29:44 +01:00
Dan Poltawski cc5590d73a Merge branch 'wip-MDL-59287-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-07-11 11:29:42 +01:00
David Monllao fbeb566249 Merge branch 'MDL-59431_33' of git://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-07-11 12:05:42 +02:00
David Monllao 67e74fd7ff Merge branch 'wip-MDL-59441-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-11 11:41:17 +02:00
Eloy Lafuente (stronk7) e21f6974ae Merge branch 'MDL-57432-33' of git://github.com/danpoltawski/moodle into MOODLE_33_STABLE 2017-07-11 10:19:55 +02:00
Stephen Vickers ace3e1d569 MDL-59490 mod_lti: Prevent text wrapping
Update html_to_text method calls with a width of zero.
2017-07-10 17:12:07 +01:00
AMOS bot bdbda82849 Automatically generated installer lang files 2017-07-11 00:06:32 +08:00
Dan Poltawski 9054d6a40b Merge branch 'wip-MDL-40408-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-10 14:36:39 +01:00
Dan Poltawski 12dce9c9c3 Merge branch 'wip-MDL-59262-33-2' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-10 14:31:07 +01:00
David Monllao e5a2a8e148 Merge branch 'MDL-52501-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-07-10 14:38:59 +02:00
Dan Poltawski d6c8e95ecf Merge branch 'MDL-59317-m33' of https://github.com/NeillM/moodle into MOODLE_33_STABLE 2017-07-10 13:28:25 +01:00
David Monllao b4e7616ec6 Merge branch 'MDL-58332-33' of git://github.com/ryanwyllie/moodle into MOODLE_33_STABLE 2017-07-10 14:22:10 +02:00
Tobias Reischmann d251762b9e MDL-54965 mod_data: removed unused code in display_add_field()
Since the refactoring towards using the filepicker for file and picture
fields there are several variables, which are set but never read. Thus,
I removed them.
2017-07-10 14:15:23 +02:00
Tobias Reischmann de099c972a MDL-54965 mod_data: Init draft area for empty file/pic fields
When a file or picture field was added with existing records, these
records could not be saved, since the draft area was not created
properly.

Co-authored-by: Jérôme Mouneyrac <mouneyrac>
2017-07-10 14:15:23 +02:00
Dan Poltawski 11b3548f35 Merge branch 'wip-MDL-46495-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-10 13:15:21 +01:00
Michael Aherne d0da99d6fa MDL-57991 media: Prevent mediaplayer taking up too much space 2017-07-10 10:21:11 +01:00
Dan Poltawski c87870bca8 MDL-57432 environment: raise Moodle requirement
Due to Moodle 2.7 and Moodle 3.4 not having a common compatible php version
between them to upgrade from Moodle 3.4 from Moodle 2.7 you'll need to upgrade
to a higher version first or upgrade php at the same time as upgrade,
this encourages the former.
2017-07-10 09:22:30 +01:00
Dan Poltawski 1185717188 MDL-57432 environment: raise Moodle 3.4 requirements
1) PHP minimum version raised to 7.0.0
2) Intl extension raised from optional to required
2017-07-10 09:22:30 +01:00
Dan Poltawski b5cb5015b9 MDL-57432 environment: 3.4 base information
This is a direct copy of the 3.3 branch to
have changes under control easier in next commits.
2017-07-10 09:22:30 +01:00
Ryan Wyllie 1ea3147567 MDL-58332 message: remove concat in get_popup_notifications sql
Removed the concat to generate the uniqueid field for the popup
notifications data. The concat can't be used directly in the SQL because
the syntax changes between databases. The sql_concat helper can't be
used because it assumes all values are database columns (which they
aren't in this case).

Instead I've just removed the uniqueid field because it isn't required
for the union all to work and the field isn't being used by anything.
This should fixed the compatibility issues between databases.
2017-07-10 02:03:47 +00:00
Adrian Greeve 2470f714b3 MDL-59287 calendar_events: Update modules to create all events.
All events equals all calendar events including completion events.
2017-07-10 09:41:21 +08:00
Adrian Greeve 73d2d21d4c MDL-59287 course_module: switching to new function.
Instead of using *_refresh_events directly
course_module_update_calendar_events is called so
that all types of calendar events can be updated.
2017-07-10 09:41:21 +08:00
Adrian Greeve abbc76c9e5 MDL-59287 course_module: Create calendar event update function. 2017-07-10 09:41:21 +08:00
Adrian Greeve 176856da55 MDL-59287 core_completion: Bulk completion now updates events. 2017-07-10 09:41:21 +08:00
Adrian Greeve 2109b32984 MDL-59287 core_completion: Update to unit tests. 2017-07-10 09:41:21 +08:00
Adrian Greeve 922c8df416 MDL-59287 core_completion: Update API to use less DB calls. 2017-07-10 09:41:21 +08:00
Eloy Lafuente (stronk7) 8e4341402a Moodle release 3.3.1 2017-07-08 20:43:39 +02:00
Stephen Vickers 19ed2d1318 MDL-59485 mod_lti: Add missing capabilities
Capabilities missing which should allow Moodle to pass IMS certification
for LTI 2.0
2017-07-08 12:41:09 +01:00
AMOS bot 0a5af1649f Automatically generated installer lang files 2017-07-08 00:16:05 +08:00
Sebastian Tabares Amaya f05d911e3c MDL-59473 request: Fix Loop Redirection in Oauth2 2017-07-07 09:36:16 -05:00
Jake Dallimore b194f1a2e3 weekly release 3.3+ 2017-07-07 12:10:20 +08:00
Jake Dallimore 14ecaeea08 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-07-07 12:10:18 +08:00
AMOS bot c28de2e556 Automatically generated installer lang files 2017-07-07 00:06:27 +08:00
Neill Magill 5c4ace36c1 MDL-52501 assign: Fix group submissions without submission record
Based on work by Tim Lock <tim.lock@blackboard.com>

While upgrading to Moodle 2.8 or above it is possible for it to fail if
the site has multiple graded attempts for a user without an associated
submission record. This caused the upgrade to violate the databases
unique key rules.

This same issue could apply to a backup that was created of an
assignment that had this issue, when it is restored into Moodle 2.8 or
later.

This change adds the attempt number from the grade table into the query
that is inserting the new submission record (thanks to Tim). It also
moves the insert query before the latest flag is set on submission
records to ensure that only one has it, without this it is possible that
multiple submission records would be marked as the latest after an
upgrade or restore.
2017-07-06 15:29:01 +01:00
Neill Magill a7e6b097f9 MDL-59317 message: Message page taking long time to load
The OR clause in these queries used different sets of columns to select
userid which meant that the indexes that included user id could not be
used.

This change splits the query so that each individual part can use one of
the indexes that includes a userid which speeds them up considerably.
2017-07-06 15:28:43 +01:00
Simey Lameze 706571e94f MDL-59456 auth_cas: patch phpCAS auth bypass vulnerability 2017-07-06 09:35:43 +01:00
Jun Pataleta 0801d7dc95 MDL-58651 logstore_database: Set dbhandlesoptions in test page 2017-07-05 23:04:37 +08:00
Dan Poltawski 77da99fe77 MDL-57021 passwords: only use unmask field with shared secrets
When a user is entering a password which isn't returned back to them
then its not correct to use the unmask element - this element was
designed for places where we are storing shared secrets.
2017-07-05 12:25:30 +02:00
Eloy Lafuente (stronk7) c88b34c0fa Merge branch 'MDL-59398-33-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-07-05 11:52:27 +02:00
Eloy Lafuente (stronk7) 23dbc35541 Merge branch 'MDL-59294-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-07-05 09:43:44 +02:00
Eloy Lafuente (stronk7) e9609517d2 Merge branch 'MDL-58286-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-07-05 09:40:39 +02:00
Eloy Lafuente (stronk7) efc9c7572b Merge branch 'wip-MDL-59412-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-05 09:35:13 +02:00
Helen Foster 05263df3b0 MDL-59398 lang: Merge English strings from the en_fix language pack 2017-07-05 09:31:39 +02:00
Marina Glancy dc30c8fa2f MDL-59412 course: do not display completion icon for unavailable mod 2017-07-05 09:58:35 +08:00
John Okely 8b3ee7d311 MDL-58286 enrol_ldap: Pass connection to ldap_paged_results_supported
Thanks to Bianco Veigel for the original patch.
2017-07-05 09:49:48 +08:00
Jun Pataleta 5823f7e1bd MDL-59294 block_login: Make display of ID provider buttons consistent 2017-07-05 09:08:11 +08:00
Jun Pataleta 4dfa466691 MDL-59294 theme_bootstrapbase: Fix display of ID provider buttons 2017-07-05 09:08:11 +08:00
Eloy Lafuente (stronk7) 226ca38be3 Merge branch 'MDL-58651_33' of git://github.com/aolley/moodle into MOODLE_33_STABLE 2017-07-05 01:23:22 +02:00
Eloy Lafuente (stronk7) 145e6deee7 Merge branch 'wip-MDL-59336-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-07-04 19:59:17 +02:00
Jake Dallimore d53a5789a8 Merge branch 'MDL-59380-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-07-04 16:29:11 +08:00
Marina Glancy acc3bacecb MDL-59441 calendar: unittest fix for modules without generators 2017-07-04 11:17:06 +08:00
Marina Glancy 640534676c MDL-59409 admin: set admin user in unittest 2017-07-04 11:05:11 +08:00
Marina Glancy 81073ae4f0 MDL-59262 tool_uploadcourse: allow to set numsections 2017-07-04 10:28:45 +08:00
Marina Glancy a7db632a5d MDL-59262 course: bug - requested course is created without sections 2017-07-04 10:28:45 +08:00
Ankit Agarwal 49371ca433 MDL-56565 forum: Add sitename as heading when there is nothing to display 2017-07-04 10:11:37 +08:00
Ankit Agarwal 5697a42fc2 MDL-56565 forum: Make sure userfullname is not disclosed 2017-07-04 10:11:37 +08:00
Jake Dallimore 0ba4ffe353 MDL-56565 navigation: fix for cap checks in nav and context header
Fix to:
- Make sure we properly check both user and course contexts in
the load_for_user function in navigation lib and user the
user_can_view_profile function for same-course access checks.
- Use user_can_view_profile in the renderer's context_header to
properly decide whether a user can view another user's picture
and messaging options in the page header.
2017-07-04 10:11:37 +08:00
Jake Dallimore 31bae37249 MDL-56565 navigation: fix user details disclosure in nav tree
Fixes a bug in which a user's full name might be disclosed via the
nav tree. Nav generation now checks the current user's access to the
user before adding the node, else adds a dummy node.
2017-07-04 10:11:37 +08:00
Jake Dallimore 2423a989fc MDL-56565 core: fix user details disclosure in page context header
Fixes a bug with context_header function in which user details were
displayed regardless of the current user's capabilities.
2017-07-04 10:11:37 +08:00
Mark Nelson 67103939ac MDL-59304 core_calendar: check if course is hidden in bailout callback 2017-07-04 10:11:37 +08:00
Marina Glancy 4f91eb0ba1 MDL-59409 admin: check access to every setting in category 2017-07-04 10:03:16 +08:00
Jake Dallimore 07cb3212c5 Merge branch 'MDL-59008-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-07-03 15:56:18 +08:00
Simey Lameze 550e03463b MDL-59008 repository: add reload parent window support to callback 2017-07-03 13:45:41 +08:00
Simey Lameze 4f2c5e18c0 MDL-59008 repository_onedrive: add method to serve login on a popup 2017-07-03 13:45:41 +08:00
Simey Lameze 73aad88f63 MDL-59008 repository_googledocs: add method to serve login on a popup
This commit also add a new string logintoaccount to make the login
button more clear.
2017-07-03 13:45:40 +08:00
Simey Lameze 88d7acff69 MDL-59008 mod_resource: add option to serve external files embed 2017-07-03 13:45:40 +08:00
Tim Hunt cea8b76aba MDL-59431 requirejs: better reporting if a JS file cannot be loaded 2017-06-30 17:26:13 +01:00
Marina Glancy 3d5edb5970 MDL-46495 tool_uploadcourse: set enablecompletion to default 2017-06-30 10:26:02 +08:00
Jake Dallimore 59f5f4a9df weekly release 3.3+ 2017-06-29 16:23:52 +08:00
Jake Dallimore 14509286e4 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-06-29 16:23:51 +08:00
Marina Glancy ecd7665605 MDL-59411 course: display access restriction in access error message 2017-06-29 13:47:08 +08:00
Marina Glancy cde9031d53 MDL-58362 registration: correctly retrieve registration values 2017-06-29 08:32:12 +08:00
Mark Nelson 6b661ab0a2 MDL-56046 mod_quiz: do not close the sheet twice 2017-06-28 14:14:28 +08:00
Adam Olley 57cb067173 MDL-58651 logstore_database: Add ability to not send database options
In the core dml:
PostgreSQL connections now use advanced options to reduce connection overhead.
These options are not compatible with some connection poolers. The
dbhandlesoptions parameter has been added to allow the database to configure
the required defaults.

This item adds a setting to the logstore_database plugin to let you set the
same flag for your destination database - without it you won't be able to ship
logs to a postgresql database with a pgbouncer frontend.
2017-06-28 13:20:09 +09:30
Marina Glancy bd845341f4 MDL-59363 mod_workshop: user object must have alternative name fields 2017-06-28 11:37:29 +08:00
Eloy Lafuente (stronk7) 65e5e9f454 Merge branch 'MDL-57809-33-progressbar' of https://github.com/roperto/moodle into MOODLE_33_STABLE 2017-06-27 20:17:34 +02:00
Eloy Lafuente (stronk7) 7984ae3581 Merge branch 'wip-MDL-59136-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-06-27 18:09:43 +02:00
David Monllao f786e59224 Merge branch 'MDL-32151-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-06-27 17:47:00 +02:00
Eloy Lafuente (stronk7) c46c38d355 Merge branch 'MDL-59362_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-06-27 17:22:02 +02:00
Danny Jung 67c112bf9c MDL-59073 Workshop: Prevent submission without content or file 2017-06-27 17:05:35 +02:00
David Monllao 61812e3dd8 Merge branch 'wip-MDL-59308-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-06-27 16:42:33 +02:00
David Monllao eaeed5b281 Merge branch 'MDL-59158-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-06-27 16:39:56 +02:00
David Monllao d259cafd3c Merge branch 'MDL-57927-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-27 15:55:33 +02:00
Eloy Lafuente (stronk7) e632f4ece5 Merge branch 'MDL-58844-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-06-27 11:42:14 +02:00
Eloy Lafuente (stronk7) aff28d6243 Merge branch 'MDL-59296-33' of git://github.com/crazyserver/moodle into MOODLE_33_STABLE 2017-06-27 11:40:03 +02:00
Jake Dallimore 653ec0d0b0 Merge branch 'MDL-59312-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-06-27 15:08:23 +08:00
Jake Dallimore 62a71e4a17 Merge branch 'MDL-59275-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-27 13:59:14 +08:00
Damyon Wiese 35657809ed MDL-59380 fragments: Include js from templates
Mustache templates containing {{#js}} blocks are not returned via the
fragments API. This is because the requirements manager is assigned when the renderer is created
and not updated by the call to start collecting page requirements.
2017-06-27 13:35:37 +08:00
Jake Dallimore c61c5009a8 Merge branch 'MDL-56046_33-fix' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-06-27 13:17:25 +08:00
Simey Lameze fe9e229248 MDL-59275 auth: prevent user login failed coding error 2017-06-27 13:07:13 +08:00
Mark Nelson db500a32a1 MDL-56046 dataformat: minor changes to PHPDocs and upgrade.txt 2017-06-27 11:25:22 +08:00
Andrew Nicols 75ead1e8cf MDL-58844 testing: Move to GCE build infrastructure
Switch back to GCE build infrastructure for Travis Builds and move
databases to RAM Disk.

This also adds a software entropy generator (haveged) which is
recommended when using a RAMdisk for the database.
2017-06-27 09:36:52 +08:00
Eloy Lafuente (stronk7) c7c9f4a46e Merge branch 'MDL-56046_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-06-27 02:42:48 +02:00
Eloy Lafuente (stronk7) 8e9c8f6583 Merge branch 'MDL-40818-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-06-27 01:50:39 +02:00
Eloy Lafuente (stronk7) 037bf82652 Merge branch 'MDL-59295-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-27 00:53:44 +02:00
Eloy Lafuente (stronk7) 5341d76031 MDL-58813 phpunit: pick test from 32_STABLE to fix expected behavior 2017-06-26 19:45:05 +02:00
Eloy Lafuente (stronk7) e71b162d09 Merge branch 'MDL-59297_myoverview_error_33' of git://github.com/davosmith/moodle into MOODLE_33_STABLE 2017-06-26 13:04:57 +02:00
Mark Nelson 58099bd24d MDL-56046 core: enable multiple sheets for flexible table 2017-06-26 13:56:38 +08:00
Mark Nelson c7da8264d0 MDL-56046 dataformat: added related information to upgrade.txt 2017-06-26 13:56:38 +08:00
Mark Nelson ca47e80375 MDL-56046 dataformat_*: convert core plugins 2017-06-26 13:30:56 +08:00
Mark Nelson 40e7ac2c70 MDL-56046 core: convert download_as_dataformat to use new API 2017-06-26 13:30:56 +08:00
Mark Nelson d7a2d1a2c8 MDL-56046 core_dataformat: added functions to support multiple sheets
Also removed write_header() and write_footer(). The reason for this
is because in core we want to know if the format being used supports
multiple sheets. To do this, and ensure we do not break third-party
dataformat plugins, we are using method_exist(). If write_header()
and write_footer() remain in the base class then this will always
be true.
2017-06-26 13:28:44 +08:00
Mark Nelson d971e7dffe MDL-59362 core: ensure we use 'new' when throwing exceptions 2017-06-26 13:10:31 +08:00
Marina Glancy 56855a2842 MDL-59136 roles: avoid double escaping in role names 2017-06-26 11:57:37 +08:00
Marina Glancy 7563339608 MDL-59336 themes: change FA mapping for i/new 2017-06-26 11:37:04 +08:00
Jake Dallimore 89d85f5a4b Merge branch 'MDL-49484-moodle33' of github.com:jebarviabb/moodle into MOODLE_33_STABLE 2017-06-26 10:52:15 +08:00
Josh Ebarvia 74823e4e45 MDL-49484 mod_lesson: Fix lesson page headers when editing 2017-06-24 05:23:52 +09:30
AMOS bot 7a0e1cd70c Automatically generated installer lang files 2017-06-24 00:08:53 +08:00
AMOS bot 4534c7b531 Merge branch 'MOODLE_33_STABLE' into install_33_STABLE 2017-06-24 00:08:53 +08:00
Pau Ferrer Ocaña 16f2fe5514 MDL-59296 data: Fix latlong field search 2017-06-23 09:15:35 +02:00
Andrew Nicols eee0d699c3 MDL-59312 js: Improve display of exception stacktrace 2017-06-23 10:50:05 +08:00
John Okely 0d74c11cf7 MDL-59312 notification: Normalise backtrace/stacktrace 2017-06-23 10:50:05 +08:00
Andrew Nicols 6aebb4375f MDL-59312 js: Add exception on AJAX error 2017-06-23 10:50:04 +08:00
Jun Pataleta 32f2e90522 MDL-32151 group: Use appropriate error langstring error key 2017-06-23 10:28:25 +08:00
Jun Pataleta 8e62bc79c7 MDL-32151 grade: Use appropriate error langstring error key 2017-06-23 10:28:25 +08:00
Jun Pataleta c36c507277 MDL-59158 theme_boost: Remove auto width and height for user picture 2017-06-23 10:12:54 +08:00
Jun Pataleta 813f289b60 MDL-40818 calendar: Require login to calendar pages
* Make sure that the course ID being passed points to an existing course
* Require user to login before granting access to calendar pages.
2017-06-23 09:21:16 +08:00
Daniel Thee Roperto e318be3772 MDL-57809 weblib: Added missing NO_OUTPUT_BUFFERING directive. 2017-06-23 09:43:32 +10:00
Daniel Thee Roperto a67ff779d5 MDL-57809 weblib: Added opening disclaimer and file-level phpdocs. 2017-06-23 09:43:32 +10:00
Daniel Thee Roperto 222a87ae98 MDL-57809 weblib: Progress bar and output buffer - added debugging
This fix makes Moodle show a debbuging message if using progressbar without defining NO_OUTPUT_BUFFERING.
2017-06-23 09:43:32 +10:00
AMOS bot 8d0dd90520 Automatically generated installer lang files 2017-06-23 00:07:50 +08:00
Dan Poltawski cccb1a6d21 weekly release 3.3+ 2017-06-22 15:40:49 +01:00
Marina Glancy 3d8a2c5cd9 MDL-59308 calendar: pass module context when known
this will protect us from exceptions when context for removed instance can not be retrieved
2017-06-22 16:01:33 +08:00
Simey Lameze ebe0cf3ed4 MDL-59295 tool_lp: remove useless ng-label attribute 2017-06-22 15:49:26 +08:00
Eloy Lafuente (stronk7) 9938165bb8 Merge branch 'MDL-59170-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-06-22 03:50:17 +02:00
John Okely 101271fd28 MDL-59170 fontawesome: Fix course total controls icon on grader report 2017-06-22 09:13:02 +08:00
Davo Smith 4ca3991e56 MDL-59297 block_myoverview: fix fatal error (missing require_once) 2017-06-21 08:01:53 +01:00
Eloy Lafuente (stronk7) f6736dedd1 Merge branch 'MDL-58985-33-bluebubbles' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-06-21 00:43:53 +02:00
Eloy Lafuente (stronk7) 5be425cf9e Merge branch 'wip-MDL-59263-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-06-20 18:04:08 +02:00
Eloy Lafuente (stronk7) 0f0b45fd59 Merge branch 'MDL-59269-33-languninstall' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-06-20 17:56:59 +02:00
Mathieu Petit-Clair f05e2e6690 MDL-58952 admin: use valid default for language selection dropdown. 2017-06-20 11:31:49 +01:00
Dan Poltawski b0b68a0bd4 Merge branch 'MDL-59005-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-20 09:52:12 +01:00
Dan Poltawski 7abe668bd6 Merge branch 'MDL-58472-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-06-20 09:37:24 +01:00
Jun Pataleta b31f3097c2 Merge branch 'wip-MDL-58911-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-06-20 16:34:02 +08:00
Jun Pataleta 82b3050e72 Merge branch 'MDL-57770-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-20 16:28:20 +08:00
Marina Glancy 153f74956d MDL-58911 calendar: use the same callbacks in unittests and prod
Remove unittest-specific callbacks for checking access and displaying
the calendar events on the dashboard.

This will allow plugin developers unittest the full behavior
of how their plugins add events to the dashboard.

Reset all static caches between unittests.
2017-06-20 16:17:26 +08:00
Jake Dallimore 8b017ea78c Merge branch 'wip-MDL-58729-33' of git://github.com/abgreeve/moodle into MOODLE_33_STABLE 2017-06-20 15:18:37 +08:00
Jun Pataleta cea093be87 Merge branch 'MDL-58766_33-clean-tree-item-indent' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-06-20 15:10:19 +08:00
Jun Pataleta 970c74b280 Merge branch 'MDL-59270-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-20 10:00:19 +08:00
Simey Lameze 04e5ef2a3e MDL-57927 tool_lp: make both buttons consistent 2017-06-20 08:50:14 +08:00
Simey Lameze b2a90870ce MDL-59270 block_myoverview: tab setting logic to main template on clean 2017-06-20 08:46:05 +08:00
Damyon Wiese ae60722b14 MDL-58808 fontawesome: nav and settings blocks 2017-06-20 08:22:59 +08:00
Dan Poltawski 26277438ed Merge branch 'MDL-59048_33' of https://github.com/timhunt/moodle into MOODLE_33_STABLE 2017-06-19 15:43:25 +01:00
Dan Poltawski 17eb11f801 Merge branch 'MDL-59173-33' of git://github.com/tobiasreischmann/moodle into MOODLE_33_STABLE 2017-06-19 12:27:44 +01:00
Dan Poltawski 3ae9ed890f Merge branch 'wip-MDL-51917-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-06-19 12:21:46 +01:00
Dan Poltawski 0ff0caefc0 Merge branch 'MDL-46418-33-hiddenrepos' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-06-19 10:33:35 +01:00
Jun Pataleta a5efab81c9 Merge branch 'MDL-44961-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-06-19 16:25:03 +08:00
Jun Pataleta bc84e4e4ae Merge branch 'MDL-58310-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-06-19 13:26:13 +08:00
John Okely e70d1e66d6 MDL-58310 ajax: suppress errors upon page unload 2017-06-19 11:45:29 +08:00
John Okely e256446c75 MDL-58310 message: No longer need to supress errors from messaging 2017-06-19 11:45:29 +08:00
Jake Dallimore e4780bf151 Merge branch 'MDL-59230-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-19 09:13:22 +08:00
Vladimir Zhirov 4b8d403606 MDL-59005 resource: fixed zip extraction for filenames in CP-1251/CP-866 2017-06-19 08:50:59 +08:00
Luca Bösch 8a32c0fdb3 MDL-58766 css: clean theme block alignment 2017-06-16 16:12:28 +02:00
David Mudrák a27fa5b50e MDL-59269 lang: Fix ability to uninstall certain language packs
In the issue MDL-39319 (6ddf92c77), the ability to uninstall multiple
language packs at once was added. By a mistake, the PARAM_ALPHAEXT was
used as paramater type for the dash-separated list of language packs to
be uninstalled. Language packs with a number in the name (such as
en_us_k12) do not pass the ALPHAEXT cleaning.

This patch changes the parameter cleaning to PARAM_SAFEPATH which is
more appropriate for the given scenario as language code themselves must
be SAFEDIRs.
2017-06-16 14:05:31 +02:00
Simey Lameze 3cf5c5152e MDL-59230 block_myoverview: add missing core notification module 2017-06-16 16:40:02 +08:00
Tobias Reischmann c484b0574e MDL-59173 tablelib.php: changed default of $params in set_sql to array()
Default of $params = null leads to a problem in query_db().
There this value is used in array_merge, which can not handle null
values. If null is passed for one of the params the outcome will be null
independent of the value of the second param!
2017-06-16 10:27:17 +02:00
Jake Dallimore dec00f6a53 weekly release 3.3+ 2017-06-16 13:29:39 +08:00
Jake Dallimore d51518e24d Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-06-16 13:29:38 +08:00
Jean-Roch Meurisse - University of Namur - Belgium 94925c38d0 MDL-59263 roles: Wrong order of parameters in calls to pix_icon function 2017-06-16 10:07:22 +08:00
David Mudrák 7abd8de776 MDL-46418 repositories: Fix how enabled repositories are populated
Repository instances are stored in the 'repository' table. Repositories
in the table are either 'Enabled and visible' or 'Enabled but hidden'.
Hidden repositories still serve their files, but are not visible in the
filepicker UI. Disabling a repository instance removes its record from
the table.

In the original implementation of the plugin manager (see b9934a17), the
method plugintype_repository::get_enabled_repositories() correctly
returned all records from the repository table. Then as a part of the
bigger refactoring in MDL-41437, the commit bde002b8 replaced the
original method with the new get_enabled_plugins() one which started to
return visible repositories only.

As a consequence, the admin tree stopped populating setting page nodes
for hidden repository instances. So attempting to visit their setting
page threw a section error. Credit goes to Ike Quigley for debugging and
tracing this down.

This patch fixes the way how the list of enabled repositories is
populated by the plugin manager so that both visible and hidden
repositories are returned again. This does not affect the filepicker
itself as it is using its own methods for obtaining the list.
2017-06-15 21:20:03 +02:00
Jake Dallimore a358927e9e MDL-58248 theme: use pix icon for side panel menu icon instead of char
Replaces the trigram for heaven char with the fa-bars pix icon for
improved support with all screen readers.
2017-06-15 17:08:33 +08:00
Simey Lameze 49e5b8438c MDL-57770 tool_lp: style fixes for the competency rule dialog 2017-06-15 15:38:23 +08:00
Mark Nelson 2b026b44f7 MDL-59140 core: apply limit only on courses to be shown in specific nav
There can be a different number of courses displayed in the
'Navigation' block and in the 'Flat' navigation. This patch
decides what courses we want to display on each, then
applies the 'navcourselimit' setting individually.
2017-06-15 13:36:14 +08:00
Ankit Agarwal 63bfa5afdb MDL-44961 logs: Keep log dates constant during restore 2017-06-14 15:21:54 +05:30
Jake Dallimore d08cd28dae Merge branch 'MDL-59142-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-14 11:36:19 +08:00
Marina Glancy 11438f4253 MDL-40408 mod_data: skip metadata fields during import 2017-06-14 11:32:24 +08:00
Dan Poltawski 5d7d2c0a45 Merge branch 'MDL-59171-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-06-13 14:40:45 +01:00
Dan Poltawski 9eb46e7d75 Merge branch 'MDL-59140_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-06-13 13:23:33 +01:00
Mark Nelson 481220cb4c MDL-59140 core: upgrade 'navcourselimit' if set to old default value 2017-06-13 18:22:58 +08:00
Mark Nelson d47b680074 MDL-59140 core: limit the number of courses shown in the navigation
If the user is enrolled in more courses than the limit then a 'More...'
link is displayed which takes the user to the course/index.php page.
2017-06-13 18:21:58 +08:00
Mark Nelson 76b6407cb8 MDL-59140 core: changes to the 'navcourselimit' setting
Changed the default and description.
2017-06-13 18:21:18 +08:00
Eloy Lafuente (stronk7) ca1e040bbf Merge branch 'wip-MDL-58523-33' of git://github.com/marinaglancy/moodle into MOODLE_33_STABLE 2017-06-13 11:21:12 +02:00
Jun Pataleta 1312c844a1 Merge branch 'MDL-59012-33-linkurl' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-06-14 17:11:47 +08:00
Jun Pataleta a21c3208ea Merge branch 'MDL-58991-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-14 16:56:23 +08:00
Dan Poltawski a1692f6362 Merge branch 'MDL-41426_33-block-completionstatus-spaces' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-06-13 09:53:59 +01:00
Eloy Lafuente (stronk7) 9bcb6e1bec MDL-46322 database: alias sort fields to avoid ambiguous naming 2017-06-13 09:17:04 +01:00
Jake Dallimore 192a355707 Merge branch 'MDL-58136-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-06-13 15:54:42 +08:00
Damyon Wiese 3709386ed5 MDL-58136 course: Remove lines from unit test
Remove unused vars and logic from the unit test for classifying a course.
2017-06-13 15:07:50 +08:00
Marina Glancy c159483796 MDL-51917 course completion: order activities in reports
Thanks to Nick Phillips for initial patch
2017-06-13 14:49:35 +08:00
Marina Glancy 9bdff1611b MDL-58523 mod_feedback: deleting response should reset completion 2017-06-13 14:36:24 +08:00
Jake Dallimore ca18b0c33d Merge branch 'MDL-51691-moodle33' of https://github.com/jebarviabb/moodle into MOODLE_33_STABLE 2017-06-13 10:32:45 +08:00
Damyon Wiese 0fb6f059a9 MDL-58136 navigation: Ensure we have all course fields
To properly classify courses we need the start/end dates etc.
2017-06-13 10:09:44 +08:00
Marcus Green 7dc35ed9d2 MDL-58248 theme_boost: label/span for sidepanel expand button
Add string "Side panel" to make the purpose of
trigram/hamburger icon at top left clearer, particularly
when using screen readers e.g. Jaws/NVDA.
Currently it reads out only "expand"
2017-06-13 09:50:01 +08:00
Simey Lameze 481a5ce58b MDL-59142 core_theme: cache post-processed css
Thanks Cameron Ball for the base patch
2017-06-13 09:36:44 +08:00
Damyon Wiese af153671de MDL-58472 videojs: Force manual initialise
If we let videojs auto-init the video/audio tags present in the page - we cannot guarantee that the
youtube library will be loaded by the time video.js is processing the tag.

Video.js uses the presence of a data-setup attibute to signal that it should auto-init this tag, so
we have to rename our config attribute to something else.
2017-06-13 09:12:25 +08:00
Eloy Lafuente (stronk7) 48b929667e Merge branch 'MDL-59032-33' of git://github.com/damyon/moodle into MOODLE_33_STABLE 2017-06-13 01:28:22 +02:00
Eloy Lafuente (stronk7) 6dc00c8423 Merge branch 'MDL-40015-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-06-13 01:23:43 +02:00
Eloy Lafuente (stronk7) 290ec233f5 Merge branch 'mdl58161-moodle33' of https://github.com/tlock/moodle into MOODLE_33_STABLE 2017-06-13 01:21:54 +02:00
Eloy Lafuente (stronk7) 56aa74ed3c Merge branch 'MDL-59056_33-admin-allowstealth-select-checkbox' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-06-13 01:19:26 +02:00
Josh Ebarvia fe3d722d69 MDL-51691 assignsubmission_feedback: Fix delete comments 2017-06-13 08:35:25 +09:30
Eloy Lafuente (stronk7) 792560a608 Merge branch 'MDL-58907_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-06-13 01:03:43 +02:00
Eloy Lafuente (stronk7) 7041dc6f8a Merge branch 'MDL-59132-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-06-13 00:45:09 +02:00
Tim Lock 57fb48743f MDL-58161 user: tests: user_can_view_profile fails under certain cases 2017-06-13 08:10:43 +09:30
Eloy Lafuente (stronk7) a9712dacbe Merge branch 'MDL-59112-33' of git://github.com/jleyva/moodle into MOODLE_33_STABLE 2017-06-12 14:39:14 +02:00
Dan Poltawski c0f4b8b3c1 Merge branch 'mdl46322-moodle33' of https://github.com/AndresMelo/moodle into MOODLE_33_STABLE 2017-06-12 10:29:18 +01:00
Damyon Wiese 9a9b9e53f0 MDL-58136 cache: Add a course completion cache
The last change added 1 db read per course per page which is not OK. Add a cache to compensate.
2017-06-12 16:08:57 +08:00
Damyon Wiese e1d15194bc MDL-58136 boost: Limit courses in flatnav
Only show "in-progress" courses in the boost flat navigation (as per the myoverview block).
2017-06-12 16:08:18 +08:00
David Mudrák 5b2f32ca92 MDL-58985 course: Fix display of availability information
The availability info text can be either a one line short text such as
"Hidden from students" but it can also be a long HTML formatted text
with the list of all restricted access conditions. For the latter, using
bootstrap labels was not appropriate.

This extends the template context data with some boolean flags that
allow to better distinguish the source and meaning of the availability
information and display it accordingly.

Credit goes to Marina Glancy for the solution idea.
2017-06-12 09:30:57 +02:00
Jun Pataleta a53a439c08 Merge branch 'MDL-59042-33-upgradefix' of github.com:snake/moodle into MOODLE_33_STABLE 2017-06-12 15:30:54 +08:00
Jake Dallimore 2c12e7f534 MDL-59042 upgrade: fix for non existent table in core upgrade.
Moved upgrade step to the assign mod where table is known to exist.
2017-06-12 15:26:03 +08:00
Adrian Greeve 7255306cc8 MDL-58729 database: Improve performance of CLI tool.
Imporve the speed with which mysql_collation converts to
a different collation.
2017-06-12 14:14:35 +08:00
Jake Dallimore b545e84294 Merge branch 'MDL-57103-33' of https://github.com/xow/moodle into MOODLE_33_STABLE 2017-06-12 14:00:25 +08:00
Jun Pataleta 72ebc73897 Merge branch 'MDL-59154-33' of git://github.com/andrewnicols/moodle into MOODLE_33_STABLE 2017-06-12 13:45:16 +08:00
Jun Pataleta 856e1c24c2 Merge branch 'MDL-59042-33' of git://github.com/snake/moodle into MOODLE_33_STABLE 2017-06-12 13:29:21 +08:00
Jake Dallimore 5b1dffd5b0 MDL-59042 upgrade: datafix assign group overrides with null priority
Find any events records for assign group overrides having null priority
and sets their priority to the sortorder value from the corresponding
assign_overrides table entry.
2017-06-12 13:19:28 +08:00
John Okely 6ebff58d8c MDL-57103 lib: Force ajax renderer for all ajax fatal errors 2017-06-12 10:36:59 +08:00
Mark Nelson 54bee25c65 MDL-58907 block_myoverview: change URL when tab is selected
We then check if this paramter exists in the URL and if it
does we display the specified tab.
2017-06-12 10:35:23 +08:00
Mark Nelson 355fefbe71 MDL-58907 block_myoverview: display last tab user was on 2017-06-12 10:35:23 +08:00
Mark Nelson 11a24a823b MDL-58907 block_myoverview: added setting to select default tab 2017-06-12 10:35:23 +08:00
Jun Pataleta 75797500ae MDL-59171 mod_lti: Set mod_lti_view_lti's type to 'read' 2017-06-12 08:35:03 +08:00
Jake Dallimore e2b8d30052 MDL-59042 assign: Group override edit no longer resets event priority
Fixed a bug in which $fromform->sortorder wasn't set before passing
$formdata to assign_update_events, resulting in the existing event
priority being incorrectly nulled and breaking the effective override.
2017-06-09 15:28:08 +08:00
Tim Lock c14ce14e3c MDL-55979 quiz: Fix error moving question from last page
When moving the last question from the last page to the last slot of the previous page would show the error in the error
log but move successfully.
2017-06-09 08:36:08 +09:30
Luca Bösch 571e862135 MDL-59056 admin: allowstealth yes/no checkbox instead of on/off 2017-06-08 21:09:54 +02:00
Luca Bösch 1e9ba1916b MDL-41426 block: Whitespace lacking in completion status block 2017-06-08 19:10:41 +02:00
AMOS bot ddd849e1d5 Automatically generated installer lang files 2017-06-09 00:18:26 +08:00
Dan Poltawski 760ed1dfde weekly release 3.3+ 2017-06-08 12:16:24 +01:00
Dan Poltawski 95a6fe8b05 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-06-08 12:16:23 +01:00
Juan Leyva 0fca28e197 MDL-59132 mod_feedback: Fix anonymous responses numbering
This was done correctly by the web scrip but not by the WS.
2017-06-08 11:16:52 +01:00
Juan Leyva cc5235bb77 MDL-40015 core_course: Fix description of duplicate_course WS
It said that the duplication didn’t include user data, but that’s not
true since there is a parameter to include it.
2017-06-08 10:20:39 +01:00
Juan Leyva 1099b7ce1d MDL-59112 theme_clean: Always return expected moodle_url
The function was returned some times a moodle_url object and another
times just a string with a relative URL.
2017-06-08 09:40:39 +01:00
Andrew Nicols dc403b8386 MDL-59154 theme: Lock for all caching builds
The previous behaviour was to only lock when in theme designer mode.
As a result, when generating the theme for after a reset, each new
client was starting the generation afresh and no locking was taking
place at all.
2017-06-08 12:05:27 +08:00
Dan Poltawski 23bec87007 Merge branch 'MDL-59101-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-06-07 16:26:19 +01:00
Jun Pataleta 924db1a0a6 MDL-59101 calendar: Properly calculate expected until date 2017-06-07 23:13:05 +08:00
Jake Dallimore f8326931a1 Merge branch 'MDL-59076_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-06-07 09:24:57 +08:00
Damyon Wiese 0a98628841 MDL-58908 auth_oauth2: Don't kill gravatar
If gravatar is enabled, don't update profile pictures.
2017-06-06 17:29:56 +08:00
Dan Poltawski d72a096797 Merge branch 'MDL-58658' of https://github.com/sk-unikent/moodle into MOODLE_33_STABLE 2017-06-06 10:02:32 +01:00
Damyon Wiese a6379acaf3 MDL-59032 scorm: Don't show action events to teachers 2017-06-06 15:57:39 +08:00
Dan Poltawski e002d8c2db Merge branch 'MDL-59086_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-06-06 08:44:49 +01:00
Simey Lameze 2b7268d645 MDL-58991 report_stats: use same date handling on chart rendering
This commmit fixes applies the same date handling used on stats
table render to the charts render.
2017-06-06 13:56:15 +08:00
Mark Nelson 6e34867b93 MDL-59076 format_weeks: if 'enddate' does not exist in backup then use 0 2017-06-06 12:42:36 +08:00
Jun Pataleta 9a6e95557f Merge branch 'MDL-58646-33' of git://github.com/danpoltawski/moodle into MOODLE_33_STABLE 2017-06-06 12:24:29 +08:00
Jake Dallimore 88daff0ff3 Merge branch 'MDL-58900-33' of git://github.com/lameze/moodle into MOODLE_33_STABLE 2017-06-06 11:39:43 +08:00
Eloy Lafuente (stronk7) 3309800768 Merge branch 'MDL-58826_33_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_33_STABLE 2017-06-06 01:44:56 +02:00
Eloy Lafuente (stronk7) adbba36a63 Merge branch 'MDL-59096-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-06-06 01:41:41 +02:00
Dan Poltawski 37ff4578be Merge branch 'MDL-59080_M33' of git://github.com/lazydaisy/moodle into MOODLE_33_STABLE 2017-06-05 12:49:46 +01:00
Mark Johnson cbc3742d71 MDL-58826 theme_boost: Prevent fatal errors in action menu behat steps 2017-06-05 09:05:34 +01:00
AMOS bot 56e407f8a0 Automatically generated installer lang files 2017-06-05 00:05:48 +08:00
AMOS bot 362e7721f5 Automatically generated installer lang files 2017-06-04 00:07:14 +08:00
AMOS bot 53fd95f715 Automatically generated installer lang files 2017-06-04 00:07:14 +08:00
Dan Poltawski 078aaae0cf Merge branch 'MDL-59091_gherkinlint_fix_33' of https://github.com/mrmark/moodle into MOODLE_33_STABLE 2017-06-03 08:54:44 +01:00
Mark Nielsen 4f66cd826f MDL-59091 behat: Fix gherkinlint errors
Just whitespace problems.
2017-06-02 09:36:31 -07:00
Mark Nielsen 028f587670 MDL-59091 behat: Properly propagate gherkinlint exit code 2017-06-02 09:36:18 -07:00
AMOS bot 0b2e862c7a Automatically generated installer lang files 2017-06-03 00:07:42 +08:00
sam marshall 8db0bcc018 MDL-59096 Tasks: Web running local plugin scheduled tasks fails 2017-06-02 17:07:01 +01:00
Dan Poltawski bb6a2082f8 MDL-58646 lib: import latest sabberworm/PHP-CSS-Parser
This version includes a fix[1] contributed by Frédéric Massart investigating
our compilation time issues, which significantly improves the speed of
processing font awesome.

Thanks, Fred!

[1] https://github.com/sabberworm/PHP-CSS-Parser/pull/120
2017-06-02 11:04:23 +01:00
Mary Evans dfac161651 MDL-59080 theme_boost: make drawer.scss variables default
--author="Urs Hunkler <urs.hunkler@unodo.de>"
2017-06-02 07:57:57 +01:00
Dan Poltawski f41c1f82bc weekly release 3.3+ 2017-06-01 09:28:28 +01:00
Dan Poltawski 443f993467 Merge branch 'install_33_STABLE' of https://git.in.moodle.com/amosbot/moodle-install into MOODLE_33_STABLE 2017-06-01 09:28:27 +01:00
Jake Dallimore 0e72aac68a Merge branch 'MDL-59094-33' of git://github.com/danpoltawski/moodle into MOODLE_33_STABLE 2017-06-01 15:28:34 +08:00
AMOS bot 4cd564dd65 Automatically generated installer lang files 2017-06-01 00:12:20 +08:00
Dan Poltawski c6c462903e Merge branch 'MDL-59093-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-05-31 11:10:38 +01:00
Dan Poltawski be4a2e7773 MDL-59094 npm: Update shrinkwrap file to npm 5 generated
Starting with npm version 5, npm install will generate a lockfile
(now named package-lock.json) or update the existing npm-shrinkwrap.json

To prevent changes being generated in the codebase when this happens, we
need to commit the version 5 generated shrinkwrap.

This is related to a general overhaul [1] of how npm manages things. But
for our purposes, we the lockfile should be BC to previous versions [2].

Going forward, we need to ensure we generate the lockfile on npm >=5 to
prevent differences from the previously un-versioned lockfile.

[1] http://blog.npmjs.org/post/161081169345/v500
[2] https://github.com/npm/npm/issues/16728#issuecomment-305104149
2017-05-31 10:11:40 +01:00
Jun Pataleta 283140134b MDL-59093 calendar: Use a fixed start day for forever BYMONTH test 2017-05-31 15:02:04 +08:00
Simey Lameze c779c4fa0b MDL-58900 mod_assign: fix incorrect overrides ordering 2017-05-31 10:51:21 +08:00
Jake Dallimore 4577aa88fd Merge branch 'MDL-54887-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-05-31 08:39:08 +08:00
Eloy Lafuente (stronk7) 3add309d96 Merge branch 'MDL-49988_fix_wiki_preview_33_STABLE' of https://github.com/DMaterka/moodle into MOODLE_33_STABLE 2017-05-31 00:30:19 +02:00
Dan Poltawski 1c2a935975 Merge branch 'MDL-58997_33-group-names-multilang' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-05-30 16:57:34 +01:00
Luca Bösch 574aa817c1 MDL-58997 calendar: Group names passing multilang filters. 2017-05-30 16:51:38 +02:00
Eloy Lafuente (stronk7) 98a7bb9cd5 Merge branch 'MDL-58994-33' of git://github.com/cameron1729/moodle into MOODLE_33_STABLE 2017-05-30 12:50:51 +02:00
Dan Poltawski f35ff40f4a Merge branch 'MDL-49040-moodle33' of https://github.com/jebarviabb/moodle into MOODLE_33_STABLE 2017-05-30 11:42:34 +01:00
Jun Pataleta 2529f11ce3 Merge branch 'MDL-57313-33-clibootswatch' of git://github.com/mudrd8mz/moodle into MOODLE_33_STABLE 2017-05-30 16:57:51 +08:00
Jun Pataleta 26f4cf3ad8 MDL-54887 calendar: PR fixes
* Use the calendar_event::description property and format it using
format_text() on it in order to apply the appropriate filters.
* Then use html_to_text() on it to strip the tags and convert the
description to plain text while converting <br> and <p> tags to
line breaks.
2017-05-30 16:54:05 +08:00
Soon-Systems 23ec9e80b4 MDL-54887 calendar: Format summary + description of an event for export 2017-05-30 16:54:05 +08:00
Dan Poltawski 8710174991 Merge branch 'MDL-59014-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-05-30 08:33:37 +01:00
Mark Nelson e399833263 MDL-59086 gradereport_grader: style 'Save changes' button 2017-05-30 13:44:04 +08:00
AMOS bot 59411b45f6 Automatically generated installer lang files 2017-05-28 14:07:00 +08:00
David Mudrák 767622050e MDL-57313 boost: Fix the CLI utility import-bootswatch.php 2017-05-26 09:52:13 +02:00
Dan Poltawski 6696cff321 weekly release 3.3+ 2017-05-24 19:14:46 +01:00
Tim Hunt f59741cc6c MDL-59048 user tours: avoid white-on-white text in Clean 2017-05-24 17:28:02 +01:00
Andrew Nicols 524724c642 Merge branch 'MDL-59011-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-05-24 14:18:58 +08:00
Ankit Agarwal ca31084da2 MDL-59011 restore: Check for userride only for activity events 2017-05-24 09:59:28 +05:30
Andrew Nicols 52ecbf8f4c MDL-58577 stats: Correct groupby when getting report options 2017-05-23 19:45:28 +08:00
Andrew Nicols d9c2abaa65 Merge branch 'MDL-58577_33-statistics-report-header-multilang' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-05-23 19:45:24 +08:00
David Mudrák 30613bca8d MDL-59012 auth_oauth2: Do not escape URL in plain text emails 2017-05-23 13:38:28 +02:00
Jun Pataleta cb3bad1d50 MDL-59014 calendar: Unescape event URL for the mini calendar 2017-05-23 17:21:18 +08:00
Luca Bösch e4eab531bf MDL-58577 stats: Use multilang with role in header 2017-05-23 11:12:22 +02:00
Jun Pataleta 068d573375 Merge branch 'MDL-58895-33' of git://github.com/ankitagarwal/moodle into MOODLE_33_STABLE 2017-05-23 16:53:45 +08:00
Jake Dallimore df78e4c8ab Merge branch 'MDL-58921_33-calculated-question-name-multilang' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-05-23 16:26:25 +08:00
Jun Pataleta 5fbe152a58 Merge branch 'MDL-58165-33' of https://github.com/abias/moodle into MOODLE_33_STABLE 2017-05-23 14:47:11 +08:00
Ankit Agarwal 7fe005f6d1 MDL-58895 groups: Add bootstrap classes to buttons 2017-05-23 12:05:56 +05:30
Alexander Bias 2a615a6031 MDL-58165 navigation: Add node key to private files navigation node 2017-05-23 07:22:23 +02:00
Josh Ebarvia cb065a2d2f MDL-49040 gradereport_grader: Fix feedback truncation after & char 2017-05-23 13:03:44 +09:30
Dan Poltawski e0adce5360 Merge branch 'MDL-58922_33-calculatedmulti-question-name-multilang' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-05-22 10:45:52 +01:00
Luca Bösch 613db5afcb MDL-58921 questions: Calculated question name passing multilang.
In edit calculated question the question name does pass format_string to process multilang tags.
2017-05-22 11:36:54 +02:00
Luca Bösch b38538fbdf MDL-58922 questions: Calculatedmulti question name passing multilang.
In edit calculatedmulti question the question name does pass format_string to process multilang tags.
2017-05-22 11:32:18 +02:00
David Monllao f96167c02e Merge branch 'MOODLE_33_STABLE_MDL-56973' of https://github.com/fwsl/moodle into MOODLE_33_STABLE 2017-05-22 15:14:09 +08:00
Jake Dallimore c708549705 Merge branch 'MDL-56617_33-course-cbm-grade-to-pass' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-05-22 14:32:17 +08:00
Jun Pataleta d14281e215 Merge branch 'MDL-58933_33' of git://github.com/stronk7/moodle into MOODLE_33_STABLE 2017-05-22 14:12:57 +08:00
Mark Nelson 19f6ca9457 MDL-58986 mod_quiz: add CSS classes to buttons on comment page 2017-05-22 12:23:04 +08:00
Dan Poltawski 7b4eb6082f MDL-58966 completion: improve dashboard string 2017-05-22 10:48:00 +08:00
Henning Bostelmann 8b8fbc6b84 MDL-57957 mod_assign: show feedback file in absence of grade item 2017-05-22 10:44:18 +08:00
Eloy Lafuente (stronk7) 906b385784 MDL-58933 upgrade: add 3.3.0 separation line to all upgrade scripts 2017-05-19 19:23:55 +02:00
Luca Bösch e13e5a42bc MDL-56617 mod_quiz: No grade to pass check if CBM used
When certainty-based marking is used, grades can 'exceed' the maximum grade
(because they are multiplied by factors). Therefore, in such cases, don't show
no warning.
2017-05-19 12:34:21 +02:00
Grzegorz Ziółek 1fcfc991b9 MDL-56973 wiki: New page title readonly after changing course language 2017-05-19 11:11:55 +02:00
Cameron Ball a4eaa35e23 MDL-58994 core_calendar: Coalesce event sort field
There are situations where we need to sort events on a field called
"timesort", but sometimes it is not set. So we can fall back to
"timestart" in this case.
2017-05-19 15:11:32 +08:00
David Monllao df6749b03b weekly release 3.3+ 2017-05-19 13:08:39 +08:00
Andres 6fc4a6c17a MDL-46322 mod_assign: Only list enrolled graders as potential markers 2017-05-18 22:32:59 -05:00
Andres Melo f13c34e4a9 MDL-46322 mod_assign: Only list enrolled graders as potential markers 2017-05-17 16:48:43 -05:00
Mark Nelson 0899f6b9f9 MDL-58776 core_tag: removed whitespace from id attribute
This was preventing the JS from finding the element.
2017-05-17 12:13:54 +01:00
Simey Lameze b68abdc7c2 MDL-58884 core_competency: add exporter required course fields 2017-05-17 15:01:05 +08:00
Jake Dallimore 7e68b9a0af Merge branch 'MDL-58947-m33' of https://github.com/sammarshallou/moodle into MOODLE_33_STABLE 2017-05-17 09:16:01 +08:00
Andrew Nicols 63752139c4 Merge branch 'MDL-58795-moodle33' of https://github.com/jebarviabb/moodle into MOODLE_33_STABLE 2017-05-17 07:00:49 +08:00
Daniel Materka 67803cb430 MDL-49988 wiki: fix broken page layout if html contains line breaks 2017-05-16 19:10:26 +01:00
Ankit Agarwal 54b24b8a24 MDL-58776 tags: Add bootstrap classes to buttons 2017-05-16 17:51:11 +01:00
Iñaki Arenaza 3e97f327cf MDL-57558 ldap: fix ldap_get_entries_moodle()
While ldap_get_entries_moodle() PHPdocs state that it returns "array
ldap-entries with lower-cased attributes as indexes.", this is not true. It
uses ldap_get_attributes() internally, which returns both numerically indexed
attribute names, and dictionary-like entries indexed by attribute names.

Current code lowercases the dictionary-like entries, but then uses the
numerically indexed entries for the attribute names used as keys in the
returned array. The numerically indexed names might or might not be lowercased,
depending on the LDAP server and PHP version) version. E.g., OpenLDAP 2.x,
Novell eDirectory 8.x and MS Active Directory return mixed-cased attribute
names, and PHP 5.x and PHP 7.x don't lowercase them inside ldap_get_entries().

This is probably why all calls to ldap_get_entries_moodle() are followed by
calls to array_change_key_case(), even if that shouldn't be necessary.

So make sure we always return lower-cased attributs as indexes and add some
unit tests to avoid regressions in the future.
2017-05-16 10:48:49 +01:00
Jun Pataleta e91ffe1531 Merge branch 'MDL-58811-33-extra-slash' of https://github.com/dmitriim/moodle into MOODLE_33_STABLE 2017-05-16 17:42:55 +08:00
Josh Ebarvia c4d5303ce0 MDL-58795 gradereport_grader: Prevent duplicates in grader report
Currently, the sorting being used for the grader report table
(asc/desc arrows) is just the grade_grades.finalgrade.
This adds grade_grades.userid in the sort to prevent duplicate
in records returned when using pages.
2017-05-16 18:49:45 +09:30
Jake Dallimore 0712ef7f54 Merge branch 'MDL-58723-33' of git://github.com/junpataleta/moodle into MOODLE_33_STABLE 2017-05-16 15:16:34 +08:00
Jun Pataleta ddf6c958f8 MDL-58723 calendar: Better testing of forever recurring events
* Change the start date of the parent event to the current date
  for tests that with events that recur forever.
* Limit query results to 100 for events that recur forever that can
  generate more than 100 event records.
2017-05-16 14:40:39 +08:00
Andrew Nicols fbf216799c Merge branch 'MDL-58756_33-statslib-roles-multilang' of https://github.com/lucaboesch/moodle into MOODLE_33_STABLE 2017-05-16 13:52:45 +08:00
Luca Bösch f8b0ee68bf MDL-58756 stats: Use multilang with role . 2017-05-16 07:27:00 +02:00
Dmitrii Metelkin 069683984a MDL-58811 backup: fix an extra slash on restore for the legacy files 2017-05-16 14:34:10 +10:00
Issam Taboubi 7a7dd2ff1f MDL-58884 competency: Inaccurate stats proficient competencies in course 2017-05-16 10:42:39 +08:00
Stephen Vickers 8a0ed98b81 MDL-58770 mod_lti: Strip HTML from parameters
Remove HTML tags from parameters which should be plain text.
2017-05-16 09:58:09 +08:00
sam marshall ce904a961d MDL-58947 Search: Label URLs not correctly calculated 2017-05-15 17:57:58 +01:00
Ankit Agarwal 5ff898804f MDL-58929 converters: Make link title consistent 2017-05-15 12:07:43 +01:00
Dan Poltawski 3bb50a471c Merge branch 'MDL-58936_33' of git://github.com/markn86/moodle into MOODLE_33_STABLE 2017-05-15 11:45:19 +01:00
Cameron Ball 660182a172 MDL-58496 mod_chat: Update timesort when updating timestart
Previously when a repeating chat was updating the calendar
it would only update the timestart column. It needs to also
update the timesort column to display correctly on the new
overview.
2017-05-15 11:14:50 +01:00
John Okely e8f0664d53 MDL-58916 user_profile: Pass site context when determining menu options 2017-05-15 11:01:34 +01:00
Cameron Ball cb495b995c MDL-58841 mod_assign: Style "view all" link on grading summary 2017-05-15 10:46:25 +01:00
Luca Bösch c37bbda3ef MDL-58852 choice: Use multilang for choice options in charts 2017-05-15 10:23:29 +01:00
Andrew Nicols 81432e74f4 Merge branch 'MDL-58893-33-missing-div' of https://github.com/dmitriim/moodle into MOODLE_33_STABLE 2017-05-15 15:13:04 +08:00
Luca Bösch d231bf1272 MDL-58920 questions: Calculated question name passing multilang.
In "Shared wild cards" table calculated question name do pass format_string to process multilang tags.
Thus, not breaking the layout any more.
2017-05-15 14:44:06 +08:00
Dmitrii Metelkin 1aee3e9394 MDL-58893 portfolio: add missing closing div 2017-05-15 15:56:34 +10:00
Mark Nelson 9362f598dd MDL-58936 core: ensure 'page->context' is not null
When using $page->context it calls magic_get_context() in lib/pagelib.php.
This method sets the context to context_system::instance() if it is currently
null and returns that as the context. However, when installing a new site
context_system::instance() also returns null.
2017-05-15 12:40:29 +08:00
Skylar Kelty 761ac5a0aa MDL-58658 caching: Add static acceleration unit test for empty arrays 2017-05-11 10:56:04 +01:00
Skylar Kelty 32ec2da151 MDL-58658 caching: Fix static acceleration for empty arrays 2017-04-20 09:49:09 +01:00
Daniel Thee Roperto 589c8eb61b MDL-57246 forum: Fixed mod/forum/view.php redirection.
Fixed: Trying to view a forum without the capability may lead you to a broken page.
2017-04-04 16:16:54 +10:00
818 changed files with 14147 additions and 4001 deletions
+27 -6
View File
@@ -2,7 +2,7 @@
# process (which uses our internal CI system) this file is here for the benefit
# of community developers git clones - see MDL-51458.
sudo: false
sudo: required
# We currently disable Travis notifications entirely until https://github.com/travis-ci/travis-ci/issues/4976
# is fixed.
@@ -17,7 +17,11 @@ php:
- 5.6
addons:
postgresql: "9.3"
postgresql: "9.6"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
services:
- redis-server
@@ -49,12 +53,9 @@ matrix:
fast_finish: true
include:
# Run grunt/npm install on lowest supported npm version
- php: 7.1
env: DB=none TASK=GRUNT NVM_VERSION='4'
# Run grunt/npm install on highest version ('node' is an alias for the latest node.js version.)
- php: 7.1
env: DB=none TASK=GRUNT NVM_VERSION='node'
env: DB=none TASK=GRUNT NVM_VERSION='8.9'
exclude:
# MySQL - it's just too slow.
@@ -73,6 +74,26 @@ cache:
- $HOME/.npm
install:
- >
if [ "$DB" = 'mysqli' ];
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo stop mysql
sudo mv /var/lib/mysql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/mysql /var/lib/mysql
sudo start mysql
fi
- >
if [ "$DB" = 'pgsql' ];
then
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=1024m tmpfs /mnt/ramdisk
sudo service postgresql stop
sudo mv /var/lib/postgresql /mnt/ramdisk
sudo ln -s /mnt/ramdisk/postgresql /var/lib/postgresql
sudo service postgresql start 9.6
fi
- >
if [ "$TASK" = 'PHPUNIT' ];
then
+1 -1
View File
@@ -338,7 +338,7 @@ module.exports = function(grunt) {
opts: {stdio: 'inherit', env: process.env}
}, function(error, result, code) {
// Propagate the exit code.
done(code);
done(code === 0);
});
};
+1 -1
View File
@@ -89,7 +89,7 @@ if ($PAGE->user_allowed_editing()) {
$savebutton = false;
$outputhtml = '';
foreach ($settingspage->children as $childpage) {
if ($childpage->is_hidden()) {
if ($childpage->is_hidden() || !$childpage->check_access()) {
continue;
}
if ($childpage instanceof admin_externalpage) {
+41 -5
View File
@@ -53,7 +53,7 @@ Options:
-h, --help Print out this help
Example:
\$ sudo -u www-data /usr/bin/php admin/cli/mysql_collation.php --collation=utf8_general_ci
\$ sudo -u www-data /usr/bin/php admin/cli/mysql_collation.php --collation=utf8mb4_unicode_ci
";
if (!empty($options['collation'])) {
@@ -145,9 +145,22 @@ if (!empty($options['collation'])) {
$skipped++;
} else {
$DB->change_database_structure("ALTER TABLE $table->name DEFAULT CHARACTER SET $charset DEFAULT COLLATE = $collation");
echo "CONVERTED\n";
$converted++;
try {
$DB->change_database_structure("ALTER TABLE $table->name CONVERT TO CHARACTER SET $charset COLLATE $collation");
echo "CONVERTED\n";
$converted++;
} catch (ddl_exception $e) {
$result = mysql_set_row_format($table->name, $charset, $collation, $engine);
if ($result) {
echo "CONVERTED\n";
$converted++;
} else {
// We don't know what the problem is. Stop the conversion.
cli_error("Error: Tried to convert $table->name, but there was a problem. Please check the details of this
table and try again.");
die();
}
}
}
$sql = "SHOW FULL COLUMNS FROM $table->name WHERE collation IS NOT NULL";
@@ -190,7 +203,7 @@ if (!empty($options['collation'])) {
$DB->change_database_structure($sql);
} else {
echo "ERROR (unknown column type: $column->type)\n";
$error++;
$errors++;
continue;
}
echo "CONVERTED\n";
@@ -290,3 +303,26 @@ function mysql_get_column_collations($tablename) {
$rs->close();
return $collations;
}
function mysql_set_row_format($tablename, $charset, $collation, $engine) {
global $DB;
$sql = "SELECT row_format
FROM INFORMATION_SCHEMA.TABLES
WHERE table_schema = DATABASE() AND table_name = ?";
$rs = $DB->get_record_sql($sql, array($tablename));
if ($rs) {
if ($rs->row_format == 'Compact' || $rs->row_format == 'Redundant') {
$rowformat = $DB->get_row_format_sql($engine, $collation);
// Try to convert to compressed format and then try updating the collation again.
$DB->change_database_structure("ALTER TABLE $tablename $rowformat");
$DB->change_database_structure("ALTER TABLE $tablename CONVERT TO CHARACTER SET $charset COLLATE $collation");
} else {
// Row format may not be the problem. Can not diagnose problem. Send fail reply.
return false;
}
} else {
return false;
}
return true;
}
+178
View File
@@ -1754,6 +1754,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -1919,6 +1920,7 @@
<VENDOR name="oracle" version="10.2" />
</DATABASE>
<PHP version="5.6.5" level="required">
<RESTRICT function="restrict_php_version_72" message="unsupportedphpversion72" />
</PHP>
<PCREUNICODE level="optional">
<FEEDBACK>
@@ -2081,4 +2083,180 @@
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
<MOODLE version="3.4" requires="3.0">
<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>
+8 -1
View File
@@ -869,10 +869,17 @@ $cachewarnings = cache_helper::warnings();
$eventshandlers = $DB->get_records_sql('SELECT DISTINCT component FROM {events_handlers}');
$themedesignermode = !empty($CFG->themedesignermode);
// Check if a directory with development libraries exists.
if (is_dir($CFG->dirroot.'/vendor') || is_dir($CFG->dirroot.'/node_modules')) {
$devlibdir = true;
} else {
$devlibdir = false;
}
admin_externalpage_setup('adminnotifications');
$output = $PAGE->get_renderer('core', 'admin');
echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed, $cronoverdue, $dbproblems,
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings, $eventshandlers, $themedesignermode);
$registered, $cachewarnings, $eventshandlers, $themedesignermode, $devlibdir);
+14 -6
View File
@@ -128,7 +128,7 @@ class hub_selector_form extends moodleform {
//remove moodle.org from the hub list
foreach ($hubs as $key => $hub) {
if ($hub['url'] == HUB_MOODLEORGHUBURL) {
if ($hub['url'] == HUB_MOODLEORGHUBURL || $hub['url'] == HUB_OLDMOODLEORGHUBURL) {
unset($hubs[$key]);
}
}
@@ -225,19 +225,25 @@ class site_registration_form extends moodleform {
$imageurl = get_config('hub', 'site_imageurl_' . $cleanhuburl);
$privacy = get_config('hub', 'site_privacy_' . $cleanhuburl);
$address = get_config('hub', 'site_address_' . $cleanhuburl);
if ($address === false) {
$address = '';
}
$region = get_config('hub', 'site_region_' . $cleanhuburl);
$country = get_config('hub', 'site_country_' . $cleanhuburl);
if ($country === false) {
$country = $admin->country;
if (empty($country)) {
$country = $admin->country ?: $CFG->country;
}
$language = get_config('hub', 'site_language_' . $cleanhuburl);
if ($language === false) {
$language = current_language();
$language = explode('_', current_language())[0];
}
$geolocation = get_config('hub', 'site_geolocation_' . $cleanhuburl);
if ($geolocation === false) {
$geolocation = '';
}
$contactable = get_config('hub', 'site_contactable_' . $cleanhuburl);
$emailalert = get_config('hub', 'site_emailalert_' . $cleanhuburl);
$emailalert = ($emailalert === 0) ? 0 : 1;
$emailalert = ($emailalert === false || $emailalert) ? 1 : 0;
$coursesnumber = get_config('hub', 'site_coursesnumber_' . $cleanhuburl);
$usersnumber = get_config('hub', 'site_usersnumber_' . $cleanhuburl);
$roleassignmentsnumber = get_config('hub', 'site_roleassignmentsnumber_' . $cleanhuburl);
@@ -306,11 +312,12 @@ class site_registration_form extends moodleform {
$mform->addElement('hidden', 'regioncode', '-');
$mform->setType('regioncode', PARAM_ALPHANUMEXT);
$countries = get_string_manager()->get_list_of_countries();
$countries = ['' => ''] + get_string_manager()->get_list_of_countries();
$mform->addElement('select', 'countrycode', get_string('sitecountry', 'hub'), $countries);
$mform->setDefault('countrycode', $country);
$mform->setType('countrycode', PARAM_ALPHANUMEXT);
$mform->addHelpButton('countrycode', 'sitecountry', 'hub');
$mform->addRule('countrycode', $strrequired, 'required', null, 'client');
$mform->addElement('text', 'geolocation', get_string('sitegeolocation', 'hub'),
array('class' => 'registration_textfield'));
@@ -328,6 +335,7 @@ class site_registration_form extends moodleform {
$mform->addElement('text', 'contactphone', get_string('sitephone', 'hub'),
array('class' => 'registration_textfield'));
$mform->setType('contactphone', PARAM_TEXT);
$mform->setDefault('contactphone', $contactphone);
$mform->addHelpButton('contactphone', 'sitephone', 'hub');
$mform->setForceLtr('contactphone');
+2 -7
View File
@@ -181,13 +181,8 @@ if (empty($cancel) and $unregistration and !$confirm) {
echo $OUTPUT->header();
//check if the site is registered on Moodle.org and display a message about registering on MOOCH
$registered = $DB->count_records('registration_hubs', array('huburl' => HUB_MOODLEORGHUBURL, 'confirmed' => 1));
if (empty($registered)) {
$warningmsg = get_string('registermoochtips', 'hub');
$warningmsg .= $renderer->single_button(new moodle_url('register.php', array('huburl' => HUB_MOODLEORGHUBURL
, 'hubname' => 'Moodle.org')), get_string('register', 'admin'));
echo $renderer->box($warningmsg, 'buttons mdl-align generalbox adminwarning');
}
$adminrenderer = $PAGE->get_renderer('core', 'admin');
echo $adminrenderer->warn_if_not_registered();
//do not check sesskey if confirm = false because this script is linked into email message
if (!empty($errormessage)) {
+3 -1
View File
@@ -180,17 +180,19 @@ if (!empty($error)) {
// Some Moodle.org registration explanation.
if ($huburl == HUB_MOODLEORGHUBURL) {
$notificationtype = \core\output\notification::NOTIFY_ERROR;
if (!empty($registeredhub->token)) {
if ($registeredhub->timemodified == 0) {
$registrationmessage = get_string('pleaserefreshregistrationunknown', 'admin');
} else {
$lastupdated = userdate($registeredhub->timemodified, get_string('strftimedate', 'langconfig'));
$registrationmessage = get_string('pleaserefreshregistration', 'admin', $lastupdated);
$notificationtype = \core\output\notification::NOTIFY_INFO;
}
} else {
$registrationmessage = get_string('registrationwarning', 'admin');
}
echo $OUTPUT->notification($registrationmessage);
echo $OUTPUT->notification($registrationmessage, $notificationtype);
echo $OUTPUT->heading(get_string('registerwithmoodleorg', 'admin'));
$renderer = $PAGE->get_renderer('core', 'register');
+47 -5
View File
@@ -276,12 +276,15 @@ class core_admin_renderer extends plugin_renderer_base {
* @param int|null $availableupdatesfetch timestamp of the most recent updates fetch or null (unknown)
* @param string[] $cachewarnings An array containing warnings from the Cache API.
* @param array $eventshandlers Events 1 API handlers.
* @param bool $themedesignermode Warn about the theme designer mode.
* @param bool $devlibdir Warn about development libs directory presence.
*
* @return string HTML to output.
*/
public function admin_notifications_page($maturity, $insecuredataroot, $errorsdisplayed,
$cronoverdue, $dbproblems, $maintenancemode, $availableupdates, $availableupdatesfetch,
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0, $themedesignermode = false) {
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0,
$themedesignermode = false, $devlibdir = false) {
global $CFG;
$output = '';
@@ -290,6 +293,7 @@ class core_admin_renderer extends plugin_renderer_base {
$output .= $this->legacy_log_store_writing_error();
$output .= empty($CFG->disableupdatenotifications) ? $this->available_updates($availableupdates, $availableupdatesfetch) : '';
$output .= $this->insecure_dataroot_warning($insecuredataroot);
$output .= $this->development_libs_directories_warning($devlibdir);
$output .= $this->themedesignermode_warning($themedesignermode);
$output .= $this->display_errors_warning($errorsdisplayed);
$output .= $this->buggy_iconv_warning($buggyiconvnomb);
@@ -520,6 +524,24 @@ class core_admin_renderer extends plugin_renderer_base {
}
}
/**
* Render a warning that a directory with development libs is present.
*
* @param bool $devlibdir True if the warning should be displayed.
* @return string
*/
protected function development_libs_directories_warning($devlibdir) {
if ($devlibdir) {
$moreinfo = new moodle_url('/report/security/index.php');
$warning = get_string('devlibdirpresent', 'core_admin', ['moreinfourl' => $moreinfo->out()]);
return $this->warning($warning, 'error');
} else {
return '';
}
}
/**
* Render an appropriate message if dataroot is insecure.
* @param bool $errorsdisplayed
@@ -782,17 +804,37 @@ class core_admin_renderer extends plugin_renderer_base {
if (!$registered) {
$registerbutton = $this->single_button(new moodle_url('/admin/registration/register.php',
array('huburl' => HUB_MOODLEORGHUBURL, 'hubname' => 'Moodle.org')),
if (has_capability('moodle/site:config', context_system::instance())) {
$registerbutton = $this->single_button(new moodle_url('/admin/registration/register.php',
array('huburl' => HUB_MOODLEORGHUBURL, 'hubname' => 'Moodle.net')),
get_string('register', 'admin'));
$str = 'registrationwarning';
} else {
$registerbutton = '';
$str = 'registrationwarningcontactadmin';
}
return $this->warning( get_string('registrationwarning', 'admin')
. '&nbsp;' . $this->help_icon('registration', 'admin') . $registerbutton );
return $this->warning( get_string($str, 'admin')
. '&nbsp;' . $this->help_icon('registration', 'admin') . $registerbutton ,
'error alert alert-danger');
}
return '';
}
/**
* Return an admin page warning if site is not registered with moodle.org
*
* @since Moodle 3.3.2
* @return string
*/
public function warn_if_not_registered() {
global $CFG;
require_once($CFG->dirroot . '/' . $CFG->admin . '/registration/lib.php');
$registrationmanager = new registration_manager();
return $this->registration_warning($registrationmanager->get_registeredhub(HUB_MOODLEORGHUBURL) ? true : false);
}
/**
* Helper method to render the information about the available Moodle update
*
@@ -183,9 +183,14 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
public function get_risk_icon($type) {
global $OUTPUT;
$text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), get_string($type . 'short', 'admin'));
$alt = get_string("{$type}short", "admin");
$title = get_string($type, "admin");
$text = $OUTPUT->pix_icon('i/' . str_replace('risk', 'risk_', $type), $alt, 'moodle', [
'title' => $title,
]);
$action = new popup_action('click', $this->risksurl, 'docspopup');
$riskicon = $OUTPUT->action_link($this->risksurl, $text, $action, array('title'=>get_string($type, 'admin')));
$riskicon = $OUTPUT->action_link($this->risksurl, $text, $action);
return $riskicon;
}
+2 -2
View File
@@ -193,8 +193,8 @@ function print_report_tree($contextid, $contexts, $systemcontext, $fullname, $al
$strgoto = get_string('gotoassignroles', 'core_role', $a);
$strcheck = get_string('checkuserspermissionshere', 'core_role', $a);
}
echo ' <a title="' . $strgoto . '" href="' . $raurl . '">' . $OUTPUT->pix_icon('t/edit', 'core', $stredit) . '</a> ';
echo ' <a title="' . $strcheck . '" href="' . $churl . '">' . $OUTPUT->pix_icon('t/preview', 'core', $strcheckpermissions) . '</a> ';
echo ' <a title="' . $strgoto . '" href="' . $raurl . '">' . $OUTPUT->pix_icon('t/edit', $stredit) . '</a> ';
echo ' <a title="' . $strcheck . '" href="' . $churl . '">' . $OUTPUT->pix_icon('t/preview', $strcheckpermissions) . '</a> ';
echo "</p>\n";
}
}
+15 -1
View File
@@ -5,11 +5,19 @@
require_once('../config.php');
require_once($CFG->libdir.'/adminlib.php');
redirect_if_major_upgrade_required();
$query = trim(optional_param('query', '', PARAM_NOTAGS)); // Search string
$context = context_system::instance();
$PAGE->set_context($context);
$hassiteconfig = has_capability('moodle/site:config', $context);
if ($hassiteconfig && moodle_needs_upgrading()) {
redirect(new moodle_url('/admin/index.php'));
}
admin_externalpage_setup('search', '', array('query' => $query)); // now hidden page
$adminroot = admin_get_root(); // need all settings here
@@ -38,6 +46,12 @@ if ($data = data_submitted() and confirm_sesskey() and isset($data->action) and
// to modify them
echo $OUTPUT->header($focus);
// Display a warning if site is not registered.
if (empty($query)) {
$adminrenderer = $PAGE->get_renderer('core', 'admin');
echo $adminrenderer->warn_if_not_registered();
}
echo $OUTPUT->heading(get_string('administrationsite'));
if ($errormsg !== '') {
@@ -49,7 +63,7 @@ if ($errormsg !== '') {
$showsettingslinks = true;
if (has_capability('moodle/site:config', $context)) {
if ($hassiteconfig) {
require_once("admin_settings_search_form.php");
$form = new admin_settings_search_form();
$form->display();
+3 -2
View File
@@ -179,10 +179,11 @@ preferences,moodle|/user/preferences.php|preferences',
'idnumber' => new lang_string('sort_idnumber', 'admin'),
);
$temp->add(new admin_setting_configselect('navsortmycoursessort', new lang_string('navsortmycoursessort', 'admin'), new lang_string('navsortmycoursessort_help', 'admin'), 'sortorder', $sortoptions));
$temp->add(new admin_setting_configtext('navcourselimit',new lang_string('navcourselimit','admin'),new lang_string('confignavcourselimit', 'admin'),20,PARAM_INT));
$temp->add(new admin_setting_configtext('navcourselimit', new lang_string('navcourselimit', 'admin'),
new lang_string('confignavcourselimit', 'admin'), 10, PARAM_INT));
$temp->add(new admin_setting_configcheckbox('usesitenameforsitepages', new lang_string('usesitenameforsitepages', 'admin'), new lang_string('configusesitenameforsitepages', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('linkadmincategories', new lang_string('linkadmincategories', 'admin'), new lang_string('linkadmincategories_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('linkcoursesections', new lang_string('linkcoursesections', 'admin'), new lang_string('linkcoursesections_help', 'admin'), 0));
$temp->add(new admin_setting_configcheckbox('linkcoursesections', new lang_string('linkcoursesections', 'admin'), new lang_string('linkcoursesections_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navshowfrontpagemods', new lang_string('navshowfrontpagemods', 'admin'), new lang_string('navshowfrontpagemods_help', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('navadduserpostslinks', new lang_string('navadduserpostslinks', 'admin'), new lang_string('navadduserpostslinks_help', 'admin'), 1));
+1 -1
View File
@@ -232,7 +232,7 @@ if ($hassiteconfig) {
// Convert plugins.
$ADMIN->add('modules', new admin_category('fileconverterplugins', new lang_string('type_fileconverter_plural', 'plugin')));
$temp = new admin_settingpage('managefileconverterplugins', new lang_string('type_fileconverter', 'plugin'));
$temp = new admin_settingpage('managefileconverterplugins', new lang_string('type_fileconvertermanage', 'plugin'));
$temp->add(new admin_setting_manage_fileconverter_plugins());
$ADMIN->add('fileconverterplugins', $temp);
+2 -5
View File
@@ -55,9 +55,6 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
$optionalsubsystems->add(new admin_setting_configcheckbox('enableglobalsearch', new lang_string('enableglobalsearch', 'admin'),
new lang_string('enableglobalsearch_desc', 'admin'), 0, 1, 0));
$choices = array();
$choices[0] = new lang_string('no');
$choices[1] = new lang_string('yes');
$optionalsubsystems->add(new admin_setting_configselect('allowstealth', new lang_string('allowstealthmodules'),
new lang_string('allowstealthmodules_help'), 0, $choices));
$optionalsubsystems->add(new admin_setting_configcheckbox('allowstealth', new lang_string('allowstealthmodules'),
new lang_string('allowstealthmodules_help'), 0, 1, 0));
}
+1 -1
View File
@@ -11,7 +11,7 @@ $hassiteconfig = has_capability('moodle/site:config', $systemcontext);
$ADMIN->add('root', new admin_externalpage('adminnotifications', new lang_string('notifications'), "$CFG->wwwroot/$CFG->admin/index.php"));
$ADMIN->add('root', new admin_externalpage('registrationmoodleorg', new lang_string('registration', 'admin'),
"$CFG->wwwroot/$CFG->admin/registration/register.php?huburl=" . HUB_MOODLEORGHUBURL . "&hubname=Moodle.org&sesskey=" . sesskey()));
"$CFG->wwwroot/$CFG->admin/registration/register.php?huburl=" . HUB_MOODLEORGHUBURL . "&hubname=Moodle.net&sesskey=" . sesskey()));
$ADMIN->add('root', new admin_externalpage('registrationhub', new lang_string('registerwith', 'hub'),
"$CFG->wwwroot/$CFG->admin/registration/register.php", 'moodle/site:config', true));
$ADMIN->add('root', new admin_externalpage('registrationhubs', new lang_string('hubs', 'admin'),
+2 -3
View File
@@ -24,9 +24,6 @@
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->libdir . '/behat/classes/behat_selectors.php');
/**
* Renderer for behat tool web features
*
@@ -44,6 +41,8 @@ class tool_behat_renderer extends plugin_renderer_base {
* @return string HTML code
*/
public function render_stepsdefinitions($stepsdefinitions, $form) {
global $CFG;
require_once($CFG->libdir . '/behat/classes/behat_selectors.php');
$html = $this->generic_info();
+3
View File
@@ -44,5 +44,8 @@ function xmldb_tool_customlang_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -31,7 +31,7 @@ $string['delete_confirmation'] = 'Are you absolutely sure you want to remove <st
$string['deletea'] = 'Delete {$a}';
$string['deletefiletypes'] = 'Delete a file type';
$string['description'] = 'Custom description';
$string['description_help'] = 'Simple file type description, e.g. &lsquo;Kindle ebook&rsquo;. If your site supports multiple languages and uses the multi-language filter, you can enter multi-language tags in this field to supply a description in different languages.';
$string['description_help'] = 'Simple file type description, e.g. \'Kindle ebook\'. If your site supports multiple languages and uses the multi-language filter, you can enter multi-language tags in this field to supply a description in different languages.';
$string['descriptiontype'] = 'Description type';
$string['descriptiontype_help'] = 'There are three possible ways to specify a description.
@@ -49,15 +49,15 @@ $string['error_defaulticon'] = 'Another file extension with the same MIME type i
$string['error_extension'] = 'The file type extension <strong>{$a}</strong> already exists or is invalid. File extensions must be unique and must not contain special characters.';
$string['error_notfound'] = 'The file type with extension {$a} cannot be found.';
$string['extension'] = 'Extension';
$string['extension_help'] = 'File name extension without the dot, e.g. &lsquo;mobi&rsquo;';
$string['extension_help'] = 'File name extension without the dot, e.g. \'mobi\'';
$string['groups'] = 'Type groups';
$string['groups_help'] = 'Optional list of file type groups that this type belongs to. These are generic categories such as &lsquo;document&rsquo; and &lsquo;image&rsquo;.';
$string['groups_help'] = 'Optional list of file type groups that this type belongs to. These are generic categories such as \'document\' and \'image\'.';
$string['icon'] = 'File icon';
$string['icon_help'] = 'Icon filename.
The list of icons is taken from the /pix/f directory inside your Moodle installation. You can add custom icons to this folder if required.';
$string['mimetype'] = 'MIME type';
$string['mimetype_help'] = 'MIME type associated with this file type, e.g. &lsquo;application/x-mobipocket-ebook&rsquo;';
$string['mimetype_help'] = 'MIME type associated with this file type, e.g. \'application/x-mobipocket-ebook\'';
$string['pluginname'] = 'File types';
$string['revert'] = 'Restore {$a} to Moodle defaults';
$string['revert_confirmation'] = 'Are you sure you want to restore <strong>.{$a}</strong> to Moodle defaults, discarding your changes?';
+6 -4
View File
@@ -40,7 +40,7 @@ if (empty($CFG->langotherroot)) {
$mode = optional_param('mode', 0, PARAM_INT); // action
$pack = optional_param_array('pack', array(), PARAM_SAFEDIR); // pack to install
$uninstalllang = optional_param_array('uninstalllang', array(), PARAM_LANG);// installed pack to uninstall
$confirmtounistall = optional_param('confirmtouninstall', '', PARAM_ALPHAEXT); // uninstallation confirmation
$confirmtounistall = optional_param('confirmtouninstall', '', PARAM_SAFEPATH); // uninstallation confirmation
$purgecaches = optional_param('purgecaches', false, PARAM_BOOL); // explicit caches reset
if ($purgecaches) {
@@ -74,7 +74,7 @@ if ($mode == DELETION_OF_SELECTED_LANG and (!empty($uninstalllang) or !empty($co
// Actually deleting languages, languages to delete are passed as GET parameter as string
// ...need to populate them to array.
if (empty($uninstalllang)) {
$uninstalllang = explode('-', $confirmtounistall);
$uninstalllang = explode('/', $confirmtounistall);
}
if (in_array('en', $uninstalllang)) {
@@ -84,8 +84,10 @@ if ($mode == DELETION_OF_SELECTED_LANG and (!empty($uninstalllang) or !empty($co
} else if (empty($confirmtounistall) and confirm_sesskey()) { // User chose langs to be deleted, show confirmation.
echo $OUTPUT->header();
echo $OUTPUT->confirm(get_string('uninstallconfirm', 'tool_langimport', implode(', ', $uninstalllang)),
'index.php?mode='.DELETION_OF_SELECTED_LANG.'&confirmtouninstall='.implode('-', $uninstalllang),
'index.php');
new moodle_url($PAGE->url, array(
'mode' => DELETION_OF_SELECTED_LANG,
'confirmtouninstall' => implode('/', $uninstalllang),
)), $PAGE->url);
echo $OUTPUT->footer();
die;
@@ -84,8 +84,7 @@ abstract class restore_tool_log_logstore_subplugin extends restore_subplugin {
}
}
// Roll dates.
$data->timecreated = $this->apply_date_offset($data->timecreated);
// There is no need to roll dates. Logs are supposed to be immutable. See MDL-44961.
// Revert other to its original php way.
$data->other = unserialize(base64_decode($data->other));
+3
View File
@@ -48,5 +48,8 @@ function xmldb_tool_log_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -88,6 +88,7 @@ class store implements \tool_log\log\writer, \core\log\sql_reader {
$dboptions['dbport'] = $this->get_config('dbport', '');
$dboptions['dbschema'] = $this->get_config('dbschema', '');
$dboptions['dbcollation'] = $this->get_config('dbcollation', '');
$dboptions['dbhandlesoptions'] = $this->get_config('dbhandlesoptions', false);
try {
$db->connect($this->get_config('dbhost'), $this->get_config('dbuser'), $this->get_config('dbpass'),
$this->get_config('dbname'), false, $dboptions);
@@ -42,5 +42,8 @@ function xmldb_logstore_database_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -31,6 +31,8 @@ $string['databasesettings_help'] = 'Connection details for the external log data
$string['databasepersist'] = 'Persistent database connections';
$string['databaseschema'] = 'Database schema';
$string['databasecollation'] = 'Database collation';
$string['databasehandlesoptions'] = 'Database handles options';
$string['databasehandlesoptions_help'] = 'Does the remote database handle its own options.';
$string['databasetable'] = 'Database table';
$string['databasetable_help'] = 'Name of the table where logs will be stored. This table should have a structure identical to the one used by logstore_standard (mdl_logstore_standard_log).';
$string['includeactions'] = 'Include actions of these types';
@@ -54,6 +54,8 @@ if ($hassiteconfig) {
'logstore_database'), '', ''));
$settings->add(new admin_setting_configtext('logstore_database/dbcollation', get_string('databasecollation',
'logstore_database'), '', ''));
$settings->add(new admin_setting_configcheckbox('logstore_database/dbhandlesoptions', get_string('databasehandlesoptions',
'logstore_database'), get_string('databasehandlesoptions_help', 'logstore_database'), '0'));
$settings->add(new admin_setting_configtext('logstore_database/buffersize', get_string('buffersize',
'logstore_database'), get_string('buffersize_help', 'logstore_database'), 50));
@@ -64,6 +64,7 @@ $dboptions['dbsocket'] = get_config('logstore_database', 'dbsocket');
$dboptions['dbport'] = get_config('logstore_database', 'dbport');
$dboptions['dbschema'] = get_config('logstore_database', 'dbschema');
$dboptions['dbcollation'] = get_config('logstore_database', 'dbcollation');
$dboptions['dbhandlesoptions'] = get_config('logstore_database', 'dbhandlesoptions');
try {
$db->connect(get_config('logstore_database', 'dbhost'), get_config('logstore_database', 'dbuser'),
@@ -83,6 +83,11 @@ class logstore_database_store_testcase extends advanced_testcase {
} else {
set_config('dbcollation', '', 'logstore_database');
}
if (!empty($CFG->dboptions['dbhandlesoptions'])) {
set_config('dbhandlesoptions', $CFG->dboptions['dbhandlesoptions'], 'logstore_database');
} else {
set_config('dbhandlesoptions', false, 'logstore_database');
}
// Enable logging plugin.
set_config('enabled_stores', 'logstore_database', 'tool_log');
+11
View File
@@ -0,0 +1,11 @@
This files describes API changes in the logstore_database code.
=== 3.3.1 ===
* PostgreSQL connections now use advanced options to reduce connection overhead. These options are not compatible
with some connection poolers. The dbhandlesoptions parameter has been added to allow the database to configure the
required defaults. The parameters that are required in the database are;
ALTER DATABASE moodle SET client_encoding = UTF8;
ALTER DATABASE moodle SET standard_conforming_strings = on;
ALTER DATABASE moodle SET search_path = 'moodle,public'; -- Optional, if you wish to use a custom schema.
You can set these options against the database or the moodle user who connects.
+1 -1
View File
@@ -24,6 +24,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->version = 2017051500; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2017051501; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version.
$plugin->component = 'logstore_database'; // Full name of the plugin (used for diagnostics).
@@ -59,5 +59,8 @@ function xmldb_logstore_standard_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -51,7 +51,7 @@
</div>
</div>
<div data-region="footer" class="pull-xs-right">
<input type="button" data-action="rate" value="{{#str}}rate, tool_lp{{/str}}" class="btn btn-primary">
<button data-action="rate" class="btn btn-primary">{{#str}}rate, tool_lp{{/str}}</button>
<button data-action="cancel" class="btn btn-secondary">{{#str}}cancel{{/str}}</button>
</div>
<div class="clearfix"></div>
@@ -60,7 +60,7 @@
<div data-region="rule-base" class="form">
<div data-region="rule-outcome" class="form-group">
<label>{{#str}}outcome, tool_lp{{/str}}</label>
<select name="outcome" class="custom-select" ng-label="{{#str}}outcome, tool_lp{{/str}}">
<select name="outcome" class="custom-select">
{{#outcomes}}
<option value="{{code}}" {{#selected}}selected{{/selected}}>{{name}}</option>
{{/outcomes}}
@@ -68,7 +68,7 @@
</div>
<div data-region="rule-type" class="form-group">
<label>{{#str}}when, tool_lp{{/str}}</label>
<select name="rule" class="custom-select" ng-label="{{#str}}when, tool_lp{{/str}}">
<select name="rule" class="custom-select">
<option value="-1">{{#str}}choosedots{{/str}}</option>
{{#rules}}
<option value="{{type}}" {{#selected}}selected{{/selected}}>{{name}}</option>
@@ -81,10 +81,11 @@
{{/config}}
</div>
<div data-region="footer" class="pull-xs-right">
<div data-region="footer" class="pull-xs-right m-t-1">
{{#config}}
<input type="button" class="btn btn-primary" data-action="save" value="{{#str}}savechanges{{/str}}"/>
{{/config}}
<input type="button" class="btn btn-secondary" data-action="cancel" value="{{#str}}cancel{{/str}}"/>
</div>
<div class="clearfix"></div>
</div>
+10 -4
View File
@@ -128,7 +128,7 @@ class api {
'rememberusername' => $CFG->rememberusername,
'authloginviaemail' => $CFG->authloginviaemail,
'registerauth' => $CFG->registerauth,
'forgottenpasswordurl' => $CFG->forgottenpasswordurl,
'forgottenpasswordurl' => clean_param($CFG->forgottenpasswordurl, PARAM_URL), // We may expect a mailto: here.
'authinstructions' => $authinstructions,
'authnoneenabled' => (int) is_enabled_auth('none'),
'enablewebservices' => $CFG->enablewebservices,
@@ -152,10 +152,11 @@ class api {
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
$settings['launchurl'] = $url->out(false);
if ($logourl = $OUTPUT->get_logo_url()) {
// Check that we are receiving a moodle_url object, themes can override get_logo_url and may return incorrect values.
if (($logourl = $OUTPUT->get_logo_url()) && $logourl instanceof moodle_url) {
$settings['logourl'] = $logourl->out(false);
}
if ($compactlogourl = $OUTPUT->get_compact_logo_url()) {
if (($compactlogourl = $OUTPUT->get_compact_logo_url()) && $compactlogourl instanceof moodle_url) {
$settings['compactlogourl'] = $compactlogourl->out(false);
}
@@ -210,12 +211,17 @@ class api {
}
if (empty($section) or $section == 'sitepolicies') {
$settings->sitepolicy = $CFG->sitepolicy;
$settings->disableuserimages = $CFG->disableuserimages;
}
if (empty($section) or $section == 'gradessettings') {
require_once($CFG->dirroot . '/user/lib.php');
$settings->mygradesurl = user_mygrades_url()->out(false);
$settings->mygradesurl = user_mygrades_url();
// The previous function may return moodle_url instances or plain string URLs.
if ($settings->mygradesurl instanceof moodle_url) {
$settings->mygradesurl = $settings->mygradesurl->out(false);
}
}
if (empty($section) or $section == 'mobileapp') {
+1
View File
@@ -23,6 +23,7 @@
*/
namespace tool_mobile;
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/externallib.php");
+11 -9
View File
@@ -24,7 +24,7 @@
$string['androidappid'] = 'Android app\'s unique identifier';
$string['androidappid_desc'] = 'This setting may be left as default unless you have a custom Android app.';
$string['autologinkeygenerationlockout'] = 'Auto-login key generation is blocked because of too many requests within an hour.';
$string['autologinkeygenerationlockout'] = 'Auto-login key generation is blocked. You need to wait 6 minutes between requests.';
$string['autologinnotallowedtoadmins'] = 'Auto-login is not allowed for site admins.';
$string['cachedef_plugininfo'] = 'This stores the list of plugins with mobile addons';
$string['clickheretolaunchtheapp'] = 'Click here if the app does not open automatically.';
@@ -37,18 +37,20 @@ mm.user.student|Aprendiz|es
</pre>
For a complete list of string identifiers, see the documentation.';
$string['custommenuitems'] = 'Custom menu items';
$string['custommenuitems_desc'] = 'Additional items can be added to the app\'s main menu by specifying them here. Enter each custom menu item on a new line with format: item text, link URL, link-opening method (inappbrowser, browser or embedded) and language code (optional, for displaying the item to users of the specified language only), separated by pipe characters. For example:
$string['custommenuitems_desc'] = 'Additional items can be added to the app\'s main menu by specifying them here. Enter each custom menu item on a new line with format: item text, link URL, link-opening method and language code (optional, for displaying the item to users of the specified language only), separated by pipe characters.
Link-opening methods are: app (for linking to an activity supported by the app), inappbrowser (for opening a link in a browser without leaving the app), browser (for opening the link in the device default browser outside the app) and embedded (for displaying the link in an iframe in a new page in the app).
For example:
<pre>
App\'s help | https://someurl.xyz/help | inappbrowser | en
Visit our SIS | https://someurl.xyz | browser | en
My grades | https://someurl.xyz/local/mygrades/index.php | embedded | en
Mis calificaciones | https://someurl.xyz/local/mygrades/index.php | embedded | es
</pre>
Use inappbrowser when you want to open the link in a browser without leaving the app, use browser for opening the link in the device default browser and embedded if you want to display the link embedded in a new page in the app.';
App help|https://someurl.xyz/help|inappbrowser
My grades|https://someurl.xyz/local/mygrades/index.php|embedded|en
Mis calificaciones|https://someurl.xyz/local/mygrades/index.php|embedded|es
</pre>';
$string['disabledfeatures'] = 'Disabled features';
$string['disabledfeatures_desc'] = 'Select here the features you want to disable in the Mobile app for your site. Please note that some features listed here could be already disabled via other site settings. You will have to log out and log in again in the app to see the changes.';
$string['enablesmartappbanners'] = 'Enable App Banners';
$string['enablesmartappbanners_desc'] = 'This will display a banner promoting the Moodle Mobile app when visiting the site in a Mobile browser.';
$string['enablesmartappbanners_desc'] = 'If enabled, a banner promoting the mobile app will be displayed when accessing the site using a mobile browser.';
$string['forcedurlscheme'] = 'If you want to allow only your custom branded app to be opened via a browser window, then specify its URL scheme here; otherwise leave the field empty.';
$string['forcedurlscheme_key'] = 'URL scheme';
$string['forcelogout'] = 'Force log out';
@@ -97,11 +97,13 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
set_config('typeoflogin', api::LOGIN_VIA_BROWSER, 'tool_mobile');
set_config('logo', 'mock.png', 'core_admin');
set_config('logocompact', 'mock.png', 'core_admin');
set_config('forgottenpasswordurl', 'mailto:fake@email.zy'); // Test old hack.
list($authinstructions, $notusedformat) = external_format_text($authinstructions, FORMAT_MOODLE, $context->id);
$expected['registerauth'] = 'email';
$expected['authinstructions'] = $authinstructions;
$expected['typeoflogin'] = api::LOGIN_VIA_BROWSER;
$expected['forgottenpasswordurl'] = ''; // Expect empty when it's not an URL.
if ($logourl = $OUTPUT->get_logo_url()) {
$expected['logourl'] = $logourl->out(false);
@@ -123,6 +125,10 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
require_once($CFG->dirroot . '/course/format/lib.php');
$this->resetAfterTest(true);
$mysitepolicy = 'http://mysite.is/policy/';
set_config('sitepolicy', $mysitepolicy);
$result = external::get_config();
$result = external_api::clean_returnvalue(external::get_config_returns(), $result);
@@ -143,6 +149,7 @@ class tool_mobile_external_testcase extends externallib_advanced_testcase {
array('name' => 'numsections', 'value' => course_get_format($SITE)->get_last_section_number()),
array('name' => 'newsitems', 'value' => $SITE->newsitems),
array('name' => 'commentsperpage', 'value' => $CFG->commentsperpage),
array('name' => 'sitepolicy', 'value' => $mysitepolicy),
array('name' => 'disableuserimages', 'value' => $CFG->disableuserimages),
array('name' => 'mygradesurl', 'value' => user_mygrades_url()->out(false)),
array('name' => 'tool_mobile_forcelogout', 'value' => 0),
+3
View File
@@ -97,5 +97,8 @@ function xmldb_tool_monitor_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017021300, 'tool', 'monitor');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+5 -5
View File
@@ -72,15 +72,15 @@ $string['issuerimage'] = 'Logo URL';
$string['issuerloginparams'] = 'Additional parameters included in a login request.';
$string['issuerloginparams_help'] = 'Some systems require additional parameters for a login request in order to read the user\'s basic profile.';
$string['issuerloginparamsoffline'] = 'Additional parameters included in a login request for offline access.';
$string['issuerloginparamsoffline_help'] = 'Each OAuth system defines a different way to request offline access. E.g. Google requires the additional params: "access_type=offline&prompt=consent" these parameters should be in url query parameter format.';
$string['issuerloginscopes_help'] = 'Some systems require additional scopes for a login request in order to read the users basic profile. The standard scopes for an OpenID Connect compliant system are "openid profile email".';
$string['issuerloginscopesoffline_help'] = 'Each OAuth system defines a different way to request offline access. E.g. Microsoft requires an additional scope "offline_access"';
$string['issuerloginparamsoffline_help'] = 'Each OAuth system defines a different way to request offline access. E.g. Google requires the additional params: "access_type=offline&prompt=consent". These parameters should be in URL query parameter format.';
$string['issuerloginscopes_help'] = 'Some systems require additional scopes for a login request in order to read the user\'s basic profile. The standard scopes for an OpenID Connect compliant system are "openid profile email".';
$string['issuerloginscopesoffline_help'] = 'Each OAuth system defines a different way to request offline access. E.g. Microsoft requires an additional scope "offline_access".';
$string['issuerloginscopesoffline'] = 'Scopes included in a login request for offline access.';
$string['issuerloginscopes'] = 'Scopes included in a login request.';
$string['issuername_help'] = 'Name of the identity issuer. May be displayed on login page.';
$string['issuername'] = 'Name';
$string['issuershowonloginpage_help'] = 'If the OpenID Connect Authentication plugin is enabled, this login issuer will be listed on the login page to allow users to log in with accounts from this issuer.';
$string['issuershowonloginpage'] = 'Show on login page.';
$string['issuershowonloginpage_help'] = 'If the OAuth 2 authentication plugin is enabled, this login issuer will be listed on the login page to allow users to log in with accounts from this issuer.';
$string['issuershowonloginpage'] = 'Show on login page';
$string['issuers'] = 'Issuers';
$string['loginissuer'] = 'Allow login';
$string['notconfigured'] = 'Not configured';
+2 -2
View File
@@ -31,7 +31,7 @@ $string['default'] = 'Default';
$string['disabled'] = 'Disabled';
$string['disabled_help'] = 'Disabled scheduled tasks are not executed from cron, however they can still be executed manually via the CLI tool.';
$string['edittaskschedule'] = 'Edit task schedule: {$a}';
$string['enablerunnow'] = 'Allow &lsquo;Run now&rsquo; for scheduled tasks';
$string['enablerunnow'] = 'Allow \'Run now\' for scheduled tasks';
$string['enablerunnow_desc'] = 'Allows administrators to run a single scheduled task immediately, rather than waiting for it to run as scheduled. The task runs on the web server, so some sites may wish to disable this feature to avoid potential performance issues.';
$string['faildelay'] = 'Fail delay';
$string['lastruntime'] = 'Last run';
@@ -41,7 +41,7 @@ $string['pluginname'] = 'Scheduled task configuration';
$string['resettasktodefaults'] = 'Reset task schedule to defaults';
$string['resettasktodefaults_help'] = 'This will discard any local changes and revert the schedule for this task back to its original settings.';
$string['runnow'] = 'Run now';
$string['runnow_confirm'] = 'Are you sure you want to run this task &lsquo;{$a}&rsquo; now? The task will run on the web server and may take some time to complete.';
$string['runnow_confirm'] = 'Are you sure you want to run this task \'{$a}\' now? The task will run on the web server and may take some time to complete.';
$string['scheduledtasks'] = 'Scheduled tasks';
$string['scheduledtaskchangesdisabled'] = 'Modifications to the list of scheduled tasks have been prevented in Moodle configuration';
$string['taskdisabled'] = 'Task disabled';
@@ -22,6 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_templatelibrary;
defined('MOODLE_INTERNAL') || die();
require_once("$CFG->libdir/externallib.php");
+12 -1
View File
@@ -95,7 +95,7 @@ class tool_uploadcourse_course {
/** @var array fields allowed as course data. */
static protected $validfields = array('fullname', 'shortname', 'idnumber', 'category', 'visible', 'startdate', 'enddate',
'summary', 'format', 'theme', 'lang', 'newsitems', 'showgrades', 'showreports', 'legacyfiles', 'maxbytes',
'groupmode', 'groupmodeforce', 'groupmodeforce', 'enablecompletion');
'groupmode', 'groupmodeforce', 'enablecompletion');
/** @var array fields required on course creation. */
static protected $mandatoryfields = array('fullname', 'category');
@@ -676,6 +676,17 @@ class tool_uploadcourse_course {
return false;
}
// TODO MDL-59259 allow to set course format options for the current course format.
// Special case, 'numsections' is not a course format option any more but still should apply from defaults.
if (!$exists || !array_key_exists('numsections', $coursedata)) {
if (isset($this->rawdata['numsections']) && is_numeric($this->rawdata['numsections'])) {
$coursedata['numsections'] = (int)$this->rawdata['numsections'];
} else {
$coursedata['numsections'] = get_config('moodlecourse', 'numsections');
}
}
// Saving data.
$this->data = $coursedata;
$this->enrolmentdata = tool_uploadcourse_helper::get_enrolment_data($this->rawdata);
@@ -166,6 +166,13 @@ class tool_uploadcourse_step2_form extends tool_uploadcourse_base_form {
$mform->addHelpButton('defaults[groupmodeforce]', 'groupmodeforce', 'group');
$mform->setDefault('defaults[groupmodeforce]', $courseconfig->groupmodeforce);
// Completion tracking.
if (!empty($CFG->enablecompletion)) {
$mform->addElement('selectyesno', 'defaults[enablecompletion]', get_string('enablecompletion', 'completion'));
$mform->setDefault('defaults[enablecompletion]', $courseconfig->enablecompletion);
$mform->addHelpButton('defaults[enablecompletion]', 'enablecompletion', 'completion');
}
// Hidden fields.
$mform->addElement('hidden', 'importid');
$mform->setType('importid', PARAM_INT);
@@ -166,6 +166,7 @@ $defaults['groupmode'] = $courseconfig->groupmode;
$defaults['groupmodeforce'] = $courseconfig->groupmodeforce;
$defaults['visible'] = $courseconfig->visible;
$defaults['lang'] = $courseconfig->lang;
$defaults['enablecompletion'] = $courseconfig->enablecompletion;
// Course template.
if (isset($options['templatecourse'])) {
@@ -120,6 +120,36 @@ class tool_uploadcourse_course_testcase extends advanced_testcase {
$this->assertTrue($DB->record_exists('course', array('shortname' => 'c2')));
}
public function test_create_with_sections() {
global $DB;
$this->resetAfterTest(true);
$updatemode = tool_uploadcourse_processor::UPDATE_NOTHING;
$defaultnumsections = get_config('moodlecourse', 'numsections');
// Add new course, make sure default number of sections is created.
$mode = tool_uploadcourse_processor::MODE_CREATE_NEW;
$data = array('shortname' => 'newcourse1', 'fullname' => 'New course1', 'format' => 'topics', 'category' => 1);
$co = new tool_uploadcourse_course($mode, $updatemode, $data);
$this->assertTrue($co->prepare());
$co->proceed();
$courseid = $DB->get_field('course', 'id', array('shortname' => 'newcourse1'));
$this->assertNotEmpty($courseid);
$this->assertEquals($defaultnumsections + 1,
$DB->count_records('course_sections', ['course' => $courseid]));
// Add new course specifying number of sections.
$mode = tool_uploadcourse_processor::MODE_CREATE_NEW;
$data = array('shortname' => 'newcourse2', 'fullname' => 'New course2', 'format' => 'topics', 'category' => 1,
'numsections' => 15);
$co = new tool_uploadcourse_course($mode, $updatemode, $data);
$this->assertTrue($co->prepare());
$co->proceed();
$courseid = $DB->get_field('course', 'id', array('shortname' => 'newcourse2'));
$this->assertNotEmpty($courseid);
$this->assertEquals(15 + 1,
$DB->count_records('course_sections', ['course' => $courseid]));
}
public function test_delete() {
global $DB;
$this->resetAfterTest(true);
+3
View File
@@ -45,5 +45,8 @@ function xmldb_tool_usertours_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+12 -12
View File
@@ -3187,6 +3187,18 @@ class CAS_Client
false/*$no_response*/, true/*$bad_response*/, $text_response
);
$result = false;
} else if ( $tree_response->getElementsByTagName("authenticationFailure")->length != 0) {
// authentication failed, extract the error code and message and throw exception
$auth_fail_list = $tree_response
->getElementsByTagName("authenticationFailure");
throw new CAS_AuthenticationException(
$this, 'Ticket not validated', $validate_url,
false/*$no_response*/, false/*$bad_response*/,
$text_response,
$auth_fail_list->item(0)->getAttribute('code')/*$err_code*/,
trim($auth_fail_list->item(0)->nodeValue)/*$err_msg*/
);
$result = false;
} else if ($tree_response->getElementsByTagName("authenticationSuccess")->length != 0) {
// authentication succeded, extract the user name
$success_elements = $tree_response
@@ -3227,18 +3239,6 @@ class CAS_Client
$result = true;
}
}
} else if ( $tree_response->getElementsByTagName("authenticationFailure")->length != 0) {
// authentication succeded, extract the error code and message
$auth_fail_list = $tree_response
->getElementsByTagName("authenticationFailure");
throw new CAS_AuthenticationException(
$this, 'Ticket not validated', $validate_url,
false/*$no_response*/, false/*$bad_response*/,
$text_response,
$auth_fail_list->item(0)->getAttribute('code')/*$err_code*/,
trim($auth_fail_list->item(0)->nodeValue)/*$err_msg*/
);
$result = false;
} else {
throw new CAS_AuthenticationException(
$this, 'Ticket not validated', $validate_url,
+1
View File
@@ -2,3 +2,4 @@ Description of phpCAS 1.3.4 library import
* downloaded from http://downloads.jasig.org/cas-clients/php/current/
* MDL-59456 phpCAS library has been patched because of an authentication bypass security vulnerability.
+3
View File
@@ -66,5 +66,8 @@ function xmldb_auth_cas_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'cas');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+6 -2
View File
@@ -171,7 +171,7 @@ class auth_plugin_db extends auth_plugin_base {
}
/**
* Returns user attribute mappings between moodle and ldap.
* Returns user attribute mappings between moodle and the external database.
*
* @return array
*/
@@ -215,8 +215,12 @@ class auth_plugin_db extends auth_plugin_base {
// If at least one field is mapped from external db, get that mapped data.
if ($selectfields) {
$select = array();
$fieldcount = 0;
foreach ($selectfields as $localname=>$externalname) {
$select[] = "$externalname";
// Without aliasing, multiple occurrences of the same external
// name can coalesce in only occurrence in the result.
$select[] = "$externalname AS F".$fieldcount;
$fieldcount++;
}
$select = implode(', ', $select);
$sql = "SELECT $select
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_db_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017032800, 'auth', 'db');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -137,7 +137,7 @@ class auth_email_external extends external_api {
new external_value(PARAM_NOTAGS, 'The order of the name fields')
),
'passwordpolicy' => new external_value(PARAM_RAW, 'Password policy', VALUE_OPTIONAL),
'sitepolicy' => new external_value(PARAM_URL, 'Site policy url', VALUE_OPTIONAL),
'sitepolicy' => new external_value(PARAM_RAW, 'Site policy', VALUE_OPTIONAL),
'defaultcity' => new external_value(PARAM_NOTAGS, 'Default city', VALUE_OPTIONAL),
'country' => new external_value(PARAM_ALPHA, 'Default country', VALUE_OPTIONAL),
'profilefields' => new external_multiple_structure(
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_email_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'email');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_fc_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'fc');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_imap_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'imap');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+9 -9
View File
@@ -276,7 +276,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$ldapval = NULL;
foreach ($values as $value) {
$entry = array_change_key_case($user_entry[0], CASE_LOWER);
$entry = $user_entry[0];
if (($value == 'dn') || ($value == 'distinguishedname')) {
$result[$key] = $user_dn;
continue;
@@ -634,7 +634,7 @@ class auth_plugin_ldap extends auth_plugin_base {
if ($sr) {
$info = ldap_get_entries_moodle($ldapconnection, $sr);
if (!empty ($info)) {
$info = array_change_key_case($info[0], CASE_LOWER);
$info = $info[0];
if (isset($info[$this->config->expireattr][0])) {
$expiretime = $this->ldap_expirationtime2unix($info[$this->config->expireattr][0], $ldapconnection, $user_dn);
if ($expiretime != 0) {
@@ -1201,7 +1201,7 @@ class auth_plugin_ldap extends auth_plugin_base {
return false;
}
$user_entry = array_change_key_case($user_entry[0], CASE_LOWER);
$user_entry = $user_entry[0];
foreach ($attrmap as $key => $ldapkeys) {
$profilefield = '';
@@ -1369,7 +1369,7 @@ class auth_plugin_ldap extends auth_plugin_base {
$sr = ldap_read($ldapconnection, $user_dn, '(objectClass=*)', $search_attribs);
if ($sr) {
$entry = ldap_get_entries_moodle($ldapconnection, $sr);
$info = array_change_key_case($entry[0], CASE_LOWER);
$info = $entry[0];
$newattrs = array();
if (!empty($info[$this->config->expireattr][0])) {
// Set expiration time only if passwordExpirationInterval is defined
@@ -1844,7 +1844,7 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$entry = ldap_get_entries_moodle($ldapconn, $sr);
$info = array_change_key_case($entry[0], CASE_LOWER);
$info = $entry[0];
$useraccountcontrol = $info['useraccountcontrol'][0];
if ($useraccountcontrol & UF_DONT_EXPIRE_PASSWD) {
// Password doesn't expire.
@@ -1889,17 +1889,17 @@ class auth_plugin_ldap extends auth_plugin_base {
}
$entry = ldap_get_entries_moodle($ldapconn, $sr);
$info = array_change_key_case($entry[0], CASE_LOWER);
$info = $entry[0];
$domaindn = $info['defaultnamingcontext'][0];
$sr = ldap_read ($ldapconn, $domaindn, '(objectClass=*)',
array('maxPwdAge'));
$entry = ldap_get_entries_moodle($ldapconn, $sr);
$info = array_change_key_case($entry[0], CASE_LOWER);
$info = $entry[0];
$maxpwdage = $info['maxpwdage'][0];
if ($sr = ldap_read($ldapconn, $user_dn, '(objectClass=*)', array('msDS-ResultantPSO'))) {
if ($entry = ldap_get_entries_moodle($ldapconn, $sr)) {
$info = array_change_key_case($entry[0], CASE_LOWER);
$info = $entry[0];
$userpso = $info['msds-resultantpso'][0];
// If a PSO exists, FGPP is being utilized.
@@ -1907,7 +1907,7 @@ class auth_plugin_ldap extends auth_plugin_base {
if (!empty($userpso)) {
$sr = ldap_read($ldapconn, $userpso, '(objectClass=*)', array('msDS-MaximumPasswordAge'));
if ($entry = ldap_get_entries_moodle($ldapconn, $sr)) {
$info = array_change_key_case($entry[0], CASE_LOWER);
$info = $entry[0];
// Default value of msds-maximumpasswordage is 42 and is always set.
$maxpwdage = $info['msds-maximumpasswordage'][0];
}
+3
View File
@@ -66,5 +66,8 @@ function xmldb_auth_ldap_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'ldap');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+1 -1
View File
@@ -121,7 +121,7 @@ $string['didntgetusersfromldap'] = "Did not get any users from LDAP -- error? --
$string['gotcountrecordsfromldap'] = "Got {\$a} records from LDAP\n";
$string['ldapnotconfigured'] = 'The LDAP host url is currently not configured';
$string['morethanoneuser'] = 'Strange! More than one user record found in ldap. Only using the first one.';
$string['needbcmath'] = 'You need the BCMath extension to use grace logins with Active Directory';
$string['needbcmath'] = 'You need the BCMath extension to use expired password checking with Active Directory.';
$string['needmbstring'] = 'You need the mbstring extension to change passwords in Active Directory';
$string['nodnforusername'] = 'Error in user_update_password(). No DN for: {$a->username}';
$string['noemail'] = 'Tried to send you an email but failed!';
+3
View File
@@ -54,5 +54,8 @@ function xmldb_auth_manual_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'manual');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -53,5 +53,8 @@ function xmldb_auth_mnet_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'mnet');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_nntp_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'nntp');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_none_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'none');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+6 -5
View File
@@ -192,10 +192,10 @@ class api {
];
$confirmationurl = new moodle_url('/auth/oauth2/confirm-linkedlogin.php', $params);
// Remove data parameter just in case it was included in the confirmation so we can add it manually later.
$data->link = $confirmationurl->out();
$data->link = $confirmationurl->out(false);
$message = get_string('confirmlinkedloginemail', 'auth_oauth2', $data);
$message = get_string('confirmlinkedloginemail', 'auth_oauth2', $data);
$data->link = $confirmationurl->out();
$messagehtml = text_to_html(get_string('confirmlinkedloginemail', 'auth_oauth2', $data), false, false, true);
$user->mailformat = 1; // Always send HTML version as well.
@@ -303,9 +303,10 @@ class api {
];
$confirmationurl = new moodle_url('/auth/oauth2/confirm-account.php', $params);
$data->link = $confirmationurl->out();
$data->link = $confirmationurl->out(false);
$message = get_string('confirmaccountemail', 'auth_oauth2', $data);
$message = get_string('confirmaccountemail', 'auth_oauth2', $data);
$data->link = $confirmationurl->out();
$messagehtml = text_to_html(get_string('confirmaccountemail', 'auth_oauth2', $data), false, false, true);
$user->mailformat = 1; // Always send HTML version as well.
+7 -3
View File
@@ -247,6 +247,10 @@ class auth extends \auth_plugin_base {
if (!empty($user->picture)) {
return false;
}
if (!empty($CFG->enablegravatar)) {
return false;
}
$picture = $this->get_static_user_picture();
if (empty($picture)) {
return false;
@@ -342,7 +346,7 @@ class auth extends \auth_plugin_base {
* Complete the login process after oauth handshake is complete.
* @param \core\oauth2\client $client
* @param string $redirecturl
* @return none Either redirects or throws an exception
* @return void Either redirects or throws an exception
*/
public function complete_login(client $client, $redirecturl) {
global $CFG, $SESSION, $PAGE;
@@ -352,7 +356,7 @@ class auth extends \auth_plugin_base {
if (!$userinfo) {
// Trigger login failed event.
$failurereason = AUTH_LOGIN_NOUSER;
$event = \core\event\user_login_failed::create(['other' => ['username' => $userinfo['username'],
$event = \core\event\user_login_failed::create(['other' => ['username' => 'unknown',
'reason' => $failurereason]]);
$event->trigger();
@@ -364,7 +368,7 @@ class auth extends \auth_plugin_base {
if (empty($userinfo['username']) || empty($userinfo['email'])) {
// Trigger login failed event.
$failurereason = AUTH_LOGIN_NOUSER;
$event = \core\event\user_login_failed::create(['other' => ['username' => $userinfo['username'],
$event = \core\event\user_login_failed::create(['other' => ['username' => 'unknown',
'reason' => $failurereason]]);
$event->trigger();
+3
View File
@@ -38,5 +38,8 @@ function xmldb_auth_oauth2_upgrade($oldversion) {
// Automatically generated Moodle v3.2.0 release upgrade line.
// Put any upgrade step following this.
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_pam_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'pam');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_pop3_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'pop3');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
+3
View File
@@ -42,5 +42,8 @@ function xmldb_auth_shibboleth_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2017020700, 'auth', 'shibboleth');
}
// Automatically generated Moodle v3.3.0 release upgrade line.
// Put any upgrade step following this.
return true;
}
@@ -65,8 +65,9 @@ class frontend extends \core_availability\frontend {
// Add each course-module if it has completion turned on and is not
// the one currently being edited.
if ($othercm->completion && (empty($cm) || $cm->id != $id) && !$othercm->deletioninprogress) {
$cms[] = (object)array('id' => $id, 'name' =>
format_string($othercm->name, true, array('context' => $context)));
$cms[] = (object)array('id' => $id,
'name' => format_string($othercm->name, true, array('context' => $context)),
'completiongradeitemnumber' => $othercm->completiongradeitemnumber);
}
}
@@ -24,6 +24,7 @@
$string['description'] = 'Require students to complete (or not complete) another activity.';
$string['error_selectcmid'] = 'You must select an activity for the completion condition.';
$string['error_selectcmidpassfail'] = 'You must select an activity with "Require grade" completion condition set.';
$string['label_cm'] = 'Activity or resource';
$string['label_completion'] = 'Required completion status';
$string['missing'] = '(Missing activity)';
@@ -78,6 +78,16 @@ M.availability_completion.form.fillErrors = function(errors, node) {
if (cmid === 0) {
errors.push('availability_completion:error_selectcmid');
}
var e = parseInt(node.one('select[name=e]').get('value'), 10);
if (((e === 2) || (e === 3))) {
this.cms.forEach(function(cm) {
if (cm.id === cmid) {
if (cm.completiongradeitemnumber === null) {
errors.push('availability_completion:error_selectcmidpassfail');
}
}
});
}
};
@@ -1 +1 @@
YUI.add("moodle-availability_completion-form",function(e,t){M.availability_completion=M.availability_completion||{},M.availability_completion.form=e.Object(M.core_availability.plugin),M.availability_completion.form.initInner=function(e){this.cms=e},M.availability_completion.form.getNode=function(t){var n='<span class="col-form-label p-r-1"> '+M.util.get_string("title","availability_completion")+"</span>"+' <span class="availability-group form-group"><label>'+'<span class="accesshide">'+M.util.get_string("label_cm","availability_completion")+" </span>"+'<select class="custom-select" name="cm" title="'+M.util.get_string("label_cm","availability_completion")+'">'+'<option value="0">'+M.util.get_string("choosedots","moodle")+"</option>";for(var r=0;r<this.cms.length;r++){var i=this.cms[r];n+='<option value="'+i.id+'">'+i.name+"</option>"}n+='</select></label> <label><span class="accesshide">'+M.util.get_string("label_completion","availability_completion")+' </span><select class="custom-select" '+'name="e" title="'+M.util.get_string("label_completion","availability_completion")+'">'+'<option value="1">'+M.util.get_string("option_complete","availability_completion")+"</option>"+'<option value="0">'+M.util.get_string("option_incomplete","availability_completion")+"</option>"+'<option value="2">'+M.util.get_string("option_pass","availability_completion")+"</option>"+'<option value="3">'+M.util.get_string("option_fail","availability_completion")+"</option>"+"</select></label></span>";var s=e.Node.create('<span class="form-inline">'+n+"</span>");t.cm!==undefined&&s.one("select[name=cm] > option[value="+t.cm+"]")&&s.one("select[name=cm]").set("value",""+t.cm),t.e!==undefined&&s.one("select[name=e]").set("value",""+t.e);if(!M.availability_completion.form.addedEvents){M.availability_completion.form.addedEvents=!0;var o=e.one(".availability-field");o.delegate("change",function(){M.core_availability.form.update()},".availability_completion select")}return s},M.availability_completion.form.fillValue=function(e,t){e.cm=parseInt(t.one("select[name=cm]").get("value"),10),e.e=parseInt(t.one("select[name=e]").get("value"),10)},M.availability_completion.form.fillErrors=function(e,t){var n=parseInt(t.one("select[name=cm]").get("value"),10);n===0&&e.push("availability_completion:error_selectcmid")}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
YUI.add("moodle-availability_completion-form",function(e,t){M.availability_completion=M.availability_completion||{},M.availability_completion.form=e.Object(M.core_availability.plugin),M.availability_completion.form.initInner=function(e){this.cms=e},M.availability_completion.form.getNode=function(t){var n='<span class="col-form-label p-r-1"> '+M.util.get_string("title","availability_completion")+"</span>"+' <span class="availability-group form-group"><label>'+'<span class="accesshide">'+M.util.get_string("label_cm","availability_completion")+" </span>"+'<select class="custom-select" name="cm" title="'+M.util.get_string("label_cm","availability_completion")+'">'+'<option value="0">'+M.util.get_string("choosedots","moodle")+"</option>";for(var r=0;r<this.cms.length;r++){var i=this.cms[r];n+='<option value="'+i.id+'">'+i.name+"</option>"}n+='</select></label> <label><span class="accesshide">'+M.util.get_string("label_completion","availability_completion")+' </span><select class="custom-select" '+'name="e" title="'+M.util.get_string("label_completion","availability_completion")+'">'+'<option value="1">'+M.util.get_string("option_complete","availability_completion")+"</option>"+'<option value="0">'+M.util.get_string("option_incomplete","availability_completion")+"</option>"+'<option value="2">'+M.util.get_string("option_pass","availability_completion")+"</option>"+'<option value="3">'+M.util.get_string("option_fail","availability_completion")+"</option>"+"</select></label></span>";var s=e.Node.create('<span class="form-inline">'+n+"</span>");t.cm!==undefined&&s.one("select[name=cm] > option[value="+t.cm+"]")&&s.one("select[name=cm]").set("value",""+t.cm),t.e!==undefined&&s.one("select[name=e]").set("value",""+t.e);if(!M.availability_completion.form.addedEvents){M.availability_completion.form.addedEvents=!0;var o=e.one(".availability-field");o.delegate("change",function(){M.core_availability.form.update()},".availability_completion select")}return s},M.availability_completion.form.fillValue=function(e,t){e.cm=parseInt(t.one("select[name=cm]").get("value"),10),e.e=parseInt(t.one("select[name=e]").get("value"),10)},M.availability_completion.form.fillErrors=function(e,t){var n=parseInt(t.one("select[name=cm]").get("value"),10);n===0&&e.push("availability_completion:error_selectcmid");var r=parseInt(t.one("select[name=e]").get("value"),10);(r===2||r===3)&&this.cms.forEach(function(t){t.id===n&&t.completiongradeitemnumber===null&&e.push("availability_completion:error_selectcmidpassfail")})}},"@VERSION@",{requires:["base","node","event","moodle-core_availability-form"]});
@@ -78,6 +78,16 @@ M.availability_completion.form.fillErrors = function(errors, node) {
if (cmid === 0) {
errors.push('availability_completion:error_selectcmid');
}
var e = parseInt(node.one('select[name=e]').get('value'), 10);
if (((e === 2) || (e === 3))) {
this.cms.forEach(function(cm) {
if (cm.id === cmid) {
if (cm.completiongradeitemnumber === null) {
errors.push('availability_completion:error_selectcmidpassfail');
}
}
});
}
};
@@ -76,4 +76,14 @@ M.availability_completion.form.fillErrors = function(errors, node) {
if (cmid === 0) {
errors.push('availability_completion:error_selectcmid');
}
var e = parseInt(node.one('select[name=e]').get('value'), 10);
if (((e === 2) || (e === 3))) {
this.cms.forEach(function(cm) {
if (cm.id === cmid) {
if (cm.completiongradeitemnumber === null) {
errors.push('availability_completion:error_selectcmidpassfail');
}
}
});
}
};
+9
View File
@@ -141,6 +141,15 @@ abstract class backup implements checksumable {
* Usually same than major release zero version, mainly for informative/historic purposes.
*/
const RELEASE = '3.3';
/**
* Cipher to be used in backup and restore operations.
*/
const CIPHER = 'aes-256-cbc';
/**
* Bytes enforced for key, using the cypher above. Restrictive? Yes, but better than unsafe lengths
*/
const CIPHERKEYLEN = 32;
}
/*
+11
View File
@@ -15,6 +15,17 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script is used to configure and execute the backup proccess.
*
* @package core
* @subpackage backup
* @copyright Moodle
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true);
require_once('../config.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php');
+1 -1
View File
@@ -112,7 +112,7 @@ class cc_forum extends entities {
public function get_topic_data ($instance) {
$topic_data = '';
$topic_data = array();
$topic_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -68,7 +68,7 @@ class cc_quiz extends entities {
$last_question_id = 0;
$last_answer_id = 0;
$instances = '';
$instances = array();
$types = array(MOODLE_TYPE_QUIZ, MOODLE_TYPE_QUESTION_BANK);
+1 -1
View File
@@ -87,7 +87,7 @@ class cc11_basiclti extends entities11 {
public function get_basiclti_data($instance) {
$topic_data = '';
$topic_data = array();
$basiclti_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -111,7 +111,7 @@ class cc11_forum extends entities11 {
public function get_topic_data ($instance) {
$topic_data = '';
$topic_data = array();
$topic_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -82,7 +82,7 @@ class cc11_lti extends entities11 {
public function get_basiclti_data($instance) {
$topic_data = '';
$topic_data = array();
$basiclti_file = $this->get_external_xml($instance['resource_indentifier']);
+1 -1
View File
@@ -68,7 +68,7 @@ class cc11_quiz extends entities11 {
$last_question_id = 0;
$last_answer_id = 0;
$instances = '';
$instances = array();
$types = array(MOODLE_TYPE_QUIZ, MOODLE_TYPE_QUESTION_BANK);
@@ -149,6 +149,32 @@ class core_backup_controller_testcase extends advanced_testcase {
}
$this->assertTrue($alltrue);
}
/**
* Test restore of deadlock causing backup.
*/
public function test_restore_of_deadlock_causing_backup() {
global $USER, $CFG;
$this->preventResetByRollback();
$foldername = 'deadlock';
$fp = get_file_packer('application/vnd.moodle.backup');
$tempdir = $CFG->dataroot . '/temp/backup/' . $foldername;
$files = $fp->extract_to_pathname($CFG->dirroot . '/backup/controller/tests/fixtures/deadlock.mbz', $tempdir);
$this->setAdminUser();
$controller = new restore_controller(
'deadlock',
$this->courseid,
backup::INTERACTIVE_NO,
backup::MODE_GENERAL,
$USER->id,
backup::TARGET_NEW_COURSE
);
$this->assertTrue($controller->execute_precheck());
$controller->execute_plan();
$controller->destroy();
}
}
Binary file not shown.
+26
View File
@@ -1,5 +1,31 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script is used to configure and execute the import proccess.
*
* @package core
* @subpackage backup
* @copyright Moodle
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true);
// Require both the backup and restore libs
require_once('../config.php');
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
+14 -4
View File
@@ -167,15 +167,25 @@ class backup_course_task extends backup_task {
/**
* Helper method, used by encode_content_links.
* @param string $content content in which to encode links.
* @param unknown_type $name the name of this type of encoded link.
* @param unknown_type $path the path that identifies this type of link, up
* @param string $name the name of this type of encoded link.
* @param string $path the path that identifies this type of link, up
* to the ?paramname= bit.
* @return string content with one type of link encoded.
*/
static private function encode_links_helper($content, $name, $path) {
global $CFG;
$base = preg_quote($CFG->wwwroot . $path, '/');
return preg_replace('/(' . $base . ')([0-9]+)/', '$@' . $name . '*$2@$', $content);
// We want to convert both http and https links.
$root = $CFG->wwwroot;
$httpsroot = str_replace('http://', 'https://', $root);
$httproot = str_replace('https://', 'http://', $root);
$httpsbase = preg_quote($httpsroot . $path, '/');
$httpbase = preg_quote($httproot . $path, '/');
$return = preg_replace('/(' . $httpsbase . ')([0-9]+)/', '$@' . $name . '*$2@$', $content);
$return = preg_replace('/(' . $httpbase . ')([0-9]+)/', '$@' . $name . '*$2@$', $return);
return $return;
}
// Protected API starts here
+132
View File
@@ -97,6 +97,138 @@ class base64_encode_final_element extends backup_final_element {
}
}
/**
* Implementation of {@link backup_final_element} that provides symmetric-key AES-256 encryption of contents.
*
* This final element transparently encrypts, for secure storage and transport, any content
* that shouldn't be shown normally in plain text. Usually, passwords or keys that cannot use
* hashing algorithms, although potentially can encrypt any content. All information is encoded
* using base64.
*
* Features:
* - requires openssl extension to work. Without it contents are completely omitted.
* - automatically creates an appropriate default key for the site and stores it into backup_encryptkey config (bas64 encoded).
* - uses a different appropriate init vector for every operation, which is transmited with the encrypted contents.
* - all generated data is base64 encoded for safe transmission.
* - automatically adds "encrypted" attribute for easier detection.
* - implements HMAC for providing integrity.
*
* @copyright 2017 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class encrypted_final_element extends backup_final_element {
/** @var string cypher appropiate raw key for backups in the site. Defaults to backup_encryptkey config. */
protected $key = null;
/**
* Constructor - instantiates a encrypted_final_element, specifying its basic info.
*
* Overridden to automatically add the 'encrypted' attribute if missing.
*
* @param string $name name of the element
* @param array $attributes attributes this element will handle (optional, defaults to null)
*/
public function __construct($name, $attributes = null) {
parent::__construct($name, $attributes);
if (! $this->get_attribute('encrypted')) {
$this->add_attributes('encrypted');
}
}
/**
* Set the encryption key manually, overriding default backup_encryptkey config.
*
* @param string $key key to be used for encrypting. Required to be 256-bit key.
* Use a safe generation technique. See self::generate_encryption_random_key() below.
*/
protected function set_key($key) {
$bytes = strlen($key); // Get key length in bytes.
// Only accept keys with the expected (backup::CIPHERKEYLEN) key length. There are a number of hashing,
// random generators to achieve this esasily, like the one shown below to create the default
// site encryption key and ivs.
if ($bytes !== backup::CIPHERKEYLEN) {
$info = (object)array('expected' => backup::CIPHERKEYLEN, 'found' => $bytes);
throw new base_element_struct_exception('encrypted_final_element incorrect key length', $info);
}
// Everything went ok, store the key.
$this->key = $key;
}
/**
* Set the value of the field.
*
* This method sets the value of the element, encrypted using the specified key for it,
* defaulting to (and generating) backup_encryptkey config. HMAC is used for integrity.
*
* @param string $value plain-text content the will be stored encrypted and encoded.
*/
public function set_value($value) {
// No openssl available, skip this field completely.
if (!function_exists('openssl_encrypt')) {
return;
}
// No hmac available, skip this field completely.
if (!function_exists('hash_hmac')) {
return;
}
// Cypher not available, skip this field completely.
if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
return;
}
// Ensure we have a good key, manual or default.
if (empty($this->key)) {
// The key has not been set manually, look for it at config (base64 encoded there).
$enckey = get_config('backup', 'backup_encryptkey');
if ($enckey === false) {
// Has not been set, calculate and save an appropiate random key automatically.
$enckey = base64_encode(self::generate_encryption_random_key(backup::CIPHERKEYLEN));
set_config('backup_encryptkey', $enckey, 'backup');
}
$this->set_key(base64_decode($enckey));
}
// Now we need an iv for this operation.
$iv = self::generate_encryption_random_key(openssl_cipher_iv_length(backup::CIPHER));
// Everything is ready, let's encrypt and prepend the 1-shot iv.
$value = $iv . openssl_encrypt($value, backup::CIPHER, $this->key, OPENSSL_RAW_DATA, $iv);
// Calculate the hmac of the value (iv + encrypted) and prepend it.
$hmac = hash_hmac('sha256', $value, $this->key, true);
$value = $hmac . $value;
// Ready, set the encoded value.
parent::set_value(base64_encode($value));
// Finally, if the field has an "encrypted" attribute, set it to true.
if ($att = $this->get_attribute('encrypted')) {
$att->set_value('true');
}
}
/**
* Generate an appropiate random key to be used for encrypting backup information.
*
* Normally used as site default encryption key (backup_encryptkey config) and also
* for calculating the init vectors.
*
* Note that until PHP 5.6.12 openssl_random_pseudo_bytes() did NOT
* use a "cryptographically strong algorithm" {@link https://bugs.php.net/bug.php?id=70014}
* But it's beyond my crypto-knowledge when it's worth finding a *real* better alternative.
*
* @param int $bytes Number of bytes to determine the key length expected.
*/
protected static function generate_encryption_random_key($bytes) {
return openssl_random_pseudo_bytes($bytes);
}
}
/**
* Implementation of backup_nested_element that provides special handling of files
*
+12 -3
View File
@@ -529,7 +529,7 @@ class backup_enrolments_structure_step extends backup_structure_step {
$enrol->annotate_ids('role', 'roleid');
// Add enrol plugin structure.
$this->add_plugin_structure('enrol', $enrol, false);
$this->add_plugin_structure('enrol', $enrol, true);
return $enrolments;
}
@@ -878,13 +878,22 @@ class backup_calendarevents_structure_step extends backup_structure_step {
$calendar_items_params = array('courseid'=>backup::VAR_COURSEID);
$event->set_source_sql($calendar_items_sql, $calendar_items_params);
} else if ($this->name == 'activity_calendar') {
$params = array('instance' => backup::VAR_ACTIVITYID, 'modulename' => backup::VAR_MODNAME);
// We don't backup action events.
$params = array('instance' => backup::VAR_ACTIVITYID, 'modulename' => backup::VAR_MODNAME,
'type' => array('sqlparam' => CALENDAR_EVENT_TYPE_ACTION));
// If we don't want to include the userinfo in the backup then setting the courseid
// will filter out all of the user override events (which have a course id of zero).
$coursewhere = "";
if (!$this->get_setting_value('userinfo')) {
$params['courseid'] = backup::VAR_COURSEID;
$coursewhere = " AND courseid = :courseid";
}
$event->set_source_table('event', $params);
$calendarsql = "SELECT * FROM {event}
WHERE instance = :instance
AND type <> :type
AND modulename = :modulename";
$calendarsql = $calendarsql . $coursewhere;
$event->set_source_sql($calendarsql, $params);
} else {
$event->set_source_table('event', array('courseid' => backup::VAR_COURSEID, 'instance' => backup::VAR_ACTIVITYID, 'modulename' => backup::VAR_MODNAME));
}
@@ -78,6 +78,11 @@ class restore_final_task extends restore_task {
// during backup/restore.
$this->add_step(new restore_update_availability('update_availability'));
// Refresh action events conditionally.
if ($this->get_setting_value('activities')) {
$this->add_step(new restore_calendar_action_events('restoring_action_events'));
}
// Decode all the interlinks
$this->add_step(new restore_decode_interlinks('decode_interlinks'));
+33 -4
View File
@@ -2653,13 +2653,21 @@ class restore_calendarevents_structure_step extends restore_structure_step {
$data = (object)$data;
$oldid = $data->id;
$restorefiles = true; // We'll restore the files
// If this is a new action event, it will automatically be populated by the adhoc task.
// Nothing to do here.
if (isset($data->type) && $data->type == CALENDAR_EVENT_TYPE_ACTION) {
return;
}
// User overrides for activities are identified by having a courseid of zero with
// both a modulename and instance value set.
$isuseroverride = !$data->courseid && $data->modulename && $data->instance;
// If we don't want to include user data and this record is a user override event
// for an activity then we should not create it.
if (!$this->task->get_setting_value('userinfo') && $isuseroverride) {
// for an activity then we should not create it. (Only activity events can be user override events - which must have this
// setting).
if ($isuseroverride && $this->task->setting_exists('userinfo') && !$this->task->get_setting_value('userinfo')) {
return;
}
@@ -3082,7 +3090,8 @@ class restore_course_logs_structure_step extends restore_structure_step {
$data = (object)($data);
$data->time = $this->apply_date_offset($data->time);
// There is no need to roll dates. Logs are supposed to be immutable. See MDL-44961.
$data->userid = $this->get_mappingid('user', $data->userid);
$data->course = $this->get_courseid();
$data->cmid = 0;
@@ -3129,7 +3138,8 @@ class restore_activity_logs_structure_step extends restore_course_logs_structure
$data = (object)($data);
$data->time = $this->apply_date_offset($data->time);
// There is no need to roll dates. Logs are supposed to be immutable. See MDL-44961.
$data->userid = $this->get_mappingid('user', $data->userid);
$data->course = $this->get_courseid();
$data->cmid = $this->task->get_moduleid();
@@ -5529,3 +5539,22 @@ class restore_completion_defaults_structure_step extends restore_structure_step
$this->set_mapping('course_completion_defaults', $oldid, $newid);
}
}
/**
* Restore action events.
*
* @package core_backup
* @copyright 2017 onwards Ankit Agarwal
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class restore_calendar_action_events extends restore_execution_step {
/**
* What to do when this step is executed.
*/
protected function define_execution() {
// We just queue the task here rather trying to recreate everything manually.
// The task will automatically populate all data.
$task = new \core\task\refresh_mod_calendar_events_task();
$task->set_custom_data(array('courseid' => $this->get_courseid()));
\core\task\manager::queue_adhoc_task($task, true);
}
}
@@ -0,0 +1,116 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for the handling of encrypted contents in backup and restore.
*
* @package core_backup
* @copyright 2016 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_custom_fields.php');
class core_backup_encrypted_content_testscase extends advanced_testcase {
public function setUp() {
if (!function_exists('openssl_encrypt')) {
$this->markTestSkipped('OpenSSL extension is not loaded.');
} else if (!function_exists('hash_hmac')) {
$this->markTestSkipped('Hash extension is not loaded.');
} else if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
$this->markTestSkipped('Expected cipher not available: ' . backup::CIPHER);
}
}
public function test_encrypted_final_element() {
$this->resetAfterTest(true);
// Some basic verifications.
$efe = new encrypted_final_element('test', array('encrypted'));
$this->assertInstanceOf('encrypted_final_element', $efe);
$this->assertSame('test', $efe->get_name());
$atts = $efe->get_attributes();
$this->assertCount(1, $atts);
$att = reset($atts);
$this->assertInstanceOf('backup_attribute', $att);
$this->assertSame('encrypted', $att->get_name());
// Using a manually defined (incorrect length) key.
$efe = new encrypted_final_element('test', array('encrypted'));
$key = 'this_in_not_correct_32_byte_key';
try {
set_config('backup_encryptkey', base64_encode($key), 'backup');
$efe->set_value('tiny_secret');
$this->fail('Expecting base_element_struct_exception exception, none happened');
} catch (exception $e) {
$this->assertInstanceOf('base_element_struct_exception', $e);
$this->assertEquals('encrypted_final_element incorrect key length', $e->errorcode);
}
// Using a manually defined (correct length) key.
$efe = new encrypted_final_element('test', array('testattr', 'encrypted'));
$key = hash('md5', 'Moodle rocks and this is not secure key, who cares, it is a test');
set_config('backup_encryptkey', base64_encode($key), 'backup');
$this->assertEmpty($efe->get_value());
$secret = 'This is a secret message that nobody else will be able to read but me 💩 ';
$efe->set_value($secret);
$atts = $efe->get_attributes();
$this->assertCount(2, $atts);
$this->assertArrayHasKey('encrypted', $atts); // We added it explicitly.
$this->assertTrue($atts['encrypted']->is_set());
$this->assertSame('true', $atts['encrypted']->get_value());
$this->assertNotEmpty($efe->get_value());
$this->assertTrue($efe->is_set());
// Get the crypted content and decrypt it manually.
$ctext = $efe->get_value();
$hmaclen = 32; // SHA256 is 32 bytes.
$ivlen = openssl_cipher_iv_length(backup::CIPHER);
list($hmac, $iv, $text) = array_values(unpack("a{$hmaclen}hmac/a{$ivlen}iv/a*text", base64_decode($ctext)));
$this->assertSame(hash_hmac('sha256', $iv . $text, $key, true), $hmac);
$this->assertSame($secret, openssl_decrypt($text, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv));
// Using the default site-generated key.
$efe = new encrypted_final_element('test', array('testattr'));
$this->assertEmpty($efe->get_value());
$secret = 'This is a secret message that nobody else will be able to read but me 💩 ';
$efe->set_value($secret);
$atts = $efe->get_attributes();
$this->assertCount(2, $atts);
$this->assertArrayHasKey('encrypted', $atts); // Was added automatcally, we did not specify it.
$this->assertTrue($atts['encrypted']->is_set());
$this->assertSame('true', $atts['encrypted']->get_value());
$this->assertNotEmpty($efe->get_value());
$this->assertTrue($efe->is_set());
// Get the crypted content and decrypt it manually.
$ctext = $efe->get_value();
$hmaclen = 32; // SHA256 is 32 bytes.
$ivlen = openssl_cipher_iv_length(backup::CIPHER);
list($hmac, $iv, $text) = array_values(unpack("a{$hmaclen}hmac/a{$ivlen}iv/a*text", base64_decode($ctext)));
$key = base64_decode(get_config('backup', 'backup_encryptkey'));
$this->assertSame(hash_hmac('sha256', $iv . $text, $key, true), $hmac);
$this->assertSame($secret, openssl_decrypt($text, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv));
}
}
@@ -0,0 +1,99 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for backup_xml_transformer class.
*
* @package core_backup
* @subpackage moodle2
* @category backup
* @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php');
/**
* Tests for backup_xml_transformer.
*
* @package core_backup
* @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_xml_transformer_testcase extends advanced_testcase {
/**
* Initial set up.
*/
public function setUp() {
parent::setUp();
$this->resetAfterTest(true);
}
/**
* Data provider for ::test_filephp_links_replace.
*
* @return array
*/
public function filephp_links_replace_data_provider() {
return array(
array('http://test.test/', 'http://test.test/'),
array('http://test.test/file.php/1', 'http://test.test/file.php/1'),
array('http://test.test/file.php/2/1.jpg', 'http://test.test/file.php/2/1.jpg'),
array('http://test.test/file.php/2', 'http://test.test/file.php/2'),
array('http://test.test/file.php/1/1.jpg', '$@FILEPHP@$$@SLASH@$1.jpg'),
array('http://test.test/file.php/1//1.jpg', '$@FILEPHP@$$@SLASH@$$@SLASH@$1.jpg'),
array('http://test.test/file.php?file=/1', '$@FILEPHP@$'),
array('http://test.test/file.php?file=/2/1.jpg', 'http://test.test/file.php?file=/2/1.jpg'),
array('http://test.test/file.php?file=/2', 'http://test.test/file.php?file=/2'),
array('http://test.test/file.php?file=/1/1.jpg', '$@FILEPHP@$$@SLASH@$1.jpg'),
array('http://test.test/file.php?file=/1//1.jpg', '$@FILEPHP@$$@SLASH@$$@SLASH@$1.jpg'),
array('http://test.test/file.php?file=%2f1', '$@FILEPHP@$'),
array('http://test.test/file.php?file=%2f2%2f1.jpg', 'http://test.test/file.php?file=%2f2%2f1.jpg'),
array('http://test.test/file.php?file=%2f2', 'http://test.test/file.php?file=%2f2'),
array('http://test.test/file.php?file=%2f1%2f1.jpg', '$@FILEPHP@$$@SLASH@$1.jpg'),
array('http://test.test/file.php?file=%2f1%2f%2f1.jpg', '$@FILEPHP@$$@SLASH@$$@SLASH@$1.jpg'),
array('http://test.test/file.php?file=%2F1', '$@FILEPHP@$'),
array('http://test.test/file.php?file=%2F2%2F1.jpg', 'http://test.test/file.php?file=%2F2%2F1.jpg'),
array('http://test.test/file.php?file=%2F2', 'http://test.test/file.php?file=%2F2'),
array('http://test.test/file.php?file=%2F1%2F1.jpg', '$@FILEPHP@$$@SLASH@$1.jpg'),
array('http://test.test/file.php?file=%2F1%2F%2F1.jpg', '$@FILEPHP@$$@SLASH@$$@SLASH@$1.jpg'),
);
}
/**
* Test that backup_xml_transformer replaces file php links to $@FILEPHP@$.
*
* @dataProvider filephp_links_replace_data_provider
* @param string $content Testing content.
* @param string $expected Expected result.
*/
public function test_filephp_links_replace($content, $expected) {
global $CFG;
$CFG->wwwroot = 'http://test.test';
$transformer = new backup_xml_transformer(1);
$this->assertEquals($expected, $transformer->process($content));
}
}
+25 -1
View File
@@ -1,5 +1,29 @@
<?php
//This script is used to configure and execute the restore proccess.
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This script is used to configure and execute the restore proccess.
*
* @package core
* @subpackage backup
* @copyright Moodle
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define('NO_OUTPUT_BUFFERING', true);
require_once('../config.php');
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
@@ -56,8 +56,10 @@ class backup_anonymizer_helper {
if (preg_match('/^anon\d*$/', $user->username)) {
$match = preg_match('/^anonfirstname\d*$/', $user->firstname);
$match = $match && preg_match('/^anonlastname\d*$/', $user->lastname);
$match = $match && preg_match('/^anon\d*@doesntexist\.com$/', $user->email);
if ($match) {
// Check .com for backwards compatibility.
$emailmatch = preg_match('/^anon\d*@doesntexist\.com$/', $user->email) ||
preg_match('/^anon\d*@doesntexist\.invalid$/', $user->email);
if ($match && $emailmatch) {
return true;
}
}
@@ -93,7 +95,7 @@ class backup_anonymizer_helper {
public static function process_user_email($value) {
static $counter = 0;
$counter++;
return 'anon' . $counter . '@doesntexist.com'; // Just a counter
return 'anon' . $counter . '@doesntexist.invalid'; // Just a counter.
}
public static function process_user_icq($value) {
@@ -60,17 +60,26 @@ class restore_structure_parser_processor extends grouped_parser_processor {
} else if (strpos($cdata, '$@FILEPHP@$') === false) { // No $@FILEPHP@$, nothing to convert
return $cdata;
}
if ($CFG->slasharguments) {
$slash = '/';
$forcedownload = '?forcedownload=1';
} else {
$slash = '%2F';
$forcedownload = '&amp;forcedownload=1';
}
// We have to remove trailing slashes, otherwise file URLs will be restored with an extra slash.
$basefileurl = rtrim(moodle_url::make_legacyfile_url($this->courseid, null)->out(true), $slash);
// Decode file.php calls
$search = array ("$@FILEPHP@$");
$replace = array(moodle_url::make_legacyfile_url($this->courseid, null));
$replace = array($basefileurl);
$result = str_replace($search, $replace, $cdata);
// Now $@SLASH@$ and $@FORCEDOWNLOAD@$ MDL-18799
$search = array('$@SLASH@$', '$@FORCEDOWNLOAD@$');
if ($CFG->slasharguments) {
$replace = array('/', '?forcedownload=1');
} else {
$replace = array('%2F', '&amp;forcedownload=1');
}
$replace = array($slash, $forcedownload);
return str_replace($search, $replace, $result);
}
@@ -44,13 +44,33 @@ class backup_course_task_testcase extends basic_testcase {
*/
public function test_course_encode_content_links() {
global $CFG;
$httpsroot = "https://moodle.org";
$httproot = "http://moodle.org";
$oldroot = $CFG->wwwroot;
// HTTPS root and links of both types in content.
$CFG->wwwroot = $httpsroot;
$encoded = backup_course_task::encode_content_links(
$CFG->wwwroot . '/course/view.php?id=123, ' .
$CFG->wwwroot . '/grade/index.php?id=123, ' .
$CFG->wwwroot . '/grade/report/index.php?id=123, ' .
$CFG->wwwroot . '/badges/view.php?type=2&id=123 and ' .
$CFG->wwwroot . '/user/index.php?id=123.');
$this->assertEquals('$@COURSEVIEWBYID*123@$, $@GRADEINDEXBYID*123@$, ' .
$httproot . '/course/view.php?id=123, ' .
$httpsroot . '/course/view.php?id=123, ' .
$httpsroot . '/grade/index.php?id=123, ' .
$httpsroot . '/grade/report/index.php?id=123, ' .
$httpsroot . '/badges/view.php?type=2&id=123 and ' .
$httpsroot . '/user/index.php?id=123.');
$this->assertEquals('$@COURSEVIEWBYID*123@$, $@COURSEVIEWBYID*123@$, $@GRADEINDEXBYID*123@$, ' .
'$@GRADEREPORTINDEXBYID*123@$, $@BADGESVIEWBYID*123@$ and $@USERINDEXVIEWBYID*123@$.', $encoded);
// HTTP root and links of both types in content.
$CFG->wwwroot = $httproot;
$encoded = backup_course_task::encode_content_links(
$httproot . '/course/view.php?id=123, ' .
$httpsroot . '/course/view.php?id=123, ' .
$httproot . '/grade/index.php?id=123, ' .
$httproot . '/grade/report/index.php?id=123, ' .
$httproot . '/badges/view.php?type=2&id=123 and ' .
$httproot . '/user/index.php?id=123.');
$this->assertEquals('$@COURSEVIEWBYID*123@$, $@COURSEVIEWBYID*123@$, $@GRADEINDEXBYID*123@$, ' .
'$@GRADEREPORTINDEXBYID*123@$, $@BADGESVIEWBYID*123@$ and $@USERINDEXVIEWBYID*123@$.', $encoded);
$CFG->wwwroot = $oldroot;
}
}
@@ -0,0 +1,132 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Tests for restore_structure_parser_processor class.
*
* @package core_backup
* @category test
* @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot . '/backup/util/helper/restore_structure_parser_processor.class.php');
/**
* Tests for restore_structure_parser_processor class.
*
* @package core_backup
* @copyright 2017 Dmitrii Metelkin (dmitriim@catalyst-au.net)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class restore_structure_parser_processor_test extends advanced_testcase {
/**
* Initial set up.
*/
public function setUp() {
parent::setUp();
$this->resetAfterTest(true);
}
/**
* Data provider for ::test_process_cdata.
*
* @return array
*/
public function process_cdata_data_provider() {
return array(
array(null, null, true),
array("$@NULL@$", null, true),
array("$@NULL@$ ", "$@NULL@$ ", true),
array(1, 1, true),
array(" ", " ", true),
array("1", "1", true),
array("$@FILEPHP@$1.jpg", "$@FILEPHP@$1.jpg", true),
array(
"http://test.test/$@SLASH@$",
"http://test.test/$@SLASH@$",
true
),
array(
"<a href='$@FILEPHP@$1.jpg'>Image</a>",
"<a href='http://test.test/file.php/11.jpg'>Image</a>",
true
),
array(
"<a href='$@FILEPHP@$$@SLASH@$1.jpg'>Image</a>",
"<a href='http://test.test/file.php/1/1.jpg'>Image</a>",
true
),
array(
"<a href='$@FILEPHP@$$@SLASH@$$@SLASH@$1.jpg'>Image</a>",
"<a href='http://test.test/file.php/1//1.jpg'>Image</a>",
true
),
array(
"<a href='$@FILEPHP@$1.jpg'>Image</a>",
"<a href='http://test.test/file.php?file=%2F11.jpg'>Image</a>",
false
),
array(
"<a href='$@FILEPHP@$$@SLASH@$1.jpg'>Image</a>",
"<a href='http://test.test/file.php?file=%2F1%2F1.jpg'>Image</a>",
false
),
array(
"<a href='$@FILEPHP@$$@SLASH@$$@SLASH@$1.jpg'>Image</a>",
"<a href='http://test.test/file.php?file=%2F1%2F%2F1.jpg'>Image</a>",
false
),
array(
"<a href='$@FILEPHP@$$@SLASH@$1.jpg$@FORCEDOWNLOAD@$'>Image</a>",
"<a href='http://test.test/file.php/1/1.jpg?forcedownload=1'>Image</a>",
true
),
array(
"<a href='$@FILEPHP@$$@SLASH@$1.jpg$@FORCEDOWNLOAD@$'>Image</a>",
"<a href='http://test.test/file.php?file=%2F1%2F1.jpg&amp;forcedownload=1'>Image</a>",
false
),
);
}
/**
* Test that restore_structure_parser_processor replaces $@FILEPHP@$ to correct file php links.
*
* @dataProvider process_cdata_data_provider
* @param string $content Testing content.
* @param string $expected Expected result.
* @param bool $slasharguments A value for $CFG->slasharguments setting.
*/
public function test_process_cdata($content, $expected, $slasharguments) {
global $CFG;
$CFG->slasharguments = $slasharguments;
$CFG->wwwroot = 'http://test.test';
$processor = new restore_structure_parser_processor(1, 1);
$this->assertEquals($expected, $processor->process_cdata($content));
}
}
+60
View File
@@ -94,6 +94,66 @@ abstract class restore_step extends base_step {
// Return the passed value with cached offset applied.
return $value + $cache[$this->get_restoreid()];
}
/**
* Returns symmetric-key AES-256 decryption of base64 encoded contents.
*
* This method is used in restore operations to decrypt contents encrypted with
* {@link encrypted_final_element} automatically decoding (base64) and decrypting
* contents using the key stored in backup_encryptkey config.
*
* Requires openssl, cipher availability, and key existence (backup
* automatically sets it if missing). Integrity is provided via HMAC.
*
* @param string $value {@link encrypted_final_element} value to decode and decrypt.
* @return string|null decoded and decrypted value or null if the operation can not be performed.
*/
public function decrypt($value) {
// No openssl available, skip this field completely.
if (!function_exists('openssl_encrypt')) {
return null;
}
// No hash available, skip this field completely.
if (!function_exists('hash_hmac')) {
return null;
}
// Cypher not available, skip this field completely.
if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
return null;
}
// Get the decrypt key. Skip if missing.
$key = get_config('backup', 'backup_encryptkey');
if ($key === false) {
return null;
}
// And decode it.
$key = base64_decode($key);
// Arrived here, let's proceed with authentication (provides integrity).
$hmaclen = 32; // SHA256 is 32 bytes.
$ivlen = openssl_cipher_iv_length(backup::CIPHER);
list($hmac, $iv, $text) = array_values(unpack("a{$hmaclen}hmac/a{$ivlen}iv/a*text", base64_decode($value)));
// Verify HMAC matches expectations, skip if not (integrity failed).
if (!hash_equals($hmac, hash_hmac('sha256', $iv . $text, $key, true))) {
return null;
}
// Arrived here, integrity is ok, let's decrypt.
$result = openssl_decrypt($text, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv);
// For some reason decrypt failed (strange, HMAC check should have deteted it), skip this field completely.
if ($result === false) {
return null;
}
return $result;
}
}
/*
+46
View File
@@ -91,6 +91,52 @@ class backup_step_testcase extends advanced_testcase {
$bc->destroy();
}
/**
* test restore_step class, decrypt method
*/
public function test_restore_step_decrypt() {
$this->resetAfterTest(true);
if (!function_exists('openssl_encrypt')) {
$this->markTestSkipped('OpenSSL extension is not loaded.');
} else if (!function_exists('hash_hmac')) {
$this->markTestSkipped('Hash extension is not loaded.');
} else if (!in_array(backup::CIPHER, openssl_get_cipher_methods())) {
$this->markTestSkipped('Expected cipher not available: ' . backup::CIPHER);
}
$bt = new mock_restore_task_basepath('taskname');
$bs = new mock_restore_structure_step('steptest', null, $bt);
$this->assertTrue(method_exists($bs, 'decrypt'));
// Let's prepare a string for being decrypted.
$secret = 'This is a secret message that nobody else will be able to read but me 💩 ';
$key = hash('md5', 'Moodle rocks and this is not secure key, who cares, it is a test');
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(backup::CIPHER));
$message = $iv . openssl_encrypt($secret, backup::CIPHER, $key, OPENSSL_RAW_DATA, $iv);
$hmac = hash_hmac('sha256', $message, $key, true);
$crypt = base64_encode($hmac . $message);
// Running it without a key configured, returns null.
$this->assertNull($bs->decrypt($crypt));
// Store the key into config.
set_config('backup_encryptkey', base64_encode($key), 'backup');
// Verify decrypt works and returns original.
$this->assertSame($secret, $bs->decrypt($crypt));
// Finally, test the integrity failure detection is working.
// (this can be caused by changed hmac, key or message, in
// this case we are just forcing it via changed hmac).
$hmac = md5($message);
$crypt = base64_encode($hmac . $message);
$this->assertNull($bs->decrypt($crypt));
}
/**
* test backup_structure_step class
*/

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