diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-03-29 15:48:20 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-03-29 15:48:20 -0400 |
commit | 40d80bd1ebbb6d7bee81387523e28511bfb56150 (patch) | |
tree | 44ec1eeea71b4c335ec1019fd5deaa243334e59e /GradeBook_lib.tcl | |
parent | c9a62dafd318dd9cd16a059565ae10e771dc9eca (diff) | |
download | GradeBook-40d80bd1ebbb6d7bee81387523e28511bfb56150.tar.gz GradeBook-40d80bd1ebbb6d7bee81387523e28511bfb56150.zip |
improved column value to html form transform
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-x | GradeBook_lib.tcl | 19 |
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 |