--- loncom/interface/Attic/londropadd.pm 2007/04/17 18:28:44 1.159
+++ loncom/interface/Attic/londropadd.pm 2007/07/17 21:24:17 1.163
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.159 2007/04/17 18:28:44 www Exp $
+# $Id: londropadd.pm,v 1.163 2007/07/17 21:24:17 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -752,8 +752,8 @@ sub enroll_single_student {
}
$r->print('
'.&mt('Enrolling Student').'
');
- $r->print(''.&mt('Enrolling').' '.$env{'form.cuname'}." \@ ".
- $env{'form.lcdomain'}.'
');
+ $r->print(''.&mt('Enrolling [_1] : [_2]',$env{'form.cuname'},
+ $env{'form.lcdomain'}).'
');
if (($env{'form.cuname'})
&& ($env{'form.cuname'}
eq &LONCAPA::clean_username($env{'form.cuname'}))
@@ -886,7 +886,8 @@ sub date_setting_table {
my ($startform,$endform)=&setup_date_selectors($starttime,$endtime,$mode);
my $dateDefault = ''.
'';
+ &mt('make these dates the default for future enrollment').
+ '';
if ($mode eq 'create_enrolldates' || $mode eq 'create_defaultdates') {
$dateDefault = ' ';
}
@@ -1020,16 +1021,16 @@ sub print_enroll_single_student_form {
);
my $authhelp=&Apache::loncommon::help_open_topic('Auth_Options');
$user_data_html = <$lt{'udf'} $username\@$domain
+$lt{'udf'} $username:$domain
: |
- |
+ |
: |
- |
+ |
: |
- |
+ |
: |
- |
+ |
: |
$homeserver_form |
: |
@@ -1059,29 +1060,19 @@ END
'mail' => "Email Address",
);
$user_data_html = <$lt{'udf'} $username\@$domain
+$lt{'udf'} $username:$domain
END
}
@@ -1144,19 +1135,18 @@ $user_data_html
$lt{'cd'}
:
-
-$date_table
+$date_table
$lt{'idsn'}
-:
+:
-
+
END
return;
@@ -1306,6 +1296,7 @@ END
'start' => "start date",
'end' => "end date",
'type' => "enroll type/action",
+ 'email' => "email address",
'photo' => "photo",
);
unless ($mode eq 'autoenroll') {
@@ -1358,6 +1349,8 @@ function photowindow(photolink) {
$lt{'end'}
$lt{'grp'}
+ |
+ $lt{'email'}
|
END
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {
@@ -1401,13 +1394,15 @@ END
print $CSVfile '"'.join('","',map {
&Apache::loncommon::csv_translate(&mt($_))
} ("username","domain","ID","student name",
- "section","start date","end date","status","active groups"))
+ "section","start date","end date","status",
+ "active groups","email address"))
.'"'."\n";
} else {
print $CSVfile '"'.join('","',map {
&Apache::loncommon::csv_translate(&mt($_))
} ("username","domain","ID","student name",
- "section","start date","end date","active groups")).'"'."\n";
+ "section","start date","end date",
+ "active groups","email address")).'"'."\n";
}
} elsif ($mode eq 'excel') {
# Create the excel spreadsheet
@@ -1423,7 +1418,7 @@ END
$excel_sheet->write($row++,0,["username","domain","ID",
"student name","section",
"start date","end date","status",
- "active groups"],
+ "active groups","email address"],
$format->{'bold'});
}
#
@@ -1462,10 +1457,21 @@ END
my $name = $sdata->[$index{'fullname'}];
my $id = $sdata->[$index{'id'}];
my $status = $sdata->[$index{'status'}];
+ next if (($statusmode ne 'Any') && ($status ne $statusmode));
my $start = $sdata->[$index{'start'}];
my $end = $sdata->[$index{'end'}];
my $type = $sdata->[$index{'type'}];
- next if (($statusmode ne 'Any') && ($status ne $statusmode));
+
+ my %emails = &Apache::loncommon::getemails($username,$domain);
+ my $email;
+ foreach my $type ('critnotification', 'permanentemail',
+ 'notification') {
+ if ($emails{$type} =~ /\S/) {
+ $email = $emails{$type};
+ last;
+ }
+ }
+
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') {
if (! defined($start) || $start == 0) {
$start = &mt('none');
@@ -1525,6 +1531,7 @@ END
$start |
$end |
$active_groups |
+ $email |
END
if ($env{'course.'.$env{'request.course.id'}.
'.internal.showphoto'}) {
@@ -1561,6 +1568,7 @@ END
push @line,&Apache::loncommon::csv_translate($status);
}
push @line,&Apache::loncommon::csv_translate($active_groups);
+ push @line,&Apache::loncommon::csv_translate($email);
print $CSVfile '"'.join('","',@line).'"'."\n";
} elsif ($mode eq 'excel') {
$excel_sheet->write($row,0,[$username,$domain,$id,
@@ -1577,6 +1585,7 @@ END
}
$excel_sheet->write($row,$col++,$status);
$excel_sheet->write($row,$col++,$active_groups);
+ $excel_sheet->write($row,$col++,$email);
$row++;
}
}
@@ -1698,7 +1707,7 @@ $lt{'odcc'}
$lt{'mef'} $info{'firstname'} $info{'middlename'}
-$info{'lastname'} $info{'generation'}, $sname\@$sdom
+$info{'lastname'} $info{'generation'}, $sname:$sdom
$lt{'sn'}
-$lt{'sid'}:
+$lt{'sid'}:
-$lt{'sec'}:
+$lt{'sec'}:
$current_date_description
$date_table
@@ -1759,7 +1768,7 @@ sub modify_single_student {
$env{'request.course.id'});
my ($tmp) = keys(%old);
if ($tmp =~ /^(con_lost|error|no_such_host)/i) {
- $r->print(&mt('There was an error determining the environment values for')." $slogin \@ $sdom.");
+ $r->print(&mt('There was an error determining the environment values for')." $slogin : $sdom.");
return;
}
undef $tmp;
@@ -1799,7 +1808,7 @@ sub modify_single_student {
'et' => "End Time",
);
$r->print(<$lt{'mdu'} $slogin \@ $sdom
+ $lt{'mdu'} $slogin : $sdom
$lt{'si'}
@@ -1859,8 +1868,8 @@ END
&mt('The error reported was')." ".
$roleresults);
&Apache::lonnet::logthis("londropadd:failed attempt to modify student".
- " data for ".$slogin." \@ ".$sdom." by ".
- $env{'user.name'}." \@ ".$env{'user.domain'}.
+ " data for ".$slogin." : ".$sdom." by ".
+ $env{'user.name'}." : ".$env{'user.domain'}.
":".$roleresults);
} else { # everything is okay!
$r->print(&mt('Student information updated successfully.')."
".
---|