Subversion Repositories wimsdev

Rev

Rev 7612 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7612 Rev 7638
Line -... Line 1...
-
 
1
!!no more use !
1
!!input :user, class, sheet (optional), exo (optional)
2
!!input :user, class, sheet (optional), exo (optional)
2
!!output:
3
!!output:
3
!! script_out: lines for each exo in sheet coming from exostat
4
!! script_out: lines for each exo in sheet coming from exostat
4
!!  should put only the best things ??
5
!!  should put only the best things ??
5
!! script_best: best result (depending on the required points)
6
!! script_best: best result (depending on the required points)
Line 33... Line 34...
33
  !reset script_out
34
  !reset script_out
34
  !set sc_sheet=!words2items $sc_sheet
35
  !set sc_sheet=!words2items $sc_sheet
35
  !reset sc_best
36
  !reset sc_best
36
  !set sc_sheet_cnt=!itemcnt $sc_sheet
37
  !set sc_sheet_cnt=!itemcnt $sc_sheet
37
  !for sc_s=1 to $sc_sheet_cnt
38
  !for sc_s=1 to $sc_sheet_cnt
38
    sc_sh=$(sc_sheet[$sc_s])
39
    !set sc_sh=$(sc_sheet[$sc_s])
39
    !set script_out=!sh export exostat_dirbase exostat_types exostat_classes exostat_user exostat_sheet\
40
    !set script_out=!sh export exostat_dirbase exostat_types exostat_classes exostat_user exostat_sheet\
40
	exostat_dirbase=$wims_home/log/classes\
41
	exostat_dirbase=$wims_home/log/classes\
41
	exostat_types="score"\
42
	exostat_types="score"\
42
	exostat_classes="$sc_class"\
43
	exostat_classes="$sc_class"\
43
	exostat_user="$sc_user"\
44
	exostat_user="$sc_user"\
Line 63... Line 64...
63
       !set sc_w=!word $(sc_ex) of $sc_weight
64
       !set sc_w=!word $(sc_ex) of $sc_weight
64
       !set sc_wg=$[$sc_wg + $sc_w]
65
       !set sc_wg=$[$sc_wg + $sc_w]
65
       !set script_p3=$script_p3 + $sc_w*$sc_best_
66
       !set script_p3=$script_p3 + $sc_w*$sc_best_
66
      !endif
67
      !endif
67
!!leave the empty items
68
!!leave the empty items
68
       sc_best=$sc_best$sc_best_,
69
       !set sc_best=$sc_best$sc_best_,
69
     !next exo
70
     !next exo
-
 
71
 
70
     !set script_best=$script_best\
72
     !set script_best=!append line $sc_best to $script_best
-
 
73
     !set script_percent3=!append line $[ceil(100*($script_p3)/$sc_wg)/1000] to $script_percent3\
-
 
74
     !set script_out=!append line $script_out_ to $script_out
71
$sc_best
75
     !else
72
     !set script_percent3=$script_percent3\
76
       !set script_best=!append line 0 to $script_best
73
$[ceil(100*($script_p3)/$sc_wg)/1000]
-
 
74
    !set script_out=!append line $script_out_ to $script_out
77
     !set script_percent3=!append line 0 to $script_percent3
-
 
78
    !endif
75
  !next sheet
79
  !next sheet
76
!endif
80
!endif
77
 
-
 
78
:end
81
:end
-
 
82