--- loncom/interface/londocs.pm 2009/10/22 22:25:36 1.401 +++ loncom/interface/londocs.pm 2009/10/23 17:12:34 1.402 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.401 2009/10/22 22:25:36 raeburn Exp $ +# $Id: londocs.pm,v 1.402 2009/10/23 17:12:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2698,7 +2698,9 @@ sub handler { if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { $showdoc='/'.$1; } - unless ($showdoc) { # got called from remote + if ($showdoc) { # got called in sequence from course + $allowed=0; + } else { if (($env{'form.folder'}=~/^(?:group|default)_/) || ($env{'form.folder'} =~ m:^\d+/(pages|sequences)/:)) { $forcestandard = 1; @@ -2709,8 +2711,6 @@ sub handler { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']); $script=&Apache::lonratedt::editscript('simple'); } - } else { # got called in sequence from course - $allowed=0; } # subroutine to list form elements @@ -2769,6 +2769,9 @@ sub create_form_ul { 'Editing the Table of Contents for your '.$type, 'Docs_Adding_Course_Doc') ); + } elsif ($showdoc) { + $r->print(&Apache::loncommon::start_page("$type documents",undef, + {'force_register' => $showdoc,})); } else { my $folder=$env{'form.folder'}; if ($folder eq '' || $folder eq 'supplemental') { @@ -2900,7 +2903,7 @@ sub create_form_ul { 'file' => 'File', 'title' => 'Title', 'comment' => 'Comment', - 'parse' => 'Upload embedded images/multimedia files if HTML file', + 'parse' => 'Upload embedded images/multimedia files if HTML file.', 'nd' => 'Upload Document', 'pm' => 'Published Map', 'sd' => 'Special Document',