Commit 120a795b authored by Ankit Agarwal's avatar Ankit Agarwal
Browse files

MDL-59574 analytics: Add model listing to enable_model cli script

parent 556cb98d
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment