Created
July 2, 2018 10:58
-
-
Save dmonllao/eded79d096d51c81278738907b0e0d95 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Not tested but it should be something like that. New file in $CFG->dirroot. | |
require_once(__DIR__ . '/config.php'); | |
// For students at-risk model. Feel free to change. | |
$MODELID = 1; | |
$COURSEID = 123; | |
$coursecontext = \context_course::instance($COURSEID); | |
$model = new \core_analytics\model($MODELID); | |
$predictions = $model->get_predictions($coursecontext); | |
foreach ($predictions as $prediction) { | |
var_dump($prediction->get_calculations()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment