--- loncom/interface/lonhtmlcommon.pm	2002/09/17 15:32:46	1.10
+++ loncom/interface/lonhtmlcommon.pm	2003/02/20 14:34:59	1.13
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.10 2002/09/17 15:32:46 matthew Exp $
+# $Id: lonhtmlcommon.pm,v 1.13 2003/02/20 14:34:59 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -438,13 +438,42 @@ sub StatusOptions {
     $Str .= '</select>'."\n";
 }
 
+
+########################################################
+########################################################
+
+=pod
+
+=item &MultipleSectionSelect()
+
+Inputs: 
+
+=over 4
+
+=item $sections A references to an array containing the names of all the
+sections used in a class.
+
+=item $selectedSections A reference to an array containing the names of the
+currently selected sections.
+
+=back 
+
+Returns: a string containing HTML for a multiple select box for
+selecting sections of a course.  
+
+The form element name is 'Section'.  @$sections is sorted prior to output.
+
+=cut
+
+########################################################
+########################################################
 sub MultipleSectionSelect {
     my ($sections,$selectedSections)=@_;
 
     my $Str = '';
     $Str .= '<select name="Section" multiple="true" size="4">'."\n";
 
-    foreach (@$sections) {
+    foreach (sort @$sections) {
         $Str .= '<option';
         foreach my $selected (@$selectedSections) {
             if($_ eq $selected) {
@@ -454,10 +483,29 @@ sub MultipleSectionSelect {
         $Str .= '>'.$_.'</option>'."\n";
     }
     $Str .= '</select>'."\n";
-
+    
     return $Str;
 }
 
+########################################################
+########################################################
+
+=pod
+
+=item &Title()
+
+Inputs: $pageName a string containing the name of the page to be sent
+to &Apache::loncommon::bodytag.
+
+Returns: string containing being <html> and complete <head> and <title>
+as well as a <script> to focus the current window and change its width
+and height to 500.  Why?  I do not know.  If you find out, please update
+this documentation.
+
+=cut
+
+########################################################
+########################################################
 sub Title {
     my ($pageName)=@_;
 
@@ -471,9 +519,12 @@ sub Title {
     return $Str;
 }
 
+########################################################
+########################################################
+
 =pod
 
-=item &CreateTableHeadings()
+=item &CreateHeadings()
 
 This function generates the column headings for the chart.
 
@@ -498,6 +549,8 @@ $Str: A formatted string of the table co
 
 =cut
 
+########################################################
+########################################################
 sub CreateHeadings {
     my ($data,$keyID,$headings,$displayString,$format)=@_;
     my $Str='';
@@ -524,6 +577,9 @@ sub CreateHeadings {
     return $Str;
 }
 
+########################################################
+########################################################
+
 =pod
 
 =item &FormatStudentInformation()
@@ -553,6 +609,8 @@ $Str: Formatted string.
 
 =cut
 
+########################################################
+########################################################
 sub FormatStudentInformation {
     my ($data,$name,$keyID,$displayString,$format)=@_;
     my $Str='';
@@ -577,6 +635,9 @@ sub FormatStudentInformation {
     return $Str;
 }
 
+########################################################
+########################################################
+
 # Create progress
 sub Create_PrgWin {
     my ($r, $title, $heading)=@_;