-
Functional Test
-
Minor
-
Moodle 3.7
Prerequisites
- Log in as admin
- Create a manager user and assign this user to 'manager' role at system level
- Set up three students, user1, user2, and user3. Make sure insights notifications are turned ON in the notification preferences for all three users.
- Set up 2 courses so that:
- user1 and user2 are enrolled as students in course1
- user3 is enrolled in course2 and only in course2, no other course enrolments (this is only to avoid possible misinterpretations of the results as we want to check that only some users get notifications)
- These 2 courses have no teachers and start tomorrow
- Create 1 quiz activity in course1 with time close tomorrow
- Create 1 quiz activity in course2 with time close in 10 days
- Go to site admin > analytics > analytics models
- If the Upcoming activities due model is disabled click on Actions > Enable for Upcoming activities due model
- Go to site admin > analytics > analytics settings and untick onlycli setting
Test the new model
- Go to Administration > Site administration > Server > Scheduled tasks
- Find task "Predict models \tool_analytics\task\predict_models"
- Click "Run now" (if this is not visible, see https://docs.moodle.org/en/Scheduled_tasks#Running_individual_tasks)
- Log will pop up, or check log by clicking the "Page" icon next to the task and click the "Magnifying glass" icon next to the most recent log entry
- You SHOULD NOT see any error and the process SHOULD finish fine
- Go to site admin > analytics > analytics models
- You SHOULD see a dropdown menu in the Insights column of the Upcoming activities due model
- You SHOULD see user1 and user2 listed here. You SHOULD NOT see user3.
- Select user1
- The page where you are forwarded SHOULD be report/insights/prediction.php
- If you expand the Actions drop down menu you SHOULD NOT see a Upcoming events link, and you SHOULD see Acknowledged a Not useful options
- Select one of the options, you SHOULD be forwarded to admin/tool/analytics/index.php and user1 SHOULD NOT appear in the Insights list for the Upcoming activities due model anymore
- Log in as user2 and check your notifications
- The title of the last one SHOULD be You have upcoming activities due (not sure if it will already be marked as read or not, that depends on messaging stuff)
- Click on the notification (not the link), you SHOULD be forwarded to user2 upcoming calendar events
- Expand your notifications again and now click on the View full notification link in the last notification
- You SHOULD see a notification with some suggested actions: Upcoming events link, Acknowledged and Not useful options
- Click on View insight details. You SHOULD be forwarded to report/insights/prediction.php
- Open the Actions dropdown. You SHOULD see Upcoming events link, Acknowledged and Not useful options.
- Expand your notifications again and click on the View full notification link in the last notification
- Now press Acknowledged option
- You SHOULD be forwarded to user2's dashboard and you SHOULD see a Your action has been saved success notification
- is a QA test written for
-
MDL-64783 Create a new model for upcoming activities due
- Closed