aboutsummaryrefslogtreecommitdiff
path: root/csv2GradeBook.tcl
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2014-01-17 11:06:14 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2014-01-17 11:06:14 -0500
commit421f7d82d8a5f364f9e5e20e7435b83664e4746b (patch)
tree9b59c30b531ba9504845f19dc1173ea816f6f5f2 /csv2GradeBook.tcl
parent2aeacffbcbc820c966143608fe5eae253ae7f124 (diff)
downloadGradeBook-421f7d82d8a5f364f9e5e20e7435b83664e4746b.tar.gz
GradeBook-421f7d82d8a5f364f9e5e20e7435b83664e4746b.zip
added usage section for csv2GradeBook.tcl
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]} {