--- loncom/publisher/testbankimport.pm 2005/04/07 06:56:27 1.6
+++ loncom/publisher/testbankimport.pm 2009/05/06 13:13:00 1.23
@@ -1,5 +1,5 @@
# Handler for parsing text upload problem descriptions into .problems
-# $Id: testbankimport.pm,v 1.6 2005/04/07 06:56:27 albertel Exp $
+# $Id: testbankimport.pm,v 1.23 2009/05/06 13:13:00 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -30,12 +30,17 @@ use strict;
use Apache::Constants qw(:common :http :methods);
use Apache::loncacc;
use Apache::loncommon();
-use Apache::Log();
use Apache::lonnet;
use HTML::Entities();
use Apache::lonlocal;
use Apache::lonupload;
+use Apache::londocs;
use File::Basename();
+use LONCAPA();
+use File::MMagic;
+use XML::DOM;
+use RTF::HTMLConverter;
+use HTML::TokeParser;
# ---------------------------------------------------------------- Display Control
sub display_control {
@@ -56,6 +61,45 @@ sub calculate_page($$) {
return 0 if $dir eq 'BackToStart';
}
+sub jscript_zero {
+ my ($webpath,$jsref) = @_;
+ my $start_page =
+ &Apache::loncommon::start_page('Create Testbank directory',undef,
+ {'only_body' => 1,
+ 'js_ready' => 1,});
+ my $end_page =
+ &Apache::loncommon::end_page({'js_ready' => 1,});
+ my %lt = &Apache::lonlocal::texthash(
+ loca => 'Location',
+ newd => 'New Directory',
+ ente => 'Enter the name of the new directory where you will save the converted testbank questions',
+ go => 'Go',
+ );
+ $$jsref = <<"END_SCRIPT";
+function createWin() {
+ document.info.newdir.value = "";
+ newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes")
+ newWindow.document.open()
+ newWindow.document.write('$start_page')
+ newWindow.document.write("\\n")
+ newWindow.document.write("
\\n") - newWindow.document.write(" | Location: $fullpathNew Directory | |
\\n") - newWindow.document.write(" |