655 results authored by Christian Lawson-Perfect - search across all users.
-
Question in How-tos
This shows how to use variable name annotations inside \simplify to display a 3D vector in terms of the standard unit vectors $\boldsymbol{i}$, $\boldsymbol{j}$, $\boldsymbol{k}$
-
Question in How-tos
The student is asked to write a number with a certain property, or tick a box labelled "this is impossible" if it can't be done.
A custom marking algorithm on the gap-fill part first checks if the student ticked the box. If they did, their answer is marked correct if it really is impossible. If they didn't tick it, their number is checked against the required property.
-
Question in How-tos
Demo showing how to write a custom function in javascript.
-
Question in How-tos
This question shows how to run some JavaScript code when the question's HTML is displayed on the page.
-
Question in How-tos
This question shows how to use the 'adviceDisplayed' signal to run some javascript when the question's advice is revealed to the student.
-
Question in How-tos
Call a custom function from another javascript custom function by using
scope.evaluate -
Question in How-tos
No description given
-
Question in How-tos
No description given
-
Question in How-tos
Demo question showing how to use the matrix maths functions in JavaScript.
-
Question in How-tos
This shows how to implement a recursive function in JavaScript with a nested function definition.
-
Question in How-tos
The student must write a percentage, using the % symbol. An alternative answer checks the cases where they forgot the percent sign (e.g. 55), or entered the corresponding scalar (e.g. 0.55).
-
Question in How-tos
This demonstrates how to render a set of tuples such as $\{(1,2),(3,4)\}$ in LaTeX, starting with a list of pairs of numbers.
-
Question in How-tos
Shows how to enter a logarithm to an arbitrary base, in a mathematical expression part.
-
Question in How-tos
Ask for the squares of five randomly-chosen numbers between 0 and 15.
The shuffle function puts a list in random order.
-
Question in How-tos
Get the student to upload their experimental data in a CSV file, then ask them to compute statistics on it.
-
Question in How-tos
A table showing how to substitute raw LaTeX code into question text.
NOTE: You probably don't want to do this! There's usually a more robust way, where you get Numbas to make the expression for you.
-
Question in How-tos
Demonstrates how to create variables containing LaTeX commands, and how to use them in the question text.
-
Question in How-tos
This question shows how to use the
currencyfunction to display amounts of currency with the correct symbols. -
Question in How-tos
This question shows how to display a number like "1234" as "1,234", or "1 234", using the formatNumber function.
-
Question in How-tos
A method of randomly choosing variable names - use the
expression()JME function to create a variable name from a randomly chosen string.(This question also uses a custom marking script to check that the student has simplified the expression)
-
Question in How-tos
Demonstrating that \$ produces a normal dollar sign.
-
Question in How-tos
Use attributes of the form
eval-<name>to dynamically set an attribute on an element based on question variables. -
Question in How-tos
No description given
-
Question in How-tos
Use the CSS preamble to give a bit more space between multiple choice answers.
-
Question in How-tos
A randomised table is contained in a div tag with the id
#sales-table, so it can be styled using the CSS preamble. -
Question in How-tos
CSS classes "english" and "cymraeg" apply different background colours to English and Welsh portions of text.
-
Question in How-tos
Defines a CSS class in the preamble which styles the "Lemma" environment, used in the statement.
-
Question in How-tos
Example of displaying a randomly chosen image.
-
Question in How-tos
One way of checking an equation is valid is to check that the difference between the LHS and RHS is 0.
-
Question in How-tos
In progress!