1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
option:precision=" " color1=" " color2=" "
reply=$(reply$i)
replygood=$(replygood$i)
script=!line 1 to -2 of $(oef_answer_option$i)
script1=$script
liste_variable=!line -1 of $(oef_answer_option$i)
tmp=$(oef_answer_option$i)
!distribute word $(tmp[1]) into jbox, your_brd
!if [ isin $temp[2] and ] isin $temp[2]
!set responsive=yes
!endif
!reset tmp
script1=!replace internal $jbox by new$jbox in $script1
script1=!replace internal $your_brd by new$your_brd in $script1
cnt_variable=!itemcnt $liste_variable
!for j = 1 to $cnt_variable
!if $(reply[$j;2])=$empty
!set script=!replace internal $(liste_variable[$j]) by $(reply[$j;]) in $script
!else
!set script=!replace internal $(liste_variable[$j]) by [$(reply[$j;])] in $script
!endif
!set tmp=!replace internal var by rep in $(liste_variable[$j])
!set script=$script\
$tmp.setProperty({fixed:true})
!if \ notin $(replygood[$j;])
!if $(reply[$j;2])=$empty
!set script1=!replace internal new$(liste_variable[$j]) by $(replygood[$j;]) in $script1
!else
!set script1=!replace internal new$(liste_variable[$j]) by [$(replygood[$j;])] in $script1
!endif
!set tmp=new$tmp
!set script1=$script1\
$tmp.setProperty({fixed:true});
!reset tmp
!set script1=$script1\
$tmp.setProperty({fixed:true})
!reset tmp
!endif
!next
!if free isin $reply
free_var=$(reply[-1;])
free_var=!getopt free in $free_var
free_var_cnt=!itemcnt $free_var
!for j = 1 to $[$free_var_cnt/2]
script=!append line $(your_brd).create('point',[$(free_var[2*$j-1]), $(free_var[2*$j])],{size: 1,showInfobox: false,name:'',fixed:true}) ; to $script
!next
!endif
precision=!getopt precision in $(replyoption$i)
!default precision=10
!if $responsive=yes
!readproc slib/geo2D/jsxgraph $script
!else
!readproc slib/geo2D/jsxgraph $script; $(your_brd).suspendUpdate() ;
!endif
reply_$i=$slib_out
!! bonne reponse
!!!readproc slib/geo2D/jsxgraph $script1; $(your_brd).suspendUpdate() ;
!!reply_$i=$(reply_$i) $slib_out
!! if empty, take the value of reply_$i
!! enlever le ; de la fin
reply$i=!nonempty lines $(reply$i)
reply$i=!nonempty rows $(reply$i)
reply$i=!replace internal free= by in $(reply$i)
m_reply$i=$(reply$i)
reply__$i=
!if $wims_read_parm=nocompare
!exit
!endif
!! on analyse numeriquement la reponse
!reset cnt_rep sc
!set replygood=!lines2rows $(replygood$i)
!for j= 1 to $cnt_variable
!if \ notin $(replygood[$j;]) and $(replygood[$j;]) != $empty
!increase cnt_rep
!set c=!itemcnt $(replygood[$j;])
!for u=1 to $c
good_=$(replygood[$j;$u])
!ifval abs($good_ - $(reply$i[$j;$u])) < 1/$precision
sc=$sc 1/$c
!else
sc=$sc 0
!endif
!if $u < $c
sc=$sc,
!endif
!next
!endif
sc=$sc;
!next
sc=!nonempty rows $sc
sc=!nonempty items $sc
score=!replace internal ; by , in $sc
score=!replace internal , by + in $score
score=$[($score)/$cnt_rep]
freegot=$[$freegot+$score]
!if $score=1
diareply$i=good
!else
!if $score > 0.3
partialgood$i=yes
diareply$i=good
!else
diareply$i=bad
!endif
!endif
|