diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-20 23:25:18 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2011-01-20 23:25:18 -0500 |
commit | 91556c99fcba1d6429b0f735e41cb621f8e5eeb4 (patch) | |
tree | b0aa547180d7bdb8ca189d6f34f1eef3e2655575 | |
parent | e8b9669656a506d07562f54472dbf175cea4f084 (diff) | |
download | GradeBook-91556c99fcba1d6429b0f735e41cb621f8e5eeb4.tar.gz GradeBook-91556c99fcba1d6429b0f735e41cb621f8e5eeb4.zip |
Grades table creation redone
Ignore-this: 8094b22c49d9ec9176acc8ad299c9b6b
darcs-hash:20110121042518-067c0-272c16b3d549eadf95dde208d0f42ed61bb330ff.gz
-rwxr-xr-x | GradeBook.tcl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index 6f5384c..e7c4351 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -60,7 +60,7 @@ proc CreatePasswordsTable {db} { } proc AddUserNonWeb { first_name last_name user_name password_hash {group_name {guest}} } { - set eval_str [concat INSERT INTO GradesTable (FirstName, LastName, UserName, PassWordHash, GroupName) VALUES('$first_name', '$last_name', '$user_name', '$password_hash', '$group_name')] + set eval_str [concat INSERT INTO GradesTable (FirstName, LastName, UserName, PasswordHash, GroupName) VALUES('$first_name', '$last_name', '$user_name', '$password_hash', '$group_name')] set err [catch {db eval $eval_str } errStat] if { $err } { htmlErrorMsg $errStat @@ -69,15 +69,15 @@ 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)} } errStat] + set err [catch {db eval {CREATE TABLE GradesTable(FirstName text, LastName text, UserName text, PasswordHash text, GroupName text)} } errStat] if { $err } { htmlErrorMsg $errStat dbg "the following error happen: $errStat" 1 } # add special users aka special info rows - AddUserNonWeb {} {} _Col_Category_ {} infocolumn - AddUserNonWeb {} {} _Max_Points_ {} infocolumn + AddUserNonWeb {} {} _Col_Category_ {} inforow + AddUserNonWeb {} {} _Max_Points_ {} inforow # dummy users AddUserNonWeb Dan "Dandanovich" dan [::md5::md5 -hex qwerty] student |