[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 06 Dec 2005 10:21:18 -0000


albertel		Tue Dec  6 05:21:18 2005 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - reset the counter evertime when looking at resources in CSTR
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.390 loncom/xml/lonxml.pm:1.391
--- loncom/xml/lonxml.pm:1.390	Thu Nov 17 15:04:19 2005
+++ loncom/xml/lonxml.pm	Tue Dec  6 05:21:18 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.390 2005/11/17 20:04:19 albertel Exp $
+# $Id: lonxml.pm,v 1.391 2005/12/06 10:21:18 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -961,7 +961,10 @@
 }
 
 sub init_counter {
-    if (defined($env{'form.counter'})) {
+    if ($env{'request.state'} eq 'construct') {
+	$Apache::lonxml::counter=1;
+	$Apache::lonxml::counter_changed=1;
+    } elsif (defined($env{'form.counter'})) {
 	$Apache::lonxml::counter=$env{'form.counter'};
 	$Apache::lonxml::counter_changed=0;
     } else {