[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm

droeschl droeschl@source.lon-capa.org
Wed, 24 Feb 2010 17:38:52 -0000


droeschl		Wed Feb 24 17:38:52 2010 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  Added documentation.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.313 loncom/interface/lonmenu.pm:1.314
--- loncom/interface/lonmenu.pm:1.313	Wed Feb 10 08:24:31 2010
+++ loncom/interface/lonmenu.pm	Wed Feb 24 17:38:52 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.313 2010/02/10 08:24:31 droeschl Exp $
+# $Id: lonmenu.pm,v 1.314 2010/02/24 17:38:52 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -42,13 +42,77 @@
 This is part of the LearningOnline Network with CAPA project
 described at http://www.lon-capa.org.
 
+=head1 GLOBAL VARIABLES
+
+=over
+
+=item @desklines
+
+Each element of this array contains a line of mydesk.tab that doesn't start with
+cat, prim or scnd. 
+It gets filled in the BEGIN block of this module.
+
+=item %category_names
+
+The keys of this hash are the abbreviations used in mydesk.tab in those lines that 
+start with cat, the values are strings representing titles. 
+It gets filled in the BEGIN block of this module.
+
+=item %category_members
+
+TODO 
+
+=item %category_positions
+
+The keys of this hash are the abbreviations used in mydesk.tab in those lines that
+start with cat, its values are position vectors (column, row). 
+It gets filled in the BEGIN block of this module.
+
+=item $readdesk
+
+Indicates that mydesk.tab has been read. 
+It is set to 'done' in the BEGIN block of this module.
+
+=item @primary_menu
+
+The elements of this array reference arrays that are made up of the components
+of those lines of mydesk.tab that start with prim.
+It is used by primary_menu() to generate the corresponding menu.
+It gets filled in the BEGIN block of this module.
+
+=item @secondary_menu
+
+The elements of this array reference arrays that are made up of the components
+of those lines of mydesk.tab that start with scnd.
+It is used by secondary_menu() to generate the corresponding menu.
+It gets filled in the BEGIN block of this module.
+
+=back
+
 =head1 SUBROUTINES
 
 =over
 
-Little texts
+=item prep_menuitems(\@menuitem)
+
+This routine wraps a menuitem in proper HTML. It is used by primary_menu() and 
+secondary_menu().
+
+=item primary_menu()
+
+This routine evaluates @primary_menu and returns XHTML for the menu
+that contains following links: About, Message, Roles, Help, Logout
+@primary_menu is filled within the BEGIN block of this module with 
+entries from mydesk.tab 
+
+=item secondary_menu()
+
+Same as primary_menu() but operates on @secondary_menu.
+
+=item DEPRECATED: initlittle()
 
-=item initlittle()
+This routine returns a translated hash for the menu items in the top inline 
+menu row
 
 =item menubuttons()