mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +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
|
@ -53,11 +53,14 @@ class course_module_viewed extends \core\event\course_module_viewed {
|
|||
/**
|
||||
* Define whether a user can view the event or not. Make sure no one except admin can see details of an anonymous response.
|
||||
*
|
||||
* @deprecated since 2.7
|
||||
*
|
||||
* @param int|\stdClass $userorid ID of the user.
|
||||
* @return bool True if the user can view the event, false otherwise.
|
||||
*/
|
||||
public function can_view($userorid = null) {
|
||||
global $USER;
|
||||
debugging('can_view() method is deprecated, use anonymous flag instead if necessary.', DEBUG_DEVELOPER);
|
||||
|
||||
if (empty($userorid)) {
|
||||
$userorid = $USER;
|
||||
|
|
|
@ -84,11 +84,14 @@ class response_deleted extends \core\event\base {
|
|||
/**
|
||||
* Define whether a user can view the event or not. Make sure no one except admin can see details of an anonymous response.
|
||||
*
|
||||
* @deprecated since 2.7
|
||||
*
|
||||
* @param int|\stdClass $userorid ID of the user.
|
||||
* @return bool True if the user can view the event, false otherwise.
|
||||
*/
|
||||
public function can_view($userorid = null) {
|
||||
global $USER;
|
||||
debugging('can_view() method is deprecated, use anonymous flag instead if necessary.', DEBUG_DEVELOPER);
|
||||
|
||||
if (empty($userorid)) {
|
||||
$userorid = $USER;
|
||||
|
|
|
@ -106,11 +106,14 @@ class response_submitted extends \core\event\base {
|
|||
/**
|
||||
* Define whether a user can view the event or not. Make sure no one except admin can see details of an anonymous response.
|
||||
*
|
||||
* @deprecated since 2.7
|
||||
*
|
||||
* @param int|\stdClass $userorid ID of the user.
|
||||
* @return bool True if the user can view the event, false otherwise.
|
||||
*/
|
||||
public function can_view($userorid = null) {
|
||||
global $USER;
|
||||
debugging('can_view() method is deprecated, use anonymous flag instead if necessary.', DEBUG_DEVELOPER);
|
||||
|
||||
if (empty($userorid)) {
|
||||
$userorid = $USER;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue