diff options
Diffstat (limited to 'CreateCourseGradeBook.tcl')
-rwxr-xr-x | CreateCourseGradeBook.tcl | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/CreateCourseGradeBook.tcl b/CreateCourseGradeBook.tcl index 4190bb7..4df9456 100755 --- a/CreateCourseGradeBook.tcl +++ b/CreateCourseGradeBook.tcl @@ -7,24 +7,23 @@ package require sqlite3 package require md5 source ./GradeBook_lib.tcl -if { $argc < 3 } { +if { $argc < 2 } { puts {Usage:} - puts "$argv0 database_name instructor_login instructor_password \[instructor_fname\] \[instructor_lname\]" + puts "$argv0 database_name instructor_login \[instructor_fname\] \[instructor_lname\]" exit } set dbfile [lindex $argv 0] set instructor_login [lindex $argv 1] -set instructor_password [lindex $argv 2] -if { $argc >= 4 } { - set instructor_fname [lindex $argv 3] +if { $argc >= 3 } { + set instructor_fname [lindex $argv 2] } else { set instructor_fname {} } -if { $argc >= 5 } { - set instructor_lname [lindex $argv 4] +if { $argc >= 4 } { + set instructor_lname [lindex $argv 3] } else { set instructor_lname {} } @@ -37,11 +36,11 @@ CreateGradesTable db CreateAccessRightsTable db CreateGradesCategoryTable 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 +#AddUserNonWeb first_name last_name user_name group_name id_number section_num i +AddUserNonWeb $instructor_fname $instructor_lname $instructor_login instructor # reasonable defaults for hidden columns -set instructor_hidden_columns [list UserHiddenColums PasswordHash UserHiddenGroups IdNum] +set instructor_hidden_columns [list UserHiddenColums UserHiddenGroups IdNum] UpdateColValue4GroupNameNonWeb UserHiddenColums instructor $instructor_hidden_columns # vim: ts=2 sw=2 foldmethod=indent: |