Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-16122 Moodle 4.0 QA
  3. MDLQA-16605

CLONE - An admin can create, delete, import and export analytics models

XMLWordPrintable

      Prerequisites

      1. Install https://github.com/dmonllao/moodle-local_testanalytics
      2. Install the Python ML backend as specified in the documentation Analytics. (If you already have it installed you will need to update it to the latest version (pip install -I moodlemlbackend==0.37.0).)
      3. Enable analytics and make sure everything is working.
      4. Go to Site admin / Analytics / Analytics settings. Disable 'onlycli' option and ensure that 'Default predictions processor' is set to 'PHP machine learning backend'.

      Export

      1. Go to Site admin / Analytics / Analytics models.
      2. Run "Execute scheduled analysis" for "Inactive users" model.
      3. Return to the models list page and expand "Inactive users" model actions' menu.
      4. Confirm that there is a "Delete" option but no "Export configuration" option.
      5. Run "Execute scheduled analysis" for "Binary" model.
      6. Return to the models list page and expand "Binary" model actions' menu.
      7. Confirm that there is an "Export configuration" option. Click on it and download the ZIP file.
      8. Confirm that the ZIP contains a JSON file and a mlbackend directory with a model.ser file inside.
      9. Open the JSON file in it and confirm that it contains something like this (ignore the numbers under dependencies>xxx)

        {"target":"\\local_testanalytics\\analytics\\target\\binary_example","timesplitting":"\\core\\analytics\\time_splitting\\single_range","indicators":["\\local_testanalytics\\analytics\\indicator\\set_setting"],"dependencies":{"local_testanalytics":2017051501,"core":2019011800}}
        

      10. Return to the models list page and select "Edit" from "Binary" model actions' menu.
      11. Set "Predictions processor" to "Python machine learning backend" and save changes.
      12. Run "Execute scheduled analysis" for "Binary" model.
      13. Run "Export configuration" for "Binary" model.
      14. Confirm that the ZIP contains a JSON file and a mlbackend directory with a model.json file inside. Open it and confirm that it contains a serialised object (mostly float numbers).
      15. Return to the models list page and select "Edit" from "Binary" model actions' menu.
      16. Untick "Enabled", set "Analysis interval" to empty and save changes.
      17. Return to the models list page and expand "Binary" model actions' menu. Confirm that there is no "Export configuration" option.
      18. Run "Actions > Edit" for "Discrete" model, change the "Predictions processor" option from "Default..." to "PHP machine learning backend" and save changes.
      19. Run "Actions > Export configuration" for the following models: discrete, users without pic and linear.

      Delete

      1. Try deleting all your models by clicking on "Actions > Delete" and confirm the deletion.

      Import

      1. Go to Site admin / Analytics / Analytics models and press the "Import model" button
      2. Make sure the file area allows only .zip files.
      3. Import all five configuration files you previously exported (including the two Binary models you first exported).
      4. Confirm that you don't get any error, but instead see a nice and green "The model has been successfully imported." message.
        1. For each of them click on "Actions > Edit", confirm that "Enabled" is not ticked, that a "Analysis interval" is selected, that there is at least one indicator and that the predictions processor is different than "Default...".
      5. Open the model-config.json files inside one of the zip files you downloaded and change one of the versions under "dependencies".
      6. Go to Site admin / Analytics / Analytics models / Import model and upload the modified file.
      7. "Ignore version mismatches" should be disabled by default.
      8. You should see an error message stating something like this: "The version of the following components differ from the version installed in this site: local_testanalytics (20170515031). You can use "Ignore version mismatches" option to ignore these differences."
      9. Upload the same file and now tick "Ignore version mismatches".
      10. The model should now be successfully imported (green message for the win).

      Create

      1. Go to Site admin / Analytics / Analytics models / Create model".
      2. In the Target drop-down menu, confirm that "No teaching" is not an option.
      3. Select "Students at risk of dropping out" as a "Target", "Read actions amount" as "Indicators" and save changes.
      4. Return to the models list page and select "Actions > Edit" for "Students at risk of dropping out" model.
      5. Confirm that there is no option to modify the "Target" field.

            ilyatregubov Ilya Tregubov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.