Merge branch 'MDL-65703-master' of git://github.com/lameze/moodle

This commit is contained in:
Andrew Nicols 2019-06-12 12:33:34 +08:00
commit 92198c5b9e
2 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,6 @@ class footer_options_exporter extends exporter {
$params['course'] = $this->calendar->course->id;
} else if (null !== $this->calendar->categoryid && $this->calendar->categoryid > 0) {
$params['category'] = $this->calendar->categoryid;
} else {
$params['course'] = SITEID;
}
return $params;

View File

@ -129,6 +129,10 @@ $params = [];
$usedefaultfilters = true;
if (!empty($courseid) && $courseid == SITEID && !empty($types['site'])) {
$searches[] = "(eventtype = 'site')";
$usedefaultfilters = false;
}
if (!empty($types['user'])) {
$searches[] = "(eventtype = 'user' AND userid = :userid)";
$params['userid'] = $USER->id;
$usedefaultfilters = false;