645 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
dba5826124 Merge branch 'MDL-50469-master' of git://github.com/junpataleta/moodle 2018-01-22 02:43:08 +01:00
Eloy Lafuente (stronk7)
2ab36722f2 Merge branch 'MDL-53113-master' of git://github.com/junpataleta/moodle 2018-01-17 10:37:23 +01:00
Eloy Lafuente (stronk7)
76f8b36105 MDL-53113 libraries: Also remove core_renderer->notify_xxx() methods
Keeping the methods instead of fully deleting them alternative.
2018-01-17 02:18:16 +01:00
Eloy Lafuente (stronk7)
0e68db9e83 MDL-41312 groups: documment final removal in upgrade.txt 2018-01-17 02:04:16 +01:00
Jun Pataleta
56c9d66652 MDL-50469 core: Update lib/upgrade.txt about notify() final deprecation 2018-01-16 11:34:00 +08:00
David Mudrák
521252d642 MDL-32113 xmldb: Support numeric fields with precision up to 38 digits
The patch increases the maximum supported precision (total number of
digits) for numeric (decimal) fields to 38 digits (current limit on
Oracle and MSSQL).

Additionally, we add our own limit for the whole number part of numeric
fields so they are no longer than integer fields (20 digits). This is to
make it easier to eventually convert from one field type to another.
Note that PHP floats commonly support precision of roughly 15 digits
anyway.
2017-12-21 19:48:03 +01:00
Andrew Hancox
64cd459648 MDL-50666 core: Rename allow_ACTION to core_role_set_ACTION_allowed 2017-12-19 13:53:23 +13:00
Andrew Hancox
a63cd3e2ca MDL-50666 core: Add function get_viewable_roles to set role visibility 2017-12-19 13:53:23 +13:00
Damyon Wiese
d3882ea4a3 MDL-60733 core: B/C for google_oauth
The google_oauth class extends oauth2client which was modified to send "Accept" headers.

The "Accept" headers break picasa and could break any other plugin that was using google_oauth.
2017-11-08 15:41:53 +08:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00
John Okely
4b501ec96b MDL-42834 admin: Deprecate https_required and verify_https_required 2017-10-23 12:25:35 +08:00
John Okely
b58764ff99 MDL-42834 admin: Remove loginhttps 2017-10-23 12:25:35 +08:00
Jun Pataleta
4047fccba7 MDL-59811 enrol: Move get_user_enrolment_actions logic to parent class
* These duplicated implementations can be simplified where the logic
  can be moved to enrol_plugin::get_user_enrolment_actions() method
  itself.
2017-10-09 10:29:02 +08:00
Matt Clarkson
b1eb6dd7f2 MDL-33174 lib/filestorage: Add filename to curl request
While the lack of the filename in curl POST does not
directly affect Moodle, some external API's expect to get
the filename of the original file, which affects plugins
using the CURL class.
2017-10-02 09:27:51 +13:00
Mark Nelson
93b47710ac MDL-59977 core: do not directly check 'viewparticipant' capability 2017-09-11 12:44:27 +08:00
Jun Pataleta
237efd4f0d MDL-59759 core_amd: Deprecate core/modal_confirm 2017-09-04 10:44:46 +08:00
Jake Dallimore
4d068a6708 MDL-59172 user: user_can_view_profile() now checks viewalldetails cap 2017-08-07 09:27:04 +08:00
Jun Pataleta
198d72913f MDL-59366 core_amd: Modifications for form-autocomplete
* New optional parameter 'closeSuggestionsOnSelect' for the enhance()
function for form-autocomplete. Setting this to true will close the
suggestions popup immediately after an option has been selected. If not
specified, it defaults to true for single-select elements and false
for multiple-select elements.

Part of MDL-59290.
2017-07-28 16:11:38 +08:00
Jun Pataleta
bb1c6f85f5 MDL-59366 core: New enrolid param for get_enrolled_* functions
* New optional parameter $enrolid for the following functions:
  - get_enrolled_join()
  - get_enrolled_sql()
  - get_enrolled_with_capabilities_join()
  Setting this parameter to a non-zero value will add a condition
  to the query such that only users that were enrolled with this
  enrolment method will be returned.

Part of MDL-59290.
2017-07-28 11:32:13 +08:00
Jun Pataleta
fd0a43be1b MDL-59369 enrol: Introduce data-action attribute for enrol action links 2017-07-26 09:44:33 +08:00
Jun Pataleta
3b1eba069e MDL-59528 core: Add option to display fullname beside user picture 2017-07-21 08:45:31 +08:00
Dan Poltawski
229c5ec14f Merge branch 'MDL-59443-master-filetypesvalidation' of git://github.com/mudrd8mz/moodle 2017-07-11 10:16:40 +01:00
Eloy Lafuente (stronk7)
f83d212bcf MDL-57432 upgrade: remove unused functions/settings from upgradelib
All these functions were used only by deleted upgrade steps
so it's safe to proceed with straight deletion, considering
them internal. Deletion has been documented in corresponding
upgrade.txt files:

- upgrade_mimetypes()
- upgrade_fix_missing_root_folders_draft()
- upgrade_minmaxgrade() and upgrade_minmaxgradestepignored setting
- upgrade_course_tags()
- atto_equation_update_librarygroup4_setting()
- mod_lti_upgrade_custom_separator()

These have been kept because continue being used by restore:

- upgrade_group_members_only()
- upgrade_extra_credit_weightoverride()
- upgrade_calculated_grade_items()
2017-07-10 09:18:56 +01:00
David Mudrák
6c8e25fa51 MDL-59443 forms: Give elements a chance to validate submitted values
This patch introduces support for an optional method provided by the
form element classes to validate the submitted values implicitly -
without the need to have the rule explicitly added via the form
definition.

I am aware this should ideally be added to the HTML_QuickForm_element
parent class. But I wanted to avoid modification of that third party
library and keep the change in the moodleform layer only.
2017-07-06 09:29:04 +02:00
Juan Leyva
bef201c7e0 MDL-58712 core_user: Do not count the root directory 2017-06-22 16:09:58 +02:00
Juan Leyva
0f398b500d MDL-59160 core_group: Return if the user can access all groups in WS
The core_group_get_activity_allowed_groups WS should be returning not
only the groups but also if the user is allowed to access all the
activity groups.
2017-06-19 15:53:38 +01:00
Jun Pataleta
c9a3a21c31 Merge branch 'MDL-49398_final4' of https://github.com/sk-unikent/moodle 2017-06-06 12:43:14 +08:00
Tony Levi
e705e69e7f
MDL-49398 accesslib: Simplify role definition loading and cache
This change removes the complex and partial loading of role definition data for users.
It is replaced by keeping one system-wide definition for each role in MUC.

This is cheaper to regenerate as it avoids complex database queries (repeated LEFT JOIN to context).
Memory usage is kept low thanks to array CoW for each user access data.
2017-06-02 07:53:23 +01:00
David Mudrák
8cf36e9c81 MDL-53240 filetypes: Introduce admin_setting_filetypes class
This new type of admin settings makes use of the filetypes browser but
for the admin settings.
2017-06-01 09:48:45 +02:00
Iñaki Arenaza
67bebb69eb 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:27 +01:00
Dan Poltawski
69cdead3d1 MDL-58788 docs: Note new behat compatibility page 2017-05-03 10:35:48 +01:00
David Monllao
ac0553aa64 Merge branch 'MDL-54901' of git://github.com/stronk7/moodle 2017-04-19 11:30:03 +08:00
David Mudrák
1cb5c7b31f MDL-58631 auth: Clarify documentation of changes in loginpage_idp_list()
This should clarify the new 'iconurl' key returned by the auth plugin's
loginpage_idp_list() method.
2017-04-18 17:00:40 +02:00
Eloy Lafuente (stronk7)
55946a892a MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests
This includes:

- Changing PHPUnit's bootstrap to use https://www...
- Modify all existing expectations to the new wwwroot.
- Amend some tests now with different defaults because of is_https()
- Added a note to main upgrade.php about the change.
2017-04-18 03:40:17 +02:00
Jun Pataleta
627ea5b10e MDL-58400 auth: New helper methods for identity providers
* get_identity_providers(): Retrieves available auth identity providers
* prepare_identity_providers_for_output(): Prepares auth identity
    provider data for output (e.g. to templates, WS, etc)
* Use these helpers for the login renderer
2017-04-10 11:12:03 +08:00
Dan Poltawski
67aaf4eeda MDL-55611 upgrade.txt: remove duplicated note 2017-04-04 17:32:13 +01:00
Dan Poltawski
1e4e5c52d7 Merge branch 'MDL-55611-master' of git://github.com/danpoltawski/moodle 2017-04-04 17:07:41 +01:00
Mark Nelson
e1cd93ce20 MDL-58423 core_calendar: moved \core_calendar\event class
Part of MDL-55611 epic.
2017-04-04 11:01:49 +01:00
Damyon Wiese
f59d81f487 MDL-58220 block_login: Update icon rendering of idp list 2017-04-03 13:43:25 +08:00
Damyon Wiese
141ee541ca MDL-58219 repository: Change how controlled links work
Files are copied to the system user as soon as they are uploaded. Write access is then controlled when
serving links to the file.

Part of MDL-58220
2017-04-03 13:41:19 +08:00
Damyon Wiese
151b0f9409 MDL-58132 repositories: Controlled link file type
This introduces a new "controlled link" file type where the file is not
stored in Moodle - but Moodle will control the access permissions on the file.

Plugins can "freeze" a filearea which means Moodle will take ownership of all the remote
files of this type.

When accessing a file, if the "filebrowser" infomation indicates the current user can write to the file, they
will be granted temporary write access.

Part of MDL-58220
2017-04-03 13:40:13 +08:00
Ryan Wyllie
e03d5d4790 MDL-57445 core: allow context variables in pix helper
Allow the user of context variables in the id and component section of
the pix helper.

Part of MDL-55611 epic.
2017-04-03 11:35:37 +08:00
Mark Nelson
e057f279e4 MDL-57497 core_calendar: added new calendar event class
Moved calendar_event class to new location using replaceclasses.php

Part of MDL-55611 epic.
2017-04-03 11:33:55 +08:00
Mark Nelson
e9dfeec94e MDL-57434 core: deprecated xxx_print_overview() and related functions
Part of MDL-55611 epic.
2017-04-03 11:33:55 +08:00
Damyon Wiese
c8d0efc332 MDL-40759 icons: More details in upgrade.txt
More details in upgrade.txt for developers who were using pix_url.
2017-03-17 15:52:46 +08:00
Damyon Wiese
3e6adcd69c MDL-40759 icons: Rename activity_icon
image_icon is a better name because there are some valid uses for these other than for activity icons.

E.g. Old JS code that is not worth re-writing.
2017-03-17 15:52:18 +08:00
Damyon Wiese
c266d256e7 MDL-40759 icons: Deprecate $OUTPUT->pix_url() 2017-03-17 15:51:29 +08:00
Damyon Wiese
c2dde7eebc MDL-40759 icons: Split pix_icon from activity_icon
Activity icons always use the standard icon renderer.
2017-03-17 15:51:29 +08:00
Damyon Wiese
3be09119d9 MDL-40759 upgrade: Note about fontawesome callback 2017-03-17 15:51:29 +08:00
Dan Poltawski
732bd13171 Merge branch 'MDL-55528-master' of git://github.com/andrewnicols/moodle 2017-03-14 12:07:33 +00:00