[LON-CAPA-cvs] cvs: loncom / lond

raeburn raeburn at source.lon-capa.org
Fri Oct 5 11:15:53 EDT 2012


raeburn		Fri Oct  5 15:15:53 2012 EDT

  Modified files:              
    /loncom	lond 
  Log:
  - Update internal.contentchange in course's environment.db whenever a change 
    is made to folders in Main course documents on a pre-2.11 server.
    (On 2.11 and later, update not required on lond side, as session hoster
     performs the update via lonnet.pm). 
  
  
Index: loncom/lond
diff -u loncom/lond:1.494 loncom/lond:1.495
--- loncom/lond:1.494	Tue Jul 17 14:49:39 2012
+++ loncom/lond	Fri Oct  5 15:15:52 2012
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.494 2012/07/17 14:49:39 droeschl Exp $
+# $Id: lond,v 1.495 2012/10/05 15:15:52 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -61,7 +61,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.494 $'; #' stupid emacs
+my $VERSION='$Revision: 1.495 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -2370,6 +2370,24 @@
 		unlink($transname);
 		&Failure($client, "failed\n", $userinput);
 	    } else {
+                if ($fname =~ /^default.+\.(page|sequence)$/) {
+                    my ($major,$minor) = split(/\./,$clientversion);
+                    if (($major < 2) || ($major == 2 && $minor < 11)) {
+                        my $now = time;
+                        &Apache::lonnet::do_cache_new('crschange',$udom.'_'.$uname,$now,600);
+                        my $key = &escape('internal.contentchange');
+                        my $what = "$key=$now";
+                        my $hashref = &tie_user_hash($udom,$uname,'environment',
+                                                     &GDBM_WRCREAT(),"P",$what);
+                        if ($hashref) {
+                            $hashref->{$key}=$now;
+                            if (!&untie_user_hash($hashref)) {
+                                &logthis("error: ".($!+0)." untie (GDBM) failed ".
+                                         "when updating internal.contentchange");
+                            }
+                        }
+                    }
+                }
 		&Reply($client, "ok\n", $userinput);
 	    }
 	}   




More information about the LON-CAPA-cvs mailing list