diff options
-rwxr-xr-x | GradeBook_lib.tcl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index c2c8cb0..f23a82a 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -943,8 +943,17 @@ proc UpdateCourseInfo { db permission_list user } { } proc UserHideGradeCategory { permission_list user } { + set ctg_name [::ncgi::value grades_category {}] + set currently_UserHiddenGradeCategories [SelectColValue4User UserHiddenGradeCategories $user] + lappend currently_UserHiddenGradeCategories $ctg_name + UpdateColValue4UserNameNonWeb UserHiddenGradeCategories $user $currently_UserHiddenGradeCategories } + proc UserUnHideGradeCategory { permission_list user } { + set ctg_name [::ncgi::value grades_category {}] + set currently_UserHiddenGradeCategories [SelectColValue4User UserHiddenGradeCategories $user] + set currently_UserHiddenGradeCategories [removeElementFromList $ctg_name $currently_UserHiddenGradeCategories] + UpdateColValue4UserNameNonWeb UserHiddenGradeCategories $user $currently_UserHiddenGradeCategories } proc UserUnHideGroup { permission_list user } { @@ -1227,10 +1236,10 @@ proc DeleteColumn { permission_list user } { DeleteColumnNonWeb $columnname } -proc AddColumnNonWeb { columnname2add column_category maxpointpossible } { +proc AddColumnNonWeb { columnname2add column_category maxpointpossible {sql_type {text}} } { if { $columnname2add != "" } { - set eval_str [concat ALTER TABLE GradesTable ADD \"$columnname2add\" text] + set eval_str [concat ALTER TABLE GradesTable ADD \"$columnname2add\" $sql_type] set err [catch {db eval $eval_str } errStat] if { $err } { htmlErrorMsg $errStat @@ -1333,8 +1342,7 @@ proc ShowControls { permission_list user } { # hide user grades category set grades_category_for_hide $grades_category - #set currently_hidden_grades_category [SelectColValue4User UserHiddenGradeCategories $user] - set currently_hidden_grades_category Quiz; #debug + set currently_hidden_grades_category [SelectColValue4User UserHiddenGradeCategories $user] # remove already hidden category from offering foreach grd_category $currently_hidden_grades_category { set grades_category_for_hide [removeElementFromList $grd_category $grades_category_for_hide] |