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

  1. Advisors authenticate through Google OAuth and are routed to DashboardsController#advisor.
  2. Feature flag ENABLE_ROLE_SWITCH lets admins/devs impersonate advisors for QA via shared/_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

  1. Assigning a survey notifies the student immediately (in-app + email when enabled).
  2. Unassigning cleans up orphaned responses via Advisors::SurveysController#unassign.
  3. Feedback edits are versioned; students see updates instantly.
  4. Composite reports (CompositeReportGenerator) compile survey + feedback PDFs for accreditation.

Automation Hooks

  • SurveyNotificationJob targets 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.rb before deploying survey workflow changes.
  • Confirm that reassigning a student updates both the roster view and the student profile page.