Skip to content

Commit 983c1c6

Browse files
authored
Merge pull request #2941 from drgrice1/bugfix/layout-issues
Fix some layout and validation issues.
2 parents fb3b720 + f3d3af8 commit 983c1c6

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

lib/WeBWorK/ContentGenerator/Problem.pm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,13 +1442,13 @@ sub output_custom_edit_message ($c) {
14421442

14431443
# Output the "Show Past Answers" button
14441444
sub output_past_answer_button ($c) {
1445-
my $problemID = $c->{problem}->problem_id;
1446-
my $setRecord = $c->db->getGlobalSet($c->{problem}->set_id);
1447-
if (defined $setRecord && $setRecord->assignment_type eq 'jitar') {
1448-
$problemID = join('.', jitar_id_to_seq($problemID));
1449-
}
1450-
14511445
if ($c->authz->hasPermissions($c->param('user'), 'view_answers')) {
1446+
my $problemID = $c->{problem}->problem_id;
1447+
my $setRecord = $c->db->getGlobalSet($c->{problem}->set_id);
1448+
if (defined $setRecord && $setRecord->assignment_type eq 'jitar') {
1449+
$problemID = join('.', jitar_id_to_seq($problemID));
1450+
}
1451+
14521452
my $hiddenFields = $c->hidden_authen_fields;
14531453
$hiddenFields =~ s/\"hidden_/\"pastans-hidden_/g;
14541454
return $c->form_for(

templates/ContentGenerator/Base/feedback_macro_email.html.ep

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
% next if $key eq 'pg_object'; # Not used in internal feedback mechanism
77
<%= hidden_field $key => $value =%>
88
% }
9-
<div class="mb-3">
10-
<%= submit_button maketext($ce->{feedback_button_name}) || maketext('Email instructor'),
11-
name => 'feedbackForm', class => 'btn btn-primary' =%>
12-
</div>
9+
<%= submit_button maketext($ce->{feedback_button_name}) || maketext('Email instructor'),
10+
name => 'feedbackForm', class => 'btn btn-primary' =%>
1311
% end

templates/ContentGenerator/Problem.html.ep

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,11 @@
114114
<% end =%>
115115
</div>
116116
</div>
117-
<div id="problemFooter" class="problemFooter">
118-
<%= $c->output_past_answer_button =%>
119-
<%= $c->output_email_instructor =%>
120-
</div>
117+
<%= $c->output_past_answer_button =%>
118+
% my $emailInstructorButton = $c->output_email_instructor;
119+
% if ($emailInstructorButton) {
120+
<div class="mb-3"><%= $emailInstructorButton =%></div>
121+
% }
121122
<%= include 'ContentGenerator/Base/problem_warning_and_debug_output',
122123
warnings => $c->{pg}{warnings},
123124
warning_messages => ref $c->{pg}{warning_messages} eq 'ARRAY' ? $c->{pg}{warning_messages} : [],

templates/ContentGenerator/ProblemSet/auxiliary_tools.html.ep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<div class="modal-dialog modal-dialog-centered">
4444
<div class="modal-content">
4545
<div class="modal-header">
46-
<h4 class="modal-title"><%= maketext('Achievement Rewards') %></h4>
46+
<h1 class="modal-title h4"><%= maketext('Achievement Rewards') %></h1>
4747
<button type="button" class="btn-close" data-bs-dismiss="modal"
4848
aria-label="<%= maketext('close') %>"></button>
4949
</div>

0 commit comments

Comments
 (0)