Data Hub 2.0

Importing Enrollment Information

Assigning Parent Roles

This use case will demonstrate how to:
  1. Create a parent role
  2. Create/upload a CSV file via Data Hub to add users to the parent role of students
  3. Use the new parent role

Creating the Parent Role


To create the parent role go to the Site Administration > Users > Permissions > Define roles. Go to the the bottom of the page and select the 'Add a new role' button. There are 5 permissions that will be allowed for this Parent role:
  • Users
    1. Edit user profile - moodle/user:editprofile
    2. See all user blogs - moodle/user:readuserblogs
    3. See all user posts - moodle/user:readuserposts
    4. See user activity reports - moodle/user:viewuseractivityreports
  • Course
    1. View user profile - moodel/user:viewdetails
This parent role is used with the Mentees block. The Mentees block is where the parent accesses the user information they are permitted to view when they are assigned to the parent role of a user. To add the Mentees block, go to the the site home page, turn editing on, go to blocks and select the Mentees block.


Creating/Uploading the CSV file


There are 5 required fields to create the CSV file to assign parent roles to users via Data Hub:
  1. action: add this user to the following role in the following
  2. context: this user will be assigned a role in the user context
  3. instance: in this example the instance is the student user, enter the username
  4. username: enter the username of the user receiving the new role permissions
  5. role: enter the shortname of the role being assigned
Enrollment file for parent use case

The users in this example have already been added to the site. If users have not been added to the site, add the users via a user file or other methods first.

Any of the properties included on the Version 1 import > Field mapping > Enrollment fields tab can be included in the CSV file.

Once the file has been created it can be uploaded and processed. To upload and process the file go to the Administration block > Site Administration > Plugins > Local plugins > Data Hub plugins > Manage plugins. The image in the following screen will open. Under the Import Plugins section select the "Go" link in the Run manually column.

Version 1 import Go link

Choose an (3) enrollment file to upload. Then select the Run Now button at the bottom of the page.

Manually run files page

A brief log message will be displayed about the success of the file that was processed.

The new role can be located by going to the student user's profile screen. Then go to the Administration block > Profile settings for Connors Melanie > Roles > Assign roles relative to this user.

Settings block role assignment

That will open a page where we can see the role assignment we created will the Integration point file.

Parent role assignment

Using the Role


To demonstrate how the role is used I'll login as the user that was just assigned to the parent role. The user will see the the student user they were assigned the parent role for in the Mentees block.

Mentees block

If the parent user selects the student user's name from the Mentees block, they will be linked to the student user's profile screen. From here the parent user can access the features they have permissions to use.

User profile screen

The courses the student user is assigned to can be linked to here from the Course profiles section of the user profile, each course name is a link to the course. The parent user does not have full access to the courses though, just the features they have permissions to use.