From: Sam H. v. a. <we...@ma...> - 2005-09-16 19:08:22
|
Log Message: ----------- feedback is now sent to users with receive_feedback permission regardless of the contents of the feedbackRecipients list in global.conf. Comments in global.conf now read: By default, feeback is sent to all users who have permission to receive_feedback. If this list is non-empty, feedback is also sent to the addresses specified here. * If you want to disable feedback altogether, leave this empty and set submit_feeback => $nobody in %permissionLevels below. This will cause the feedback button to go away as well. * If you want to send email ONLY to addresses in this list, set receive_feedback => $nodoy in %permissionLevels below. It's often useful to set this in the course.conf to change the behavior of feedback for a specific course. Modified Files: -------------- webwork2/conf: global.conf.dist webwork2/lib/WeBWorK/ContentGenerator: Feedback.pm Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.137 retrieving revision 1.138 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.137 -r1.138 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -103,16 +103,26 @@ #'pr...@yo...', #'pr...@yo...', ]; - -# If defined, feedbackRecipients overrides the list of recipients for feedback -# email. It's appropriate to set this in the course.conf for specific courses, -# but probably not in global.conf. if not defined, mail is sent to all -# professors and TAs for a given course -#$mail{feedbackRecipients} = [ -# 'pr...@yo...', -# 'pr...@yo...', -#]; - + +# By default, feeback is sent to all users who have permission to +# receive_feedback. If this list is non-empty, feedback is also sent to the +# addresses specified here. +# +# * If you want to disable feedback altogether, leave this empty and set +# submit_feeback => $nobody in %permissionLevels below. This will cause the +# feedback button to go away as well. +# +# * If you want to send email ONLY to addresses in this list, set +# receive_feedback => $nodoy in %permissionLevels below. +# +# It's often useful to set this in the course.conf to change the behavior of +# feedback for a specific course. +# +$mail{feedbackRecipients} = [ + #'pr...@yo...', + #'pr...@yo...', +]; + # feedbackVerbosity: # 0: send only the feedback comment and context link # 1: as in 0, plus user, set, problem, and PG data Index: Feedback.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Feedback.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -Llib/WeBWorK/ContentGenerator/Feedback.pm -Llib/WeBWorK/ContentGenerator/Feedback.pm -u -r1.27 -r1.28 --- lib/WeBWorK/ContentGenerator/Feedback.pm +++ lib/WeBWorK/ContentGenerator/Feedback.pm @@ -318,20 +318,21 @@ my $authz = $self->r->authz; my @recipients; - if (defined $ce->{mail}->{feedbackRecipients}) { - @recipients = @{$ce->{mail}->{feedbackRecipients}}; - } else { - # send to all users with permission to receive_feedback and an email address - foreach my $rcptName ($db->listUsers()) { - if ($authz->hasPermissions($rcptName, "receive_feedback")) { - my $rcpt = $db->getUser($rcptName); # checked - if ($rcpt and $rcpt->email_address) { - push @recipients, $rcpt->email_address; - } + + # send to all users with permission to receive_feedback and an email address + foreach my $rcptName ($db->listUsers()) { + if ($authz->hasPermissions($rcptName, "receive_feedback")) { + my $rcpt = $db->getUser($rcptName); # checked + if ($rcpt and $rcpt->email_address) { + push @recipients, $rcpt->email_address; } } } + if (defined $ce->{mail}->{feedbackRecipients}) { + push @recipients, @{$ce->{mail}->{feedbackRecipients}}; + } + return @recipients; } |