Skip to content

Commit

Permalink
MDL-59574 analytics: Add model listing to enable_model cli script
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed Nov 28, 2017
1 parent 556cb98 commit 120a795
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion admin/tool/analytics/cli/enable_model.php
Expand Up @@ -31,6 +31,7 @@
Options:
--modelid Model id
--list List models
--timesplitting Time splitting method full class name
-h, --help Print out this help
Expand All @@ -42,6 +43,7 @@
list($options, $unrecognized) = cli_get_params(
array(
'help' => false,
'list' => false,
'modelid' => false,
'timesplitting' => false
),
Expand All @@ -55,7 +57,12 @@
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);
}
Expand Down

0 comments on commit 120a795

Please sign in to comment.