diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-02-07 00:28:15 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2013-02-07 00:28:15 -0500 |
commit | 00304a640aeda2e984d6fd936e773340bd614b1c (patch) | |
tree | 8bd6e4f88c8ef180c2fda3b597f6f5b332d60597 | |
parent | d763874d3e01ffcddc82cc5958fa7fb8a8b858e7 (diff) | |
download | GradeBook-2.0.9.tar.gz GradeBook-2.0.9.zip |
New required parameters and instructor defaultsv2.0.9
-rwxr-xr-x | CreateCourseGradeBook.tcl | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/CreateCourseGradeBook.tcl b/CreateCourseGradeBook.tcl index 479f892..a3721b0 100755 --- a/CreateCourseGradeBook.tcl +++ b/CreateCourseGradeBook.tcl @@ -7,9 +7,12 @@ package require sqlite3 package require md5 source ./GradeBook_lib.tcl -if { $argc < 2 } { +if { $argc < 5 } { puts {Usage:} - puts "$argv0 database_name instructor_login \[instructor_first_name\] \[instructor_last_name\]" + puts " $argv0 database_name instructor_login Year Semester Class_Title \[instructor_first_name\] \[instructor_last_name\]" + puts {} + puts {Example:} + puts [concat " $argv0" { 2013_Spring_Phys742 eemikh@wm.edu 2013 Spring "Physics 742 - Solid State Physics" Eugeniy Mikhailov}] exit } @@ -17,13 +20,31 @@ set dbfile [lindex $argv 0] set instructor_login [lindex $argv 1] if { $argc >= 3 } { - set instructor_fname [lindex $argv 2] + set course_year [lindex $argv 2] } else { - set instructor_fname {} + set course_year {Year Unset} } if { $argc >= 4 } { - set instructor_lname [lindex $argv 3] + set course_semester [lindex $argv 3] +} else { + set course_semester {Semester Unset} +} + +if { $argc >= 5 } { + set course_title [lindex $argv 4] +} else { + set course_title {Title Unset} +} + +if { $argc >= 6 } { + set instructor_fname [lindex $argv 5] +} else { + set instructor_fname {} +} + +if { $argc >= 7 } { + set instructor_lname [lindex $argv 6] } else { set instructor_lname {} } @@ -40,7 +61,14 @@ CreateGradesCategoryTable db AddUserNonWeb $instructor_fname $instructor_lname $instructor_login instructor # reasonable defaults for hidden columns -set instructor_hidden_columns [list UserHiddenColums UserHiddenGroups IdNum] +set instructor_hidden_columns [list UserHiddenColums UserHiddenGroups IdNum UserHiddenGradeCategories] UpdateColValue4GroupNameNonWeb UserHiddenColums instructor $instructor_hidden_columns +# change default course information +UpdateCourseInfoTableItem course_title $course_title +UpdateCourseInfoTableItem course_year $course_year +UpdateCourseInfoTableItem course_semester $course_semester + +UpdateColValue4UserNameNonWeb UserHiddenGroups $instructor_login inforow + # vim: ts=2 sw=2 foldmethod=indent: |