Diff for /loncom/interface/londocs.pm between versions 1.14 and 1.15

version 1.14, 2002/08/31 00:43:12 version 1.15, 2002/09/02 15:27:08
Line 34  use Apache::lonnet; Line 34  use Apache::lonnet;
 use Apache::loncommon;  use Apache::loncommon;
 use Apache::lonratedt;  use Apache::lonratedt;
 use Apache::lonratsrv;  use Apache::lonratsrv;
   use Apache::lonxml;
   
 my $iconpath;  my $iconpath;
   
Line 54  sub storemap { Line 55  sub storemap {
     my ($coursenum,$coursedom,$map)=@_;      my ($coursenum,$coursedom,$map)=@_;
     return      return
       &Apache::lonratedt::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'.        &Apache::lonratedt::storemap('/uploaded/'.$coursedom.'/'.$coursenum.'/'.
                                 $map);                                  $map,1);
 }  }
   
 sub editor {  sub editor {
Line 192  sub handler { Line 193  sub handler {
   
 # is this a standard course?  # is this a standard course?
   
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['folder']);  
     my $standard=($ENV{'request.course.uri'}=~/^\/uploaded\//);      my $standard=($ENV{'request.course.uri'}=~/^\/uploaded\//);
     my $forcestandard=($ENV{'form.folder'}=~/^default_/);      my $forcestandard;
     my $forcesupplement=($ENV{'form.folder'}=~/^supplemental_/);      my $forcesupplement;
       my $script='';
       my $allowed;
       my $events='';
       &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
          ['folder','showdoc']);
       unless ($ENV{'form.showdoc'}) { # got called from remote
          $forcestandard=($ENV{'form.folder'}=~/^default_/);
          $forcesupplement=($ENV{'form.folder'}=~/^supplemental_/);
   
 # does this user have privileges to post, etc?  # does this user have privileges to post, etc?
     my $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});         $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
     my $script='';         if ($allowed) { 
     if ($allowed) {            &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']);
        &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']);           $script=&Apache::lonratedt::editscript('simple'); 
        $script=&Apache::lonratedt::editscript('simple');          }
       } else { # got called in sequence from course
          $allowed=0;
          $forcestandard=1;
          $forcesupplement=0;
          $script=&Apache::&Apache::lonxml::registerurl(1,undef);
          $events='onLoad="'.&Apache::lonxml::loadevents.
              '" onUnload="'.&Apache::lonxml::unloadevents.'"';
     }      }
   
 # get course data  # get course data
Line 228  sub handler { Line 243  sub handler {
 <script>$script</script>  <script>$script</script>
 </head>  </head>
 ENDDOCUMENT  ENDDOCUMENT
 $r->print(&Apache::loncommon::bodytag('Course Documents'));  $r->print(&Apache::loncommon::bodytag('Course Documents','',$events));
 # --------------------------------------------------0------ Standard documents  # --------------------------------------------------0------ 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 277  value="External Resource" /> Line 292  value="External Resource" />
 value="Syllabus=/public/$coursedom/$coursenum/syllabus">  value="Syllabus=/public/$coursedom/$coursenum/syllabus">
 <input name="newsyl" type="submit" value="Syllabus" />  <input name="newsyl" type="submit" value="Syllabus" />
 </form>  </form>
   <form action="/adm/coursedocs" method="post" name="newsyl">
   <input type=hidden name="importdetail" 
   value="Navigate Content=/adm/navmaps">
   <input name="newsyl" type="submit" value="Navigate Content" />
   </form>
 <form action="/adm/coursedocs" method="post" name="newaboutme">  <form action="/adm/coursedocs" method="post" name="newaboutme">
 <input type=hidden name="importdetail"   <input type=hidden name="importdetail" 
 value="$plainname=/adm/$udom/$uname/aboutme">  value="$plainname=/adm/$udom/$uname/aboutme">

Removed from v.1.14  
changed lines
  Added in v.1.15


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