Subversion Repositories wimsdev

Rev

Rev 18406 | 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. !set parms=!slashsubst $(parms)
  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 prompt=!item 2 to -1 of $parms
  62. !default prompt=!module title_$lang $lmod
  63. !default prompt=!module title $lmod
  64.  
  65. !default prompt=$n_unknown
  66.  
  67. !if $prim=exercise
  68.   !reset ww_ naddw work
  69.   !if $naddw!=
  70.     !set ww_=$naddw
  71.   !else
  72.     !set ww_=&worksheet=$get_wksheet
  73.     !if $get_wksheet!=$empty and $get_wksheet!=0
  74.       !set work=!getexoindex module=$lmod param=$nadd sheet=$get_wksheet
  75.     !endif
  76.     !if $work=$empty
  77.       !set work=!getexoindex module=$lmod param=$nadd
  78.     !endif
  79.     !if $work!=$empty
  80.       !read docu/scoreprint $work
  81.       !set ww_=&worksheet=$tmp_sheet
  82.     !endif
  83.   !endif
  84.   !href target=wims_exo module=$lmod&cmd=$lcmd&$nadd$ww_ $prompt
  85.   !if $lcmd=new
  86.     !set nadd=!replace internal &+ by & in $nadd
  87.     !set nadd=!char 2 to -1 of $nadd
  88.     !set sheetdata=$sheetdata\
  89. :$lmod\
  90. $nadd\
  91. 10\
  92. 1\
  93. $prompt\
  94. \
  95. \
  96. \
  97. module=$module&doc=$doc&block=$block&cmd=new,9\
  98.  
  99.   !endif
  100. !endif
  101. !if $prim=tool
  102.   !href target=wims_tool module=$lmod&cmd=$lcmd&$nadd $prompt
  103. !endif
  104. !if $prim=doc
  105.   !href target=wims_doc module=$lmod&cmd=$lcmd&$nadd $prompt
  106. !endif
  107. !if $prim=example
  108.   !href target=wims_example module=$lmod&cmd=$lcmd&$nadd $prompt
  109. !endif
  110. !if $prim=help
  111.   !href target=wims_help module=$lmod&cmd=$lcmd&$nadd $prompt
  112. !endif
  113. !if $prim=adm
  114.   !href module=$lmod&cmd=$lcmd&$nadd $prompt
  115. !endif
  116. !if $prim=glose
  117.   !set lcmd=reply
  118.   !set nadd=!replace internal & by &special_parm= in $nadd
  119.   !href module=adm/tool/glossary&cmd=$lcmd$nadd&job=main prompt
  120. !endif
  121.