Subversion Repositories wimsdev

Rev

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

  1. !read getparm $module_init_parm wksheet
  2. !setdef wims_wksheet=$get_wksheet in wimshome/sessions/$wims_session/var.stat
  3.  
  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=!replace internal &+ by & in $add
  34. !set add=!replace internal %2F by / in $add
  35. !read getparm $add wksheet
  36. !set add=!translate internal & to $ $ in $add
  37. !set n=!wordcnt $add
  38. !reset nadd,lmod,lses,lcmd
  39. !for i=1 to $n
  40.   !set l=!word $i of $add
  41.   !set ll=!translate = to , in $l
  42.   !distribute items $ll into l1,l2
  43.   !if $l1=cmd and $l2 iswordof intro help close
  44.     !set lcmd=$l2
  45.   !endif
  46.   !if $l1=module
  47.     !set lmod=$l2
  48.   !endif
  49.   !if $l1 notwordof module cmd session worksheet wksheet
  50.     !set nadd=$nadd $l
  51.   !endif
  52. !next i
  53. !default lmod=home
  54. !default lcmd=new
  55. !set nadd=!trim $nadd
  56. !set nadd=!translate internal $ $ to & in $nadd
  57. !set prompt=!item 2 to -1 of $parms
  58. !default prompt=!module title_$lang $lmod
  59. !default prompt=!module title $lmod
  60.  
  61. !default prompt=$n_unknown
  62.  
  63. !if $prim=exercise
  64.   !reset ww_
  65.   !if $get_wksheet!=$empty and $get_wksheet!=0
  66.     !set ww_=&worksheet=$get_wksheet
  67.     !set work=!getexoindex module=$lmod param=$nadd sheet=$get_wksheet
  68.     !if $work!=$empty
  69.       !read docu/scoreprint $work
  70.     !endif
  71.   !endif
  72.   !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
  73.   !if $lcmd=new
  74.     !set nadd=!replace internal &+ by & in $nadd
  75.     !set nadd=!char 2 to -1 of $nadd
  76.     !set sheetdata=$sheetdata\
  77. :$lmod\
  78. $nadd\
  79. 10\
  80. 1\
  81. $prompt\
  82. \
  83. \
  84. \
  85. module=$module&doc=$doc&block=$block&cmd=new,9\
  86.  
  87.   !endif
  88. !endif
  89. !if $prim=tool
  90.   !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt
  91. !endif
  92. !if $prim=doc
  93.   !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt xxxx
  94. !endif
  95. !if $prim=example
  96.   !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt
  97. !endif
  98. !if $prim=help
  99.   !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt
  100. !endif
  101. !if $prim=adm
  102.   !href module=$lmod&cmd=$lcmd$nadd $prompt
  103. !endif
  104. !if $prim=glose
  105.   !set lcmd=reply
  106.   !set nadd=!replace internal & by &special_parm= in $nadd
  107.   !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
  108. !endif
  109.