[LON-CAPA-cvs] cvs: loncom(version_1_2_X) /interface lonfeedback.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 15 Sep 2004 20:35:16 -0000


albertel		Wed Sep 15 16:35:16 2004 EDT

  Modified files:              (Branch: version_1_2_X)
    /loncom/interface	lonfeedback.pm 
  Log:
  - eliminating the visit counting for 1.2, will return in an improved form in 1.3 and right now it is just slowin things down
  
  
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.99.2.7 loncom/interface/lonfeedback.pm:1.99.2.8
--- loncom/interface/lonfeedback.pm:1.99.2.7	Wed Sep 15 16:29:37 2004
+++ loncom/interface/lonfeedback.pm	Wed Sep 15 16:35:16 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.99.2.7 2004/09/15 20:29:37 albertel Exp $
+# $Id: lonfeedback.pm,v 1.99.2.8 2004/09/15 20:35:16 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -92,15 +92,13 @@
 # Get discussion display settings for this discussion
     my $lastkey = $ressymb.'_lastread';
     my $showkey = $ressymb.'_showonlyunread';
-    my $visitkey = $ressymb.'_visit';
     my $ondispkey = $ressymb.'_markondisp';
-    my %dischash = &Apache::lonnet::get('nohist_'.$ENV{'request.course.id'}.'_discuss',[$lastkey,$showkey,$visitkey,$ondispkey],$ENV{'user.domain'},$ENV{'user.name'});
+    my %dischash = &Apache::lonnet::get('nohist_'.$ENV{'request.course.id'}.'_discuss',[$lastkey,$showkey,$ondispkey],$ENV{'user.domain'},$ENV{'user.name'});
     my %discinfo = ();
     my $showonlyunread = 0;
     my $markondisp = 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.
@@ -138,13 +136,6 @@
 	}
     }
 
-    if (defined($dischash{$visitkey})) {
-	unless ($dischash{$showkey} eq '') {
-	    $visit = $dischash{$visitkey};
-	}
-    }
-    $visit ++;
-
     my $seeid=&Apache::lonnet::allowed('rin',$crs);
     my $viewgrades=(&Apache::lonnet::allowed('vgr',$crs)
 	&& ($symb=~/\.(problem|exam|quiz|assess|survey|form)$/));
@@ -169,9 +160,9 @@
     }
     
     my $now = time;
-    $discinfo{$visitkey} = $visit;
-
-    &Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss',\%discinfo,$ENV{'user.domain'},$ENV{'user.name'});
+    if (%discinfo) {
+	&Apache::lonnet::put('nohist_'.$ENV{'request.course.id'}.'_discuss',\%discinfo,$ENV{'user.domain'},$ENV{'user.name'});
+    }
 
     if ($contrib{'version'}) {
         my $oldest = $contrib{'1:timestamp'};