version 1.1, 1999/09/28 21:25:37
|
version 1.3, 1999/11/05 19:32:17
|
Line 50 proc createGradeSubjWindow {} {
|
Line 50 proc createGradeSubjWindow {} {
|
pack $msglist $msgbutton -side top |
pack $msglist $msgbutton -side top |
pack configure $msgbutton -anchor w |
pack configure $msgbutton -anchor w |
|
|
set gSubj(response) [listbox $msglist.list -width 40 -height 5 \ |
set gSubj(responseList) [listbox $msglist.list -width 40 -height 5 \ |
-yscrollcommand "$msglist.scroll set"] |
-yscrollcommand "$msglist.scroll set"] |
scrollbar $msglist.scroll -command "$msglist.text yview" |
scrollbar $msglist.scroll -command "$msglist.text yview" |
pack $gSubj(response) $msglist.scroll -side left |
pack $gSubj(responseList) $msglist.scroll -side left |
pack configure $msglist.scroll -fill y |
pack configure $msglist.scroll -fill y |
|
|
set gSubj(numresponse) 0 |
set gSubj(numresponse) 0 |
Line 78 proc createGradeSubjWindow {} {
|
Line 78 proc createGradeSubjWindow {} {
|
pack configure $idlist.scroll -fill y |
pack configure $idlist.scroll -fill y |
|
|
button $idbutton.delete -text Delete -command subjDeleteId |
button $idbutton.delete -text Delete -command subjDeleteId |
pack $idbutton.delete |
frame $idbutton.spacer -width 30 |
|
label $idbutton.l1 -text "\# Words:" |
|
label $idbutton.words -textvariable gSubj(numwords) |
|
pack $idbutton.delete $idbutton.spacer $idbutton.l1 $idbutton.words -side left |
|
|
set response [frame $grade.response] |
set response [frame $grade.response] |
pack $response |
pack $response |
Line 318 proc subjNext {} {
|
Line 321 proc subjNext {} {
|
subjInsertIds $id |
subjInsertIds $id |
} |
} |
|
|
|
append words [string trim [$gSubj(response) get 0.0 end-1c]] " " |
|
set ws [format " \t\n"] |
|
set gSubj(numwords) [regsub -all -- \[$ws\]+ $words {} b] |
wm title .gradesubjective "Grading Subjective, Set $gSubj(set), Prob $gSubj(quest), $id" |
wm title .gradesubjective "Grading Subjective, Set $gSubj(set), Prob $gSubj(quest), $id" |
if { [catch {set gSubj(score) $gSubj(done.$id.score)}] } { |
if { [catch {set gSubj(score) $gSubj(done.$id.score)}] } { |
set gSubj(score) "" |
set gSubj(score) "" |
Line 674 proc subjSendResponse {} {
|
Line 680 proc subjSendResponse {} {
|
global gSubj |
global gSubj |
} |
} |
|
|
|
########################################################### |
|
# subjIndexResponse |
|
########################################################### |
|
########################################################### |
|
########################################################### |
proc subjIndexResponse {} { |
proc subjIndexResponse {} { |
global gSubj |
global gSubj |
|
|
$gSubj(response) delete 0 end |
$gSubj(responseList) delete 0 end |
|
|
set i 0 |
set i 0 |
foreach element [lsort -dictionary [array names gSubj "response.*"]] { |
foreach element [lsort -dictionary [array names gSubj "response.*"]] { |
set head [string range $gSubj($element) 0 30] |
regsub -all -- "\n\r\t" [string range $gSubj($element) 0 30] " " head |
$gSubj(response) insert end "[incr i]. $head" |
$gSubj(responseList) insert end "[incr i]. $head" |
} |
} |
} |
} |
|
|
Line 696 proc subjSaveResponse {} {
|
Line 707 proc subjSaveResponse {} {
|
|
|
set num [incr gSubj(numresponse)] |
set num [incr gSubj(numresponse)] |
set gSubj(response.$num) [$gSubj(responseEdit) get 0.0 end] |
set gSubj(response.$num) [$gSubj(responseEdit) get 0.0 end] |
|
destroy [winfo toplevel $gSubj(responseEdit)] |
subjIndexResponse |
subjIndexResponse |
} |
} |
|
|
Line 717 proc subjNewResponse {} {
|
Line 729 proc subjNewResponse {} {
|
|
|
set textFrame [frame $response.text] |
set textFrame [frame $response.text] |
set buttonFrame [frame $response.button] |
set buttonFrame [frame $response.button] |
|
pack $textFrame $buttonFrame |
|
|
set gSubj(responseEdit) [text $textFrame.text -yscrollcommand \ |
set gSubj(responseEdit) [text $textFrame.text -yscrollcommand \ |
"$textFrame.scroll set" -wrap char -height 15] |
"$textFrame.scroll set" -wrap char -height 15] |
scrollbar $textFrame.scroll -command "$textFrame.text yview" |
scrollbar $textFrame.scroll -command "$textFrame.text yview" |
pack $textFrame.scroll $textFrame.text -side left -expand 1 |
pack $textFrame.text $textFrame.scroll -side left -expand 1 |
|
pack configure $textFrame.scroll -fill y |
|
|
button $buttonFrame.save -text Save -command "subjSaveResponse" |
button $buttonFrame.save -text Save -command "subjSaveResponse" |
button $buttonFrame.forget -text Cancel -command "destroy $response" |
button $buttonFrame.forget -text Cancel -command "destroy $response" |