Rev 17019 | Blame | Compare with Previous | Last modification | View Log | RSS feed
mexolog=!getdef class_mexolog in wimshome/log/classes/$wims_class/.def
!if $mexolog!=yes
smail=no
!else
!if $smail=$empty
!exit
!endif
!endif
!bound smail within no,yes default no
!if ($logsheet>0 and $logexo>0) or $checkuser=supervisor
!if ($logsheet>0 and $logexo>0)
ext1=$logsheet.$logexo
ext2=-$ext1
ext1=.$ext1
!else
!reset ext1 ext2
!endif
wimsnow=$wims_now
!sh mkdir -p $cdir/exolog/$checkuser\
cp $sdir/exolog$ext1 $cdir/exolog/$checkuser/$wimsnow-$wims_session$ext2\
rm -f $sdir/exolog$ext1\
list=`ls -r $cdir/exolog/$checkuser | tail -n +$[$wims_class_exolog+1]`\
if [ ! -z "$$list" ]; then rm -f $cdir/exolog/$checkuser/$$list; fi
job=list
!! replace the name of images by rename by the true name when saving
rename_list =!record 0 of wimshome/$wims_sesdir/.rename
rename_list_cnt=!linecnt $rename_list
!for l=1 to $rename_list_cnt
rename_l=!line $l of $rename_list
rename_l=!replace internal : by , in $rename_l
rename_l=!replace internal ? by \? in $rename_l
!sh perl -np -i -e 's:$(rename_l[2]):$(rename_l[1]):g' $cdir/exolog/$checkuser/$wimsnow-$wims_session$ext2
!next l
!if $smail=yes
!! --------- sendmail to supervisor
msg=!detag $msg
!if $msg!=$empty
comp=$name_comment\
$msg
!endif
!readproc adm/class/userdef ,$wims_class,$wims_user
!if $wims_mail_hidden=yes
t=!defof user_lastname,user_firstname in $userdef
!distribute item $t into ulast,ufirst
!reset umail
!else
t=!defof user_lastname,user_firstname,user_email in $userdef
!distribute item $t into ulast,ufirst,umail
!endif
!readproc date.phtml $wimsnow,notime noprint
unow=$slib_out
uref=$wimsnow-$wims_session$ext2
t=!defof class_description\
class_institution in wimshome/log/classes/$wims_class/.def
!distribute line $t into uclass,ueta
sup_mail=!defof user_email in wimshome/log/classes/$wims_class/supervisor
!mailto $sup_mail\
$umail\
[WIMS $wims_classname] $save_subject\
$name_msg\
$comp
!endif
!else
job=llist
!endif