We are interested in hearing your feedback and suggestions for improvement. Feel free to post your thoughts in https://moodle.org/course/view.php?id=17233
- This test requires a system with Python installed and the option to run phpunit tests.
- Create a user with manager system role
- Uninstall moodlemlbackend python package if you have it installed
- Log in as an admin
- Go to 'Site administration > Server > System paths' and ensure 'pathtopython' is not set
- Go to 'Analytics settings' in the Site administration and enable 'Analytics processes execution via command line only'.
- Log in as a manager and go to 'Analytics models' in the Site administration.
- Verify that a message is displayed stating that Models evaluations via the web interface is disabled.
- Verify that 'Execute scheduled analysis' and 'Evaluate' are not available for any model in the 'Actions' menu.
- Log in as admin again and go to 'Analytics settings' and disable 'Analytics processes execution via command line only'.
- Set 'Default analysis intervals for model's evaluation' to 'Last tenth' and 'All previous tenths'.
- Log in as a manager again and go to 'Analytics models'.
- Verify that a message is displayed stating that evaluating models and generating predictions may involve heavy processing and it is recommended to run these actions via command line interface.
- Verify that 'Execute scheduled analysis' is available in "Course at risk of not starting" model action menu and 'Evaluate' is available in the 'Students at risk of dropping out' Actions menu.
- For 'Students at risk of dropping out' select 'Edit' in the 'Actions' column.
- Verify that the available options for 'Analysis interval' are 'Last tenth' and 'All previous tenths'.
- Log in as admin again and go to 'Analytics settings' and reset 'Default analysis intervals for model's evaluation' to its default value: 'Last quarter', 'All previous quarters' and 'From start to end' and save.
- Set the predictions processor to 'Python machine learning backend' and save again.
- Verify that an error message is displayed saying that Python binary path is not defined.
- Go to 'System paths' and set pathtopython to your path. (You can just set it to 'python' if the binary directory is in your $PATH.)
- Return to 'Analytics settings' and verify that 'PHP machine learning backend' is still be the selected option. (The system shouldn't allow you to change it until all Python's ml backend requirements are satisfied).
- Change it again to 'Python machine learning backend'.
- Verify that a message saying that moodlemlbackend python package is not installed is displayed.
- Install moodlemlbackend python package (pip install moodlemlbackend; for more info, see the section 'Predictions processor' in the Analytics models documentation).
- Return to 'Analytics settings', save changes again and verify that the changes are saved correctly.
- Run all phpunit tests for analytics:
Note that you will need to set $CFG->pathtopython in your config.php.
- Verify all tests for analytics pass and none are skipped.