diff --git a/js/main.js b/js/main.js index 92d24b4..b6c8423 100644 --- a/js/main.js +++ b/js/main.js @@ -104,6 +104,8 @@ let global_cid = null; let global_passcode = null; let global_uid = null; let global_username = null; +// Map of eid -> friendly exam name (populated when exam list is loaded) +let examNameMap = {}; /** * Render candidate details in the options panel if both CID and passcode are present. @@ -446,6 +448,11 @@ async function loadExamList(data) { const eid = exam["eid"]; const exam_json_id = exam["exam_json_id"]; + // Store friendly name for overlay display + try { + examNameMap[eid] = name; + } catch (e) {} + let question_json_id_hash = {}; // In the case of multiquestion exams (longs) we @@ -2964,8 +2971,8 @@ $("#btn-view-local-answers").click(async function(evt) { $("body").append( `