")
+ newWindow.document.write("")
+ newWindow.document.write('$end_page')
newWindow.document.close()
newWindow.focus()
}
@@ -292,11 +300,12 @@ sub display_one {
Please choose the CMS used to create your IMS content package.
@@ -319,7 +328,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.
@@ -331,9 +340,9 @@ Please choose a destination LON-CAPA dir
-
-
-
+
+
+
@@ -344,10 +353,10 @@ Please choose a destination LON-CAPA dir
-
+
-
+
@@ -400,10 +409,13 @@ sub display_two {
my $conditions;
if ($unzip_result eq 'ok') {
- $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'choose',\%includedres,\%includeditems);
+ $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'
+ || $cms eq 'webctvista4') {
foreach my $area (keys %{$$cmsmap{$cms}}) {
if ($resources{$res}{type} eq $$cmsmap{$cms}{$area}) {
$count{$area} ++;
@@ -482,13 +494,13 @@ ENDBLOCK
if ($area eq 'board') {
$r->print("
");
} elsif ($area eq 'users') {
$r->print("
");
@@ -535,7 +547,7 @@ ENDBLOCKTWO
Choose course:
@@ -579,10 +591,10 @@ ENDBLOCK
-
+
-
+
@@ -606,14 +618,12 @@ sub display_three {
my ($r,$uname,$udom,$areas,$areaname,$cmsmap,$destdir,$newdir) = @_;
my $crs = '';
my $cdom = '';
- my $chome = '';
my $db_handling = '';
my $timenow = time;
my $announce_handling = 'ok';
my $cms = $env{'form.source'};
if ( defined($env{'form.bb_crs'}) ) {
($cdom,$crs) = split/\//,$env{'form.bb_crs'};
- $chome = &Apache::lonnet::homeserver($crs,$cdom);
}
my $user_crs = '';
my $user_cdom = '';
@@ -644,6 +654,7 @@ sub display_three {
my @pages = ();
my @sequences = ();
my @resrcfiles = ();
+ my @assessmentfiles = ();
my $tempdir = $env{'form.tempdir'};
@@ -664,11 +675,18 @@ sub display_three {
}
}
- my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'prepare',\%includedres);
+ my $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,
+ \%resources,\%items,\%hrefs,\%resinfo,'prepare',
+ \%includedres);
if ($manifest_result eq 'ok') {
foreach my $res (sort keys %resources) {
if ($importareas{$resources{$res}{type}}) {
$includedres{$res} = 1;
+ if ($resources{$res}{type} eq 'webct.manifest' ||
+ $resources{$res}{type} eq 'webct.assessment' ||
+ $resources{$res}{type} eq 'webct.question') {
+ push(@assessmentfiles,$res);
+ }
}
}
foreach my $itm (sort keys %items) {
@@ -680,7 +698,9 @@ sub display_three {
&Apache::imsprocessor::get_parents(\%includeditems,\%items,$itm);
}
- $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,\%resources,\%items,\%hrefs,\%resinfo,'build',\%includedres,\%includeditems);
+ $manifest_result = &Apache::imsprocessor::process_manifest($cms,$tempdir,
+ \%resources,\%items,\%hrefs,\%resinfo,'build',
+ \%includedres,\%includeditems);
if ($manifest_result eq 'ok') {
&Apache::imsprocessor::target_resources(\%resources,\%importareas,\@targets);
@@ -699,7 +719,7 @@ sub display_three {
&Apache::imsprocessor::process_resinfo($cms,'CSTR',$tempdir,$destdir,\%items,\%resources,\@targets,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles,\@packages,\%hrefs,\@pages,\@sequences,\%randompicks);
- my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow,\%importareas);
+ my $copy_result = &Apache::imsprocessor::copy_resources('CSTR',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$destdir,$timenow,\%importareas,\@assessmentfiles);
&Apache::imsprocessor::build_structure($cms,'CSTR',$destdir,\%items,\%resinfo,\%resources,\@targets,\%hrefs,$udom,$uname,$newdir,$timenow,$cdom,$crs,\@timestamp,\%total,\@boards,\@announcements,\@quizzes,\@surveys,\@pools,\%boardnum,\@pages,\@sequences,\@topurls,\@topnames,\@packages,\%includeditems,\%randompicks);
@@ -863,10 +883,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.'