Subversion Repositories wimsdev

Rev

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

  1. !if _check isin $session
  2.  !exit
  3. !endif
  4.  
  5. !read name.phtml.$module_language
  6. !read themes/$wims_theme/lang/name.phtml.$lang
  7. !default wims_homeref_bgcolor=$wims_ref_bgcolor
  8. !read themes/$wims_theme/local.phtml
  9.  
  10. !if exam isin $wims_session
  11.  !set wims_hr_r=$[max(0,$wims_exam_remain)]
  12.  !set wims_hr_rm=$[floor($wims_hr_r/60)]
  13.  !set wims_hr_rs=!char 2,3 of $[$wims_hr_r%60+100]
  14.  !set wims_homeref_special=$wims_name_examremain $wims_hr_rm:$wims_hr_rs ($wims_name_whenloaded)
  15.  !goto rmend
  16. !endif
  17.  
  18. !if $wims_rm_1=no
  19.  !reset wims_rm_1
  20.  !goto local
  21. !endif
  22. !if $wims_rm_1!=$empty
  23.  !goto rm2
  24. !endif
  25. !reset 1_
  26.  
  27. !if _ isin $wims_subsession
  28.  !!set 1_=!append line back2,3,window.close() to $1_
  29. !else
  30.  !!set 1_=!append line class_home,1,session=$wims_session.1 to $1_
  31. !endif
  32.  
  33. !!!if $wims_sheet>0 or P isin $wims_sheet or $wims_sequence>0
  34. !! !if $wims_sequence>0 and $wims_sheet=$empty
  35. !!  !set tmp_=sequence,1,module=home&seq=$wims_sequence
  36. !! !else
  37. !!  !!set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&
  38. !! !endif
  39. !!   !let wims_menu_items=!append line $tmp_ to $wims_menu_items
  40. !!!endif
  41. !if ($wims_sheet>0 or P isin $wims_sheet) and $cmd=reply and $module_score!=$empty
  42.  !if $wims_exo>1
  43.   !let wims_menu_items=!append line previousseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo-1] to $wims_menu_items
  44.  !endif
  45.  !if $wims_exo<$wims_sheetmax
  46.   !let wims_menu_items=!append line nextseries,1,module=home&directworksheet=$wims_sheet.$[$wims_exo+1] to $wims_menu_items
  47.  !endif
  48. !endif
  49.  
  50. !if $wims_sheet!=$empty or _exam isin $wims_session
  51.   !set wims_menu_items=!append line tools,4,module=home,tool to $wims_menu_items
  52. !endif
  53.  
  54. !if $wims_sheet>0 or P isin $wims_sheet
  55.  !if $(wims_exofeedback[$wims_exo;])!=$empty
  56.   !set feedexo=$(wims_exofeedback[$wims_exo;])
  57.   !if $module_score!=$empty and $module_score < $(feedexo[2]) and $module_score >= $(feedexo[3])
  58.     !if $(feedexo[3])=0 or $(feedexo[3])=$empty
  59.       !set 5_=!append line feedbackexo,7,$(feedexo[1]),mfeed to $5_
  60.     !else
  61.       !set 5_=!append line feedbackplus,7,$(feedexo[1]),mfeed to $5_
  62.     !endif
  63.   !endif
  64.  !endif
  65. !endif
  66. !if $cmd=help or $cmd=hint
  67.  !!set 1_=!append line resume,1,cmd=resume to $1_
  68. !endif
  69.  
  70. !if $module_has_intro=yes and $cmd notwordof intro help and\
  71.         $wims_sheet=$empty and exam notin $wims_session and mfeed notin $wims_session
  72.  !!set 1_=!append line intro,1,module=$module&cmd=intro&special_parm=$special_parm&special_parm2=$special_parm2&special_parm3=$special_parm3 to $1_
  73. !endif
  74. !if $module_has_help=yes and $cmd notwordof intro help
  75.  !if $module_help=$empty or $module_help=popup
  76.   !!set 1_=!append line help,4,module=$module&cmd=help&special_parm=$wims_help_parm,mhelp to $1_
  77.  !else
  78.   !!set 1_=!append line help,1,module=$module&cmd=help&special_parm=$wims_help_parm to $1_
  79.  !endif
  80. !endif
  81.  
  82. !!********* Link : "About"
  83. !if $module_has_about=yes and $cmd notwordof help intro and ($wims_user=supervisor or $wims_user=$empty)
  84.    !!set 1_=!append line about,4,module=$module&cmd=help&special_parm=about,mhelp to $1_
  85. !endif
  86.  
  87. !if print isin $job,$job2 or $print!=
  88.   !set 1_=!append line print,3,window.print() to $1_
  89. !endif
  90. !set wims_rm_1=$1_
  91.  
  92. :local
  93. !reset 1_
  94. !! add module links to general links with a separation
  95. !if $wims_menu_items!=$empty
  96.   !set 1_=!append line itemsep,0,\
  97. $wims_menu_items to $1_
  98. !endif
  99. !set wims_rm_0=$1_
  100. !set wims_rm_3=!append line $wims_menu_tabs to $wims_rm_3
  101. :rm2
  102. !if $wims_rm_2!=$empty
  103.  !goto rmend
  104. !endif
  105.  
  106. !set 3_=!mailurl $wims_supervisormail $wims_name_wsup\
  107. $module_title
  108. !set 2_=you,0,$wims_name_you\
  109.  class,0,$wims_classname ($wims_institutionname)\
  110.  wsup,0,$3_
  111. !reset 4_
  112. !if $wims_sheet>0
  113.  !set wims_homeref_scorestat=!getscorestatus sheet=$wims_sheet
  114.  !if $wims_homeref_scorestat=yes and $wims_exodep!=pending
  115.   !if $wims_scorereg!=suspend
  116.    !set wims_homeref_req=!getscorerequire sheet=$wims_sheet work=$wims_exo
  117.    !set wims_homeref_mean=!getscoremean sheet=$wims_sheet work=$wims_exo
  118.    !set wims_homeref_last=!getscorelast sheet=$wims_sheet work=$wims_exo
  119.    !reset wims_name_score
  120.   !if $(wims_severity[2])!=1 or $(wims_severity[2])=$empty
  121.      !set wims_name_score=$(wims_name_thsheet[7]): $[ceil(10*$[$wims_homeref_mean])/10]/10
  122.    !endif
  123.    !if $(wims_severity[3])=2
  124.      !set wims_homeref_level=!getscorelevel sheet=$wims_sheet work=$wims_exo
  125.      !set wims_name_score=$wims_name_score<br />$(wims_name_thsheet[13]): $wims_homeref_level/10
  126.      !! I1
  127.    !else
  128.      !if $(wims_severity[3])=1
  129.        !set wims_homeref_best=!getscorebest sheet=$wims_sheet work=$wims_exo
  130.        !set wims_name_score=$wims_name_score<br />$(wims_name_thsheet[10]): $[round(100*$wims_homeref_best/$wims_homeref_req)] %
  131.        !!I2
  132.      !else
  133.        !set wims_homeref_got=!getscore sheet=$wims_sheet work=$wims_exo
  134.        !set wims_name_score=$wims_name_score<br />$(wims_name_thsheet[5]): $[ceil(100*$wims_homeref_got/$wims_homeref_req)]%
  135.        !!I0
  136.  
  137.      !endif
  138.    !endif
  139.    !set 4_=!append line score,0,$wims_name_score to $4_
  140.    !if $wims_authscoresuspend!=no
  141.     !!set wims_rm_0=!append line scoreclose2,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=suspend to $wims_rm_0
  142.    !endif
  143.   !else
  144.    !set 4_=!append line score,0,$wims_name_scoresuspend to $4_
  145.    !if $wims_authscoresuspend!=no
  146.     !!set wims_rm_0=!append line scorereopen,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=reopen to $wims_rm_0
  147.    !endif
  148.   !endif
  149.  !else
  150.   !set 4_=!append line score,0,$wims_name_scoreclose to $4_
  151.  !endif
  152.  !if $module_score!=$empty and $wims_class_exolog>0 and E notin $wims_sheet
  153.   !set wims_rm_0=!append line exolog,1,module=adm/class/exolog&cmd=new&job=log&logsheet=$wims_sheet&logexo=$wims_exo to $wims_rm_0
  154.  !endif
  155. !endif
  156.  
  157.  
  158. !set wims_rm_2=$2_
  159. !set wims_rm_4=$4_
  160. !set wims_rm_5=$5_
  161.  
  162. :rmend
  163. !set wims_homeref_n1=!linecnt $wims_rm_1
  164. !set wims_homeref_n2=!linecnt $wims_rm_2
  165. !set wims_homeref_n0=!linecnt $wims_rm_0
  166. !!nothing inside
  167. !set wims_homeref_n3=!linecnt $wims_rm_3
  168. !! about activation and score
  169. !set wims_homeref_n4=!linecnt $wims_rm_4
  170. !! about feedback
  171. !set wims_homeref_n5=!linecnt $wims_rm_5
  172. !set wims_homeref_local_n0=!linecnt $wims_local_menu_items
  173. !!</div><!--div dans homeref_user-->
  174. !read themes.phtml tail
  175. !robottrap
  176.