Rev 15316 | Rev 16364 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 15316 | Rev 16355 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | !bound user within $ulist default $empty |
6 | !bound user within $ulist default $empty |
7 | !if $user=$empty |
7 | !if $user=$empty |
8 | error=nouser |
8 | error=nouser |
9 | !exit |
9 | !exit |
10 | !endif |
10 | !endif |
- | 11 | ||
- | 12 | po=!positionof item $user in $ulist |
|
- | 13 | username=$(nlist[$po]) |
|
- | 14 | name_title=$username $name_page $numberses |
|
- | 15 | ||
- | 16 | ||
11 | 17 | ||
12 | !! -------- check if authorized session |
18 | !! -------- check if authorized session |
- | 19 | basesession=!replace _ by , in $wims_session |
|
- | 20 | basesession=!item 1 of $basesession |
|
13 | list_window=!defof $user in wimshome/s2/ |
21 | list_window=!defof $user in wimshome/s2/$basesession/.indexusersession |
14 | nbwindow=!itemcnt $list_window |
22 | nbwindow=!itemcnt $list_window |
15 | !if $numberses<1 or $numberses>$nbwindow |
23 | !if $numberses<1 or $numberses>$nbwindow |
16 | error=usernotintchat |
24 | error=usernotintchat |
17 | !exit |
25 | !exit |
18 | !endif |
26 | !endif |
19 | userses=!item $numberses of $list_window |
27 | userses=!item $numberses of $list_window |
20 | test=!fileexists wimshome/s2/$userses/last.html |
- | |
21 | !if tchat isin $userses |
28 | !if tchat isin $userses |
22 | error=addressplay |
29 | error=addressplay |
23 | !exit |
30 | !exit |
24 | !endif |
31 | !endif |
- | 32 | !reset logfile |
|
- | 33 | !if exam isin $userses |
|
- | 34 | !! case of exercise in an exam |
|
- | 35 | userbasesession=!replace _ by , in $userses |
|
- | 36 | userbasesession=!item 1 of $userbasesession |
|
- | 37 | tmp=!replace internal $(userbasesession)_examt by $empty in $userses |
|
- | 38 | tmp=!replace t by . in $tmp |
|
- | 39 | logfile=wimshome/log/classes/$wims_class/examlog/$user/$userbasesession/$tmp |
|
- | 40 | !else |
|
- | 41 | !! case of an exercise in a sheet |
|
- | 42 | tmp=!defof w_wims_exo,w_wims_sheet,w_module in wimshome/sessions/$userses/var |
|
- | 43 | !distribute item $tmp into userexo,usersheet,exomod |
|
- | 44 | !if $usersheet!=$empty and $userexo!=$empty |
|
- | 45 | logfile=wimshome/sessions/$userses/exolog.$usersheet.$userexo |
|
- | 46 | !else |
|
- | 47 | !! case of a exercise (not in a sheet for exemple in a document) |
|
- | 48 | category=!defof category in wimshome/public_html/modules/$exomod/INDEX |
|
- | 49 | !if exercise isin $category |
|
- | 50 | logfile=wimshome/sessions/$userses/exolog |
|
- | 51 | !endif |
|
- | 52 | !endif |
|
- | 53 | !endif |
|
- | 54 | !if $logfile!=$empty |
|
- | 55 | !! ----------- use adm/class/exolog module to display exo in a sheet or exam |
|
- | 56 | test=!fileexists $logfile |
|
- | 57 | !if $test!=yes |
|
- | 58 | error=addressplay |
|
- | 59 | !exit |
|
- | 60 | !endif |
|
- | 61 | !writefile wimshome/$wims_sesdir/var REMOTE_ADDR=$httpd_REMOTE_ADDR\ |
|
- | 62 | HTTP_REFERER=$httpd_HTTP_REFERER\ |
|
- | 63 | QUERY_STRING=\ |
|
- | 64 | HTTP_USER_AGENT=$httpd_HTTP_USER_AGENT\ |
|
- | 65 | HTTP_COOKIE=$httpd_HTTP_COOKIE\ |
|
- | 66 | w_cmd=new\ |
|
- | 67 | w_lang=$class_lang\ |
|
- | 68 | w_special_parm=1\ |
|
- | 69 | w_special_parm2=\ |
|
- | 70 | w_useropts=$useropts\ |
|
- | 71 | w_wims_session=$wims_session\ |
|
- | 72 | w_wims_subsession=$wims_subsession\ |
|
- | 73 | w_wims_window=$wims_window\ |
|
- | 74 | w_wims_mode=$wims_mode\ |
|
- | 75 | w_wims_module_start_time=\ |
|
- | 76 | w_wims_protocol=$wims_protocol\ |
|
- | 77 | w_wims_req_time=$wims_req_time\ |
|
- | 78 | w_wims_session_serial=$wims_session_serial\ |
|
- | 79 | w_wims_session_start_time=$wims_session_start_time |
|
- | 80 | ||
- | 81 | !setdef wims_checkfile=$logfile in wimshome/$wims_sesdir/var.stat |
|
- | 82 | !setdef wims_checktitle=$name_title in wimshome/sessions/$basesession/var.stat |
|
- | 83 | nbstep=!recordcnt $logfile |
|
- | 84 | !restart module=adm/class/exolog&+cmd=new&+job=examcheck&+checkuser=$user&+checkexo=file&+checkstep=$nbstep |
|
- | 85 | !endif |
|
- | 86 | ||
- | 87 | ||
25 | 88 | ||
26 | po=!positionof item $user in $ulist |
- | |
27 | username=$(nlist[$po]) |
- | |
28 |
|
89 | !! ------------- in case of other ressources use the last.html file in s2. |
29 | 90 | ||
30 | !!basesession=!replace internal _ by , in $userses |
- | |
31 | !!basesession=!item 1 of $basesession |
- | |
32 | !!basesession=!nospace $basesession |
- | |
33 | 91 | ||
34 | !! ---------- make list of file of the user |
92 | !! ---------- make list of file of the user |
35 | !! the file of list_forbiddent are ignored (to be completed if need) |
93 | !! the file of list_forbiddent are ignored (to be completed if need) |
36 | list_forbidden=last.html |
94 | list_forbidden=last.html |
37 | listfile=!sh cd $wims_home/s2/$userses;\ |
95 | listfile=!sh cd $wims_home/s2/$userses;\ |
Line 64... | Line 122... | ||
64 | 122 | ||
65 | warning=workinprogress |
123 | warning=workinprogress |
66 | 124 | ||
67 | !! --- suppress auto refresh (need to put a button to refresh) |
125 | !! --- suppress auto refresh (need to put a button to refresh) |
68 | !let rd=!randint 111111,999999 |
126 | !let rd=!randint 111111,999999 |
69 | !!local_html_header=<META HTTP-EQUIV="Refresh" CONTENT="$(tchat_refreshtiming);wims.cgi?session=$wims_session&+cmd=reply&+module=adm/class/tchat&+job=viewpage&+numberses=$k&+user=$user"> |
- | |
70 | !set wims_menu_items=!append line refresh,1,module=$module&cmd=reply&+module=adm/class/tchat&+job=viewpage&+numberses=$numberses&+user=$user&+serial=$rd to $wims_menu_items |
127 | !set wims_menu_items=!append line refresh,1,module=$module&cmd=reply&+module=adm/class/tchat&+job=viewpage&+numberses=$numberses&+user=$user&+serial=$rd to $wims_menu_items |
71 | 128 | ||
72 | 129 |