Subversion Repositories wimsdev

Rev

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

wims_exolog_limit=40
wims_prefix=class user tmp n sharing sharable
wims_pfback=$wims_prefix
wims_writable=allow except
wims_nw=today empty nonew creatdays backdays warn
!!## useful here to be able to read the error msg
!read adm/class/classlang lang/names.phtml

!if $wims_user!=supervisor and $wims_ismanager<2
  error=not_supervisor
  job=
  !exit
!endif

!if $wims_class=$empty
  error=bad_class
  !exit
!endif

!read adm/class/config.auth
!if $error!=$empty or $jobt=auth
  job=$jobt
  !exit
!endif

!read adm/levelname.phtml
!!## must be read again because $job could be not defined
!read adm/class/classlang lang/names.phtml
wims_helper=chapter=3
!readproc scripts/votemodel.proc
sharelist=user,doc,exo,sheet,exam,forum,sup,motd,cdt,livret,seq,userphoto,tool
!if $votemodel!=yes
  sharelist=$sharelist,vote
!endif
!if $wims_superclass!=$empty
  sharelist=!listcomplement userphoto in $sharelist
!endif
nosharelist=user,exo,sheet,exam
!read adm/class/limits
class_bgcolor=$wims_bgcolor
class_bgimg=$wims_bgimg
class_theme=$wims_theme
class_theme_icon=$wims_theme_icon
class_css=$wims_css
class_ref_menucolor=$wims_ref_menucolor
class_ref_button_bgcolor=$wims_ref_button_bgcolor
class_ref_button_color=$wims_ref_button_color
class_ref_button_help_bgcolor=$wims_ref_button_help_bgcolor
class_ref_button_help_color=$wims_ref_button_help_color
today=!char 1 to 8 of $wims_now
!defread wimshome/log/classes/$wims_class/.def
joballowlist=list,arch,clean,security,grestrict,log,connect,\
    present,access,propagate,index,oefdefault,authtype,connectlink
!if $class_type!=2
  joballowlist=$joballowlist,neighbor
!endif
!bound job within $joballowlist default new
du=!record 0 of wimshome/log/classes/$wims_class/.du
du=!word 1 of $du
du1=!char -3 to -1 of $du
du2=!char 1 to -4 of $du
!default du2=0
du=$du2.$du1
!read tabletheme

!if $nonew=$empty
  creation=$class_creation
  !bound creation between integer 20010101 and $today default 20010101
  lastback=$class_backup
  !default lastback=$creation
  !bound lastback between integer 20010101 and $today default 20010101
  warn=
  csec=!date -d '$creation' '+%s'
  creatdays=$[floor(($wims_nowseconds-$csec)/(3600*24))]
  !if $creatdays>340
    warn=$warn creation
  !endif
  lsec=!date -d '$lastback' '+%s'
  backdays=$[floor(($wims_nowseconds-$lsec)/(3600*24))]
  !bound backdays between integer 0 and 101
  !if $backdays>30
    warn=$warn backup
  !endif
  !if ($backdays>7 or $warn!=$empty) and $job2!=import and $job!=log
    !read $job.proc
    job=new
  !endif
  nonew=yes
!endif

wims_module_log=$job $job2 $wims_class

!read $job.proc