diff --git a/admin/tool/analytics/cli/enable_model.php b/admin/tool/analytics/cli/enable_model.php index bc1219f5371..e31dfec2b43 100644 --- a/admin/tool/analytics/cli/enable_model.php +++ b/admin/tool/analytics/cli/enable_model.php @@ -31,6 +31,7 @@ $help = "Enables the provided model. Options: --modelid Model id +--list List models --timesplitting Time splitting method full class name -h, --help Print out this help @@ -42,6 +43,7 @@ Example: list($options, $unrecognized) = cli_get_params( array( 'help' => false, + 'list' => false, 'modelid' => false, 'timesplitting' => false ), @@ -55,7 +57,12 @@ if ($options['help']) { exit(0); } -if ($options['modelid'] === false || $options['timesplitting'] === false) { +if ($options['list'] || $options['modelid'] === false) { + \tool_analytics\clihelper::list_models(); + exit(0); +} + +if ($options['timesplitting'] === false) { echo $help; exit(0); }