| Línea 3... |
Línea 3... |
| 3 |
In order to manage analytics models
|
3 |
In order to manage analytics models
|
| 4 |
As a manager
|
4 |
As a manager
|
| 5 |
I need to create and use a model
|
5 |
I need to create and use a model
|
| Línea 6... |
Línea 6... |
| 6 |
|
6 |
|
| - |
|
7 |
Background:
|
| - |
|
8 |
Given a Python Machine Learning backend server is configured
|
| 7 |
Background:
|
9 |
And I change the Python Machine Learning backend to use external server
|
| 8 |
# Turn off the course welcome message, so we can easily test other messages.
|
10 |
# Turn off the course welcome message, so we can easily test other messages.
|
| 9 |
Given the following config values are set as admin:
|
11 |
And the following config values are set as admin:
|
| 10 |
| onlycli | 0 | analytics |
|
12 |
| onlycli | 0 | analytics |
|
| - |
|
13 |
| sendcoursewelcomemessage | 0 | enrol_manual |
|
| 11 |
| sendcoursewelcomemessage | 0 | enrol_manual |
|
14 |
| enableanalytics | 1 | |
|
| 12 |
And the following "users" exist:
|
15 |
And the following "users" exist:
|
| 13 |
| username | firstname | lastname | email |
|
- |
|
| 14 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
16 |
| username | firstname | lastname | email |
|
| 15 |
| manager1 | Manager | 1 | manager1@example.com |
|
- |
|
| 16 |
| student0 | Student | 0 | student0@example.com |
|
- |
|
| 17 |
| student1 | Student | 1 | student1@example.com |
|
- |
|
| 18 |
| student2 | Student | 2 | student2@example.com |
|
- |
|
| 19 |
| student3 | Student | 3 | student3@example.com |
|
- |
|
| 20 |
| student4 | Student | 4 | student4@example.com |
|
- |
|
| 21 |
| student5 | Student | 5 | student5@example.com |
|
- |
|
| 22 |
| student6 | Student | 6 | student6@example.com |
|
17 |
| manager1 | Manager | 1 | manager1@example.com |
|
| 23 |
And the following "system role assigns" exist:
|
18 |
And the following "system role assigns" exist:
|
| 24 |
| user | course | role |
|
19 |
| user | course | role |
|
| 25 |
| manager1 | Acceptance test site | manager |
|
- |
|
| 26 |
And the following "courses" exist:
|
- |
|
| 27 |
| fullname | shortname | category | enddate | startdate | enablecompletion |
|
- |
|
| 28 |
| Course 1 | C1 | 0 | ## yesterday ## | ## 2 days ago ## | 1 |
|
- |
|
| 29 |
| Course 2 | C2 | 0 | ## yesterday ## | ## 2 days ago ## | 1 |
|
- |
|
| 30 |
| Course 3 | C3 | 0 | ## tomorrow ## | ## 2 days ago ## | 1 |
|
- |
|
| 31 |
And the following "course enrolments" exist:
|
- |
|
| 32 |
| user | course | role | timeend | timestart |
|
- |
|
| 33 |
| teacher1 | C1 | editingteacher | ## 1 day ago ## | ## 2 days ago ## |
|
- |
|
| 34 |
| student0 | C1 | student | ## 1 day ago ## | ## 2 days ago ## |
|
- |
|
| 35 |
| student1 | C1 | student | ## 1 day ago ## | ## 2 days ago ## |
|
- |
|
| 36 |
| student2 | C1 | student | ## 1 day ago ## | ## 2 days ago ## |
|
- |
|
| 37 |
| teacher1 | C2 | editingteacher | ## 1 day ago ## | ## 2 days ago ## |
|
- |
|
| 38 |
| student3 | C2 | student | ## 1 day ago ## | ## 2 days ago ## |
|
- |
|
| 39 |
| student4 | C2 | student | ## 1 day ago ## | ## 2 days ago ## |
|
- |
|
| 40 |
| teacher1 | C3 | editingteacher | 0 | ## 2 days ago ## |
|
- |
|
| 41 |
| manager1 | C3 | manager | 0 | ## 2 days ago ## |
|
- |
|
| 42 |
| student5 | C3 | student | 0 | ## 2 days ago ## |
|
- |
|
| 43 |
| student6 | C3 | student | 0 | ## 2 days ago ## |
|
- |
|
| 44 |
And the following "activities" exist:
|
- |
|
| 45 |
| activity | name | intro | course | idnumber | section | completion | completionview |
|
- |
|
| 46 |
| assign | assign1 | A1 desc | C1 | assign1 | 0 | 2 | 1 |
|
- |
|
| 47 |
| assign | assign2 | A2 desc | C2 | assign2 | 0 | 2 | 1 |
|
- |
|
| 48 |
| assign | assign3 | A3 desc | C3 | assign3 | 0 | 2 | 1 |
|
20 |
| manager1 | Acceptance test site | manager |
|
| 49 |
And the following "analytics model" exist:
|
21 |
And the following "analytics model" exist:
|
| 50 |
| target | indicators | timesplitting | enabled |
|
22 |
| target | indicators | timesplitting | enabled |
|
| 51 |
| \core_course\analytics\target\course_completion | \core\analytics\indicator\any_write_action,\core\analytics\indicator\read_actions | \core\analytics\time_splitting\single_range | true |
|
23 |
| \core_course\analytics\target\course_completion | \core\analytics\indicator\any_write_action,\core\analytics\indicator\read_actions | \core\analytics\time_splitting\single_range | true |
|
| 52 |
And I log in as "manager1"
|
24 |
And I log in as "manager1"
|
| Línea 60... |
Línea 32... |
| 60 |
And I set the field "Indicators" to "Read actions amount, Any write action in the course"
|
32 |
And I set the field "Indicators" to "Read actions amount, Any write action in the course"
|
| 61 |
And I select "__core__analytics__time_splitting__single_range" from the "timesplitting" singleselect
|
33 |
And I select "__core__analytics__time_splitting__single_range" from the "timesplitting" singleselect
|
| 62 |
And I press "Save changes"
|
34 |
And I press "Save changes"
|
| 63 |
Then I should see "No predictions available yet" in the "Students at risk of not meeting the course completion conditions" "table_row"
|
35 |
Then I should see "No predictions available yet" in the "Students at risk of not meeting the course completion conditions" "table_row"
|
| Línea 64... |
Línea -... |
| 64 |
|
- |
|
| 65 |
Scenario: Evaluate a model
|
- |
|
| 66 |
Given I am on "Course 1" course homepage
|
- |
|
| 67 |
And I navigate to "Course completion" in current page administration
|
- |
|
| 68 |
And I expand all fieldsets
|
- |
|
| 69 |
And I set the following fields to these values:
|
- |
|
| 70 |
| Assignment - assign1 | 1 |
|
- |
|
| 71 |
And I click on "Save changes" "button"
|
- |
|
| 72 |
And I am on "Course 2" course homepage
|
- |
|
| 73 |
And I navigate to "Course completion" in current page administration
|
- |
|
| 74 |
And I expand all fieldsets
|
- |
|
| 75 |
And I set the following fields to these values:
|
- |
|
| 76 |
| Assignment - assign2 | 1 |
|
- |
|
| 77 |
And I click on "Save changes" "button"
|
- |
|
| 78 |
And I am on "Course 3" course homepage
|
- |
|
| 79 |
And I navigate to "Course completion" in current page administration
|
- |
|
| 80 |
And I expand all fieldsets
|
- |
|
| 81 |
And I set the following fields to these values:
|
- |
|
| 82 |
| Assignment - assign3 | 1 |
|
- |
|
| 83 |
And I click on "Save changes" "button"
|
- |
|
| 84 |
And I am on site homepage
|
- |
|
| 85 |
And I navigate to "Analytics > Analytics models" in site administration
|
- |
|
| 86 |
And I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
- |
|
| 87 |
And I choose "Evaluate" in the open action menu
|
- |
|
| 88 |
And I press "Evaluate"
|
- |
|
| 89 |
And I should see "Evaluate model"
|
- |
|
| 90 |
And I press "Continue"
|
- |
|
| 91 |
# Evaluation log
|
- |
|
| 92 |
And I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
- |
|
| 93 |
And I choose "Evaluation log" in the open action menu
|
- |
|
| 94 |
And I should see "Configuration"
|
- |
|
| 95 |
And I click on "View" "link"
|
- |
|
| 96 |
And I should see "Log extra info"
|
- |
|
| 97 |
And I click on "Close" "button" in the "Log extra info" "dialogue"
|
- |
|
| 98 |
And I navigate to "Analytics > Analytics models" in site administration
|
- |
|
| 99 |
# Execute scheduled analysis
|
- |
|
| 100 |
And I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
- |
|
| 101 |
And I choose "Execute scheduled analysis" in the open action menu
|
- |
|
| 102 |
And I should see "Training results"
|
- |
|
| 103 |
And I press "Continue"
|
- |
|
| 104 |
# Check notifications
|
- |
|
| 105 |
Then I should see "1" in the "#nav-notification-popover-container [data-region='count-container']" "css_element"
|
- |
|
| 106 |
And I open the notification popover
|
- |
|
| 107 |
And I click on "View full notification" "link" in the ".popover-region-notifications" "css_element"
|
- |
|
| 108 |
And I should see "Students at risk in Course 3 course"
|
- |
|
| 109 |
When I am on site homepage
|
- |
|
| 110 |
And I navigate to "Analytics > Analytics models" in site administration
|
- |
|
| 111 |
# View predictions
|
- |
|
| 112 |
When I select "C3" from the "contextid" singleselect
|
- |
|
| 113 |
And I click on "View prediction details" "icon" in the "Student 6" "table_row"
|
- |
|
| 114 |
And I should see "Prediction details"
|
- |
|
| 115 |
And I should see "Any write action"
|
- |
|
| 116 |
And I should see "Read actions amount"
|
- |
|
| 117 |
And I click on "Select Student 6 for bulk action" "checkbox" in the "Student 6" "table_row"
|
- |
|
| 118 |
And I click on "Accept" "button"
|
- |
|
| 119 |
And I click on "Confirm" "button" in the "Accept" "dialogue"
|
- |
|
| 120 |
And I click on "View prediction details" "icon" in the "Student 5" "table_row"
|
- |
|
| 121 |
And I click on "Select Student 5 for bulk action" "checkbox" in the "Student 5" "table_row"
|
- |
|
| 122 |
And I click on "Not applicable" "button"
|
- |
|
| 123 |
And I click on "Confirm" "button" in the "Not applicable" "dialogue"
|
- |
|
| 124 |
And I should see "No insights reported"
|
- |
|
| 125 |
# Clear predictions
|
- |
|
| 126 |
When I am on site homepage
|
- |
|
| 127 |
And I navigate to "Analytics > Analytics models" in site administration
|
- |
|
| 128 |
And I should see "No insights reported" in the "Students at risk of not meeting the course completion conditions" "table_row"
|
- |
|
| 129 |
And I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
- |
|
| 130 |
And I choose "Clear predictions" in the open action menu
|
- |
|
| 131 |
And I press "Clear predictions"
|
- |
|
| 132 |
Then I should see "No predictions available yet" in the "Students at risk of not meeting the course completion conditions" "table_row"
|
- |
|
| 133 |
|
36 |
|
| 134 |
Scenario: Edit a model
|
37 |
Scenario: Edit a model
|
| 135 |
When I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
38 |
When I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
| 136 |
And I choose "Edit" in the open action menu
|
39 |
And I choose "Edit" in the open action menu
|
| 137 |
And I click on "Read actions amount" "text" in the ".form-autocomplete-selection" "css_element"
|
40 |
And I click on "Read actions amount" "text" in the ".form-autocomplete-selection" "css_element"
|
| Línea 145... |
Línea 48... |
| 145 |
|
48 |
|
| 146 |
Scenario: Export model
|
49 |
Scenario: Export model
|
| 147 |
When I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
50 |
When I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
| 148 |
And I choose "Export" in the open action menu
|
51 |
And I choose "Export" in the open action menu
|
| 149 |
And I click on "Actions" "link" in the "Students at risk of not meeting the course completion conditions" "table_row"
|
52 |
And I click on "Actions" "link" in the "Students at risk of not meeting the course completion conditions" "table_row"
|
| - |
|
53 |
And following "Export" should download a file that:
|
| Línea 150... |
Línea 54... |
| 150 |
And following "Export" should download between "100" and "500" bytes
|
54 |
| Contains file in zip | model-config.json |
|
| 151 |
|
55 |
|
| 152 |
Scenario: Check invalid site elements
|
56 |
Scenario: Check invalid site elements
|
| 153 |
When I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|
57 |
When I open the action menu in "Students at risk of not meeting the course completion conditions" "table_row"
|