Go to CLI and execute php admin/tool/analytics/cli/evaluate_model.php --list
Remember the model id for "Students at risk of dropping out"
Execute php admin/tool/analytics/cli/evaluate_model.php --modelid=THEMODELID --filter=123123123
You SHOULD NOT see any coding_exception (this was the result before this patch) and you SHOULD see a !! No courses to analyse !! message
The --filter option allows users to filter by courseid but it is broken since 3.7.0, it will be replaced by a context filtering in MDL-64739, which is scheduled for 3.8. We can wait for MDL-64739 or fix it before it if people votes for this issue to be resolved.