Skip to content

Commit

Permalink
more footer position adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Dec 3, 2023
1 parent 27f3f6f commit 18d20fd
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 73 deletions.
2 changes: 1 addition & 1 deletion lib/WeBWorK/ContentGenerator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async sub go ($c) {

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

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

if ($c->can('pre_header_initialize')) {
my $pre_header_initialize = $c->pre_header_initialize;
Expand Down
60 changes: 34 additions & 26 deletions templates/ContentGenerator/Instructor/Assigner.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<%= maketext('Select one or more sets and one or more users below to assign/unassign '
. 'each selected set to/from all selected users.') =%>
</p>
%
% $c->stash->{footerWidthClass} = 'col-xl-10 col-md-12';
%
<%= form_for current_route, method => 'post', begin =%>
<%= $c->hidden_authen_fields =%>
%
Expand Down Expand Up @@ -50,32 +53,37 @@
) =%>
</div>
</div>
<div>
<%= submit_button maketext('Assign selected sets to selected users'),
name => 'assign', class => 'btn btn-primary mb-2' =%>
<div class="alert alert-danger p-1 mb-2">
<div class="mb-1"><%= maketext('Do not unassign students unless you know what you are doing.') =%></div>
<div><%= maketext('There is NO undo for unassigning students.') =%></div>
</div>
<div class="d-flex align-items-center">
<%= submit_button maketext('Unassign selected sets from selected users'),
name => 'unassign', class => 'btn btn-primary me-2' =%>
<label class="form-check-label">
<%= maketext('Read only') =%>
<%= radio_button unassignFromAllSafety => 0, checked => undef, class => 'form-check-input mx-1' =%>
</label>
<label class="form-check-label">
<%= maketext('Allow unassign') =%>
<%= radio_button unassignFromAllSafety => 1, class => 'form-check-input mx-1' =%>
</label>
</div>
<div class="mt-2">
<%= maketext(
'When you unassign a set from students, you destroy all of the data for the set for those '
. 'students. If the set is re-assigned to these students, then they will receive new versions '
. 'of problems in the set. Make sure this is what you want to do before unassigning sets '
. 'from students.'
) =%>
<div class="row">
<div class="col-xl-10 col-md-12">
<%= submit_button maketext('Assign selected sets to selected users'),
name => 'assign', class => 'btn btn-primary mb-2' =%>
<div class="alert alert-danger p-1 mb-2">
<div class="mb-1">
<%= maketext('Do not unassign students unless you know what you are doing.') =%>
</div>
<div><%= maketext('There is NO undo for unassigning students.') =%></div>
</div>
<div class="d-flex align-items-center">
<%= submit_button maketext('Unassign selected sets from selected users'),
name => 'unassign', class => 'btn btn-primary me-2' =%>
<label class="form-check-label">
<%= maketext('Read only') =%>
<%= radio_button unassignFromAllSafety => 0, checked => undef,
class => 'form-check-input mx-1' =%>
</label>
<label class="form-check-label">
<%= maketext('Allow unassign') =%>
<%= radio_button unassignFromAllSafety => 1, class => 'form-check-input mx-1' =%>
</label>
</div>
<div class="mt-2">
<%= maketext(
'When you unassign a set from students, you destroy all of the data for the set for those '
. 'students. If the set is re-assigned to these students, then they will receive new '
. 'versions of problems in the set. Make sure this is what you want to do before '
. 'unassigning sets from students.'
) =%>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
% $files = [];
% }
%
% $c->stash->{footerWidthClass} = 'col-md-8';
%
% # Directory menu and date/size checkbox
<div class="row">
<div class="col-md-8 mb-2">
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/Instructor/Index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<%= maketext('Select user(s) and/or set(s) below and click the action button of your choice.') =%>
</p>
%
% stash->{footerWidthClass} = 'col-xl-10';
% stash->{footerWidthClass} = 'col-xl-10 col-md-12';
%
<%= form_for current_route, method => 'POST', id => 'instructor-tools-form', begin =%>
<%= $c->hidden_authen_fields =%>
Expand Down
91 changes: 47 additions & 44 deletions templates/ContentGenerator/Instructor/Scoring.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -13,54 +13,57 @@
% }
%
% my $scoringDir = $ce->{courseDirs}{scoring};
% $c->stash->{footerWidthClass} = 'col-md-10 col-lg-8';
%
<div class="border border-dark p-2" style="max-width:700px">
<%= form_for current_route, name => 'scoring-form', id => 'scoring-form', method => 'POST', begin =%>
<%= $c->hidden_authen_fields =%>
<%= hidden_field returning => 1 =%>
<div class="row">
<div class="col-sm-5 mb-2">
<%= label_for selectedSet => maketext('Selected sets:'), class => 'form-label' =%>
<%= select_field selectedSet =>
[ map { [ format_set_name_display($_) => $_ ] } @{ $c->{ra_set_ids} } ],
id => 'selectedSet', class => 'form-select', size => 10, multiple => undef, dir => 'ltr' =%>
</div>
<div class="col-sm-7 my-sm-auto mb-2">
<div class="form-check">
<label class="form-check-label">
<%= check_box includeIndex => 1, class => 'form-check-input' =%>
<%= maketext('Include Success Index') =%>
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<%= check_box recordSingleSetScores => 1, class => 'form-check-input' =%>
<%= maketext('Record Scores for Single Sets') =%>
</label>
</div>
<div class="form-check">
<label class="form-check-label">
% param('padFields', 1) unless param('returning');
<%= check_box padFields => 1, class => 'form-check-input' =%>
<%= maketext('Pad Fields') =%>
</label>
<div class="row">
<div class="border border-dark p-2 col-md-10 col-lg-8">
<%= form_for current_route, name => 'scoring-form', id => 'scoring-form', method => 'POST', begin =%>
<%= $c->hidden_authen_fields =%>
<%= hidden_field returning => 1 =%>
<div class="row">
<div class="col-sm-6 mb-2">
<%= label_for selectedSet => maketext('Selected sets:'), class => 'form-label' =%>
<%= select_field selectedSet =>
[ map { [ format_set_name_display($_) => $_ ] } @{ $c->{ra_set_ids} } ],
id => 'selectedSet', class => 'form-select', size => 10, multiple => undef, dir => 'ltr' =%>
</div>
<div class="form-check">
<label class="form-check-label">
% param('includePercentEachSet', 1) unless param('returning');
<%= check_box includePercentEachSet => 1, class => 'form-check-input' =%>
<%= maketext('Include percentage grades columns for all sets') =%>
</label>
<div class="col-sm-6 my-sm-auto mb-2">
<div class="form-check">
<label class="form-check-label">
<%= check_box includeIndex => 1, class => 'form-check-input' =%>
<%= maketext('Include Success Index') =%>
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<%= check_box recordSingleSetScores => 1, class => 'form-check-input' =%>
<%= maketext('Record Scores for Single Sets') =%>
</label>
</div>
<div class="form-check">
<label class="form-check-label">
% param('padFields', 1) unless param('returning');
<%= check_box padFields => 1, class => 'form-check-input' =%>
<%= maketext('Pad Fields') =%>
</label>
</div>
<div class="form-check">
<label class="form-check-label">
% param('includePercentEachSet', 1) unless param('returning');
<%= check_box includePercentEachSet => 1, class => 'form-check-input' =%>
<%= maketext('Include percentage grades columns for all sets') =%>
</label>
</div>
</div>
</div>
</div>
<div class="d-flex flex-sm-nowrap flex-wrap">
<%= submit_button maketext('Score selected set(s) and save to:'), name => 'score-sets',
id => 'score-sets', class => 'btn btn-primary btn-sm me-2 mb-sm-0 mb-2' =%>
<%= text_field scoringFileName => $c->{scoringFileName}, class => 'form-control form-control-sm',
size => '40', 'aria-labelledby' => 'score-sets' =%>
</div>
<% end =%>
<div class="d-flex flex-sm-nowrap flex-wrap">
<%= submit_button maketext('Score selected set(s) and save to:'), name => 'score-sets',
id => 'score-sets', class => 'btn btn-primary btn-sm me-2 mb-sm-0 mb-2' =%>
<%= text_field scoringFileName => $c->{scoringFileName}, class => 'form-control form-control-sm',
size => '40', 'aria-labelledby' => 'score-sets' =%>
</div>
<% end =%>
</div>
</div>
%
% my @selected = param('selectedSet');
Expand Down
2 changes: 1 addition & 1 deletion templates/ContentGenerator/Instructor/Stats/index.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%
% my $type = current_route =~ s/instructor_//r;
%
% stash->{footerWidthClass} = 'col-lg-10';
% stash->{footerWidthClass} = 'col-lg-10 col-sm-12';
%
<div class="row">
<div class="col-lg-5 col-sm-6 mb-2">
Expand Down
2 changes: 2 additions & 0 deletions templates/ContentGenerator/Options.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
% my $userID = $c->{user}->user_id;
% my $eUserName = $c->{effectiveUser}->first_name . ' ' . $c->{effectiveUser}->last_name;
%
% $c->stash->{footerWidthClass} = 'col-lg-8 col-md-10';
%
%= form_for current_route, method => 'POST', begin
<%= $c->hidden_authen_fields =%>
%
Expand Down

0 comments on commit 18d20fd

Please sign in to comment.