Why does Moodle reject pasted Aiken quiz files on upload?
Moodle’s native Aiken importer enforces strict single-line rules: every prompt must sit on one unwrapped line without leading numbers, options must use uppercase A. or A), and keys must read uppercase ANSWER: plus a space. One mid-question blank line, lowercase Answer: b, or smart quote halts the upload.
Converting Aiken to Moodle XML avoids those fragile plain-text parser failures by serializing questions into a structured <quiz> document governed by the W3C Extensible Markup Language (XML) 1.0 specification. Each stem and answer choice is wrapped in UTF-8 HTML CDATA sections with explicit <answer fraction="100"> scoring tags.
If your Moodle courses also rely on partial-credit weights, numerical tolerances, or matching pairs, you can switch directly to the Moodle GIFT syntax validator and converter. Comparing common Word copy-paste habits against strict Aiken requirements shows why automated normalization saves hours of manual text editing.
| Common Word or Docs habit | Strict Moodle Aiken upload result | Clean Aiken syntax & Moodle XML behavior |
|---|---|---|
Leading numbers (1. What is...) |
Imported literally as part of stem text | Strips 1., 1), or Q1. prefixes cleanly |
| Wrapped multi-line question stem | Fails import because line 2 lacks A. |
Joins wrapped stem lines into one single line |
Lowercase choices (a. Pavlov) |
Rejected with invalid choice prefix error | Normalizes a) through j. into A. to J. |
Mixed-case keys (Answer: B, Ans: C) |
Rejected unless exact uppercase ANSWER: B |
Rewrites Answer:, Ans:, or Correct= to ANSWER: X |
| Mid-question blank lines | Terminates item early and drops choices | Collapses stray whitespace and flags broken blocks |
Curly quotes and em dashes (“ ”) |
Garbles text if saved outside strict UTF-8 | Folds smart punctuation to ASCII and writes UTF-8 XML |
Cleaning Word drafts and lowercase answer keys for Aiken
Faculty test banks usually originate in numbered Microsoft Word handouts or shared Google Docs where auto-numbering and line wrapping are turned on by default. Pasting that text straight into Notepad produces hidden formatting defects that break Moodle’s strict Aiken .txt importer.
How the Clean Aiken syntax button repairs formatting
Keeping Auto-repair Word numbering & lowercase Answer lines checked cleans your input automatically during live parsing, while clicking Clean Aiken syntax rewrites the visible text inside the editor so you can inspect or copy the repaired strict Aiken source. Leading byte-order marks (U+FEFF), Windows CRLF line endings, curly quotes, and en or em dashes are normalized immediately.
Option prefixes from A through J using either periods or parentheses standardize to A. format, and loose answer trailers such as Answer: b, ANS - B, or Correct answer: B become ANSWER: B. If you do want a clean plain-text file rather than XML, selecting Strict Aiken (.txt) under Output format exports <stem>-aiken.txt with exact single-blank-line item separators.
Opening Word .docx exams under ECMA-376 paragraph rules
Instead of copying and pasting from Word, you can open a .docx file directly through the drop zone. The local reader parses word/document.xml paragraphs and tables defined by the ECMA-376 Office Open XML WordprocessingML standard, preserving list markers and detecting choices whose text runs are bolded or highlighted so they become marked answers automatically.
Departments migrating courses away from Moodle can also package plain-text quizzes into Canvas QTI ZIP archives from the exact same cleaned question bank without reformatting a single choice line. Every input format (auto, aiken, text, gift, moodle-xml, qti, csv, and quizlet) feeds one unified question model.
Organizing Moodle question bank categories and XML tags
Uploading a plain Aiken .txt file dumps every question into whatever default folder happens to be selected on Moodle’s import screen. Exporting Moodle XML (.xml) embeds category routing and quiz behavior directly inside the file.
Routing items into custom $course$/top/ bank categories
When Moodle XML (.xml) is selected under Output format, the Moodle bank category field appears with Imported Questions prefilled. Entering a nested path such as Psychology/Midterm 1 emits a leading <question type="category"> element targeting $course$/top/Psychology/Midterm 1, which instructs Moodle to create missing parent and child Question Bank folders automatically on upload.
Each multiple-choice item exports as <question type="multichoice"> with <defaultgrade>1</defaultgrade>, <single>true</single>, <shuffleanswers>true</shuffleanswers>, and <answernumbering>abc</answernumbering>. Question titles default to Q01 plus the first 48 characters of the prompt so instructors can scan item lists inside Moodle’s Question Bank table without seeing identical generic names.
Mixing Aiken choices with True/False and short-answer items
Strict Aiken cannot represent True/False <question type="truefalse"> tags, short-answer <usecase>0</usecase> blocks, numerical tolerances, or open-response essays (10 response lines). Converting via Moodle XML lets you append True/False, numerical, or short-answer questions to an Aiken draft and import the entire set in one .xml upload, while companion handouts let students prepare structured Cornell lecture hand-outs offline for unit review.
Tip: Click Load sample to open
intro-psychology-aiken.txt, which intentionally mixes1.leading numbers,a.lowercase options, andAnswer: Bmixed-case keys so you can watch Clean Aiken syntax and Export Moodle XML repair them live.
Line-by-line Aiken validation and local assessment privacy
Silent import failures are worse than outright errors because a single missing ANSWER: line can merge two questions together in a 100-item final exam. Live validation verifies structural counts before you touch your LMS.
Catching orphan answer letters and mid-block blank lines
Below the editor, the validator reports exact line numbers whenever a block ends with a blank line prior to ANSWER: X or contains fewer than 2 choices (A. and B.). If a question specifies ANSWER: E when only choices A, B, C, D exist, an explicit error flags that line so no ungradable item enters your Moodle bank.
When exporting back to Strict Aiken (.txt) from a mixed source file, any non-single-choice questions are skipped cleanly and summarized in a completion banner rather than corrupting the .txt output. Switching Input syntax from Auto-detect to Aiken enforces strict Aiken linting even on short two-question snippets.
Protecting institutional exams within 25 MB browser memory
While U.S. Department of Education FERPA guidance governs student education records, departments apply equally strict confidentiality to unreleased finals and exam passages. Validating files up to 25 MB (25,000,000 bytes) 100% locally in a Web Worker transmits 0 bytes externally, and you can verify source citations in assessment reading passages on your device.