--- loncom/interface/londocs.pm 2010/08/14 04:28:21 1.432
+++ loncom/interface/londocs.pm 2010/08/16 00:30:47 1.433
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.432 2010/08/14 04:28:21 raeburn Exp $
+# $Id: londocs.pm,v 1.433 2010/08/16 00:30:47 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2721,6 +2721,17 @@ sub handler {
'';
$uploadtag = ''.
'';
+ } else {
+ my $folderpath=$env{'form.folderpath'};
+ if (!$folderpath) {
+ if ($env{'form.folder'} eq '' ||
+ $env{'form.folder'} eq 'supplemental') {
+ $folderpath='default&'.
+ &escape(&mt('Main '.$crstype.' Documents'));
+ }
+ }
+ $containertag = '';
+ $uploadtag = '';
}
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) {
$showdoc='/'.$1;
@@ -3013,18 +3024,6 @@ ERFORM
'sl' => 'Show Log'
);
- my $folderpath=$env{'form.folderpath'};
- if (!$folderpath) {
- if ($env{'form.folder'} eq '' ||
- $env{'form.folder'} eq 'supplemental') {
- $folderpath='default&'.
- &escape(&mt('Main '.$crstype.' Documents'));
- }
- }
- unless ($env{'form.pagepath'}) {
- $containertag = '';
- $uploadtag = '';
- }
$r->print(<
@@ -3589,6 +3588,12 @@ sub editing_js {
p_ctr2b => '?[_98]'
);
+ my $crstype = &Apache::loncommon::course_type();
+ my $docs_folderpath = $env{'environment.internal.'.$env{'request.course.id'}.'.docs_folderpath.folderpath'};
+ my $docs_pagepath = $env{'environment.internal.'.$env{'request.course.id'}.'.docs_folderpath.pagepath'};
+ my $toplevelmain = 'default&Main%20'.$crstype.'%20Documents';
+ my $toplevelsupp = 'supplemental&Supplemental%20'.$crstype.'%20Documents';
+
return <