aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook.tcl52
1 files changed, 1 insertions, 51 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 34c04fb..68bf1a7 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -720,63 +720,13 @@ proc AccessGroupRights {db user password } {
return $permission_list
}
-proc htmlStudentGrades { db user } {
- set defSortCol LastName
- global script_name
- set sort_col $defSortCol
-
-
- puts {<div class="gradestable">}
- set show_header 1
-
- set do_not_show_columns [list FirstName LastName UserName PasswordHash GroupName]
- set cols_to_show [getColListFromTable GradesTable]
- foreach col $do_not_show_columns {
- set cols_to_show [removeElementFromList $col $cols_to_show]
- }
- set sql_column_str [colList2sqlColStr $cols_to_show]
-
- # show the table with grades
- set eval_str [concat SELECT $sql_column_str FROM GradesTable WHERE UserName='$user' ORDER BY $sort_col]
- set err [catch {
- db eval $eval_str v {
- if { $show_header } {
- set show_header 0
- puts {<table class="gradestable" border="1">}
- puts "<tr>"
- foreach col $v(*) {
- puts -nonewline "<th>$col</th>"
- }
- puts "</tr>"
- puts "<tr>"
- } else {
- puts "<tr>"
- }
- foreach index $v(*) {
- if { $index != "*" } {
- set col_value [htmlReplaceEmptyString $v($index)]
- puts -nonewline "<td>$col_value</td>"
- }
- }
- puts "</tr>"
- }
- } errStat ]
- if { $err } {
- dbg "we should never be here if $sortCol and $user exist in the table" 1
- dbg $errStat 1
-
- }
- puts "</table>"
- puts {</div>}
-}
-
proc htmlGradesTable {db permission_list user} {
array set permission $permission_list
global sortCol
switch $permission(GroupName) {
guest { }
- student { htmlStudentGrades db $user}
+ student { htmlDBout db $permission_list $user $sortCol}
ta { htmlDBout db $permission_list $user $sortCol}
instructor { htmlDBout db $permission_list $user $sortCol}
default { }