Subversion Repositories wimsdev

Rev

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

  1. !read getparm $module_init_parm wksheet
  2.  
  3. !setdef wims_wksheet=$get_wksheet in wimshome/sessions/$wims_session/var.stat
  4. !if \ isin $parm1
  5.   !for p in 1
  6.     !set parm$p=!slashsubst $(parm$p)
  7.   !next p
  8. !endif
  9.  
  10. !set add=$parm1
  11. !if ? isin $add
  12.   !set add=!translate internal ? to , in $add
  13.   !set add=!item 2 of $add
  14. !endif
  15. !set eq==
  16. !!for exercices and tools in a class, syntax of the form numero_sheet/numero_exercise
  17. !if $eq notin $add and $wims_class>0 and / isin $add \
  18.     and $prim iswordof exercise tool
  19.   !set add=!translate internal / to $ $ in $add
  20.   !distribute words $add into sh,ex
  21.   !set l_=!record $ex of wimshome/log/classes/$wims_class/sheets/.sheet$sh
  22.   !set sev=!record 0 of wimshome/log/classes/$wims_class/sheets/.severity
  23.   !set sev=!line $sh+1 of $sev
  24.   !distribute lines $l_ into m_,p_,a_,b_,t_,d_
  25.   !set m_exotitle=$t_
  26.   !set m_exodescription=$d_
  27.   !set prompt=!item 2 to -1 of $parms
  28.   !default prompt=$t_
  29.   !read docu/scoreprint $sh/$ex,$sev
  30.   !href target=wims_exo cmd=new&module=$m_&worksheet=$sh&$p_ $prompt
  31.   !exit
  32. !endif
  33. !set add=!translate internal &+ to $ $ in $add
  34. !set add=!translate internal & to $ $ in $add
  35. !set n=!wordcnt $add
  36. !reset nadd,lmod,lses,lcmd
  37. !for i=1 to $n
  38.   !set l=!word $i of $add
  39.   !set ll=!translate = to , in $l
  40.   !distribute items $ll into l1,l2
  41.   !if $l1=cmd and $l2 iswordof intro help close
  42.     !set lcmd=$l2
  43.   !endif
  44.   !if $l1=module
  45.     !set lmod=$l2
  46.   !endif
  47.   !if $l1 notwordof module cmd session lang worksheet
  48.     !set nadd=$nadd $l
  49.   !endif
  50. !next i
  51. !default lmod=home
  52. !default lcmd=new
  53. !set nadd=!trim $nadd
  54. !set nadd=!translate internal $ $ to & in $nadd
  55. !set prompt=!item 2 to -1 of $parms
  56. !default prompt=!module title_$lang $lmod
  57. !default prompt=!module title $lmod
  58.  
  59. !default prompt=$n_unknown
  60.  
  61. !if $prim=exercise
  62.   !reset ww_
  63.   !if $get_wksheet!=$empty and $get_wksheet!=0
  64.     !set ww_=&worksheet=$get_wksheet
  65.     !set work=!getexoindex $lmod $nadd sheet=$get_wksheet
  66.     !if $work!=$empty
  67.       !read docu/scoreprint $work
  68.     !endif
  69.   !endif
  70.   !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
  71.   !if $lcmd=new
  72.     !set nadd=!replace internal &+ by & in $nadd
  73.     !set nadd=!char 2 to -1 of $nadd
  74.     !set sheetdata=$sheetdata\
  75. :$lmod\
  76. $nadd\
  77. 10\
  78. 1\
  79. $prompt\
  80. \
  81. \
  82. \
  83. module=$module&doc=$doc&block=$block&cmd=new,9\
  84.  
  85.   !endif
  86. !endif
  87. !if $prim=tool
  88.   !href target=wims_tool module=$lmod&cmd=$lcmd$nadd $prompt
  89. !endif
  90. !if $prim=doc
  91.   !href target=wims_doc module=$lmod&cmd=$lcmd$nadd $prompt
  92. !endif
  93. !if $prim=example
  94.   !href target=wims_example module=$lmod&cmd=$lcmd$nadd $prompt
  95. !endif
  96. !if $prim=help
  97.   !href target=wims_help module=$lmod&cmd=$lcmd$nadd $prompt
  98. !endif
  99. !if $prim=adm
  100.   !href module=$lmod&cmd=$lcmd$nadd $prompt
  101. !endif
  102. !if $prim=glose
  103.   !set lcmd=reply
  104.   !set nadd=!replace internal & by &special_parm= in $nadd
  105.   !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
  106. !endif
  107.