';
+ &Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').' ';
}
@@ -280,6 +276,15 @@ sub exportcourse {
$env{'course.'.$env{'request.course.id'}.'.domain'}, $env{'course.'.$env{'request.course.id'}.'.num'});
my $numdisc = keys(%discussiontime);
my $navmap = Apache::lonnavmaps::navmap->new();
+ if (!defined($navmap)) {
+ $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package').
+ '
IMS Export Failed
'.
+ '
'.
+ &mt('Unable to retrieve information about course contents').
+ '
'.&mt('Return to Course Editor').'');
+ &Apache::lonnet::logthis('IMS export failed - could not create navmap object in '.lc($type).':'.$env{'request.course.id'});
+ return;
+ }
my $it=$navmap->getIterator(undef,undef,undef,1,undef,undef);
my $curRes;
my $outcome;
@@ -392,10 +397,10 @@ sub exportcourse {
$display .= ''."\n";
}
if ($curRes->is_sequence()) {
- $display .= ' '."\n";
+ $display .= ' '."\n";
$lastcontainer = $count + $startcount + $boards;
} elsif ($curRes->is_page()) {
- $display .= ' '."\n";
+ $display .= ' '."\n";
$lastcontainer = $count + $startcount + $boards;
}
my $currelem = $count+$boards+$startcount;
@@ -422,7 +427,7 @@ function checkAll(field) {
field.checked = true
}
}
-
+
function uncheckAll(field) {
if (field.length > 0) {
for (i = 0; i < field.length; i++) {
@@ -437,7 +442,7 @@ function propagateCheck(item) {
if (document.exportdoc.elements[item].checked == true) {
containerCheck(item)
}
-}
+}
function containerCheck(item) {
document.exportdoc.elements[item].checked = true
@@ -460,7 +465,7 @@ function containerCheck(item) {
for (var j=0; j
@@ -469,10 +474,9 @@ function containerCheck(item) {
$scripttag));
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package'));
$r->print($display.''.
- '
'.
+ '
'.
'
'.
- &Apache::loncommon::end_page());
+ &mt('Export '.$type.' DOCS').'" />');
}
}
@@ -755,7 +759,7 @@ sub replicate_content {
if ($caller eq 'templateupload') {
$url = $symb;
$url =~ s#//#/#g;
- } else {
+ } else {
($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
}
my $content;
@@ -795,9 +799,9 @@ sub replicate_content {
$$message = 'Could not render '.$url.' server message - '.$rtncode." \n";
}
} elsif ($caller eq 'noedit') {
-# Need to render the resource without the LON-CAPA Internal header and the Post discussion footer, and then set $content equal to this.
+# Need to render the resource without the LON-CAPA Internal header and the Post discussion footer, and then set $content equal to this.
$repstatus = 'ok';
- $content = 'Not the owner of this resource';
+ $content = 'Not the owner of this resource';
}
if ($repstatus eq 'ok') {
print $copiedfile $content;
@@ -848,14 +852,14 @@ sub extract_media {
}
}
if ($caller eq 'resource') {
- my $respath = $Apache::lonnet::perlvar{'lonDocRoot'}.'/res';
- my $embed_path = &Apache::lonnet::filelocation($respath,$embed_url);
+ my $respath = $Apache::lonnet::perlvar{'lonDocRoot'}.'/res';
+ my $embed_path = &Apache::lonnet::filelocation($respath,$embed_url);
$embed_content = &Apache::lonnet::getfile($embed_path);
unless ($embed_content eq -1) {
$repstatus = 'ok';
}
} elsif ($caller eq 'uploaded') {
-
+
$repstatus = &Apache::lonnet::getuploaded('GET',$embed_url,$cdom,$cnum,\$embed_content,$rtncode);
}
if ($repstatus eq 'ok') {
@@ -917,10 +921,10 @@ sub group_import {
while (@files) {
my ($name, $url, $residx) = @{ shift(@files) };
- if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$})
+ if (($url =~ m{^/uploaded/\Q$coursedom\E/\Q$coursenum\E/(default_\d+\.)(page|sequence)$})
&& ($caller eq 'londocs')
&& (!&Apache::lonnet::stat_file($url))) {
-
+
my $errtext = '';
my $fatal = 0;
my $newmapstr = '
');
+ }
+$r->print('');
if ($allowed) {
$r->print('
+ENDOPTIONFORM
+
+}
+sub generate_edit_table {
+ my ($tid,$varcd,$orderhash_ref) = @_;
+ my %orderhash = %{$orderhash_ref};
+ my $form;
+
+ $form = '