--- loncom/imspackages/imsimport.pm 2005/11/08 17:58:22 1.13 +++ loncom/imspackages/imsimport.pm 2006/03/27 19:05:15 1.18 @@ -38,6 +38,15 @@ use File::Basename(); # ---------------------------------------------------------------- Jscript One sub jscript_one { my ($fullpath,$jsref) = @_; + + my $start_page = + &Apache::loncommon::start_page('Create IMS import directory',undef, + {'only_body' => 1, + 'add_entries' => "topmargin='0' leftmargin='0' marginheight='0'marginwidth='0' rightmargin='0'", + 'js_ready' => 1,}); + my $end_page = + &Apache::loncommon::end_page({'js_ready' => 1,}); + $$jsref = <<"END_OF_ONE"; function verify() { if ((document.forms.dataForm.newdir.value == '') || (!document.forms.dataForm.newdir.value)) { @@ -61,22 +70,22 @@ function createWin() { document.dataForm.newdir.value = ""; newWindow = window.open("","CreateDir","HEIGHT=400,WIDTH=750,scrollbars=yes") newWindow.document.open() - newWindow.document.write("Create IMS import directory\\n") - newWindow.document.write("\\n") - newWindow.document.write("[Author Header]\\n") + newWindow.document.write('$start_page') + newWindow.document.write("\\n[Author Header]\\n") newWindow.document.write("\\n") newWindow.document.write("\\n") newWindow.document.write("\\n") newWindow.document.write("\\n") newWindow.document.write("\\n") - newWindow.document.write("
  

Location: $fullpath

New Directory

  
\\n") newWindow.document.write("Enter the name of the new directory where you will store the contents of your IMS package.

") - newWindow.document.write("") - newWindow.document.write("") - newWindow.document.write("") - newWindow.document.write("$fullpath") + newWindow.document.write("") + newWindow.document.write("") + newWindow.document.write("") + newWindow.document.write("$fullpath") newWindow.document.write("") newWindow.document.write("
") + newWindow.document.write("") + newWindow.document.write('$end_page') newWindow.document.close() newWindow.focus() } @@ -291,11 +300,11 @@ sub display_one { Please choose the CMS used to create your IMS content package.   @@ -318,7 +327,7 @@ Please choose the CMS used to create you   -Please choose a destination LON-CAPA directory in which to store the contents of the IMS package file. +Please choose a destination LON-CAPA directory in which to store the contents of the IMS package file. @@ -330,9 +339,9 @@ Please choose a destination LON-CAPA dir - - - + + + @@ -343,10 +352,10 @@ Please choose a destination LON-CAPA dir
- + - +
@@ -402,7 +411,7 @@ sub display_two { $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'choose',\%includedres,\%includeditems); if ($manifest_result eq 'ok') { foreach my $res (sort keys %resources) { - if ($cms eq 'bb5' || $cms eq 'bb6' || $cms eq 'webct4') { + if ($cms eq 'bb5' || $cms eq 'bb6' || $cms eq 'webctce4') { foreach my $area (keys %{$$cmsmap{$cms}}) { if ($resources{$res}{type} eq $$cmsmap{$cms}{$area}) { $count{$area} ++; @@ -481,13 +490,13 @@ ENDBLOCK if ($area eq 'board') { $r->print("    "); } elsif ($area eq 'users') { $r->print("    "); @@ -534,7 +543,7 @@ ENDBLOCKTWO

Choose course:   @@ -578,10 +587,10 @@ ENDBLOCK
- + - +
@@ -860,10 +869,13 @@ sub handler { } elsif ($env{'form.phase'} eq 'four') { &jscript_three(\$javascript); } - $r->print("LON-CAPA Construction Space\n"); - - $r->print(&Apache::loncommon::bodytag('Upload IMS package to Construction Space',undef,$loadentries)); - + $javascript = "\n"; + + my $title = 'Upload IMS package to Construction Space'; + $r->print(&Apache::loncommon::start_page($title, $javascript, + {'add_entries' => + $loadentries,})); + if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { $r->print('

'.&mt('Co-Author').': '.$uname. &mt(' at ').$udom.'

'); @@ -887,7 +899,7 @@ sub handler { } else { &Apache::lonupload::phaseone($r,$fn,$uname,$udom,'imsimport'); } - $r->print(''); + $r->print(&Apache::loncommon::end_page()); return OK; } 1;