Skip to content

Improve school dashboard by adding roles and school code#873

Open
zetter-rpf wants to merge 2 commits into
mainfrom
improve-school-dashboard
Open

Improve school dashboard by adding roles and school code#873
zetter-rpf wants to merge 2 commits into
mainfrom
improve-school-dashboard

Conversation

@zetter-rpf

@zetter-rpf zetter-rpf commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What's changed?

  • Added a list of owner and teacher roles to the school dashboard
  • Added the school join code

This is to help us resolve common support queries without needing an engineer.

Screenshot 2026-06-15 at 14 35 14

@cla-bot cla-bot Bot added the cla-signed label Jun 15, 2026
@zetter-rpf zetter-rpf force-pushed the improve-school-dashboard branch from d6de791 to be3c457 Compare June 15, 2026 11:45
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Test coverage

91.6% line coverage reported by SimpleCov.
Run: https://github.com/RaspberryPiFoundation/editor-api/actions/runs/27550846043

@zetter-rpf zetter-rpf force-pushed the improve-school-dashboard branch from be3c457 to 7fbdca2 Compare June 15, 2026 13:34
@zetter-rpf zetter-rpf temporarily deployed to editor-api-p-improve-sc-xe6vwz June 15, 2026 13:34 Inactive
@zetter-rpf zetter-rpf marked this pull request as ready for review June 15, 2026 13:37
Copilot AI review requested due to automatic review settings June 15, 2026 13:37

Copilot AI left a comment

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.

Pull request overview

This PR enhances the Administrate school dashboard to better support non-engineering support workflows by surfacing the school join code and showing key school roles (owner/teacher) with user details.

Changes:

  • Added code (join code) to the School dashboard index and show pages.
  • Added a custom SchoolRolesField + show partial to display owner/teacher roles in a table on the School show page.
  • Added a request spec covering role display (owner/teacher) and excluding student roles.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
spec/features/admin/schools_spec.rb Adds request specs for the admin school show page to validate displayed roles.
app/views/fields/school_roles_field/_show.html.erb New Administrate field partial that renders a roles table (role/user/created).
app/fields/school_roles_field.rb New custom Administrate field defining displayed roles and rendering helpers.
app/dashboards/school_dashboard.rb Surfaces code and roles in Administrate School index/show attributes.
app/controllers/admin/schools_controller.rb Adds a helper to batch-fetch user info for roles and expose it to the field partial.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/controllers/admin/schools_controller.rb
Comment thread app/fields/school_roles_field.rb Outdated
Comment thread app/views/fields/school_roles_field/_show.html.erb
Comment thread spec/features/admin/schools_spec.rb
Make it easier to see who is a student and teacher for user support
We sometimes refer to schools by there code or want to send the code to teachers for students to use
@zetter-rpf zetter-rpf force-pushed the improve-school-dashboard branch from 7fbdca2 to 0648730 Compare June 15, 2026 13:48
@zetter-rpf zetter-rpf changed the title Improve school dashboard Improve school dashboard by adding roles and school code Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants