version 1.8, 2000/01/05 21:11:15
|
version 1.9, 2000/01/10 22:40:30
|
Line 88 proc CTchangePath { num } {
|
Line 88 proc CTchangePath { num } {
|
########################################################### |
########################################################### |
proc CTcapaStat2 { num } { |
proc CTcapaStat2 { num } { |
global gFile gCT gUniqueNumber |
global gFile gCT gUniqueNumber |
if { [set setId [getOneSet $gCT($num) $gFile($num)]] == "" } { return } |
# if { [set setId [getOneSet $gCT($num) $gFile($num)]] == "" } { return } |
|
if {[set setId [pickSets [CTsetList $gFile($num)] single "Pick A Set" \ |
|
$gCT($num)]] == "Cancel" } { return } |
set cmdnum [incr gUniqueNumber] |
set cmdnum [incr gUniqueNumber] |
set gCT(cmd.$cmdnum) capastat |
set gCT(cmd.$cmdnum) capastat |
if { [ |
if { [ |
Line 128 proc CTcapaStat2 { num } {
|
Line 130 proc CTcapaStat2 { num } {
|
########################################################### |
########################################################### |
proc CTcapaStat { num } { |
proc CTcapaStat { num } { |
global gFile gCT gUniqueNumber |
global gFile gCT gUniqueNumber |
if { [set setId [getOneSet $gCT($num) $gFile($num)]] == "" } { return } |
# if { [set setId [getOneSet $gCT($num) $gFile($num)]] == "" } { return } |
|
if {[set setId [pickSets [CTsetList $gFile($num)] single "Pick A Set" \ |
|
$gCT($num)]] == "Cancel" } { return } |
set cmdnum [incr gUniqueNumber] |
set cmdnum [incr gUniqueNumber] |
set gCT(cmd.$cmdnum) capastat |
set gCT(cmd.$cmdnum) capastat |
if { [ |
if { [ |
Line 162 proc CTcapaStat { num } {
|
Line 166 proc CTcapaStat { num } {
|
########################################################### |
########################################################### |
proc CTlogAnalysis { num } { |
proc CTlogAnalysis { num } { |
global gFile gUniqueNumber gCT |
global gFile gUniqueNumber gCT |
if { [set setId [getOneSet $gCT($num) $gFile($num)]] == "" } { return } |
#if { [set setId [getOneSet $gCT($num) $gFile($num)]] == "" } { return } |
|
if {[set setId [pickSets [CTsetList $gFile($num)] single "Pick A Set" \ |
|
$gCT($num)]] == "Cancel" } { return } |
set cmdnum [incr gUniqueNumber] |
set cmdnum [incr gUniqueNumber] |
set gCT(cmd.$cmdnum) loganalysis |
set gCT(cmd.$cmdnum) loganalysis |
CTdatestamp $cmdnum |
CTdatestamp $cmdnum |
Line 301 proc CTitemAnalysisStart { num } {
|
Line 306 proc CTitemAnalysisStart { num } {
|
unset gCT(cmd.$cmdnum) |
unset gCT(cmd.$cmdnum) |
return |
return |
} |
} |
if { [set sets [getSetRange $gCT($num) [lindex $select 1]]] == "" } { |
# if { [set sets [getSetRange $gCT($num) [lindex $select 1]]] == "" } \{ |
|
if { [set sets [pickSets [CTsetList [lindex $select 1]] \ |
|
"extended" "Select Sets" $gCT($num)]] == "Cancel" } { |
unset gCT(cmd.$cmdnum) |
unset gCT(cmd.$cmdnum) |
return |
return |
} |
} |
CTdatestamp $cmdnum |
CTdatestamp $cmdnum |
if { [ catch {CTitemAnalysisRange $cmdnum [lindex $select 1] \ |
if { [ catch {CTitemAnalysisRange $cmdnum [lindex $select 1] $sets } errors ] } { |
[lindex $sets 0] [lindex $sets 1] } errors ] } { |
|
displayError $errors |
displayError $errors |
} |
} |
unset gCT(cmd.$cmdnum) |
unset gCT(cmd.$cmdnum) |
Line 335 proc CTitemCorrelationStart { num } {
|
Line 341 proc CTitemCorrelationStart { num } {
|
foreach path [lsort [array names gCapaConfig "$num.*_path"]] { |
foreach path [lsort [array names gCapaConfig "$num.*_path"]] { |
lappend paths [list [lindex [split $path "."] 1] $gCapaConfig($path) ] |
lappend paths [list [lindex [split $path "."] 1] $gCapaConfig($path) ] |
} |
} |
if { [set select [multipleChoice $gCT($num) "Select a class path" $paths ] ] == "" } { |
if {[set select [multipleChoice $gCT($num) "Select a class path" $paths]] == ""} { |
unset gCT(cmd.$cmdnum) |
unset gCT(cmd.$cmdnum) |
return |
return |
} |
} |
if { [set setId [getOneSet $gCT($num) [lindex $select 1]]] == "" } { |
#if { [set setId [getOneSet $gCT($num) [lindex $select 1]]] == "" } \{ |
|
if {[set setId [pickSets [CTsetList [lindex $select 1]] single "Pick A Set" \ |
|
$gCT($num)]] == "Cancel" } { |
unset gCT(cmd.$cmdnum) |
unset gCT(cmd.$cmdnum) |
return |
return |
} |
} |
Line 363 proc CTsubmissions { num } {
|
Line 371 proc CTsubmissions { num } {
|
|
|
set cmdnum [incr gUniqueNumber] |
set cmdnum [incr gUniqueNumber] |
set gCT(cmd.$cmdnum) submissions |
set gCT(cmd.$cmdnum) submissions |
if { "" == [set setlist [getSetRange $gCT($num) $gFile($num)]] } { return } |
if { [set sets [pickSets [CTsetList $gFile($num)] \ |
|
"extended" "Select Sets" $gCT($num)]] == "Cancel" } { return } |
|
# if { "" == [set setlist [getSetRange $gCT($num) $gFile($num)]] } { return } |
CTdatestamp $cmdnum |
CTdatestamp $cmdnum |
CTputs $cmdnum "Submissions for: $s_id, $s_name\n" |
CTputs $cmdnum "Submissions for: $s_id, $s_name\n" |
displayStatus "Getting submissions" spinner $cmdnum |
displayStatus "Getting submissions" spinner $cmdnum |
CTsubmissionsLaunch $num $cmdnum telnet $s_id $s_name \ |
CTsubmissionsLaunch $num $cmdnum telnet $s_id $s_name 0 $sets |
[lindex $setlist 0] [lindex $setlist 1] |
|
} |
} |
|
|
########################################################### |
########################################################### |
Line 1336 proc CTrunCommand { num cmdnum fileId {f
|
Line 1345 proc CTrunCommand { num cmdnum fileId {f
|
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
proc CTitemAnalysisRange { num classpath setIdStart setIdEnd } { |
proc CTitemAnalysisRange { num classpath sets } { |
for { set i $setIdStart } { $i <= $setIdEnd } { incr i } { |
foreach i $sets { |
if { [ catch { CTitemAnalysis $num $classpath $i } errors ] } { |
if { [ catch { CTitemAnalysis $num $classpath $i } errors ] } { |
displayError $errors |
displayError $errors |
} |
} |
Line 1407 proc CTitemAnalysis { num classpath setI
|
Line 1416 proc CTitemAnalysis { num classpath setI
|
incr valid_cnt |
incr valid_cnt |
set score 0 |
set score 0 |
for { set ii 0 } { $ii < [llength $ans_char] } { incr ii } { |
for { set ii 0 } { $ii < [llength $ans_char] } { incr ii } { |
|
#Can't use incr because the numbers might be doubles |
if { [lindex $ans_char $ii] == "Y" || \ |
if { [lindex $ans_char $ii] == "Y" || \ |
[lindex $ans_char $ii] == "y" } { |
[lindex $ans_char $ii] == "y" } { |
incr score [lindex $weights $ii] |
catch {incr score [lindex $weights $ii]} |
set Y_cnt($ii) [expr $Y_cnt($ii) + 1] |
set Y_cnt($ii) [expr {$Y_cnt($ii) + 1}] |
set Y_total [expr $Y_total + 1] |
set Y_total [expr {$Y_total + 1}] |
} |
} |
if { [lindex $ans_char $ii] == "N" || \ |
if { [lindex $ans_char $ii] == "N" || \ |
[lindex $ans_char $ii] == "n" } { |
[lindex $ans_char $ii] == "n" } { |
set N_cnt($ii) [expr $N_cnt($ii) + 1] |
set N_cnt($ii) [expr {$N_cnt($ii) + 1}] |
set N_total [expr $N_total + 1] |
set N_total [expr {$N_total + 1}] |
} |
} |
if { [lindex $ans_char $ii] >= 0 && \ |
if { [lindex $ans_char $ii] >= 0 && \ |
[lindex $ans_char $ii] <= 9 } { |
[lindex $ans_char $ii] <= 9 } { |
incr score [lindex $ans_char $ii] |
incr score [lindex $ans_char $ii] |
set yes_part [expr [lindex $ans_char $ii] / \ |
if {[catch {set yes_part [expr [lindex $ans_char $ii] / \ |
double([lindex $weights $ii]) ] |
double([lindex $weights $ii])]}]} { |
|
set yes_part 1 |
|
} |
set no_part [expr 1.0 - $yes_part] |
set no_part [expr 1.0 - $yes_part] |
set Y_cnt($ii) [expr $Y_cnt($ii) + $yes_part] |
set Y_cnt($ii) [expr $Y_cnt($ii) + $yes_part] |
set Y_total [expr $Y_total + $yes_part] |
set Y_total [expr $Y_total + $yes_part] |
Line 1636 proc CTitemCorrelation { num classpath s
|
Line 1647 proc CTitemCorrelation { num classpath s
|
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
proc CTsubmissionsLaunch { num cmdnum type s_id s_nm start end } { |
proc CTsubmissionsLaunch { num cmdnum type s_id s_nm index setlist } { |
global gCT gFile gUniqueNumber gCapaConfig |
global gCT gFile gUniqueNumber gCapaConfig |
|
|
CTputs $cmdnum "$type submissions for $s_nm for set $start\n" |
set curset [lindex $setlist $index] |
|
CTputs $cmdnum "$type submissions for $s_nm for set $curset\n" |
if { $type == "telnet" } { |
if { $type == "telnet" } { |
set command "grep -i $s_id [file join $gFile($num) records submissions$start.db]" |
set command "grep -i $s_id [file join $gFile($num) records submissions$curset.db]" |
set followtype web |
set followtype web |
} else { |
} else { |
set command "grep -i $s_id [file join $gFile($num) \ |
set command "grep -i $s_id [file join $gFile($num) \ |
records websubmissions$start.db]" |
records websubmissions$curset.db]" |
set followtype telnet |
set followtype telnet |
incr start |
incr index |
} |
} |
set done 0 |
set done 0 |
set followcmd "" |
set followcmd "" |
while { !$done && ($start <= ($end+1)) } { |
while { !$done && ($index <= [llength $setlist]) } { |
if { $start <= $end } { |
if { [lindex $setlist $index] != "" } { |
set followcmd "CTsubmissionsLaunch $num $cmdnum $followtype $s_id {$s_nm} \ |
set followcmd "CTsubmissionsLaunch $num $cmdnum $followtype $s_id {$s_nm} \ |
$start $end" |
$index \"$setlist\"" |
} |
} |
if { ! [catch {set fileId [open "|$command" "r"]} ] } { set done 1 } |
if { ![catch {set fileId [open "|$command" "r"]} error ] } { set done 1 } |
} |
} |
fconfigure $fileId -blocking 0 |
fconfigure $fileId -blocking 0 |
fileevent $fileId readable "CTrunCommand $num $cmdnum $fileId {$followcmd}" |
fileevent $fileId readable "CTrunCommand $num $cmdnum $fileId {$followcmd}" |
Line 2918 proc CTcreateSummaryReport { num cmdnum
|
Line 2930 proc CTcreateSummaryReport { num cmdnum
|
|
|
removeStatus $cmdnum |
removeStatus $cmdnum |
|
|
if {!$error && "Yes" == [makeSure "Created summary file $file, would you like to see it?"]} { |
if {!$error && "Yes" == [makeSure \ |
|
"Created summary file $file, would you like to see it?"]} { |
set fileId [open [file join $gFile($num) $file] r] |
set fileId [open [file join $gFile($num) $file] r] |
CTputs $cmdnum [read $fileId] |
CTputs $cmdnum [read $fileId] |
CToutput $num $cmdnum |
CToutput $num $cmdnum |
Line 2930 proc CTcreateSummaryReport { num cmdnum
|
Line 2943 proc CTcreateSummaryReport { num cmdnum
|
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
########################################################### |
proc CTsetList { num } { |
proc CTsetList { file } { |
global gCT gFile |
|
set list "" |
set list "" |
for { set i 0 } { $i < 1000 } { incr i } { |
for { set i 0 } { $i < 100 } { incr i } { |
if { [file readable [file join $gFile($num) records set$i.db]] } { |
if { [file readable [file join $file records set$i.db]] } { |
lappend list |
lappend list $i |
|
} |
} |
} |
|
return $list |
} |
} |
|
|