Skip to content

Instantly share code, notes, and snippets.

View BillFoster's full-sized avatar

Bill Foster BillFoster

  • Newcastle University
View GitHub Profile
@BillFoster
BillFoster / testsimp.exam
Created June 10, 2011 22:36
Problem with simplification
{
name: test simplification
questions: [
{
name: testing
variables: {
a: "random(1..5)"
b: "random(1..5)"
}
statement:""" $\simplify{{a}^2-{b}^2}$ and $\simplify[1111110111111111]{{a}^2+4*{a}*{b}}$"""
@BillFoster
BillFoster / errorpersis.exam
Created August 8, 2011 15:04
Error persisting
{
name: Arctan example 1
variables: {
a: "random(2..6)"
b: "r^2*a"
r: "s^2"
s:"random(2..5)"
}
statement: """Find the following integral.
Input the constant of integration as $C$.
@BillFoster
BillFoster / gist:1143713
Created August 13, 2011 10:23
Complex numbers and display/simplification
{
name: testcom
questions: [
{
name: Complex Test
statement: """Express the following in the form $a+bi$ where $a$ and $b$ are real. """
variables: {
a4: "s4*random(1..9)"
b4: "s1*random(1..9)"
@BillFoster
BillFoster / gist:1151395
Created August 17, 2011 11:52
new simplification rules
{
name: TestRules
duration: 0
percentpass: 0
shufflequestions: false
navigation: {
reverse: true
browse: true
}
@BillFoster
BillFoster / gist:1156718
Created August 19, 2011 12:43
string values for variables
{
name: TestRules
duration: 0
percentpass: 0
shufflequestions: false
navigation: {
reverse: true
browse: true
}
@BillFoster
BillFoster / gist:1158826
Created August 20, 2011 07:57
running mathssample in dev
On compiling and running mathssample in the dev branches we get the following error message on running:
Error: Error substituting content:
This page contains the following errors:error on line 1 at column 16: StartTag: invalid element name
Below is a rendering of the page up to the first error.
@BillFoster
BillFoster / gist:1616736
Created January 15, 2012 18:45
list as an answer in a jme gapfill
{ notes: ""
name: MAS3214 20122013 CBA1_4
percentPass: 50
shuffleQuestions: false
rulesets:{
std:[all,fractionNumbers, !collectNumbers,!noLeadingMinus]
}
navigation: {
allowregen: true
@BillFoster
BillFoster / gist:1629194
Created January 17, 2012 21:56
Problems with map function and lists
{ notes: ""
name: MAS3214 20122013 CBA1_1
percentPass: 50
shuffleQuestions: false
rulesets:{
std:[all,fractionNumbers, !collectNumbers,!noLeadingMinus]
}
navigation: {
allowregen: true
@BillFoster
BillFoster / gist:1639215
Created January 19, 2012 10:10
string restrictions and pattern matching
Here is a question gapfill part on prime factorisation, pi primes, ei their exponents.
Awful business trapping student input.
So much better if there were restrictions that said that the primes (without 0 exponent) had to be present in the answer.
gaps: [
{type: jme
answer: "{p1}^{e1}*{p2}^{e2}*{p3}^{e3}*{p5}^{e5}"
answersimplification:"unitPower,zeroPower,unitFactor"
musthave:{
There is a problem with allocating negative marks - if the sum over all marks is 0 then you cannot submit.
So should the total be over all positive marks, neglecting any negative marks in the matrix?
{ notes: ""
name: MAS3214 20122013 CBA1_6
percentPass: 50
shuffleQuestions: false
rulesets:{