Subversion Repositories wimsdev

Rev

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

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