Rev 17046 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | #if you change these limits, you have to modify var.def! |
2 | limit_var=2048 |
||
3 | maxstep=100 |
||
4 | |||
5 | wims_multiexec=pari maxima |
||
6 | insmath_rawmath=yes |
||
7 | wims_backslash_insmath=yes |
||
8 | htmlmath_gtlt=yes |
||
9 | proc_oef=yes |
||
17046 | bpr | 10 | !set oefenv_lang=$lang |
11 | !set modu_lang=$module_language |
||
17065 | bpr | 12 | !readproc deduc/names |
17046 | bpr | 13 | |
20 | reyssat | 14 | !read deduc/var.headers |
15 | # Limit Pari precision, for otherwise many computations will fail. |
||
16 | !default pari_precision=18 |
||
17 | !default precision=10000 |
||
18 | !default print_precision=8 |
||
19 | wims_print_precision=$print_precision |
||
20 | maxima_precision=$print_precision |
||
21 | !default insplot_set=size 0.6,0.6 |
||
22 | |||
23 | !if $cmd=help |
||
16113 | bpr | 24 | !set module_title=$title |
25 | !set module_author=$author |
||
26 | !set module_address=$email |
||
27 | !exit |
||
20 | reyssat | 28 | !endif |
29 | |||
30 | !read Exindex |
||
31 | exocnt=!itemcnt $exolist |
||
32 | !bound qnum between integer 1 and $exocnt default 1 |
||
33 | !bound qcmlevel between integer 1 and 9 default 3 |
||
34 | !bound random within 0,1 default 1 |
||
35 | !default format=html |
||
36 | |||
37 | !if $cmd notwordof new renew and $status!=waiting |
||
16113 | bpr | 38 | !readproc oef/valback.proc |
39 | error=double_reply |
||
40 | !exit |
||
20 | reyssat | 41 | !endif |
42 | |||
43 | !readproc deduc/imagedir.proc |
||
44 | !distribute items 0,0,0 into postvarcnt,conditioncnt,feedbackcnt |
||
45 | |||
46 | !if $status!=waiting |
||
16113 | bpr | 47 | !read deduc/exo.init |
20 | reyssat | 48 | !else |
16113 | bpr | 49 | !read $deffile |
50 | !readproc oef/valback.proc |
||
20 | reyssat | 51 | !endif |
52 | |||
53 | m_step=$currstep |
||
54 | !if $cmd=reply and $status=waiting |
||
55 | !if $opt iswordof newstep newcase gotocase |
||
16113 | bpr | 56 | !changeto deduc/var.$opt |
20 | reyssat | 57 | !endif |
58 | !readproc deduc/meth$methstep.proc |
||
59 | !if $error!=$empty or $methsubstep>1 |
||
16113 | bpr | 60 | !exit |
20 | reyssat | 61 | !endif |
62 | !advance methstep |
||
63 | !if $methstep<=3 and \ |
||
64 | ($methstep<=2 or \ |
||
65 | (($askcontext>0 and $contextlist!=$empty) or \ |
||
66 | ($askresult>0 and $resultlist!=$empty))) |
||
67 | !exit |
||
68 | !endif |
||
69 | methstep=1 |
||
70 | thisstepnocount=$stepnocounting |
||
71 | !read deduc/methreset |
||
72 | !if $postvarcnt>0 |
||
16113 | bpr | 73 | !read $deffile postdef |
20 | reyssat | 74 | !endif |
75 | ctstep=!char 1 to $currstep of $stepcounting |
||
76 | ctstep=!text select 1 in $ctstep |
||
77 | ctstep=!charcnt $ctstep |
||
78 | !if $earlyscore=$empty |
||
16113 | bpr | 79 | cstep=$[max($m_minsteps,$ctstep-$tolerance)] |
80 | vstep=$[min($ctstep,$cstep)] |
||
81 | uustep=$[max(0,$ustep-$ctstep-max(0,$m_minsteps+$tolerance-$ctstep))] |
||
82 | wstep=$[max(1,$vstep)+$ecoeff*$uustep+$pcoeff*$penalty] |
||
83 | wscore=$[max(0,(($m_minsteps/$wstep)^$scorepower-$scoremin)/(1-$scoremin))] |
||
84 | scoretest=$[min(10,rint(100*$wscore)/10)] |
||
85 | !if $scoretest<=0 |
||
86 | earlyscore=0 |
||
87 | module_score=0 |
||
88 | wims_module_log=score $module_score/10 |
||
89 | !endif |
||
90 | !else |
||
91 | scoretest=$earlyscore |
||
20 | reyssat | 92 | !endif |
16113 | bpr | 93 | !if $thisstepnocount!=yes |
94 | !advance ustep |
||
95 | !endif |
||
96 | !advance currstep |
||
97 | m_step=$currstep |
||
98 | !if $currstep>$cutstep |
||
99 | scoretest=0 |
||
100 | cutstop=yes |
||
101 | !changeto deduc/var.finish |
||
102 | !endif |
||
20 | reyssat | 103 | |
16113 | bpr | 104 | !if $conditioncnt>0 |
105 | !read $deffile test |
||
106 | !else |
||
107 | !read deduc/var.checkgoal |
||
108 | !endif |
||
109 | !if $condtest1=1 or $condtest1=-1 |
||
110 | !read deduc/var.finish |
||
111 | !endif |
||
20 | reyssat | 112 | !endif |