diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-22 23:10:16 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-22 23:10:16 -0500 |
commit | b86b6ecb8824e41cf5d901b21a6d7d03b37632a3 (patch) | |
tree | f2a3857fb5e19f49e201a544da828a0cc9fb1f82 /GradeBook.tcl | |
parent | 3bd0e88940fb4c2af1c0917541729886e58d036c (diff) | |
download | GradeBook-b86b6ecb8824e41cf5d901b21a6d7d03b37632a3.tar.gz GradeBook-b86b6ecb8824e41cf5d901b21a6d7d03b37632a3.zip |
added IdNum column
Ignore-this: c906560561c54b1e8927aca6b8d1b30b
darcs-hash:20110123041016-067c0-e9958e827678941d5944587afef40937c43f7586.gz
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-x | GradeBook.tcl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index 91e42c3..168902c 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -62,7 +62,7 @@ proc AddUserNonWeb { first_name last_name user_name password_hash {group_name {g } proc CreateGradesTable {db} { - set err [catch {db eval {CREATE TABLE GradesTable(FirstName text, LastName text, UserName text, PasswordHash text, GroupName text, UserHiddenColums text, UserHiddenGroups text)} } errStat] + set err [catch {db eval {CREATE TABLE GradesTable(FirstName text, LastName text, UserName text, PasswordHash text, GroupName text, UserHiddenColums text, UserHiddenGroups text, IdNum text)} } errStat] if { $err } { htmlErrorMsg $errStat dbg "the following error happen: $errStat" 1 @@ -79,7 +79,7 @@ proc CreateGradesTable {db} { AddUserNonWeb Jon "Jonovich" jon [::md5::md5 -hex qwerty] student AddUserNonWeb Ins "Instruch I" instructor [::md5::md5 -hex qwerty] instructor # reasonable defaults for hidden columns - set instructor_hidden_columns [list UserHiddenColums PasswordHash UserHiddenGroups] + set instructor_hidden_columns [list UserHiddenColums PasswordHash UserHiddenGroups IdNum] UpdateColValue4GroupNameNonWeb UserHiddenColums instructor $instructor_hidden_columns } @@ -158,8 +158,8 @@ proc htmlDBout {db permission_list user {sort_col {}}} { # set hidden column list switch $permission(GroupName) { instructor { set hidden_columns {} } - ta { set hidden_columns [list UserName PasswordHash GroupName UserHiddenColums] } - student { set hidden_columns [list FirstName LastName UserName PasswordHash GroupName UserHiddenColums] } + ta { set hidden_columns [list UserName PasswordHash GroupName UserHiddenColums UserHiddenGroups IdNum] } + student { set hidden_columns [list FirstName LastName UserName PasswordHash GroupName UserHiddenColums UserHiddenGroups IdNum] } guest { set hidden_columns $column_list } default { set hidden_columns $column_list } } @@ -212,6 +212,7 @@ proc htmlDBout {db permission_list user {sort_col {}}} { PasswordHash { } UserHiddenColums { } UserHiddenGroups { } + IdNum { } GroupName { } default { lappend action_list changegrades "change grades" deletecolumn delete changecolumn "change column" |