Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-14813 Moodle 3.10 QA
  3. MDLQA-15372

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 "Get predictions" 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 "Get predictions" 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 "Get predictions" 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 "Time-splitting method" 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 time splitting method 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. MDLQA-15372_Create_2.png
          MDLQA-15372_Create_2.png
          109 kB
        2. MDLQA-15372_Create_3.png
          MDLQA-15372_Create_3.png
          77 kB
        3. MDLQA-15372_Create_5.png
          MDLQA-15372_Create_5.png
          88 kB
        4. MDLQA-15372_Delete_1.png
          MDLQA-15372_Delete_1.png
          54 kB
        5. MDLQA-15372_Export_11.png
          MDLQA-15372_Export_11.png
          76 kB
        6. MDLQA-15372_Export_14A.png
          MDLQA-15372_Export_14A.png
          26 kB
        7. MDLQA-15372_Export_14B.png
          MDLQA-15372_Export_14B.png
          26 kB
        8. MDLQA-15372_Export_14C.png
          MDLQA-15372_Export_14C.png
          50 kB
        9. MDLQA-15372_Export_16.png
          MDLQA-15372_Export_16.png
          84 kB
        10. MDLQA-15372_Export_17.png
          MDLQA-15372_Export_17.png
          187 kB
        11. MDLQA-15372_Export_18.png
          MDLQA-15372_Export_18.png
          72 kB
        12. MDLQA-15372_Export_19A.png
          MDLQA-15372_Export_19A.png
          256 kB
        13. MDLQA-15372_Export_19B.png
          MDLQA-15372_Export_19B.png
          180 kB
        14. MDLQA-15372_Export_19C.png
          MDLQA-15372_Export_19C.png
          228 kB
        15. MDLQA-15372_Export_19D.png
          MDLQA-15372_Export_19D.png
          7 kB
        16. MDLQA-15372_Export_4.png
          MDLQA-15372_Export_4.png
          217 kB
        17. MDLQA-15372_Export_7.png
          MDLQA-15372_Export_7.png
          172 kB
        18. MDLQA-15372_Export_8A.png
          MDLQA-15372_Export_8A.png
          25 kB
        19. MDLQA-15372_Export_8B.png
          MDLQA-15372_Export_8B.png
          23 kB
        20. MDLQA-15372_Export_9.png
          MDLQA-15372_Export_9.png
          25 kB
        21. MDLQA-15372_Import_4A-1.png
          MDLQA-15372_Import_4A-1.png
          92 kB
        22. MDLQA-15372_Import_4A-2.png
          MDLQA-15372_Import_4A-2.png
          118 kB
        23. MDLQA-15372_Import_4A-3.png
          MDLQA-15372_Import_4A-3.png
          144 kB
        24. MDLQA-15372_Import_4A-4.png
          MDLQA-15372_Import_4A-4.png
          170 kB
        25. MDLQA-15372_Import_4A-5.png
          MDLQA-15372_Import_4A-5.png
          198 kB
        26. MDLQA-15372_Import_4B-1.png
          MDLQA-15372_Import_4B-1.png
          109 kB
        27. MDLQA-15372_Import_4B-2.png
          MDLQA-15372_Import_4B-2.png
          92 kB
        28. MDLQA-15372_Import_4B-3.png
          MDLQA-15372_Import_4B-3.png
          67 kB
        29. MDLQA-15372_Import_4B-4.png
          MDLQA-15372_Import_4B-4.png
          83 kB
        30. MDLQA-15372_Import_4B-5.png
          MDLQA-15372_Import_4B-5.png
          79 kB

            Geshoski Mihail Geshoski
            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.