--- loncom/publisher/testbankimport.pm 2011/11/02 23:43:37 1.33 +++ loncom/publisher/testbankimport.pm 2012/12/16 20:06:44 1.37 @@ -1,5 +1,5 @@ # Handler for parsing text upload problem descriptions into .problems -# $Id: testbankimport.pm,v 1.33 2011/11/02 23:43:37 raeburn Exp $ +# $Id: testbankimport.pm,v 1.37 2012/12/16 20:06:44 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -28,7 +28,6 @@ package Apache::testbankimport; use strict; use Apache::Constants qw(:common :http :methods); -use Apache::loncacc; use Apache::loncommon(); use Apache::lonnet; use HTML::Entities(); @@ -490,7 +489,7 @@ sub display_zero { if ($fn eq '') { $r->print(''.&mt('Incomplete file upload').' '.&mt('Return to the [_1]construction space menu[_2] to upload a file','','')); } - $r->print(&mt('The Testbank Upload utility can be used by LON-CAPA authors to generate LON-CAPA problem files from a testbank file of questions/answers.').'
'. + $r->print(&mt('The [_1]Testbank Upload[_2] utility can be used by LON-CAPA authors to generate LON-CAPA problem files from a testbank file of questions/answers.','','').'
'. &mt('The following question types can be converted:').' '. &page_footer($env{'form.newdir'},$fn,$page).' @@ -1579,6 +1578,7 @@ sub create_ess { if (open(PROB,">$destdir$libfile")) { print PROB $output; close(PROB); + $result = 'ok'; } else { $result = 'failed'; } @@ -1775,7 +1775,7 @@ sub build_image_url { sub print_header { my ($uname,$udom,$javascript,$loadentries,$title,$current_page,$pagesref, $namesref) = @_; - my $brcrum = [{'href' => &Apache::loncommon::authorspace(), + my $brcrum = [{'href' => &Apache::loncommon::authorspace("/priv/$udom/$uname/"), 'text' => 'Construction Space'}]; if ($env{'form.phase'} eq 'three') { if (ref($pagesref) eq 'ARRAY') { @@ -1827,7 +1827,7 @@ sub handler { return HTTP_NOT_FOUND; } - my ($uname,$udom) = &Apache::loncacc::constructaccess($fn); + my ($uname,$udom) = &Apache::lonnet::constructaccess($fn); if (($uname eq '') || ($udom eq '')) { $r->log_reason($uname.':'.$udom.' trying to convert testbank file '. $fn.' - not authorized',$r->filename);