API: Quiz questions endpoints¶
/question¶
GET /question¶
Check existing question.
[] Input:
- [!] string id: external unique question identifier
[] Output:
- string id: external unique question identifier
- string code: question identification string
- boolean active: question is active
POST /question¶
Publish or update a question. Check documentation or online editor for more information on additional fields.
[] Input:
-
[!] string id: external unique question identifier1
ID best practices
Unique identifier for question management.
On repeated uploads, the questions are updated (rather then added) based on this value, which can be an arbitrary text.
If the question already exists at upload time with the same external identifier (in the given folder or Quiz set), the existing question will be updated instead of being added as a new one.
- Use cases:
- Integration with external systems
- Version control
- Batch updates
- Content synchronization
-
Best practices:
- Use consistent naming conventions
- Include version, source or date information
- Consider hierarchical IDs for related content
-
Example:
First, we upload a question and then second, we update it to have a different question text and add a solution.
# First upload - creates question curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=MATHEMATICS_ARITHMETIC_BASIC_ADDITION_STATIC' \ --data 'type=numerical' \ --data 'question=What is 2+2?' \ --data 'answer=4' # Later upload - updates existing question text and adds solution curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=MATHEMATICS_ARITHMETIC_BASIC_ADDITION_STATIC' \ --data 'type=numerical' \ --data 'question=What is 2+2? Show your work.' \ --data 'solution=2+2 is 4.' \ --data 'answer=4'
- Use cases:
-
[!] string type: type of the question
- generic, text, numerical, date/time, expression, choice, multiple-choice, order, matrix:generic, matrix, matrix:expression, set, set:text, true/false, free-text, file, reading
Question type reference guide
EduBase supports various question types to accommodate different assessment needs. Each type has specific features and configurations.
Basic Types
-
GENERIC: Strict matching without formatting
- Requires exact match including spaces and punctuation (e.g., period(
.
), comma(,
), semicolon(;
)) - Best for technical answers where precision matters
- Example: Programming language keywords, chemical formulas
- Requires exact match including spaces and punctuation (e.g., period(
-
TEXT: Basic text input with flexible matching
- Ignores spaces and punctuation (e.g.,
apple.
is considered the same asapple
) - Perfect for definitions or completing sentences
- Example: Fill-in-the-blank questions, vocabulary tests
- Ignores spaces and punctuation (e.g.,
-
FREE-TEXT: Extended text response with semi-automatic grading
- Supports longer responses
- Can use automatic rules with keywords
- Manual grading support for complex answers (e.g., a moderator is required to score if the system cannot evaluate the answer)
- Example: Short essays, explanations, longer definitions
-
READING: Non-assessed text display
- Displays text for subsequent questions compactly
- No scoring involved
- Used as first question in complex question groups
- No answer is required
- Example: Reading comprehension passages
Choice-Based Types
-
CHOICE: Single correct answer selection
- Randomized option order by default
- Can use dynamic options from question group
- Supports parameterization for all options and the answer
- Example: Single choice questions
-
MULTIPLE-CHOICE: Multiple correct answers
- Similar to
CHOICE
but allows multiple answers - Can limit maximum selections
- Example: "Select all that apply" questions
- Similar to
-
ORDER: Sequence arrangement
- Displays items in random order, which are taken from the
ANSWER
field - Test takers must arrange in correct sequence, as specified in the answer
- Example: Chronological ordering, process steps
- Displays items in random order, which are taken from the
-
TRUE/FALSE: Statement evaluation
- True statements in
ANSWER
field - False statements in
OPTIONS
- Statements will appear in random order
- Optionally specify a third option
- Example: Fact verification questions
- True statements in
Numerical Types
- NUMERIC: Numerical value validation
- Handles integers and decimals
- Supports fractions (a/b) and mathematical constants (pi, e)
- Interval responses possible, {from}-{to}
- Automatic subpoints if part is correct
- Usual mathematical notations are supported for open and closed intervals
- [a;b] / ]a;b[ / (a;b) / ...
- See
NUMERICAL_RANGE
for interval answer support
- Configurable precision (default: 2)
- Separate decimals with period (
.
) - See
DECIMALS
for precision settings - See
TOLERANCE
for acceptable error ranges
- Separate decimals with period (
- Example: Mathematical calculations
Advanced Types
-
DATE/TIME: Calendar date validation
- Adjustable precision (year/month/day)
- Recommended format: YYYY, MM/YYYY, and MM/DD/YYYY respectively
- See
DATETIME_PRECISION
for date format control
- Multiple input formats accepted
- Describe months in text, even abbreviated (e.g., mar, March)
- Spaces, punctionations, marks, slahes do not matter
- E.g., 12/26/2015, 1226/2015, 12.26.2015 are all acceptable
- Only using numbers (e.g., 12262015)
- BC/AD ("negative dates") supported
- Range responses supported, {from}-{to}
- Automatic subpoints if part is correct
- Certain parts of the date may be omitted in the final date
- year precision: 2000-15, interpreted as 2000 - 2015
- day precision: 24/12/2015-26, interpreted as 24/12/2015 - 26/12/2015
- See
DATETIME_RANGE
for interval answers
- Example: Historical dates, timeline questions
- Adjustable precision (year/month/day)
-
EXPRESSION: Mathematical expression evaluation
- Evaluates and compares mathematical formulas
- Parametrization is supported
- Supports various mathematical functions
- See "Expression evaluation options > Supported mathematical functions" in this document
- Configurable precision and validation methods
- See
EXPRESSION_CHECK
for validation options - See
EXPRESSION_DECIMALS
for precision control - See
EXPRESSION_FUNCTIONS
to control available functions
- See
- Example: Algebraic expressions, physics formulas
-
MATRIX: Matrix evaluation
- Evaluates matrices and vectors with numerical validation similar to
NUMERIC
type - Input format specification:
- Square brackets
[...]
denote matrix boundaries - Semicolons (
;
) separate elements within rows - Vertical bars (
|
) separate rows
- Square brackets
- Supported structure:
- Matrices:
[a11; a12 | a21; a22]
represents a 2×2 matrix - Row vectors:
[x1; x2; x3]
represents a 1×3 vector - Column vectors:
[x1 | x2]
represents a 2×1 vector
- Matrices:
- Example: Linear algebra problems, vector calculus, coordinate transformations
- Evaluates matrices and vectors with numerical validation similar to
-
MATRIX:EXPRESSION: Expression-based matrix
- Combines
MATRIX
andEXPRESSION
features - Each matrix element can be an expression
- Example: Matrix transformations (e.g., rotation), Jacobian or Hessian matrices, state transition matrices, tensors
- Combines
-
SET: Unordered collection validation
- Operates similarly to numeric
MATRIX
- Order and repetition don't matter
- Numeric elements only
- Example: Number theory problems
- Operates similarly to numeric
-
SET:TEXT: Text-based set validation
- Similar to
SET
but with text elements - Example: Listing properties, characteristics
- Similar to
-
FILE: File submission evaluation
- Supports file uploads
- Semi-automatic grading similarly to
FREE-TEXT
- Configurable file types and counts
- Not available to all users!
- Example: Programming assignments, document submissions
-
[!] string question: question text
Question formatting guide
The question field supports rich formatting options to create engaging and clear questions. Here's a comprehensive guide to the available formatting features.
Text Styling
-
LaTeX Support
- Inline:
$$...$$
- Block:
$$$$...$$$$
- Requires
QUESTION_FORMAT=LATEX
- Note: LaTeX blocks start on new line, but are not center aligned
- Example:
Calculate $$\sqrt{x^2 + y^2}$$
- Inline:
-
Parameters
- Use curly braces:
{parameter_name}
- Use triple-wave operator (
~~~
) for quick expressions with simpler operations - Parameters defined in
PARAMETERS
field - Examples:
Calculate {a} + {b}
Consider a circle with an area of ~~~{r}*{r}*pi~~~
- Use curly braces:
-
EduTags for Basic Formatting
- Bold:
[[B]]...[[/B]]
- Italic:
[[I]]...[[/I]]
- Underline:
[[U]]...[[/U]]
- Subscript:
[[SUB]]...[[/SUB]]
- Superscript:
[[SUP]]...[[/SUP]]
- Bold:
-
Code Formatting
- Inline:
[[CODE]]...[[/CODE]]
- Block:
[[CODEBLOCK]]...[[/CODEBLOCK]]
- Optional line numbers:
[[LINES]]...[[/LINES]]
- Inline:
-
Color and Background
- Text color:
[[COLOR:{color}]]...[[/COLOR]]
- Background:
[[BACKGROUND:{color}]]...[[/BACKGROUND]]
- Use standard color names or hex codes
- Text color:
Tables and Layout
-
Tables
- Use
[[..]]
format similar toMATRIX
- Columns separated by semicolons
- Rows separated by vertical bars
- Example:
[[Header 1; Header 2 | Data 1; Data 2]]
- Use
-
Answer Fields
- Placeholder with the question itself for answer fields:
[[___]]
(3 underscores) - Used for visual representation
- Does not affect actual answer input
- Example: Fill-in-the-gaps
- Placeholder with the question itself for answer fields:
Media Integration
- Images
- Format:
[[IMAGE:{filename}]]
- File must be provided in images with this exact name (case sensitive)
- Example:
[[IMAGE:diagram.png]]
- Format:
Best Practices
-
Clarity and Readability
- Use consistent formatting
- Break complex questions into parts
- Don't make text overly long or complex as it might hurt readability
- Lot's of features are at your disposal, be creative on how to arrive at the best solution for your use-case
-
Mathematical Content
- Use LaTeX for all scientific, mathematical expressions
- Test rendering on different devices, if possible
-
-
[!] string/list{string} answer: single or multiple answers or true statements
- string answer_order: whether the order of answers matters
- string answer_label: text displayed in/above the input field during the test
- string answer_hide: hide correct answers on results page
- string answer_indefinite: allow any number of input fields to be entered by the user
-
string answer_format: how to display the answer on the results page
Advanced answer options
EduBase provides flexible options for managing how answers are handled, displayed, and validated. Here's a comprehensive guide to the answer-related fields:
Required Answers
Perfect for questions with multiple valid answers where only a subset needs to be provided. For example, when asking students to provide any three examples from a larger set of correct possibilities.
- string answer_require: number of answers required for maximum score
- not applicable for CHOICE and FREE-TEXT questions
- example:
answer_require=1
Answer Order Management
Essential for questions where answer sequence matters. Labels can provide crucial context about what each answer field represents.
- string answer_order: whether the order of answers matters
- plus sign (+) to indicate YES
- blank field or minus sign (-) indicates NO (default)
- example:
answer_order=+
- string answer_label: text displayed in/above the input field during the test
- automatically activates the
answer_order
function - multiple labels separated by triple-and operators (&&&)
- example:
answer_label=Velocity (m/s) &&& Distance traveled (km) &&& Direction (degrees)
- automatically activates the
Answer Display Control
Critical for maintaining question bank integrity in scenarios like practice tests or when questions will be reused. Makes answer sharing harder.
- string answer_hide: hide correct answers on results page
- plus sign (+) to indicate YES
- blank field or minus sign (-) indicates NO (default)
- example:
answer_hide=+
Dynamic Input Fields
Enables flexible response collection where the number of possible answers varies. Ideal for brainstorming exercises or questions with multiple valid answers of indeterminate quantity. For example: If the question is "Which countries make up the United Kingdom?" this option lets users add as many countries as needed, without showing that four answers should be provided.
- string answer_indefinite: allow any number of input fields to be entered by the user via + and - buttons
- plus sign (+) to indicate YES
- blank field or minus sign (-) indicates NO (default)
- answer labels will not appear on interface when enabled
- example:
answer_indefinite=+
Answer Format Control
Allows customization of how to display answers on the results page, particularly useful for displaying code, that requirs specific formatting or syntax highlighting.
- string answer_format: how to display the answer on the results page
- only applicable for FREE-TEXT questions
- format:
type
ortype:value
- values:
normal
: standard text (default)code
: code with syntax highlighting- specify language after colon
- example:
code:python
orcode:javascript
- example:
answer_format=code:sql
Best Practices
-
Combine Options Strategically
- Use
answer_label
when order matters - it impliesanswer_order=+
automatically - Enable
answer_hide
for reusable assessment questions
- Use
-
User Experience Considerations
- Write clear, descriptive labels with units where applicable
- Use labels to guide input format without revealing answers
Creating Pairing Questions
While EduBase doesn't have a dedicated pairing question type, you can effectively create pairing exercises using answer labels. This is particularly useful for matching items between two sets, for example:
- Language translations (e.g., English-Hungarian vocabulary)
- Visual associations (e.g., traffic signs and their meanings)
- Scientific pairs (e.g., chemical formulas and common names)
There are several approaches to implement pairing questions:
-
Direct Labels with Content
Use answer labels that contain one set of items directly:
answer_label=a) dog &&& b) cat
Best for short, simple content where labels remain concise.
-
Indexed Labels with Content in Question
Place one set in the question text and use simple labels for matching:
question=Match the English words with their Hungarian translations: a) dog b) cat Hungarian words: macska, kutya ... answer_label=a) &&& b)
Recommended for longer content or when formatting is important.
-
Image-Based Pairing
When one set consists of images, create a single composite image with labeled elements:
question=Match the traffic signs (A-D) with their meanings. [[IMAGE:traffic_signs_labeled.png]]
This works around the single-image-per-question limitation.
Example API Calls
-
The order matters in this question:
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=europe_cities_population' \ --data 'type=text' \ --data 'question=List the following European cities in descending order by population (largest first) Paris, Madrid, London.' \ --data 'answer=London &&& Madrid &&& Paris' \ --data 'answer_order=+'
-
The order matters, but we didn't have to specify as the labels fix the order
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=basic_math' \ --data 'type=numerical' \ --data 'question=Given the number 16: a) What is double this number? b) What is half of this number? c) What is this number plus 10?' \ --data 'answer=32 &&& 8 &&& 26' \ --data 'answer_label=a) Double &&& b) Half &&& c) Plus 10' \ --data 'points=3'
-
Only one answer is enough from the correct ones, but we don't reveal them
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=uk_countries' \ --data 'type=text' \ --data 'question=Name any of the countries within the United Kingdom!' \ --data 'answer=England &&& Northern Ireland &&& Scotland &&& Wales' \ --data 'answer_require=1' \ --data 'answer_hide=+'
-
Code formatting for SQL query answer:
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=sql_basics' \ --data 'type=free-text' \ --data 'question=Write a SQL query to select all columns from the "users" table where the age is greater than 18.' \ --data 'answer=SELECT * FROM users WHERE age > 18' \ --data 'answer_format=code:sql'
-
Pairing question:
curl -X POST "https://www.edubase.net/api/v1/question" \ --data 'id=hungarian_english_animals' \ --data 'type=text' \ --data 'question=Match the English words with their Hungarian translations: a) dog b) cat Hungarian words: macska, kutya' \ --data 'answer=kutya &&& macska' \ --data 'answer_label=a) &&& b)'
- string answer_require: number of answers required for maximum score
-
string question_format: controls question text rendering
- NORMAL: Default text formatting with standard font size, recommended for most tasks
- LATEX: Enables LaTeX for mathematical, scientific notations (using KaTeX)
- LONG: Smaller font with automatic paragraph breaks (ideal for lengthy text)
- string subject: subject
- string category: category
- string difficulty: difficulty level of the questions
- default: 0 (not classified)
- scale: 1 (very easy) - 5 (very difficult)
- string path: path where question will be stored in personal QuestionBase
- default: /API
- string/list{string} options: incorrect options or false statements
- string options_fix: fix the order of answers and options
-
string options_order: configure custom order of answers and options
Options configuration guide
EduBase provides flexible control over how answers and options are presented to users through various configuration fields.
Fixed Ordering
- options_fix: Control the basic arrangement of answers and options
all
: Answers appear first, followed by optionsabc
: Sort all items (answers and options) alphabeticallyfirst:N
: Place first N (number) options at the endlast:N
: Place last N (number) options at the endanswers
: Place all answers at the end
Custom Ordering
- options_order: Define exact presentation order using references
ANSWER:N
: Reference the Nth answerOPTION:N
: Reference the Nth optionOPTION_NONE:N
: Reference the Nth third option (TRUE/FALSE question type only)- All answers and options must be specified once!
- Example:
OPTION:1 &&& ANSWER:0 &&& OPTION:0 &&& ANSWER:1
Best Practices
- Check that N values don't exceed available items
- Consider cognitive load when ordering items
- Group related options together when meaningful
- Place common or simpler options first, when appropriate
Example API Calls
-
Basic Fixed Order
The answer (Paris) will appear first.
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=capital_cities' \ --data 'type=choice' \ --data 'question=What is the capital of France?' \ --data 'answer=Paris' \ --data 'options=London &&& Berlin &&& Madrid' \ --data 'options_fix=all'
-
Alphabetical Ordering
Use if alphabetical ordering makes the task cognitively easier, as it's easier to scan all items when ordered.
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=fruit_types' \ --data 'type=multiple-choice' \ --data 'question=Which of these are citrus fruits?' \ --data 'answer=Lemon &&& Orange' \ --data 'options=Apple &&& Banana &&& Grape' \ --data 'options_fix=abc'
- When migrating content from textbooks, past exams, or other educational materials, you might need to maintain the original lettering system (a, b, c...) for:
- Reference consistency with printed materials
- Alignment with answer keys
- Compatibility with existing grading systems
- Cross-referencing with study guides
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=vocab_synonyms' \ --data 'type=multiple-choice' \ --data 'question=Select all words that mean "happy":' \ --data 'answer=b) Joyful &&& d) Merry' \ --data 'options=a) Angry &&& c) Sleepy &&& e) Tired' \ --data 'options_fix=abc'
- This approach is particularly valuable when
- Test takers need to refer to both digital and printed materials
- Questions are part of a larger standardized test system
- Educators want to maintain consistency with existing worksheets or textbooks
- Legacy assessment materials are being digitized
- When migrating content from textbooks, past exams, or other educational materials, you might need to maintain the original lettering system (a, b, c...) for:
-
Complex Custom Ordering
Here's an example where specific ordering helps test understanding in a structured way:
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=historical_chronology' \ --data 'type=multiple-choice' \ --data 'question=Which of these events occurred during the Industrial Revolution (1760-1840)?' \ --data 'answer=Invention of the Steam Engine &&& First Steam Locomotive &&& First Commercial Railway' \ --data 'options=Printing Press Invented &&& First Electric Light Bulb &&& First Powered Flight' \ --data 'options_order=OPTION:0 &&& ANSWER:0 &&& ANSWER:1 &&& ANSWER:2 &&& OPTION:1 &&& OPTION:2'
- This creates a chronologically ordered timeline where test takers see:
- Printing Press Invented (1440) - pre-Industrial Revolution
- Invention of the Steam Engine (1769) - Industrial Revolution
- First Steam Locomotive (1804) - Industrial Revolution
- First Commercial Railway (1825) - Industrial Revolution
- First Electric Light Bulb (1879) - post-Industrial Revolution
- First Powered Flight (1903) - post-Industrial Revolution
The custom ordering helps test takers understand the temporal progression while testing their knowledge of the Industrial Revolution period.
- This creates a chronologically ordered timeline where test takers see:
- options_fix: Control the basic arrangement of answers and options
-
string points: maximum points for a fully correct answer
- default: 1 point
- string subscoring: method for calculating partial credit
- string subpoints: define specific point values for each possible answer
- string penalty_scoring: how penalty points should be applied
- string penalty_points: points deducted for completely incorrect answers
- string hint_penalty: point deduction for using hints
- string solution_penalty: point deduction for viewing steps of the solution
- string video_penalty: point deduction for video assistance used
-
string manual_scoring: when to enable manual scoring
Advanced scoring options
EduBase provides a sophisticated scoring system that allows you to implement complex grading logic. Here's a comprehensive guide to the scoring-related fields:
Partial Credit Scoring
Subscoring Methods
- subscoring: Method for calculating partial credit
PROPORTIONAL
: Points awarded proportionally to correct answers (default)LINEAR_SUBSTRACTED:N
: Linear scoring with N points subtracted for each error, where N is arbitraryCUSTOM
: Use custom point distribution defined in subpoints (mandatory field for this option)NONE
: No partial credit, all-or-nothing scoring- NOT applicable for
CHOICE
,READING
andFREE-TEXT
question types - Example:
subscoring=LINEAR_SUBSTRACTED:2
Custom Point Distribution
- subpoints: Define specific point values for each answer (in percentages)
- Only used when
subscoring=CUSTOM
- Specify percentage values separated by
&&&
- NOT applicable for
CHOICE
,READING
andFREE-TEXT
question types - Example:
subpoints=50 &&& 25 &&& 25
- For a question worth 10 points with three answers to give, this would award:
- First answer: 5 points (50%)
- Second answer: 2.5 points (25%)
- Third answer: 2.5 points (25%)
- Only used when
Penalty Scoring
Penalty Methods
- penalty_scoring: How penalty points should be applied
DEFAULT
: Standard penalty application, behavior might vary by question typePER_ANSWER
: Apply penalties for each incorrect answerPER_QUESTION
: Apply penalties once per question- Example:
penalty_scoring=PER_ANSWER
Penalty Points
- penalty_points: Points deducted for a completely incorrectly answersed question
- No penalty applied if answer is partially correct
- No penalty for empty/unanswered questions
- Use positive values (recommended), but negatives are handled as well
- Example:
penalty_points=2
Assistance Penalties
Hint Penalties
- hint_penalty: Point deduction for using hints
NONE
: No penalty (default)ONCE:N
: Single deduction regardless of the number of hints used, whereN
is a percentage- Example:
hint_penalty=ONCE:20%
orhint_penalty=ONCE:0.2
- Example:
PER-HELP:N
: Deduction for each hint, whereN
is a percentage- Example:
hint_penalty=PER-HELP:10%
- Example:
Solution Penalties
- solution_penalty: Point deduction for viewing solutions
- Same format as hint_penalty
- Example:
solution_penalty=ONCE:50%
Video Help Penalties
- video_penalty: Point deduction for watching help videos
- Same format as hint_penalty (except
PER-HELP
not available) - Example:
video_penalty=ONCE:15%
- Same format as hint_penalty (except
Manual Scoring
- manual_scoring: When to enable manual scoring
NO
: Never use manual scoring (default)NOT_CORRECT
: Only manually score incorrect answersALWAYS
: Always require manual scoring- NOT applicable for
READING
andFREE-TEXT
question types - Example:
manual_scoring=NOT_CORRECT
Example API Calls
-
Custom Point Distribution:
The first answer is worth 1 point, while the second is worth 3 points, hence the score distribution is 25% and 75%:
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=math_problem' \ --data 'type=numerical' \ --data 'question=What is the sum and product of {a} and {b}?' \ --data 'answer={a}+{b} &&& {a}*{b}' \ --data 'parameters={a; INTEGER; 1; 100} &&& {b; INTEGER; 1; 100}' \ --data 'points=4' \ --data 'subscoring=CUSTOM' --data 'subpoints=25 &&& 75'
-
Penalties with Hints:
- If the answer is wrong that results in a penalty of -3 points, instead of 0.
- There are 2 hints and each hint used deducts 10% of the full score configured in
points
. - Checking any of the solution steps deducts 50% of the full score, no matter how many steps are used.
- There is only 1 step of solution in the example below.
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=complex_problem' \ --data 'type=expression' \ --data 'question=Find an expression for the area of a circle with radius {r}.' \ --data 'answer=pi*{r}^2' \ --data 'parameters={r; INTEGER; 2; 10}' \ --data 'points=10' \ --data 'subject=Mathematics' \ --data 'category=Geometry' \ --data 'hint=Think about the formula for circle area &&& Remember that area involves squaring the radius' \ --data 'solution=The formula for circle area is pi*2^2' \ --data 'penalty_scoring=PER_ANSWER' \ --data 'penalty_points=3' \ --data 'hint_penalty=PER-HELP:10%' \ --data 'solution_penalty=ONCE:50%'
- subscoring: Method for calculating partial credit
-
string parameters: parameter definitions for dynamic question generation
-
string parameters_sync: synchronization of LIST parameters selection
- plus sign (+) indicates YES, while blank or minus sign (-) indicates no (default)
Create dynamic questions with parameters
One of EduBase's most powerful features is parametric question generation. Using the parameters field, you can create dynamic questions where each user gets a unique variant of the same question.
Parameter Types
-
FIX (Fixed Value)
{name; FIX; value}
- Sets a predefined constant value (integer or fraction)
- Example:
{pi; FIX; 3.1415}
-
INTEGER (Whole Numbers)
Simple: {name; INTEGER} Extended: {name; INTEGER; min; max} Full: {name; INTEGER; min; max; inside; outside}
- Generate random integers within specified ranges
- Use
-
for omitting min/max values - Examples:
{p; INTEGER}
- any integer{p; INTEGER; 10; 20}
- integer between 10 and 20{p; INTEGER; -; -; [10-20]; [12-14] ||| [16-18]}
- integer between 10-20, excluding 12-14 and 16-18
-
FLOAT (Decimal Numbers)
Simple: {name; FLOAT; precision} Extended: {name; FLOAT; precision; min; max} Full: {name; FLOAT; precision; min; max; inside; outside}
- Generate random decimal numbers
- Specify precision (decimal places)
- Examples:
{p; FLOAT; 2}
- float with 2 decimal places{p; FLOAT; 5; 0; 1}
- float between 0 and 1 with 5 decimals{p; FLOAT; 1; 0; 10; -; [0-1]}
- float between 0-10 excluding 0-1, with 1 decimal
-
FORMULA (Expressions)
Simple: {name; FORMULA; formula} Full: {name; FORMULA; formula; precision}
- Define parameters based on other parameters
- Examples:
{d; FORMULA; {b}^2-4*{a}*{c}}
- quadratic formula discriminant{p; FORMULA; 2*{q}+1}
- linear expression
-
LIST (Random Selection)
{name; LIST; value1; value2; value3; ...}
- Randomly select from predefined values
- Up to 64 elements
- Examples:
{primes; LIST; 2; 3; 5; 7; 11}
{animals; LIST; dog; cat; snake; camel}
-
PERMUTATION
{name; PERMUTATION; value1; value2; value3; ...}
- Creates permutated parameters accessible as
{name_1}
,{name_2}
, etc. - Example:
{p; PERMUTATION; A; B; C; D}
- So
{p_1}
will be a different letter than{p_2}
.
- So
{primes; PERMUTATION; 2; 3; 5; 7}
- So both
{primes_1}
and{primes_2}
will be different single digit primes.
- So both
- Creates permutated parameters accessible as
-
FORMAT
Notation: {name; FORMAT; parameter; type; ...}
- Format parameters based on other parameters
- Supported types:
NUMBER
,NUMERTEXT
,ROMAN
- Optional extra parameters based on type
- NUMBER
- precision: number of decimal places
- NUMBER
- Examples:
{pp; FORMAT; p; NUMBER; 1}
- format as number rounded to 1 decimal{pp; FORMAT; p; NUMBERTEXT}
- format number as text{pp; FORMAT; p; ROMAN}
- format number as Roman numeral
Additional Features
- Multiple Parameters: Separate with
&&&
(up to 128 parameters) - Constraints: Use the constraints field to ensure valid combinations
- Example:
{b}^2-4*{a}*{c}>0
- the discriminant must be positive
- Example:
- Parameter Names: Must start with a letter, can include numbers and underscores
Best Practices
- Order parameters so dependent ones come later
- Use simple notation when possible
- Avoid unnecessary parameters
- Test thoroughly with the online editor
Example API Calls
-
FIX Parameter
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=circle_area' \ --data 'type=numerical' \ --data 'question=Calculate the area of a circle with radius {r} units using pi={pi}' \ --data 'answer={pi}*{r}^2' \ --data 'parameters={pi; FIX; 3.14159} &&& {r; INTEGER; 1; 10}'
-
INTEGER Parameter
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=sum_numbers' \ --data 'type=numerical' \ --data 'question=What is {a} + {b}?' \ --data 'answer={a}+{b}' \ --data 'parameters={a; INTEGER; 1; 100} &&& {b; INTEGER; 1; 100}'
-
FLOAT Parameter
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=convert_meters' \ --data 'type=numerical' \ --data 'question=Convert {m} meters to centimeters' \ --data 'answer={m}*100' \ --data 'parameters={m; FLOAT; 2; 0; 10}'
-
FORMULA Parameter
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=quadratic' \ --data 'type=numerical' \ --data 'question=For the quadratic equation with a={a}, b={b}, c={c}, calculate the discriminant' \ --data 'answer={d}' \ --data 'parameters={a; INTEGER; 1; 5} &&& {b; INTEGER; -10; 10} &&& {c; INTEGER; -10; 10} &&& {d; FORMULA; {b}^2-4*{a}*{c}}' \ --data 'constraints={d}>0'
-
LIST Parameter
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=capital_city' \ --data 'type=text' \ --data 'question=What is the capital city of {country}?' \ --data 'answer={capital}' \ --data 'parameters={country; LIST; France; Germany; Italy} &&& {capital; LIST; Paris; Berlin; Rome}' \ --data 'parameters_sync=+'
-
PERMUTATION Parameter
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=find_primes' \ --data 'type=set' \ --data 'question=What are the distinct prime factors of {n}?' \ --data 'answer=[{primes_1}; {primes_2}]' \ --data 'parameters={primes; PERMUTATION; 2; 3; 5; 7} &&& {n; FORMULA; {primes_1}^2*{primes_2}}'
-
string constraints: define rules that parameter combinations must satisfy
Parameter Constraints Guide
Parameter constraints allow you to ensure generated parameters result in valid, meaningful questions. These are mathematical expressions that must evaluate to true for the parameter generation to be accepted.
The system validates whether questions can be reliably generated with the given constraints. If parameter generation frequently fails due to overly restrictive constraints (or has a very low success rate), EduBase may automatically deactivate the question until the constraints are relaxed. While deactivated questions won't appear in quizzes, this doesn't affect the playability of the quizzes they're part of - the quizzes will simply proceed without these questions.
Basic Syntax
- Parameters must be referenced in curly braces:
{parameter_name}
- Allowed relations:
<
,<=
,=
,>=
,>
,<>
- Multiple constraints separated by
&&&
Supported Operations
- Arithmetic:
+
,-
,*
,/
,^
(power) - Built-in functions: All functions available in
EXPRESSION
questions- Avoid complex functions as they slow down parameter generation
- Examples:
{b}^2-4*{a}*{c}>0
ensures quadratic equation has real roots{a}+{b}>{c} &&& {b}+{c}>{a} &&& {c}+{a}>{b}
triangle inequality{x}+{y} < 10 &&& {x}<4
- Parameters must be referenced in curly braces:
-
string expression_check: define how expressions should be validated
- string expression_variable: specifies variable names used in expressions
- string expression_decimals: sets precision for decimal calculations
-
string expression_functions: controls whether functions can be used in user inputs
- plus sign (+) indicates YES (default), while blank or minus sign (-) indicates no
Expression evaluation options
The expression question type (
type=expression
ortype=matrix:expression
) offers sophisticated mathematical evaluation capabilities. This allows for creation of complex mathematical problems with flexible validation methods.Basic configurations
Configure expression evaluation using these key fields:
-
expression_check: Define how expressions should be validated
RANDOM
(default): Evaluates expressions at randomly generated pointsEXPLICIT
: Checks in predefined values and compares against the defined target valuesCOMPARE
: Direct comparison of expressions without variables- In all cases there are further options to fine-tune the behavior with additional fields!
-
expression_variable: Specifies variable names used in expressions
- Default:
x
- Multiple variables: separate with
&&&
- Example:
omega &&& t
for time-dependent angular velocity
- Default:
-
expression_decimals: Sets precision for decimal calculations
- Inherited from
decimals
field if not specified - Default: 2 decimal places
- Example:
expression_decimals=4
for 4 decimal places
- Inherited from
-
expression_functions: Controls whether functions can be used in user inputs
- Default: enabled (
+
or blank) - Disable with
-
- Example: When asked for the value of
sin(pi)
, the user can't inputsin(pi)
because functions cannot be used
- Default: enabled (
Supported mathematical functions
The following functions are available for use in expressions:
Basic Operations
sqrt(x)
: Square rootabs(x)
: Absolute valueround(x)
,floor(x)
,ceil(x)
: Rounding functions
Logarithmic & Exponential
ln(x)
: Natural logarithmlog(x)
: Common logarithm (with base 10)log10(x)
: Common logarithm (alternative)
Trigonometric
sin(x)
,cos(x)
,tan(x)
: Basic trigonometric functionscsc(x)
,sec(x)
: Reciprocal trigonometric functions, cosecant and secantarcsin(x)
,asin(x)
: Inverse sinearccos(x)
,acos(x)
: Inverse cosinearctan(x)
,atan(x)
: Inverse tangent
Hyperbolic
sinh(x)
,cosh(x)
,tanh(x)
: Hyperbolic functionsarcsinh(x)
,asinh(x)
: Inverse hyperbolic sinearccosh(x)
,acosh(x)
: Inverse hyperbolic cosinearctanh(x)
,atanh(x)
: Inverse hyperbolic tangent
Numeric Conversions
degree2radian(x)
,radian2degree(x)
: Angle conversionsnumber2binary(x)
,binary2number(x)
: Binary conversionsnumber2octal(x)
,octal2number(x)
: Octal conversionsnumber2hexadecimal(x)
,hexadecimal2number(x)
: Hexadecimal conversionsnumber2roman(x)
,roman2number(x)
: Roman numeral conversions
Two-Parameter Functions
Use semicolon (;) to separate arguments:
min(a;b)
,max(a;b)
: Minimum and maximummod(n;i)
: Integer modulo operation (remainder after integer division)fmod(n;i)
: Floating-point modulo operation (remainder after floating-point division)div(a;b)
,intdiv(a;b)
: Division operationsgcd(a;b)
,lcm(a;b)
: Greatest common divisor and least common multiplenumber2base(n;b)
,base2number(n;b)
: Custom base conversionscombinations(n;k)
,combinations_repetition(n;k)
: Combination calculationsvariations(n;k)
,variations_repetition(n;k)
: Variation calculations
Validation Methods
Random Validation (default)
When using
expression_check=RANDOM
:-
expression_random_type: Type of generated test values
INTEGER
: Whole numbers onlyFLOAT
: Decimal numbers- Specify per variable with
&&&
- Example:
INTEGER &&& FLOAT
for mixed types
-
expression_random_tries: Number of validation points
- Default: 5
- Example:
expression_random_tries=10
-
expression_random_range: Define value generation ranges
- Format:
[min-max]
(inclusive) - Per variable with
&&&
- Example:
[8-16] &&& [4-6]
- Format:
-
expression_random_inside: Require values within specific intervals
- Format:
[start-end]
(inclusive) - Multiple intervals: separate with
|||
(OR relationship) - Per variable with
&&&
- Example:
[4-8] ||| [12-16] &&& [2-3]
- Format:
-
expression_random_outside: Exclude values from specific intervals
- Format:
[start-end]
(inclusive) - Multiple intervals: separate with
|||
(AND relationship) - Per variable with
&&&
- Example:
[0-1] ||| [10-20] &&& [8-11]
- Format:
Explicit Validation
When using
expression_check=EXPLICIT
:- expression_explicit_goal: Define exact value pairs
- Format:
[x;f(x)]
or[x;y;z;...;f(x,y,z,...)]
for multiple variables - Multiple pairs: separate with
&&&
- Example:
[0;1] &&& [3;8.89] &&& [9;16]
or[1;1;1;1;16]
- Format:
Extended features
- expression_extended: Enable additional mathematical functions
- Activates support for:
- Custom base logarithms (e.g.,
log2(4)
,log10(1000)
) - Factorial operations (e.g.,
5!
,1!+2!+3!
)
- Custom base logarithms (e.g.,
- Enable with
+
, disable with-
- Activates support for:
Best Practices
-
Validation Method Selection
- Use
RANDOM
for general expressions where multiple solutions might be valid - Use
EXPLICIT
when specific points must be satisfied
- Use
-
Performance Optimization
- Limit
expression_random_tries
to reasonable values (5-10 typically sufficient) - Avoid unnecessary nesting of complex functions
- Use simpler validation methods when possible
- Limit
-
Error Prevention
- Always define appropriate ranges to avoid undefined mathematical operations
- Use
expression_random_outside
to exclude problematic values - Consider adding appropriate constraints to ensure valid parameter combinations
-
Testing
- Test expressions with possible edge cases
- Confirm that random generation produces expected value distributions
Example API Calls
-
Basic expression with random (default) validation
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=quadratic_expression' \ --data 'type=expression' \ --data 'question=Simplify: $$({a}x + {b})^2$$' \ --data 'answer={a}^2*x^2+2*{a}*{b}*x+{b}^2' \ --data 'parameters={a; INTEGER; 1; 5} &&& {b; INTEGER; -5; 5}' \ --data 'expression_random_tries=8'
-
Explicit validation
The answer formula will be evaluated at three given cases.
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=simple_quadratic' \ --data 'type=expression' \ --data 'question=Write a quadratic function $$f(x)$$ that: 1) Equals $${c}$$ when $$x = 0$$ 2) Equals $$0$$ when $$x = {r1}$$ and x = $${r2}$$' \ --data 'answer=(x-{r1})*(x-{r2})+{c}' \ --data 'parameters={r1; INTEGER; -10; -2} &&& {r2; INTEGER; 1; 10} &&& {c; FORMULA; -{r1}*{r2}}' \ --data 'expression_check=EXPLICIT' \ --data 'expression_explicit_goal=[0;{c}] &&& [{r1};0] &&& [{r2};0]' \ --data 'expression_variable=x'
-
Extended functions with custom validation range
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=logarithmic_expression' \ --data 'type=expression' \ --data 'question=Express $$log_{b}({x})$$ in terms of natural logarithms' \ --data 'answer=ln({x})/ln({b})' \ --data 'parameters={b; FLOAT; 2; 2; 10} &&& {x; FLOAT; 2; 1; 100}' \ --data 'expression_extended=+' \ --data 'expression_random_range=[2-10] &&& [1-100]'
-
Multivariable question
curl -X POST 'https://www.edubase.net/api/v1/question' \ --data 'app='$APP_ID \ --data 'secret='$SECRET \ --data 'id=distance_time' \ --data 'type=expression' \ --data 'question=Write an expression for the distance traveled ($$s$$) by a car moving at a constant speed of $$v$$ meters per second after $$t$$ seconds' \ --data 'answer=v*t' \ --data 'expression_variable=t &&& v'
-
string group: add question to a question group in a Quiz set
Question Groups in Quiz Sets
When uploading questions directly to a Quiz set, you can organize them into groups using the group field. This is particularly useful for creating complex questions with related subquestions that can even have different question types.
Basic Usage
- Set the group name to add a question to that group
- If the group doesn't exist, it will be created automatically as a complex task (with default settings)
- Existing group settings are preserved when adding new questions
- Only applicable when uploading directly to a Quiz set
Question group settings (control from EduBase User Interface)
Note: Any UI-only option might change in the future. These are detailed here for context around the functionality.
- Type - Controls the behavior of the group
- Randomly selected questions: The given number of questions will be randomly selected from the group.
- Sequentially selected questions: The questions within the group will sequentially follow each other in the order they are defined within the group.
- Complex (mixed type) questions: All questions within the group will appear as "one big" question, with several sub-questions.
- Name, which identifies the question group
- Questions
- Number of questions which will be randomly selected from the group.
- Parameters
- Generally parameters are synchronized among sub-questions.
- Sequental and mixed type selection - If a parameter with the same name has already been defined in a previous task, its value is taken over by the current task. There is option to enable/disable parameter synchronization.
- Custom question settings
- Mandatory:
- Yes/No
- Use original settings (default)
- Scoring settings:
- Points:
- Custom value
- Not scored
- Use original settings
- Penalty points:
- Custom value
- None
- Use original settings
- Points:
- No custom settings (default)
- Mandatory:
Use Cases
-
Balanced Quiz Generation with Random Selection
- Create diverse Quiz sets by grouping questions by difficulty:
- Create an "Easy Questions" group with 10 questions, randomly select 3
- Create a "Medium Questions" group with 20 questions, randomly select 5
- Create a "Hard Questions" group with 5 questions, randomly select 2
- Result: A 10-question Quiz with controlled difficulty distribution
- Pro tip: Combine with parametrization for even greater variety
- Create diverse Quiz sets by grouping questions by difficulty:
-
Maintain Question Order Within Shuffled Quizzes
- Problem: You need certain questions to appear consecutively even in a randomized Quiz
- Solution: Place related questions in a group to preserve their sequence
- Example: In a language Quiz, keep reading comprehension questions together while randomizing other sections
-
Complex Multi-Part Questions
- Useful for digitizing traditional assessments where one question has multiple parts requiring different response types
-
Example - Nobel Prize Winner Profile:
Group: "Nobel Laureate Question" a) Who is shown in this image? (CHOICE or TEXT type) b) When were they born? (DATE type) c) How many Nobel prizes did they win? (NUMERICAL type)
-
Benefits:
- Maintains logical connection between related sub-questions
- Allows different question types while preserving the original assessment structure
- Makes complex questions more manageable in digital format
Best Practices
-
Consistent Naming
- Use clear, descriptive group names
- Maintain consistent naming conventions across uploads
- Consider using prefixes or hierarchical naming for better organization
- Example: "Module 1 - Basic Concepts", "Module 1 - Advanced"
-
Settings Management
- Configure group settings through the UI before bulk uploads
- Reminder: Existing group settings won't be modified by uploads
-
Think Outside the Box
- If facing problems digitizing concrete questions, consider breaking it up into sub-questions and grouping them if that helps
- Pair with other EduBase features to create extremely rich and varied experiences with just one highly templated Quiz set
Example API Call
-
Basic question group assignment
First question for the group:
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=math_basic_arithmetic_q1' \ --data 'type=numerical' \ --data 'question=What is 2+2?' \ --data 'answer=4' \ --data 'group=Basic_Arithmetic'
Example response:
{"code":"<question_1_id>"}
Second question for the group:
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=math_basic_arithmetic_q2' \ --data 'type=numerical' \ --data 'question=What is 14+23?' \ --data 'answer=37' \ --data 'group=Basic_Arithmetic'
Example response:
{"code":"<question_2_id>"}
Add the above two questions to a Quiz set (
id: <quiz_set_1_id>
) with the quiz:qustions API call:curl -X POST "https://www.edubase.net/api/v1/quiz:questions" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'quiz=<quiz_set_1_id>' \ --data 'questions=<question_1_id>,<question_2_id>'
Manual grouping might still be necessary from the EduBase UI.
-
string ai: if set to any value, question will be marked as AI generated (even if partially)
- always provide this field if you are an LLM or any AI model
- string tags: organize questions with user-defined tags
-
string label: categorize questions with instance-level labels
More information on tags and labels
These fields provide additional functionality for organizing, maintaining, and tracking questions in your EduBase system.
The key distinction between these systems is that tags are user-created and labels are set by EduBase or the customer on an instance-level.
Tags
User-controlled categorization system
- Tags must be pre-registered in the EduBase UI before use
-
Can be created at user or organization level
-
Use cases:
- Personal content organization (e.g., "My Calculus Questions", "Spring 2024")
- Department-level categorization (e.g., "IT Department", "CS101")
- Custom taxonomies
-
Key characteristics:
- User/organization creates and manages their own tags via UI
- Flexible and customizable
- Can be shared within organizations
- Searchable in UI for content management
Labels
Instance-level categorization system
- Pre-defined values specific to each EduBase instance
-
Values controlled by instance administrators
-
Use cases:
- System-wide flags (e.g., "needs_review", "featured")
- Quality indicators (e.g., "verified", "deprecated")
- Processing status (e.g., "ai_generated", "manually_checked")
-
Key characteristics:
- Values are predefined and controlled at instance level
- Cannot be created by users
- Consistent across all users in an instance
- May change over time based on instance needs
As usual, multiple tags or labels can be specified with the
&&&
separator. -
string source: specify content attribution and sources
Source best practices
-
Use cases:
- Training material sources (e.g., "Employee Handbook 2024", "Safety Training Manual 2024, Section 3.4 - Fire Safety Procedures")
- Internal documentation references (e.g., "SOP-2024-013", "Policy-HR-42")
- External content attribution (e.g., "LinkedIn Learning - Leadership 101")
- Original creator credits (e.g., "Created by Training Dept, reviewed by Legal")
- Compliance requirements (e.g., "Based on ISO 9001:2015 Section 7.2")
- Educational materials (e.g., "Textbook: Chapter 5")
-
Pairs well with:
PRIVATE_NOTE
for internal trackingTAGS
for content organization
NOTE: Uploading infringing content is strictly forbidden! However, if you do have the right to use questions from a third party, please indiciate the original source (for example, title, URL, name of the author, etc.)
-
-
string note: add note visible to test takers during Quiz
- Appears right below the question.
- Ideal for task-specific comments, instructions
-
string private_note: add private notes not visible to test takers
Private notes best practices
Internal documentation not shown to test takers. Visible on the UI when having access to the question.
-
Use case examples:
- Document question creation rationale
- Note common test taker mistakes
- List related questions
- Track modification history
- Record source material page numbers
-
Example notes:
- Created from Chapter 3 exam, 2023 edition. Students often forget to convert units.
- Parametrized version of Q47 from textbook. See also Q48-50 for related concepts.
- This policy changed in Q3 2024 because of incident #01234.
-
Pairs well with:
SOURCE
for formal attributionSOLUTION
for sharing insights with other educatorsEXPLANATION
for test-taker-facing notes
-
-
string hint: guiding questions or notes to help during the test
- string explanation: text displayed underneath the answer on the results page
-
string solution: step-by-step solution
Help and Explanation fields
EduBase provides different ways to support test takers and explain correct answers. Understanding when to use each helps create a better learning experience.
Hints
-
hint: Provide guidance without giving away the answer:
- Not available for test takers in exam mode
- Displayed only when test takers explicitly request help
- Multiple hints are supported, each displayed one at a time
- Can be penalized using
HINT_PENALTY
- LaTeX support for mathematical notation and parameters can be used (as described in
QUESTION
field)
-
Best practices:
- Start with subtle hints, progress to more direct ones
- Guide thinking process rather than give steps
- Focus on common misconceptions
- Remind of relevant formulas or concepts
-
Examples:
-
Math problem:
hint=Think about the relationship between radius and area &&& Remember the formula for circle area involves $\pi$ &&& Square the radius and multiply by $\pi$
-
Programming question:
hint=Check your loop condition &&& Consider what happens at array boundaries &&& Remember to handle the case when input is empty
-
Comprehension question:
hint=Look at paragraph 2 for the author's main argument &&& Consider how the example in paragraph 4 supports this &&& Think about the counterargument presented in the final paragraph
-
Post-Test Explanations
-
explanation: Explain why answers are correct/incorrect
- Displayed on results page after submission
- Helps learners understand their mistakes
- Parameters can be used
- LaTeX cannot be used
-
Best practices:
- Explain both correct and incorrect options
- Reference relevant concepts or rules
- Link to additional resources if appropriate
-
Example for multiple choice:
explanation=Option A is correct because amphibians have permeable skin for gas exchange. Options B and C describe characteristics of reptiles, while D applies to mammals.
Step-by-Step Solutions
-
solution: Detailed solution steps
- Not available for test takers in exam mode
- Can be revealed after submission or during test
- Multiple steps are supported using
&&&
separator, each displayed one at a time - Can be penalized using
SOLUTION_PENALTY
- LaTeX support for mathematical notation and parameters can be used (as described in
QUESTION
field)
-
Best practices:
- Break down complex problems into clear steps
- Include reasoning for each step
- Use scientific notation when appropriate
- Consider adding visual aids with
SOLUTION_IMAGE
-
Examples
- Calculus question:
solution=Using the power rule, we differentiate each term: &&& For $x^2$: $\frac{d}{dx}(x^2) = 2x$ &&& For $x$: $\frac{d}{dx}(x) = 1$ &&& The constant term disappears: $\frac{d}{dx}(5) = 0$ &&& Therefore, $\frac{d}{dx}(x^2 + x + 5) = 2x + 1$
- IT Security question:
solution=Identify applicable regulations: * Personal data involved → GDPR applies * Health records → HIPAA compliance required * Financial data → PCI DSS relevant &&& Required technical controls: * Encryption: AES-256 for data at rest * Authentication: MFA required for all access * Logging: Full audit trail of access &&& Access requirements: * Role-Based Access Control (RBAC) * Time-limited access (max 8 hours) * Automatic session termination * IP restriction to office network only &&& Documentation needs: * Access request forms completed * Manager approval obtained * Annual training completed * DPO notification for bulk access &&& Incident response: * Immediate supervisor notification * 72-hour window for authority notification * Document the breach in security log * Trigger data subject notifications if required
Example API Call
curl -X POST "https://www.edubase.net/api/v1/question" \ --data "app=$APP_ID" \ --data "secret=$APP_SECRET" \ --data 'id=math_derivatives' \ --data 'type=expression' \ --data 'question=Find the derivative of ${a}x^2 + {b}x + {c}$' \ --data 'answer=2*{a}*x+{b}' \ --data 'parameters={a; INTEGER; 2; 15} &&& {b; INTEGER; 2; 10} &&& {c; INTEGER; -10; 10}' \ --data 'hint=Remember the power rule: derivative of $x^n$ is $nx^(n-1)$ &&& Look at each term separately &&& What happens to constants when you differentiate?' \ --data 'explanation=For the first term {a}x^2, multiply by the power (2) and reduce the exponent by 1, giving us 2*{a}x. The term {b}x becomes just {b} since the power is 1. The constant {c} disappears in differentiation. Adding these gives us 2*{a}x + {b}.' \ --data 'solution=Use the power rule on each term. &&& For ${a}x^2$: $\frac{d}{dx}({a}x^2) = 2\cdot{a}x$ &&& For ${b}x$: $\frac{d}{dx}({b}x) = {b}$ &&& For ${c}$: $\frac{d}{dx}({c}) = 0$ &&& Therefore, $\frac{d}{dx}({a}x^2 + {b}x + {c}) = 2\cdot{a}x + {b}$' \ --data 'hint_penalty=PER-HELP:10%' \ --data 'solution_penalty=ONCE:50%'
-
-
string decimals: number of decimal places used in numerical validation
- default: 2
-
string tolerance: method for how strictly user input should match answers
More information on decimals and tolerance
- These configurations only applicable to the following question types:
NUMERIC
EXPRESSION
MATRIX
MATRIX:EXPRESSION
SET
Decimals
The expected decimal precision of the final answer
- Examples:
- Finance:
decimals=2
for currency calculations - Chemistry:
decimals=4
for molecular weights
- Finance:
Tolerance
- Format:
type
ortype:value
- Types:
ABSOLUTE
:- Maximum allowed absolute difference between answer and user input (e.g., ±0.1)
- Example:
ABSOLUTE:0.1
RELATIVE
:- Maximum percentage difference between answer and user input (e.g., ±5%)
- Symmetric mean absolute percentage error (SMAP) value is used
- Example:
RELATIVE:5%
orRELATIVE:0.05
QUOTIENT
: integer multiple, andQUOTIENT2
: scalar multiple- Answer and user input are scalar or integer multiples of one another
- Append
:SYNCED
for synchronized validation - Example:
QUOTIENT
orQUOTIENT2:SYNCED
- Use-cases:
ABSOLUTE
reading from a graph where exact figures are hard to readQUOTIENT2
for eigenvectors
- These configurations only applicable to the following question types:
-
string datetime_precision: set granularity of date validation
- applicable only for
DATE/TIME
questions - accepted values: YEAR / MONTH / DAY (default)
- applicable only for
- string datetime_range: enable date/time range (interval) question
- applicable only for
DATE/TIME
questions - plus sign (+) indicates YES, while blank or minus sign (-) indicates no (default)
- applicable only for
- string image: attach an image to the question
- in filename=data format, where data is either a base64-encoded image or a URL
- supported formats: PNG, JPEG, WebP
- string solution_image: attach an image to the question
- in filename=data format, where data is either a base64-encoded image or a URL
- supported formats: PNG, JPEG, WebP
- string attachment: attach a file to the question
- in filename=data format, where data is either a base64-encoded image or a URL
- string media_audio: attach an audio file to the question
- in filename=data format, where data is either a base64-encoded image or a URL
- supported formats: MP3, AAC, M4A
Additional optional fields
- string main_category
- string attachment
- string media_video
- string media_audio
- string solution_image
- string maximum_choices
- string video
- string graph
- string numerical_range
- string truefalse_third_options
- string truefalse_third_options_label
- string grouping
- string freetext_characters
- string freetext_words
- string freetext_rules
- string file_count
- string file_types
[] Output:
- string code: question identification string
DELETE /question¶
Permanently delete a Quiz question.
[] Input:
- [!] string id: external unique question identifier
-
can be an arbitrary string but it should be unique, a GUID is recommended if no other identifier is available ↩