--- loncom/interface/Attic/londropadd.pm 2007/08/28 13:00:45 1.167
+++ loncom/interface/Attic/londropadd.pm 2007/09/27 18:58:52 1.170
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.167 2007/08/28 13:00:45 raeburn Exp $
+# $Id: londropadd.pm,v 1.170 2007/09/27 18:58:52 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -179,27 +179,27 @@ sub print_main_menu {
{ text => 'Create a new group',
help => 'Course_Create_Group',
permission => $permission->{'grp_manage'},
- url => '/adm/coursegroups?refpage=enrl&action=create',
+ url => '/adm/coursegroups?refpage=enrl&action=create',
},
{ text => 'Modify an existing group',
help => 'Course_Modify_Group',
permission => $permission->{'grp_manage'},
- url => '/adm/coursegroups?refpage=enrl&action=modify',
+ url => '/adm/coursegroups?refpage=enrl&action=modify',
},
{ text => 'Delete an existing group',
help => 'Course_Delete_Group',
permission => $permission->{'grp_manage'},
- url => '/adm/coursegroups?refpage=enrl&action=delete',
+ url => '/adm/coursegroups?refpage=enrl&action=delete',
},
{ text => 'Re-enable a deleted group',
help => 'Course_Reenable_Group',
permission => $permission->{'grp_manage'},
- url => '/adm/coursegroups?refpage=enrl&action=reenable',
+ url => '/adm/coursegroups?refpage=enrl&action=reenable',
},
{ text => 'Enter an existing group',
help => 'Course_Display_Group',
permission => $permission->{'grp_view'},
- url => '/adm/coursegroups?refpage=enrl&action=view',
+ url => '/adm/coursegroups?refpage=enrl&action=view',
},
);
my $menu_html = '';
@@ -984,6 +984,7 @@ sub get_student_username_domain_form {
$jscript
$lt{'eos'}
END
+ $r->print($response);
$r->print(&single_user_entry_form($defdom,$srch,$forcenewuser));
return;
}
@@ -1364,6 +1365,11 @@ sub show_class_list {
}
my $displayphotos = $env{'form.displayphotos'};
+ if (! exists($env{'form.displayclickers'})) {
+ $env{'form.displayclickers'} = 'off';
+ }
+ my $displayclickers = $env{'form.displayclickers'};
+
# Print out header
unless ($mode eq 'autoenroll') {
$r->print(<print(<
+
END
if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') {
if ($linkto eq 'aboutme') {
@@ -1390,6 +1397,7 @@ END
'end' => "end date",
'type' => "enroll type/action",
'email' => "email address",
+ 'clicker'=> "clicker id",
'photo' => "photo",
);
unless ($mode eq 'autoenroll') {
@@ -1446,6 +1454,24 @@ function photowindow(photolink) {
$lt{'email'}
END
+
+# Clicker display on or off?
+
+ my %clicker_options = &Apache::lonlocal::texthash(
+ 'on' => 'Show',
+ 'off' => 'Hide',
+ );
+ my $clickerchg = 'on';
+ if ($displayclickers eq 'on') {
+ $clickerchg = 'off';
+ }
+ $r->print(' '."\n".' '.
+ ''.
+ $clicker_options{$clickerchg}.' '.$lt{'clicker'}."\n".
+ ' | '."\n");
+
+# Photo display on or off?
if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {
my %photo_options = &Apache::lonlocal::texthash(
'on' => 'Show',
@@ -1462,6 +1488,9 @@ END
' '."\n");
}
$r->print(" \n");
+
+# Done with the HTML header line
+
} elsif ($mode eq 'csv') {
#
# Open a file
@@ -1514,6 +1543,9 @@ END
"active groups","email address"],
$format->{'bold'});
}
+
+# Done with header lines in all formats
+
#
# Sort the students
my %index;
@@ -1557,12 +1589,8 @@ END
my %emails = &Apache::loncommon::getemails($username,$domain);
my $email;
- foreach my $type ('critnotification', 'permanentemail',
- 'notification') {
- if ($emails{$type} =~ /\S/) {
- $email = $emails{$type};
- last;
- }
+ if ($emails{'permanentemail'} =~ /\S/) {
+ $email = $emails{'permanentemail'};
}
if ($mode eq 'view' || $mode eq 'html' || $mode eq 'autoenroll') {
@@ -1626,6 +1654,19 @@ END
$active_groups |
$email |
END
+
+# Clickers
+ if ($displayclickers eq 'on') {
+ my $clickers =
+ (&Apache::lonnet::userenvironment($domain,$username,'clickers'))[1];
+ if ($clickers!~/\w/) { $clickers='-'; }
+ $r->print(''.$clickers.' | ');
+ } else {
+ $r->print(' | ');
+ }
+
+# Photos
+
if ($env{'course.'.$env{'request.course.id'}.
'.internal.showphoto'}) {
if ($displayphotos eq 'on') {
@@ -1715,8 +1756,8 @@ sub print_modify_student_form {
# determine the students name information
my %info=&Apache::lonnet::get('environment',
['firstname','middlename',
- 'lastname','generation','id'],
- $sdom, $sname);
+ 'lastname','generation','id',
+ 'permanentemail'], $sdom, $sname);
my ($tmp) = keys(%info);
if ($tmp =~ /^(con_lost|error|no_such_host)/i) {
$r->print(''.&mt('Error').''.
@@ -1770,6 +1811,7 @@ sub print_modify_student_form {
'mn' => "Middle",
'ln' => "Last",
'gen' => "Generation",
+ 'email' => "E-mail address",
'sid' => "Student ID",
'disn' => "Disable ID/Student Number Safeguard and Force Change of Conflicting IDs (only do if you know what you are doing)",
'sec' => "Section",
@@ -1799,8 +1841,8 @@ $lt{'odcc'}
-$lt{'mef'} $info{'firstname'} $info{'middlename'}
-$info{'lastname'} $info{'generation'}, $sname:$sdom
+$lt{'mef'} $info{'firstname'} $info{'middlename'}
+$info{'lastname'} $info{'generation'}, $sname:$sdom
$lt{'sn'}
+$lt{'email'}:
+
$lt{'sid'}: