version 1.7, 2004/08/05 23:21:49
|
version 1.8, 2004/12/13 20:01:09
|
Line 158 sub handler {
|
Line 158 sub handler {
|
my $allowed=&Apache::lonnet::allowed('mdc',$ENV{'request.course.id'}); |
my $allowed=&Apache::lonnet::allowed('mdc',$ENV{'request.course.id'}); |
unless ($allowed) { |
unless ($allowed) { |
$r->print("<html><head><title>The LearningOnline Network with CAPA</title></head>"); |
$r->print("<html><head><title>The LearningOnline Network with CAPA</title></head>"); |
$r->print(&Apache::loncommon::bodytag('Import IMS package')); |
$r->print(&Apache::loncommon::bodytag('Import IMS package',undef,'',1)); |
$r->print('<h3>'.&mt('Modification of Course Contents Disallowed').'</h3>'.&mt('Your current role does not grant you the right to modify course content in this course.').'</body></html>'); |
$r->print('<h3>'.&mt('Modification of Course Contents Disallowed').'</h3>'.&mt('Your current role does not grant you the right to modify course content in this course.').'</body></html>'); |
return OK; |
return OK; |
} |
} |
Line 187 $javascript
|
Line 187 $javascript
|
</head> |
</head> |
ENDHEAD |
ENDHEAD |
# -------------------------------------------------------------------- Body tag |
# -------------------------------------------------------------------- Body tag |
$r->print(&Apache::loncommon::bodytag('Import IMS package')); |
$r->print(&Apache::loncommon::bodytag('Import IMS package',undef,'',1)); |
if ($ENV{'form.phase'} eq 'one') { |
if ($ENV{'form.phase'} eq 'one') { |
&display_one($r); |
&display_one($r); |
} elsif ($ENV{'form.phase'} eq 'two') { |
} elsif ($ENV{'form.phase'} eq 'two') { |
Line 542 sub display_three {
|
Line 542 sub display_three {
|
if (defined($ENV{'form.foldername'}) ) { |
if (defined($ENV{'form.foldername'}) ) { |
$foldername = $ENV{'form.foldername'}; |
$foldername = $ENV{'form.foldername'}; |
} |
} |
|
|
foreach my $area (@{$areas}) { |
foreach my $area (@{$areas}) { |
if (defined($ENV{"form.$area"}) ) { |
if (defined($ENV{"form.$area"}) && ($ENV{'form.'.$area} ne '')) { |
if ($cms eq 'angel' && $area eq 'doc') { |
if ($cms eq 'angel' && $area eq 'doc') { |
foreach (@{$cmsmap{$cms}{$area}}) { |
foreach (@{$cmsmap{$cms}{$area}}) { |
$imports{$_} = 1; |
$imports{$_} = 1; |
Line 590 sub display_three {
|
Line 590 sub display_three {
|
my @topnames = (); |
my @topnames = (); |
my @packages = (); |
my @packages = (); |
|
|
&Apache::imsprocessor::process_resinfo($cms,'DOCS',$tempdir,$destdir,\%items,\%resources,\@boards,\@announcements,\@quizzes,\@surveys,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles,\@packages,\%hrefs); |
&Apache::imsprocessor::process_resinfo($cms,'DOCS',$tempdir,$destdir,\%items,\%resources,\@boards,\@announcements,\@quizzes,\@surveys,\@groups,\%messages,\@timestamp,\%boardnum,\%resinfo,$udom,$uname,$cdom,$crs,$db_handling,$user_handling,\%total,$seqstem,$seqstem,\@resrcfiles,\@packages,\%hrefs,\@pages,\@sequences); |
|
|
my $copy_result = &Apache::imsprocessor::copy_resources('DOCS',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow); |
my $copy_result = &Apache::imsprocessor::copy_resources('DOCS',$cms,\%hrefs,$tempdir,\@targets,\%urls,$crs,$cdom,$chome,$destdir,$timenow); |
|
|
Line 630 sub display_three {
|
Line 630 sub display_three {
|
$Apache::lonratedt::order[0]=1; |
$Apache::lonratedt::order[0]=1; |
$Apache::lonratedt::resources[1]=''; |
$Apache::lonratedt::resources[1]=''; |
} |
} |
my ($errtext,$fatal)=&Apache::londocs::group_import($crs, $cdom, $folder,@imports); |
my ($errtext,$fatal)=&Apache::londocs::group_import($crs,$cdom,$folder,'sequence','imsimport',@imports); |
if ($fatal) { |
if ($fatal) { |
print STDERR "Fatal error during group_import\n"; |
print STDERR "Fatal error during group_import\n"; |
} |
} |
Line 670 ENDBLOCK
|
Line 670 ENDBLOCK
|
<input type="button" value="|; |
<input type="button" value="|; |
$initblock .= &mt('re-initializing course'); |
$initblock .= &mt('re-initializing course'); |
$initblock .= qq|" onClick="javascript:init(this.form)"/>|; |
$initblock .= qq|" onClick="javascript:init(this.form)"/>|; |
$initblock .= &mt('or the next time you log in.'); |
$initblock .= ', '.&mt('or the next time you log in.'); |
$initblock .= qq|</font></h3></form>|; |
$initblock .= qq|</font></h3></form>|; |
$r->print($initblock); |
$r->print($initblock); |
$r->print(<<ENDBLOCKTWO); |
$r->print(<<ENDBLOCKTWO); |