Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions htdocs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion htdocs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"sortablejs": "^1.15.7"
},
"devDependencies": {
"@openwebwork/prettier-plugin-mojolicious-html-template": "^0.0.2",
"@openwebwork/prettier-plugin-mojolicious-html-template": "^0.0.3",
"autoprefixer": "^10.5.4",
"chokidar": "^5.0.0",
"cssnano": "^8.0.2",
Expand Down
4 changes: 2 additions & 2 deletions templates/ContentGenerator/AchievementsLeaderboard.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<td><%= $rank %></td>
<td><%= $points %></td>
% if ($c->{showLevels}) {
<td class="text-center" style="white-space: nowrap;">
<td class="text-center" style="white-space: nowrap">
% if ($level) {
<%= $level->{name} %>
<br>
Expand All @@ -43,7 +43,7 @@
</td>
% }
% if ($c->{showUserNames}) {
<td style="white-space: nowrap;">
<td style="white-space: nowrap">
<%= $user->first_name %><br><%= $user->last_name %>
</td>
% }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
$ce->{admin_course_id}) =%>
</div>
<div class="col-lg-4 col-md-5 col-sm-6">
<div class="overflow-auto border rounded px-2" style="max-height: 100px;">
<div class="overflow-auto border rounded px-2" style="max-height: 100px">
% for my $user ($db->listUsers) {
% my $val = $db->getPermissionLevel($user)->permission;
% my $role = maketext((grep { $ce->{userRoles}{$_} eq $val } keys %{ $ce->{userRoles} })[0]);
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/Feedback.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="border border-dark rounded mb-1 p-3">
% for (split /\n\r?/, param('feedback')) {
% if ($_) {
<p class="m-0" style="white-space: pre-wrap;"><%= $_ %></p>
<p class="m-0" style="white-space: pre-wrap"><%= $_ %></p>
% } else {
<div class="mt-3"></div>
% }
Expand Down
40 changes: 30 additions & 10 deletions templates/ContentGenerator/Feedback/feedback_email.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
<thead>
<tr>
<th
style="text-align: left; padding: 0.25rem; border: 1px solid black;
background-color: lightgray"
style="
text-align: left;
padding: 0.25rem;
border: 1px solid black;
background-color: lightgray;
"
colspan="2"
>
<%= maketext('Data about the problem') %>
Expand Down Expand Up @@ -98,8 +102,12 @@
<thead>
<tr>
<th
style="text-align: left; padding: 0.25rem; border: 1px solid black;
background-color: lightgray"
style="
text-align: left;
padding: 0.25rem;
border: 1px solid black;
background-color: lightgray;
"
colspan="2"
>
<%= maketext('Data about the assignment') %>
Expand Down Expand Up @@ -145,8 +153,12 @@
<thead>
<tr>
<th
style="text-align: left; padding: 0.25rem; border: 1px solid black;
background-color: lightgray"
style="
text-align: left;
padding: 0.25rem;
border: 1px solid black;
background-color: lightgray;
"
colspan="2"
>
<%= maketext('Data about the problem processor') =%>
Expand Down Expand Up @@ -175,8 +187,12 @@
<thead>
<tr>
<th
style="text-align: left; padding: 0.25rem; border: 1px solid black;
background-color: lightgray"
style="
text-align: left;
padding: 0.25rem;
border: 1px solid black;
background-color: lightgray;
"
colspan="2"
>
<%= maketext('Data about the user') %>
Expand Down Expand Up @@ -217,8 +233,12 @@
<thead>
<tr>
<th
style="text-align: left; padding: 0.25rem; border: 1px solid black;
background-color: lightgray"
style="
text-align: left;
padding: 0.25rem;
border: 1px solid black;
background-color: lightgray;
"
colspan="2"
>
<%= maketext('Data about the environment') %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<td>
<div class="d-flex flex-column gap-1">
% for my $field (@{ $_->{fields} }) {
<span class="text-nowrap" style="height:28px">
<span class="text-nowrap" style="height: 28px">
<%= include
'ContentGenerator/Instructor/AchievementList/edit_table_row',
fieldName => "achievement.$achievement_id.$field",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% use Mojo::File qw(path);
%
<div class="card mb-2" style="max-width:700px">
<div class="card mb-2" style="max-width: 700px">
<div class="card-body">
<div class="mb-3" id="files-label">
<%= maketext('The following files have been selected for archiving. Select the type '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
</div>
%
% # General set information
<div class="card mb-2 border border-dark-subtle" style="width:fit-content">
<div class="card mb-2 border border-dark-subtle" style="width: fit-content">
<div class="card-body p-2">
<div class="card-title fw-bold"><%= maketext('Set Parameters') %></div>
<div class="card-text">
Expand Down Expand Up @@ -234,7 +234,7 @@
%
% # Display header information
% if (!@editForUser) {
<div class="card mb-2 border border-dark-subtle" style="width:fit-content">
<div class="card mb-2 border border-dark-subtle" style="width: fit-content">
<div class="card-body p-2">
<div class="card-title fw-bold"><%= maketext("Headers") %></div>
% for my $headerType (@$headers) {
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/Instructor/Scoring.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<%= link_to $c->{scoringFileName} =>
$c->systemLink(url_for('instructor_scoring_download'), params => { getFile => $c->{scoringFileName} }),
class => 'font-monospace' =%>
<pre class="mt-2 bg-light border" style="font-size:smaller; width:fit-content; max-width:100%;">
<pre class="mt-2 bg-light border" style="font-size: smaller; width: fit-content; max-width: 100%">
<%== readFile("$scoringDir/$c->{scoringFileName}") =%>\
</pre>
% }
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
% }
% }
% if (@rows) {
<pre class="overflow-scroll" style="max-height: 100px;"><% =%>\
<pre class="overflow-scroll" style="max-height: 100px"><% =%>\
<%== join('', ' ', $c->data_format(1 .. $cols)) =%><br><% =%>\
<%== join('<br>', map { join('', ' ', $c->data_format2(@$_)) } @rows) =%>\
</pre>
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/Problem.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
% if ($c->{pg}{render_fail}) {
<div class="row g-0 mb-2">
<div class="col-10 alert alert-danger m-0">
<h2 style="color:red"><%= maketext('PG question failed to render') %></h2>
<h2 style="color: red"><%= maketext('PG question failed to render') %></h2>
<p class="m-0">
<%= maketext('Processing of this PG problem was not completed. Probably because of a '
. 'syntax error. The translator died prematurely and no PG warning messages were transmitted.'
Expand Down
44 changes: 22 additions & 22 deletions templates/exception_default.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%
<body>
<!-- Request ID: <%= $c->req->request_id %> -->
<main style="text-align:left">
<main style="text-align: left">
<h1>WeBWorK error</h1>
<p>An error occurred while processing your request.</p>
<p>
Expand All @@ -21,7 +21,7 @@
, including all of the following information as well as what you were doing when the error occurred.
</p>
<h2>Error record identifier</h2>
<p style="margin-left:2em;color:#dc2a2a"><code><%= $uuid =%></code></p>
<p style="margin-left: 2em; color: #dc2a2a"><code><%= $uuid =%></code></p>
% if (my $warnings = stash 'warnings') {
<h2>Warning messages</h2>
<ul>
Expand All @@ -32,24 +32,24 @@
% }
% if (my $exception = stash 'exception') {
<h2>Error messages</h2>
<p style="margin-left:2em;color:#dc2a2a"><code><%= $exception->message =%></code></p>
<p style="margin-left: 2em; color: #dc2a2a"><code><%= $exception->message =%></code></p>
<h2>Context</h2>
<ul>
% for (@{ $exception->lines_before }) {
<li>
<pre style="display:inline"><code><%= $_->[0] %>: <%= $_->[1] %></code></pre>
<pre style="display: inline"><code><%= $_->[0] %>: <%= $_->[1] %></code></pre>
</li>
% }
% if (defined $exception->line->[1]) {
<li>
<pre style="display:inline;color:#dc2a2a"><% =%>\
<pre style="display: inline; color: #dc2a2a"><% =%>\
<code><%= $exception->line->[0] %>: <%= $exception->line->[1] %></code><% =%>\
</pre>
</li>
% }
% for (@{$exception->lines_after}) {
<li>
<pre style="display:inline"><code><%= $_->[0] %>: <%= $_->[1] %></code></pre>
<pre style="display: inline"><code><%= $_->[0] %>: <%= $_->[1] %></code></pre>
</li>
% }
</ul>
Expand All @@ -66,35 +66,35 @@
<h2>Request information</h2>
<div>
<p>The HTTP request information is included in the following table.</p>
<div style="overflow-x:auto;">
<table aria-labelledby="req_info_summary1" style="border-collapse:collapse">
<div style="overflow-x: auto">
<table aria-labelledby="req_info_summary1" style="border-collapse: collapse">
<caption id="req_info_summary1">
HTTP request information
</caption>
<tr>
<th id="outer_item" style="border:1px solid black;">Item</th>
<th id="outer_data" style="border:1px solid black;">Data</th>
<th id="outer_item" style="border: 1px solid black">Item</th>
<th id="outer_data" style="border: 1px solid black">Data</th>
</tr>
<tr>
<td headers="outer_item" style="border:1px solid black;">Method</td>
<td headers="outer_data" style="border:1px solid black;"><%= $c->req->method %></td>
<td headers="outer_item" style="border: 1px solid black">Method</td>
<td headers="outer_data" style="border: 1px solid black"><%= $c->req->method %></td>
</tr>
<tr>
<td headers="outer_item" style="border:1px solid black;">URI</td>
<td headers="outer_data" style="border:1px solid black;">
<td headers="outer_item" style="border: 1px solid black">URI</td>
<td headers="outer_data" style="border: 1px solid black">
<%= $c->req->url->to_abs->to_string %>
</td>
</tr>
<tr>
<td headers="outer_item" style="border:1px solid black;">HTTP Headers</td>
<td headers="outer_data" style="border:1px solid black;">
<table style="border-collapse:collapse" aria-labelledby="req_header_summary">
<td headers="outer_item" style="border: 1px solid black">HTTP Headers</td>
<td headers="outer_data" style="border: 1px solid black">
<table style="border-collapse: collapse" aria-labelledby="req_header_summary">
<caption id="req_header_summary">
HTTP request headers
</caption>
<tr>
<th id="header_key" style="border:1px solid black;"><small>Key</small></th>
<th id="header_value" style="border:1px solid black;"><small>Value</small></th>
<th id="header_key" style="border: 1px solid black"><small>Key</small></th>
<th id="header_value" style="border: 1px solid black"><small>Value</small></th>
</tr>
% my %headers = %{ $c->req->headers->to_hash };
% if (defined($headers{'sec-ch-ua'})) {
Expand All @@ -105,10 +105,10 @@
% }
% for (keys %headers) {
<tr>
<td headers="header_key" style="border:1px solid black;">
<td headers="header_key" style="border: 1px solid black">
<small><%= $_ %></small>
</td>
<td headers="header_value" style="border:1px solid black;">
<td headers="header_value" style="border: 1px solid black">
<small><%= $headers{$_} %></small>
</td>
</tr>
Expand All @@ -120,7 +120,7 @@
</div>
</div>
<h2>Time generated:</h2>
<p style="margin-left:2em;"><%= $time %></p>
<p style="margin-left: 2em"><%= $time %></p>
</main>
</body>
</html>
6 changes: 3 additions & 3 deletions templates/exception_min.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%
<body>
<!-- Request ID: <%= $c->req->request_id %> -->
<main style="text-align:left">
<main style="text-align: left">
<h1>WeBWorK error</h1>
<p>An error occurred while processing your request.</p>
<p>
Expand All @@ -21,9 +21,9 @@
, including the following information as well as what what you were doing when the error occurred.
</p>
<h2>Error record identifier</h2>
<p style="margin-left:5em;color:#dc2a2a"><code><%= $uuid %></code></p>
<p style="margin-left: 5em; color: #dc2a2a"><code><%= $uuid %></code></p>
<h2>Time generated:</h2>
<p style="margin-left:5em;"><%= $time %></p>
<p style="margin-left: 5em"><%= $time %></p>
</main>
</body>
</html>