- 12 Sep 2024
- 4 minute read
- Print
- DarkLight
- PDF
Slate Standard Athletics Portal
- Updated 12 Sep 2024
- 4 minute read
- Print
- DarkLight
- PDF
Slate provides a standard Athletics Portal that can be imported using Suitcase and edited in an institution's database. This portal is configured to leverage the Slate standard Sport table, and coaches are set up as users with specific roles in Slate.
Slate Standard Sport Table
Slate provides a standard Sport table in the underlying database (custom sport-scoped fields can also be created as needed). Sport information can be viewed, added, and edited on the Profile > Sports tab of the person record.
The values for the standard fields "Sport" and "Rating" are dependent on specific prompt key values.
Sports - The list of sports offered should be added as prompts using the key of "sport."
Ratings - The rating options should be added as prompts using the key of "sport_rating."
Custom Roles
Coaches should be added as users in Slate with specific roles related to their sport(s). The naming convention for these roles is as follows: Coach - <<EXACT NAME OF SPORT PROMPT VALUE>>
đź”” Important!
If sport prompts are broken out by sex, you'll want the sport to be "Basketball Men" and the role to be "Coach - Basketball Men" to allow for easy matching of athletes to coaches in the portal. Some of the filters in use in this standard portal look for the content in the role name following "Coach - "; these existing filters are most easily implemented without changes by using sport prompts and roles that do not contain additional dashes. It's good to think ahead while you are building out your sports prompts if this will be the case. Once again, your Coach roles will need to exactly match the sports prompts you've created. If your sport prompts will look like "Basketball Women" then the role will be "Coach - Basketball Women".
Editing the Athletes by Sport Query
Once the Athletics portal has been imported via Suitcase, the exports can be customized to return the data points to display in the portal. More filters can be added to limit the results to specific records if desired, such as only recruited athletes or only those in a particular application period.
This query comes with a subquery filter called “Student's Sport Matches Coach's Sport”, which restricts the list of athletes whose sport(s) match the logged-in user's role(s). This filter should not be removed, as it ensures that coaches see only their athletes.
Looking at the subquery above, we are using an independent subquery on the Role User base. This base stores all of the role assignments in Slate. We check to see if there’s a role assignment where two things are true:
The role name has the format “Coach - [name of sport]”.
The role is assigned to the currently logged in user (@identity).
This query also has a "node", which allows you to leverage Liquid looping in the view to display one row per result. The node can be assigned by opening "Edit Parameters" within the query.
Editing the Views
You may also edit the views to display any additional data points added to the queries, or remove items, or reformat in a different visual layout, etc.
The standard Homepage view includes a static content block for user information, which displays a list of coach roles associated with the logged in user.
The Homepage view also contains a table of athletes. This table uses data from the Athletes by Sport query.
The portal also includes a view for the athlete details pop-up, which displays a prefilled form when a specific athletic is clicked.
This pop-up also allows coaches to save a rating value for the athlete.
Testing
To test the Athletics portal, you will need to have an example user with at least one coach role. You will also need to create several records that have sports associated with your example user's coach roles.
To view the portal, go to the portal URL. If your account has a coach role, you will be able to access the portal. If you do not have a coach role, you will need to impersonate your example coach user and then go to the portal URL.
Once in the portal, ensure that you see the expected athletes in the list. Click on different athletes to view the pop-up, and make sure to also test saving the rating. You can always return to the Portal Editor to make any changes to the queries and views as desired.
Additional Customizations
The standard Athletics portal can be updated in various ways, depending on your institution's process. If your roles begin with, for example, “Athletic Director - ” rather than “Coach - ”, you can update the subqueries to use this naming convention. If your institution uses custom permissions rather than roles, you’ll need to recreated the subqueries using the “User Permission” base, rather than the “Role User” base.
✨ TipIf making changes to the roles/permissions, remember to edit the subquery filter in the “List of Athletes” query and the subquery export in the “User Information” query.
Changes to the popup can be made by editing the Sport Update Form for Athletics Portals. The standard form uses merge fields to display application and checklist information, but this can be edited to display any record data that needs to be shown.