Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.8.5
-
MOODLE_38_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
311_
MDL-70006 -
Hide
Requirements
- As an admin, set up the Outgoing mail configuration (Site administration > Server > Outgoing mail configuration)
NOTE: To properly configure the outgoing email, you will need to set up a local SMTP server using mailcatcher (https://mailcatcher.me/) or alternatively you can use Gmail's SMTP servers (https://docs.moodle.org/39/en/Email_setup_gmail).
General setup
- Login as Admin.
- Set up your timezone correctly, if it is not already (Site administration > Location > Location settings)
- Go to Site administration > Server > Support contact
- Add a valid value to 'Support email' setting (i.e. support@moodle.com) and save changes.
- Go to " Server > Outgoing mail configuration".
- Add a valid value to "No-reply address" (i.e. noreply@moodle.com) and save changes.
- Go to Site administration > Analytics > Analytics settings
- Set "Analytics processes execution via command line only" = "No"
- Save changes.
- Login as teacher t1.
- Go to User profile > Preferences > Notification preferences
- Change to "On" all preferences for 'Insights generated by prediction models'.
Insights setup
You will need to generate some insights for a certain model. There are different ways to generate this data (you should follow only one of them):
OPTION 1: Restore backup courses
- Login as admin.
- Go to "Site administration > Courses > Restore course" and restore the attached backup files: backup-moodle2-course-2-training-20210825-1709.mbz
and backup-moodle2-course-3-prediction-20210825-1708.mbz
OPTION 2: Restore and configure backup courses
- Download backup files from https://github.com/enovation/moodle-utils/tree/master/analytics
- Login as admin.
- Go to "Administration > Courses > Backups > General import defaults".
- Enable "Allow admin conflict resolution".
- Go to "Site administration > Courses > Restore course" and restore the downloaded backup files
- Access to "Ongoing Course 1"
- Set the course start date to one month ago
- Set the course end date an 2 weeks in the future.
- Enrol teacher t1.
OPTION 3: Create them manually
- We need a couple of courses. First one, for training:
- Create a new course with 'Training' as shortname.
- Enrol 3 students: 'student 1', 'student 2' and 'student 3'
- Add a new 'Page' activity.
- Add a new 'Forum' activity.
- Login as 'student 1' and 'student 2' and generate some logs (10-15 or more): visit the page, post in the forum, visit participant list, grades...
- As an admin, set course start date a year ago and end date to yesterday.
- Go to course Participants page and edit all enrolments one by one to set start date to one year ago.
- Create a new course with 'Prediction' as shortname:
- Set the course start date to one month ago
- Set the course end date an 2 weeks in the future.
- Enrol 3 students: 'student 1', 'student 2' and 'student 3'
- Enrol a teacher.
- Add a new 'Page' activity.
- Add a new 'Forum' activity.
- Login as 'student 1' and 'student 2' and generate some logs (10-15 or more): visit the page, post in the forum, visit participant list, grades...Check course Participants.
- Download the attached test-mdl-70006.php file and place it in moodle root
- Execute
php test-mdl-70006.php
Test
- As an admin
- Go to Site administration > Analytics > Analytics models
- Enable 'Students at risk of dropping out' model in case is disabled using 'Edit' action.
- Enabled = true
- Analysis interval = 10% after start
- Save changes
- For 'Students at risk of dropping out' choose 'Execute scheduled analysis' action (it may take a little bit long to run it).
- Click on 'Continue'
- Login as Teacher and confirm has a new notification.
- Confirm Teacher has received an email.
- Login as admin and go to 'Prediction' course > Participants.
- Edit Teacher's enrolment using the cog menu.
- Changes Status = Suspended and Save changes.
- Go to Site administration > Analytics > Analytics models
- For 'Students at risk of dropping out' choose 'Clear predictions' action.
- Click on 'Continue'.
- For 'Students at risk of dropping out' choose 'Execute scheduled analysis' action (it may take a little bit long to run it).
- Click on 'Continue'
- Login as Teacher and confirm there is no new notification.
- Confirm Teacher has not received any email.
ShowRequirements As an admin, set up the Outgoing mail configuration ( Site administration > Server > Outgoing mail configuration) NOTE: To properly configure the outgoing email, you will need to set up a local SMTP server using mailcatcher ( https://mailcatcher.me/ ) or alternatively you can use Gmail's SMTP servers ( https://docs.moodle.org/39/en/Email_setup_gmail ). General setup Login as Admin. Set up your timezone correctly, if it is not already (Site administration > Location > Location settings) Go to Site administration > Server > Support contact Add a valid value to 'Support email' setting (i.e. support@moodle.com) and save changes. Go to " Server > Outgoing mail configuration". Add a valid value to "No-reply address" (i.e. noreply@moodle.com) and save changes. Go to Site administration > Analytics > Analytics settings Set "Analytics processes execution via command line only" = "No" Save changes. Login as teacher t1. Go to User profile > Preferences > Notification preferences Change to "On" all preferences for 'Insights generated by prediction models'. Insights setup You will need to generate some insights for a certain model. There are different ways to generate this data (you should follow only one of them): OPTION 1: Restore backup courses Login as admin. Go to "Site administration > Courses > Restore course" and restore the attached backup files: backup-moodle2-course-2-training-20210825-1709.mbz and backup-moodle2-course-3-prediction-20210825-1708.mbz OPTION 2: Restore and configure backup courses Download backup files from https://github.com/enovation/moodle-utils/tree/master/analytics Login as admin. Go to "Administration > Courses > Backups > General import defaults". Enable "Allow admin conflict resolution". Go to "Site administration > Courses > Restore course" and restore the downloaded backup files Access to "Ongoing Course 1" Set the course start date to one month ago Set the course end date an 2 weeks in the future. Enrol teacher t1. OPTION 3: Create them manually We need a couple of courses. First one, for training: Create a new course with 'Training' as shortname. Enrol 3 students: 'student 1', 'student 2' and 'student 3' Add a new 'Page' activity. Add a new 'Forum' activity. Login as 'student 1' and 'student 2' and generate some logs (10-15 or more): visit the page, post in the forum, visit participant list, grades... As an admin, set course start date a year ago and end date to yesterday. Go to course Participants page and edit all enrolments one by one to set start date to one year ago. Create a new course with 'Prediction' as shortname: Set the course start date to one month ago Set the course end date an 2 weeks in the future. Enrol 3 students: 'student 1', 'student 2' and 'student 3' Enrol a teacher. Add a new 'Page' activity. Add a new 'Forum' activity. Login as 'student 1' and 'student 2' and generate some logs (10-15 or more): visit the page, post in the forum, visit participant list, grades...Check course Participants. Download the attached test-mdl-70006.php file and place it in moodle root Execute php test-mdl-70006.php Test As an admin Go to Site administration > Analytics > Analytics models Enable 'Students at risk of dropping out' model in case is disabled using 'Edit' action. Enabled = true Analysis interval = 10% after start Save changes For 'Students at risk of dropping out' choose 'Execute scheduled analysis' action (it may take a little bit long to run it). Click on 'Continue' Login as Teacher and confirm has a new notification. Confirm Teacher has received an email. Login as admin and go to 'Prediction' course > Participants. Edit Teacher's enrolment using the cog menu. Changes Status = Suspended and Save changes. Go to Site administration > Analytics > Analytics models For 'Students at risk of dropping out' choose 'Clear predictions' action. Click on 'Continue'. For 'Students at risk of dropping out' choose 'Execute scheduled analysis' action (it may take a little bit long to run it). Click on 'Continue' Login as Teacher and confirm there is no new notification. Confirm Teacher has not received any email. - As an admin, set up the Outgoing mail configuration (Site administration > Server > Outgoing mail configuration)
Description
Teacher's with a suspended enrolment record still receive analytics notifications.
The process that sends notifications should exclude suspended users.