Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Upcoming activities due target.

Copyright: 2019 David Monllao {@link http://www.davidmonllao.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 274 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: upcoming_activities_due  - X-Ref

Upcoming activities due target.

based_on_assumptions()   X-Ref
Machine learning backends are not required to predict.

return: bool

always_update_analysis_time()   X-Ref
Only update last analysis time when analysables are processed.

return: bool

can_use_timesplitting(\core_analytics\local\time_splitting\base $timesplitting)   X-Ref
Only upcoming stuff.

param: \core_analytics\local\time_splitting\base $timesplitting
return: bool

get_name()   X-Ref
Returns the name.

If there is a corresponding '_help' string this will be shown as well.

return: \lang_string

get_insight_subject(int $modelid, \context $context)   X-Ref
Overwritten to show a simpler language string.

param: int $modelid
param: \context $context
return: string

classes_description()   X-Ref
classes_description

return: string[]

ignored_predicted_classes()   X-Ref
Returns the predicted classes that will be ignored.

return: array

get_analyser_class()   X-Ref
get_analyser_class

return: string

is_valid_analysable(\core_analytics\analysable $analysable, $fortraining = true)   X-Ref
All users are ok.

param: \core_analytics\analysable $analysable
param: mixed $fortraining
return: true|string

is_valid_sample($sampleid, \core_analytics\analysable $analysable, $fortraining = true)   X-Ref
Samples are users and all of them are ok.

param: int $sampleid
param: \core_analytics\analysable $analysable
param: bool $fortraining
return: bool

calculate_sample($sampleid, \core_analytics\analysable $analysable, $starttime = false, $endtime = false)   X-Ref
Calculation based on activities due indicator.

param: int $sampleid
param: \core_analytics\analysable $analysable
param: int $starttime
param: int $endtime
return: float

link_insights_report()   X-Ref
No need to link to the insights report in this case.

return: bool

get_insight_body_for_prediction(\context $context, \stdClass $user, \core_analytics\prediction $prediction,array &$actions)   X-Ref
Returns the body message for an insight of a single prediction.

This default method is executed when the analysable used by the model generates one insight
for each analysable (one_sample_per_analysable === true)

param: \context                             $context
param: \stdClass                            $user
param: \core_analytics\prediction           $prediction
param: \core_analytics\action[]             $actions        Passed by reference to remove duplicate links to actions.
return: array                                                Plain text msg, HTML message and the main URL for this

prediction_actions(\core_analytics\prediction $prediction, $includedetailsaction = false,$isinsightuser = false)   X-Ref
Adds a view upcoming events action.

param: \core_analytics\prediction $prediction
param: mixed $includedetailsaction
param: bool $isinsightuser
return: \core_analytics\prediction_action[]