Advisor Experience - FaqiangMei/MHA-Survey-Portal GitHub Wiki
Advisor Experience
Objectives
- Give advisors a roster-first view of every student, their latest survey activity, and outstanding tasks.
- Provide lightweight assignment, feedback, and re-assignment tools without context switching.
- Preserve audit trails for survey lifecycle changes, advisor switches, and feedback edits.
Entry Points
- Advisors authenticate through Google OAuth and are routed to
DashboardsController#advisor. - Feature flag
ENABLE_ROLE_SWITCHlets admins/devs impersonate advisors for QA viashared/_role_switcher.html.erb.
Dashboard Overview
| Feature | Description | Implementation |
|---|---|---|
| Advisee Roster | Cards/table summarizing each student’s track, advisor, and completion % (from Reports::DataAggregator). |
dashboards/advisor.html.erb, StudentRecordsController#index |
| Survey Assignment | “Assign” action creates SurveyAssignments, with bulk “assign all” options. |
Advisors::SurveysController#create, SurveyAssignments::AutoAssigner |
| Feedback Capture | Advisors review submitted surveys, rate competencies, and leave comments visible to students. | FeedbacksController, Feedback |
| Notifications | Mirrors scheduled reminders and system updates relevant to the advisor. | NotificationsController, Notification |
| Manage Students | Reassign student ⇄ advisor relationships as cohorts shift. | StudentRecordsController#update |
Workflow Notes
- Assigning a survey notifies the student immediately (in-app + email when enabled).
- Unassigning cleans up orphaned responses via
Advisors::SurveysController#unassign. - Feedback edits are versioned; students see updates instantly.
- Composite reports (
CompositeReportGenerator) compile survey + feedback PDFs for accreditation.
Automation Hooks
SurveyNotificationJobtargets both students and advisors for due dates.- Queue configuration (
config/queue.yml) keeps reminder bursts from blocking feedback operations. - Bulk actions enqueue background jobs once selections exceed thresholds to preserve UI responsiveness.
QA Checklist
- Use seeded advisors/students (
db/seeds.rb) to validate roster filters. - Run
rails test test/controllers/advisors/surveys_controller_test.rbbefore deploying survey workflow changes. - Confirm that reassigning a student updates both the roster view and the student profile page.