Diff for /loncom/interface/lonmenu.pm between versions 1.318 and 1.319

version 1.318, 2010/03/16 19:55:49 version 1.319, 2010/03/17 19:35:56
Line 194  sub primary_menu { Line 194  sub primary_menu {
     my $menu;      my $menu;
     # each element of @primary contains following array:      # each element of @primary contains following array:
     # (link url, icon path, alt text, link text, condition)      # (link url, icon path, alt text, link text, condition)
       my $public;
       if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public'))
           || (($env{'user.name'} eq '') && ($env{'user.domain'} eq ''))) {
           $public = 1;
       }
     foreach my $menuitem (@primary_menu) {      foreach my $menuitem (@primary_menu) {
         # evaluate conditions           # evaluate conditions 
         next if    ref($menuitem)       ne 'ARRAY';    #          next if    ref($menuitem)       ne 'ARRAY';    #
Line 201  sub primary_menu { Line 206  sub primary_menu {
                 && &Apache::lonmsg::mynewmail();       # whether a new msg                   && &Apache::lonmsg::mynewmail();       # whether a new msg 
         next if    $$menuitem[4]        eq 'newmsg'    # arrived or not          next if    $$menuitem[4]        eq 'newmsg'    # arrived or not
                 && !&Apache::lonmsg::mynewmail();      #                   && !&Apache::lonmsg::mynewmail();      # 
         next if    $$menuitem[4]        !~ /public/    ##we've a public user,           next if    $$menuitem[4]        !~ /public/    ##we've a public user,
                 && $env{'user.name'}    eq 'public'    ##who should not see all                   && $public;                            ##who should not see all
                 && $env{'user.domain'}  eq 'public';   ##links                                                         ##links
         next if    $$menuitem[4]        eq 'onlypublic'# hide links which are           next if    $$menuitem[4]        eq 'onlypublic'# hide links which are 
                 && $env{'user.name'}    ne 'public'    # only visible to public                  && !$public;                           # only visible to public
                 && $env{'user.domain'}  ne 'public';   # users                                                         # users
         next if    $$menuitem[4]        eq 'roles'     ##show links depending on          next if    $$menuitem[4]        eq 'roles'     ##show links depending on
                 && &Apache::loncommon::show_course();  ##term 'Courses' or                   && &Apache::loncommon::show_course();  ##term 'Courses' or 
         next if    $$menuitem[4]        eq 'courses'   ##'Roles' wanted          next if    $$menuitem[4]        eq 'courses'   ##'Roles' wanted

Removed from v.1.318  
changed lines
  Added in v.1.319


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