Skip to content

feat: add clickable user names and instance role display for staff/admin#8372

Open
LWS49 wants to merge 1 commit into
masterfrom
lws49/add-link-to-student-name-in-profile
Open

feat: add clickable user names and instance role display for staff/admin#8372
LWS49 wants to merge 1 commit into
masterfrom
lws49/add-link-to-student-name-in-profile

Conversation

@LWS49
Copy link
Copy Markdown
Collaborator

@LWS49 LWS49 commented May 12, 2026

  1. Persona: staff and admin use these features to access admin student profiles, role requester profiles and learn about roles of users at each instance more easily.

  2. To access admin student profiles directly, userId (rather than CourseUserId) must be propogated to the site. (needs to ensure that userId is only passed to the site for admin/staff to prevent students from seeing their own userId.) for role requester profiles, the userId of the requester is necessary. for roles of users at each instance, we now need both every instance the user is present in AND their role in each instance instead of only the instances.

3 and 4. userId only fetched if user is staff/admin. user name is clickable only if userId is fetched.
for role requester profiles, if fail to fetch, the name will be unclickable. (that should never happen? should an error be flagged if this happens? right now, the name will just be unclickable)
for instance role display, if instance role cannot be fetched, the display will be '-' instead.

@LWS49 LWS49 force-pushed the lws49/add-link-to-student-name-in-profile branch from bda2b64 to 62ae360 Compare May 12, 2026 06:37
Comment thread app/views/course/users/_user_list_data.json.jbuilder Outdated
def other_instances
tenant = current_tenant
ActsAsTenant.without_tenant { Instance.containing_user(@user) - [tenant] }
ActsAsTenant.without_tenant do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to combine this with the one on line 12 to fetch all the instance_users tied to this user in one query.

@LWS49 LWS49 force-pushed the lws49/add-link-to-student-name-in-profile branch from 62ae360 to 418d137 Compare May 12, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants