--- loncom/interface/lonfeedback.pm 2004/06/01 21:40:57 1.85 +++ loncom/interface/lonfeedback.pm 2004/06/03 20:06:15 1.89 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.85 2004/06/01 21:40:57 www Exp $ +# $Id: lonfeedback.pm,v 1.89 2004/06/03 20:06:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,15 +34,20 @@ use Apache::Constants qw(:common); use Apache::lonmsg(); use Apache::loncommon(); use Apache::lontexconvert(); -use Apache::lonlocal; +use Apache::lonlocal; # must not have () +use Apache::lonhtmlcommon(); sub list_discussion { my ($mode,$status,$symb)=@_; -# &Apache::lonnet::logthis("status is $status"); + if (!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER' || $status eq 'OPEN')) { return ''; } + my $close=&Apache::lonnet::EXT('resource.0.discussend'); + if (defined($close) && $close ne '' && $close < time) { + return '' + } my @bgcols = ("#cccccc","#eeeeee"); my $discussiononly=0; @@ -411,7 +416,7 @@ sub list_discussion { Note: in anonymous discussion, your name is visible only to course faculty
Title: 

- +

Attachment (128 KB max size):

@@ -458,7 +463,7 @@ sub mail_screen { } } my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); - my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders(); + my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders(); my $send=&mt('Send'); $r->print(< @@ -502,6 +507,7 @@ $htmlheader } if (rec) { + document.mailform.onsubmit(); document.mailform.submit(); } else { alert('Please check a feedback type.'); @@ -673,14 +679,17 @@ sub resource_output { sub clear_out_html { my ($message,$override)=@_; + unless (&Apache::lonhtmlcommon::htmlareablocked()) { return $message; } my $cid=$ENV{'request.course.id'}; if (($ENV{"course.$cid.allow_limited_html_in_feedback"} =~ m/yes/i) || ($override)) { # allows


      • - #
        + #

        + # my %html=(B=>1, I=>1, P=>1, A=>1, LI=>1, OL=>1, UL=>1, EM=>1, BR=>1, TT=>1, STRONG=>1, BLOCKQUOTE=>1, DIV=>1, IMG=>1, - M=>1); + M=>1, SUB=>1, SUP=>1, SPAN=>1, + H1=>1, H2=>1, H3=>1, H4=>1, H5=>1); $message =~ s/\<(\/?\s*(\w+)[^\>\<]*)/ {($html{uc($2)}&&(length($1)<1000))?"\<$1":"\<$1"}/ge; @@ -881,7 +890,7 @@ sub generate_preview_button { +onClick="document.mailform.onsubmit();this.form.comment.value=document.mailform.comment.value;this.form.subject.value=document.mailform.subject.value;this.form.submit();" /> ENDPREVIEW }