version 1.9, 1999/12/13 21:38:44
|
version 1.10, 2000/03/22 21:08:02
|
Line 227 proc updateSecCount {} {
|
Line 227 proc updateSecCount {} {
|
|
|
proc subjCheckForNew {} { |
proc subjCheckForNew {} { |
global gSubj |
global gSubj |
|
|
|
foreach file [glob ?????????] { |
|
if { [lsearch $gSubj(stunums) $file] == -1 } { lappend gSubj(stunums) $file } |
|
} |
|
set gSubj(togo) [expr [llength $gSubj(stunums)]-$gSubj(done)] |
} |
} |
|
|
proc checkGSubj {} { |
proc checkGSubj {} { |
Line 292 proc subjInitAllLists {} {
|
Line 297 proc subjInitAllLists {} {
|
incr i |
incr i |
set aline [gets $fileId] |
set aline [gets $fileId] |
if { [eof $fileId]} {break} |
if { [eof $fileId]} {break} |
|
# skip blank lines |
|
if { [string trim $aline] == "" } { continue } |
lappend gSubj(allstunum) [string toupper [string range $aline 14 22]] |
lappend gSubj(allstunum) [string toupper [string range $aline 14 22]] |
#lappend gSubj(allname) [string toupper [string range $aline 24 59]] |
#lappend gSubj(allname) [string toupper [string range $aline 24 59]] |
lappend gSubj(allname) [string range $aline 24 59] |
lappend gSubj(allname) [string range $aline 24 59] |
Line 419 proc subjFindIds2 {} {
|
Line 426 proc subjFindIds2 {} {
|
set text [string toupper [$gSubj(response) get 0.0 end]] |
set text [string toupper [$gSubj(response) get 0.0 end]] |
set result "" |
set result "" |
if { [catch {lsearch $text a}] } { |
if { [catch {lsearch $text a}] } { |
puts badlist; return subjFindIds1 |
#puts badlist |
|
return subjFindIds1 |
} else { |
} else { |
foreach id $gSubj(allstunum) { |
foreach id $gSubj(allstunum) { |
if { [lsearch -glob $text *$id*] != -1 } { |
if { [lsearch -glob $text *$id*] != -1 } { |
Line 739 proc subjGetOneStudent { window path idV
|
Line 747 proc subjGetOneStudent { window path idV
|
########################################################### |
########################################################### |
########################################################### |
########################################################### |
proc subjSendResponse {} { |
proc subjSendResponse {} { |
global gSubj |
global gSubj gCapaConfig |
|
|
if { "" == [set which [$gSubj(responseList) curselection]]} { |
if { "" == [set which [$gSubj(responseList) curselection]]} { |
displayMessage "Please select a message to send." |
displayMessage "Please select a message to send." |
Line 755 proc subjSendResponse {} {
|
Line 763 proc subjSendResponse {} {
|
set index [lsearch $gSubj(allstunum) $stu] |
set index [lsearch $gSubj(allstunum) $stu] |
set name [lindex $gSubj(allname) $index] |
set name [lindex $gSubj(allname) $index] |
set email [lindex $gSubj(allemail) $index] |
set email [lindex $gSubj(allemail) $index] |
puts "$name:[split $name ,]:[lindex [split $name ,] 1]:[lindex [lindex [split $name ,] 1] 0]:$index:$stu" |
#puts "$name:[split $name ,]:[lindex [split $name ,] 1]:[lindex [lindex [split $name ,] 1] 0]:$index:$stu" |
puts [lsearch $gSubj(allemail) albertel@pilot.msu.edu] |
#puts [lsearch $gSubj(allemail) albertel@pilot.msu.edu] |
set first_name [lindex [lindex [split $name ,] 1] 0] |
set first_name [lindex [lindex [split $name ,] 1] 0] |
set last_name [lindex [split $name , ] 0] |
set last_name [lindex [split $name , ] 0] |
set score $gSubj(score) |
set score $gSubj(score) |
Line 765 proc subjSendResponse {} {
|
Line 773 proc subjSendResponse {} {
|
regsub -all -- \\\$score $message $score message |
regsub -all -- \\\$score $message $score message |
# set message [subst -nobackslashes -nocommands $gSubj(response.$which)] |
# set message [subst -nobackslashes -nocommands $gSubj(response.$which)] |
if { [regexp -- (^Subject:\[^\n\]*)(\n)(.*) $message matchvar subjline newline messagebody] } { |
if { [regexp -- (^Subject:\[^\n\]*)(\n)(.*) $message matchvar subjline newline messagebody] } { |
set message "$subjline Class [file tail $gSubj(dir)], Set $gSubj(set), Question $gSubj(quest) \n$messagebody" |
set subject "$subjline Class [file tail $gSubj(dir)], Set $gSubj(set), Question $gSubj(quest)" |
|
set message $messagebody |
} else { |
} else { |
set message "Subject: Class [file tail $gSubj(dir)], Set $gSubj(set), Question $gSubj(quest) \n$message" |
set subject "Subject: Class [file tail $gSubj(dir)], Set $gSubj(set), Question $gSubj(quest)" |
} |
} |
displayMessage "$message sent to $email" |
displayMessage "$message sent to $email" |
exec echo $message | mail $email |
exec echo $message | $gCapaConfig(mail_command) -s $subject $email |
} |
} |
} |
} |
|
|
Line 852 proc subjDeleteResponse {} {
|
Line 861 proc subjDeleteResponse {} {
|
if { "" == [set which [$gSubj(responseList) curselection]]} { return } |
if { "" == [set which [$gSubj(responseList) curselection]]} { return } |
incr which |
incr which |
if { [catch {unset gSubj(response.$which)}] } { |
if { [catch {unset gSubj(response.$which)}] } { |
puts [array names gSubj response.*] |
#puts [array names gSubj response.*] |
return |
return |
} |
} |
for {set i [expr $which + 1]} { [info exists gSubj(response.$i)] } {incr i} { |
for {set i [expr $which + 1]} { [info exists gSubj(response.$i)] } {incr i} { |