Subversion Repositories wimsdev

Rev

Rev 13007 | Rev 15070 | 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/_lang/name.phtml.$lang
  7. !read themes/$wims_theme/lang/name.phtml.$lang
  8. !default wims_homeref_bgcolor=$wims_ref_bgcolor
  9. !read themes/$wims_theme/local.phtml
  10.  
  11. !if exam isin $wims_session
  12.   !read examclock.proc
  13.   !goto rmend
  14. !endif
  15.  
  16. !if $wims_rm_1=no
  17.   !reset wims_rm_1
  18.   !goto local
  19. !endif
  20. !if $wims_rm_1!=$empty
  21.   !goto rm2
  22. !endif
  23. !reset 1_
  24.  
  25. !if _ isin $wims_subsession
  26.   !!set 1_=!append line back2,3,window.close() to $1_
  27. !else
  28.   !!set 1_=!append line class_home,1,session=$wims_session.1 to $1_
  29. !endif
  30.  
  31. !!!if $wims_sheet>0 or P isin $wims_sheet or $wims_sequence>0
  32. !! !if $wims_sequence>0 and $wims_sheet=$empty
  33. !!  !set tmp_=sequence,1,module=home&seq=$wims_sequence
  34. !! !else
  35. !!  !!set tmp_=sheet,1,module=adm/sheet&sh=$wims_sheet&
  36. !! !endif
  37. !!   !let wims_menu_items=!append line $tmp_ to $wims_menu_items
  38. !!!endif
  39. !!fieldtot is the number of answer fields in a oef exercise,
  40. !! for module it is not defined the condition is just that the exercise is finished.
  41. !if ($wims_sheet>0 or P isin $wims_sheet) and (($cmd=reply and $module_score!=$empty) or $fieldtot=0)
  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 <span>$wims_name_wsup</span>\
  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.   !set wims_homeref_maxexotry=!getscoremaxexotry sheet=$wims_sheet work=$wims_exo
  115.   !set wims_homeref_alltries=!getscorealltries sheet=$wims_sheet work=$wims_exo
  116.   !if $module_score=$empty and $cmd iswordof reply next resume hint
  117.     !set wims_homeref_alltries=$[max($wims_homeref_alltries-1,0)]
  118.   !else
  119.     !set wims_homeref_alltries=$[$wims_homeref_alltries]
  120.   !endif
  121.   !default wims_homeref_alltries=0
  122.   !if $wims_exotrymax!=$empty
  123.     !set tmp_exotrymax=$wims_name_try $wims_homeref_alltries/$wims_exotrymax<br />
  124.   !endif
  125.   !if ($wims_homeref_scorestat=yes and $wims_exodep!=pending) \
  126.       and ($wims_exotrymax<=1 or $wims_homeref_alltries<=$wims_exotrymax)
  127.     !if $wims_scorereg!=suspend
  128.       !set wims_homeref_req=!getscorerequire sheet=$wims_sheet work=$wims_exo
  129.       !set wims_homeref_mean=!getscoremean sheet=$wims_sheet work=$wims_exo
  130.       !set wims_homeref_last=!getscorelast sheet=$wims_sheet work=$wims_exo
  131.       !set wims_name_score=$tmp_exotrymax
  132.       !if $(wims_severity[2])!=1 or $(wims_severity[2])=$empty or $wims_homeref_mean<=2
  133.         !set wims_name_score=$wims_name_score$(wims_name_thsheet[7]): $[ceil(100*$[$wims_homeref_mean])/100]/10
  134.       !endif
  135.       !if $(wims_severity[3])=2
  136.         !set wims_homeref_level=!getscorelevel sheet=$wims_sheet work=$wims_exo
  137.         !set wims_name_score=$wims_name_score<br />$(wims_name_thsheet[13]): $wims_homeref_level/10
  138.         !! I1
  139.       !else
  140.         !if $(wims_severity[3])=1
  141.           !set wims_homeref_best=!getscorebest sheet=$wims_sheet work=$wims_exo
  142.           !set wims_name_score=$wims_name_score<br />$(wims_name_thsheet[10]): $[ceil(100*$wims_homeref_best/$wims_homeref_req)] %
  143.           !!I2
  144.         !else
  145.           !set wims_homeref_got=!getscore sheet=$wims_sheet work=$wims_exo
  146.           !set wims_name_score=$wims_name_score<br />$(wims_name_thsheet[5]): $[ceil(100*$wims_homeref_got/$wims_homeref_req)]%
  147.           !!I0
  148.         !endif
  149.       !endif
  150.       !set 4_=!append line score,0,$wims_name_score to $4_
  151.       !if $wims_authscoresuspend!=no
  152.         !!set wims_rm_0=!append line scoreclose2,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=suspend to $wims_rm_0
  153.       !endif
  154.     !else
  155.       !set 4_=!append line score,0,$wims_name_scoresuspend to $4_
  156.       !if $wims_authscoresuspend!=no
  157.         !!set wims_rm_0=!append line scorereopen,1,module=adm/sheet&sh=$wims_sheet&exo=$wims_exo&job=reopen to $wims_rm_0
  158.       !endif
  159.     !endif
  160.   !else
  161.     !if $wims_homeref_maxexotry!=yes
  162.       !set 4_=!append line score,0,$wims_name_scoreclose to $4_
  163.     !else
  164.       !set 4_=!append line score,0,$wims_name_maxexotry1 to $4_
  165.     !endif
  166.   !endif
  167.   !if $module_score!=$empty and $wims_class_exolog>0 and E notin $wims_sheet
  168.     !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
  169.   !endif
  170. !endif
  171.  
  172. !set wims_rm_2=$2_
  173. !set wims_rm_4=$4_
  174. !set wims_rm_5=$5_
  175.  
  176. :rmend
  177. !set wims_homeref_n1=!linecnt $wims_rm_1
  178. !set wims_homeref_n2=!linecnt $wims_rm_2
  179. !set wims_homeref_n0=!linecnt $wims_rm_0
  180. !!nothing inside
  181. !set wims_homeref_n3=!linecnt $wims_rm_3
  182. !! about activation and score
  183. !set wims_homeref_n4=!linecnt $wims_rm_4
  184. !! about feedback
  185. !set wims_homeref_n5=!linecnt $wims_rm_5
  186. !set wims_homeref_local_n0=!linecnt $wims_local_menu_items
  187. !!</div><!--div dans homeref_user-->
  188. !read themes.phtml tail
  189. !robottrap
  190.