From 0c080398b15bf27130dd8b05818b2190cbd25a63 Mon Sep 17 00:00:00 2001 From: Nathan Wallach Date: Thu, 21 Nov 2024 15:27:58 +0200 Subject: [PATCH] Create a local name for a permission level which is not defined in the active %userRoles hash. Will prevent Accounts Manager from failing. See https://github.com/openwebwork/webwork2/issues/2625 but when editing a user with such a value, will only allow choosing a defined level. --- .../Instructor/UserList/user_list_field.html.ep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ContentGenerator/Instructor/UserList/user_list_field.html.ep b/templates/ContentGenerator/Instructor/UserList/user_list_field.html.ep index 40f5535265..3eefe29265 100644 --- a/templates/ContentGenerator/Instructor/UserList/user_list_field.html.ep +++ b/templates/ContentGenerator/Instructor/UserList/user_list_field.html.ep @@ -51,7 +51,7 @@ id => $fieldName . '_id', class => 'form-select form-select-sm w-auto flex-grow-0', 'aria-labelledby' => 'permission_header' =%> % } else { - <%= maketext((grep { $ce->{userRoles}{$_} eq $value } keys %{ $ce->{userRoles} })[0]) %> + <%= maketext((grep { $ce->{userRoles}{$_} eq $value } keys %{ $ce->{userRoles} })[0] // "PermLevel$value") %> % } % } elsif ($properties->{type} eq 'password') { % # Note that this is only called if in editMode.