
!if robot isin $session
  open=
  chapter=0
  !exit
!endif

!! set an appropriate language to be used

!! modu_lang will be set by adm/language
!readproc adm/language lang/name.phtml

!set module_title_lang=!module title_$modu_lang
!default module_title_lang=$module_title

chaptercnt=!recordcnt lang/chapters_$modu_lang.dat
!bound chapter between integer 0 and $chaptercnt default 0

!for i=1 to $chaptercnt
  chapter$i=!record $i of lang/chapters_$modu_lang.dat
  chapter$i=!trim $(chapter$i)
!next i

open=!items2words $open
open=!words2items $open
open=!listuniq $open
open=!items2words $open

wims_module_log=$chapter, $open

prefix_session=!char 1 to -6 of $wims_session
