MDL-64739 tool_analytics: Remove filter option from evaluate CLI script
It can be considered that we replaced it with the new contexts field.
This commit is contained in:
@@ -34,7 +34,6 @@ Options:
|
||||
--list List models
|
||||
--non-interactive Not interactive questions
|
||||
--analysisinterval Restrict the evaluation to 1 single analysis interval (Optional)
|
||||
--filter Analyser dependant. e.g. A courseid would evaluate the model using a single course (Optional)
|
||||
--mode 'configuration' or 'trainedmodel'. You can only use mode=trainedmodel when the trained" .
|
||||
" model was imported" . "
|
||||
--reuse-prev-analysed Reuse recently analysed courses instead of analysing the whole site. Set it to false while" .
|
||||
@@ -42,7 +41,7 @@ Options:
|
||||
-h, --help Print out this help
|
||||
|
||||
Example:
|
||||
\$ php admin/tool/analytics/cli/evaluate_model.php --modelid=1 --analysisinterval='\\core\\analytics\\time_splitting\\quarters' --filter=123,321
|
||||
\$ php admin/tool/analytics/cli/evaluate_model.php --modelid=1 --analysisinterval='\\core\\analytics\\time_splitting\\quarters'
|
||||
";
|
||||
|
||||
// Now get cli options.
|
||||
@@ -55,7 +54,6 @@ list($options, $unrecognized) = cli_get_params(
|
||||
'mode' => 'configuration',
|
||||
'reuse-prev-analysed' => true,
|
||||
'non-interactive' => false,
|
||||
'filter' => false
|
||||
),
|
||||
array(
|
||||
'h' => 'help',
|
||||
@@ -83,11 +81,6 @@ if ($options['modelid'] === false) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// Reformat them as an array.
|
||||
if ($options['filter'] !== false) {
|
||||
$options['filter'] = explode(',', $options['filter']);
|
||||
}
|
||||
|
||||
if ($options['mode'] !== 'configuration' && $options['mode'] !== 'trainedmodel') {
|
||||
cli_error('Error: The provided mode is not supported');
|
||||
}
|
||||
@@ -110,7 +103,6 @@ if ($options['reuse-prev-analysed']) {
|
||||
$renderer = $PAGE->get_renderer('tool_analytics');
|
||||
|
||||
$analyseroptions = array(
|
||||
'filter' => $options['filter'],
|
||||
'timesplitting' => $options['analysisinterval'],
|
||||
'reuseprevanalysed' => $options['reuse-prev-analysed'],
|
||||
'mode' => $options['mode'],
|
||||
|
||||
Reference in New Issue
Block a user