--- loncom/interface/lonfeedback.pm 2002/04/03 18:47:39 1.26 +++ loncom/interface/lonfeedback.pm 2002/09/11 13:36:50 1.31 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.26 2002/04/03 18:47:39 www Exp $ +# $Id: lonfeedback.pm,v 1.31 2002/09/11 13:36:50 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -53,6 +53,8 @@ use Apache::loncommon(); sub mail_screen { my ($r,$feedurl,$options) = @_; + my $bodytag=&Apache::loncommon::bodytag('Resource Feedback and Discussion', + '','onLoad="window.focus();"'); $r->print(< @@ -100,9 +102,7 @@ sub mail_screen { } - - -

Feedback

+$bodytag

$feedurl

@@ -368,16 +368,8 @@ sub handler { # --------------------------- Get query string for limited number of parameters - foreach (split(/&/,$ENV{'QUERY_STRING'})) { - my ($name, $value) = split(/=/,$_); - $value =~ tr/+/ /; - $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; - if (($name eq 'hide') || ($name eq 'unhide') || ($name eq 'postdata')) { - unless ($ENV{'form.'.$name}) { - $ENV{'form.'.$name}=$value; - } - } - } + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, + ['hide','unhide','postdata']); if (($ENV{'form.hide'}) || ($ENV{'form.unhide'})) { # ----------------------------------------------------------------- Hide/unhide @@ -407,9 +399,8 @@ sub handler { $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, $ENV{'course.'.$ENV{'request.course.id'}.'.num'}); - &redirect_back($r,'/res/'.$url,'Changed discussion status

','0'); - - + &redirect_back($r,&Apache::lonnet::clutter($url), + 'Changed discussion status

','0'); } else { # ------------------------------------------------------------- Normal feedback my $feedurl=$ENV{'form.postdata'}; @@ -418,6 +409,13 @@ sub handler { $feedurl=~s/^$ENV{'HTTP_HOST'}//; my $symb=&Apache::lonnet::symbread($feedurl); + unless ($symb) { + $symb=$ENV{'form.symb'}; + if ($symb) { + my ($map,$id,$url)=split(/\_\_\_/,$symb); + $feedurl=&Apache::lonnet::clutter($url); + } + } my $goahead=1; if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) { unless ($symb) { $goahead=0; } @@ -434,6 +432,8 @@ sub handler { ) || ($ENV{'request.course.id'} && ($feedurl!~m:^/adm:)) + || + ($ENV{'request.course.id'} && ($symb=~/^bulletin\_\_\_/)) ) { # --------------------------------------------------- Print login screen header unless ($ENV{'form.sendit'}) { @@ -495,7 +495,3 @@ sub handler { 1; __END__ - - - -