--- loncom/interface/loncommon.pm 2014/12/21 16:42:38 1.1075.2.83 +++ loncom/interface/loncommon.pm 2014/12/21 16:58:11 1.1075.2.84 @@ -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 @@ 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'} @@ -15265,7 +15276,6 @@ sub search_courses { return %courses; } - =pod =back