--- loncom/interface/lonmenu.pm 2010/10/07 15:39:27 1.309.2.17 +++ loncom/interface/lonmenu.pm 2010/11/08 22:51:23 1.309.2.18 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.309.2.17 2010/10/07 15:39:27 raeburn Exp $ +# $Id: lonmenu.pm,v 1.309.2.18 2010/11/08 22:51:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -165,6 +165,7 @@ sub prep_menuitem { sub primary_menu { my $menu; my $custommenu = &Apache::loncommon::needs_gci_custom(); + my $numdc = &Apache::loncommon::check_for_gci_dc(); # each element of @primary contains following array: # (link url, icon path, alt text, link text, condition) foreach my $menuitem (@primary_menu) { @@ -183,7 +184,8 @@ sub primary_menu { next if $$menuitem[4] eq 'gci' && (!$custommenu || $env{'request.role'} =~ m{^st\./gcitest/}); next if $$menuitem[4] eq 'home' - && (($custommenu) || ($env{'user.domain'} eq 'gcitest')); + && (($custommenu) || ($env{'user.domain'} eq 'gcitest') || + (($env{'user.domain'} eq 'gci') && !$numdc)); next if $$menuitem[4] eq 'gcitest' && (($env{'user.domain'} eq 'gci') || ($env{'request.role'} eq 'cm')); next if $$menuitem[4] eq 'roles' # hide links which are @@ -321,7 +323,11 @@ sub gci_secondary_menu { foreach my $key (keys(%courses)) { $links{$key} = "javascript:switchpage('$key');"; if ($env{'request.course.id'} eq $courses{$key}) { - $links{$key} = '/adm/navmaps'; + if ($env{'environment.remotenavmap'} eq 'on') { + $links{$key} = "javascript:gonav('/adm/navmaps')"; + } else { + $links{$key} = '/adm/navmaps'; + } $current = $key; $links{'managetest'} = '/adm/roles?selectrole=1&cm=1&orgurl=%2fadm%2fmenu'; } @@ -330,10 +336,10 @@ sub gci_secondary_menu { my $tabs; foreach my $item (@menutabs) { if ($item eq $current) { - $tabs .= '
  • '. + $tabs .= '
  • '. $linktext{$item}.'
  • '; } else { - $tabs .= '
  • '. + $tabs .= '
  • '. $linktext{$item}.'
  • '; } } @@ -622,9 +628,13 @@ sub innerregister { my @crumbs; unless (($forcereg) && ($env{'request.noversionuri'} eq '/adm/navmaps') && ($mapurl eq $env{'course.'.$env{'request.course.id'}.'.url'})) { + my $link = "javascript:gopost('/adm/navmaps','')"; + if ($env{'environment.remotenavmap'} eq 'on') { + $link = "javascript:gonav('/adm/navmaps','')" + } @crumbs = ({text => Apache::loncommon::course_type() . ' Contents', - href => "Javascript:gopost('/adm/navmaps','')"}); + href => $link}); } if ($mapurl ne $env{'course.'.$env{'request.course.id'}.'.url'}) { push(@crumbs, {text => '...', @@ -1443,13 +1453,19 @@ ENDSCRIPT } if ($env{'request.course.id'}) { if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { + my $navlink; + if ($env{'environment.remotenavmap'} eq 'on') { + $navlink = "javascript:gonav('/adm/navmaps')"; + } else { + $navlink = '/adm/navmaps'; + } $output .= - '
    '. - '

    '.&mt('Test Management').'

    '. + '

    '. + '

    '.&mt('Management').'

    '. '
    '. '
    '. - '
    '.&mt('Concept Test Contents').'
    '. - '
    '.&mt('Display the table of contents for your Concept Test.').'
    '. + '
    '.&mt('Concept Test Contents').'
    '. + '
    '.&mt('Display the table of contents for your Concept Test.').'
    '. '
    '.&mt('Assemble Concept Test').'
    '. '
    '.&mt('If no students have attempted the Concept Test you will be able to modify it. You can also change the start and end date of the test itself.').'
    '. '
    '.&mt('Enrollment and Student Activity').'
    '. @@ -1474,14 +1490,20 @@ ENDSCRIPT $navtext = &mt('Display Test Contents'); $navdesc = &mt('Display the table of contents for this Concept Test'); } + my $navlink; + if ($env{'environment.remotenavmap'} eq 'on') { + $navlink = "javascript:gonav('/adm/navmaps');" + } else { + $navlink = '/adm/navmaps'; + } $output .= - '
    '. + '
    '. '

    '.&mt('Utilities').'

    '. ''; + ''.$navdesc.'
    '; if ($canreq) { $output .= '
    '. '
    '. @@ -1492,7 +1514,7 @@ ENDSCRIPT } } elsif ($switcher || $canreq) { $output .= '

    '. - '
    '. + '
    '. '

    '.&mt('Utilities').'

    '. '
    '. '
    '; @@ -1514,7 +1536,7 @@ ENDSCRIPT my $queued = &Apache::loncoursequeueadmin::queued_selfenrollment('notitle'); if ($queued) { $output .= - '
    '. + '
    '. '

    '.&mt('Pending Enrollment Requests').'

    '. $queued. '
    ';