Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/WeBWorK/ContentGenerator/Problem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1442,13 +1442,13 @@ sub output_custom_edit_message ($c) {

# Output the "Show Past Answers" button
sub output_past_answer_button ($c) {
my $problemID = $c->{problem}->problem_id;
my $setRecord = $c->db->getGlobalSet($c->{problem}->set_id);
if (defined $setRecord && $setRecord->assignment_type eq 'jitar') {
$problemID = join('.', jitar_id_to_seq($problemID));
}

if ($c->authz->hasPermissions($c->param('user'), 'view_answers')) {
my $problemID = $c->{problem}->problem_id;
my $setRecord = $c->db->getGlobalSet($c->{problem}->set_id);
if (defined $setRecord && $setRecord->assignment_type eq 'jitar') {
$problemID = join('.', jitar_id_to_seq($problemID));
}

my $hiddenFields = $c->hidden_authen_fields;
$hiddenFields =~ s/\"hidden_/\"pastans-hidden_/g;
return $c->form_for(
Expand Down
6 changes: 2 additions & 4 deletions templates/ContentGenerator/Base/feedback_macro_email.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
% next if $key eq 'pg_object'; # Not used in internal feedback mechanism
<%= hidden_field $key => $value =%>
% }
<div class="mb-3">
<%= submit_button maketext($ce->{feedback_button_name}) || maketext('Email instructor'),
name => 'feedbackForm', class => 'btn btn-primary' =%>
</div>
<%= submit_button maketext($ce->{feedback_button_name}) || maketext('Email instructor'),
name => 'feedbackForm', class => 'btn btn-primary' =%>
% end
9 changes: 5 additions & 4 deletions templates/ContentGenerator/Problem.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@
<% end =%>
</div>
</div>
<div id="problemFooter" class="problemFooter">
<%= $c->output_past_answer_button =%>
<%= $c->output_email_instructor =%>
</div>
<%= $c->output_past_answer_button =%>
% my $emailInstructorButton = $c->output_email_instructor;
% if ($emailInstructorButton) {
<div class="mb-3"><%= $emailInstructorButton =%></div>
% }
<%= include 'ContentGenerator/Base/problem_warning_and_debug_output',
warnings => $c->{pg}{warnings},
warning_messages => ref $c->{pg}{warning_messages} eq 'ARRAY' ? $c->{pg}{warning_messages} : [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><%= maketext('Achievement Rewards') %></h4>
<h1 class="modal-title h4"><%= maketext('Achievement Rewards') %></h1>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="<%= maketext('close') %>"></button>
</div>
Expand Down
Loading