Skip to content

Commit

Permalink
Add notes about correct answers shown in feedback for instructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
drgrice1 committed Jan 24, 2024
1 parent 722bd6a commit ab13a03
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 6 deletions.
17 changes: 17 additions & 0 deletions templates/ContentGenerator/GatewayQuiz.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,23 @@
</p>
% }
%
% if (
% (
% $authz->hasPermissions($userID, 'show_correct_answers_before_answer_date')
% || $authz->hasPermissions($userID, 'view_hidden_work')
% )
% && !$c->can_showCorrectAnswersForAll($c->{set}, $c->{problem}, $c->{tmplSet})
% )
% {
<p>
<b><%= maketext('Note') %>:</b>
<i>
<%= maketext('The correct answers shown in feedback are instructor previews and '
. 'will only be shown to students when answers are available.') =%>
</i>
</p>
% }
%
<div class="text-end mb-2">
<%= link_to maketext('preview answers') => '#',
class => 'gateway-preview-btn btn btn-secondary',
Expand Down
12 changes: 11 additions & 1 deletion templates/ContentGenerator/Problem/messages.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,18 @@
<b><%= maketext('Note') %>:</b>
<i>
<%= maketext('The solution shown is an instructor preview and '
. 'will only be shown to students after the due date.'
. 'will only be shown to students after the answer date.'
) =%>
</i>
</p>
% }
%
% if ($authz->hasPermissions($c->{userID}, 'show_correct_answers_before_answer_date')) {
<p>
<b><%= maketext('Note') %>:</b>
<i>
<%= maketext('The correct answers shown in feedback are instructor previews and '
. 'will only be shown to students after the answer date.') =%>
</i>
</p>
% }
21 changes: 16 additions & 5 deletions templates/ContentGenerator/ShowMeAnother/messages.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
% }
%
% if ($c->{pg}{flags}{hintExists}
% && $authz->hasPermissions($c->{userName}, 'always_show_hint')
% && !$c->{options}{showHints}) {
% && $authz->hasPermissions($c->{userID}, 'always_show_hint')
% && !$c->{showMeAnother}{options}{showHints}) {
% my $showHintsAfter =
% $c->{set}->hide_hint ? -1
% : $c->{problem}->showHintsAfter > -2 ? $c->{problem}->showHintsAfter
Expand All @@ -25,14 +25,25 @@
% }
%
% if ($c->{pg}{flags}{solutionExists}
% && $authz->hasPermissions($c->{userName}, 'always_show_solution')
% && !$c->{options}{showSolutions}) {
% && $authz->hasPermissions($c->{userID}, 'always_show_solution')
% && !$c->{showMeAnother}{options}{showSolutions}) {
<p>
<b><%= maketext('Note') %>:</b>
<i>
<%= maketext('The solution shown is an instructor preview and '
. 'will only be shown to students after the due date.'
. 'will only be shown to students after the answer date.'
) =%>
</i>
</p>
% }
%
% if ($authz->hasPermissions($c->{userID}, 'show_correct_answers_before_answer_date')
% && !$c->{showMeAnother}{options}{showCorrect}) {
<p>
<b><%= maketext('Note') %>:</b>
<i>
<%= maketext('The correct answers shown in feedback are instructor previews and '
. 'will only be shown to students after the answer date.') =%>
</i>
</p>
% }

0 comments on commit ab13a03

Please sign in to comment.