aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2013-12-04 17:17:18 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2013-12-04 17:32:41 -0500
commit1cef4f071f89dc77759c0708975e0eaeada29935 (patch)
tree240795889614e5a83e9f618eac231d198511f7b1
parent0b07cede33d03a085d19a0aa458d6d149ff1f0c1 (diff)
downloadGradeBook-1cef4f071f89dc77759c0708975e0eaeada29935.tar.gz
GradeBook-1cef4f071f89dc77759c0708975e0eaeada29935.zip
Web deletion actually renames the column
Now deletion is recoverable operation
-rwxr-xr-xGradeBook_lib.tcl12
1 files changed, 11 insertions, 1 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index dcecce4..4231e46 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -1704,7 +1704,17 @@ proc DeleteColumnNonWeb { columnname } {
proc DeleteColumn { permission_list user } {
global script_name
set columnname [::ncgi::value columnname {}]
- DeleteColumnNonWeb $columnname
+ # I decide against actual deletion
+ # DeleteColumnNonWeb $columnname
+
+ # Instead I will rename column and put it to the special category
+ set deleted_columnname [concat _deleted_ $columnname]
+ RenameColumnNonWeb $columnname $deleted_columnname
+
+ # set column category to deleted one
+ set old_column_category [SelectColValue4User $deleted_columnname _Col_Category_]
+ set category_deleted deleted
+ UpdateColValue4UserNameNonWeb $deleted_columnname _Col_Category_ $category_deleted
calculteWeightedTotals
}