--- loncom/interface/lonfeedback.pm 2002/10/28 23:28:52 1.37 +++ loncom/interface/lonfeedback.pm 2002/12/26 16:40:33 1.38 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.37 2002/10/28 23:28:52 albertel Exp $ +# $Id: lonfeedback.pm,v 1.38 2002/12/26 16:40:33 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -435,7 +435,7 @@ sub handler { # --------------------------- Get query string for limited number of parameters &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, - ['hide','unhide','postdata','preview']); + ['hide','unhide','deldisc','postdata','preview']); if (($ENV{'form.hide'}) || ($ENV{'form.unhide'})) { # ----------------------------------------------------------------- Hide/unhide @@ -463,6 +463,33 @@ sub handler { &Apache::lonnet::store(\%newhash,$symb,$ENV{'request.course.id'}, $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, + $ENV{'course.'.$ENV{'request.course.id'}.'.num'}); + + &redirect_back($r,&Apache::lonnet::clutter($url), + 'Changed discussion status
','0','0'); + } elsif ($ENV{'form.deldisc'}) { +# --------------------------------------------------------------- Hide for good + $r->content_type('text/html'); + $r->send_http_header; + + my $entry=$ENV{'form.deldisc'}; + + my ($symb,$idx)=split(/\:\:\:/,$entry); + my ($map,$ind,$url)=split(/\_\_\_/,$symb); + + my %contrib=&Apache::lonnet::restore($symb,$ENV{'request.course.id'}, + $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, + $ENV{'course.'.$ENV{'request.course.id'}.'.num'}); + + + my $currentdeleted=$contrib{'deleted'}; + + $currentdeleted.='.'.$idx.'.'; + + my %newhash=('deleted' => $currentdeleted); + + &Apache::lonnet::store(\%newhash,$symb,$ENV{'request.course.id'}, + $ENV{'course.'.$ENV{'request.course.id'}.'.domain'}, $ENV{'course.'.$ENV{'request.course.id'}.'.num'}); &redirect_back($r,&Apache::lonnet::clutter($url),