Subversion Repositories wimsdev

Rev

Rev 12569 | Rev 13309 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  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
  8. !set wlist=!record 0 of wimshome/log/classes/$wims_class/sheets/.weight
  9. !set TI=!defof sequence_Title in wimshome/log/classes/$wims_class/seq/.def
  10.  
  11. <div id="wims_seq_$i" class="wims_seq">
  12. !if $jquery_defined!=yes and $i > 1 and $seq=$empty
  13.   !read themes/_widgets/topback.phtml wims_seq_summary
  14. !endif
  15.   <h2 class="wims_title_seq">
  16.     <span class="wims_seq_id">$TI $i</span>
  17.     <span class="wims_title_item">$tis_</span>
  18.   </h2>
  19.   <div class="wims_comment_item">$cos_</div>
  20.  
  21. !reset seq_item
  22. !set tmp=!defof DF_SEVERITY in wimshome/public_html/bases/sys/define.conf
  23. !distribute words $tmp into tmp_w,tmp_s,tmp_ss
  24.  
  25. <ul class="wims_work_list">
  26. !set dcnt=!itemcnt $obj_
  27. !set listc=!filelist $wims_home/log/classes/$wims_class/doc
  28. !for i_=1 to $dcnt
  29.   !distribute word $(obj_[$i_]) into type,num
  30.   !if $type=c
  31.     !set d_=!nospace $(obj_[$i_])
  32.     !set num=!positionof line $d_ in $listc
  33.     !set d_=!record $num of wimshome/log/classes/$wims_class/doc/.index
  34.     !distribute lines $d_ into s_,t_,bidon,bidon,bidon,o_,bidon,bidon,de_
  35.     !if $o_>0
  36.       !increase seq_item
  37.       <li class="wims_doc_item">
  38.         <span class="wims_seq_item_n">$seq_item</span>
  39.       !href module=adm/doc&job=read&doc=$s_&block=main&seq=$i $t_
  40.         <div class="wims_doc_desc">$de_</div>
  41.       </li>
  42.     !endif
  43.   !endif
  44.   !if $type=doc
  45.     !set d_=!record $num of wimshome/log/classes/$wims_class/doc/.docindex
  46.     !distribute lines $d_ into s_,t_,ti_,de_,o_,w_
  47.     !if $o_>0
  48.       !increase seq_item
  49.       <li class="wims_doc_item">
  50.         <span class="wims_seq_item_n">$seq_item</span>
  51.         !href module=$s_&$t_&seq=$i&name=$wims_name_sequence&wksheet=$w_ $ti_
  52.         <div class="wims_doc_desc">$de_</div>
  53.       </li>
  54.     !endif
  55.     !reset s_,t_,ti_,de_,o_
  56.   !endif
  57.   !if $type=tool
  58.     !set d_=!record $num of wimshome/log/classes/$wims_class/tool/.toolindex
  59.     !distribute lines $d_ into s_,t_,ti_,de_,o_,w_
  60.     !if $o_>0
  61.       !increase seq_item
  62.       <li class="wims_tool_item">
  63.         <span class="wims_seq_item_n">$seq_item</span>
  64.       !href module=$s_&$t_&seq=$i&name=$wims_name_sequence&wksheet=$w_ $ti_
  65.         <div class="wims_tool_desc">$de_</div>
  66.       </li>
  67.     !endif
  68.     !reset s_,t_,ti_,de_,o_
  69.   !endif
  70.   !if $type=glossary
  71.     !set d_=!record $num of wimshome/log/classes/$wims_class/tool/.glossaryindex
  72.     !distribute lines $d_ into o_,t_,de_
  73.     !if $o_>0
  74.       !increase seq_item
  75.       <li class="wims_glossary_item">
  76.         <span class="wims_seq_item_n">$seq_item</span>
  77.       !href module=adm/tool/glossary&seq=$i&gl=$num&name=$wims_name_sequence $t_
  78.         <div class="wims_glossary_desc">$de_</div>
  79.       </li>
  80.     !endif
  81.     !reset t_,o_
  82.   !endif
  83.   !if $type=sheet
  84.     !set s_=!record $num of wimshome/log/classes/$wims_class/sheets/.sheets
  85.     !set sevlist=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
  86.     !distribute lines $s_ into a_,t_,ti,de
  87.     !if $a_>=1 and $a_<=2
  88.       !set formula_list=!record 0 of adm/class/sheetformula
  89.       !set scoremax=!line 1 of $sevlist
  90.       !default scoremax=10
  91.       !set sev_$num=!line $num + 1 of $sevlist
  92.       !distribute word $(sev_$num) into w_$num,s,ss
  93.       !bound s between integer 0 and 6 default $tmp_s
  94.       !bound ss between integer 0 and 2 default $tmp_ss
  95.       !set f_$num=!item $s+1 of $formula_list
  96.       !set f_$num=!replace internal I by I$ss in $(f_$num)
  97.       !set pe=!line $num of $percents
  98.       !set try=!getscoretry sheet=$num
  99.       !set try=!text select 123456789 in $try
  100.       !increase seq_item
  101.       <li class="wims_sheet_item" id="sh$num">
  102.         <span class="wims_seq_item_n">$seq_item</span>
  103.       !href module=adm/sheet&sh=$num&seq=$i $ti
  104.         <ul class="wims_sheet_info">
  105.       !if showshweight iswordof $class_option
  106.             <li class="wims_sheet_weight small">$wims_name_coeff <span class="sheet_weight_num">$(w_$num)</span></li>
  107.       !endif
  108.       !if $a_>=2
  109.         <li class="wims_user_sheet_expire"><span class="wims_status wims_status_2">$U_expired</span></li>
  110.       !else
  111.         !if showshexpire iswordof $class_option
  112.           <li class="wims_user_sheet_expire small">
  113.           !read misc/expire.phtml.$lang $t_
  114.           </li>
  115.         !endif
  116.       !endif
  117.       </ul>
  118.       <div class="wims_user_info">
  119.       !if $try!=$empty
  120.         !distribute words $pe into p1,p2,p3,p4
  121.         !distribute item $[$p1/100],$[$p2/10],$[$p3/100],$[$p4/100] into x0_,y_,x1_,x2_
  122.         !set ff_$num=!mathsubst Q=$y_ in $(f_$num)
  123.         !for sev=0 to 2
  124.           !set ff_$num=!mathsubst I$sev=$(x$(sev)_) in $(ff_$num)
  125.         !next
  126.         <span class="wims_sheet_score">
  127.           $(wims_name_thsheet[9]): $[ceil(100*$scoremax*$(ff_$num))/100]/$scoremax
  128.    !!     $(wims_name_thsheet[5]): $p1%,
  129.    !!     $(wims_name_thsheet[7]): $[$p2]/10,
  130.    !!     $(wims_name_thsheet[10]): $p3%,
  131.    !!     $(wims_name_thsheet[13]): $[$p4/10]/10
  132.         </span>
  133.       !endif
  134.       </div>
  135.  
  136.       <div class="wims_sheet_desc">
  137.       !set cut=!detag $de
  138.       !set lim=100
  139.       !set cut=!char 1 to $lim of $cut
  140.       !set cutcnt=!wordcnt $cut
  141.       !set cutchar=!charcnt $cut
  142.       !if $cutchar = $lim
  143.         !set cutlim=$[$cutcnt-1]
  144.       !else
  145.         !set cutlim=$[$cutcnt]
  146.       !endif
  147.       !word 1 to $cutlim of $cut
  148.       !if $cutchar=$lim
  149.         !set wims_ref_class=wims_button_help smaller
  150.         !set wims_ref_title= Voir la description complete.
  151.         !href module=adm/sheet&sh=$num&seq=$i [...]
  152.       !endif
  153.       </div><!--wims_sheet_desc-->
  154.       !read theme.phtml _widgets/userbar.phtml $num
  155.       </li><!--wims_sheet_item-->
  156.       !reset a_,t_,ti,de
  157.     !endif
  158.   !endif
  159.   !if $type=vote
  160.     !set v_=!record $num of wimshome/log/classes/$wims_class/vote/.votes
  161.     !distribute lines $v_ into a_,t_,ti,de_
  162.     !if $a_>=1 and $a_<=2
  163.       !increase seq_item
  164.       <li class="wims_vote_item">
  165.         <span class="wims_seq_item_n">$seq_item</span>
  166.       !href module=adm/vote&job=read&vote=$num&seq=$i $t_
  167.         <div class="wims_vote_desc">$de_</div>
  168.       </li>
  169.     !endif
  170.     !reset a_,t_,ti,de_
  171.   !endif
  172.   !if $type=exam
  173.     !set e_=!record $num of wimshome/log/classes/$wims_class/exams/.exams
  174.     !distribute lines $e_ into a_,ex_,du_,t_,de_
  175.     !if $a_>=1 and $a_<=2
  176.       !increase seq_item
  177.       <li class="wims_exam_item">
  178.         <span class="wims_seq_item_n">$seq_item</span>
  179.       !href module=adm/class/exam&exam=$num&seq=$i $t_
  180.         <span class="wims_user_exam_expire">
  181.       !if $a_>=2
  182.         <span class="wims_status wims_status_2">$U_expired</span>
  183.       !else
  184.         !if showexexpire iswordof $class_option
  185.           !read misc/expire.phtml.$lang $ex_
  186.         !else
  187.           &nbsp;
  188.         !endif
  189.       !endif
  190.       </span>
  191.       <div class="wims_exam_desc">$de_</div>
  192.     </li>
  193.     !endif
  194.     !reset a_,ex_,du_,nb_,t_,de_
  195.   !endif
  196.  
  197.   !reset s_ v_ d_ e_
  198. !next i_
  199. </ul>
  200. </div>
  201. !reset tmp  tmp_w tmp_s tmp_ss
  202.