version 1.10, 2007/11/01 19:56:39
|
version 1.13, 2008/11/04 03:25:53
|
Line 111 sub get_people_in_class {
|
Line 111 sub get_people_in_class {
|
|
|
my $classlist = &Apache::loncoursedata::get_classlist(); |
my $classlist = &Apache::loncoursedata::get_classlist(); |
my @keys = keys(%{$classlist}); |
my @keys = keys(%{$classlist}); |
# Sort by: Section, name |
# Sort by: fullname, username |
@keys = sort { |
@keys = sort { |
lc($classlist->{$a}[$section]) cmp lc($classlist->{$b}[$section]) || |
|
lc($classlist->{$a}[$fullname]) cmp lc($classlist->{$b}[$fullname]) || |
lc($classlist->{$a}[$fullname]) cmp lc($classlist->{$b}[$fullname]) || |
lc($a) cmp lc($b) |
lc($a) cmp lc($b) |
} (@keys); |
} (@keys); |
Line 179 sub get_people_in_class {
|
Line 178 sub get_people_in_class {
|
# This should be true for the first call for a page |
# This should be true for the first call for a page |
# and false for all other calls... only matters if |
# and false for all other calls... only matters if |
# multiselect is true. |
# multiselect is true. |
|
# $context - If email, do not include <br /><hr /> tags at the end |
|
# of the data table. |
# Returns: |
# Returns: |
# HTML text to add to the rendering of the helper. |
# HTML text to add to the rendering of the helper. |
# |
# |
sub render_student_list { |
sub render_student_list { |
my ($students, $formname, $formprefix, $defaultusers, |
my ($students, $formname, $formprefix, $defaultusers, |
$multiselect, $resultname, $javascript) = @_; |
$multiselect, $resultname, $javascript, $context) = @_; |
|
|
my $result = ""; |
my $result = ""; |
|
|
Line 331 SCRIPT
|
Line 332 SCRIPT
|
foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) { |
foreach my $sec (sort {lc($a) cmp lc($b)} (keys(%sections))) { |
$result .= '<option name="'.$sec.'">'.$sec.'</option>'."\n"; |
$result .= '<option name="'.$sec.'">'.$sec.'</option>'."\n"; |
} |
} |
$result .= '</td><td valign="top">'; |
$result .= '</select></td><td valign="top">'; |
$result .= '<input type="button" name="'.$formprefix.'.select" value="'.'Select" onclick=' |
$result .= '<input type="button" name="'.$formprefix.'.select" value="'.&mt('Select').'" onclick=' |
."'selectSections(\"$formprefix.chosensections\", \"$formprefix\")'".' /></td>'; |
."'selectSections(\"$formprefix.chosensections\", \"$formprefix\")'".' /></td>'; |
$result .= '<td valign="top"><input type="button" name="'.$formprefix |
$result .= '<td valign="top"><input type="button" name="'.$formprefix |
.'.unselect" value="'.&mt('Unselect').'" onclick='. |
.'.unselect" value="'.&mt('Unselect').'" onclick='. |
Line 397 SCRIPT
|
Line 398 SCRIPT
|
. '</td>'.&Apache::loncommon::end_data_table_row(). |
. '</td>'.&Apache::loncommon::end_data_table_row(). |
"\n"; |
"\n"; |
} |
} |
$result .= &Apache::loncommon::end_data_table(). |
$result .= &Apache::loncommon::end_data_table(); |
" <br /> <hr />\n"; |
if ($context ne 'email') { |
|
$result .= "<br /> <hr />\n"; |
|
} |
|
|
return $result; |
return $result; |
} |
} |