Skip to content

Commit b2b054f

Browse files
authored
Merge pull request #2269 from Alex-Jordan/footer
reposition footer
2 parents 02ac4c8 + 896ab2c commit b2b054f

File tree

11 files changed

+140
-108
lines changed

11 files changed

+140
-108
lines changed

htdocs/themes/math4/math4.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,6 @@ ul.courses-list {
710710
padding: 1em;
711711
margin-top: 1em;
712712

713-
div {
714-
margin-left: auto;
715-
margin-right: auto;
716-
}
717-
718713
a {
719714
color: #555;
720715
}

htdocs/themes/math4/system.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
% }
173173
%
174174
% # Footer
175-
<div id="footer" role="contentinfo"><%= include 'ContentGenerator/Base/footer' %></div>
175+
<%= include 'ContentGenerator/Base/footer' =%>
176176
</div>
177177
</div>
178178
%

lib/WeBWorK/ContentGenerator.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ async sub go ($c) {
122122

123123
my $tx = $c->render_later->tx;
124124

125+
$c->stash->{footerWidthClass} = $c->can('info') ? 'col-md-8' : 'col-12';
126+
125127
if ($c->can('pre_header_initialize')) {
126128
my $pre_header_initialize = $c->pre_header_initialize;
127129
await $pre_header_initialize

templates/ContentGenerator/Base/footer.html.ep

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
<div id="last-modified"><%= maketext('Page generated [_1]', $c->timestamp) %></div>
2-
<div id="copyright">
3-
<%== maketext(
4-
'WeBWorK &copy; [_1] | theme: [_2] | ww_version: [_3] | pg_version [_4]',
5-
$ce->{WW_COPYRIGHT_YEARS} || '1996-2023',
6-
$ce->{defaultTheme} || 'unknown -- set defaultTheme in localOverides.conf',
7-
$ce->{WW_VERSION} || 'unknown -- set WW_VERSION in VERSION',
8-
$ce->{PG_VERSION} || 'unknown -- set PG_VERSION in ../pg/VERSION'
9-
) %>
1+
<div id="footer" role="contentinfo" class="row">
2+
<div class="<%= $footerWidthClass %>">
3+
<div id="last-modified"><%= maketext('Page generated [_1]', $c->timestamp) %></div>
4+
<div id="copyright">
5+
<%== maketext(
6+
'WeBWorK &copy; [_1] | theme: [_2] | ww_version: [_3] | pg_version [_4]',
7+
$ce->{WW_COPYRIGHT_YEARS} || '1996-2023',
8+
$ce->{defaultTheme} || 'unknown -- set defaultTheme in localOverides.conf',
9+
$ce->{WW_VERSION} || 'unknown -- set WW_VERSION in VERSION',
10+
$ce->{PG_VERSION} || 'unknown -- set PG_VERSION in ../pg/VERSION'
11+
) %>
12+
</div>
13+
<a href="https://openwebwork.org/"><%= maketext('The WeBWorK Project') %></a>
14+
</div>
1015
</div>
11-
<a href="https://openwebwork.org/"><%= maketext('The WeBWorK Project') %></a>

templates/ContentGenerator/Instructor/Assigner.html.ep

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<%= maketext('Select one or more sets and one or more users below to assign/unassign '
1515
. 'each selected set to/from all selected users.') =%>
1616
</p>
17+
%
18+
% $c->stash->{footerWidthClass} = 'col-xl-10 col-md-12';
19+
%
1720
<%= form_for current_route, method => 'post', begin =%>
1821
<%= $c->hidden_authen_fields =%>
1922
%
@@ -50,32 +53,37 @@
5053
) =%>
5154
</div>
5255
</div>
53-
<div>
54-
<%= submit_button maketext('Assign selected sets to selected users'),
55-
name => 'assign', class => 'btn btn-primary mb-2' =%>
56-
<div class="alert alert-danger p-1 mb-2">
57-
<div class="mb-1"><%= maketext('Do not unassign students unless you know what you are doing.') =%></div>
58-
<div><%= maketext('There is NO undo for unassigning students.') =%></div>
59-
</div>
60-
<div class="d-flex align-items-center">
61-
<%= submit_button maketext('Unassign selected sets from selected users'),
62-
name => 'unassign', class => 'btn btn-primary me-2' =%>
63-
<label class="form-check-label">
64-
<%= maketext('Read only') =%>
65-
<%= radio_button unassignFromAllSafety => 0, checked => undef, class => 'form-check-input mx-1' =%>
66-
</label>
67-
<label class="form-check-label">
68-
<%= maketext('Allow unassign') =%>
69-
<%= radio_button unassignFromAllSafety => 1, class => 'form-check-input mx-1' =%>
70-
</label>
71-
</div>
72-
<div class="mt-2">
73-
<%= maketext(
74-
'When you unassign a set from students, you destroy all of the data for the set for those '
75-
. 'students. If the set is re-assigned to these students, then they will receive new versions '
76-
. 'of problems in the set. Make sure this is what you want to do before unassigning sets '
77-
. 'from students.'
78-
) =%>
56+
<div class="row">
57+
<div class="col-xl-10 col-md-12">
58+
<%= submit_button maketext('Assign selected sets to selected users'),
59+
name => 'assign', class => 'btn btn-primary mb-2' =%>
60+
<div class="alert alert-danger p-1 mb-2">
61+
<div class="mb-1">
62+
<%= maketext('Do not unassign students unless you know what you are doing.') =%>
63+
</div>
64+
<div><%= maketext('There is NO undo for unassigning students.') =%></div>
65+
</div>
66+
<div class="d-flex align-items-center">
67+
<%= submit_button maketext('Unassign selected sets from selected users'),
68+
name => 'unassign', class => 'btn btn-primary me-2' =%>
69+
<label class="form-check-label">
70+
<%= maketext('Read only') =%>
71+
<%= radio_button unassignFromAllSafety => 0, checked => undef,
72+
class => 'form-check-input mx-1' =%>
73+
</label>
74+
<label class="form-check-label">
75+
<%= maketext('Allow unassign') =%>
76+
<%= radio_button unassignFromAllSafety => 1, class => 'form-check-input mx-1' =%>
77+
</label>
78+
</div>
79+
<div class="mt-2">
80+
<%= maketext(
81+
'When you unassign a set from students, you destroy all of the data for the set for those '
82+
. 'students. If the set is re-assigned to these students, then they will receive new '
83+
. 'versions of problems in the set. Make sure this is what you want to do before '
84+
. 'unassigning sets from students.'
85+
) =%>
86+
</div>
7987
</div>
8088
</div>
8189
</div>

templates/ContentGenerator/Instructor/FileManager/refresh.html.ep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
% $files = [];
77
% }
88
%
9+
% $c->stash->{footerWidthClass} = 'col-md-8';
10+
%
911
% # Directory menu and date/size checkbox
1012
<div class="row">
1113
<div class="col-md-8 mb-2">

templates/ContentGenerator/Instructor/Index.html.ep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<%= maketext('Select user(s) and/or set(s), and click the action button of your choice below.') =%>
1717
</p>
1818
%
19+
% stash->{footerWidthClass} = 'col-xl-10 col-md-12';
20+
%
1921
<%= form_for current_route, method => 'POST', id => 'instructor-tools-form', begin =%>
2022
<%= $c->hidden_authen_fields =%>
2123
%

templates/ContentGenerator/Instructor/Scoring.html.ep

Lines changed: 79 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -13,83 +13,96 @@
1313
% }
1414
%
1515
% my $scoringDir = $ce->{courseDirs}{scoring};
16+
% $c->stash->{footerWidthClass} = 'col-md-12 col-lg-10 col-xl-8';
1617
%
17-
<div class="border border-dark p-2" style="max-width:700px">
18-
<%= form_for current_route, name => 'scoring-form', id => 'scoring-form', method => 'POST', begin =%>
19-
<%= $c->hidden_authen_fields =%>
20-
<%= hidden_field returning => 1 =%>
21-
<div class="row">
22-
<div class="col-sm-5 mb-2">
23-
<%= label_for selectedSet => maketext('Selected sets:'), class => 'form-label' =%>
24-
<%= select_field selectedSet =>
25-
[ map { [ format_set_name_display($_) => $_ ] } @{ $c->{ra_set_ids} } ],
26-
id => 'selectedSet', class => 'form-select', size => 10, multiple => undef, dir => 'ltr' =%>
27-
</div>
28-
<div class="col-sm-7 my-sm-auto mb-2">
29-
<div class="form-check">
30-
<label class="form-check-label">
31-
<%= check_box includeIndex => 1, class => 'form-check-input' =%>
32-
<%= maketext('Include Success Index') =%>
33-
</label>
18+
<div class="row">
19+
<div class="col-md-12 col-lg-10 col-xl-8">
20+
<div class="border border-dark p-2">
21+
<%= form_for current_route, name => 'scoring-form', id => 'scoring-form', method => 'POST', begin =%>
22+
<%= $c->hidden_authen_fields =%>
23+
<%= hidden_field returning => 1 =%>
24+
<div class="row">
25+
<div class="col-sm-6 mb-2">
26+
<%= label_for selectedSet => maketext('Selected sets:'), class => 'form-label' =%>
27+
<%= select_field selectedSet =>
28+
[ map { [ format_set_name_display($_) => $_ ] } @{ $c->{ra_set_ids} } ],
29+
id => 'selectedSet', class => 'form-select', size => 10, multiple => undef, dir => 'ltr' =%>
30+
</div>
31+
<div class="col-sm-6 mt-sm-5">
32+
<div class="form-check">
33+
<label class="form-check-label">
34+
% param('padFields', 1) unless param('returning');
35+
<%= check_box padFields => 1, class => 'form-check-input' =%>
36+
<%= maketext('Pad fields') =%>
37+
</label>
38+
</div>
39+
<div class="form-check">
40+
<label class="form-check-label">
41+
% param('includePercentEachSet', 1) unless param('returning');
42+
<%= check_box includePercentEachSet => 1, class => 'form-check-input' =%>
43+
<%= maketext('Include percentage columns') =%>
44+
</label>
45+
</div>
46+
<div class="form-check">
47+
<label class="form-check-label">
48+
<%= check_box includeIndex => 1, class => 'form-check-input' =%>
49+
<%= maketext('Include success index columns') =%>
50+
</label>
51+
</div>
52+
<div class="form-check">
53+
<label class="form-check-label">
54+
<%= check_box recordSingleSetScores => 1, class => 'form-check-input' =%>
55+
<%= maketext('Record scores for each set') =%>
56+
</label>
57+
</div>
58+
</div>
3459
</div>
35-
<div class="form-check">
36-
<label class="form-check-label">
37-
<%= check_box recordSingleSetScores => 1, class => 'form-check-input' =%>
38-
<%= maketext('Record Scores for Single Sets') =%>
39-
</label>
60+
<div class="d-flex flex-sm-nowrap flex-wrap">
61+
<%= submit_button maketext('Score selected set(s) and save to:'), name => 'score-sets',
62+
id => 'score-sets', class => 'btn btn-primary btn-sm me-2 mb-sm-0 mb-2' =%>
63+
<%= text_field scoringFileName => $c->{scoringFileName}, class => 'form-control form-control-sm',
64+
size => '40', 'aria-labelledby' => 'score-sets' =%>
4065
</div>
41-
<div class="form-check">
42-
<label class="form-check-label">
43-
% param('padFields', 1) unless param('returning');
44-
<%= check_box padFields => 1, class => 'form-check-input' =%>
45-
<%= maketext('Pad Fields') =%>
46-
</label>
47-
</div>
48-
<div class="form-check">
49-
<label class="form-check-label">
50-
% param('includePercentEachSet', 1) unless param('returning');
51-
<%= check_box includePercentEachSet => 1, class => 'form-check-input' =%>
52-
<%= maketext('Include percentage grades columns for all sets') =%>
53-
</label>
54-
</div>
55-
</div>
56-
</div>
57-
<div class="d-flex flex-sm-nowrap flex-wrap">
58-
<%= submit_button maketext('Score selected set(s) and save to:'), name => 'score-sets',
59-
id => 'score-sets', class => 'btn btn-primary btn-sm me-2 mb-sm-0 mb-2' =%>
60-
<%= text_field scoringFileName => $c->{scoringFileName}, class => 'form-control form-control-sm',
61-
size => '40', 'aria-labelledby' => 'score-sets' =%>
66+
<% end =%>
6267
</div>
63-
<% end =%>
68+
</div>
6469
</div>
6570
%
6671
% my @selected = param('selectedSet');
6772
% if (@selected) {
68-
<p><%= maketext('All of these files will also be made available for mail merge.') %></p>
69-
% }
70-
%
71-
% for my $setID (@selected) {
72-
% my @validFiles;
73-
% for my $type ('scr', 'ful') {
74-
% my $filename = "s$setID$type.csv";
75-
% my $path = "$scoringDir/$filename";
76-
% push @validFiles, $filename if -f $path;
77-
% }
78-
% if (@validFiles) {
79-
<h2 dir="ltr"><%= format_set_name_display($setID) %></h2>
80-
% for my $filename (@validFiles) {
81-
<div class="mb-3">
82-
<%= link_to $filename =>
83-
$c->systemLink(url_for('instructor_scoring_download'), params => { getFile => $filename }) =%>
84-
</div>
73+
<p class="mt-2"><%= maketext('All of these files will also be made available for mail merge.') %></p>
74+
<dl>
75+
% for my $setID (@selected) {
76+
% my @validFiles;
77+
% for my $type ('scr', 'ful') {
78+
% my $filename = "s$setID$type.csv";
79+
% my $path = "$scoringDir/$filename";
80+
% push @validFiles, $filename if -f $path;
8581
% }
86-
<hr>
82+
% if (@validFiles) {
83+
<dt dir="ltr"><%= format_set_name_display($setID) %></dt>
84+
<dd>
85+
<ul>
86+
% for my $filename (@validFiles) {
87+
<li>
88+
<%= link_to $filename =>
89+
$c->systemLink(url_for('instructor_scoring_download'), params => { getFile => $filename }) =%>
90+
</li>
91+
% }
92+
</ul>
93+
</dd>
94+
% }
95+
</dl>
8796
% }
8897
% }
98+
%
8999
% if (-f "$scoringDir/$c->{scoringFileName}") {
90-
<h2><%= maketext('Totals') %></h2>
100+
<h2 class="my-2"><%= maketext('Scores') %></h2>
101+
<%= maketext("Download: ") %>
91102
<%= link_to $c->{scoringFileName} =>
92-
$c->systemLink(url_for('instructor_scoring_download'), params => { getFile => $c->{scoringFileName} }) =%>
93-
<hr>
94-
<pre style="font-size:smaller"><%== WeBWorK::Utils::readFile("$scoringDir/$c->{scoringFileName}") =%></pre>
103+
$c->systemLink(url_for('instructor_scoring_download'), params => { getFile => $c->{scoringFileName} }),
104+
class => 'font-monospace' =%>
105+
<pre class="mt-2 bg-light border" style="font-size:smaller; width:fit-content; max-width:100%;">
106+
<%== WeBWorK::Utils::readFile("$scoringDir/$c->{scoringFileName}") =%>\
107+
</pre>
95108
% }

templates/ContentGenerator/Instructor/Stats/index.html.ep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
%
66
% my $type = current_route =~ s/instructor_//r;
77
%
8+
% stash->{footerWidthClass} = 'col-lg-10 col-sm-12';
9+
%
810
<div class="row">
911
<div class="col-lg-5 col-sm-6 mb-2">
1012
<div class="card h-100">

templates/ContentGenerator/Options.html.ep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
% my $userID = $c->{user}->user_id;
1212
% my $eUserName = $c->{effectiveUser}->first_name . ' ' . $c->{effectiveUser}->last_name;
1313
%
14+
% $c->stash->{footerWidthClass} = 'col-lg-8 col-md-10';
15+
%
1416
%= form_for current_route, method => 'POST', begin
1517
<%= $c->hidden_authen_fields =%>
1618
%

0 commit comments

Comments
 (0)