--- loncom/imspackages/imsimportdocs.pm 2014/12/11 00:35:53 1.34 +++ loncom/imspackages/imsimportdocs.pm 2018/05/02 17:06:45 1.37 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: imsimportdocs.pm,v 1.34 2014/12/11 00:35:53 raeburn Exp $ +# $Id: imsimportdocs.pm,v 1.37 2018/05/02 17:06:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -36,6 +36,7 @@ use Apache::imsprocessor; use LONCAPA::map(); use lib '/home/httpd/lib/perl/'; use LONCAPA; +use File::Path(); use strict; @@ -396,10 +397,6 @@ sub display_two { my $folder = $env{'form.folder'}; my $cms = $env{'form.source'}; my $tempdir = $env{'form.tempdir'}; - my $longcrs = ''; - if ($crs =~ m/^(\d)(\d)(\d)/) { - $longcrs = $1.'/'.$2.'/'.$3.'/'.$crs; - } my %importareas = (); my %includedres = (); my %includeditems = (); @@ -548,7 +545,7 @@ sub display_two { } } if ($tempdir =~ m/^\/home\/httpd\/perl\/tmp\/$crs\/\d{10}/) { - system("rm -r -f $tempdir"); + &File::Path::remove_tree($tempdir,{ safe => 1 }); } # All done, display success message @@ -562,8 +559,12 @@ sub display_two { ''; + my $windowname = 'loncapaclient'; + if ($env{'request.lti.login'}) { + $windowname .= 'lti'; + } $r->print( - '
' + '' .'' .'' .''