version 1.13, 2001/07/26 23:26:56
|
version 1.14, 2001/08/10 14:45:11
|
Line 15
|
Line 15
|
# 2/13 Guy Albertelli |
# 2/13 Guy Albertelli |
# 7/25 Gerd Kortemeyer |
# 7/25 Gerd Kortemeyer |
# 7/26 Guy Albertelli |
# 7/26 Guy Albertelli |
# 7/26 Gerd Kortemeyer |
# 7/26,8/10 Gerd Kortemeyer |
|
|
|
|
package Apache::lonfeedback; |
package Apache::lonfeedback; |
Line 60 sub mail_screen {
|
Line 60 sub mail_screen {
|
rec=1; |
rec=1; |
} |
} |
} |
} |
|
if (typeof(document.mailform.elements.anondiscuss)!="undefined") { |
|
if (document.mailform.elements.anondiscuss.checked) { |
|
rec=1; |
|
} |
|
} |
|
|
if (rec) { |
if (rec) { |
document.mailform.submit(); |
document.mailform.submit(); |
Line 170 sub screen_header {
|
Line 175 sub screen_header {
|
$options.='<br><input type=checkbox name=discuss> '. |
$options.='<br><input type=checkbox name=discuss> '. |
'<b>Contribution to course discussion of resource</b>'; |
'<b>Contribution to course discussion of resource</b>'; |
} |
} |
|
if ($ENV{'request.course.id'}) { |
|
$options.='<br><input type=checkbox name=anondiscuss> '. |
|
'<b>Anonymous contribution to course discussion of resource</b>'. |
|
' (name only visible to course faculty)'; |
|
} |
return $options; |
return $options; |
} |
} |
|
|
Line 262 sub send_msg {
|
Line 272 sub send_msg {
|
} |
} |
|
|
sub adddiscuss { |
sub adddiscuss { |
my ($symb,$email)=@_; |
my ($symb,$email,$anon)=@_; |
my $status=''; |
my $status=''; |
my %contrib=('message' => $email, |
my %contrib=('message' => $email, |
'sendername' => $ENV{'user.name'}, |
'sendername' => $ENV{'user.name'}, |
'senderdomain' => $ENV{'user.domain'}); |
'senderdomain' => $ENV{'user.domain'}); |
|
if ($anon) { |
|
$contrib{'anonymous'}='true'; |
|
} |
if (($symb) && ($email)) { |
if (($symb) && ($email)) { |
$status='Adding to class discussion: '. |
$status='Adding to class discussion'.($anon?' (anonymous)':'').': '. |
&Apache::lonnet::store(\%contrib,$symb,$ENV{'request.course.id'}, |
&Apache::lonnet::store(\%contrib,$symb,$ENV{'request.course.id'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}). |
$ENV{'course.'.$ENV{'request.course.id'}.'.num'}). |
Line 345 sub handler {
|
Line 358 sub handler {
|
$typestyle.=&adddiscuss($symb,$message); |
$typestyle.=&adddiscuss($symb,$message); |
} |
} |
|
|
|
if ($ENV{'form.anondiscuss'}) { |
|
$typestyle.=&adddiscuss($symb,$message,1); |
|
} |
|
|
|
|
# Receipt screen and redirect back to where came from |
# Receipt screen and redirect back to where came from |
&redirect_back($r,$feedurl,$typestyle,$numsent,$status); |
&redirect_back($r,$feedurl,$typestyle,$numsent,$status); |
|
|
Line 365 __END__
|
Line 383 __END__
|
|
|
|
|
|
|
|
|