[LON-CAPA-cvs] cvs: rat / lonuserstate.pm

www lon-capa-cvs@mail.lon-capa.org
Mon, 07 Oct 2002 19:00:43 -0000


www		Mon Oct  7 15:00:43 2002 EDT

  Modified files:              
    /rat	lonuserstate.pm 
  Log:
  Checks for versioning privileges
  
  
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.44 rat/lonuserstate.pm:1.45
--- rat/lonuserstate.pm:1.44	Mon Oct  7 09:50:36 2002
+++ rat/lonuserstate.pm	Mon Oct  7 15:00:43 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construct and maintain state and binary representation of course for user
 #
-# $Id: lonuserstate.pm,v 1.44 2002/10/07 13:50:36 www Exp $
+# $Id: lonuserstate.pm,v 1.45 2002/10/07 19:00:43 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -68,11 +68,11 @@
 my $errtext; # variable with all errors
 my $retfurl; # variable with the very first URL in the course
 my %randompick; # randomly picked resources
-my %actualversion # version of resource as loaded now
-my %setversion # forced version of resource
-my %lastversion # version when CC came in last
-my $versionmode # how versioning is handled in this course
-my $hasversionpriv # user has versioning privileges
+my %actualversion; # version of resource as loaded now
+my %setversion; # forced version of resource
+my %lastversion; # version when CC came in last
+my $versionmode; # how versioning is handled in this course
+
 # --------------------------------------------------------- Loads map from disk
 
 sub loadmap { 
@@ -484,6 +484,10 @@
         &traceroute('0',$hash{'map_start_'.$uri},'&');
         &accinit($uri,$short,$fn);
         &pickrandom();
+    }
+# ------------------------------------------------------------ Version tracking
+    if (&Apache::lonnet::allowed('srm',$ENV{'request.course.id'})) {
+	&Apache::lonnet::logthis('Will be version tracking');
     }
     unless ((untie(%hash)) && (untie(%parmhash))) {
       &Apache::lonnet::logthis("<font color=blue>WARNING: ".