mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Merge branch 'w13_MDL-44107_m27_canview' of git://github.com/skodak/moodle
This commit is contained in:
commit
daf7b64ef7
5 changed files with 24 additions and 1 deletions
|
@ -304,12 +304,18 @@ abstract class base implements \IteratorAggregate {
|
|||
}
|
||||
|
||||
/**
|
||||
* Define whether a user can view the event or not.
|
||||
* This method was originally intended for granular
|
||||
* access control on the event level, unfortunately
|
||||
* the proper implementation would be too expensive
|
||||
* in many cases.
|
||||
*
|
||||
* @deprecated since 2.7
|
||||
*
|
||||
* @param int|\stdClass $user_or_id ID of the user.
|
||||
* @return bool True if the user can view the event, false otherwise.
|
||||
*/
|
||||
public function can_view($user_or_id = null) {
|
||||
debugging('can_view() method is deprecated, use anonymous flag instead if necessary.', DEBUG_DEVELOPER);
|
||||
return is_siteadmin($user_or_id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue