Skip to content
Closed
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
16 changes: 8 additions & 8 deletions lib/WeBWorK/ContentGenerator/GatewayQuiz.pm
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ sub can_showCorrectAnswers {
# so we should hide the correct answers if we aren not showing
# scores GG.

my $canShowScores = $Set->hide_score_by_problem eq 'N' &&
my $canShowScores = ($Set->hide_score_by_problem eq 'N' ||
!$Set->hide_score_by_problem) &&
( $Set->hide_score eq 'N' ||
( $Set->hide_score eq 'BeforeAnswerDate' &&
after($tmplSet->answer_date) ) );

return ( ( ( after( $Set->answer_date ) ||
( $attemptsUsed >= $maxAttempts &&
$maxAttempts != 0 &&
$Set->due_date() == $Set->answer_date() ) ) ||
$maxAttempts != 0 ) ) ||
$authz->hasPermissions($User->user_id,
"show_correct_answers_before_answer_date") ) &&
( $authz->hasPermissions($User->user_id, "view_hidden_work") ||
Expand Down Expand Up @@ -147,15 +147,15 @@ sub can_showSolutions {
# so we should hide the correct answers if we aren not showing
# scores GG.

my $canShowScores = $Set->hide_score_by_problem eq 'N' &&
my $canShowScores = ($Set->hide_score_by_problem eq 'N' ||
!$Set->hide_score_by_problem) &&
( $Set->hide_score eq 'N' ||
( $Set->hide_score eq 'BeforeAnswerDate' &&
after($tmplSet->answer_date) ) );

return ( ( ( after( $Set->answer_date ) ||
( $attemptsUsed >= $attempts_per_version &&
$attempts_per_version != 0 &&
$Set->due_date() == $Set->answer_date() ) ) ||
$attempts_per_version != 0 ) ) ||
$authz->hasPermissions($User->user_id,
"show_correct_answers_before_answer_date") ) &&
( $authz->hasPermissions($User->user_id, "view_hidden_work") ||
Expand Down Expand Up @@ -262,8 +262,8 @@ sub can_checkAnswers {
# showing correcrt answers but not showing scores doesn't make sense
# so we should hide the correct answers if we aren not showing
# scores GG.

my $canShowScores = $Set->hide_score_by_problem eq 'N' &&
my $canShowScores = ($Set->hide_score_by_problem eq 'N' ||
!$Set->hide_score_by_problem) &&
( $Set->hide_score eq 'N' ||
( $Set->hide_score eq 'BeforeAnswerDate' &&
after($tmplSet->answer_date) ) );
Expand Down