aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2020-02-13 13:26:31 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2020-02-13 13:26:31 -0500
commit473170c4fa664037dff5b3f07ef2f1a742724120 (patch)
tree97c2de0022750575207d7c030ee6adc176efa4fa
parent639f88102ac56ab819e8ccae1a23a8c39b06bbe9 (diff)
downloadGradeBook-473170c4fa664037dff5b3f07ef2f1a742724120.tar.gz
GradeBook-473170c4fa664037dff5b3f07ef2f1a742724120.zip
Note and Indo column ask for textarea when updated
-rwxr-xr-xGradeBook_lib.tcl16
1 files changed, 14 insertions, 2 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 8c2f14d..7d89afe 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -1949,11 +1949,23 @@ proc htmlEditUserGradeValue {permission_list user } {
set FirstName [SelectColValue4User FirstName $modified_user]
set LastName [SelectColValue4User LastName $modified_user]
set old_value [SelectColValue4User $modified_column $modified_user]
+ set column_category [SelectColValue4User $modified_column _Col_Category_]
puts "<div class=edit_user_grade_request>"
puts "Change grade for student <b>$FirstName $LastName</b> with user name $modified_user"
puts "<form name=\"input\" action=\"$script_name\" method=\"post\" >"
- puts "<b>$modified_column</b> old value: \{$old_value\},"
- puts "new value: <input name=\"newcolumnvalue\" value=\"$old_value\" ><br>"
+ set needs_textarea false
+ switch $column_category {
+ Note {set needs_textarea true}
+ Info {set needs_textarea true}
+ default { }
+ }
+ if { !$needs_textarea } {
+ puts "<b>$modified_column</b> old value: \{$old_value\},"
+ puts "new value: <input name=\"newcolumnvalue\" value=\"$old_value\" ><br>"
+ } else {
+ puts "<b>$modified_column</b>:"
+ puts "<br><textarea rows=\"10\" cols=\"80\" name=\"newcolumnvalue\" value=\"$old_value\">$old_value</textarea><br>"
+ }
puts {<input type="hidden" name="action" value="edit_user_grade">}
puts [join [ list {<input type="hidden" name="user2modify" value="} $modified_user {">} ] ""]
puts [join [ list {<input type="hidden" name="column2modify" value="} $modified_column {">} ] "" ]