aboutsummaryrefslogtreecommitdiff
path: root/csv2GradeBook.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'csv2GradeBook.tcl')
-rwxr-xr-xcsv2GradeBook.tcl14
1 files changed, 12 insertions, 2 deletions
diff --git a/csv2GradeBook.tcl b/csv2GradeBook.tcl
index c880fad..7c52ee6 100755
--- a/csv2GradeBook.tcl
+++ b/csv2GradeBook.tcl
@@ -7,6 +7,18 @@ package require sqlite3
package require md5
source ./GradeBook_lib.tcl
+if { $argc < 2 } {
+ puts {Usage:}
+ puts " $argv0 database_name file_with_csv"
+ puts {}
+ puts { expect the csv file with following fields:}
+ puts { sid, FName, LName, Section, email}
+ puts {}
+ puts {Example:}
+ puts [concat " $argv0" { 2013_Spring_Phys742 roster.csv}]
+ exit
+}
+
set class [lindex $argv 0]
if { $class eq "" } {
set class dummy_class
@@ -43,8 +55,6 @@ proc AddUserNonWeb { first_name last_name user_name {group_name {guest}} {id_num
#AddUserNonWeb first_name last_name user_name password_hash group_name id_number section_num i
# dummy users
-# expect the csv file with following fields
-# sid, FName, LName, Section, email
set fp [open $csvfile r]
while {-1 != [gets $fp line]} {