[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Sun Dec 21 11:58:12 EST 2014


raeburn		Sun Dec 21 16:58:12 2014 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncommon.pm 
  Log:
  - For 2.11
    - Backport 1.1204 
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.83 loncom/interface/loncommon.pm:1.1075.2.84
--- loncom/interface/loncommon.pm:1.1075.2.83	Sun Dec 21 16:42:38 2014
+++ loncom/interface/loncommon.pm	Sun Dec 21 16:58:11 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1075.2.83 2014/12/21 16:42:38 raeburn Exp $
+# $Id: loncommon.pm,v 1.1075.2.84 2014/12/21 16:58:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -14549,6 +14549,17 @@
 		}
 	    }
 	    closedir(DIR);
+# If there is a undeleted lockfile for the user's paste buffer remove it.
+            my $namespace = 'nohist_courseeditor';
+            my $lockingkey = 'paste'."\0".'locked_num';
+            my %lockhash = &Apache::lonnet::get($namespace,[$lockingkey],
+                                                $domain,$username);
+            if (exists($lockhash{$lockingkey})) {
+                my $delresult = &Apache::lonnet::del($namespace,[$lockingkey],$domain,$username);
+                unless ($delresult eq 'ok') {
+                    &Apache::lonnet::logthis("Failed to delete paste buffer locking key in $namespace for ".$username.":".$domain." Result was: $delresult");
+                }
+            }
 	}
 # Give them a new cookie
 	my $id = ($args->{'robot'} ? 'robot'.$args->{'robot'}
@@ -15265,7 +15276,6 @@
     return %courses;
 }
 
-
 =pod
 
 =back




More information about the LON-CAPA-cvs mailing list