feat: make assement overview for SEQTA Engage

This commit is contained in:
2026-05-24 17:28:20 +09:30
parent 4f6916d8b3
commit f0358bec07
9 changed files with 436 additions and 42 deletions
@@ -1,13 +1,4 @@
const ENGAGE_STUDENT_STORAGE_KEY = () =>
`bsplus.engageTimetable.student.${location.origin}`;
/** Engage assessments URLs: /#?page=/assessments/{studentId}/{programme}:{metaclass}:{studentId} */
export function getEngageAssessmentStudentId(): string | null {
const hashMatch = window.location.hash.match(/\/assessments\/(\d+)/);
if (hashMatch?.[1]) return hashMatch[1];
return localStorage.getItem(ENGAGE_STUDENT_STORAGE_KEY());
}
import { getEngageAssessmentStudentId } from "@/seqta/utils/engageAssessmentStudent";
function randomEngagePdfFileName(): string {
const token = Math.random().toString(36).slice(2, 10);
@@ -1,9 +1,9 @@
import { getUserInfo } from "@/seqta/ui/AddBetterSEQTAElements.ts";
import ReactFiber from "@/seqta/utils/ReactFiber.ts";
import { isSeqtaEngageExperience } from "@/seqta/utils/isSeqtaEngage";
import { getEngageAssessmentStudentId } from "@/seqta/utils/engageAssessmentStudent";
import {
getEngageAssessmentReportUrl,
getEngageAssessmentStudentId,
requestEngageAssessmentPdf,
} from "./engage.ts";
import {