Rev 33 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | reyssat | 1 | |
2 | wims_prefix=class user |
||
3 | !default class_bgcolor=$wims_bgcolor |
||
4 | !default class_bgimg=$wims_bgimg |
||
5 | !default class_theme=$wims_theme |
||
6 | !default class_css=$wims_css |
||
7 | !defread wimshome/log/classes/$c_/.def |
||
8 | !defread $userdef |
||
9 | |||
10 | !if $class_type=4 and $u_!=supervisor and $user_supervisable!=yes\ |
||
11 | and ($wims_class=$empty or ../$wims_superclass/ notin ../$wims_class/) |
||
12 | utest=!itemcnt $user_participate |
||
13 | !if $utest=1 and / isin $user_participate |
||
14 | c_=!item 1 of $user_participate |
||
15 | !defread wimshome/log/classes/$c_/.def |
||
16 | !endif |
||
17 | !endif |
||
18 | !if $class_type iswordof 1 3 and $u_=supervisor and $wims_user=$empty |
||
19 | !exit |
||
20 | !endif |
||
21 | |||
22 | !if $u_=supervisor |
||
23 | sech=$class_secure |
||
24 | sech=!trim $sech |
||
25 | !if $sech=$empty |
||
26 | t=0 |
||
27 | !else |
||
28 | t=!checkhost $sech |
||
29 | !if $t<1 |
||
30 | t=-1 |
||
31 | !endif |
||
32 | !endif |
||
33 | sup_secure=$t |
||
34 | !else |
||
35 | !read ./adm/class/raftest |
||
36 | !if $raftest>$lastallow |
||
37 | !exit |
||
38 | !endif |
||
39 | sup_secure=-1 |
||
40 | !endif |
||
41 | |||
42 | wims_caller= |
||
43 | !read ./adm/class/authprep $c_,$u_ |
||
44 | !writefile wimshome/$wims_sesdir/var.stat $classdef |
||
45 | |||
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=$module\ |
||
54 | w_session=$session\ |
||
55 | w_special_parm=\ |
||
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_worksheet=\ |
||
62 | w_wims_exo=\ |
||
63 | w_wims_isexam=\ |
||
64 | w_wims_ismanager=$wims_ismanager\ |
||
65 | w_wims_mode=$wims_mode\ |
||
66 | w_wims_module_start_time=\ |
||
67 | w_wims_protocol=$wims_protocol\ |
||
68 | w_wims_req_time=$wims_req_time\ |
||
69 | w_wims_scorereg=\ |
||
70 | w_wims_session_serial=$wims_session_serial\ |
||
71 | w_wims_session_start_time=$wims_session_start_time\ |
||
72 | w_wims_sheet= |
||
73 | |||
74 | !if $class_lock = 7 and $u_!=supervisor |
||
75 | !usererror class_closed |
||
7679 | bpr | 76 | !exit |
33 | reyssat | 77 | !endif |
78 | !if $class_lock iswordof 2 4 6 |
||
79 | !set wims_protocol=https |
||
80 | !endif |
||
81 | !sh cd $wims_home\ |
||
82 | rm -Rf $(wims_sesdir)_*\ |
||
83 | mkdir -p log/classes/$c_/score $wims_sesdir/getfile\ |
||
84 | rm -f $wims_sesdir/getfile/oefimages\ |
||
85 | ln -s $wims_home/log/classes/$c_/src/images $wims_sesdir/getfile/oefimages |
||
86 | !restart module=home&cmd=new&lang=$class_lang |