summaryrefslogtreecommitdiff
path: root/CreateCourseGradeBook.tcl
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-01-23 21:36:51 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2011-01-23 21:36:51 -0500
commit67dd99728867b95599fccdb3234e3ef1c21bf2a1 (patch)
tree418fc02149d758e5532342bc5fe2b6982d2cf4b9 /CreateCourseGradeBook.tcl
parent1bd25fbc629868b56cdc9d2448f93a4a7cb16c0f (diff)
downloadGradeBook-67dd99728867b95599fccdb3234e3ef1c21bf2a1.tar.gz
GradeBook-67dd99728867b95599fccdb3234e3ef1c21bf2a1.zip
creation of the grade book demands instructor info
Ignore-this: 3f1736ad31c01d3d351e5aadf69d3a48 darcs-hash:20110124023651-067c0-ab8801b7ae4cf0a6b9ef5d62645e864d3da2cdbb.gz
Diffstat (limited to 'CreateCourseGradeBook.tcl')
-rwxr-xr-xCreateCourseGradeBook.tcl27
1 files changed, 22 insertions, 5 deletions
diff --git a/CreateCourseGradeBook.tcl b/CreateCourseGradeBook.tcl
index 491e2d0..39b1e71 100755
--- a/CreateCourseGradeBook.tcl
+++ b/CreateCourseGradeBook.tcl
@@ -6,12 +6,27 @@ exec tclsh "$0" "$@"
package require sqlite3
package require md5
-set class [lindex $argv 0]
-if { $class eq "" } {
- set class dummy_class
-}
+if { $argc < 3 } {
+ puts {Usage:}
+ puts "$argv0 database_name instructor_login instructor_password \[instructor_fname\] \[instructor_lname\]"
+ exit
+}
+
+set dbfile [lindex $argv 0]
+set instructor_login [lindex $argv 1]
+set instructor_password [lindex $argv 2]
-set dbfile $class
+if { $argc >= 4 } {
+ set instructor_fname [lindex $argv 3]
+} else {
+ set instructor_fname {}
+}
+
+if { $argc >= 5 } {
+ set instructor_lname [lindex $argv 4]
+} else {
+ set instructor_lname {}
+}
sqlite3 db $dbfile
@@ -118,6 +133,8 @@ proc UpdateColValue4GroupNameNonWeb { columnname groupname val } {
CreateGradesTable db
CreateAccessRightsTable db
+#AddUserNonWeb first_name last_name user_name password_hash group_name id_number section_num i
+AddUserNonWeb $instructor_fname $instructor_lname $instructor_login [::md5::md5 -hex $instructor_password] instructor
# vim: ts=2 sw=2 foldmethod=indent: