aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xGradeBook_lib.tcl20
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 {}