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.

        1. Screenshot from 2022-04-05 13-30-32.png
          359 kB
          Ilya Tregubov
        2. Screenshot from 2022-04-05 13-40-17.png
          288 kB
          Ilya Tregubov
        3. Screenshot from 2022-04-05 13-40-56.png
          48 kB
          Ilya Tregubov
        4. Screenshot from 2022-04-05 13-41-30.png
          62 kB
          Ilya Tregubov
        5. Screenshot from 2022-04-05 13-41-59.png
          174 kB
          Ilya Tregubov
        6. Screenshot from 2022-04-05 13-42-01.png
          171 kB
          Ilya Tregubov
        7. Screenshot from 2022-04-05 13-42-40.png
          196 kB
          Ilya Tregubov
        8. Screenshot from 2022-04-05 13-48-54.png
          293 kB
          Ilya Tregubov
        9. Screenshot from 2022-04-05 13-49-31.png
          175 kB
          Ilya Tregubov
        10. Screenshot from 2022-04-05 13-49-33.png
          175 kB
          Ilya Tregubov
        11. Screenshot from 2022-04-05 13-54-10.png
          293 kB
          Ilya Tregubov
        12. Screenshot from 2022-04-05 13-54-22.png
          34 kB
          Ilya Tregubov
        13. Screenshot from 2022-04-05 13-54-54.png
          296 kB
          Ilya Tregubov
        14. Screenshot from 2022-04-05 13-56-46.png
          315 kB
          Ilya Tregubov
        15. Screenshot from 2022-04-05 13-57-15.png
          307 kB
          Ilya Tregubov
        16. Screenshot from 2022-04-05 13-58-48.png
          296 kB
          Ilya Tregubov
        17. Screenshot from 2022-04-05 14-01-51.png
          278 kB
          Ilya Tregubov
        18. Screenshot from 2022-04-05 14-02-09.png
          307 kB
          Ilya Tregubov
        19. Screenshot from 2022-04-05 14-03-46.png
          283 kB
          Ilya Tregubov

            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.