diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-09-03 13:21:43 -0400 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2014-09-03 13:21:43 -0400 |
commit | de980bf5a75d5fd923d90d8dcce6eff68cdbef78 (patch) | |
tree | 1b81bbafcff1525b4f6bf2f4c17256aefc9bd966 | |
parent | 4cc5f1a1dab6c0f2d4792ca261d137fde40bacac (diff) | |
download | GradeBook-de980bf5a75d5fd923d90d8dcce6eff68cdbef78.tar.gz GradeBook-de980bf5a75d5fd923d90d8dcce6eff68cdbef78.zip |
added draft of edit_user_grade actions, html pointers only
-rwxr-xr-x | GradeBook_lib.tcl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/GradeBook_lib.tcl b/GradeBook_lib.tcl index e740dcd..37db949 100755 --- a/GradeBook_lib.tcl +++ b/GradeBook_lib.tcl @@ -827,6 +827,8 @@ proc FillDefaultAccessRights {} { AddDefaultAccessRight unhidecolfromstudents 1 1 0 0 0 AddDefaultAccessRight resetforgottenpassword 0 0 0 0 1 AddDefaultAccessRight update_grades_stats 1 0 0 0 0 + AddDefaultAccessRight edit_user_grade_request 1 1 0 0 0 + AddDefaultAccessRight edit_user_grade 1 1 0 0 0 } proc getDefaultPermissionsForGroup { group } { @@ -940,6 +942,8 @@ proc CreateAccessRightsTable {db} { AddDefaultAccessRightToTableForActionNonWeb unhidecolfromstudents AddDefaultAccessRightToTableForActionNonWeb resetforgottenpassword AddDefaultAccessRightToTableForActionNonWeb update_grades_stats + AddDefaultAccessRightToTableForActionNonWeb edit_user_grade_request + AddDefaultAccessRightToTableForActionNonWeb edit_user_grade } proc htmlErrorMsg { msg {loc ""} } { @@ -1187,6 +1191,22 @@ proc htmlFormatColVal { col_value columnname user user_shown permission_list {fo } set col_str_value [htmlReplaceEmptyString $col_value] set col_str_value ${font_style_strt}${col_str_value}${font_style_end} + + # embedded actions on values assignment + set embeded_actions_special_columns [ list \ + PasswordHash GroupName UserHiddenColums \ + UserName \ + UserHiddenGroups \ + UserHiddenGradeCategories \ + ] + + if { ([SelectColValue4User GroupName $user_shown] ne "inforow") && ($user ni $special_user_names) && ($category ne "weighted_column") && ($columnname ni $embeded_actions_special_columns) } { + if { [isActionGranted edit_user_grade $permission_list $user] && ($user_shown ne "_UNSET_") } { + set col_str_value "<a href=\"$script_name?action=edit_user_grade_request&user2modify=$user_shown&column2modify=$columnname\">${col_str_value}</a>" + } + } + + # additional actions on values assignment switch $columnname { GroupName { set action_html_code {} |