mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'patch_view_anon_event_MDL-66213' of git://github.com/Dave-B/moodle
This commit is contained in:
commit
e3f29b01c0
5 changed files with 26 additions and 3 deletions
|
@ -423,6 +423,7 @@ $string['site:restore'] = 'Restore courses';
|
|||
$string['site:sendmessage'] = 'Send messages to any user';
|
||||
$string['site:trustcontent'] = 'Trust submitted content';
|
||||
$string['site:uploadusers'] = 'Upload new users from file';
|
||||
$string['site:viewanonymousevents'] = 'View anonymous events in reports';
|
||||
$string['site:viewfullnames'] = 'Always see full names of users';
|
||||
$string['site:viewparticipants'] = 'View participants';
|
||||
$string['site:viewreports'] = 'View reports';
|
||||
|
|
|
@ -391,6 +391,17 @@ $capabilities = array(
|
|||
)
|
||||
),
|
||||
|
||||
'moodle/site:viewanonymousevents' => array(
|
||||
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_MODULE,
|
||||
'archetypes' => array(
|
||||
'teacher' => CAP_PROHIBIT,
|
||||
'editingteacher' => CAP_PROHIBIT,
|
||||
'manager' => CAP_ALLOW
|
||||
)
|
||||
),
|
||||
|
||||
'moodle/site:viewfullnames' => array(
|
||||
|
||||
'captype' => 'read',
|
||||
|
|
|
@ -504,8 +504,15 @@ class report_log_table_log extends table_sql {
|
|||
|
||||
if (!($this->filterparams->logreader instanceof logstore_legacy\log\store)) {
|
||||
// Filter out anonymous actions, this is N/A for legacy log because it never stores them.
|
||||
if ($this->filterparams->modid) {
|
||||
$context = context_module::instance($this->filterparams->modid);
|
||||
} else {
|
||||
$context = context_course::instance($this->filterparams->courseid);
|
||||
}
|
||||
if (!has_capability('moodle/site:viewanonymousevents', $context)) {
|
||||
$joins[] = "anonymous = 0";
|
||||
}
|
||||
}
|
||||
|
||||
$selector = implode(' AND ', $joins);
|
||||
|
||||
|
|
|
@ -180,7 +180,11 @@ class report_loglive_renderable implements renderable {
|
|||
$filter->logreader = $readers[$this->selectedlogreader];
|
||||
$filter->date = $this->date;
|
||||
$filter->orderby = $this->order;
|
||||
|
||||
$context = context_course::instance($filter->courseid);
|
||||
if (!has_capability('moodle/site:viewanonymousevents', $context)) {
|
||||
$filter->anonymous = 0;
|
||||
}
|
||||
|
||||
return $filter;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2020010900.00; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2020010900.01; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
$release = '3.9dev (Build: 20200109)'; // Human-friendly version name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue