Diff for /loncom/interface/lonmenu.pm between versions 1.449 and 1.452

version 1.449, 2016/05/23 17:38:55 version 1.452, 2016/08/15 15:52:16
Line 812  sub innerregister { Line 812  sub innerregister {
             if ($currdir =~ m-/$-) {              if ($currdir =~ m-/$-) {
                 $is_const_dir = 1;                  $is_const_dir = 1;
                 if ($thisdisfn eq '') {                  if ($thisdisfn eq '') {
                     $is_const_dir = 2;                      unless (($env{'request.course.id'}) && 
                               ($env{'course.'.$env{'request.course.id'}.'.num'} eq $uname) &&
                               ($env{'course.'.$env{'request.course.id'}.'.domain'} eq $udom)) { 
                           $is_const_dir = 2;
                       }
                 }                  }
             } else {              } else {
                 $currdir =~ s|[^/]+$||;                  $currdir =~ s|[^/]+$||;
Line 873  ENDMENUITEMS Line 877  ENDMENUITEMS
             $got_prt = 1;              $got_prt = 1;
             if (($env{'user.adv'}) && ($env{'request.uri'} =~ /^\/res/)              if (($env{'user.adv'}) && ($env{'request.uri'} =~ /^\/res/)
                 && (!$env{'request.enc'})) {                  && (!$env{'request.enc'})) {
                 # wishlist is only available for users with access to resource-pool                  my ($cnum,$cdom) = &Apache::loncommon::crsauthor_url($env{'request.uri'});
                 # and links can only be set for resources within the resource-pool                  unless ($cnum) {
                 $menuitems .= (<<ENDMENUITEMS);                      # wishlist is only available for users with access to resource-pool
                       # and links can only be set for resources within the resource-pool
                       $menuitems .= (<<ENDMENUITEMS);
 s&9&1&wishlist-link.png&Stored Links&wishlistlink[_2]&set_wishlistlink()&Save a link for this resource in my personal Stored Links repository&&1  s&9&1&wishlist-link.png&Stored Links&wishlistlink[_2]&set_wishlistlink()&Save a link for this resource in my personal Stored Links repository&&1
 ENDMENUITEMS  ENDMENUITEMS
                 $got_wishlist = 1;                      $got_wishlist = 1;
                   }
             }              }
   
 my $currentURL = &Apache::loncommon::get_symb();  my $currentURL = &Apache::loncommon::get_symb();
Line 1650  sub done_button_js { Line 1657  sub done_button_js {
                  nokey    => 'A proctor key is required',                    nokey    => 'A proctor key is required', 
     );      );
     my $navmap = Apache::lonnavmaps::navmap->new();       my $navmap = Apache::lonnavmaps::navmap->new(); 
     my ($missing,$tried);      my ($missing,$tried) = (0,0);
     if (ref($navmap)) {      if (ref($navmap)) {
         $missing=0;  
         $tried=0;  
         my @resources=();          my @resources=();
         if ($type eq 'map') {          if ($type eq 'map') {
             my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($env{'request.symb'});              my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($env{'request.symb'});
Line 1667  sub done_button_js { Line 1672  sub done_button_js {
             }              }
         }          }
         foreach my $res (@resources) {          foreach my $res (@resources) {
             if ($res->singlepart()) {              if (ref($res->parts()) eq 'ARRAY') {
                 if (!$res->tries()) {  
                     $missing++;  
                 } else {  
                     $tried++;  
                 }  
             } else {  
                 foreach my $part (@{$res->parts()}) {                  foreach my $part (@{$res->parts()}) {
                     if (!$res->tries($part)) {                      if (!$res->tries($part)) {
                         $missing++;                          $missing++;

Removed from v.1.449  
changed lines
  Added in v.1.452


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