--- loncom/interface/londocs.pm 2013/01/09 17:17:27 1.484.2.22
+++ loncom/interface/londocs.pm 2012/12/29 17:37:21 1.525
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.484.2.22 2013/01/09 17:17:27 raeburn Exp $
+# $Id: londocs.pm,v 1.525 2012/12/29 17:37:21 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -651,7 +651,7 @@ sub print_paste_buffer {
$is_external = 1;
}
- my ($canpaste,$nopaste,$othercrs,$areachange);
+ my ($canpaste,$nopaste,$othercrs,$areachange,$is_uploaded_map);
if ($folder =~ /^supplemental/) {
$canpaste = &supp_pasteable($env{'docs.markedcopy_url'});
unless ($canpaste) {
@@ -1543,7 +1543,7 @@ sub apply_fixups {
if ($folder !~ /^supplemental/) {
$report = 1;
}
- (my $outtext,$errtext) =
+ my ($outtext,$errtext) =
&LONCAPA::map::storemap("/uploaded/$cdom/$cnum/$storefn",1,$report);
if ($errtext) {
return &mt('Paste failed: an error occurred saving the folder or page.');
@@ -3072,6 +3072,7 @@ sub startContentScreen {
if (($mode eq 'navmaps') || ($mode eq 'supplemental')) {
$output .= '
'.&mt('Content Overview').' '."\n";
$output .= ' '.&mt('Content Search').' '."\n";
+ $output .= ' '.&mt('Content Index').' '."\n";
$output .= ''.&mt('Supplemental Content').'';
} else {
$output .= ' '.&mt('Content Editor').' '."\n";
@@ -3218,11 +3219,11 @@ sub handler {
if ($env{'form.symb'} ne '') {
$env{'form.folderpath'}=
&Apache::loncommon::symb_to_docspath($env{'form.symb'});
- &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} =>
+ &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} =>
$env{'form.command'}.'_'.$env{'form.symb'}});
} elsif ($env{'form.supppath'} ne '') {
$env{'form.folderpath'}=$env{'form.supppath'};
- &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} =>
+ &Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} =>
$env{'form.command'}.'_'.$env{'form.supppath'}});
}
} elsif ($env{'form.command'} eq 'editdocs') {
@@ -3240,6 +3241,7 @@ sub handler {
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => '/adm/menu'});
}
+
# Where do we store these for when we come back?
my $stored_folderpath='docs_folderpath';
if ($supplementalflag) {
@@ -3455,6 +3457,9 @@ sub handler {
} elsif ((!$showdoc) && (!$uploadphase)) {
# -----------------------------------------------------------------------------
my %lt=&Apache::lonlocal::texthash(
+ 'uplm' => 'Upload a new main '.lc($crstype).' document',
+ 'upls' => 'Upload a new supplemental '.lc($crstype).' document',
+ 'impp' => 'Import a document',
'copm' => 'All documents out of a published map into this folder',
'upfi' => 'Upload File',
'upld' => 'Import Content',
@@ -3464,8 +3469,10 @@ sub handler {
'impm' => 'Import from Assembled Map',
'selm' => 'Select Map',
'load' => 'Load Map',
+ 'reco' => 'Recover Deleted Documents',
'newf' => 'New Folder',
'newp' => 'New Composite Page',
+ 'extr' => 'External Resource',
'syll' => 'Syllabus',
'navc' => 'Table of Contents',
'sipa' => 'Simple Course Page',
@@ -3476,7 +3483,7 @@ sub handler {
'mypi' => 'My Personal Information Page',
'grpo' => 'Group Portfolio',
'rost' => 'Course Roster',
- 'abou' => 'Personal Information Page for a User',
+ 'abou' => 'Personal Information Page for a User',
'imsf' => 'IMS Import',
'imsl' => 'Import IMS package',
'cms' => 'Origin of IMS package',
@@ -3484,6 +3491,9 @@ sub handler {
'file' => 'File',
'title' => 'Title',
'comment' => 'Comment',
+ 'url' => 'URL',
+ 'prev' => 'Preview',
+ 'lnk' => 'Add Link',
'parse' => 'Upload embedded images/multimedia files if HTML file',
);
# -----------------------------------------------------------------------------
@@ -4224,7 +4234,7 @@ sub generate_edit_table {
my $form;
my $activetab;
my $active;
- if (($env{'form.active'} ne '') && ($env{'form.active'} ne 'aa')) {
+ if($env{'form.active'} ne ''){
$activetab = $env{'form.active'};
}
my $backicon = $iconpath.'clickhere.gif';
@@ -4329,8 +4339,8 @@ sub editing_js {
my $toplevelsupp = &supplemental_base();
my $backtourl;
- if ($env{'docs.exit.'.$env{'request.course.id'}} =~ /^direct_(.+)$/) {
- my $caller = $1;
+ if ($env{'docs.exit.'.$env{'request.course.id'}} =~ /^direct_(.+)$/) {
+ my $caller = $1;
if ($caller =~ /^supplemental/) {
$backtourl = '/adm/supplemental?folderpath='.&escape($caller);
} else {