Skip to content

Commit 808607f

Browse files
committed
Configurable feedback email links show problem grader.
This adds a new course configuration option that allows the instructor to choose if the problem grader will be open or not when the links sent in a feedback email from a problem are followed. I am finding that to be rather obtrusive, and not something that I ever want. I know I am not alone on this.
1 parent 53301bc commit 808607f

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

conf/defaults.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ $mail{feedbackSubjectFormat} = "[WWfeedback] course:%c user:%u set:%s prob:%p se
8181
# 2: as in 1, plus the problem environment (debugging data)
8282
$mail{feedbackVerbosity} = 1;
8383

84+
# If this is 1, then the links included in feedback emails when feedback is sent
85+
# from a problem will open the problem grader when followed. If this is 0, then
86+
# the problem grader will not be open when those links are followed.
87+
$mail{linksOpenProblemGrader} = 1;
88+
8489
# Should the studentID be included in the feedback email when feedbackVerbosity > 0:
8590
# The default is yes
8691
$blockStudentIDinFeedback = 0;

conf/localOverrides.conf.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ $mail{feedbackRecipients} = [
6161
#'prof2@yourserver.yourdomain.edu',
6262
];
6363

64+
# If this is 1, then the links included in feedback emails when feedback is sent
65+
# from a problem will open the problem grader when followed. If this is 0, then
66+
# the problem grader will not be open when those links are followed.
67+
#$mail{linksOpenProblemGrader} = 0;
68+
6469
# Should the studentID be included in the feedback email when feedbackVerbosity > 0:
6570
# The default is yes. Uncomment the line below to block it from being included.
6671
# Blocking it from being included is recommended if the studentID is "personal"

lib/WeBWorK/ConfigValues.pm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,17 @@ sub getConfigValues ($ce) {
886886
),
887887
type => 'boolean'
888888
},
889+
{
890+
var => 'mail{linksOpenProblemGrader}',
891+
doc => x('Feedback links open problem grader'),
892+
doc2 => x(
893+
'If this is true, then the links included in feedback emails sent from a problem will have the '
894+
. 'problem grader open when followed. If this is false, then the problem grader will not '
895+
. 'be open when those links are followed. The problem grader may still be opened in any '
896+
. 'case by using the "Show Problem Grader" button.'
897+
),
898+
type => 'boolean'
899+
},
889900
],
890901
];
891902

lib/WeBWorK/Utils.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ sub generateURLs ($c, %params) {
356356
for my $name ('displayMode', 'showCorrectAnswers', 'showHints', 'showOldAnswers', 'showSolutions') {
357357
$args{$name} = [ $c->param($name) ] if defined $c->param($name) && $c->param($name) ne '';
358358
}
359-
$args{showProblemGrader} = 1;
359+
$args{showProblemGrader} = 1 if $c->ce->{mail}{linksOpenProblemGrader};
360360
} else {
361361
$routePath = $c->url_for('problem_list', setID => $params{set_id});
362362
}

0 commit comments

Comments
 (0)