Compare commits

...

648 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7) 3d77676d51 Moodle release 3.3.2 2017-09-09 22:48:09 +02: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
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
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
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
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
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
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
644 changed files with 10640 additions and 3159 deletions
+25 -1
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.
@@ -18,6 +18,10 @@ php:
addons:
postgresql: "9.3"
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
services:
- redis-server
@@ -73,6 +77,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.3
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;
}
+176
View File
@@ -2081,4 +2081,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
*
+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";
}
}
+6
View File
@@ -38,6 +38,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 !== '') {
+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 -8
View File
@@ -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';
+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';
+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;
}
+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;
}
+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');
}
}
});
}
};
+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');
@@ -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
+11 -2
View File
@@ -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,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));
}
}
+6 -1
View File
@@ -47,8 +47,13 @@ class award_criteria_activity extends award_criteria {
parent::__construct($record);
$this->course = $DB->get_record_sql('SELECT c.id, c.enablecompletion, c.cacherev, c.startdate
FROM {badge} b INNER JOIN {course} c ON b.courseid = c.id
FROM {badge} b LEFT JOIN {course} c ON b.courseid = c.id
WHERE b.id = :badgeid ', array('badgeid' => $this->badgeid), MUST_EXIST);
// If the course doesn't exist but we're sure the badge does (thanks to the LEFT JOIN), then use the site as the course.
if (empty($this->course->id)) {
$this->course = get_course(SITEID);
}
$this->courseid = $this->course->id;
}
+6 -1
View File
@@ -49,8 +49,13 @@ class award_criteria_course extends award_criteria {
parent::__construct($record);
$this->course = $DB->get_record_sql('SELECT c.id, c.enablecompletion, c.cacherev, c.startdate
FROM {badge} b INNER JOIN {course} c ON b.courseid = c.id
FROM {badge} b LEFT JOIN {course} c ON b.courseid = c.id
WHERE b.id = :badgeid ', array('badgeid' => $this->badgeid), MUST_EXIST);
// If the course doesn't exist but we're sure the badge does (thanks to the LEFT JOIN), then use the site as the course.
if (empty($this->course->id)) {
$this->course = get_course(SITEID);
}
$this->courseid = $this->course->id;
}
+3
View File
@@ -88,5 +88,8 @@ function xmldb_block_badges_upgrade($oldversion, $block) {
// 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
@@ -88,5 +88,8 @@ function xmldb_block_calendar_month_upgrade($oldversion, $block) {
// 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
@@ -88,5 +88,8 @@ function xmldb_block_calendar_upcoming_upgrade($oldversion, $block) {
// 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
@@ -61,5 +61,8 @@ function xmldb_block_community_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;
}
+7
View File
@@ -109,6 +109,13 @@ class community_hub_search_form extends moodleform {
$mform->addElement('static', 'errorhub', '', $error);
}
// Hubdirectory returns old URL for the moodle.net hub, substitute it.
foreach ($hubs as $key => $hub) {
if ($hub['url'] === HUB_OLDMOODLEORGHUBURL) {
$hubs[$key]['url'] = HUB_MOODLEORGHUBURL;
}
}
//display list of registered on hub
$registrationmanager = new registration_manager();
$registeredhubs = $registrationmanager->get_registered_on_hubs();
+3
View File
@@ -63,5 +63,8 @@ function xmldb_block_completionstatus_upgrade($oldversion, $block) {
// 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;
}
+4 -4
View File
@@ -90,7 +90,7 @@ echo html_writer::start_tag('tbody');
if ($USER->id != $user->id) {
echo html_writer::start_tag('tr');
echo html_writer::start_tag('td', array('colspan' => '2'));
echo html_writer::tag('b', get_string('showinguser', 'completion'));
echo html_writer::tag('b', get_string('showinguser', 'completion') . ' ');
$url = new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $course->id));
echo html_writer::link($url, fullname($user));
echo html_writer::end_tag('td');
@@ -99,7 +99,7 @@ if ($USER->id != $user->id) {
echo html_writer::start_tag('tr');
echo html_writer::start_tag('td', array('colspan' => '2'));
echo html_writer::tag('b', get_string('status'));
echo html_writer::tag('b', get_string('status') . ' ');
// Is course complete?
$coursecomplete = $info->is_course_complete($user->id);
@@ -141,7 +141,7 @@ if (empty($completions)) {
} else {
echo html_writer::start_tag('tr');
echo html_writer::start_tag('td', array('colspan' => '2'));
echo html_writer::tag('b', get_string('required'));
echo html_writer::tag('b', get_string('required') . ' ');
// Get overall aggregation method.
$overall = $info->get_aggregation_method();
@@ -214,7 +214,7 @@ if (empty($completions)) {
echo core_text::strtolower(get_string('any', 'completion'));
}
echo html_writer::end_tag('i') .core_text::strtolower(get_string('required')).')';
echo ' ' . html_writer::end_tag('i') .core_text::strtolower(get_string('required')).')';
$agg_type = false;
}
}
+3
View File
@@ -63,5 +63,8 @@ function xmldb_block_course_summary_upgrade($oldversion, $block) {
// 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
@@ -48,5 +48,8 @@ function xmldb_block_html_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;
}
+1 -1
View File
@@ -115,7 +115,7 @@ class block_login extends block_base {
$this->content->text .= '<div class="potentialidplist">';
foreach ($potentialidps as $idp) {
$this->content->text .= '<div class="potentialidp">';
$this->content->text .= '<a class="btn btn-secondary btn-block" ';
$this->content->text .= '<a class="btn btn-default btn-block" ';
$this->content->text .= 'href="' . $idp['url']->out() . '" title="' . s($idp['name']) . '">';
if (!empty($idp['iconurl'])) {
$this->content->text .= '<img src="' . s($idp['iconurl']) . '" width="24" height="24" class="m-r-1"/>';
+1
View File
@@ -0,0 +1 @@
define(["jquery","core/ajax","core/custom_interaction_events","core/notification"],function(a,b,c,d){var e=function(e){c.define(e,[c.events.activate]),e.on(c.events.activate,"[data-toggle='tab']",function(c){var e=a(c.currentTarget).data("tabname");"function"==typeof window.history.pushState&&window.history.pushState(null,null,"?myoverviewtab="+e);var f={methodname:"core_user_update_user_preferences",args:{preferences:[{type:"block_myoverview_last_tab",value:e}]}};b.call([f])[0].fail(d.exception)})};return{registerEventListeners:e}});
@@ -0,0 +1,61 @@
// 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/>.
/**
* Javascript used to save the user's tab preference.
*
* @package block_myoverview
* @copyright 2017 Mark Nelson <markn@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(['jquery', 'core/ajax', 'core/custom_interaction_events',
'core/notification'], function($, Ajax, CustomEvents, Notification) {
/**
* Registers an event that saves the user's tab preference when switching between them.
*
* @param {object} root The container element
*/
var registerEventListeners = function(root) {
CustomEvents.define(root, [CustomEvents.events.activate]);
root.on(CustomEvents.events.activate, "[data-toggle='tab']", function(e) {
var tabname = $(e.currentTarget).data('tabname');
// Bootstrap does not change the URL when using BS tabs, so need to do this here.
// Also check to make sure the browser supports the history API.
if (typeof window.history.pushState === "function") {
window.history.pushState(null, null, '?myoverviewtab=' + tabname);
}
var request = {
methodname: 'core_user_update_user_preferences',
args: {
preferences: [
{
type: 'block_myoverview_last_tab',
value: tabname
}
]
}
};
Ajax.call([request])[0]
.fail(Notification.exception);
});
};
return {
registerEventListeners: registerEventListeners
};
});
+19 -1
View File
@@ -50,7 +50,16 @@ class block_myoverview extends block_base {
return $this->content;
}
$renderable = new \block_myoverview\output\main();
// Check if the tab to select wasn't passed in the URL, if so see if the user has any preference.
if (!$tab = optional_param('myoverviewtab', null, PARAM_ALPHA)) {
// Check if the user has no preference, if so get the site setting.
if (!$tab = get_user_preferences('block_myoverview_last_tab')) {
$config = get_config('block_myoverview');
$tab = $config->defaulttab;
}
}
$renderable = new \block_myoverview\output\main($tab);
$renderer = $this->page->get_renderer('block_myoverview');
$this->content = new stdClass();
@@ -68,4 +77,13 @@ class block_myoverview extends block_base {
public function applicable_formats() {
return array('my' => true);
}
/**
* This block does contain a configuration settings.
*
* @return boolean
*/
public function has_config() {
return true;
}
}
@@ -63,7 +63,8 @@ class courses_view implements renderable, templatable {
* @return array
*/
public function export_for_template(renderer_base $output) {
$today = time();
global $CFG;
require_once($CFG->dirroot.'/course/lib.php');
// Build courses view data structure.
$coursesview = [
@@ -73,8 +74,6 @@ class courses_view implements renderable, templatable {
// How many courses we have per status?
$coursesbystatus = ['past' => 0, 'inprogress' => 0, 'future' => 0];
foreach ($this->courses as $course) {
$startdate = $course->startdate;
$enddate = $course->enddate;
$courseid = $course->id;
$context = \context_course::instance($courseid);
$exporter = new course_summary_exporter($course, [
@@ -84,14 +83,20 @@ class courses_view implements renderable, templatable {
// Convert summary to plain text.
$exportedcourse->summary = content_to_text($exportedcourse->summary, $exportedcourse->summaryformat);
// Include course visibility.
$exportedcourse->visible = (bool)$course->visible;
$courseprogress = null;
$classified = course_classify_for_timeline($course);
if (isset($this->coursesprogress[$courseid])) {
$coursecompleted = $this->coursesprogress[$courseid]['completed'];
$courseprogress = $this->coursesprogress[$courseid]['progress'];
$exportedcourse->hasprogress = !is_null($courseprogress);
$exportedcourse->progress = $courseprogress;
}
if ((isset($coursecompleted) && $coursecompleted) || (!empty($enddate) && $enddate < $today)) {
if ($classified == COURSE_TIMELINE_PAST) {
// Courses that have already ended.
$pastpages = floor($coursesbystatus['past'] / $this::COURSES_PER_PAGE);
@@ -100,7 +105,7 @@ class courses_view implements renderable, templatable {
$coursesview['past']['pages'][$pastpages]['page'] = $pastpages + 1;
$coursesview['past']['haspages'] = true;
$coursesbystatus['past']++;
} else if ($startdate > $today) {
} else if ($classified == COURSE_TIMELINE_FUTURE) {
// Courses that have not started yet.
$futurepages = floor($coursesbystatus['future'] / $this::COURSES_PER_PAGE);
+27 -1
View File
@@ -29,6 +29,7 @@ use renderer_base;
use templatable;
use core_completion\progress;
require_once($CFG->dirroot . '/blocks/myoverview/lib.php');
require_once($CFG->libdir . '/completionlib.php');
/**
@@ -39,6 +40,20 @@ require_once($CFG->libdir . '/completionlib.php');
*/
class main implements renderable, templatable {
/**
* @var string The tab to display.
*/
public $tab;
/**
* Constructor.
*
* @param string $tab The tab to display.
*/
public function __construct($tab) {
$this->tab = $tab;
}
/**
* Export this data so it can be used as the context for a mustache template.
*
@@ -73,13 +88,24 @@ class main implements renderable, templatable {
$nocoursesurl = $output->image_url('courses', 'block_myoverview')->out();
$noeventsurl = $output->image_url('activities', 'block_myoverview')->out();
// Now, set the tab we are going to be viewing.
$viewingtimeline = false;
$viewingcourses = false;
if ($this->tab == BLOCK_MYOVERVIEW_TIMELINE_VIEW) {
$viewingtimeline = true;
} else {
$viewingcourses = true;
}
return [
'midnight' => usergetmidnight(time()),
'coursesview' => $coursesview->export_for_template($output),
'urls' => [
'nocourses' => $nocoursesurl,
'noevents' => $noeventsurl
]
],
'viewingtimeline' => $viewingtimeline,
'viewingcourses' => $viewingcourses
];
}
}
@@ -22,6 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['defaulttab'] = 'Default tab';
$string['defaulttab_desc'] = 'The tab that will be displayed when a user first views their course overview. When returning to their course overview, the user\'s active tab is remembered.';
$string['future'] = 'Future';
$string['inprogress'] = 'In progress';
$string['morecourses'] = 'More courses';

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