Diff for /loncom/interface/lonhelper.pm between versions 1.130 and 1.131

version 1.130, 2006/01/24 22:20:19 version 1.131, 2006/03/02 23:56:55
Line 2374  SCRIPT Line 2374  SCRIPT
 </table>  </table>
 <br />  <br />
 BUTTONS  BUTTONS
       $result .= $buttons;   
   
     }      }
   
     if (defined $self->{ERROR_MSG}) {      if (defined $self->{ERROR_MSG}) {
Line 2430  BUTTONS Line 2432  BUTTONS
         }          }
         return $classlist->{$a}->[$fullname] cmp $classlist->{$b}->[$fullname];          return $classlist->{$a}->[$fullname] cmp $classlist->{$b}->[$fullname];
     } @keys;      } @keys;
       #
       #  now add the fancy section choice... first enumerate the sections:
       if ($self->{'multichoice'}) {
    my %sections;
    for my $key (@keys) {
       my $section_name = $classlist->{$key}->[$section];
       if ($section_name ne "") {
    $sections{$section_name} = 1;
       }
    }
    #  The variable $choice_widget will have the html to make the choice 
    #  selector.
    my $size=5;
    if (scalar(keys(%sections)) < 5) {
       $size=scalar(keys(%sections));
    }
    my $choice_widget = '<select multiple name="chosensections" size="'.$size.'">'."\n";
    foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) {
       $choice_widget .= "<option name=\"$sec\">$sec</option>\n";
    }
    $choice_widget .= "<option>none</option></select>\n";
   
    # Build a table without any borders to contain the section based
    # selection:
   
    my $section_selectors =<<SECTIONSELECT;
   <table border="0">
     <tr valign="top">
      <td>For Sections:</td><td>$choice_widget</td>
      <td><label><input type="radio" name="personstate" value="Active" checked />
                  Current Students</label></td>
      <td><label><input type="radio" name="personstate" value="All" />
                  All students</label></td>
      <td><label><input type="radio" name="personstate" value="Expired" />
                  Expired Students</label></td>
     </tr>
     <tr>
      <td><input type="button" value="Select" onclick="checksections(true);" /></td>
      <td><input type="button" value="Unselect" onclick="checksections(false);" /></td></tr>
   </table>
   <br />
   SECTIONSELECT
            $result .= $section_selectors;
       }
   
     # username, fullname, section, type      # username, fullname, section, type
     for (@keys) {      for (@keys) {
Line 2486  BUTTONS Line 2532  BUTTONS
     }      }
   
     $result .= "</table>\n\n";      $result .= "</table>\n\n";
     $result .= $buttons;     
     #  
     #  now add the fancy section choice... first enumerate the sections:  
     if ($self->{'multichoice'}) {  
  my %sections;  
  for my $key (@keys) {  
     my $section_name = $classlist->{$key}->[$section];  
     if ($section_name ne "") {  
  $sections{$section_name} = 1;  
     }  
  }  
  #  The variable $choice_widget will have the html to make the choice   
  #  selector.  
  my $size=5;  
  if (scalar(keys(%sections)) < 5) {  
     $size=scalar(keys(%sections));  
  }  
  my $choice_widget = '<select multiple name="chosensections" size="'.$size.'">'."\n";  
  foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) {  
     $choice_widget .= "<option name=\"$sec\">$sec</option>\n";  
  }  
  $choice_widget .= "<option>none</option></select>\n";  
   
  # Build a table without any borders to contain the section based  
  # selection:  
   
  my $section_selectors =<<SECTIONSELECT;  
 <table border="0">  
   <tr valign="top">  
    <td>For Sections:</td><td>$choice_widget</td>  
    <td><label><input type="radio" name="personstate" value="Active" checked />  
                Current Students</label></td>  
    <td><label><input type="radio" name="personstate" value="All" />  
                All students</label></td>  
    <td><label><input type="radio" name="personstate" value="Expired" />  
                Expired Students</label></td>  
   </tr>  
   <tr>  
    <td><input type="button" value="Select" onclick="checksections(true);" /></td>  
    <td><input type="button" value="Unselect" onclick="checksections(false);" /></td></tr>  
 </table>  
 <br />  
 SECTIONSELECT  
          $result .= $section_selectors;  
     }  
     return $result;      return $result;
 }  }
   

Removed from v.1.130  
changed lines
  Added in v.1.131


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>