Diff for /loncom/interface/londocs.pm between versions 1.464 and 1.466

version 1.464, 2011/11/27 20:55:58 version 1.466, 2011/11/27 22:51:28
Line 2845  sub handler { Line 2845  sub handler {
 #  #
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
                                             ['folderpath','pagepath',                                              ['folderpath','pagepath',
                                              'pagesymb','forcesupplement','forcestandard']);                                               'pagesymb','forcesupplement','forcestandard',
                                                'symb','command']);
   
 # standard=1: this is a "new-style" course with an uploaded map as top level  # standard=1: this is a "new-style" course with an uploaded map as top level
 # standard=2: this is a "old-style" course, and there is nothing we can do  # standard=2: this is a "old-style" course, and there is nothing we can do
Line 2873  sub handler { Line 2874  sub handler {
     my $uploadtag;      my $uploadtag;
   
 # Do we directly jump somewhere?  # Do we directly jump somewhere?
   
    if ($env{'form.command'} eq 'direct') {     if ($env{'form.command'} eq 'direct') {
        (my $mapurl) = &Apache::lonnet::decode_symb($env{'form.symb'});         my ($mapurl,$id,$resurl) = &Apache::lonnet::decode_symb($env{'form.symb'});
          if ($resurl=~/\.(sequence|page)$/) {
              $mapurl=$resurl;
          }
        my $maptitle = &Apache::lonnet::gettitle($mapurl);         my $maptitle = &Apache::lonnet::gettitle($mapurl);
        $mapurl=~s{^.*/([^/]+)\.\w+$}{$1};         $mapurl=~s{^.*/([^/]+)\.(\w+)$}{$1};
        $env{'form.folderpath'}=         my $type=$2;
                     'default&'.&Apache::lonhtmlcommon::entity_encode('Main Course Documents').         my $path='default&'.&Apache::lonhtmlcommon::entity_encode('Main Course Documents').
                     '&default&...::::&'.                  '&default&...::::&'.
                     &Apache::lonhtmlcommon::entity_encode($mapurl).'&'.                  &Apache::lonhtmlcommon::entity_encode($mapurl).'&'.
                         &Apache::lonhtmlcommon::entity_encode($maptitle).'::::';                          &Apache::lonhtmlcommon::entity_encode($maptitle).'::::';
          if ($type eq 'sequence') {
              $env{'form.folderpath'}=$path;
              $env{'form.pagepath'}='';
          } else {
              $env{'form.pagepath'}=$path;
              $env{'form.folderpath'}='';
          }
    }     }
   
 # Where do we store these for when we come back?  # Where do we store these for when we come back?
Line 2928  sub handler { Line 2940  sub handler {
                                                 {'pagepath' => 'scalar',                                                  {'pagepath' => 'scalar',
                                                  'folderpath' => 'scalar'});                                                   'folderpath' => 'scalar'});
   
        &Apache::lonnet::logthis("Folder: ".$env{'form.folderpath'});  
   
   
     if ($env{'form.folderpath'}) {      if ($env{'form.folderpath'}) {
  my (@folderpath)=split('&',$env{'form.folderpath'});   my (@folderpath)=split('&',$env{'form.folderpath'});
  $env{'form.foldername'}=&unescape(pop(@folderpath));   $env{'form.foldername'}=&unescape(pop(@folderpath));

Removed from v.1.464  
changed lines
  Added in v.1.466


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