[LON-CAPA-cvs] cvs: loncom /interface lonbulletin.pm lonfeedback.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Wed, 05 May 2004 23:05:01 -0000


raeburn		Wed May  5 19:05:01 2004 EDT

  Modified files:              
    /loncom/interface	lonbulletin.pm lonfeedback.pm 
  Log:
  Reverting lonbulletin to v 1.120. Time of the previous visit passed in a query string retrieved in lonfeedback instead, so labelling of posts as "NEW" until user leaves board/resource works for both boards and resources.
  
  
  
Index: loncom/interface/lonbulletin.pm
diff -u loncom/interface/lonbulletin.pm:1.21 loncom/interface/lonbulletin.pm:1.22
--- loncom/interface/lonbulletin.pm:1.21	Wed May  5 17:04:14 2004
+++ loncom/interface/lonbulletin.pm	Wed May  5 19:04:57 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Bulletin Board Handler
 #
-# $Id: lonbulletin.pm,v 1.21 2004/05/05 21:04:14 raeburn Exp $
+# $Id: lonbulletin.pm,v 1.22 2004/05/05 23:04:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -42,7 +42,7 @@
     $r->send_http_header;
     return OK if $r->header_only;
 
-    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['previous']);
+#    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['previous']);
 # ------------------------------------------------------------ Print the screen
     $r->print(<<ENDDOCUMENT);
 <html>
@@ -194,7 +194,7 @@
     }
     $r->print(&Apache::lonfeedback::list_discussion
 	      ('board','OPEN','bulletin___'.$marker.'___'.
-	       $r->uri,$ENV{'form.previous'}).'</body></html>');
+	       $r->uri).'</body></html>');
     return OK;
 } 
 
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.80 loncom/interface/lonfeedback.pm:1.81
--- loncom/interface/lonfeedback.pm:1.80	Wed May  5 17:04:14 2004
+++ loncom/interface/lonfeedback.pm	Wed May  5 19:04:57 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.80 2004/05/05 21:04:14 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.81 2004/05/05 23:04:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -37,7 +37,7 @@
 use Apache::lonlocal;
 
 sub list_discussion {
-    my ($mode,$status,$symb,$previous)=@_;
+    my ($mode,$status,$symb)=@_;
 #    &Apache::lonnet::logthis("status is $status");
     if (!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER'
 	  || $status eq 'OPEN')) {
@@ -71,9 +71,13 @@
     my %dischash = &Apache::lonnet::get('nohist_'.$ENV{'request.course.id'}.'_discuss',[$lastkey,$showkey,$visitkey],$ENV{'user.domain'},$ENV{'user.name'});
     my $showonlyunread = 0;
     my $prevread = 0;
+    my $previous = 0;
     my $visit = 0;
     my $newpostsflag = 0;
 
+# Retain identification of "NEW" posts identified in last display, if continuing 'previous' browsing of posts.
+    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['previous']);
+    $previous = $ENV{'form.previous'};
     if ($previous > 0) {
         $prevread = $previous;
     } elsif (defined($dischash{$lastkey})) {