[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonhtmlcommon.pm
raeburn
raeburn at source.lon-capa.org
Fri Jan 27 21:31:52 EST 2017
raeburn Sat Jan 28 02:31:52 2017 EDT
Modified files:
/loncom/interface loncommon.pm lonhtmlcommon.pm
Log:
- Suppress display of first item in breadcrumbs trail ("Menu") when user
log-in/logout/role selection activity is displayed in pop-up window.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1271 loncom/interface/loncommon.pm:1.1272
--- loncom/interface/loncommon.pm:1.1271 Mon Jan 23 21:27:10 2017
+++ loncom/interface/loncommon.pm Sat Jan 28 02:31:51 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.1271 2017/01/23 21:27:10 raeburn Exp $
+# $Id: loncommon.pm,v 1.1272 2017/01/28 02:31:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8530,6 +8530,8 @@
no_auto_mt_title -> prevent &mt()ing the title arg
bread_crumbs -> Array containing breadcrumbs
bread_crumbs_component -> if exists show it as headline else show only the breadcrumbs
+ bread_crumbs_nomenu -> if true will pass false as the value of $menulink
+ to lonhtmlcommon::breadcrumbs
group -> includes the current group, if page is for a
specific group
@@ -8595,15 +8597,21 @@
if (@advtools > 0) {
&Apache::lonmenu::advtools_crumbs(@advtools);
}
-
+ my $menulink;
+ # if arg: bread_crumbs_nomenu is true pass 0 as $menulink item.
+ if ((exists($args->{'bread_crumbs_nomenu'})) ||
+ ((($args->{'crstype'} eq 'Placement') || (($env{'request.course.id'}) &&
+ ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement'))) &&
+ (!$env{'request.role.adv'}))) {
+ $menulink = 0;
+ } else {
+ undef($menulink);
+ }
#if bread_crumbs_component exists show it as headline else show only the breadcrumbs
if(exists($args->{'bread_crumbs_component'})){
- $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'});
- } elsif ($args->{'crstype'} eq 'Placement') {
- $result .= &Apache::lonhtmlcommon::breadcrumbs('','','','','','','','','',
- $args->{'crstype'});
+ $result .= &Apache::lonhtmlcommon::breadcrumbs($args->{'bread_crumbs_component'},'',$menulink);
} else {
- $result .= &Apache::lonhtmlcommon::breadcrumbs();
+ $result .= &Apache::lonhtmlcommon::breadcrumbs('','',$menulink);
}
}
return $result;
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.378 loncom/interface/lonhtmlcommon.pm:1.379
--- loncom/interface/lonhtmlcommon.pm:1.378 Wed Nov 9 02:04:04 2016
+++ loncom/interface/lonhtmlcommon.pm Sat Jan 28 02:31:51 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.378 2016/11/09 02:04:04 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.379 2017/01/28 02:31:51 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1892,11 +1892,6 @@
#
# The first one should be the course or a menu link
if (!defined($menulink)) { $menulink=1; }
- if ((($crstype eq 'Placement') || (($env{'request.course.id'}) &&
- ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement'))) &&
- (!$env{'request.role.adv'})) {
- undef($menulink);
- }
if ($menulink) {
my $description = 'Menu';
my $no_mt_descr = 0;
More information about the LON-CAPA-cvs
mailing list