aboutsummaryrefslogtreecommitdiff
path: root/GradeBook_lib.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'GradeBook_lib.tcl')
-rwxr-xr-xGradeBook_lib.tcl25
1 files changed, 11 insertions, 14 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl
index 9161891..1f5670b 100755
--- a/GradeBook_lib.tcl
+++ b/GradeBook_lib.tcl
@@ -334,8 +334,8 @@ proc ColName2SqlSafeForm {colname} {
return $colname
}
-proc AddUserNonWeb { first_name last_name user_name password_hash {group_name {guest}} {id_number {}} {section_num {} } } {
- set eval_str [concat INSERT INTO GradesTable (FirstName, LastName, UserName, PasswordHash, GroupName, IdNum, SectionNum) VALUES('$first_name', '$last_name', '$user_name', '$password_hash', '$group_name', '$id_number', '$section_num')]
+proc AddUserNonWeb { first_name last_name user_name {group_name {guest}} {id_number {}} {section_num {} } } {
+ set eval_str [concat INSERT INTO GradesTable (FirstName, LastName, UserName, GroupName, IdNum, SectionNum) VALUES('$first_name', '$last_name', '$user_name', '$group_name', '$id_number', '$section_num')]
set err [catch {db eval $eval_str } errStat]
if { $err } {
htmlErrorMsg $errStat
@@ -396,7 +396,6 @@ proc GetDefaultGradesTableColumn {} {
FirstName text\
LastName text\
UserName text\
- PasswordHash text\
GroupName text\
UserHiddenColums text\
UserHiddenGroups text\
@@ -570,12 +569,12 @@ proc CreateGradesTable {db} {
}
# add special users aka special info rows
- AddUserNonWeb {} {} _Col_Category_ {} inforow
- AddUserNonWeb {} {} _Max_Points_ {} inforow
- AddUserNonWeb {} {} _Visible_To_Students_ {} inforow
+ AddUserNonWeb {} {} _Col_Category_ inforow
+ AddUserNonWeb {} {} _Max_Points_ inforow
+ AddUserNonWeb {} {} _Visible_To_Students_ inforow
# 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
}
@@ -710,9 +709,9 @@ proc htmlDBout {db permission_list user {sort_col {}}} {
# set hidden column list
switch $permission(GroupName) {
instructor { set hidden_columns {} }
- ta { set hidden_columns [list UserName PasswordHash GroupName UserHiddenColums UserHiddenGroups UserHiddenGradeCategories IdNum] }
- student { set hidden_columns [list UserName PasswordHash GroupName UserHiddenColums UserHiddenGroups UserHiddenGradeCategories IdNum SectionNum] }
- dropped { set hidden_columns [list UserName PasswordHash GroupName UserHiddenColums UserHiddenGroups UserHiddenGradeCategories IdNum SectionNum] }
+ ta { set hidden_columns [list UserName GroupName UserHiddenColums UserHiddenGroups UserHiddenGradeCategories IdNum] }
+ student { set hidden_columns [list UserName GroupName UserHiddenColums UserHiddenGroups UserHiddenGradeCategories IdNum SectionNum] }
+ dropped { set hidden_columns [list UserName GroupName UserHiddenColums UserHiddenGroups UserHiddenGradeCategories IdNum SectionNum] }
guest { set hidden_columns $column_list }
default { set hidden_columns $column_list }
}
@@ -791,7 +790,6 @@ proc htmlDBout {db permission_list user {sort_col {}}} {
FirstName { lappend action_list changefirstname }
LastName { lappend action_list changelastname }
UserName { lappend action_list changeusername }
- PasswordHash { }
UserHiddenColums { }
UserHiddenGroups { }
UserHiddenGradeCategories { }
@@ -1349,7 +1347,7 @@ proc AddNewUserInfo {db permission_list user } {
htmlInfoMsg "Unknown group name {$group_name} replaced with {guest}."
set group_name guest
}
- AddUserNonWeb $first_name $last_name $login {} $group_name $id_number $section_number
+ AddUserNonWeb $first_name $last_name $login $group_name $id_number $section_number
}
}
@@ -1882,9 +1880,8 @@ proc Authenticate_User { user_requested password } {
return $user
}
-proc AccessGroupRights {db user password } {
+proc AccessGroupRights {db user } {
dbg "access rights check for user: $user" msg_level_info
- set PasswordHash [::md5::md5 -hex $password]
set eval_str [list SELECT GroupName FROM GradesTable WHERE UserName='$user']
db eval $eval_str group_name_array {}
if { [ info exist group_name_array(GroupName) ] } {