Subversion Repositories wimsdev

Rev

Rev 2093 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
338 schaersvoo 1
# this file is called from "coord.proc" if there are no real coordinates/intersection points.
2
# declare answer$n=nil
3
# ER ZIJN GEEN SNIJPUNTEN dus $(answer$n)=nil
4
# als de leerling een paar coordinaten inlevert is dat dus fout...
5
 
6
n=$counter
7
errortext=$empty
8
goback=0
9
# questionmark escape
10
!if ? isin $(reply$n)
11
    remark$n=$NOK
12
    goback=0
13
    maxscore=0
14
    !exit
15
!endif
16
 
17
!if $(reply$n)=$empty
18
    # forgotten to answer?
19
    errortext=!record 62 of $remarkdir/commonremarks.$taal
20
    maxscore=$[$P1*$maxscore]
21
    goback=1
22
    !exit
23
!endif
24
 
25
test=!nospace $(reply$n)
26
test=!replace internal ( by @ in $test
27
test=!replace internal : by # in $test
28
test=!replace internal ; by # in $test
29
test=!replace internal , by # in $test
30
!if (# isin $test) or (@ isin $test)
31
    # the student tries to give me a pair of coordinates
32
    # this is wrong: there are no roots/intersectionpoints
33
    # ergo : no good
34
    ex=!record 72 of $remarkdir/commonremarks.$taal
5807 schaersvoo 35
    remark$n=$NOK<br />$ex
338 schaersvoo 36
    goback=0
37
    maxscore=0
38
    !exit
39
!endif
40
 
41
AAA=!singlespace $(reply$n)
42
AAA=$ $ $AAA
43
AAA=!lower $AAA
44
nothing=!record 71 of $remarkdir/commonremarks.$taal
45
#@ 0,nul,zero,zip,nop,niks,nada,geen,niente
46
A=1
47
!for p in $nothing
48
    !if $A !=0
49
	!if $p isin $AAA
50
	    A=0
51
	!endif
52
    !endif
53
!next p
54
 
55
!if $A!=0
56
    AAA=!replace [a-z\~\!\@\#\$\%\_\=\+\-\(\)] by $empty in $AAA
57
    AAA=!replace internal : by , in $AAA
58
    AAA=!replace internal ; by , in $AAA
59
    !for p=1 to 4
60
	AAA=!replace internal ,, by , in $AAA
61
    !next p
62
    t=!itemcnt $AAA
63
    !if $t=0
64
	maxscore=$[$P1*$maxscore]
65
	# the answer is empty: give back for correction with small penalty
66
	# geen antwoord of niks vlgs de syntax:terug geven
67
	errortext=!record 62 of $remarkdir/commonremarks.$taal
68
	goback=1
69
	!exit
70
	# ok?
71
    !endif
72
    !for p=1 to $t
73
	# check ik he/she tried to fill in anything non-math
74
	# to tell us that there are no real roots present...
75
	# if so: return for correction with fairly large penalty
76
	AA=!item $p of $AAA
77
	!if NaN isin $[$1*$AA]
78
	    errortext=!record 39 of $remarkdir/commonremarks.$taal
79
	    maxscore=$[$maxscore*$P4]
80
	    goback=1
81
	    !exit
82
	!endif
83
    !next p
84
    remark$n=$NOK
85
    maxscore=0
86
!else
87
    remark$n=$OK
88
!endif
89
modulescore=$[$modulescore + $maxscore]
90
goback=0
91
!exit