Diff for /loncom/interface/londocs.pm between versions 1.18 and 1.19

version 1.18, 2002/09/04 19:24:46 version 1.19, 2002/09/04 20:33:38
Line 232  sub handler { Line 232  sub handler {
     my $script='';      my $script='';
     my $allowed;      my $allowed;
     my $events='';      my $events='';
       my $showdoc=0;
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
        ['folder','foldername','showdoc']);         ['folder','foldername','showdoc']);
     unless ($ENV{'form.showdoc'}) { # got called from remote      unless ($ENV{'form.showdoc'}) { # got called from remote
Line 246  sub handler { Line 247  sub handler {
        }         }
     } else { # got called in sequence from course      } else { # got called in sequence from course
        $allowed=0;         $allowed=0;
        $forcestandard=1;         $showdoc=1;
        $forcesupplement=0;  
        $script=&Apache::lonxml::registerurl(1,undef);         $script=&Apache::lonxml::registerurl(1,undef);
        $events='onLoad="'.&Apache::lonxml::loadevents.         $events='onLoad="'.&Apache::lonxml::loadevents.
            '" onUnload="'.&Apache::lonxml::unloadevents.'"';             '" onUnload="'.&Apache::lonxml::unloadevents.'"';
Line 275  sub handler { Line 275  sub handler {
 <title>The LearningOnline Network with CAPA</title>  <title>The LearningOnline Network with CAPA</title>
 <script>  <script>
 $script  $script
   </head>
   ENDDOCUMENT
      if ($allowed) {
       $r->print(<<ENDNEWSCRIPT);
   
 function makenewfolder(targetform,folderseq) {  function makenewfolder(targetform,folderseq) {
     var foldername=prompt('Name of New Folder','New Folder');      var foldername=prompt('Name of New Folder','New Folder');
Line 298  function finishpick() { Line 302  function finishpick() {
     '";this.document.forms.'+form+'.submit();');      '";this.document.forms.'+form+'.submit();');
 }  }
 </script>  </script>
 </head>  ENDNEWSCRIPT
 ENDDOCUMENT    }
 $r->print(&Apache::loncommon::bodytag('Course Documents','',$events));  # -------------------------------------------------------------------- Body tag
     $r->print(&Apache::loncommon::bodytag('Course Documents','',$events));
     unless ($showdoc) {
 # --------------------------------------------------------- Standard documents  # --------------------------------------------------------- Standard documents
     if (($standard) && ($allowed) && (!$forcesupplement)) {      if (($standard) && ($allowed) && (!$forcesupplement)) {
        $r->print('<h2>Main Course Documents</h2>');         $r->print('<h2>Main Course Documents</h2>');
Line 454  ENDSUPFORM Line 460  ENDSUPFORM
     if ($allowed) {      if ($allowed) {
  $r->print('<form name="extimport"><input type="hidden" name="title"><input type="hidden" name="url"><input type="hidden" name="useform"></form>');   $r->print('<form name="extimport"><input type="hidden" name="title"><input type="hidden" name="url"><input type="hidden" name="useform"></form>');
     }      }
     $r->print('</body></html>');    } else {
     return OK;  # -------------------------------------------------------- This is showdoc mode
         $r->print("<h1>Uploaded Document</h1><p>It is recommended that you use an up-to-date virus scanner before handling this file.</p><p><table>".
            &entryline(0,"Click to download or use your browser's Save Link function",$ENV{'form.showdoc'}).'</table></p>');
     }
     $r->print('</body></html>');
     return OK;
 }   } 
   
 1;  1;

Removed from v.1.18  
changed lines
  Added in v.1.19


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>