--- loncom/imspackages/imsimport.pm 2010/09/26 02:10:49 1.33 +++ loncom/imspackages/imsimport.pm 2012/10/04 14:00:22 1.37 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: imsimport.pm,v 1.33 2010/09/26 02:10:49 raeburn Exp $ +# $Id: imsimport.pm,v 1.37 2012/10/04 14:00:22 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -43,7 +43,7 @@ use LONCAPA; # ---------------------------------------------------------------- Jscript One sub jscript_one { - my ($fullpath,$jsref,$formname) = @_; + my ($fullpath,$formname) = @_; my %body_layout = ('rightmargin' => "0", 'leftmargin' => "0", @@ -66,7 +66,7 @@ sub jscript_one { nndi => 'Enter the name of the new directory where you will store the contents of your IMS package.', go => 'Go', ); - $$jsref = <<"END_OF_ONE"; + return <<"END_OF_ONE"; function verify() { if ((document.forms.$formname.newdir.value == '') || (!document.forms.$formname.newdir.value)) { alert('$lt{'ddir'}') @@ -115,7 +115,7 @@ END_OF_ONE # ---------------------------------------------------------------- Jscript Two sub jscript_two { - my ($javascript,$user,$dom,$numcrs) = @_; + my ($user,$dom,$numcrs) = @_; my %crsentry = (); my $course_list; my $title_list; @@ -134,7 +134,7 @@ sub jscript_two { $course_list = '"'.join('","',@crslist).'"'; $$numcrs = @crslist; - $$javascript = qq# + return <<"END_OF_TWO"; function checkCourse() { courseID_array = new Array($course_list) @@ -280,18 +280,13 @@ function nextPage(caller) { } } -#; +END_OF_TWO } -# ---------------------------------------------------------------- Jscript Three -sub jscript_three { - my $javascript = shift; -} - # ---------------------------------------------------------------- Display One sub display_one { - my ($r,$uname,$fn,$fullpath,$formname) = @_; + my ($r,$fn,$fullpath,$formname) = @_; $r->print('