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

version 1.18, 2002/09/04 19:24:46 version 1.20, 2002/09/05 19:37:00
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
   </script>
   ENDDOCUMENT
      if ($allowed) {
       $r->print(<<ENDNEWSCRIPT);
   <script>
 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');
     if (foldername) {      if (foldername) {
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('</head>'.
               &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 361  value="Syllabus=/public/$coursedom/$cour Line 368  value="Syllabus=/public/$coursedom/$cour
 <input name="newsyl" type="submit" value="Syllabus" />  <input name="newsyl" type="submit" value="Syllabus" />
 </form>  </form>
 <form action="/adm/coursedocs" method="post" name="newnav">  <form action="/adm/coursedocs" method="post" name="newnav">
   <input type="hidden" name="folder" value="$folder">
   <input type="hidden" name="foldername" value="$ENV{'form.foldername'}">
 <input type=hidden name="importdetail"   <input type=hidden name="importdetail" 
 value="Navigate Content=/adm/navmaps">  value="Navigate Content=/adm/navmaps">
 <input name="newsyl" type="submit" value="Navigate Content" />  <input name="newnav" type="submit" value="Navigate Content" />
 </form>  </form>
 <form action="/adm/coursedocs" method="post" name="newaboutme">  <form action="/adm/coursedocs" method="post" name="newaboutme">
 <input type="hidden" name="folder" value="$folder">  <input type="hidden" name="folder" value="$folder">
Line 454  ENDSUPFORM Line 463  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.20


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