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

jms lon-capa-cvs-allow@mail.lon-capa.org
Wed, 19 Nov 2008 19:43:08 -0000


jms		Wed Nov 19 19:43:08 2008 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  Added POD comments and documentation
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.243 loncom/interface/lonmenu.pm:1.244
--- loncom/interface/lonmenu.pm:1.243	Thu Sep 11 21:05:19 2008
+++ loncom/interface/lonmenu.pm	Wed Nov 19 19:43:08 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.243 2008/09/11 21:05:19 tempelho Exp $
+# $Id: lonmenu.pm,v 1.244 2008/11/19 19:43:08 jms Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -36,6 +36,105 @@
 # browser.interface is 'textual'
 #
 
+=head1 NAME
+
+Apache::lonmenu
+
+=head1 SYNOPSIS
+
+Coordinates the response to clicking an image.
+
+This is part of the LearningOnline Network with CAPA project
+described at http://www.lon-capa.org.
+
+=head1 SUBROUTINES
+
+=over
+
+=item show_course()
+
+Little texts
+
+=item initlittle()
+
+=item menubuttons()
+
+This gets called at the top of the body section
+
+=item show_return_link()
+
+=item registerurl()
+
+This gets called in the header section
+
+=item innerregister()
+
+This gets called in order to register a URL, both with the Remote
+and in the body of the document
+
+=item loadevents()
+
+=item unloadevents()
+
+=item startupremote()
+
+=item setflags()
+
+=item maincall()
+
+=item load_remote_msg()
+
+=item get_menu_name()
+
+=item reopenmenu()
+
+=item open()
+
+Open the menu
+
+=item clear()
+
+=item switch()
+
+Switch a button or create a link
+Switch acts on the javascript that is executed when a button is clicked.  
+The javascript is usually similar to "go('/adm/roles')" or "cstrgo(..)".
+
+=item secondlevel()
+
+=item openmenu()
+
+=item inlinemenu()
+
+=item rawconfig()
+
+=item close()
+
+=item footer()
+
+=item utilityfunctions()
+
+=item serverform()
+
+=item constspaceform()
+
+=item get_nav_status()
+
+=item convert_menu_function()
+
+FIXME this needs to move into mydesktab and the other locations 
+the text is generated
+
+=item hidden_button_check()
+
+=item roles_selector()
+
+=item jump_to_role()
+
+=back
+
+=cut
+
 package Apache::lonmenu;
 
 use strict;
@@ -53,7 +152,6 @@
 
 
 
-# ================================================================ Little texts
 sub show_course {
     my $course = !$env{'user.adv'};
     if (!$env{'user.adv'}) {
@@ -84,8 +182,6 @@
                                        );
 }
 
-# ============================= This gets called at the top of the body section
-
 sub menubuttons {
     my $forcereg=shift;
     my $registration=shift;
@@ -297,7 +393,6 @@
 	     ));
 }
 
-# ====================================== This gets called in the header section
 
 sub registerurl {
     my ($forcereg) = @_;
@@ -322,9 +417,6 @@
     return $result.$force_title;
 }
 
-# =========== This gets called in order to register a URL, both with the Remote
-# =========== and in the body of the document
-
 sub innerregister {
     my ($forcereg, $titletable) = @_;
     my $result = '';
@@ -727,7 +819,6 @@
     return 'LONCAPAstale();';
 }
 
-# ============================================================= Start up remote
 
 sub startupremote {
     my ($lowerurl)=@_;
@@ -841,7 +932,6 @@
     return 'LCmenu'.$hostid;
 }
 
-# ================================================================= Reopen menu
 
 sub reopenmenu {
    if (($env{'browser.interface'} eq 'textual') ||
@@ -851,7 +941,6 @@
    return('window.open('.$nothing.',"'.$menuname.'","",false);');
 } 
 
-# =============================================================== Open the menu
 
 sub open {
     my $returnval='';