Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Output helper to export actions for rendering.

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

Defines 1 class

actions_exporter:: (2 methods):
  add_prediction_actions()
  add_bulk_actions()


Class: actions_exporter  - X-Ref

Output helper to export actions for rendering.

add_prediction_actions(\core_analytics\local\target\base $target, \renderer_base $output,\core_analytics\prediction $prediction, bool $includedetailsaction = false)   X-Ref
Add the prediction actions renderable.

param: \core_analytics\local\target\base $target
param: \renderer_base                    $output
param: \core_analytics\prediction        $prediction
param: bool                              $includedetailsaction
return: \stdClass|false

add_bulk_actions(\core_analytics\local\target\base $target, \renderer_base $output, array $predictions,\context $context)   X-Ref
Add bulk actions renderables.

Note that if you are planning to render the bulk actions, the provided predictions must share the same predicted value.

param: \core_analytics\local\target\base $target
param: \renderer_base                    $output
param: \core_analytics\prediction[]      $predictions   Bulk actions for this set of predictions.
param: \context                          $context       The context of these predictions.
return: \stdClass[]|false