Skip to content

Commit 03de02a

Browse files
committed
Create a local name for a permission level which is not defined in
the active %userRoles hash. Will prevent Accounts Manager from failing. See openwebwork#2625 but when editing a user with such a value, will only allow chosing a defined level.
1 parent df4b848 commit 03de02a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/ContentGenerator/Instructor/UserList/user_list_field.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
id => $fieldName . '_id', class => 'form-select form-select-sm w-auto flex-grow-0',
5252
'aria-labelledby' => 'permission_header' =%>
5353
% } else {
54-
<%= maketext((grep { $ce->{userRoles}{$_} eq $value } keys %{ $ce->{userRoles} })[0]) %>
54+
<%= maketext((grep { $ce->{userRoles}{$_} eq $value } keys %{ $ce->{userRoles} })[0] // "PermLevel$value" ) %>
5555
% }
5656
% } elsif ($properties->{type} eq 'password') {
5757
% # Note that this is only called if in editMode.

0 commit comments

Comments
 (0)