<%- include('partials/header') %>

<%= t('exams.title') %>

<%= t('exams.subtitle') %> <% if (lastSynced) { %> • <%= t('exams.syncedLabel') %> <%= formatTime(lastSynced) %> <% } %>

<% if (allExams && allExams.length > 0) { %>
<%= t('exams.kpiLatestNet') %> <%= kpis.latestNet.toFixed(2) %> <% if (allExams[0].summary.deltaNet !== undefined) { %> <%= allExams[0].summary.deltaNet >= 0 ? '+' : '' %><%= allExams[0].summary.deltaNet.toFixed(2) %> <%= t('exams.kpiVsPrior') %> <% } else { %> <%= t('exams.kpiBaseline') %> <% } %>
<%= t('exams.kpiBestNet') %> <%= kpis.bestNet.toFixed(2) %> <%= t('exams.kpiAcrossExams', { count: kpis.totalExams }) %>
<%= t('exams.kpiAvgNet') %> <%= kpis.averageNet.toFixed(2) %> <%= t('exams.kpiAvgSub') %>
<%= t('exams.kpiCurrentRank') %> <%= kpis.latestRank ? '#' + kpis.latestRank : '-' %> <% if (kpis.bestRank) { %> <%= t('exams.kpiBestRank', { rank: kpis.bestRank }) %> <% } else { %> <%= t('exams.kpiGeneralStanding') %> <% } %>
<% allExams.forEach(function(exam, index) { %>
<%= exam.summary.examType %> <%= exam.summary.name %>
<%= exam.summary.totalNet.toFixed(2) %> Net <% if (exam.summary.deltaNet !== undefined) { %> <%= exam.summary.deltaNet >= 0 ? '+' : '' %><%= exam.summary.deltaNet.toFixed(2) %> <% } %>
<% if (exam.summary.generalRank) { %>
#<%= exam.summary.generalRank %> <% if (exam.summary.deltaRank !== undefined && exam.summary.deltaRank !== 0) { %> <%= exam.summary.deltaRank > 0 ? '+' : '' %><%= exam.summary.deltaRank %> <% } %>
<% } %>
<% if (exam.summary.rating) { %>
<%= t('rating.' + exam.summary.rating.label) %>
<% } %>
<% }); %>
<% if (selectedExam) { %>
<%= selectedExam.summary.examType %>

<%= selectedExam.summary.name %>

<% if (selectedExam.hasAnswerKey && selectedExam.answerKeyUrl) { %> <%= t('exams.answerKey') %> <% } %>
<% if (selectedExam.summary.generalRank) { %> <%= t('exams.generalRankLabel') %> <%= selectedExam.summary.generalRank %> <% if (selectedExam.summary.deltaRank !== undefined && selectedExam.summary.deltaRank !== 0) { %> (<%= selectedExam.summary.deltaRank > 0 ? '+' : '' %><%= selectedExam.summary.deltaRank %> <%= t('exams.rankDeltaUnit') %>) <% } %> <% } %> <% if (selectedExam.summary.schoolRank) { %> <%= t('exams.schoolRankLabel') %> <%= selectedExam.summary.schoolRank %> <% } %> <% if (selectedExam.summary.rating) { %> <%= t('rating.' + selectedExam.summary.rating.label) %> <% } %>
<% selectedExam.subjects.forEach(function(sub) { %> <% }); %>
<%= t('exams.colSubject') %> <%= t('exams.colQuestions') %> <%= t('exams.colCorrect') %> <%= t('exams.colWrong') %> <%= t('exams.colEmpty') %> <%= t('exams.colNet') %> <%= t('exams.colDeltaNet') %> <%= t('exams.colSuccessRate') %>
<%= sub.subjectName %> <%= sub.questionCount %> <%= sub.correctCount %> <% if (sub.wrongCount > 0) { %> <% } else { %> 0 <% } %> <% if (sub.emptyCount > 0) { %> <% } else { %> 0 <% } %> <%= sub.net.toFixed(2) %> <% if (sub.deltaNet !== undefined) { %> <%= sub.deltaNet >= 0 ? '+' : '' %><%= sub.deltaNet.toFixed(2) %> <% } else { %> - <% } %>
<%= sub.percentage %>%
<%= t('exams.rowTotal') %> <%= selectedExam.summary.totalQuestions %> <%= selectedExam.summary.totalCorrect %> <%= selectedExam.summary.totalWrong %> <%= selectedExam.summary.totalEmpty %> <%= selectedExam.summary.totalNet.toFixed(2) %> <% if (selectedExam.summary.deltaNet !== undefined) { %> <%= selectedExam.summary.deltaNet >= 0 ? '+' : '' %><%= selectedExam.summary.deltaNet.toFixed(2) %> <% } else { %> - <% } %>
<% const totalPct = selectedExam.summary.totalQuestions > 0 ? Math.round((selectedExam.summary.totalCorrect / selectedExam.summary.totalQuestions) * 100) : 0; %>
<%= totalPct %>%
<% } %> <% } else { %>
📊

<%= t('exams.emptyTitle') %>

<%= t('exams.emptyDesc') %>

<% } %>
<%- include('partials/footer') %>