Skip to documentation

Content Creation Reference Tables

Last Updated: 2026-10-09 | For: Teachers & Content Creators | Level: Intermediate to Advanced

This page is the field-level lookup companion to Quick Start: Content Creation.


Table of Contents

  1. Overview
  2. TDF File Structure
  3. Related Guides

Overview

This page is a reference-only guide for field names and behavior. For first-lesson walkthroughs and minimal starter examples, use Quick Start: Content Creation.

To set up content for students, yourself, or someone else, you must create 2 files:

  1. Tutor Definition File (TDF) - Controls lesson behavior and structure
  2. Stimulus File - Contains the actual questions and answers

Type/serialization note: many deployments store config values as JSON strings (for example "true" and "30000"). Follow existing package conventions in your environment.


Tutor Definition File (TDF)

The current TDF authoring structure is rooted at tutor. The required lesson metadata lives in tutor.setspec; lesson and unit delivery behavior lives in deliverySettings.

setspec

All TDFs contain a setspec object that applies to all units.

Canonical setspec fields

These names align with mofacts/client/lib/tooltipContent.ts and Audio & Speech Settings.

Field Type / Format Default Notes
name string n/a Short internal identifier.
lessonname string n/a Full display name.
userselect "true" | "false" "false" Show lesson on dashboard when "true".
stimulusfile string filename n/a Must match uploaded stimulus filename.
lfparameter number/string 0..1 1 String-match threshold for open responses.
hintsEnabled "true" | "false" "true" Enables upload-time hint generation.
tags string array n/a Search/filter labels.
prolificCompletionUrl optional HTTPS URL No default. Prolific first-session completion destination; ordinary participation is unaffected.
experimentTarget string path n/a Direct experiment path segment. For Prolific automatic sign-in, use the Prolific study ID.
shuffleclusters range string n/a Shuffle within ranges (for example 0-3 4-7).
swapclusters range string n/a Shuffle order of non-overlapping ranges.
randomizedDelivery integer/string n/a Number of retention-interval conditions.
prestimulusDisplay string n/a Intertrial prompt text.
progressReporterParams array[6] [0.7,30,60,30,90,60] Progress-report tuning values.
disableProgressReport "true" | "false" "false" Hides progress report when "true".
loadbalancing "min" | "max" | "not-max" n/a Assigns a new participant to an experiment condition from the root TDF's condition counts. See Condition load balancing.
countcompletion "beginning" | "end" | integer/string n/a When condition counts increment.
simTimeout integer/string (ms) n/a Simulation-only timing.
simCorrectProb number/string 0..1 n/a Simulation-only correctness probability.

Condition load balancing

Use loadbalancing on a root TDF that lists experiment conditions. It applies only when MoFaCTS assigns a condition to a participant who does not already have one; a returning participant keeps their previously assigned condition.

MoFaCTS tracks one count per condition in the root TDF. That counter increments at the countcompletion milestone: "beginning" increments after assignment, "end" increments when the lesson finishes, and a number increments when the participant reaches that unit. Counts therefore do not necessarily mean completed participants.

  • "min" selects randomly among the condition or conditions with the lowest count. This is the usual choice when you want the most direct balancing. For counts [3, 4, 4], it always assigns the next participant to the condition with count 3.
  • "max" selects randomly among every condition whose count is below the current highest count. It deliberately excludes the condition or conditions tied for the highest count; it does not select the most-filled condition. For counts [3, 4, 5], it selects randomly between the conditions with counts 3 and 4, never the one with 5.

When every condition has the same count, both modes select randomly from all conditions. "max" can make several lower-count conditions eligible at once, while "min" limits selection to the least-filled condition or tied least-filled conditions.

"not-max" adds a server-owned block allocator with the same eligibility rule as "max": conditions below the highest count, or all conditions on an all-equal tie. One shuffled block contains each eligible condition once. The server consumes that block in order, replenishes it after exhaustion, and rebuilds it if the observed maximum count or eligible IDs change. Reordering condition filenames alone does not reset a block; canonical child IDs own its identity.

Block position and participant assignment are saved together in a Mongo transaction. Concurrent launches cannot consume the same slot, and a retry/return uses the participant's saved assignment. For countcompletion: "beginning", the count increment is part of that same transaction. Later count milestones retain their existing timing, so these remain milestone counts, not an additional set of assignment counts. Explicit owner-selected previews do not consume block slots or beginning counts. Replacing/resetting counts clears the block but does not change saved assignments.

Returning participants keep their saved condition assignment. The server-owned block is not authored TDF content. Replacing/resetting counts clears the block without changing existing assignments. Existing min, max, and omitted settings retain their behavior.

Audio/Speech fields in setspec

Use canonical spellings exactly:

  • speechIgnoreOutOfGrammarResponses (not speechIgnoreOutOf GrammarResponses)
  • audioPromptMode
Field Type / Format Default Notes
speechAPIKey string unset Google Speech key; see Audio & Speech Settings.
textToSpeechAPIKey string unset Google TTS key.
audioInputEnabled "true" | "false" "false" Enables SR availability for lesson.
audioInputSensitivity integer/string 20..80 60 in profile defaults Mic threshold.
speechIgnoreOutOfGrammarResponses "true" | "false" "true" Ignore transcripts outside answer set; omitted or blank values use this enabled default.
srfilterclose "true" | "false" "true" Remove phonetically close non-target answers from the recognition grammar when requesting a correct answer.
speechOutOfGrammarFeedback string "Response not in answer set" Message for ignored transcripts.
audioPromptMode "silent" | "question" | "feedback" | "all" "silent" Default generated spoken-audio mode.
audioPromptVoice string "en-US-Standard-A" Question voice ID.
audioPromptFeedbackVoice string "en-US-Standard-A" Feedback voice ID.
audioPromptQuestionSpeakingRate number/string 0.25..4.0 1 Question speed multiplier.
audioPromptFeedbackSpeakingRate number/string 0.25..4.0 1 Feedback speed multiplier.
audioPromptQuestionVolume number/string -6..6 0 Gain (dB) applied to question prompts.
audioPromptFeedbackVolume number/string -6..6 0 Gain (dB) applied to feedback prompts.
audioPromptSpeakingRate number/string 0.25..4.0 1 Legacy shared speaking rate.

Units may override audioInputEnabled and audioPromptMode as top-level unit fields. An omitted unit field inherits the corresponding setspec value; see Audio & Speech Settings.

Media and asset resolution constraints

Rule Requirement
Canonical media references Use canonical references generated by upload/conversion flows.
Legacy filename assumptions Do not rely on non-canonical filename recovery behavior in new content.
Package scope Ensure references resolve within the assigned package/content scope.
Dynamic asset links /dynamic-assets/<assetId> serves bearer-link media only for assets explicitly marked public by upload/export flows.
Runtime behavior on unresolved media Expect fail-fast behavior rather than silent substitution/skips.

Reference TDF snippet

This mirrors current package usage (for example Countries of the World, AllConditions_Fixed) without embedding real keys.

{
  "tutor": {
    "setspec": {
      "name": "countries_top200",
      "lessonname": "Countries of the World",
      "stimulusfile": "Countries_of_the_World_top200_2025.json",
      "userselect": "true",
      "lfparameter": "0.85",
      "shuffleclusters": "0-199",
      "experimentTarget": "flashcardtest",
      "audioInputEnabled": "true",
      "audioPromptMode": "feedback",
      "speechIgnoreOutOfGrammarResponses": "true"
    },
    "deliverySettings": {
      "experimentLoginText": "Participant ID"
    },
    "unit": []
  }
}

Prolific participation

Use the Prolific study ID as setspec.experimentTarget and set root setspec.prolificCompletionUrl to https://app.prolific.com/submissions/complete?cc=ABC123 with the study's completion code. The completion code must be nonempty and alphanumeric. No credentials, custom ports, fragments, other hosts, or extra query parameters are accepted; there is no default.

https://your-mofacts-host/experiment/<STUDY_ID>?PROLIFIC_PID={{%PROLIFIC_PID%}}&STUDY_ID={{%STUDY_ID%}}&SESSION_ID={{%SESSION_ID%}}

Replace <STUDY_ID> with the actual study ID and keep all three placeholders unchanged. The researcher connects their own Prolific account and links the existing study to their own experiment in the Prolific panel. A Prolific launch requires all three identity parameters exactly once, a matching study, valid completion configuration, and a passwordless experiment. Invalid launches show an error; they do not switch to manual login. The same identity triple resumes the existing account, condition, and saved progress. Different studies use separate participation accounts.

Ordinary launches without these parameters retain manual IDs, password-protected entry, authored prompts, and ordinary completion navigation, even when the lesson has Prolific configuration.

The first saved session completes the initial paid Prolific submission: completed work followed by a positive lockout before the next unit, or the end of the assigned experiment. Initial pre-work lockouts do not count. Saved adaptive units and selected conditions determine completion. Later visits use private return links, with bonuses entered explicitly by the researcher. Lockout expiry queues Prolific messages; Prolific owns email notification delivery. See Admin Reference for management and payment safeguards.

Link parameters establish local participation identity but do not verify Prolific eligibility or submission ownership. MoFaCTS saves local completion before requesting the redirect; Prolific owns completion-code actions, approval, and payment. See Prolific's study contract.

unit

A TDF is a sequence of "units" following the setspec. Units have the following fields

Fields Default Explanation
unitname n/a For tracking of data
unitinstructions n/a Displayed with continue button
buttonorder fixed Fixed or random order of the buttons for all trials for this unit (avoids hardcoding in stimuli)
deliverySettings n/a Unified timing, feedback, answer-control, and presentation settings for lesson delivery
buttontrial False Whether the trials are displayed on the button interface if it is a learning session
assessmentsession n/a Set of values describing a fixed schedule/pattern of trials for an assessment unit.
learningsession n/a Set of values describing adaptive selection by a learning model for a learning unit.
videosession n/a Video playback and optional checkpoint questions. See Video Session Settings for all fields, defaults, restrictions, replay behavior, and implementation gaps.
autotutorsession n/a Set of values describing an AutoTutor conversational unit.
buttonOptions n/a If option for buttontrial is true, this is a comma delimited list of possible options
instructionminseconds 0 This is the minimum time the student may may view the instructions (to better ensure reading)
instructionmaxseconds 0 (which implies no maximum) This is the maximum time the student may may view the instructions (to standardize instruction)
turkemailsubject ignored Any JSON value is accepted and preserved; hidden in the editor and has no effect.
turkemail ignored Any JSON value is accepted and preserved; hidden in the editor and has no effect.
turkbonus ignored Any JSON value is accepted and preserved; hidden in the editor and has no effect.
picture n/a image presented with the unit instructions
countcompletion n/a Sets where the participant count iterates at the unit level. Any unit with this tag will increment the participant count for the root TDF. Used at the selected unit milestone when root setspec.countcompletion does not supply the count milestone; supported allocation modes include min, max, and not-max.

Session selectors include learningsession, assessmentsession, videosession, autotutorsession, sparcsession, and gazecalibrationsession. A unit with instruction fields such as unitinstructions or picture and no session object is an instruction-only unit. H5P display configuration is unsupported and is rejected by authoring and package upload.

deliverySettings

deliverySettings is the unified settings object for learner-runtime behavior. It replaces the old split between delivery parameters and UI settings.

Supported scopes:

Scope Use
tutor.deliverySettings Lesson-wide defaults for delivery timing, feedback, prompt presentation, and experiment-login prompt text.
tutor.unit[].deliverySettings Unit-level overrides. A unit may also use an array of delivery settings for condition-specific delivery.
tutor.setspec.unitTemplate[].deliverySettings Defaults for reusable adaptive/video unit templates.

Keep setspec for lesson metadata, audio API keys, language/voice settings, and non-delivery lesson setup. Use deliverySettings for timing, feedback, answer controls, and learner-facing presentation controls.

Language metadata in setspec describes authored content: contentLanguage is its BCP 47 language tag, recommendedUiLocales lists suggested platform locales, and translationStatus is author-declared (author-provided, not-translated, draft, or reviewed). These fields do not request translation or change scoring rules. Keep response-language and TTS settings explicit in audio-enabled lessons; see Audio and Speech Settings.

Delivery Settings Table

Timing, Scheduling, and Answer Controls

Fields Default Explanation
forceCorrection false Requires the learner to type the correct response after feedback before proceeding.
forceSpacing false Requires at least one intervening trial before the adaptive scheduler can repeat the same item.
optimalThreshold 0.9 Target recall probability used by adaptive scheduling.
studyFirst 0 Probability from 0 to 1 that an item's first introduction is a study trial.
purestudy 0 Study-only trial duration in ms.
drill 0 Configured response-countdown duration in ms; 0 means no timeout in the current runtime. This is not necessarily the exported reveal-to-timeout latency; see the runtime/version notes below.
practicetimer blank Practice timing mode; "clock-based" uses practiceseconds.
practiceseconds 0 Elapsed seconds before clock-based practice advances.
displayMinSeconds 0 Minimum elapsed unit seconds before the timed footer's Continue is enabled. For video, this is not watched-video duration and does not gate the separate end-of-video Continue button.
displayMaxSeconds 0 Maximum elapsed unit seconds before automatic advance; 0 disables it. Can advance a video unit before playback/questions finish; pauses and question/feedback time are not subtracted.
reviewstudy 0 Incorrect-review duration in ms.
correctprompt 0 Correct-feedback duration in ms.
skipstudy false Allows study trials to be skipped from the learner interface.
lockoutminutes 0 Minutes a learner must wait before proceeding to the next unit.
readyPromptStringDisplayTime 0 Ready-prompt phase duration in ms.
forceCorrectPrompt blank Message shown during force-correction after an incorrect answer.
forcecorrecttimeout 0 Force-correction phase timeout in ms.
falseAnswerLimit unset Maximum incorrect responses allowed for each button trial.
checkOtherAnswers false Prevents edit-distance matching from accepting a near-match that exactly matches another current answer.
allowPhoneticMatching false Enables Double Metaphone phonetic matching after exact/edit-distance checks fail.
branchingEnabled false Enables semicolon-separated branched answer definitions.
resetStudentPerformance false Resets displayed progress for the unit while preserving historical data.
allowRevisitUnit false Allows instruction screens to expose the current-unit revisit path.

Runtime Timer Contract

The following describes the current source contract. Delivery timers are measured as the learner-visible presentation envelope, not just the static fully visible period.

  • drill, purestudy, reviewstudy, and correctprompt begin when the trial content starts its fade-in.
  • Fade-in and fade-out time are included in the configured duration.
  • Pre-recorded question audio and timeuntilaudio count against the configured response window; authors should choose drill values that leave enough response time when media is present.
  • Generated TTS may extend an expired response/study/feedback timer only until active playback completes. It does not restart a fresh full-duration timer.
  • Typed input activity, voice start, and speech-recognition retry/error activity reset the response timeout for drill/test-style response windows.

Older deployed builds differ: the inspected cardMachine build starts its full response countdown after the question-audio gate finishes, while exported latencies begin at trial reveal. Four seconds of audio plus a ten-second countdown can consequently produce 14-15-second no-input timeout latencies. See Timer Behavior Depends on the Collection Build for the identified build and limitations; do not apply the current contract retroactively to those records.

Configured durations, absolute timestamps, and exported elapsed latencies are distinct quantities. Time is generally response onset, Problem Start Time is reveal, and CF (End Latency) excludes feedback. See Interpreting Trial Timing before using these fields to calculate typing time or between-trial gaps.

Prompt Display and Feedback Presentation

Fields Default Explanation
fontsize 24 Numeric pixel size for stimulus display.
stimuliPosition "top" Prompt position: "top" or "left".
correctLabelText "Correct." Leading label for correct-answer feedback.
incorrectLabelText "Incorrect." Leading label for incorrect-answer and timeout feedback.
correctColor var(--success-color) CSS color for correct-answer feedback.
incorrectColor var(--alert-color) CSS color for incorrect-answer feedback.
displayUserAnswerInFeedback "onIncorrect" Shows the learner answer in feedback: "onIncorrect", "onCorrect", true, or false.
feedbackLayout "stacked" Feedback arrangement: "stacked" or "inline".
displayCorrectAnswerInIncorrectFeedback true Includes the expected answer in incorrect-answer feedback when available.
displayPerformance false Shows the performance/status block.
displayTimeoutBar false Shows timeout progress as a visual bar.
displayTimeoutCountdown false Shows timeout text/countdown.
choiceButtonCols 1 Multiple-choice button column count.
inputPlaceholderText "Type your answer here..." Placeholder text for typed-answer inputs.
continueButtonText "Continue" Text shown on Continue controls.
skipStudyButtonText "Skip" Text shown on the Skip Study button.
caseSensitive false Compares typed answers with case preserved.
accentSensitive false When enabled, preserves accents in ordinary typed-answer matching. Enable when accent differences matter to the lesson; the default removes combining marks in the normalizer's supported range.
displayQuestionNumber false Shows the current question number.
experimentLoginText blank Prompt text shown in experiment-login username fields.
Fields Default Explanation
autostopTranscriptionAttemptLimit 3 Maximum speech-recognition attempts before retry stops for the card.
timeuntilaudio 0 Delay in ms before question audio or prompt TTS.
prestimulusdisplaytime 0 Prestimulus display duration in ms.
studyOnlyFields blank Comma-delimited display fields used on study-only trials.
drillFields blank Comma-delimited display fields used on drill/test trials and review feedback.

Operational validation before assignment

  1. Verify lesson appears under intended class-selection context.
  2. Verify one launch using a real student account.
  3. Verify at least one new export row appears after launch/response.
  4. For condition-root content, verify expected condition labels in exported data.

Deprecated Fields and Migration

Field Status Migration Guidance
useSpellingCorrection Deprecated Do not use in new lessons. Use lfparameter for tolerance and optionally allowPhoneticMatching for pronunciation-style matching.
audioPromptSpeakingRate Legacy shared value Prefer audioPromptQuestionSpeakingRate and audioPromptFeedbackSpeakingRate for explicit per-channel control.
deliveryparams / uiSettings Legacy input names Do not use in new authoring. Use deliverySettings at the supported scopes above.
correctscore, incorrectscore, scoringEnabled, onlyShowSimpleFeedback Removed Do not use in new lessons.
singleLineFeedback Renamed Use feedbackLayout: "inline" for the old true behavior, "stacked" otherwise.
forcecorrectprompt Renamed Use forceCorrectPrompt.

See Also