Diff for /capa/capa51/GUITools/gradesubjective.tcl between versions 1.4 and 1.5

version 1.4, 1999/11/18 17:55:24 version 1.5, 1999/11/23 18:35:12
Line 88  proc createGradeSubjWindow {} { Line 88  proc createGradeSubjWindow {} {
   
     set scoreandcom [toplevel $gradSubj.scoreandcom]      set scoreandcom [toplevel $gradSubj.scoreandcom]
     wm title $scoreandcom "Control Panel"        wm title $scoreandcom "Control Panel"  
     wm protocol $gradSubj WM_DELETE_WINDOW "subjDone"      wm protocol $scoreandcom WM_DELETE_WINDOW "subjDone"
   
     set score [frame $scoreandcom.score]      set score [frame $scoreandcom.score]
     set command [frame $scoreandcom.command]      set command [frame $scoreandcom.command]
Line 207  proc subjCheckForNew {} { Line 207  proc subjCheckForNew {} {
     global gSubj      global gSubj
 }  }
   
   proc checkGSubj {} {
       global gSubj
       if {[catch {set gSubj(stunums)}]} {
    cd [file join $gSubj(dir) records set$gSubj(set) problem$gSubj(quest)]
    set gSubj(stunums) [lsort -dictionary [glob *]]
    if { [set num [lsearch $gSubj(stunums) gradingstatus]] != -1} {
       set gSubj(stunums) [lreplace $gSubj(stunums) $num $num]
    }
    cd $gSubj(dir)
       }
       if {[catch {set gSubj(current)}]} {set gSubj(current) -1}
       if {[catch {set gSubj(totalsec)}]} {set gSubj(totalsec) 0}
       if {[catch {set gSubj(seconds)}]} {set gSubj(seconds) [clock seconds]}
       if {[catch {set gSubj(togo)}]} {set gSubj(togo) [llength $gSubj(stunums)]}
       if {[catch {set gSubj(allstunum)}] || 
    [catch {set gSubj(allname)}] || 
    [catch {set gSubj(allemail)}] } {
    subjInitAllLists
       }
   }
   
 proc subjRestore {} {  proc subjRestore {} {
     global gSubj      global gSubj
     source gradingstatus      source gradingstatus
     subjCheckForNew      subjCheckForNew
     set gSubj(seconds) [expr {[clock seconds] - $gSubj(sec)}]      set gSubj(seconds) [expr {[clock seconds] - $gSubj(sec)}]
     cd $gSubj(dir)      cd $gSubj(dir)
     incr gSubj(current) -1      if { [catch {incr gSubj(current) -1}]} { set gSubj(current) -1 }
     if { $gSubj(redoalllists) } { subjInitAllLists; set gSubj(redoalllists) 0 }      if { $gSubj(redoalllists) } { subjInitAllLists; set gSubj(redoalllists) 0 }
       checkGSubj
     subjIndexResponse      subjIndexResponse
     subjNext      subjNext
 }  }
Line 230  proc subjSave {} { Line 252  proc subjSave {} {
   
 proc subjDone {} {  proc subjDone {} {
     global gSubj      global gSubj
     subjSave      if { [catch {subjSave}] } {
    displayMessage "Unable to save."
       }
     unset gSubj      unset gSubj
     destroy .gradesubjective      destroy .gradesubjective
 }  }
   
 proc subjInitAllLists {} {  proc subjInitAllLists {} {
     global gSubj      global gSubj
     puts "doing all lists"  
     set i 0      set i 0
     catch {unset gSubj(allstunum)}      catch {unset gSubj(allstunum)}
     catch {unset gSubj(allname)}      catch {unset gSubj(allname)}
Line 252  proc subjInitAllLists {} { Line 275  proc subjInitAllLists {} {
  lappend gSubj(allname) [string range $aline 24 59]   lappend gSubj(allname) [string range $aline 24 59]
  lappend gSubj(allemail) [string range $aline 60 99]   lappend gSubj(allemail) [string range $aline 60 99]
     }      }
     puts "did $i lines"  
 }  }
   
 proc subjInit {} {  proc subjInit {} {
Line 518  proc subjPrev {} { Line 540  proc subjPrev {} {
   
 proc subjMessage { mesg {tag normal} } {  proc subjMessage { mesg {tag normal} } {
     global gSubj      global gSubj
     displayMessage $message      displayMessage $mesg
 #    $gSubj(msg) insert end "[clock format [clock seconds] -format {%I:%M:%S}] - $mesg\n" $tag  #    $gSubj(msg) insert end "[clock format [clock seconds] -format {%I:%M:%S}] - $mesg\n" $tag
 #    $gSubj(msg) see end  #    $gSubj(msg) see end
 }  }
Line 701  proc subjSendResponse {} { Line 723  proc subjSendResponse {} {
     }      }
     incr which      incr which
   
       set message ""
   
     set stuList [$gSubj(idlist) get 0 end]      set stuList [$gSubj(idlist) get 0 end]
     foreach stu $stuList {      foreach stu $stuList {
  set stu [lindex $stu 0]   set stu [lindex $stu 0]

Removed from v.1.4  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>