We want to add semester-based groups to the internships courses and turn on group mode in the "enter your hours" mod_data
activity so we can filter the entries based on the semester group, but entries only have one group ID and it's added at the
time of its creation (being set to 0 if no group). Here's how we retroactively add groups to these data entries in the
mdl_data_records
table:
- Go to the course > Participants > Groups > Create a new group
- Name the group like "Fall 2023" with an idnumber of form "INTER-INTRN-2023FA" i.e. the course shortname and then the semester code
- Add all the current students to the Fall 2023 group
- Create a group with analogous settings for Spring 2024
- Create a Grouping called "Semester Groups" and add these two groups to the grouping
- Backup the
mdl_data_record
database table (seegcloud
command) - Connect to the Moodle database (e.g. by running a shell on the pod and then
moosh -n sql-cli
) - Edit the correct course name, e.g. "Interior Design Internships", into the
@coursename
variable in the SQL command and also edit in the correct groupd idnumber from step 2 - Execute the SQL command
- Open the hours mod_data activity in a browser, edit its settings
- Under Common module settings set Group mode to be "separate groups" and set Grouping to be "Semester Groups"
- Save and view the entries list, confirm that you can filter with the semester groups