Subversion Repositories wimsdev

Rev

Rev 16110 | Rev 16198 | 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
93
      !set h_=!line 9 of $s_
94
      !if $h_!=$empty
95
        !readproc adm/vfilter/ishiddensheet.proc $h_
96
      !endif
97
    !! -----end test
98
    !endif
99
    !if $a_>=1 and $a_<=2 and $hidden_sheet!=1
7897 bpr 100
      !set formula_list=!record 0 of adm/class/sheetformula
101
      !set scoremax=!line 1 of $sevlist
102
      !default scoremax=10
103
      !set sev_$num=!line $num + 1 of $sevlist
104
      !distribute word $(sev_$num) into w_$num,s,ss
11105 bpr 105
      !bound s between integer 0 and 6 default $tmp_s
106
      !bound ss between integer 0 and 2 default $tmp_ss
7897 bpr 107
      !set f_$num=!item $s+1 of $formula_list
108
      !set f_$num=!replace internal I by I$ss in $(f_$num)
109
      !set pe=!line $num of $percents
110
      !set try=!getscoretry sheet=$num
13309 bpr 111
      !set try0=!text select 123456789 in $try
9549 bpr 112
      !increase seq_item
12370 bpr 113
      <li class="wims_sheet_item" id="sh$num">
9549 bpr 114
        <span class="wims_seq_item_n">$seq_item</span>
12341 bpr 115
      !href module=adm/sheet&sh=$num&seq=$i $ti
7907 obado 116
        <ul class="wims_sheet_info">
12341 bpr 117
      !if showshweight iswordof $class_option
11999 obado 118
            <li class="wims_sheet_weight small">$wims_name_coeff <span class="sheet_weight_num">$(w_$num)</span></li>
12341 bpr 119
      !endif
120
      !if $a_>=2
121
        <li class="wims_user_sheet_expire"><span class="wims_status wims_status_2">$U_expired</span></li>
122
      !else
123
        !if showshexpire iswordof $class_option
124
          <li class="wims_user_sheet_expire small">
125
          !read misc/expire.phtml.$lang $t_
126
          </li>
127
        !endif
128
      !endif
129
      </ul>
130
      <div class="wims_user_info">
13309 bpr 131
      !if $try0!=$empty
12341 bpr 132
        !distribute words $pe into p1,p2,p3,p4
133
        !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_
134
        !set ff_$num=!mathsubst Q=$y_ in $(f_$num)
135
        !for sev=0 to 2
136
          !set ff_$num=!mathsubst I$sev=$(x$(sev)_) in $(ff_$num)
137
        !next
138
        <span class="wims_sheet_score">
16196 bpr 139
        !!!compare with adm/class/userscore/getuser.phtml
12341 bpr 140
          $(wims_name_thsheet[9]): $[ceil(100*$scoremax*$(ff_$num))/100]/$scoremax
16196 bpr 141
        !!$(wims_name_thsheet[5]): $p1%,
142
        !!$(wims_name_thsheet[7]): $[$p2]/10,
143
        !!$(wims_name_thsheet[10]): $p3%,
144
        !!$(wims_name_thsheet[13]): $[$p4/10]/10
12341 bpr 145
        </span>
146
      !endif
12821 bpr 147
      </div>
7775 bpr 148
 
12821 bpr 149
      <div class="wims_sheet_desc">
12341 bpr 150
      !set cut=!detag $de
151
      !set lim=100
152
      !set cut=!char 1 to $lim of $cut
153
      !set cutcnt=!wordcnt $cut
154
      !set cutchar=!charcnt $cut
155
      !if $cutchar = $lim
156
        !set cutlim=$[$cutcnt-1]
157
      !else
158
        !set cutlim=$[$cutcnt]
159
      !endif
160
      !word 1 to $cutlim of $cut
161
      !if $cutchar=$lim
162
        !set wims_ref_class=wims_button_help smaller
163
        !set wims_ref_title= Voir la description complete.
164
        !href module=adm/sheet&sh=$num&seq=$i [...]
165
      !endif
166
      </div><!--wims_sheet_desc-->
15769 guerimand 167
      !! ------ download techvarvalue for individual sheet
168
      !if $indivtechvar!=$empty
169
        !set indivtechval_$num=!defof user_techvar_$(indivtechvar) in $userdef
170
      !else
171
        !reset indivtechval_$num
172
      !endif
173
      !! ------ end individual sheet
12341 bpr 174
      !read theme.phtml _widgets/userbar.phtml $num
7907 obado 175
      </li><!--wims_sheet_item-->
176
      !reset a_,t_,ti,de
1407 bpr 177
    !endif
178
  !endif
7907 obado 179
  !if $type=vote
180
    !set v_=!record $num of wimshome/log/classes/$wims_class/vote/.votes
13655 bpr 181
    !distribute lines $v_ into a_,t_
7907 obado 182
    !if $a_>=1 and $a_<=2
9549 bpr 183
      !increase seq_item
7907 obado 184
      <li class="wims_vote_item">
9549 bpr 185
        <span class="wims_seq_item_n">$seq_item</span>
12338 bpr 186
      !href module=adm/vote&job=read&vote=$num&seq=$i $t_
7907 obado 187
      </li>
188
    !endif
13655 bpr 189
    !reset a_,t_
7907 obado 190
  !endif
14769 guerimand 191
  !if $type=freework
192
    !set v_=!record $num of wimshome/log/classes/$wims_class/freeworks/.freeworks
193
    !distribute lines $v_ into a_,bl,t_,de
194
    !if $a_>=1 and $a_<=2
195
      !increase seq_item
196
      <li class="wims_freework_item">
197
        <span class="wims_seq_item_n">$seq_item</span>
198
      !href module=adm/class/freework&freework=$num&seq=$i $t_
199
        <div class="wims_freework_desc">$de</div>
200
      </li>
201
    !endif
202
    !reset a_,t_,bl,de
203
  !endif
7907 obado 204
  !if $type=exam
16006 guerimand 205
    !reset hidden_sheet
7907 obado 206
    !set e_=!record $num of wimshome/log/classes/$wims_class/exams/.exams
16110 guerimand 207
    !distribute lines $e_ into a_,ex_,du_,title_,de_,bl,bl,h_
16006 guerimand 208
    !! ------test if exam is hidden for this user
209
      !if $h_!=$empty
210
        !readproc adm/vfilter/ishiddensheet.proc $h_
211
      !endif
212
    !! -----end test
213
    !if $a_>=1 and $a_<=2 and $hidden_sheet!=1
9549 bpr 214
      !increase seq_item
7907 obado 215
      <li class="wims_exam_item">
9549 bpr 216
        <span class="wims_seq_item_n">$seq_item</span>
16110 guerimand 217
      !href module=adm/class/exam&exam=$num&seq=$i $title_
7907 obado 218
        <span class="wims_user_exam_expire">
12338 bpr 219
      !if $a_>=2
220
        <span class="wims_status wims_status_2">$U_expired</span>
221
      !else
222
        !if showexexpire iswordof $class_option
223
          !read misc/expire.phtml.$lang $ex_
224
        !else
225
          &nbsp;
226
        !endif
227
      !endif
228
      </span>
229
      <div class="wims_exam_desc">$de_</div>
15571 bpr 230
      !read theme.phtml _widgets/userexambar.phtml $num
12338 bpr 231
    </li>
7907 obado 232
    !endif
16110 guerimand 233
    !reset a_,ex_,du_,nb_,title_,de_
7907 obado 234
  !endif
7666 bpr 235
 
7907 obado 236
  !reset s_ v_ d_ e_
237
!next i_
238
</ul>
7913 obado 239
</div>
11105 bpr 240
!reset tmp  tmp_w tmp_s tmp_ss