version 1.70, 2003/05/13 14:30:26
|
version 1.71, 2003/05/27 14:51:24
|
Line 206 upon the calling context.
|
Line 206 upon the calling context.
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
sub PrepareClasslist { |
sub PrepareClasslist { |
my $r = shift; |
|
my %Sections; |
my %Sections; |
&clear_classlist_variables(); |
&clear_classlist_variables(); |
# |
# |
Line 342 sub PrepareClasslist {
|
Line 341 sub PrepareClasslist {
|
return; |
return; |
} |
} |
|
|
|
|
|
####################################################### |
|
####################################################### |
|
|
|
=pod |
|
|
|
=item get_students |
|
|
|
Returns a list of the selected students |
|
|
|
=cut |
|
|
|
####################################################### |
|
####################################################### |
|
sub get_students { |
|
if (! @Students) { |
|
&PrepareClasslist() |
|
} |
|
return @Students; |
|
} |
|
|
####################################################### |
####################################################### |
####################################################### |
####################################################### |
|
|
Line 739 sub MapSelect {
|
Line 759 sub MapSelect {
|
Returns html for a selection box allowing the user to choose one (or more) |
Returns html for a selection box allowing the user to choose one (or more) |
of the sections in the course. |
of the sections in the course. |
|
|
|
Uses the package variables @Sections and @SelectedSections |
=over 4 |
=over 4 |
|
|
=item $elementname The name of the HTML form element |
=item $elementname The name of the HTML form element |
Line 747 of the sections in the course.
|
Line 768 of the sections in the course.
|
|
|
=item $numvisible The number of options to be visible |
=item $numvisible The number of options to be visible |
|
|
=item $selected Array ref to the names of the already selected sections. |
|
If undef, $ENV{'form.'.$elementname} is used. |
|
If $ENV{'form.'.$elementname} is also empty, none will be selected. |
|
|
|
=item $restriction Code reference to subroutine which returns true or |
|
false. The code must expect a reference to a sequence data structure. |
|
|
|
=back |
=back |
|
|
=cut |
=cut |
Line 766 sub SectionSelect {
|
Line 780 sub SectionSelect {
|
return; |
return; |
} |
} |
# |
# |
|
# Make sure we have the data we need to continue |
|
if (! @Sections) { |
|
&PrepareClasslist() |
|
} |
|
# |
# Build the form element |
# Build the form element |
my $Str = "\n"; |
my $Str = "\n"; |
$Str .= '<select name="'.$elementname.'" '; |
$Str .= '<select name="'.$elementname.'" '; |
Line 952 END
|
Line 971 END
|
} |
} |
# |
# |
# Set up the statistics and chart environment |
# Set up the statistics and chart environment |
&PrepareClasslist($r); |
&PrepareClasslist(); |
&PrepareCourseData($r); |
&PrepareCourseData($r); |
# |
# |
# Begin form output |
# Begin form output |