Rev 18406 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
18217 | bpr | 1 | !!!! |
7270 | bpr | 2 | !read getparm $module_init_parm wksheet |
18052 | bpr | 3 | !setdef wims_wksheet=$get_wksheet in wimshome/sessions/$wims_session/var.stat |
7270 | bpr | 4 | |
14431 | bpr | 5 | !if \ isin $parm1 |
12490 | bpr | 6 | !for p in 1 |
7 | !set parm$p=!slashsubst $(parm$p) |
||
8 | !next p |
||
23 | reyssat | 9 | !endif |
18406 | bpr | 10 | !set parms=!slashsubst $(parms) |
23 | reyssat | 11 | !set add=$parm1 |
12 | !if ? isin $add |
||
13 | !set add=!translate internal ? to , in $add |
||
14 | !set add=!item 2 of $add |
||
15 | !endif |
||
16 | !set eq== |
||
18009 | bpr | 17 | !!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise |
23 | reyssat | 18 | !if $eq notin $add and $wims_class>0 and / isin $add \ |
12490 | bpr | 19 | and $prim iswordof exercise tool |
20 | !set add=!translate internal / to $ $ in $add |
||
21 | !distribute words $add into sh,ex |
||
22 | !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh |
||
18014 | bpr | 23 | !set sev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity |
24 | !set sev=!line $sh+1 of $sev |
||
12490 | bpr | 25 | !distribute lines $l_ into m_,p_,a_,b_,t_,d_ |
26 | !set m_exotitle=$t_ |
||
27 | !set m_exodescription=$d_ |
||
28 | !set prompt=!item 2 to -1 of $parms |
||
29 | !default prompt=$t_ |
||
18014 | bpr | 30 | !read docu/scoreprint $sh/$ex,$sev |
12490 | bpr | 31 | !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt |
32 | !exit |
||
23 | reyssat | 33 | !endif |
18057 | bpr | 34 | !set add=!replace internal &+ by & in $add |
35 | !set add=!replace internal %2F by / in $add |
||
18052 | bpr | 36 | !read getparm $add wksheet |
23 | reyssat | 37 | !set add=!translate internal & to $ $ in $add |
38 | !set n=!wordcnt $add |
||
18343 | bpr | 39 | !reset nadd,lmod,lses,lcmd naddw nadd1 |
23 | reyssat | 40 | !for i=1 to $n |
12490 | bpr | 41 | !set l=!word $i of $add |
42 | !set ll=!translate = to , in $l |
||
43 | !distribute items $ll into l1,l2 |
||
44 | !if $l1=cmd and $l2 iswordof intro help close |
||
45 | !set lcmd=$l2 |
||
46 | !endif |
||
47 | !if $l1=module |
||
48 | !set lmod=$l2 |
||
49 | !endif |
||
18343 | bpr | 50 | !if $l1 notwordof module cmd session wksheet worksheet |
12490 | bpr | 51 | !set nadd=$nadd $l |
52 | !endif |
||
18343 | bpr | 53 | !if $l1 iswordof worksheet |
54 | !set naddw=$l |
||
55 | !endif |
||
23 | reyssat | 56 | !next i |
57 | !default lmod=home |
||
58 | !default lcmd=new |
||
18009 | bpr | 59 | !set nadd=!trim $nadd |
23 | reyssat | 60 | !set nadd=!translate internal $ $ to & in $nadd |
61 | !set prompt=!item 2 to -1 of $parms |
||
6810 | czzmrn | 62 | !default prompt=!module title_$lang $lmod |
23 | reyssat | 63 | !default prompt=!module title $lmod |
64 | |||
747 | bpr | 65 | !default prompt=$n_unknown |
23 | reyssat | 66 | |
67 | !if $prim=exercise |
||
18345 | bpr | 68 | !reset ww_ naddw work |
69 | !if $naddw!= |
||
70 | !set ww_=$naddw |
||
71 | !else |
||
18009 | bpr | 72 | !set ww_=&worksheet=$get_wksheet |
18345 | bpr | 73 | !if $get_wksheet!=$empty and $get_wksheet!=0 |
74 | !set work=!getexoindex module=$lmod param=$nadd sheet=$get_wksheet |
||
75 | !endif |
||
76 | !if $work=$empty |
||
77 | !set work=!getexoindex module=$lmod param=$nadd |
||
78 | !endif |
||
18014 | bpr | 79 | !if $work!=$empty |
80 | !read docu/scoreprint $work |
||
18345 | bpr | 81 | !set ww_=&worksheet=$tmp_sheet |
18014 | bpr | 82 | !endif |
10032 | bpr | 83 | !endif |
18345 | bpr | 84 | !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt |
10032 | bpr | 85 | !if $lcmd=new |
12490 | bpr | 86 | !set nadd=!replace internal &+ by & in $nadd |
87 | !set nadd=!char 2 to -1 of $nadd |
||
88 | !set sheetdata=$sheetdata\ |
||
23 | reyssat | 89 | :$lmod\ |
90 | $nadd\ |
||
91 | 10\ |
||
92 | 1\ |
||
93 | $prompt\ |
||
5378 | bpr | 94 | \ |
95 | \ |
||
96 | \ |
||
97 | module=$module&doc=$doc&block=$block&cmd=new,9\ |
||
23 | reyssat | 98 | |
12490 | bpr | 99 | !endif |
23 | reyssat | 100 | !endif |
101 | !if $prim=tool |
||
18215 | bpr | 102 | !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt |
23 | reyssat | 103 | !endif |
104 | !if $prim=doc |
||
18217 | bpr | 105 | !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt |
23 | reyssat | 106 | !endif |
107 | !if $prim=example |
||
18215 | bpr | 108 | !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt |
23 | reyssat | 109 | !endif |
110 | !if $prim=help |
||
18215 | bpr | 111 | !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt |
23 | reyssat | 112 | !endif |
113 | !if $prim=adm |
||
18574 | bpr | 114 | !href module=$lmod&cmd=$lcmd&$nadd $prompt |
23 | reyssat | 115 | !endif |
18009 | bpr | 116 | !if $prim=glose |
117 | !set lcmd=reply |
||
118 | !set nadd=!replace internal & by &special_parm= in $nadd |
||
119 | !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt |
||
120 | !endif |