Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
core_analytics\prediction Class Reference

Representation of a prediction. More...

Public Member Functions

 __construct ($prediction, $sampledata)
 Constructor. More...
 
 action_executed ($actionname, core_analytics\local\target\base $target)
 Stores the executed action. More...
 
 get_calculations ()
 Gets the prediction calculations. More...
 
 get_prediction_data ()
 Get prediction object data. More...
 
 get_sample_data ()
 Get prediction sample data. More...
 

Public Attributes

const ACTION_FIXED = 'fixed'
 Prediction already fixed (one of the default prediction actions)
 
const ACTION_INCORRECTLY_FLAGGED = 'incorrectlyflagged'
 Prediction incorrectly flagged.
 
const ACTION_NOT_APPLICABLE = 'notapplicable'
 Prediction not applicable.
 
const ACTION_NOT_USEFUL = 'notuseful'
 Prediction not useful (one of the default prediction actions)
 
const ACTION_PREDICTION_DETAILS = 'predictiondetails'
 Prediction details (one of the default prediction actions)
 
const ACTION_USEFUL = 'useful'
 Prediction useful (one of the default prediction actions)
 

Detailed Description

Representation of a prediction.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_analytics\prediction::__construct (   $prediction,
  $sampledata 
)

Constructor.

Parameters
stdClass | int$prediction
array$sampledata
Return values
void

Member Function Documentation

◆ action_executed()

core_analytics\prediction::action_executed (   $actionname,
core_analytics\local\target\base  $target 
)

Stores the executed action.

Prediction instances should be retrieved using core_analytics\manager::get_prediction, It is the caller responsability to check that the user can see the prediction.

Parameters
string$actionname
core_analytics\local\target\base$target

◆ get_calculations()

core_analytics\prediction::get_calculations ( )

Gets the prediction calculations.

Return values
array

◆ get_prediction_data()

core_analytics\prediction::get_prediction_data ( )

Get prediction object data.

Return values
stdClass

◆ get_sample_data()

core_analytics\prediction::get_sample_data ( )

Get prediction sample data.

Return values
array

The documentation for this class was generated from the following file: