Skip to content

Commit 941bb53

Browse files
committed
more footer position adjustments
1 parent 5e4bc0e commit 941bb53

File tree

7 files changed

+88
-73
lines changed

7 files changed

+88
-73
lines changed

lib/WeBWorK/ContentGenerator.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async sub go ($c) {
122122

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

125-
$c->stash->{footerWidthClass} = 'col-12';
125+
$c->stash->{footerWidthClass} = $c->can('info') ? 'col-md-8' : 'col-12';
126126

127127
if ($c->can('pre_header_initialize')) {
128128
my $pre_header_initialize = $c->pre_header_initialize;

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
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';
19+
% stash->{footerWidthClass} = 'col-xl-10 col-md-12';
2020
%
2121
<%= form_for current_route, method => 'POST', id => 'instructor-tools-form', begin =%>
2222
<%= $c->hidden_authen_fields =%>

templates/ContentGenerator/Instructor/Scoring.html.ep

Lines changed: 47 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,57 @@
1313
% }
1414
%
1515
% my $scoringDir = $ce->{courseDirs}{scoring};
16+
% $c->stash->{footerWidthClass} = 'col-md-10 col-lg-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>
34-
</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>
40-
</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>
18+
<div class="row">
19+
<div class="border border-dark p-2 col-md-10 col-lg-8">
20+
<%= form_for current_route, name => 'scoring-form', id => 'scoring-form', method => 'POST', begin =%>
21+
<%= $c->hidden_authen_fields =%>
22+
<%= hidden_field returning => 1 =%>
23+
<div class="row">
24+
<div class="col-sm-6 mb-2">
25+
<%= label_for selectedSet => maketext('Selected sets:'), class => 'form-label' =%>
26+
<%= select_field selectedSet =>
27+
[ map { [ format_set_name_display($_) => $_ ] } @{ $c->{ra_set_ids} } ],
28+
id => 'selectedSet', class => 'form-select', size => 10, multiple => undef, dir => 'ltr' =%>
4729
</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>
30+
<div class="col-sm-6 my-sm-auto mb-2">
31+
<div class="form-check">
32+
<label class="form-check-label">
33+
<%= check_box includeIndex => 1, class => 'form-check-input' =%>
34+
<%= maketext('Include Success Index') =%>
35+
</label>
36+
</div>
37+
<div class="form-check">
38+
<label class="form-check-label">
39+
<%= check_box recordSingleSetScores => 1, class => 'form-check-input' =%>
40+
<%= maketext('Record Scores for Single Sets') =%>
41+
</label>
42+
</div>
43+
<div class="form-check">
44+
<label class="form-check-label">
45+
% param('padFields', 1) unless param('returning');
46+
<%= check_box padFields => 1, class => 'form-check-input' =%>
47+
<%= maketext('Pad Fields') =%>
48+
</label>
49+
</div>
50+
<div class="form-check">
51+
<label class="form-check-label">
52+
% param('includePercentEachSet', 1) unless param('returning');
53+
<%= check_box includePercentEachSet => 1, class => 'form-check-input' =%>
54+
<%= maketext('Include percentage grades columns for all sets') =%>
55+
</label>
56+
</div>
5457
</div>
5558
</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' =%>
62-
</div>
63-
<% end =%>
59+
<div class="d-flex flex-sm-nowrap flex-wrap">
60+
<%= submit_button maketext('Score selected set(s) and save to:'), name => 'score-sets',
61+
id => 'score-sets', class => 'btn btn-primary btn-sm me-2 mb-sm-0 mb-2' =%>
62+
<%= text_field scoringFileName => $c->{scoringFileName}, class => 'form-control form-control-sm',
63+
size => '40', 'aria-labelledby' => 'score-sets' =%>
64+
</div>
65+
<% end =%>
66+
</div>
6467
</div>
6568
%
6669
% my @selected = param('selectedSet');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
%
66
% my $type = current_route =~ s/instructor_//r;
77
%
8-
% stash->{footerWidthClass} = 'col-lg-10';
8+
% stash->{footerWidthClass} = 'col-lg-10 col-sm-12';
99
%
1010
<div class="row">
1111
<div class="col-lg-5 col-sm-6 mb-2">

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)