Skip to content

Commit

Permalink
Merge pull request openwebwork#2603 from dlglin/CheckboxPermissionLevels
Browse files Browse the repository at this point in the history
Fix checkboxes for permission levels on Config page
  • Loading branch information
drgrice1 authored Oct 18, 2024
2 parents 193ff38 + a7d4652 commit 6d96fda
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/WeBWorK/ConfigObject/permission_checkboxlist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ sub comparison_value ($self, $val) {
}

sub entry_widget ($self, $default, $is_secret = 0) {
my $c = $self->{c};
$default = role_and_above($self->{c}->ce->{userRoles}, $default) unless ref($default) eq 'ARRAY';
my $c = $self->{c};
my $userRoles = $self->{c}->ce->{userRoles};
$default = role_and_above($userRoles, $default) unless ref($default) eq 'ARRAY';
return $c->c(
map {
$c->tag(
Expand All @@ -72,7 +73,7 @@ sub entry_widget ($self, $default, $is_secret = 0) {
)->join('')
)
)
} ('guest', 'student', 'login_proctor', 'grade_proctor', 'ta', 'professor', 'admin')
} grep { $_ ne 'nobody' } sort { $userRoles->{$a} <=> $userRoles->{$b} } keys(%$userRoles)
)->join('');
}

Expand Down

0 comments on commit 6d96fda

Please sign in to comment.