Skip to content

Commit

Permalink
Merge pull request openwebwork#2604 from dlglin/CheckboxPermissionLev…
Browse files Browse the repository at this point in the history
…elsHF

Fix checkboxes for permission levels on Config page (Hotfix)
  • Loading branch information
drgrice1 authored Oct 18, 2024
2 parents 30e8f04 + addfaec commit c4b8039
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 c4b8039

Please sign in to comment.