[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Mon Nov 25 19:25:32 EST 2013
raeburn Tue Nov 26 00:25:32 2013 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
- generate xhtml that satisifies w3c validation in cases where there is no
authenticated user (i.e., name of user etc. absent from left of primary menu).
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.422 loncom/interface/lonmenu.pm:1.423
--- loncom/interface/lonmenu.pm:1.422 Sun Nov 24 15:32:39 2013
+++ loncom/interface/lonmenu.pm Tue Nov 26 00:25:32 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.422 2013/11/24 15:32:39 raeburn Exp $
+# $Id: lonmenu.pm,v 1.423 2013/11/26 00:25:32 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -283,8 +283,14 @@
$menu{$position} .= prep_menuitem($menuitem);
}
}
- return ("<ol class=\"LC_primary_menu LC_floatleft\">$menu{'left'}</ol>",
- "<ol class=\"LC_primary_menu LC_floatright LC_right\">$menu{'right'}</ol>");
+ my @output = ('','');
+ if ($menu{'left'} ne '') {
+ $output[0] = "<ol class=\"LC_primary_menu LC_floatleft\">$menu{'left'}</ol>";
+ }
+ if ($menu{'right'} ne '') {
+ $output[1] = "<ol class=\"LC_primary_menu LC_floatright LC_right\">$menu{'right'}</ol>";
+ }
+ return @output;
}
#returns hashref {user=>'',dom=>''} containing:
More information about the LON-CAPA-cvs
mailing list