Skip to content

Commit

Permalink
Preserve check and radio state when performing a submit action in the…
Browse files Browse the repository at this point in the history
… File Manager.

This was an error in the conversion from mod_perl2 to Mojolicious.  The
hidden form fields set in the `HiddenFlags` method of
`WeBWorK::ContentGenerator::Instructor::FileManager` need to set the
value of each field to the paramater (done via the `getFlag` method).
That is how it was before the conversion to Mojolicious, but I made a
mistake and dropped it in the conversion.

This fixes issue openwebwork#2567.
  • Loading branch information
drgrice1 committed Sep 9, 2024
1 parent 1ef614d commit 4fccf94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ sub Init ($c) {

sub HiddenFlags ($c) {
return $c->c(
$c->hidden_field(dates => ''),
$c->hidden_field(overwrite => ''),
$c->hidden_field(unpack => ''),
$c->hidden_field(autodelete => ''),
$c->hidden_field(autodelete => 'Automatic'),
$c->hidden_field(dates => $c->getFlag('dates')),
$c->hidden_field(format => $c->getFlag('format', 'Automatic')),
$c->hidden_field(overwrite => $c->getFlag('overwrite')),
$c->hidden_field(unpack => $c->getFlag('unpack')),
$c->hidden_field(autodelete => $c->getFlag('autodelete')),
)->join('');
}

Expand Down

0 comments on commit 4fccf94

Please sign in to comment.