aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl
index bcf4606..622704a 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -80,6 +80,15 @@ proc CreateGradesTable {db} {
AddUserNonWeb Jon "Jonovich" jon [::md5::md5 -hex qwerty] student
}
+proc AddAccessRightNonWeb { action instructor_right ta_right student_right guest_right } {
+ set eval_str [concat INSERT INTO AccessRightsTable (actionname, instructor, ta, student, guest) VALUES('$action', '$instructor_right', '$ta_right', '$student_right', '$guest_right')]
+ set err [catch {db eval $eval_str } errStat]
+ if { $err } {
+ htmlErrorMsg $errStat
+ dbg "the following error happen: $errStat" 3
+ }
+}
+
proc CreateAccessRightsTable {db} {
db eval {CREATE TABLE AccessRightsTable(actionname text, instructor integer, ta integer, student integer, guest integer)}
# guest should have no rights make sure that 0 is evereywhere