aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GradeBook.css18
-rwxr-xr-xGradeBook.tcl22
2 files changed, 29 insertions, 11 deletions
diff --git a/GradeBook.css b/GradeBook.css
index ec8411c..4e2454b 100644
--- a/GradeBook.css
+++ b/GradeBook.css
@@ -41,6 +41,24 @@ div.controls {
margin-bottom: 15px;
}
+table.gradestable {
+ /*border-bottom: 2px solid black;*/
+ background-color: #ffcc99;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ margin-bottom: 15px;
+}
+
+div.errormsg {
+ /*border-bottom: 2px solid black;*/
+ background-color: #ff0000;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ margin-bottom: 15px;
+}
+
+
+
div.footer {
/*border-bottom: 2px solid black;*/
background-color: #ffcc99;
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 4bc6eef..339552c 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -109,7 +109,7 @@ proc htmlDBout {db permission_list {sort_col {}}} {
db eval $eval_str v {
if { $show_header } {
set show_header 0
- puts {<table border="1">}
+ puts {<table class="gradestable" border="1">}
puts "<tr>"
foreach col $v(*) {
puts -nonewline "<th><a href=$script_name?action=sort&sortCol=$col>$col</a>"
@@ -287,14 +287,14 @@ proc UpdateGrades { permission_list user } {
db eval $sql_str
} errStat2 ]
if { $err2 } {
- puts "the following error happen: $errStat2"
+ puts "<div class=\"errormsg\">the following error happen: $errStat2</div>"
dbg "the following error happen: $errStat2" 3
}
}
} errStat ]
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
}
@@ -317,7 +317,7 @@ proc ChangeGrades { permission_list user } {
db eval $eval_str v {
if { $show_header } {
set show_header 0
- puts {<table border="1">}
+ puts {<table class="gradestable" border="1">}
puts "<tr>"
foreach col $v(*) {
puts -nonewline "<th>$col</th>"
@@ -341,7 +341,7 @@ proc ChangeGrades { permission_list user } {
} errStat ]
puts "</table>"
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
puts {<input type="hidden" name="action" value="updategrades"/>}
@@ -352,7 +352,7 @@ proc ChangeGrades { permission_list user } {
puts "<a href=\"$script_name\">Cancel changes</a>"
} else {
- puts "error: empty column names are not permitted"
+ puts "<div class=\"errormsg\">error: empty column names are not permitted</div>"
}
}
@@ -381,11 +381,11 @@ proc DeleteColumn { permission_list user } {
COMMIT;"
set err [catch {db eval $eval_str } errStat]
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
} else {
- puts "error: empty column names are not permitted"
+ puts "<div class=\"errormsg\">error: empty column names are not permitted</div>"
}
}
@@ -398,12 +398,12 @@ proc AddColumn { permission_list user } {
set eval_str [concat ALTER TABLE GradesTable ADD \"$columnname2add\" real]
set err [catch {db eval $eval_str } errStat]
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
} else {
- puts "error: empty column names are not permitted"
+ puts "<div class=\"errormsg\">error: empty column names are not permitted</div>"
}
}
@@ -466,7 +466,7 @@ proc htmlStudentGrades { db user } {
db eval $eval_str v {
if { $show_header } {
set show_header 0
- puts {<table border="1">}
+ puts {<table class="gradestable" border="1">}
puts "<tr>"
foreach col $v(*) {
puts -nonewline "<th>$col</th>"