CoachLens is a Google Apps Script dashboard for academic coaching and student-support review. It brings together LMS-style course data, grade trends, assignment status, and risk signals so a coach can quickly understand where a student may need help.
This public-safe edition keeps the Apps Script architecture and UI behavior while replacing private school, course, student, spreadsheet, and deployment details with placeholders and mock data.
CoachLens is designed for a support team that needs quick, reliable context before coaching a student. Instead of jumping between spreadsheets, LMS pages, gradebooks, and manually written notes, the dashboard gathers the most important signals into one HtmlService web app.
The app supports individual student lookup, course summaries, assignment audits, grade history, and a broader watch list built from scheduled risk snapshots.
- Student lookup by internal ID with normalization helpers.
- Active-course cards with course name resolution, current grade display, grade color coding, and coaching-course detection.
- Quick links back to the relevant LMS gradebook context.
- Caching around repeated student, term, course, and assignment lookups to reduce duplicate API calls.
- Date-range audit for active courses.
- Assignment classification for on-time, late, upcoming, and missing work.
- Handling for assignments, submissions, missing-assignment API data, effective due dates, overrides, and incomplete submission fetches.
- UI summaries that help a coach see both the counts and the individual assignments behind the counts.
- Daily grade snapshot workflow that writes historical grade data to a Drive JSON file.
- Grade history view with weekly, daily, and custom date grouping.
- Course-name repair and enrichment helpers for historical records.
- Grade formatting utilities that convert raw scores into readable percentage and letter-grade displays.
- Risk snapshot job that processes students in batches instead of trying to do everything in one execution window.
- Continuation triggers through
ScriptAppfor quota-aware long-running work. - Risk scoring that considers low grades, missing work, grade drops, and courses at risk.
- Watch list table with filters, sorting, trend labels, percentile-aware risk levels, and click-through student lookup.
- Apps Script user-based access checks through
Session.getActiveUser(). - Spreadsheet-backed coach access policy with cache invalidation helpers.
- Separate watch-list access checks for more sensitive views.
- Access-denied HtmlService output for users who are not authorized.
| Area | Implementation |
|---|---|
| Runtime | Google Apps Script V8 |
| UI | HtmlService, HTML, CSS, browser-side JavaScript |
| Client/server bridge | google.script.run with success and failure handlers |
| Workspace APIs | SpreadsheetApp, DriveApp, CacheService, PropertiesService, ScriptApp, Session |
| External data pattern | Canvas/LMS-style library wrapper with REST and GraphQL helper support |
| Project shape | clasp-style source files plus appsscript.json |
WebAppEntry.jsserves the dashboard throughHtmlService.index.htmlcontains the main UI, tab behavior, dashboard rendering, audit rendering, grade-history rendering, and local mock adapter.StudentContext.jsresolves the student, current term, enrollments, and lookup-sheet context.CanvasFetch.jscentralizes LMS fetch helpers, caching, submission classification, and assignment normalization.AssignmentAuditService.jsbuilds the per-course audit response consumed by the UI.DailyGradeSnapshot.js,GradeHistoryService.js, andRiskSnapshotJob.jssupport long-running historical and risk workflows.AccessControl.jskeeps user access separate from dashboard business logic.Config.example.jsdocuments the placeholder configuration shape.
Use placeholder values until connecting the app to a real environment:
var COACHING_STUDENT_LOOKUP_SPREADSHEET_ID = "REPLACE_WITH_SPREADSHEET_ID";
var FALLBACK_TERM_ID = "REPLACE_WITH_TERM_ID";The Apps Script manifest uses placeholder library IDs:
{
"userSymbol": "CanvasAPILibrary",
"libraryId": "REPLACE_WITH_APPS_SCRIPT_LIBRARY_ID"
}Open index.html directly in a browser. When the page is not running inside Apps Script, it injects a mock google.script.run adapter so the dashboard, watch list, grade history, and assignment audit can be explored with sample data.
Syntax check:
node --check AccessControl.js
node --check AssignmentAuditService.js
node --check Authorization.js
node --check CanvasFetch.js
node --check Config.js
node --check DashboardService.js
node --check DailyGradeSnapshot.js
node --check GradeHistoryService.js
node --check RiskListService.js
node --check RiskSnapshotJob.js
node --check StudentContext.js
node --check WebAppEntry.jsThis repository was rebuilt with fresh Git history. School names, domains, student identifiers, real course examples, spreadsheet IDs, Apps Script library IDs, deployment workflows, generated exports, and local credential files were removed or replaced with placeholders.
No open-source license is included because the original code was created for a job context.
- JavaScript development inside the Google Apps Script platform.
HtmlServiceUI development withgoogle.script.runclient/server calls.- Workspace automation using
SpreadsheetApp,DriveApp,CacheService,PropertiesService,ScriptApp, andSession. - LMS integration patterns, including REST-style fetches, GraphQL-style submission queries, pagination, and caching.
- Quota-aware long-running workflow design with batch processing and continuation triggers.
- Practical support-team tooling: student lookup, assignment audits, grade history, watch lists, access control, and risk scoring.