Rev 3111 | Rev 12555 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
20 | reyssat | 1 | !if wimshome/ notin $logfile |
2 | logfile=wimshome/log/$logfile |
||
3 | !endif |
||
4 | !bound checkexo within $exos default $ |
||
5 | !if $checkexo=$empty |
||
6 | error=bad_exo |
||
7 | !exit |
||
8 | !endif |
||
9 | checkexo=!item -1 of $checkexo |
||
10 | cexo=!translate . to , in $checkexo |
||
11 | !distribute item $cexo into exam,exo |
||
12 | score=!getdef w_module_score in $logfile |
||
13 | !if exam isin $logfile |
||
14 | !default score=!sh awk '/^E/ && $$2=="$checksession" && $$3==$exam && $$4==$exo && $$5=="score" {print $$6}' $wims_home/log/classes/$wims_class/noscore/$checkuser |
||
15 | !endif |
||
16 | !default score=00.0 |
||
17 | !writefile wimshome/$wims_sesdir/restart.time |
||
18 | session1=!translate _ to $ $ in $wims_session |
||
19 | session1=!word 1 of $session1 |
||
20 | steps=!recordcnt $logfile |
||
21 | !bound checkstep between integer 1 and $steps default 1 |
||
22 | vars=!record $checkstep of $logfile |
||
23 | vars=!trim $vars |
||
24 | !distribute lines $vars into checkqstr,checkmodule,checkcmd |
||
25 | vars=!line 4 to -1 of $vars |
||
3112 | guerimand | 26 | memchecksession=$checksession |
27 | !if $checksession=$empty |
||
28 | checksession=!replace internal QUERY_STRING= by $empty in $checkqstr |
||
29 | checksession=!replace &+ by & in $checksession |
||
30 | checksession=!translate & to $\ |
||
31 | $ in $checksession |
||
32 | checksession=!replace internal = by , in $checksession |
||
33 | checksession=!replace internal . by , in $checksession |
||
34 | tmp=!column 1 of $checksession |
||
35 | tmp=!positionof item session in $tmp |
||
36 | checksession=$(checksession[$tmp;2]) |
||
37 | !endif |
||
20 | reyssat | 38 | loggedsessiondcl=session=$checksession |
39 | wimssessiondcl=session=$wims_session |
||
40 | !if $loggedsessiondcl isin $vars |
||
41 | vars=!replace $loggedsessiondcl[\._a-z0-9]* by $wimssessiondcl in $vars |
||
42 | !endif |
||
43 | checkmodule=!replace w_module= by $ in $checkmodule |
||
44 | checkqstr=!replace QUERY_STRING= by $ in $checkqstr |
||
45 | checkcmd=!replace w_cmd= by $ in $checkcmd |
||
46 | !writefile wimshome/$wims_sesdir/var REMOTE_ADDR=$httpd_REMOTE_ADDR\ |
||
47 | HTTP_REFERER=$httpd_HTTP_REFERER\ |
||
48 | QUERY_STRING=\ |
||
49 | HTTP_USER_AGENT=$httpd_HTTP_USER_AGENT\ |
||
50 | HTTP_COOKIE=$httpd_HTTP_COOKIE\ |
||
51 | w_cmd=new\ |
||
52 | w_lang=$class_lang\ |
||
53 | w_module=$checkmodule\ |
||
54 | w_session=$session\ |
||
55 | w_special_parm=$checkstep\ |
||
56 | w_special_parm2=\ |
||
57 | w_useropts=$useropts\ |
||
58 | w_wims_session=$wims_session\ |
||
59 | w_wims_subsession=$wims_subsession\ |
||
60 | w_wims_window=$wims_window\ |
||
61 | w_wims_mode=$wims_mode\ |
||
62 | w_wims_module_start_time=\ |
||
63 | w_wims_protocol=$wims_protocol\ |
||
64 | w_wims_req_time=$wims_req_time\ |
||
65 | w_wims_session_serial=$wims_session_serial\ |
||
66 | w_wims_session_start_time=$wims_session_start_time\ |
||
67 | |||
68 | !if $checkcmd iswordof new renew next |
||
69 | !appendfile wimshome/$wims_sesdir/var $vars |
||
3112 | guerimand | 70 | !setdef wims_check=$module,$checkuser,$memchecksession,$checkexo,$steps,$score in wimshome/sessions/$session1/var.stat |
20 | reyssat | 71 | !restart module=$checkmodule&special_parm=$checkstep&cmd=resume |
72 | !else |
||
73 | vars=!record $checkstep-1 of $logfile |
||
74 | vars=!trim $vars |
||
75 | vars=!line 4 to -1 of $vars |
||
76 | loggedsessiondcl=session=$checksession |
||
77 | wimssessiondcl=session=$wims_session |
||
78 | !if $loggedsessiondcl isin $vars |
||
79 | vars=!replace $loggedsessiondcl[\._a-z0-9]* by $wimssessiondcl in $vars |
||
80 | !endif |
||
81 | !appendfile wimshome/$wims_sesdir/var $vars |
||
3110 | bpr | 82 | !!!must be careful if we replace & by & |
20 | reyssat | 83 | checkqstr=!replace &+ by & in $checkqstr |
84 | checkqstr=!translate & to $\ |
||
85 | $ in $checkqstr |
||
86 | checkqstr=!trim $checkqstr |
||
87 | cnt=!linecnt $checkqstr |
||
88 | qstr= |
||
89 | !for i=1 to $cnt |
||
90 | l=!line $i of $checkqstr |
||
91 | eq== |
||
92 | !if &&module$eq notin &&$l and \ |
||
93 | &&session$eq notin &&$l and \ |
||
94 | &&cmd$eq notin &&$l and \ |
||
95 | &&wims_window$eq notin &&$l and \ |
||
96 | &&worksheet$eq notin &&$l |
||
97 | qstr=!append line $l to $qstr |
||
98 | !endif |
||
99 | !next i |
||
3111 | bpr | 100 | !if $checksession isin $qstr |
101 | qstr=!replace $checksession[\._a-z0-9]* by $wims_session in $qstr |
||
3110 | bpr | 102 | !endif |
20 | reyssat | 103 | qstr=!translate $\ |
104 | $ to & in $qstr |
||
105 | !restart module=$checkmodule&cmd=reply&special_parm=$checkstep&$qstr |
||
106 | !endif |