Subversion Repositories wimsdev

Rev

Rev 18138 | Rev 18144 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1407 bpr 1
!distribute items $wims_read_parm into i,j
2
!default j=1
3
!set seq_=!record $j of wimshome/log/classes/$wims_class/seq/.sequence$i
4
!distribute line $seq_ into tis_,cos_,obj_,o_
5
!if $o_<1
6
  !exit
7
!endif
16196 bpr 8
!! TODO : maybe this line is already doing in the widget file _widgets/user_varsheet.phtml and
15824 guerimand 9
!! not needed here ?
10
!set wlist=!getscoreweight
11
!! --------
1407 bpr 12
!set TI=!defof sequence_Title in wimshome/log/classes/$wims_class/seq/.def
7907 obado 13
 
7913 obado 14
<div id="wims_seq_$i" class="wims_seq">
12338 bpr 15
!if $jquery_defined!=yes and $i > 1 and $seq=$empty
16
  !read themes/_widgets/topback.phtml wims_seq_summary
17
!endif
11999 obado 18
  <h2 class="wims_title_seq">
19
    <span class="wims_seq_id">$TI $i</span>
9641 obado 20
    <span class="wims_title_item">$tis_</span>
11999 obado 21
  </h2>
9641 obado 22
  <div class="wims_comment_item">$cos_</div>
9555 bpr 23
 
9549 bpr 24
!reset seq_item
11105 bpr 25
!set tmp=!defof DF_SEVERITY in wimshome/public_html/bases/sys/define.conf
26
!distribute words $tmp into tmp_w,tmp_s,tmp_ss
27
 
7913 obado 28
<ul class="wims_work_list">
1407 bpr 29
!set dcnt=!itemcnt $obj_
11848 bpr 30
!set listc=!filelist $wims_home/log/classes/$wims_class/doc
1407 bpr 31
!for i_=1 to $dcnt
7907 obado 32
  !distribute word $(obj_[$i_]) into type,num
33
  !if $type=c
11848 bpr 34
    !set d_=!nospace $(obj_[$i_])
35
    !set num=!positionof line $d_ in $listc
7907 obado 36
    !set d_=!record $num of wimshome/log/classes/$wims_class/doc/.index
37
    !distribute lines $d_ into s_,t_,bidon,bidon,bidon,o_,bidon,bidon,de_
38
    !if $o_>0
9549 bpr 39
      !increase seq_item
7761 bpr 40
      <li class="wims_doc_item">
9549 bpr 41
        <span class="wims_seq_item_n">$seq_item</span>
12338 bpr 42
      !href module=adm/doc&job=read&doc=$s_&block=main&seq=$i $t_
7761 bpr 43
        <div class="wims_doc_desc">$de_</div>
44
      </li>
7907 obado 45
    !endif
46
  !endif
47
  !if $type=doc
48
    !set d_=!record $num of wimshome/log/classes/$wims_class/doc/.docindex
49
    !distribute lines $d_ into s_,t_,ti_,de_,o_,w_
50
    !if $o_>0
9549 bpr 51
      !increase seq_item
7907 obado 52
      <li class="wims_doc_item">
9549 bpr 53
        <span class="wims_seq_item_n">$seq_item</span>
11848 bpr 54
        !href module=$s_&$t_&seq=$i&name=$wims_name_sequence&wksheet=$w_ $ti_
7907 obado 55
        <div class="wims_doc_desc">$de_</div>
56
      </li>
57
    !endif
58
    !reset s_,t_,ti_,de_,o_
59
  !endif
12338 bpr 60
  !if $type=tool
61
    !set d_=!record $num of wimshome/log/classes/$wims_class/tool/.toolindex
62
    !distribute lines $d_ into s_,t_,ti_,de_,o_,w_
63
    !if $o_>0
64
      !increase seq_item
65
      <li class="wims_tool_item">
66
        <span class="wims_seq_item_n">$seq_item</span>
12569 bpr 67
      !href module=$s_&$t_&seq=$i&name=$wims_name_sequence&wksheet=$w_ $ti_
12338 bpr 68
        <div class="wims_tool_desc">$de_</div>
69
      </li>
70
    !endif
71
    !reset s_,t_,ti_,de_,o_
72
  !endif
12569 bpr 73
  !if $type=glossary
74
    !set d_=!record $num of wimshome/log/classes/$wims_class/tool/.glossaryindex
75
    !distribute lines $d_ into o_,t_,de_
76
    !if $o_>0
77
      !increase seq_item
78
      <li class="wims_glossary_item">
79
        <span class="wims_seq_item_n">$seq_item</span>
80
      !href module=adm/tool/glossary&seq=$i&gl=$num&name=$wims_name_sequence $t_
81
        <div class="wims_glossary_desc">$de_</div>
82
      </li>
83
    !endif
84
    !reset t_,o_
85
  !endif
7907 obado 86
  !if $type=sheet
14441 guerimand 87
    !reset hidden_sheet
7907 obado 88
    !set s_=!record $num of wimshome/log/classes/$wims_class/sheets/.sheets
89
    !set sevlist=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
15769 guerimand 90
    !distribute lines $s_ into a_,t_,ti,de,b,b,b,b,b,indivtechvar
14441 guerimand 91
    !if $wims_user!=supervisor
92
    !! ------test if sheet is hidden for this user
18127 bpr 93
    !! !set h_=!line 9 of $s_
94
    !! !if $h_!=$empty
95
    !!   !readproc adm/vfilter/ishiddensheet.proc $h_
96
    !! !endif
14441 guerimand 97
    !! -----end test
18127 bpr 98
      !set tmp_sheetstatus=!getsheetstatus sheet=$num user=$wims_user
14441 guerimand 99
    !endif
18127 bpr 100
    !if $tmp_sheetstatus iswordof 1 2
101
    !!if $a_>=1 and $a_<=2 and $hidden_sheet!=1
7897 bpr 102
      !set formula_list=!record 0 of adm/class/sheetformula
103
      !set scoremax=!line 1 of $sevlist
104
      !default scoremax=10
105
      !set sev_$num=!line $num + 1 of $sevlist
106
      !distribute word $(sev_$num) into w_$num,s,ss
11105 bpr 107
      !bound s between integer 0 and 6 default $tmp_s
108
      !bound ss between integer 0 and 2 default $tmp_ss
7897 bpr 109
      !set f_$num=!item $s+1 of $formula_list
110
      !set f_$num=!replace internal I by I$ss in $(f_$num)
111
      !set pe=!line $num of $percents
112
      !set try=!getscoretry sheet=$num
13309 bpr 113
      !set try0=!text select 123456789 in $try
9549 bpr 114
      !increase seq_item
12370 bpr 115
      <li class="wims_sheet_item" id="sh$num">
9549 bpr 116
        <span class="wims_seq_item_n">$seq_item</span>
12341 bpr 117
      !href module=adm/sheet&sh=$num&seq=$i $ti
7907 obado 118
        <ul class="wims_sheet_info">
12341 bpr 119
      !if showshweight iswordof $class_option
11999 obado 120
            <li class="wims_sheet_weight small">$wims_name_coeff <span class="sheet_weight_num">$(w_$num)</span></li>
12341 bpr 121
      !endif
18139 bpr 122
      !if $tmp_sheetstatus>=2
18127 bpr 123
      !!if  $a_>=2
12341 bpr 124
        <li class="wims_user_sheet_expire"><span class="wims_status wims_status_2">$U_expired</span></li>
125
      !else
126
        !if showshexpire iswordof $class_option
127
          <li class="wims_user_sheet_expire small">
128
          !read misc/expire.phtml.$lang $t_
129
          </li>
130
        !endif
131
      !endif
132
      </ul>
133
      <div class="wims_user_info">
13309 bpr 134
      !if $try0!=$empty
12341 bpr 135
        !distribute words $pe into p1,p2,p3,p4
136
        !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_
137
        !set ff_$num=!mathsubst Q=$y_ in $(f_$num)
138
        !for sev=0 to 2
139
          !set ff_$num=!mathsubst I$sev=$(x$(sev)_) in $(ff_$num)
140
        !next
141
        <span class="wims_sheet_score">
16198 bpr 142
        !!! adm/class/userscore/getuser.phtml
143
        !!! adm/class/userscore/csv/download.proc
144
        !!! themes/_widgets/usersheet.phtml
145
          $(wims_name_thsheet[9]): $[rint(100*$scoremax*$(ff_$num))/100]/$scoremax
16196 bpr 146
        !!$(wims_name_thsheet[5]): $p1%,
147
        !!$(wims_name_thsheet[7]): $[$p2]/10,
148
        !!$(wims_name_thsheet[10]): $p3%,
149
        !!$(wims_name_thsheet[13]): $[$p4/10]/10
12341 bpr 150
        </span>
151
      !endif
12821 bpr 152
      </div>
153
      <div class="wims_sheet_desc">
12341 bpr 154
      !set cut=!detag $de
155
      !set lim=100
156
      !set cut=!char 1 to $lim of $cut
157
      !set cutcnt=!wordcnt $cut
158
      !set cutchar=!charcnt $cut
159
      !if $cutchar = $lim
160
        !set cutlim=$[$cutcnt-1]
161
      !else
162
        !set cutlim=$[$cutcnt]
163
      !endif
164
      !word 1 to $cutlim of $cut
165
      !if $cutchar=$lim
166
        !set wims_ref_class=wims_button_help smaller
167
        !set wims_ref_title= Voir la description complete.
168
        !href module=adm/sheet&sh=$num&seq=$i [...]
169
      !endif
170
      </div><!--wims_sheet_desc-->
15769 guerimand 171
      !! ------ download techvarvalue for individual sheet
172
      !if $indivtechvar!=$empty
173
        !set indivtechval_$num=!defof user_techvar_$(indivtechvar) in $userdef
174
      !else
175
        !reset indivtechval_$num
176
      !endif
177
      !! ------ end individual sheet
12341 bpr 178
      !read theme.phtml _widgets/userbar.phtml $num
7907 obado 179
      </li><!--wims_sheet_item-->
180
      !reset a_,t_,ti,de
1407 bpr 181
    !endif
182
  !endif
7907 obado 183
  !if $type=vote
184
    !set v_=!record $num of wimshome/log/classes/$wims_class/vote/.votes
13655 bpr 185
    !distribute lines $v_ into a_,t_
7907 obado 186
    !if $a_>=1 and $a_<=2
9549 bpr 187
      !increase seq_item
7907 obado 188
      <li class="wims_vote_item">
9549 bpr 189
        <span class="wims_seq_item_n">$seq_item</span>
12338 bpr 190
      !href module=adm/vote&job=read&vote=$num&seq=$i $t_
7907 obado 191
      </li>
192
    !endif
13655 bpr 193
    !reset a_,t_
7907 obado 194
  !endif
14769 guerimand 195
  !if $type=freework
196
    !set v_=!record $num of wimshome/log/classes/$wims_class/freeworks/.freeworks
17440 guerimand 197
    !distribute lines $v_ into a_,bl,t_,de,bl,bl,tt_
14769 guerimand 198
    !if $a_>=1 and $a_<=2
199
      !increase seq_item
200
      <li class="wims_freework_item">
201
        <span class="wims_seq_item_n">$seq_item</span>
202
      !href module=adm/class/freework&freework=$num&seq=$i $t_
203
        <div class="wims_freework_desc">$de</div>
17440 guerimand 204
        <ul class="wims_freework_info">
205
          <li class="wims_user_freework_expire small">
206
          !read misc/expire.phtml.$lang $tt_
207
          </li>
208
        </ul>
14769 guerimand 209
      </li>
210
    !endif
211
    !reset a_,t_,bl,de
212
  !endif
7907 obado 213
  !if $type=exam
16006 guerimand 214
    !reset hidden_sheet
7907 obado 215
    !set e_=!record $num of wimshome/log/classes/$wims_class/exams/.exams
16110 guerimand 216
    !distribute lines $e_ into a_,ex_,du_,title_,de_,bl,bl,h_
16006 guerimand 217
    !! ------test if exam is hidden for this user
18127 bpr 218
    !if $h_!=$empty
219
      !readproc adm/vfilter/ishiddensheet.proc $h_
220
    !endif
16006 guerimand 221
    !! -----end test
18127 bpr 222
    !set tmp_sheetstatus=!getsheetstatus exam=$num user=$wims_user
223
    !if $tmp_sheetstatus iswordof 1 2
224
    !!if $a_>=1 and $a_<=2 and $hidden_sheet!=1
9549 bpr 225
      !increase seq_item
7907 obado 226
      <li class="wims_exam_item">
9549 bpr 227
        <span class="wims_seq_item_n">$seq_item</span>
16110 guerimand 228
      !href module=adm/class/exam&exam=$num&seq=$i $title_
7907 obado 229
        <span class="wims_user_exam_expire">
18127 bpr 230
      !if $tmp_sheetstatus iswordof 2 3
231
      !!if $a_>=2
12338 bpr 232
        <span class="wims_status wims_status_2">$U_expired</span>
233
      !else
234
        !if showexexpire iswordof $class_option
235
          !read misc/expire.phtml.$lang $ex_
236
        !else
237
          &nbsp;
238
        !endif
239
      !endif
240
      </span>
241
      <div class="wims_exam_desc">$de_</div>
15571 bpr 242
      !read theme.phtml _widgets/userexambar.phtml $num
12338 bpr 243
    </li>
7907 obado 244
    !endif
16110 guerimand 245
    !reset a_,ex_,du_,nb_,title_,de_
7907 obado 246
  !endif
7666 bpr 247
 
7907 obado 248
  !reset s_ v_ d_ e_
249
!next i_
250
</ul>
7913 obado 251
</div>
11105 bpr 252
!reset tmp  tmp_w tmp_s tmp_ss