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