Skip to content

Commit f2b6811

Browse files
authored
Merge pull request #3078 from drgrice1/html-validation-issues
Fix some HTML validation issues.
2 parents d0534d5 + 175ab06 commit f2b6811

8 files changed

Lines changed: 63 additions & 59 deletions

File tree

templates/ContentGenerator/Base/set_status.html.ep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
% );
99
%
1010
<div class="alert alert-info mb-3">
11-
<%== $useReducedScoring ? '<p>' : '<p class="mb-0">' =%>
11+
<%= tag 'p', $useReducedScoring ? () : (class => 'mb-0'), begin =%>
1212
<strong>
1313
% if (before($set->open_date)) {
1414
<%= maketext('Set opens on [_1].',
@@ -23,7 +23,7 @@
2323
<%= maketext('Set is closed.') %>
2424
% }
2525
</strong>
26-
</p>
26+
<%= end =%>
2727
%
2828
% if ($useReducedScoring) {
2929
% my $reduced_scoring_date = $set->reduced_scoring_date;

templates/ContentGenerator/Grades/problem_table.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
% } else {
3737
<%= $problem->{id} %>
3838
% }
39-
</td>
39+
</th>
4040
% }
4141
</tr>
4242
<tr class="weights-row d-none">

templates/ContentGenerator/Instructor/ProblemSetList/set_list_row.html.ep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@
7878
</div>
7979
</td>
8080
% }
81+
</tr>

templates/ContentGenerator/Instructor/Scoring.html.ep

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,28 +73,30 @@
7373
% if (@selected) {
7474
<p class="mt-2"><%= maketext('All of these files will also be made available for mail merge.') %></p>
7575
<dl>
76-
% for my $setID (@selected) {
77-
% my @validFiles;
78-
% for my $type ('scr', 'ful') {
79-
% my $filename = "s$setID$type.csv";
80-
% my $path = "$scoringDir/$filename";
81-
% push @validFiles, $filename if -f $path;
82-
% }
83-
% if (@validFiles) {
84-
<dt dir="ltr"><%= format_set_name_display($setID) %></dt>
85-
<dd>
86-
<ul>
87-
% for my $filename (@validFiles) {
88-
<li>
89-
<%= link_to $filename =>
90-
$c->systemLink(url_for('instructor_scoring_download'), params => { getFile => $filename }) =%>
91-
</li>
92-
% }
93-
</ul>
94-
</dd>
76+
% for my $setID (@selected) {
77+
% my @validFiles;
78+
% for my $type ('scr', 'ful') {
79+
% my $filename = "s$setID$type.csv";
80+
% my $path = "$scoringDir/$filename";
81+
% push @validFiles, $filename if -f $path;
82+
% }
83+
% if (@validFiles) {
84+
<dt dir="ltr"><%= format_set_name_display($setID) %></dt>
85+
<dd>
86+
<ul>
87+
% for my $filename (@validFiles) {
88+
<li>
89+
<%= link_to $filename => $c->systemLink(
90+
url_for('instructor_scoring_download'),
91+
params => { getFile => $filename }
92+
) =%>
93+
</li>
94+
% }
95+
</ul>
96+
</dd>
97+
% }
9598
% }
9699
</dl>
97-
% }
98100
% }
99101
%
100102
% if (-f "$scoringDir/$c->{scoringFileName}") {

templates/ContentGenerator/Options.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
% : $ce->{pg}{options}{useMathView};
168168
<div class="mb-3">
169169
<fieldset>
170-
<legend class="lead"><%= maketext('Use Equation Editor?') %></fieldset>
170+
<legend class="lead"><%= maketext('Use Equation Editor?') %></legend>
171171
% for (1, 0) {
172172
<div class="form-check form-check-inline">
173173
<%= radio_button useMathView => $_,

templates/ContentGenerator/ProblemSet.html.ep

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@
4040
% } elsif ($c->{restrictedSetMessages}) {
4141
<div class="alert alert-warning">
4242
% for (0 .. $#{ $c->{restrictedSetMessages} }) {
43-
% my $class = $_ == $#{ $c->{restrictedSetMessages} } ? ' class="mb-0"' : '';
44-
<p<%== $class %>><%== $c->{restrictedSetMessages}->[$_] %></p>
43+
<%= tag 'p', $_ == $#{ $c->{restrictedSetMessages} } ? (class => 'mb-0') : (), begin =%>
44+
<%== $c->{restrictedSetMessages}->[$_] %>
45+
<% end =%>
4546
% }
4647
</div>
4748
% }

templates/HelpFiles/InstructorAchievementList.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</ul>
7474
<h2><%= maketext('How to:') %></h2>
7575
<dl>
76-
<dt><%= maketext('Filter achievements') %></td>
76+
<dt><%= maketext('Filter achievements') %></dt>
7777
<dd>
7878
<%= maketext('You can filter which achievements are shown by clicking the "Filter" button. Use the drop '
7979
. 'down menu to select the filter criteria, which allows you to filter achievements by their ID, '

templates/HelpFiles/InstructorScoring.html.ep

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,39 @@
1717
</p>
1818
<p>
1919
<%= maketext('The following describes how the checkboxes alter the scoring output') =%>
20-
<dl>
21-
<dt><b><%= maketext('Pad Fields') %></b></dt>
22-
<dd>
23-
<%= maketext('If selected, this adds spaces between the fields to align the commas, which makes the '
24-
. 'columns easy to read when in text form but it can confuse some spreadsheet applications since the '
25-
. 'extra spaces violate the csv standard (although Excel handles them with no problem). This will give '
26-
. 'a visual form of the CSV file that is easy to read on the page. If you want a reliable .csv file '
27-
. 'for use in any spreadsheet application unclick the "Pad Fields" option. You can download the .csv '
28-
. 'file immediately by clicking on the link with the filename chosen above, or you can download it '
29-
. 'using the "File Manager" from the scoring directory.') =%>
30-
</dd>
31-
<dt><b><%= maketext('Record Scores for Single Sets') %></b></dt>
32-
<dd>
33-
<%== maketext('Select this if you want to save the scores for each set in a separate file in addition to '
34-
. 'saving all scores to a cumulative file. After clicking the "Score Selected Set(s) and save to" '
35-
. 'button, you will get a pair of links for each selected set. The file that ends with [_1] contains '
36-
. 'the number of correct and incorrect tries about each individual problem for each student. The file '
37-
. 'that ends with [_2] is a summary of each problem.',
38-
'<code>ful.csv</code>','<code>scr.csv</code>') =%>
39-
</dd>
40-
<dt><b><%= maketext('Include Success Index') %></b></dt>
41-
<dd>
42-
<%= maketext('If this is selected, a success index is listed in each csv file. The success '
43-
. 'index is a number assigned on the basis of the number of incorrect attempts (roughly equivalent '
44-
. 'to 1/the number of attempts) which seems to correlate with the relative difficulty the student had '
45-
. 'with the problem.') =%>
46-
</dd>
47-
<dt><b><%= maketext('Include percentage grades columns for all sets') %></b></dt>
48-
<dd>
49-
<%= maketext('As the checkbox says, this includes a percentage grade column for each set.') =%>
50-
</dd>
51-
</dl>
5220
</p>
21+
<dl>
22+
<dt><b><%= maketext('Pad Fields') %></b></dt>
23+
<dd>
24+
<%= maketext('If selected, this adds spaces between the fields to align the commas, which makes the '
25+
. 'columns easy to read when in text form but it can confuse some spreadsheet applications since the '
26+
. 'extra spaces violate the csv standard (although Excel handles them with no problem). This will give '
27+
. 'a visual form of the CSV file that is easy to read on the page. If you want a reliable .csv file '
28+
. 'for use in any spreadsheet application unclick the "Pad Fields" option. You can download the .csv '
29+
. 'file immediately by clicking on the link with the filename chosen above, or you can download it '
30+
. 'using the "File Manager" from the scoring directory.') =%>
31+
</dd>
32+
<dt><b><%= maketext('Record Scores for Single Sets') %></b></dt>
33+
<dd>
34+
<%== maketext('Select this if you want to save the scores for each set in a separate file in addition to '
35+
. 'saving all scores to a cumulative file. After clicking the "Score Selected Set(s) and save to" '
36+
. 'button, you will get a pair of links for each selected set. The file that ends with [_1] contains '
37+
. 'the number of correct and incorrect tries about each individual problem for each student. The file '
38+
. 'that ends with [_2] is a summary of each problem.',
39+
'<code>ful.csv</code>','<code>scr.csv</code>') =%>
40+
</dd>
41+
<dt><b><%= maketext('Include Success Index') %></b></dt>
42+
<dd>
43+
<%= maketext('If this is selected, a success index is listed in each csv file. The success '
44+
. 'index is a number assigned on the basis of the number of incorrect attempts (roughly equivalent '
45+
. 'to 1/the number of attempts) which seems to correlate with the relative difficulty the student had '
46+
. 'with the problem.') =%>
47+
</dd>
48+
<dt><b><%= maketext('Include percentage grades columns for all sets') %></b></dt>
49+
<dd>
50+
<%= maketext('As the checkbox says, this includes a percentage grade column for each set.') =%>
51+
</dd>
52+
</dl>
5353
<p>
5454
<%= maketext('To use the Email merge feature, upload a CSV with calculated grades to the scoring directory using '
5555
. 'the "File Manager".') =%>

0 commit comments

Comments
 (0)