--- loncom/interface/Attic/londropadd.pm 2005/04/07 07:34:52 1.128
+++ loncom/interface/Attic/londropadd.pm 2006/04/26 14:52:22 1.140
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.128 2005/04/07 07:34:52 albertel Exp $
+# $Id: londropadd.pm,v 1.140 2006/04/26 14:52:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -43,15 +43,9 @@ use Apache::lonlocal;
###############################################################
###############################################################
sub header {
- my $html=&Apache::lonxml::xmlbegin();
- my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager');
- my $title = &mt('LON-CAPA Enrollment Manager');
+ my $start_page=&Apache::loncommon::start_page('Enrollment Manager');
return(<
\n".''; + $Str .= "
\n".'
\n"; + "\n
\n";
$Str .= ''."
$krbform
@@ -1115,8 +1133,10 @@ $date_table
$lt{'idsn'}:
+
-
\n";
$Str .= &mt('Note: for large courses, this operation may be time '.
@@ -852,16 +868,16 @@ sub date_setting_table {
my ($starttime,$endtime,$mode) = @_;
my ($startform,$endform)=&setup_date_selectors($starttime,$endtime,$mode);
my $dateDefault = '
";
#
# Refresh the course environment
- &Apache::lonnet::coursedescription($env{'request.course.id'});
+ &Apache::lonnet::coursedescription($env{'request.course.id'},
+ {'freshen_cache' => 1});
} else {
$result .= &mt('Unable to set default dates for course').":".$put_result.
'
';
@@ -986,6 +1003,7 @@ sub print_enroll_single_student_form {
'psam' => "Please select an authentication mechanism",
'mail' => "Email Address"
);
+ my $authhelp=&Apache::loncommon::help_open_topic('Auth_Options');
$user_data_html = <
@@ -1003,7 +1021,7 @@ sub print_enroll_single_student_form {
$lt{'pswd'}
-$lt{'psam'}
+$lt{'psam'}$authhelp
');
+ $r->print('
');
+ $r->print(&Apache::loncommon::end_data_table());
#
# Interface output
$r->print('
+
END
if ($mode eq 'html' || $mode eq 'view' || $mode eq 'autoenroll') {
if ($linkto eq 'aboutme') {
@@ -1255,7 +1282,8 @@ END
'sec' => "section",
'start' => "start date",
'end' => "end date",
- 'type' => "enroll type/action"
+ 'type' => "enroll type/action",
+ 'photo' => "photo",
);
unless ($mode eq 'autoenroll') {
$r->print(<
'.&Apache::loncommon::start_data_table());
foreach my $role (sort keys %coursepersonnel) {
next if ($role =~ /^\s*$/);
- $r->print(' ');
+ $r->print(''.&Apache::loncommon::end_data_table_row());
}
- $r->print(''.$role.' ');
+ $r->print(&Apache::loncommon::start_data_table_row().
+ ' '.$role.' ');
foreach my $user (split(',',$coursepersonnel{$role})) {
my ($puname,$pudom)=split(':',$user);
$r->print(' '.&Apache::loncommon::aboutmewrapper(
@@ -1173,9 +1194,9 @@ sub print_html_classlist {
$pudom),
$puname,$pudom));
}
- $r->print('
+".&Apache::loncommon::start_data_table()."
");
if ($mode eq 'autoenroll') {
@@ -1293,8 +1334,23 @@ END
END
+ if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) {
+ my %photo_options = &Apache::lonlocal::texthash(
+ 'on' => 'Show',
+ 'off' => 'Hide',
+ );
+ my $photochg = 'on';
+ if ($displayphotos eq 'on') {
+ $photochg = 'off';
+ }
+ $r->print('
$lt{'end'}
- '."\n".' '.
+ ''.
+ $photo_options{$photochg}.' '.$lt{'photo'}."\n".
+ ' '."\n");
+ }
+ $r->print(" \n");
} elsif ($mode eq 'csv') {
#
# Open a file
@@ -1385,22 +1441,22 @@ END
} else {
$end = &Apache::lonlocal::locallocaltime($end);
}
- $r->print("\n ");
+ $r->print(&Apache::loncommon::start_data_table_row());
if ($mode eq 'autoenroll') {
my $lockedtype = $sdata->[$index{'lockedtype'}];
$studentcount++;
my $cellentry;
if ($type eq 'auto') {
- $cellentry = ''.&mt('auto').' Change';
+ $cellentry = ''.&mt('auto').' ';
$autocount ++;
} else {
- $cellentry = '
');
+ $r->print(&Apache::loncommon::end_data_table().'
');
} elsif ($mode eq 'excel') {
$excel_workbook->close();
$r->print('