aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2014-03-29 15:48:20 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2014-03-29 15:48:20 -0400
commit40d80bd1ebbb6d7bee81387523e28511bfb56150 (patch)
tree44ec1eeea71b4c335ec1019fd5deaa243334e59e
parentc9a62dafd318dd9cd16a059565ae10e771dc9eca (diff)
downloadGradeBook-40d80bd1ebbb6d7bee81387523e28511bfb56150.tar.gz
GradeBook-40d80bd1ebbb6d7bee81387523e28511bfb56150.zip
improved column value to html form transform
-rwxr-xr-xGradeBook_lib.tcl19
1 files changed, 12 insertions, 7 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index e26d16a..3146a77 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -1049,19 +1049,24 @@ proc htmlFormatColVal { col_value columnname user user_shown permission_list {fo
set col_value [ concat $col_value "=" <b> $col_value_letter_grade </b>]
}
}
- set col_value [htmlReplaceEmptyString $col_value]
- set col_value ${font_style_strt}${col_value}${font_style_end}
+ set col_str_value [htmlReplaceEmptyString $col_value]
+ set col_str_value ${font_style_strt}${col_str_value}${font_style_end}
switch $columnname {
GroupName {
set action_html_code {}
- if { [isActionGranted changegroupname $permission_list $user] && ($user_shown ne "_UNSET_") && ($col_value ne "inforow") } {
- set separator {<br>}
- set action_html_code "$separator<span class=\"controls\"><a href=\"$script_name?action=changegroupname&user2modify=$user_shown\">Change</a></span>"
+ switch $col_value {
+ inforow { set action_html_code {} }
+ default {
+ if { [isActionGranted changegroupname $permission_list $user] && ($user_shown ne "_UNSET_") } {
+ set separator {<br>}
+ set action_html_code "$separator<span class=\"controls\"><a href=\"$script_name?action=changegroupname&user2modify=$user_shown\">Change</a></span>"
+ }
+ }
}
- set html_str [join [list ${html_str} "<td class=\"$category\">$col_value $action_html_code</td>"] {}]
+ set html_str [join [list ${html_str} "<td class=\"$category\">$col_str_value $action_html_code</td>"] {}]
}
default {
- set html_str [join [list ${html_str} "<td class=\"$category\">$col_value</td>"] {}]
+ set html_str [join [list ${html_str} "<td class=\"$category\">$col_str_value</td>"] {}]
}
}
return $html_str