Subversion Repositories wimsdev

Rev

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

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