π― Exam Simulator for Anki
This is a simple Exam Simulator add-on made by a cramming medical student. It allows you to run closed-book mock exams using advanced multiple-choice card templates (featuring cryptographic shuffling and interactive JavaScript click-handlers) without affecting your real spaced-repetition review statistics or intervals. Code for the note I used is attached below.
β¨ Key Features
Tag-Based Quotas: Select specific tags from your collection and assign random question quotas to build custom mock exams instantly and simulate the exams effectively.
Closed-Book Simulation Window: Answer questions in a distraction-free window, navigate freely using the top numbered question grid, and grade your exam at the end.
Full Template Compatibility: Fully supports custom HTML/CSS and JavaScript card templates (e.g., ChoiceA-E fields, cryptographic shufflers, and night mode).
Detailed Review: Automatically displays pass/fail status (60% threshold), score percentages, user choices vs. correct answers, and full explanations for every question, if they included in the decks. Also supports shuffling option note types.
Exam History Tracking: Locally saves your past exam sessions so you can consult historical scores or review past explanations anytime.
π» Requirements
Anki Desktop only (Windows, macOS, Linux). This add-on relies on desktop user interface components and custom web views, so it is not compatible with mobile versions like AnkiDroid or AnkiMobile.
π Quick Start Guide (after installation)
- Open Anki Desktop and go to Tools > Exam Simulator.
- Select your tags and assign random question quotas.
- Choose whether to run the Closed-Book Simulation Window or generate a Filtered Deck.
- Complete your exam, view your detailed score breakdown, and check your history anytime via the manager!
I hope this add-on helps you preparing your exams and I wish you all the best.
MULTIPLE CHOICE INTERACTIVE NOTE WITH ROTATING OPTIONS CODE:
FRONT:
{{Front}}
{{#ChoiceA}}{{ChoiceA}}{{/ChoiceA}}
{{#ChoiceB}}{{ChoiceB}}{{/ChoiceB}}
{{#ChoiceC}}{{ChoiceC}}{{/ChoiceC}}
{{#ChoiceD}}{{ChoiceD}}{{/ChoiceD}}
{{#ChoiceE}}{{ChoiceE}}{{/ChoiceE}}
BACK:
{{Front}}
{{#ChoiceA}}
{{ChoiceA}}
{{/ChoiceA}}
{{#ChoiceB}}
{{ChoiceB}}
{{/ChoiceB}}
{{#ChoiceC}}
{{ChoiceC}}
{{/ChoiceC}}
{{#ChoiceD}}
{{ChoiceD}}
{{/ChoiceD}}
{{#ChoiceE}}
{{ChoiceE}}
{{/ChoiceE}}
{{#Explanation}}
π‘ Explanation:
{{Explanation}}
{{/Explanation}}
{{CorrectAnswer}}
STYLE:
.card {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
font-size: 16px;
background-color: #f8f9fa;
color: #202124;
display: flex;
justify-content: center;
padding: 24px 16px;
}
.nightMode .card {
background-color: #1a1a1b;
color: #d7dadc;
}
.card-container {
max-width: 680px;
width: 100%;
}
.question {
font-size: 1.15rem;
font-weight: 600;
margin-bottom: 20px;
line-height: 1.45;
border-bottom: 2px solid #e0e0e0;
padding-bottom: 12px;
}
.nightMode .question {
border-bottom-color: #3e4042;
}
.choices {
display: flex;
flex-direction: column;
gap: 10px;
}
.choice-btn {
display: flex;
align-items: center;
text-align: left;
width: 100%;
padding: 12px 16px;
border-radius: 8px;
border: 1.5px solid #dadce0;
background: #ffffff;
font-size: 15px;
cursor: pointer;
outline: none;
transition: all 0.15s ease;
color: inherit;
box-sizing: border-box;
}
.nightMode .choice-btn {
background: #272729;
border-color: #3e4042;
}
.choice-btn:hover {
border-color: #1a73e8;
background-color: #f1f3f4;
}
.nightMode .choice-btn:hover {
background-color: #32353b;
}
.choice-letter {
display: inline-flex;
justify-content: center;
align-items: center;
width: 26px;
height: 26px;
background: #e8f0fe;
color: #1a73e8;
border-radius: 50%;
font-weight: 700;
margin-right: 12px;
flex-shrink: 0;
}
.nightMode .choice-letter {
background: #173153;
color: #8ab4f8;
}
.status-icon {
margin-left: auto;
font-size: 16px;
padding-left: 8px;
}
/* Static result view on back */
.choice-result {
cursor: default !important;
}
/* Incorrect choice (Red) */
.choice-result.is-wrong {
border-color: #d93025 !important;
background-color: #fce8e6 !important;
color: #c5221f !important;
}
.nightMode .choice-result.is-wrong {
background-color: #442726 !important;
border-color: #ea4335 !important;
color: #f28b82 !important;
}
/* Correct choice (Green) */
.choice-result.is-correct {
border-color: #1e8e3e !important;
background-color: #e6f4ea !important;
color: #137333 !important;
font-weight: 600;
}
.nightMode .choice-result.is-correct {
background-color: #133924 !important;
border-color: #34a853 !important;
color: #81c995 !important;
}
/* Result Banner */
.result-banner {
margin-top: 16px;
padding: 10px 14px;
border-radius: 8px;
font-weight: 600;
font-size: 14px;
text-align: center;
}
.result-banner.success {
background-color: #e6f4ea;
color: #137333;
border: 1px solid #34a853;
}
.nightMode .result-banner.success {
background-color: #133924;
color: #81c995;
border-color: #34a853;
}
.result-banner.error {
background-color: #fce8e6;
color: #c5221f;
border: 1px solid #ea4335;
}
.nightMode .result-banner.error {
background-color: #442726;
color: #f28b82;
border-color: #ea4335;
}
.result-banner.info {
background-color: #e8f0fe;
color: #1a73e8;
border: 1px solid #8ab4f8;
}
.nightMode .result-banner.info {
background-color: #173153;
color: #8ab4f8;
border-color: #4285f4;
}
/* Explanation Box */
.explanation-box {
margin-top: 20px;
padding: 16px;
border-radius: 8px;
background-color: #fef7e0;
border-left: 5px solid #f9ab00;
line-height: 1.5;
}
.nightMode .explanation-box {
background-color: #332b00;
border-left-color: #fdd663;
}
.explanation-title {
font-weight: bold;
color: #b06000;
margin-bottom: 6px;
}
.nightMode .explanation-title {
color: #fdd663;
}
Created by Marco Zavagnin | Powered by Gemini AI (2026)