mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-57791 analytics: Changes after review
- Split model::predict in parts - JS promises updated according to eslint-plugin-promise - New API methods replacing direct DB queries - Reduce insights nav link display cost - Increase time limit as well as memory for big processes - Move prediction action event to core - Dataset write locking and others - Refine last time range end time - Removed dodgy splitting method id to int - Replace admin_setting_predictor output_html overwrite for write_setting overwrite - New APIs for access control - Discard invalid samples also during prediction
This commit is contained in:
parent
584ffa4ffc
commit
1611308b58
40 changed files with 513 additions and 289 deletions
|
@ -443,9 +443,6 @@ class course implements \core_analytics\analysable {
|
|||
return false;
|
||||
}
|
||||
|
||||
// TODO Use course_modules_completion's timemodified + COMPLETION_COMPLETE* to discard
|
||||
// activities that have already been completed.
|
||||
|
||||
// We skip activities that were not yet visible or their 'until' was not in this $starttime - $endtime range.
|
||||
if ($activity->availability) {
|
||||
$info = new \core_availability\info_module($activity);
|
||||
|
@ -485,7 +482,6 @@ class course implements \core_analytics\analysable {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO Think about activities in sectionnum 0.
|
||||
if ($activity->sectionnum == 0) {
|
||||
return false;
|
||||
}
|
||||
|
@ -533,8 +529,6 @@ class course implements \core_analytics\analysable {
|
|||
$dateconditions = $info->get_availability_tree()->get_all_children('\availability_date\condition');
|
||||
foreach ($dateconditions as $condition) {
|
||||
// Availability API does not allow us to check from / to dates nicely, we need to be naughty.
|
||||
// TODO Would be nice to expand \availability_date\condition API for this calling a save that
|
||||
// does not save is weird.
|
||||
$conditiondata = $condition->save();
|
||||
|
||||
if ($conditiondata->d === \availability_date\condition::DIRECTION_FROM &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue