--- loncom/publisher/testbankimport.pm 2011/03/05 22:25:09 1.30 +++ loncom/publisher/testbankimport.pm 2011/10/23 01:27:34 1.31 @@ -1,5 +1,5 @@ # Handler for parsing text upload problem descriptions into .problems -# $Id: testbankimport.pm,v 1.30 2011/03/05 22:25:09 raeburn Exp $ +# $Id: testbankimport.pm,v 1.31 2011/10/23 01:27:34 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1853,9 +1853,8 @@ sub handler { $r->send_http_header; my ($filename,$pathname) = &File::Basename::fileparse($fn); - my $webpath = '/priv/'.$uname.$pathname; - my $urlpath = '/~'.$uname.$pathname; - my $dirpath = '/home/'.$uname.'/public_html'.$pathname; + my $webpath = '/priv/'.$udom.'/'.$uname.$pathname; + my $dirpath = $r->dir_config('lonDocRoot').$webpath; my ($res,$subdir,$badfile,$textref,$header,$css,$js,%loadentries,@pages,%names); if ($env{'form.phase'} eq 'three') { @@ -1877,7 +1876,7 @@ sub handler { } } ($res,$badfile,$textref,$header,$css,$js) = - &parse_datafile($r,$uname,$filename,$pathname,$dirpath,$urlpath, + &parse_datafile($r,$uname,$filename,$pathname,$dirpath,$webpath, $page_name,$subdir,$env{'form.timestamp'}); if ($page_name eq 'Welcome') { &jscript_zero($webpath,\$javascript); @@ -1939,7 +1938,7 @@ sub handler { &display_zero ($r,$uname,$fn,$current_page,$webpath) if $page_name eq 'Welcome'; &display_one ($r,$uname,$fn,$current_page,$textref,$header) if $page_name eq 'Blocks'; &display_two ($r,$uname,$fn,$current_page,$textref,$header,$qcount) if $page_name eq 'Format'; - &display_three ($r,$uname,$fn,$current_page,$textref,$res,$header,$urlpath,$qcount) if $page_name eq 'Target'; + &display_three ($r,$uname,$fn,$current_page,$textref,$res,$header,$webpath,$qcount) if $page_name eq 'Target'; &final_display ($r,$uname,$fn,$current_page,$textref,$res,$header,$css,$js,$webpath,$dirpath,$subdir) if $page_name eq 'Confirmation'; } } elsif ($env{'form.phase'} eq 'two') {