From 86a092b61df736aac50d69cc04443d3de394e4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Monlla=C3=B3?= Date: Thu, 15 Aug 2019 14:11:59 +0800 Subject: [PATCH] MDL-64739 tool_analytics: Remove filter option from evaluate CLI script It can be considered that we replaced it with the new contexts field. --- admin/tool/analytics/cli/evaluate_model.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/admin/tool/analytics/cli/evaluate_model.php b/admin/tool/analytics/cli/evaluate_model.php index 3094ffaaec2..7d07b6ffe05 100644 --- a/admin/tool/analytics/cli/evaluate_model.php +++ b/admin/tool/analytics/cli/evaluate_model.php @@ -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'],