--- loncom/interface/lonfeedback.pm 2005/02/17 03:42:29 1.150 +++ loncom/interface/lonfeedback.pm 2005/03/01 03:21:04 1.155 @@ -1,7 +1,7 @@ # The LearningOnline Network # Feedback # -# $Id: lonfeedback.pm,v 1.150 2005/02/17 03:42:29 albertel Exp $ +# $Id: lonfeedback.pm,v 1.155 2005/03/01 03:21:04 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -974,9 +974,9 @@ sub build_posting_display { $contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$ressymb); } if ($$dischash{$readkey}=~/\.$idx\./) { - $ctlink = ''.&mt('Mark unread').'? '; + $ctlink = ''; } else { - $ctlink = ''.&mt('Mark read').'? '; + $ctlink = ''; } } #figure out at what position this needs to print @@ -1436,8 +1436,9 @@ END my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(); my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders(); my $send=&mt('Send'); + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html The LearningOnline Network with CAPA @@ -1661,8 +1662,9 @@ sub print_display_options { $currtogg = $lt{'toggon'}; $disctogg = 'toggon'; } + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html $lt{'dido'} @@ -1753,18 +1755,18 @@ $lt{'sdpf'}
$lt{'prca'}
  1. $l $lt{'disa'} $lt{$discdisp} -  $lt{'chgt'} "$dispchangeA" +
    -  $lt{'chgt'} "$dispchangeB" + $lt{'npmr'} $lt{$discmark} - $lt{'chgt'} "$markchange" + $lt{'dotm'} $lt{$disctogg} - $lt{'chgt'} "$toggchange" + @@ -1843,9 +1845,9 @@ sub print_sortfilter_options { my %role_types = (); my %status_types = (); &sort_filter_names(\%sort_types,\%role_types,\%status_types); - + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html $lt{'diso'} @@ -1929,7 +1931,7 @@ $bodytag   - $lt{'shal'} +
    @@ -1948,6 +1950,9 @@ END sub print_showposters { my ($r,$symb,$previous,$feedurl,$sortposts) = @_; + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + &Apache::lonenc::check_encrypt(\$symb); my $crs='/'.$ENV{'request.course.id'}; if ($ENV{'request.course.sec'}) { @@ -1996,8 +2001,9 @@ sub print_showposters { } } } + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html $lt{'diso'} @@ -2024,7 +2030,7 @@ END next; } else { $count ++; - $r->print(''.$count.''.$last.', '.$first.' ('.$uname.','.$udom.')'.$postcounts{$_}.''); + $r->print(''.$count.''.$postcounts{$_}.''); } } } @@ -2109,9 +2115,11 @@ sub fail_redirect { my ($r,$feedurl) = @_; if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' }; my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); + my $html=&Apache::lonxml::xmlbegin(); $r->print (< -Feedback not sent +$html + +Feedback not sent @@ -2195,8 +2203,9 @@ sub redirect_back { } $feedurl=&Apache::lonenc::check_encrypt($feedurl); my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif'); + my $html=&Apache::lonxml::xmlbegin(); $r->print (< +$html Feedback sent @@ -2225,9 +2234,11 @@ sub no_redirect_back { my ($r,$feedurl) = @_; my $nofeed=&mt('Sorry, no feedback possible on this resource ...'); my $continue=&mt('Continue'); + my $html=&Apache::lonxml::xmlbegin(); $r->print (< -Feedback not sent +$html + +Feedback not sent ENDNOREDIR @@ -2255,23 +2266,25 @@ sub screen_header { unless (($ENV{'form.replydisc'}) || ($ENV{'form.editdisc'})) { if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) { $msgoptions= - '

    '. - &mt('Feedback to resource author').'

    '; + '

    '; } if (&feedback_available(1)) { $msgoptions.= - '
    '. - &mt('Question about resource content'); + '

    '; } if (&feedback_available(0,1)) { $msgoptions.= - '
    '. - &mt('Question/Comment/Feedback about course content'); + '

    '; } if (&feedback_available(0,0,1)) { $msgoptions.= - '
    '. - &mt('Question/Comment/Feedback about course policy'); + '

    '; } } if ($ENV{'request.course.id'}) { @@ -2279,12 +2292,12 @@ sub screen_header { &Apache::lonnet::allowed('pch', $ENV{'request.course.id'}. ($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) { - $discussoptions=' '. &mt('Contribution to course discussion of resource'); - $discussoptions.='
    '. + $discussoptions.='
    '; } } if ($msgoptions) { $msgoptions='

    '.&mt('Sending Messages').'

    '.$msgoptions; } @@ -2320,7 +2333,7 @@ sub clear_out_html { # %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, SUB=>1, SUP=>1, SPAN=>1, + M=>1, ALGEBRA=>1, SUB=>1, SUP=>1, SPAN=>1, H1=>1, H2=>1, H3=>1, H4=>1, H5=>1); } # Do the substitution of everything that is not explicitly allowed @@ -2570,9 +2583,11 @@ sub show_preview { my $subject=&clear_out_html($ENV{'form.subject'}); $subject=~s/\n/\
    /g; $subject=&Apache::lontexconvert::msgtexconverted($subject); - $r->print('
    '. - 'Subject: '.$subject.'

    '. - $message.'
    '); + my $html=&Apache::lonxml::xmlbegin(); + $r->print($html.''. + '
    '. + 'Subject: '.$subject.'

    '. + $message.'
    '); } sub generate_preview_button { @@ -2604,8 +2619,9 @@ sub modify_attachments { &extract_attachments($attachmenturls,$idx,$numoldver,\$msg,\%attachments,\%currattach,$currdelold); } &Apache::lonenc::check_encrypt(\$symb); + my $html=&Apache::lonxml::xmlbegin(); $r->print(< +$html Managing Attachments