fixes and patches n stuff
This commit is contained in:
parent
7c7ae8e051
commit
1af973d001
14 changed files with 571 additions and 268 deletions
|
|
@ -221,11 +221,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
// ----------------------------------------------------
|
||||
// Inline Mistake Review Modal
|
||||
// ----------------------------------------------------
|
||||
function openReviewModal(targetSubjectName = null) {
|
||||
function openReviewModal(targetSubjectName = null, targetType = 'all') {
|
||||
if (!mistakeModal || !currentExamId) return;
|
||||
mistakeModal.classList.remove('hidden');
|
||||
document.body.style.overflow = 'hidden';
|
||||
|
||||
activeTypeFilter = targetType || 'all';
|
||||
modalTypeBtns.forEach(b => {
|
||||
b.classList.toggle('active', b.getAttribute('data-type') === activeTypeFilter);
|
||||
});
|
||||
|
||||
if (!cachedQuestions) {
|
||||
loadExamQuestions(targetSubjectName);
|
||||
} else {
|
||||
|
|
@ -244,7 +249,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
}
|
||||
|
||||
if (btnReviewMistakes) {
|
||||
btnReviewMistakes.addEventListener('click', () => openReviewModal());
|
||||
btnReviewMistakes.addEventListener('click', () => openReviewModal(null, 'all'));
|
||||
}
|
||||
|
||||
if (btnMistakeModalClose) {
|
||||
|
|
@ -256,7 +261,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
btn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
const subjectName = btn.getAttribute('data-subject-name');
|
||||
openReviewModal(subjectName);
|
||||
const tip = btn.getAttribute('data-tip');
|
||||
const targetType = tip === 'B' ? 'empty' : tip === 'Y' ? 'wrong' : 'all';
|
||||
openReviewModal(subjectName, targetType);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue