--- loncom/interface/lonnavdisplay.pm 2010/10/04 21:27:20 1.13.6.1
+++ loncom/interface/lonnavdisplay.pm 2010/10/04 21:51:22 1.13.6.3
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavdisplay.pm,v 1.13.6.1 2010/10/04 21:27:20 raeburn Exp $
+# $Id: lonnavdisplay.pm,v 1.13.6.3 2010/10/04 21:51:22 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -155,28 +155,35 @@ MENU
# Header
my $course_type = &Apache::loncommon::course_type();
- my ($title,$breadcrumb_text);
- if ($course_type eq 'Community') {
- $title = 'Community Contents';
- $breadcrumb_text = &mt('Community Contents');
- } else {
- $title = 'Course Contents';
- $breadcrumb_text = &mt('Course Contents');
- }
+ my ($title,$breadcrumb_text,$start_page,$args);
+ $title = 'Contents';
+ $breadcrumb_text = &mt('Contents');
if ($env{'form.register'}) {
- $args = {'force_register' => $env{'form.register'},
- 'only_body' => $body_only};
+ $args = {'force_register' => $env{'form.register'}};
+ my $brcrum = [{href => '/adm/navmaps',
+ text => $breadcrumb_text,
+ no_mt => 1,},
+ ];
+ $args = {'bread_crumbs' => $brcrum,
+ 'only_body' => $body_only};
$start_page = &Apache::loncommon::start_page($title,$js,$args);
} else {
- my $brcrum = [{href => '/adm/navmaps',
- text => $breadcrumb_text,
- no_mt => 1},
+ my $nomenu = 0;
+ if ((&Apache::loncommon::needs_gci_custom()) ||
+ ($env{'user.domain'} eq 'gcitest' && $env{'request.course.id'})) {
+ $nomenu = 1;
+ }
+ my $brcrum = [{href => '/adm/navmaps',
+ text => $breadcrumb_text,
+ no_mt => 1,
+ _nomenu => $nomenu,},
];
$args = {'bread_crumbs' => $brcrum,
'only_body' => $body_only};
$start_page = &Apache::loncommon::start_page($title,$js,$args);
}
- $r->print('');
+ $r->print($start_page.
+ '');
$r->rflush();
@@ -309,9 +316,12 @@ MENU
$env{'form.condition'} = 1;
$resource_no_folder_link = 1;
} else {
+ my $link = 'navmaps?sort='.$env{'form.sort'}.'&showOnlyHomework=1';
+ if ($env{'form.register'}) {
+ $link .= '®ister='.$env{'form.register'};
+ }
&Apache::lonnavmaps::add_linkitem(\%toplinkitems,'uncompleted',
- 'location.href="navmaps?sort='.$env{'form.sort'}.
- '&showOnlyHomework=1"',
+ 'location.href="'.$link.'"',
"Show only uncompleted problems");
}
@@ -321,8 +331,8 @@ MENU
'.&mt('Sort by:').'