Subversion Repositories wimsdev

Rev

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

!! not allow for other than type=3
!if $type!=3
  job=configfw
  !changeto $job.proc
!endif

!if $putiworkco!=1
  error=putworknotallow
  job=configfw
  !changeto $job.proc
!endif

!! -------- check for valid student (in class)
!bound userv within $ulist default $empty
!if $userv=$empty
  error=putworkusernotexists
  job=configfw
  !changeto $job.proc
!endif


!! -------- test si la copie de l'etudiant existe (pas de depot de correction si pas de copie)

!readproc proc/findfile3.proc $freework,$userv
!if $output=$empty
  error=studentwithoutfw
  job=configfw
  !changeto $job.proc
!endif

remark=!char 1 to 1000 of $remark
remark=!replace internal : by : in $remark
!writefile wimshome/log/classes/$wims_class/freeworksdata/$freework/co/$userv $remark
!! ------------ save new score (only if scoring>0)
!if $scoring>0
  key2=!positionof item $userv in $ulist
  !bound score between 0 and $maxscore default $empty
  key=!positionof item $userv in $uulist
  list=!values 0 for v=1 to $nbscore
  list=!replace internal 0 by $empty in $list
  !if $key=$empty
    list=!replace item number $scoring by $score in $list
    !appendfile wimshome/log/classes/$wims_class/.grades :$userv,$(flist[$key2]) $(llist[$key2]),$list
    uulist=!append item $userv to $uulist
  !else
    update_content=!record $[$key+1] of wimshome/log/classes/$wims_class/.grades
    update_content=!append item $list to $update_content
    update_content=!item 1 to $[$nbscore+2] of $update_content
    update_content=!replace item number $[$scoring+2] by $score in $update_content
    update_field=$[$key+1]
    update_nbline=$empty
    !read adm/uprecord wimshome/log/classes/$wims_class/.grades
  !endif
!endif
!restart module=$module&freework=$freework&job=configfw