Case Study: Creating a Manager View

This case study demonstrates how to create a Manager View for specific roles in Lambda Analytics.

TOPICS


Introduction to Manager Views

By using the Roles and Security Files features of Zoola, you can configure a domain to show customized data to specific viewers in Views, Reports, and Dashboards.

This case study walks you through the scenario of creating a custom view to show a specific user data on only their students/employees, filtering out any data from irrelevant students/employees.

The process of configuring views based on security files functions on the principle of connecting a database field from the domain data to an attribute from the user profile of the report viewer. This connection is established in the security file, which is attached to the domain.

If a report viewer has the attribute identified in the security file, they will see the data of students who have the corresponding value. This means that if there are no students in the domain data who have a corresponding value to the value of the attribute of the viewer, no data will be shown. The following table represents the Manager View scenario, where the Manager ID attribute of the domain has been configured in the security file to correspond to the User ID of the report viewer.

  Student 1 Manager ID: W Student 2 Manager ID: X Student 3 Manager ID: Y
Manager 1 User ID: X Data Not Visible Data Visible Data Not Visible
Manager 2 User ID: Y Data Not Visible Data Not Visible Data Visible
Manager 3 User ID: Z Data Not Visible Data Not Visible Data Not Visible

Manager 1 can see Student 2's data, but not Student 1 or Student 3, as the Manager ID of Student 2 corresponds to the User ID of Manager 1.

Manager 2 can see Student 3's data, but not Student 1 or Student 2, as the Manager ID of Student 3 corresponds to the User ID of Manager 1. 

Manager 3 cannot see the data of any of the students, since none of the students have a Manager ID of Z.

If the connected attribute is present in certain viewer profiles, but not others, then the configuration applies differently. Viewers with the identified attribute will see the data of students who have a corresponding value, but viewers that do not have the corresponding attribute at all will see all the data, as though the domain had not been configured.

The following table represents an alternative Manager View scenario, in which the Organization ID attribute of the domain has been configured in the security file to correspond to the Organization ID of the report viewer. Only certain viewer profiles have an Organization ID attribute, so the view is affected as follows:

  Student 1 Organization ID: W Student 2 Organization ID: X Student 3 Organization ID: Y
Manager 1 Organization ID: X Data Not Visible Data Visible Data Not Visible
Manager 2 User ID: Z Data Not Visible Data Not Visible Data Not Visible
Manager 3: No Organization ID Data Visible Data Visible Data Visible

Manager 1 can see Student 2's data, as they share as corresponding Organization ID.

Manager 2 cannot see the data of any of the students, since none of the students have an Organization ID of "Z."

Manager 3 can see the data of all of the students, since Manager 3 does not have any Organization ID, and the view reverts to default.

NOTE  NOTE

To avoid the constraints of either of the above scenarios negatively affecting viewers for whom the domain was not customized, it is best to copy domains (either the public domains or your own custom ones) and then to edit the copy. This way, an existing views dependent on the original domain will remain intact, and the copied domain will be able to generate independent views.

For the purposes of this case study, we will configure the public Course Completions Table View to provide a manager the view of their students/employees who have completed courses. 

Back to TOPICS


Configuring a New Manager Profile (Optional)

In creating a Manager View, you may wish to enable a new user. This optional step walks you through assigning the necessary roles in Moodle or Totara to grant a user access to Lambda Analytics for the specific needs of the Manager View.

To enable a Moodle or Totara user to access Lambda Analytics for the Manager View:

1.  Log in to Moodle or Totara as an Administrator. 

2.  From the Administrator block, navigate to Site Administration > Users > Permissions > Assign System Roles. The Assign Roles in System page appears.

3.  From the Role column, select the Zoola Public Execute role. The Manager View user needs only to run reports, not create or modify. A new page with the heading Assign Role 'Zoola Public Execute' in System appears.

4.  In the Potential Users panel, search for and select the appropriate user for whom you wish to create the Manager View. 

5.  In the central column, click Add. The selected user is now listed in the Existing Users column. 

6.  From the Assign Another Role list (located below the Existing Users panel), select the Zoola Reports role. Repeat steps 5-6 to apply this role to the selected user. 

The selected user now has the following permissions:

Zoola Public Execute: This role enables the user to execute reports, dashboards, and ad hoc views in Zoola that contains components from the public folder of the repository. However, this role does not permit the assigned user to view the public items themselves in the repository. 

Zoola Reports: This role enables the assigned user to view and run reports on Zoola. However, this role does not permit the user to create or modify reports or ad hoc views.

Back to TOPICS


Copying the Domain to a Private Folder

For the purposes of this case study, we will configure the Public Course Completions Table view to provide a manager a view of their specific students or employees. To configure this table view, you must begin by copying the Course Completions Domains from the Public folder to your private folder. 

To copy the Course Completions Domain to your private organizational folder:

1.  From the Home page, navigate to View > Repository.

2.  In the Folders panel, navigate to Public > Totara/Moodle > Domains. The list of Public Domains displays in the main Repository panel. 

3.  Right-click the Course Completions Domain and select Copy from the context menu.

4.  In the Folders panel, navigate to the Domains folder within your private organizational folder.

5.  Right-click your private Domains folder and select Paste from the context menu. A copy of the Course Completions Domain now appears in your Domains folder.

Once you have copied the Public Domain into your private folder, you can edit it freely without affecting reports and views dependent on the public domain. 

Editing the Course Completions Domain Name

NOTE  NOTE

Before you begin configuring your copied domain, be sure to give it a unique name to avoid later confusion. 

To change the name of the newly copied Course Completions Domain:

1.  From the private Domains folder, select the Course Completions Domain.

2.  Right-click the Course Completions Domain and select Edit from the context menu. The Edit Domain page appears. 

3.  In the Name field below the Required Information heading, enter a new name for the domain: "Course Completions Manager Domain."

4.  In the Description field, you can enter an optional explanation of the new domain.

5.  Click Submit to save the new domain information and return to the Repository.

Back to TOPICS


Configuring the Security File

The security file allows you to establish connections between data from the Course Completions Manager Domain and the intended user profile, ensuring that a specific viewer will only see certain data deemed relevant by an administrator.

This section of the Manager View Case Study provides you with a ready-made security file primed to create the Manager View, with the necessary user profile and Domain attributes already entered. If you would rather configure a different view with the security file, see this. 

To create the Manager View security file:

1.  Open your preferred text edit.

2.  Paste the following security file template into your text editor:

<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted">
<resourceAccessGrants>
<!--Row level security -->
<resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1">
<resourceAccessGrants>
<!--Row level for organisations -->
<resourceAccessGrant id="Jointree_1_row_access_grant_20">
<principalExpression><![CDATA[authentication.principal.attributes.any{it.attrName in ['userid'] }]]></principalExpression>
<filterExpression>testProfileAttribute(mdl_pos_assignment.managerid,'userid)<

3.  Save the security file XML on your computer with a unique name: "coursecompletion_manager_security.xml"

After creating the security file, you are ready to add it to the "Course Completions Manager Domain" to apply the security settings for the manager view.

To add the security file to the domain:

1.  From the Repository, open the new "Course Completions Manager Domain" from your private folder structure by right-clicking it and selecting Edit from the context menu. 

2.  From the Edit Domain page, click Add Security File from below the Optional Information header. The Add Security File window opens. 

3.  Ensure that the Upload a Local File option is selected.

4.  Click Choose File to open a browser of your local drive.

5.  Select your security file (coursecompletion_manager_security.xml) and click Open. The name of your security file will now display next to the Choose File button. 

6.  Click Select to upload the security file. Once the file is uploaded, it will appear in the Optional Information column of the Security File section. This can be edited or deleted by clicking Change or Remove. 

NOTE  NOTE

Lambda Analytics will validate the security file while it is uploading. If the file is invalid, it will not upload. 

7.  To save your changes to the domain, click Submit.

The Course Completions Manager Domain is now secured to establish a connection between the "User ID" of the viewer (the manager) and the Manager ID of all student data in the domain. 

Back to TOPICS


Creating the Course Completions Table View

After completing the previous steps of the Manager View case study, you will now have a new private "Course Completions Manager Domain" copied from the "Course Completions Domain." Your new domain will have been secured with the "coursecompletion_manager_security.xml" file, establishing a connection between the viewer's User ID and the students' Manager ID. This foundation is necessary to begin creating customized manager views.

Any view created from your "Course Completions Manager Domain" will be configured by the security settings applied in the security file. 

To re-create the "Course Completions Table View" from the "Course Completions Manager Domain":

1.  From the Home page, select Ad Hoc View from the View menu at the top of the page.

2.  In the Select Data wizard, select the Course Completions Manager Domain.

3.  Click Choose Data. The Data Chooser opens. 

4.  From the Fields section, select the necessary fields from the Source panel and move them to the Selected Fields panel. 

5.  If necessary, define any Pre-Filters or Display labels.

6.  When you are finished, click OK. The Ad Hoc Editor opens. 

7.  Select Table from the drop-down menu in the New Ad Hoc View panel.

8.  From the Fields panel of the Ad Hoc Editor, drag the following fields to the Columns box in the New Ad Hoc View panel:

a.)  First Name

b.)  Last Name

c.)  Position

d.)  Organization

e.)  Manager

f.)  Course Category

g.)  Course

h.)  Date Enrolled

i.)  Date Completed

You now have the fundamental layout of the original "Course Completions Table View," by the data is drawn through your new "Course Completions Manager Domain." Any user who views this View (or any Report or Dashboard created from it) from their Lambda Analytics account will only see the data of students with a corresponding Manager ID.

Back to TOPICS

Further Steps for the Manager View

To carry your new "Course Completions Manager Domain" or View through the Lambda Analytics workflow, you can continue on to create a report or dashboard based on your manager view, following the standard process used in creating reports and dashboards. 

The "Course Completions Manager Domain" can also be your template for creating alternative views and configurations. To use the content of this case study to create new custom views for Totara or Moodle, simply follow the case study steps with an alternate public domain or one of your own custom/private domains. 

To create a custom view that establishes a different connection between attributes than shown in this Manager View case study, you must first establish a new logical connection between a domain attribute and an attribute from a user profile to replace the "managerid" taken from the "Course Completions Domain" and the "userid" taken from the user profile. To identify the necessary attributes to create a new custom view:

1.  From either the public domains or your own custom/private domains, you must first identify the domain you wish to secure to create a new view. If you select a public domain, follow the steps listed under Copy the Domain to a Private Folder. If you select a custom/private domain, be sure to understand the implications of securing it for a custom view. It is recommended that you make a copy of any domain, rename it, and apply the configurations to the newly copied domain. 

2.  From your newly copied domain, you will need to open the Domain Designer (select the new domain in the Repository, right-click it, and select Edit). Once in the Domain Designer, you will need to identify an attribute to connect to a user profile to create the view. 

NOTE  NOTE

If you select an attribute available in only certain user profiles, viewers missing that attribute will see all data as normal. 

3.  The following table identifies the general attributes shared by most users, separated by LMS (if you connect an attribute from this table to a domain attribute, the view will be customized for almost all users):

Moodle Totara
User ID User ID
Department Department
Institution Institution
Group ID Group ID
Cohort ID Cohort ID
Enrolled Course ID Enrolled Course ID
  Manager ID
  Position ID
  Organization ID

NOTE  NOTE

Unlike other global profile attributes, the enrolled_courseids attribute contains courses where the user has a role other than 'student,' like teacher, manager, or assessor.

4.  Once you have identified the user profile and domain attributes to connect, follow the steps in "Creating an XML Security File" to insert them into the template. 

5.  Once you have saved your new security file to your local drive, follow the steps in "Configure the Security File" from this case study.

Back to TOPICS


Adding an XML Security File

XML Security files allow you to add an extra layer of data security to a data source, tying information from the report viewer's user profile to the report and auto-filtering table rows in the report. 

For example, this form of data security could enable a manager to only see the data of users they manager (tying the manager's User ID to the user's Manager ID) or a user to only see their own data (tying the user's User ID to the User ID in the report). 

Back to TOPICS

Uploading a Data Source Security File

To add the security file to the data source:

1.  From the Repository, edit a Data Source by right-clicking it and selecting Edit from the context menu. 

2.  From the Edit Data Source page, click Add Security File from below the Optional Information header. The Add Security File window opens. 

3.  Ensure that the Upload a Local File option is selected.

4.  Click Choose File to open a browser of your local drive.

5.  Select your security XML file and click Open. The name of your security file will now display next to the Choose File button. 

6.  Click Select to upload the security file.

7.  Once the file is uploaded, it will display in the Optional Information column under the Security File section. You can return to it in the future to edit or remove the file by clicking Change or Remove as needed. 

8.  To save your changes, click Submit. 

Back to TOPICS


User Profile Fields Available for Data Source Security

User ID: For both Moodle and Totara, you may use the User ID from the viewer profile to auto-filter the report to only show data for that user. 

Department ID: For both Moodle and Totara, you may use the Department ID from the viewer profile to auto-filter the report to only show users who belong to the same department. 

Institution ID: For both Moodle and Totara, you may use the Institution ID from the viewer profile to auto-filter the report to only show users who belong to the same institution. 

Custom User Profile Field: For both Moodle and Totara, you may user a Custom User Profile field from the viewer profile to auto-filter the report to only show data who match the values in those user profile fields.

Group ID: For both Moodle and Totara, you may use the Group ID from the viewer profile to auto-filter the report to only show users who belong to the same group. 

Cohort/Audience: For both Moodle and Totara, you may use the Cohort/Audience ID from the viewer profile to auto-filter the report to only show users who belong to the same cohort/audience.

Enrolled Course ID: For both Moodle and Totara, you may use the Enrolled Course ID(s) from the viewer profile to auto-filter the report to only show the users in courses. 

NOTE  NOTE

This is only available to Manager roles.

Organization ID: For Totara, you may use the Organization ID from the viewer profile to auto-filter the report to only show users who belong to the same organization.

Position ID: For Totara, you may combine the Organization ID and Position ID from the viewer profile to auto-filter the report to only show users who belong to the same Organization and Position.

Manager ID: For Totara, you may use the Manager ID from the viewer profile to auto-filter the report to only show users who report to the manager.

Current Course ID: For both Moodle and Totara, you may use a Course ID from the course page in the LMS to auto-filter the report to only show data that matches the course. 

Back to TOPICS