Diff for /loncom/interface/lonmenu.pm between versions 1.346 and 1.348

version 1.346, 2011/01/27 14:38:44 version 1.348, 2011/03/05 14:45:24
Line 359  sub innerregister { Line 359  sub innerregister {
   
     undef(@inlineremote);      undef(@inlineremote);
   
       my $resurl; 
     if ( $env{'request.symb'} && $env{'request.course.id'} ) {      if ( $env{'request.symb'} && $env{'request.course.id'} ) {
   
         my ($mapurl,$rid,$resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread());          (my $mapurl, my $rid, $resurl) = &Apache::lonnet::decode_symb(&Apache::lonnet::symbread());
         my $coursetitle = $env{'course.'.$env{'request.course.id'}.'.description'};          my $coursetitle = $env{'course.'.$env{'request.course.id'}.'.description'};
   
         my $maptitle = &Apache::lonnet::gettitle($mapurl);          my $maptitle = &Apache::lonnet::gettitle($mapurl);
Line 555  sub innerregister { Line 556  sub innerregister {
                 }                  }
             }              }
         }          }
           if ($env{'request.course.id'}) {
               if ($resurl eq "public/$cdom/$cnum/syllabus") {
                   if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ /\w/) {
                       if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) {
                           $editbutton=&switch('','',6,1,'pcstr.png','Edit',
                                               'resource[_2]',
                                               "go('/adm/courseprefs?phase=display&actions=courseinfo')",
                                               'Edit this resource');
                       }
                   }
               }
           }
         ###          ###
         ###          ###
 # Prepare the rest of the buttons  # Prepare the rest of the buttons
Line 1106  sub utilityfunctions { Line 1119  sub utilityfunctions {
     my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'.      my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'.
                          &mt('Switch server?');                           &mt('Switch server?');
   
     my $wishlistpopup;  
     if (&Apache::lonwishlist::getWishlist() ne 'error') {  
         $wishlistpopup = &Apache::lonwishlist::makePopUpNewLink();  
     }  
   
 return (<<ENDUTILITY)  return (<<ENDUTILITY)
   
Line 1235  function annotate() { Line 1244  function annotate() {
 }  }
   
 function set_wishlistlink(title, path) {  function set_wishlistlink(title, path) {
     $wishlistpopup      if (!title) {
           title = document.title;
           title = title.replace(/^LON-CAPA /,'');
       }
       if (!path) {
           path = location.pathname;
       }
       Win = window.open('/adm/wishlist?mode=newLink&setTitle='+title+'&setPath='+path,
                         'wishlistNewLink','width=560,height=350,scrollbars=0');
 }  }
   
 function open_Wishlist_Import(rat) {  function open_Wishlist_Import(rat) {

Removed from v.1.346  
changed lines
  Added in v.1.348


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