Creating .edu files

From EduBase Wiki
Jump to navigation Jump to search

There are two different ways to create questions that can be uploaded to EduBase:

  1. with a predefined Excel sheet (with which you can upload multiple tasks at a time) or
  2. with .edu files (with which you can separately store tasks, but still upload them at the same time).

In this article we will discuss .edu files, which are text based files that can be edited by any text editor, however it's recommended to use a program that supports LaTeX syntax highlighting, as math tasks tend to use LaTeX quite heavily. As EduBase Quiz operates in a browser, the system uses KaTeX to render the LaTeX code, so it's important to note that only commands that can be interpreted by KaTeX will be displayed. When creating an .edu file with math formulas, please visit the KaTeX page to try out whether your code can be interpreted or not. A red error message will indicate if there is a problem.

An empty .edu file can be downloaded from here.

The file is divided into sections, which are denoted amidst "%" signs, for example:

%------LANGUAGE------%
%------QUESTION!------%
%------ANSWER!------%
...

Categories marked with an exclamation mark (!) are mandatory to fill, like "QUESTION!" and "ANSWER!" above. Without filling these out the system will not accept your task. The order of the sections does not matter, however it's recommended to use the predefined order for the sake of clarity in case of collaborating with others.

In order to gain full understanding of what each section stands for please see the full documentation.

Creating a given task

Now we show you the steps of creating an actual .edu file from a given task. We assume you have downloaded the empty .edu file, familiarized yourself with its structure and read the documentation.

Let's say we have the following exercise, where we want students to type their solution, not to select it from a given set of options:

Determine the maximum of the following function: $f(x)=2+3\sin(\pi x)$!

This can be done in 8 lines, if we only fill the mandatory sections:

The task we created will look like this for students. No hints, no solutions available.
The task we created will look like this for students. No hints, no solutions available.
%------QUESTION!------%
Determine the maximum of the following function: $f(x)=2+3\sin(\pi x)$!
%------ANSWER!------%
5
%------TYPE!------%
% [X] NUMERICAL 
%------CATEGORY!------%
Functions

The TYPE of the question is NUMERICAL, since we are waiting for a number. We set the question type by writing [X] next to NUMERICAL.

Hint: It's recommended to keep all the question types in your .edu files so that you don't need to remember their names, you just need to "select" them from the options by an X. Also it's also helpful to include the MAIN CATEGORY of the task, which is Math Matura in this case.

The minimal working example above should look like this:

%------QUESTION!------%
Determine the maximum of the following function: $f(x)=2+3\sin(\pi x)$!
%------ANSWER!------%
5
%------TYPE!------%
% [ ] STRING 
% [X] NUMERICAL 
% [ ] EXPRESSION 
% [ ] CHOICE 
% [ ] MULTIPLE-CHOICE 
% [ ] ORDER
% [ ] MATRIX 
%------CATEGORY!------%
Functions
%------MAIN_CATEGORY------%
Intermediate Math Matura 2016

Adding hints and solutions to a task

To make the task more valuable, you should extend it with hints (that helps students to guide their focus) and step-by-step solutions (that actually tells them the steps on how to solve the problem).

In our case a good hint would be the range of Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://api.formulasearchengine.com/v1/":): {\displaystyle \sin x} , so let's add the line:

%------HINT------%
We know that $-1\leqslant\sin(x)\leqslant 1$ for any real $x$.

The solution of the task is a bit longer:

%------SOLUTION------%
We know that $-1\leqslant\sin(x)\leqslant 1$ for any real $x$.
% &&&
Multiplying the argument by $\pi$ will not change the range, so:  $-1\leqslant\sin(\pi x)\leqslant 1$.
% &&&
Multiplying the inequality by $\red{3}$:
$$-\red{3}\leqslant\red{3}\sin(\pi x)\leqslant \red{3}$$
% &&&
and then adding $\blue{2}$ to it we get:
$$\blue{2}-\red{3}\leqslant \blue{2}+\red{3}\sin(\pi x) \leqslant \blue{2}+\red{3}.$$
% &&&
From the above we conclude that the maximum of the function is $\blue{2}+\red{3}=\mathbf{5}$.

The notation "&&&" or "triple-and" separates the steps, as a result this solution has 5 steps.

Note: You can use colors to give visual aid to the reader. This is not particularly necessary in this case but helpful in more complicated solutions.

Hints and solutions are now available.
Hints and solutions are now available.

The task extended with hints and solutions looks like this:

%------QUESTION!------%
Determine the maximum of the following function: $f(x)=2+3\sin(\pi x)$!
%------ANSWER!------%
5
%------TYPE!------%
% [ ] STRING 
% [X] NUMERICAL 
% [ ] EXPRESSION 
% [ ] CHOICE 
% [ ] MULTIPLE-CHOICE 
% [ ] ORDER
% [ ] MATRIX 
%------CATEGORY!------%
Functions
%------MAIN_CATEGORY------%
Intermediate Math Matura 2016
%------HINT------%
We know that $-1\leqslant\sin(x)\leqslant 1$ for any real $x$.
%------SOLUTION------%
We know that $-1\leqslant\sin(x)\leqslant 1$ for any real $x$.
% &&&
Multiplying the argument by $\pi$ will not change the range, so:  $-1\leqslant\sin(\pi x)\leqslant 1$.
% &&&
Multiplying the inequality by $\red{3}$:
$$-\red{3}\leqslant\red{3}\sin(\pi x)\leqslant \red{3}$$
% &&&
and then adding $\blue{2}$ to it we get:
$$\blue{2}-\red{3}\leqslant \blue{2}+\red{3}\sin(\pi x) \leqslant \blue{2}+\red{3}.$$
% &&&
From the above we conclude that the maximum of the function is $\blue{2}+\red{3}=\mathbf{5}$.

Parametrization

EduBase Quiz supports parametric tasks, which means that it will select random numbers in place of variables you defined.

In order to make the most out of EduBase, you should always make parametric tasks, so in an exam students will get different tasks with the same difficulty.

We can introduce these parameters under the section PARAMETER. We also have several settings to control the randomness of these parameters.

Let's parametrize the task above, with the introduction of 3 parameters: {a}, {b} and {c}

Determine the maximum of the following function: $f(x)={a}+{b}\sin({c} x)$!

EduBase will recognize anything in curly brackets ({}) as parameters, but we need to tell the system, that these are parameters indeed, which we can do with adding the lines

%------PARAMETERS------%
{a;INTEGER;-5;5;-;[0-0]}
% &&&
{b;INTEGER;-10;10;-;[0-0]}
% &&&
{c;INTEGER;-10;10;-;[0-0]}

This introduces the 3 parameters, where {a} can be an integer between -5 and 5, but cannot be zero, which is also true for {b} and {c} but they can be selected from -10 to 10, not -5 to 5. Now we need to change everything in the step-by-step solution accordingly.

%------SOLUTION------%
We know that $-1\leqslant\sin(x)\leqslant 1$ for any real $x$.
% &&&
Multiplying the argument by ${c}$ will not change the range, so:  $-1\leqslant\sin({c} x)\leqslant 1$.
% &&&
Multiplying the inequality by $\red{{b}}$:
$$-\red{{b}}\leqslant\red{{b}}\sin({c} x)\leqslant \red{{b}}$$
% &&&
and then adding $\blue{{a}}$ to it we get:
$$\blue{{a}}-\red{{b}}\leqslant \blue{{a}}+\red{{b}}\sin({c} x) \leqslant \blue{{a}}+\red{{b}}.$$
% &&&
From the above we conclude that the maximum of the function is $\blue{{a}}+\red{{b}}=\mathbf{{max}}$.

Notice the {max} parameter at the very end. This is the result - which is a parameter too - but it depends on parameters {a} and {b}. We can fix this relationship by adding another line to PARAMETERS:

%------PARAMETERS------%
{a;INTEGER;-5;5;-;[0-0]}
% &&&
{b;INTEGER;-10;10;-;[0-0]}
% &&&
{c;INTEGER;-10;10;-;[0-0]}
% &&&
{max;FORMULA;{a}+{b}}
This is how the parametric task will look like for students. Only the numbers are different.
This is how the parametric task will look like for students. Only the numbers are different.

The final version of the task (with parametric, step-by-step solutions and hints) looks like this:

Parameters are also updated in the solution steps accordingly.
Parameters are also updated in the solution steps accordingly.
%------QUESTION!------%
Determine the maximum of the following function: $f(x)={a}+{b}\sin({c} x)$!
%------ANSWER!------%
{max}
%------TYPE!------%
% [ ] STRING 
% [X] NUMERICAL 
% [ ] EXPRESSION 
% [ ] CHOICE 
% [ ] MULTIPLE-CHOICE 
% [ ] ORDER
% [ ] MATRIX 
%------CATEGORY!------%
Functions
%------MAIN_CATEGORY------%
Intermediate Math Matura 2016
%------PARAMETERS------%
{a;INTEGER;-5;5;-;[0-0]}
% &&&
{b;INTEGER;-10;10;-;[0-0]}
% &&&
{c;INTEGER;-10;10;-;[0-0]}
% &&&
{max;FORMULA;{a}+{b}}
%------HINT------%
We know that $-1\leqslant\sin(x)\leqslant 1$ for any real $x$.
%------SOLUTION------%
We know that $-1\leqslant\sin(x)\leqslant 1$ for any real $x$.
% &&&
Multiplying the argument by ${c}$ will not change the range, so:  $-1\leqslant\sin({c} x)\leqslant 1$.
% &&&
Multiplying the inequality by $\red{{b}}$:
$$-\red{{b}}\leqslant\red{{b}}\sin({c} x)\leqslant \red{{b}}$$
% &&&
and then adding $\blue{{a}}$ to it we get:
$$\blue{{a}}-\red{{b}}\leqslant \blue{{a}}+\red{{b}}\sin({c} x) \leqslant \blue{{a}}+\red{{b}}.$$
% &&&
From the above we conclude that the maximum of the function is $\blue{{a}}+\red{{b}}=\mathbf{{max}}$.

Notice: the ANSWER is now {max}.

Adding constraints to parameters

In some cases we want our random parameters to obey to a certain rule. For example if I want to make sure that in the task above we always end up with a positive maximum (for some reason) then I need to introduce a constraint, which can be done as follows:

%------CONSTRAINTS------%
{a}+{b}>0

or

%------CONSTRAINTS------%
{max}>0

however the first option is preferable since it needs less computation, as we don't need to calculate {max}. If we give a too strict or insatiable constraint then the system will neglect the complete task, as it only tries to generate parameters that satisfy these constraints only a limited number of times (100 at max).