Commit graph

2394 commits

Author SHA1 Message Date
Mihail Geshoski
d609207c3e MDL-61724 resource: Unable to view or download file resource 2018-03-26 11:14:46 +08:00
Mark Nelson
883ce42127 MDL-36941 core: convert existing api to use new table structure
Also deprecated the following functions -

1. message_move_userfrom_unread2read - It is not necessary
   for us to mark a message as read on user deletion.
2. message_get_blocked_users - Horrible logic used to
   determine if a user is blocked via reference on some
   randomly chosen 'isblocked' variable.
3. message_get_contacts - The same as above. This can be
   done in a much nicer way.
4. message_mark_message_read - We want two functions to do
   this to avoid confusing messages and notifications.
5. message_can_delete_message - This assumed the variable
   $message contained the 'useridto' property, which
   was present in the old table structure. We do not want
   future usages where a query is done on the new table
   and is simply passed as this won't contain this property.
6. message_delete_message - Same as above.
2018-03-23 12:30:27 +08:00
Marina Glancy
1727c939ba MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:32:55 +08:00
David Mudrák
0bdc578567 MDL-61477 admin: Allow plugins to act as alternate policy handlers
The patch introduces a new site setting 'sitepolicyhandler' that can be
either empty or contain a plugin component name. If it is empty, the
site policy feature keeps working as before and the core keeps the
control over it.

If a plugin is specified, it is expected to implement the callback
'site_policy_handler' in its lib.php file. The callback should return a
URL to a script where the user can accept the site policies. The plugin
itself is responsible for setting the 'policyagreed' flag in the users
table. The callback may return an empty value, in which case the user
can continue using the site without being redirected.

The patch adds support for a new pre-config flag NO_SITEPOLICY_CHECK.
This constant should be defined and set to true if we should not check
the user's policyagreed status during the require_login().

This is for pages where the user actually accepts the site policies and
helps to avoid the redirect loop.
2018-03-15 09:31:41 +08:00
Andrew Nicols
d7ff2fc28b Merge branch 'MDL-60398-master' of git://github.com/mihailges/moodle 2018-03-14 10:33:03 +08:00
Andrew Nicols
431a3bb674 MDL-61307 core: Add component_class_callback functionality 2018-03-09 10:01:18 +08:00
Mihail Geshoski
757a889b24 MDL-60398 resource: Unable to download folder resource 2018-02-26 16:49:21 +08:00
Andrew Nicols
26d26413a0 MDL-61480 core: Check plugin installed before returning 2018-02-26 12:11:25 +08:00
Stephen Bourget
cfdd8d12dd MDL-61203 badges: Allow profile picture as badge criteria 2018-01-16 10:18:23 -05:00
Jun Pataleta
1396cb6346 Merge branch 'wip-MDL-60926-master' of git://github.com/marinaglancy/moodle 2017-12-06 19:53:35 +13:00
Marina Glancy
65a77c7381 MDL-60926 auth: do not map very long profile fields 2017-12-04 09:31:42 +08:00
Shamim Rezaie
8c42eef35c MDL-47114 core: Improved function description 2017-12-02 07:44:35 +08:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00
John Okely
b58764ff99 MDL-42834 admin: Remove loginhttps 2017-10-23 12:25:35 +08:00
David Monllao
3c0805b7c0 Merge branch 'master-MDL-60116' of https://github.com/fwsl/moodle 2017-10-19 15:54:23 +02:00
David Monllao
b1a9a6a19a Merge branch 'wip-MDL-60281-master' of git://github.com/marinaglancy/moodle 2017-10-17 09:45:44 +02:00
Marina Glancy
33683bc80c MDL-60281 general: function each() is deprecated in PHP7.2 2017-10-16 09:37:20 +08:00
Grzegorz Ziółek
57bdf3b02d MDL-60116 lang: Add username in emailpasswordchangeinfo 2017-10-13 14:19:09 +02:00
Adrian Greeve
56e62bbba1 MDL-60194 lib: Internal changes by Moodle to phpmailer. 2017-10-09 09:30:00 +08:00
Eloy Lafuente (stronk7)
4536f3084d Merge branch 'MDL-59273-master' of https://github.com/lucisgit/moodle 2017-10-03 22:38:13 +02:00
Mark Nelson
7851842f4b MDL-59204 core: add getters to lang_string for identifier and component 2017-08-18 18:02:39 +08:00
Marina Glancy
7d792aeee4 MDL-53492 registration: use https://moodle.net as hub url 2017-07-31 14:31:11 +08:00
Ruslan Kabalin
e5ece45e84 MDL-59273 core: Remove mailto links support in clean_param. 2017-07-24 16:51:55 +01:00
David Monllao
2c3a34f0c6 MDL-59411 course: Fix unavailable typo 2017-07-17 16:40:00 +02:00
David Monllao
bf442807f5 Merge branch 'wip-MDL-59411-master' of git://github.com/marinaglancy/moodle 2017-07-17 15:48:12 +02:00
Adrian Greeve
a85e191c4d 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:40:02 +08:00
Marina Glancy
592f3ae22c MDL-59411 course: display access restriction in access error message 2017-06-29 13:48:27 +08:00
Marina Glancy
7f53e8aa22 MDL-58267 completion: allow to set default activity completion
Part of MDL-58138 epic
2017-04-19 08:54:35 +08:00
Dan Poltawski
4ba4ecfa96 MDL-58486 userprefs: clarifying comment 2017-04-17 12:17:18 +01:00
Tim Hunt
2524990d09 MDL-58486 user_prefs: always update $USER cache when applicable
set_user_preference and unset_user_preference let you pass the user to
set preferences for as an id. Previously, if you passed $USER->id there,
those methods did not update the Cache in $USER, which was surprising,
and not easy to debug.

Now, we always update the preference cache in $USER if the preference is
being changed for the current user.
2017-04-04 16:20:26 +01:00
Jake Dallimore
62b482938b MDL-58121 email: ensure support user is defined in email_to_user 2017-03-17 09:08:45 +08:00
Marina Glancy
6e65554ea1 MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:04:47 +00:00
Andrew Nicols
50dcc8af9c MDL-53978 core: Do not run callbacks if upgrade is running 2017-03-02 10:24:05 +08:00
Eloy Lafuente (stronk7)
b239dfd9aa Merge branch 'MDL-53978-master-fix' of https://github.com/andrewnicols/moodle 2017-03-01 02:46:06 +01:00
Andrew Nicols
5d86494808 MDL-53978 core: Improve cache usage when no callbacks are defined 2017-03-01 09:18:13 +08:00
Eloy Lafuente (stronk7)
dd6b41a5c7 Merge branch 'MDL-58071-master' of git://github.com/jleyva/moodle 2017-02-28 22:57:09 +01:00
Eloy Lafuente (stronk7)
211843420d Merge branch 'MDL-55980-master' of https://github.com/sammarshallou/moodle 2017-02-28 22:11:16 +01:00
Jake Dallimore
9e44cec27f MDL-58038 email: make sure all allowedemaildomain entries are respected
Fixes a bug with exploding the config var, in which trailing carriage
returns were causing string matches to fail.
2017-02-28 12:17:52 +08:00
Juan Leyva
eeae783ca3 MDL-58071 user: Return usernotfullysetup exception in WS
If there is an empty required custom user profile field, Web Services
should return the usernotfullysetup exception instead ignoring it.
The mobile app already handles this exception for core fields
redirecting the user to web in order to fill the missing field.
2017-02-24 20:11:27 +01:00
sam marshall
38fa1ca558 MDL-55980 Scheduled tasks: Run individual scheduled tasks from web 2017-02-24 10:42:28 +00:00
Eloy Lafuente (stronk7)
860b099f46 Merge branch 'wip-mdl-56616' of https://github.com/rajeshtaneja/moodle 2017-02-21 00:56:26 +01:00
Dan Poltawski
898f227f40 Merge branch 'MDL-46375-master' of git://github.com/andrewnicols/moodle 2017-02-14 10:34:39 +00:00
Marina Glancy
8341055eb4 MDL-4782 course: Allow activities in the "stealth" mode
Add field 'visibleoncoursepage' to the course_modules table
Add site-wide setting for turning on stealth mode availability
Add callback for "stealth" mode support in the course formats
Change display of modules/sections availability on the course page
2017-02-14 16:38:05 +08:00
Andrew Nicols
16a34ae189 MDL-46375 core_files: Split parts of file_storage into new file system
This change moves all operations which deal with the fetching/updating, or
setting of files from the file_storage class into a new file_system class.

A new file_system can be specified in the config.php and used to replace
all relevant methods in order to move the file system component to an
alternative solution.
2017-02-14 08:42:28 +08:00
Rajesh Taneja
8819e01dde
MDL-56616 theme_boost: Fix style for performance info 2017-02-13 14:35:10 +08:00
Stephen Bourget
9820c67cf9 MDL-42266 Lib: Allow additional max upload file sizes 2017-01-16 10:54:33 -05:00
Dan Poltawski
b6f5e57e45 Merge branch 'MDL-57531-master-phpmailer' of git://github.com/mudrd8mz/moodle 2017-01-04 13:29:10 +00:00
David Mudrák
61367eb639 MDL-57531 mail: Validate the sender's email address
The patch adds validation for the noreplyaddress setting variable, for
the explicit $replyto parameter and for the sender's email. In case of
misconfigured noreplyaddress setting, it falls back to the default
noreply address value. In case of invalid email in the user's record,
the email is not sent.

The patch also adds unit test for the value returned by the function
generate_email_processing_address() so that it can be considered as a
valid email, too.

This is supposed to significantly minimise the risk of exploiting the
vulnerability in PHPMailer's Sender field.
2017-01-04 12:35:19 +01:00
Dan Poltawski
589449b81e Merge branch 'MDL-57080-m' of https://github.com/micaherne/moodle 2017-01-02 12:15:01 +00:00
Michael Aherne
1afea82da0 MDL-57080 completion: Update completion expected date on reset 2016-12-22 11:37:51 +00:00