blob: 793a56bc67c746944e27a5b3cd07143ae4ec916f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/sh
# (C) 2011 by Eugeniy Mikhailov, <evgmik@gmail.com>
# vim:set ft=tcl: \
exec tclsh "$0" "$@"
package require sqlite3
package require md5
source ./profiler.tcl
source ./GradeBook_lib.tcl
if { $argc < 1 } {
puts {tests built in library functions}
puts {Usage:}
puts " $argv0 database_name"
puts {}
puts {Example:}
puts [concat " $argv0" { 2013_Spring_Phys742}]
exit
}
set dbfile [lindex $argv 0]
sqlite3 db $dbfile
set eval_str [concat BEGIN TRANSACTION]
set err [catch {db eval $eval_str } errStat]
if { $err } {
htmlErrorMsg $errStat
dbg "the following error happen: $errStat" msg_level_critical
}
calculteWeightedTotals
set eval_str [concat END TRANSACTION]
set err [catch {db eval $eval_str } errStat]
if { $err } {
htmlErrorMsg $errStat
dbg "the following error happen: $errStat" msg_level_critical
}
global TimeProfilerMode
if { [info exists TimeProfilerMode] } {
TimeProfilerDump description
}
db close
# vim: ts=2 sw=2 foldmethod=indent:
|