If there is a required custom field that the user can fill by editing
their profile, and that field is missing, the user should be considered
as not fully set up. Instead, we want to redirect them to edit their
profile first.
There are some exceptions when we want to fall back to the previous
behaviour and check just the name and email fields. These exceptional
cases include checking remote user data in incoming MNet request (no
user id, no custom fields supported) and calls to require_login() with
redirecting disabled (typically ajax filepicker requests on profile
editing page itself).
Additional plugins that call the function user_not_fully_set_up()
themselves, should perform the strict check in most/typical cases. So
the strict mode is enabled by default even if it changes the behaviour
slightly. In improbable case of additional plugins relying on the
previous behaviour of the function, they can use the $strict parameter
and keep performing the lax check. However, I am sure the correct fix in
that case will likely be to stop abusing this function.
Note that custom fields are not currently transferred during the MNet
roaming. So having custom fields configured as required on MNet service
provider site (where users can't edit their profiles) is expected to
display an error (as the site is considered as misconfigured).
This patch adds two new functions to the event base to allow deprecation of
the individual events, without entirely removing them from the UI.
This is different to our normal deprecation procedure because all events
must support display of historical data. It must also be possible to view
the event information in the event monitor.
There were two problems here.
* The $msgdata->fullmessage was always formatted as HTML even if the
$msgdata->fullmessageformat was set to the original template's format.
* The plain text part of the emailed message contained HTML code.
The patch makes sure that the original template is always formatted into
HTML and then converted to plain text before setting the text/plain
multipart of the sent email.
This commit covers all events outside of /mod/. It adds mapping info for restoring
events, or the default implementation which returns false if mapping is not required.
Additional capability checks are now in place to stop unauthorised
users from accessing the event monitor subscription page.
Thanks to Eloy Lafuente for creating a gist with ideas of tackling
No site level capability to the rule subscription.
When the rule plugin is not a module you can subscribe
to it without having to select to which module instance
you want to subscribe, so there is no need to display
a drop down menu.
An event that has already contributed to a notification should not contribute to another notification for the same subscription.
This needs to be done so we do not overwhelm the user.