--- loncom/interface/londocs.pm 2002/09/04 19:24:46 1.18
+++ loncom/interface/londocs.pm 2002/09/13 20:01:04 1.23
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.18 2002/09/04 19:24:46 www Exp $
+# $Id: londocs.pm,v 1.23 2002/09/13 20:01:04 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -211,9 +211,10 @@ END
$foldertitle;
}
if ($isfolder) { $url.='&foldername='.$foldertitle; }
- $line.='
![](/adm/lonIcons/'.
+ $line.='<td bgcolor=) ![](/adm/lonIcons/'.
$icon.'.gif) | '.
- "$title | ";
+ "$title | ";
return $line;
}
@@ -232,9 +233,13 @@ sub handler {
my $script='';
my $allowed;
my $events='';
+ my $showdoc=0;
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['folder','foldername','showdoc']);
- unless ($ENV{'form.showdoc'}) { # got called from remote
+ ['folder','foldername']);
+ if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) {
+ $showdoc=$1;
+ }
+ unless ($showdoc) { # got called from remote
$forcestandard=($ENV{'form.folder'}=~/^default_/);
$forcesupplement=($ENV{'form.folder'}=~/^supplemental_/);
@@ -246,9 +251,7 @@ sub handler {
}
} else { # got called in sequence from course
$allowed=0;
- $forcestandard=1;
- $forcesupplement=0;
- $script=&Apache::lonxml::registerurl(1,undef);
+ $script=''.&Apache::lonxml::registerurl(1,undef).'
+ENDDOCUMENT
+ if ($allowed) {
+ $r->print(<
function makenewfolder(targetform,folderseq) {
var foldername=prompt('Name of New Folder','New Folder');
if (foldername) {
@@ -289,6 +298,20 @@ function makenewext(targetname) {
window.open('/adm/rat/extpickframe.html');
}
+function makesmppage() {
+ var title=prompt('Listed Title for the Page');
+ this.document.forms.newsmppg.importdetail.value=
+ title+'=/adm/$udom/$uname/$now/smppg';
+ this.document.forms.newsmppg.submit();
+}
+
+function makebulboard() {
+ var title=prompt('Listed Title for the Bulletin Board');
+ this.document.forms.newbul.importdetail.value=
+ title+'=/adm/$udom/$uname/$now/bulletinboard';
+ this.document.forms.newbul.submit();
+}
+
function finishpick() {
var title=this.document.forms.extimport.title.value;
var url=this.document.forms.extimport.url.value;
@@ -298,9 +321,12 @@ function finishpick() {
'";this.document.forms.'+form+'.submit();');
}
-
-ENDDOCUMENT
-$r->print(&Apache::loncommon::bodytag('Course Documents','',$events));
+ENDNEWSCRIPT
+ }
+# -------------------------------------------------------------------- Body tag
+ $r->print(''.
+ &Apache::loncommon::bodytag('Course Documents','',$events));
+ unless ($showdoc) {
# --------------------------------------------------------- Standard documents
if (($standard) && ($allowed) && (!$forcesupplement)) {
$r->print('Main Course Documents
');
@@ -361,9 +387,25 @@ value="Syllabus=/public/$coursedom/$cour
+
+
');
}
- $r->print('