Skip to content

Commit 87ed705

Browse files
committed
Ensure outputformat is accepted as an alternative to outputFormat.
WeBWorK RPC uses `outputformat`, so allow the renderer to accept `outputformat` as an alternative to `outputFormat` if defined.
1 parent 2d5ac98 commit 87ed705

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/Renderer/Controller/Render.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use WeBWorK::PreTeXt;
1010
sub parseRequest {
1111
my $c = shift;
1212
my %params = %{ $c->req->params->to_hash };
13+
$params{outputFormat} ||= $params{outputformat} || 'default';
1314

1415
my $originIP = $c->req->headers->header('X-Forwarded-For')
1516
// '' =~ s!^\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}).*$!$1!r;

lib/WeBWorK/FormatRenderedProblem.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ sub formatRenderedProblem {
8787
);
8888

8989
# Get the requested format. (outputFormat or outputformat)
90-
my $formatName = $inputs_ref->{outputFormat} || 'default';
90+
my $formatName = $inputs_ref->{outputFormat} || $inputs_ref->{outputformat} || 'default';
9191

9292
# Add JS files requested by problems via ADD_JS_FILE() in the PG file.
9393
my @extra_js_files;

0 commit comments

Comments
 (0)