--- loncom/interface/Attic/londropadd.pm 2003/12/22 22:50:37 1.95
+++ loncom/interface/Attic/londropadd.pm 2004/02/11 15:30:36 1.101
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.95 2003/12/22 22:50:37 albertel Exp $
+# $Id: londropadd.pm,v 1.101 2004/02/11 15:30:36 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -42,7 +42,9 @@ use Apache::lonlocal;
###############################################################
###############################################################
sub header {
- my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager');
+ my $bodytag=&Apache::loncommon::bodytag('Enrollment Manager').
+ &Apache::loncommon::help_open_faq(9).
+ &Apache::loncommon::help_open_bug('Instructor Interface');
my $title = &mt('LON-CAPA Enrollment Manager');
return(<
$Text{'enrollone'} - + $help{'Course_Add_Student'}
$Text{'modify'} - + $help{'Course_Modify_Student_Data'}
$Text{'view'} - + $help{'Course_View_Class_List'}
$Text{'drop'} - + $help{'Course_Drop_Student'}
$Text{'populate'}
@@ -182,6 +190,7 @@ sub hidden_input {
sub print_upload_manager_header {
my ($r,$datatoken,$distotal,$krbdefdom)=@_;
my $javascript;
+ #
if (! exists($ENV{'form.upfile_associate'})) {
$ENV{'form.upfile_associate'} = 'forward';
}
@@ -197,7 +206,20 @@ sub print_upload_manager_header {
} else {
$javascript=&upload_manager_javascript_forward_associate();
}
- my $javascript_validations=&javascript_validations('auth',$krbdefdom);
+ #
+ # Deal with restored settings
+ my $password_choice = '';
+ if (exists($ENV{'form.ipwd_choice'}) &&
+ $ENV{'form.ipwd_choice'} ne '') {
+ # If a column was specified for password, assume it is for an
+ # internal password. This is a bug waiting to be filed (could be
+ # local or krb auth instead of internal) but I do not have the
+ # time to mess around with this now.
+ $password_choice = 'int';
+ }
+ #
+ my $javascript_validations=&javascript_validations('auth',$krbdefdom,
+ $password_choice);
my $checked=(($ENV{'form.noFirstLine'})?' checked="1"':'');
$r->print(''.&mt('Uploading Class List')."
\n".
"
\n".
@@ -227,17 +249,27 @@ sub print_upload_manager_header {
###############################################################
###############################################################
sub javascript_validations {
- my ($mode,$krbdefdom)=@_;
+ my ($mode,$krbdefdom,$curr_authtype,$curr_authfield)=@_;
my $authheader;
if ($mode eq 'auth') {
my %param = ( formname => 'studentform',
- kerb_def_dom => $krbdefdom );
+ kerb_def_dom => $krbdefdom,
+ curr_authtype => $curr_authtype);
$authheader = &Apache::loncommon::authform_header(%param);
} elsif ($mode eq 'createcourse') {
my %param = ( formname => 'ccrs',
- kerb_def_dom => $krbdefdom );
+ kerb_def_dom => $krbdefdom,
+ curr_authtype => $curr_authtype );
+ $authheader = &Apache::loncommon::authform_header(%param);
+ } elsif ($mode eq 'modifycourse') {
+ my %param = ( formname => 'cmod',
+ kerb_def_dom => $krbdefdom,
+ mode => 'modifycourse',
+ curr_authtype => $curr_authtype,
+ curr_autharg => $curr_authfield );
$authheader = &Apache::loncommon::authform_header(%param);
}
+
my %alert = &Apache::lonlocal::texthash
(username => 'You need to specify the username field.',
@@ -255,24 +287,59 @@ sub javascript_validations {
my $function_name =(<');
+ foreach (sort keys %coursepersonnel) {
+ $r->print('
');
+# --------------------------------------------------------------- Student roles
my $CCL=&mt('Current Class List');
$r->print(< ');
+ }
+ $r->print(''.$_.' ');
+ foreach (split(/\,/,$coursepersonnel{$_})) {
+ my ($puname,$pudom)=split(/\:/,$_);
+ $r->print(' '.&Apache::loncommon::aboutmewrapper(
+ &Apache::loncommon::plainname($puname,
+ $pudom),$puname,$pudom));
+ }
+ $r->print('
'.$starttime.'
'); return; } + # # Deal with date forms + my $current_date_description = ''; + my $textdate = ''; + + if (! defined($starttime) || $starttime == 0) { + $current_date_description = &mt('Current Starting Date: not set'). + '@@ -1308,8 +1437,9 @@ $info{'lastname'} $info{'generation'}, $ $lt{'disn'}
-$lt{'sec'}: +$lt{'sec'}:
+$current_date_description
$date_table