diff options
-rwxr-xr-x | GradeBook_lib.tcl | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index 05e156a..e26d16a 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -1023,8 +1023,15 @@ proc htmlFormatTheLowestGradeRaw { sql_column_str hidden_columns } { puts "</tr>" } -proc htmlFormatColVal { col_value columnname user user_shown permission_list} { +proc htmlFormatColVal { col_value columnname user user_shown permission_list {font_style {}} } { global script_name + set html_str {} + set font_style_strt {} + set font_style_end {} + if { $font_style ne "" } { + set font_style_strt "<$font_style>" + set font_style_end "</$font_style>" + } set category [SelectColValue4User $columnname _Col_Category_] set max_points [SelectColValue4User $columnname _Max_Points_] if { ([SelectColValue4User GroupName $user_shown] ne "inforow") && ($category eq "weighted_column") && ($max_points != 0) } { @@ -1043,6 +1050,7 @@ proc htmlFormatColVal { col_value columnname user user_shown permission_list} { } } set col_value [htmlReplaceEmptyString $col_value] + set col_value ${font_style_strt}${col_value}${font_style_end} switch $columnname { GroupName { set action_html_code {} @@ -1050,10 +1058,13 @@ proc htmlFormatColVal { col_value columnname user user_shown permission_list} { set separator {<br>} set action_html_code "$separator<span class=\"controls\"><a href=\"$script_name?action=changegroupname&user2modify=$user_shown\">Change</a></span>" } - puts -nonewline "<td class=\"$category\">$col_value $action_html_code</td>" + set html_str [join [list ${html_str} "<td class=\"$category\">$col_value $action_html_code</td>"] {}] + } + default { + set html_str [join [list ${html_str} "<td class=\"$category\">$col_value</td>"] {}] } - default {puts -nonewline "<td class=\"$category\">$col_value</td>"} } + return $html_str } proc htmlDBout {db permission_list user {sort_col {}}} { @@ -1164,7 +1175,7 @@ proc htmlDBout {db permission_list user {sort_col {}}} { if { $columnname != "*" } { # detect what column category it is set col_value $v($columnname) - htmlFormatColVal $col_value $columnname $user $user_shown $permission_list + puts [htmlFormatColVal $col_value $columnname $user $user_shown $permission_list] } } puts "</tr>" |