Subversion Repositories wimsdev

Rev

Rev 2093 | Go to most recent revision | Details | 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
    modulescore=$[$modulescore + 0.1]
15
    !exit
16
!endif
17
 
18
!if $(reply$n)=$empty
19
    # forgotten to answer?
20
    errortext=!record 62 of $remarkdir/commonremarks.$taal
21
    maxscore=$[$P1*$maxscore]
22
    goback=1
23
    !exit
24
!endif
25
 
26
test=!nospace $(reply$n)
27
test=!replace internal ( by @ in $test
28
test=!replace internal : by # in $test
29
test=!replace internal ; by # in $test
30
test=!replace internal , by # in $test
31
!if (# isin $test) or (@ isin $test)
32
    # the student tries to give me a pair of coordinates
33
    # this is wrong: there are no roots/intersectionpoints
34
    # ergo : no good
35
    ex=!record 72 of $remarkdir/commonremarks.$taal
36
    remark$n=$NOK<br>$ex
37
    goback=0
38
    maxscore=0
39
    !exit
40
!endif
41
 
42
AAA=!singlespace $(reply$n)
43
AAA=$ $ $AAA
44
AAA=!lower $AAA
45
nothing=!record 71 of $remarkdir/commonremarks.$taal
46
#@ 0,nul,zero,zip,nop,niks,nada,geen,niente
47
A=1
48
!for p in $nothing
49
    !if $A !=0
50
	!if $p isin $AAA
51
	    A=0
52
	!endif
53
    !endif
54
!next p
55
 
56
!if $A!=0
57
    AAA=!replace [a-z\~\!\@\#\$\%\_\=\+\-\(\)] by $empty in $AAA
58
    AAA=!replace internal : by , in $AAA
59
    AAA=!replace internal ; by , in $AAA
60
    !for p=1 to 4
61
	AAA=!replace internal ,, by , in $AAA
62
    !next p
63
    t=!itemcnt $AAA
64
    !if $t=0
65
	maxscore=$[$P1*$maxscore]
66
	# the answer is empty: give back for correction with small penalty
67
	# geen antwoord of niks vlgs de syntax:terug geven
68
	errortext=!record 62 of $remarkdir/commonremarks.$taal
69
	goback=1
70
	!exit
71
	# ok?
72
    !endif
73
    !for p=1 to $t
74
	# check ik he/she tried to fill in anything non-math
75
	# to tell us that there are no real roots present...
76
	# if so: return for correction with fairly large penalty
77
	AA=!item $p of $AAA
78
	!if NaN isin $[$1*$AA]
79
	    errortext=!record 39 of $remarkdir/commonremarks.$taal
80
	    maxscore=$[$maxscore*$P4]
81
	    goback=1
82
	    !exit
83
	!endif
84
    !next p
85
    remark$n=$NOK
86
    maxscore=0
87
!else
88
    remark$n=$OK
89
!endif
90
modulescore=$[$modulescore + $maxscore]
91
goback=0
92
!exit