Diff for /loncom/interface/lonfeedback.pm between versions 1.98 and 1.99

version 1.98, 2004/07/05 22:54:33 version 1.99, 2004/07/09 23:05:52
Line 382  sub list_discussion { Line 382  sub list_discussion {
     $discussion .= '&previous='.$prevread;      $discussion .= '&previous='.$prevread;
  }   }
  $discussion .='">'.&mt('Chronological View').'</a>&nbsp;&nbsp;</td>';   $discussion .='">'.&mt('Chronological View').'</a>&nbsp;&nbsp;</td>';
     }       }
     if ($newpostsflag) {      if ($newpostsflag) {
  if (!$markondisp) {   if (!$markondisp) {
     $discussion .='<td align="right"><a href="/adm/feedback?markread='.$ressymb.'">'.&mt('Mark new posts as read').'</a>&nbsp;&nbsp;';      $discussion .='<td align="right"><a href="/adm/feedback?markread='.$ressymb.'">'.&mt('Mark new posts as read').'</a>&nbsp;&nbsp;';
Line 1136  sub handler { Line 1136  sub handler {
 # --------------------------- Get query string for limited number of parameters  # --------------------------- Get query string for limited number of parameters
   
   &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
          ['hide','unhide','deldisc','postdata','preview','replydisc','threadedon','threadedoff','onlyunread','allposts','previous','markread','markonread','markondisp','modifydisp','changes']);           ['hide','unhide','deldisc','postdata','preview','replydisc','threadedon','threadedoff','onlyunread','allposts','previous','markread','markonread','markondisp','modifydisp','changes','navmaps','navurl']);
   if ($ENV{'form.modifydisp'}) {    if ($ENV{'form.navmaps'}) {
         my %discinfo = ();
         my @resources = ();
         if ($ENV{'form.navmaps'} =~ /:/) {
             @resources = split/:/,$ENV{'form.navmaps'};
         } else {
             @resources = ("$ENV{'form.navmaps'}");
         }
         my $numitems = @resources;
         my $feedurl = '/adm/navmaps';
         if ($ENV{'form.navurl'}) {
             $feedurl .= '?'.$ENV{'form.navurl'};
         }
         my %lt = &Apache::lonlocal::texthash(
             'mnpa' => 'Marked "New" posts as read in a total of',
             'robb' => 'resources/bulletin boards.'
         );       
         foreach (@resources) {
   # backward compatibility (bulletin boards used to be 'wrapped')
             my $ressymb=$_;
             if ($ressymb =~ m/bulletin___\d+___/) {
                 unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
                     $ressymb=~s|(bulletin___\d+___)|$1adm/wrapper/|;
                 }
             }
             my $lastkey = $ressymb.'_lastread';
             $discinfo{$lastkey} = time;
         }
         &Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss',\%discinfo,$ENV{'user.domain'},$ENV{'user.name'});
         &Apache::loncommon::content_type($r,'text/html');
         $r->send_http_header;
         $r->print (<<ENDREDIR);
   <html>
   <head>
   <title>New posts marked as read</title>
   <meta http-equiv="pragma" content="no-cache" />
   <meta HTTP-EQUIV="Refresh" CONTENT="2; url=$feedurl" />
   </head>
   <body bgcolor="#FFFFFF" onLoad='if (window.name!="loncapaclient") { this.document.reldt.submit(); self.close(); }'>
   <img align="right" src="/adm/lonIcons/lonlogos.gif" />
   <b>$lt{'mnpa'} $numitems $lt{'robb'}</b>
   <form name="reldt" action="$feedurl" target="loncapaclient">
   </form>
   </body>
   </html>
   ENDREDIR
         return OK;
     } elsif ($ENV{'form.modifydisp'}) {
       &Apache::loncommon::content_type($r,'text/html');        &Apache::loncommon::content_type($r,'text/html');
       $r->send_http_header;        $r->send_http_header;
       my $symb=$ENV{'form.modifydisp'};        my $symb=$ENV{'form.modifydisp'};

Removed from v.1.98  
changed lines
  Added in v.1.99


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>