MDL-64783 analytics: Activities due insight forwards to calendar
The patch includes changes applied after the peer review.
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
93663fa1a8
commit
982fef46f4
@@ -38,7 +38,7 @@ class users extends \core_analytics\local\analyser\base {
|
||||
/**
|
||||
* The site users are the analysable elements returned by this analyser.
|
||||
*
|
||||
* @param ?string $action 'prediction', 'training' or null if no specific action needed.
|
||||
* @param string|null $action 'prediction', 'training' or null if no specific action needed.
|
||||
* @return \Iterator
|
||||
*/
|
||||
public function get_analysables_iterator(?string $action = null) {
|
||||
@@ -46,7 +46,6 @@ class users extends \core_analytics\local\analyser\base {
|
||||
|
||||
$siteadmins = explode(',', $CFG->siteadmins);
|
||||
|
||||
|
||||
list($sql, $params) = $this->get_iterator_sql('user', CONTEXT_USER, $action, 'u');
|
||||
|
||||
$sql .= " AND u.deleted = :deleted AND u.confirmed = :confirmed AND u.suspended = :suspended";
|
||||
@@ -57,6 +56,7 @@ class users extends \core_analytics\local\analyser\base {
|
||||
$recordset = $DB->get_recordset_sql($sql, $params);
|
||||
if (!$recordset->valid()) {
|
||||
$this->add_log(get_string('nousersfound'));
|
||||
return new \ArrayIterator([]);
|
||||
}
|
||||
|
||||
return new \core\dml\recordset_walk($recordset, function($record) use ($siteadmins) {
|
||||
|
||||
Reference in New Issue
Block a user