This is in regards to this expplore mode question (which is in German, sorry):
What I am trying to do is in Part 1 the studnet might enter a whole number betwenn 10,000 and 1,000,000 and if this is entered correctly, the xplore mode should switch a predifend random value with the students answer.
Tihs works just fine in case the student enters a number from that range, but fails with an error saying: "
- There was an error in this part's marking algorithm. Please report this. Error evaluating variable mark: Cannot read property 'type' of null
this is the custom marking algorithm I am using:
mark:
assert(interpreted_answer[0] >10000,
fail("Bitte größer als 10000!"));
assert(interpreted_answer[0] <1000000,
fail("Bitte kleiner als 1000000!"));
assert(interpreted_answer[0] = floor(interpreted_answer[0]),
fail("Bitte nur ganzzahlige Angaben!"));
if(interpreted_answer[0] > 10000 and interpreted_answer[0] < 1000000,assert(floor(sqrt(interpreted_answer[0])/100) <> sqrt(interpreted_answer[0])/100,
fail("Diese Zahl hat eine durch 100 teilbare Wurzel ("+sqrt(interpreted_answer[0])+"), daher wird der Zufallswert ("+square+ ") verwendet.")));
if(interpreted_answer[0] > 10000 and interpreted_answer[0] < 1000000,add_credit(1,"Ihre Zahl ("+interpreted_answer[0]+") ist im passenden Bereich und wird verwendet."),fail("Zahl außerhalb des zulässigen Bereichs, Zufallswert wird verwendet."))