Skip to content

Commit 3e12655

Browse files
committed
finish update to 2.19
1 parent fc9c035 commit 3e12655

5 files changed

Lines changed: 18 additions & 3 deletions

File tree

lib/RenderApp.pm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,21 @@ sub startup {
104104
$r->any('/render-api')->to('render#problem');
105105
$r->any('/render-ptx')->to('render#render_ptx');
106106
$r->any('/health' => sub { shift->rendered(200) });
107+
$r->any('/health' => sub {shift->rendered(200)});
108+
if ($self->mode eq 'development' || $self->config('FULL_APP_INSECURE')) {
109+
$r->any('')->to('pages#twocolumn');
110+
$r->any('/')->to('pages#twocolumn');
111+
$r->any('/opl')->to('pages#oplUI');
112+
$r->any('/die' => sub {die "what did you expect, flowers?"});
113+
$r->any('/timeout' => sub {
114+
my $c = shift;
115+
my $tx = $c->render_later->tx;
116+
Mojo::IOLoop->timer(2 => sub {
117+
$tx = $tx; # prevent $tx from going out of scope
118+
$c->rendered(200);
119+
});
120+
});
121+
}
107122

108123
# Enable problem editor & OPL browser -- NOT recommended for production environment!
109124
supplementalRoutes($r) if ($self->mode eq 'development' || $self->config('FULL_APP_INSECURE'));

lib/RenderApp/Controller/Render.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
package RenderApp::Controller::Render;
32
use Mojo::Base 'Mojolicious::Controller', -async_await;
43

public/js/apps/Problem/problem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(() => {
2-
const frame = window.frameElement.id || window.frameElement.data.id;
2+
const frame = window.frameElement.id || window.frameElement.dataset.id || 'no-id';
33
// Activate the popovers in the results table.
44
document.querySelectorAll('.attemptResults .answer-preview[data-bs-toggle="popover"]')
55
.forEach((preview) => {

templates/layouts/navbar.html.ep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4+
<base href="<%= $main::basehref %>">
45
<title>WeBWorK Standalone Renderer</title>
56
<meta name="viewport" content="width=device-width, initial-scale=1">
67
<link href="https://fonts.googleapis.com/css?family=Montserrat:400" rel="stylesheet">

0 commit comments

Comments
 (0)