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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 21 Sep 2004 20:44:16 -0000


albertel		Tue Sep 21 16:44:16 2004 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm lonfeedback.pm 
  Log:
  - always pass navtime
  - mark posts read as of navtime 
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.296 loncom/interface/lonnavmaps.pm:1.297
--- loncom/interface/lonnavmaps.pm:1.296	Tue Sep 21 16:33:49 2004
+++ loncom/interface/lonnavmaps.pm	Tue Sep 21 16:44:16 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.296 2004/09/21 20:33:49 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.297 2004/09/21 20:44:16 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1560,9 +1560,11 @@
 	&add_linkitem($args->{'linkitems'},'clearbubbles',
 		      'document.clearbubbles.submit()',
 		      'Mark all posts read');
+	my $time=time;
 	$result .= (<<END);
     <form name="clearbubbles" method="post" action="/adm/feedback">
 	<input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" />
+	<input type="hidden" name="navtime" value="$time" />
 END
         if ($args->{'sort'} eq 'discussion') { 
 	    my $totdisc = 0;
@@ -1588,13 +1590,8 @@
     </form>
 END
             }
-	} else {
-	    my $time=time;
-	    $result .= (<<END);
-	<input type="hidden" name="navtime" value="$time" />
-    </form>
-END
-        }
+	}
+	$result.='</form>';
     }
 
     if ($args->{'caller'} eq 'navmapsdisplay') {
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.126 loncom/interface/lonfeedback.pm:1.127
--- loncom/interface/lonfeedback.pm:1.126	Wed Sep 15 02:17:11 2004
+++ loncom/interface/lonfeedback.pm	Tue Sep 21 16:44:16 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.126 2004/09/15 06:17:11 albertel Exp $
+# $Id: lonfeedback.pm,v 1.127 2004/09/21 20:44:16 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2728,7 +2728,7 @@
 # --------------------------- Get query string for limited number of parameters
 
   &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
-         ['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','threadedon','threadedoff','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navmaps','navurl','sortfilter','sortposts','applysort','rolefilter','statusfilter','sectionpick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export']);
+         ['hide','unhide','deldisc','postdata','preview','replydisc','editdisc','threadedon','threadedoff','onlyunread','allposts','onlyunmark','previous','markread','markonread','markondisp','toggoff','toggon','modifydisp','changes','navmaps','navurl','navtime','sortfilter','sortposts','applysort','rolefilter','statusfilter','sectionpick','posterlist','userpick','attach','origpage','currnewattach','deloldattach','keepold','allversions','export']);
   if ($ENV{'form.discsymb'}) {
       my $symb = $ENV{'form.discsymb'};
       my $readkey = $symb.'_read';
@@ -2901,7 +2901,7 @@
               }
           }
           my $lastkey = $ressymb.'_lastread';
-          $discinfo{$lastkey} = time;
+          $discinfo{$lastkey} = $ENV{'form.navtime'};
       }
       &Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss',\%discinfo,$ENV{'user.domain'},$ENV{'user.name'});
       &Apache::loncommon::content_type($r,'text/html');