[LON-CAPA-cvs] cvs: loncom /interface lonselstudent.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Wed, 17 May 2006 15:04:42 -0000
albertel Wed May 17 11:04:42 2006 EDT
Modified files:
/loncom/interface lonselstudent.pm
Log:
- style police
Index: loncom/interface/lonselstudent.pm
diff -u loncom/interface/lonselstudent.pm:1.3 loncom/interface/lonselstudent.pm:1.4
--- loncom/interface/lonselstudent.pm:1.3 Wed May 17 11:01:40 2006
+++ loncom/interface/lonselstudent.pm Wed May 17 11:04:42 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# lonselstudent.pm : Reusable subs for student selection.
#
-# $Id: lonselstudent.pm,v 1.3 2006/05/17 15:01:40 albertel Exp $
+# $Id: lonselstudent.pm,v 1.4 2006/05/17 15:04:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -71,19 +71,19 @@
# Enumerate the course_personnel.
#
my @course_personnel;
- for (sort keys %coursepersonnel) {
- for my $role (split /,/, $coursepersonnel{$_}) {
+ for (sort(keys(%coursepersonnel))) {
+ for my $role (split(/,/, $coursepersonnel{$_})) {
# extract the names so we can sort them
my @people;
- for (split /,/, $role) {
- push @people, [split /:/, $role];
+ for (split(/,/, $role)) {
+ push(@people, [split(/:/, $role)]);
}
- @people = sort { $a->[0] cmp $b->[0] } @people;
+ @people = sort { $a->[0] cmp $b->[0] } (@people);
for my $person (@people) {
- push @course_personnel, [join(':', @$person), $person->[0], '', $_];
+ push(@course_personnel, [join(':', @$person), $person->[0], '', $_]);
}
}
}
@@ -102,14 +102,14 @@
my $classlist = &Apache::loncoursedata::get_classlist();
- my @keys = keys %{$classlist};
+ my @keys = keys(%{$classlist});
# Sort by: Section, name
@keys = sort {
if ($classlist->{$a}->[$section] ne $classlist->{$b}->[$section]) {
return $classlist->{$a}->[$section] cmp $classlist->{$b}->[$section];
}
return $classlist->{$a}->[$fullname] cmp $classlist->{$b}->[$fullname];
- } @keys;
+ } (@keys);
@@ -118,9 +118,9 @@
if ( $classlist->{$_}->[$status] eq
'Active') {
- push @current_members, [$_, $classlist->{$_}->[$fullname],
+ push(@current_members, [$_, $classlist->{$_}->[$fullname],
$classlist->{$_}->[$section],
- $classlist->{$_}->[$status], 'Student'];
+ $classlist->{$_}->[$status], 'Student']);
} else {
# Need to figure out if this user is future or
# Expired... If the start date is in the future
@@ -128,13 +128,13 @@
my $now = time;
if ($classlist->{$_}->[$start_date] > $now) {
- push @future_members, [$_, $classlist->{$_}->[$fullname],
+ push(@future_members, [$_, $classlist->{$_}->[$fullname],
$classlist->{$_}->[$section],
- "Future", "Student"];
+ "Future", "Student"]);
} else {
- push @expired_members, [$_, $classlist->{$_}->[$fullname],
+ push(@expired_members, [$_, $classlist->{$_}->[$fullname],
$classlist->{$_}->[$section],
- "Expired", "Student"];
+ "Expired", "Student"]);
}
}
@@ -355,7 +355,7 @@
# Figure out which students are checked by default...
- if(%$defaultusers) {
+ if (%$defaultusers) {
if (exists ($defaultusers->{$user})) {
$result .= ' checked ="checked" ';
$checked = 1;
@@ -364,22 +364,22 @@
$result .= ' checked="checked" ';
$checked = 1; # First one for radio if no default specified.
}
- $result .= ' value="'. HTML::Entities::encode($user . ':'
- .$student->[2] . ':'
+ $result .= ' value="'.&HTML::Entities::encode($user . ':'
+ .$student->[2] . ':'
.$student->[1] . ':'
.$student->[3] . ':'
.$student->[4] . ":"
.$formprefix, "<>&\"'")
."\" /></td><td>\n";
- $result .= HTML::Entities::encode($student->[1], '<>&"')
+ $result .= &HTML::Entities::encode($student->[1], '<>&"')
. '</td><td align="center" >'."\n";
- $result .= HTML::Entities::encode($student->[2], '<>&"')
+ $result .= &HTML::Entities::encode($student->[2], '<>&"')
. '</td><td align="center">'."\n";
- $result .= HTML::Entities::encode($student->[3], '<>&"')
+ $result .= &HTML::Entities::encode($student->[3], '<>&"')
. '</td><td align="center">'."\n";
- $result .= HTML::Entities::encode($student->[4], '<>&"')
+ $result .= &HTML::Entities::encode($student->[4], '<>&"')
. '</td><td align="center">'."\n";
- $result .= HTML::Entities::encode($student->[0], '<>&"')
+ $result .= &HTML::Entities::encode($student->[0], '<>&"')
. '</td>'.&Apache::loncommon::end_data_table_row().
"\n";
}