--- loncom/interface/loncommon.pm 2014/12/20 15:35:40 1.1203 +++ loncom/interface/loncommon.pm 2014/12/21 16:26:31 1.1204 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1203 2014/12/20 15:35:40 raeburn Exp $ +# $Id: loncommon.pm,v 1.1204 2014/12/21 16:26:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -14613,6 +14613,17 @@ sub init_user_environment { } } 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'}