END
@@ -167,6 +175,11 @@ END
###############################################################
###############################################################
+sub hidden_input {
+ my ($name,$value) = @_;
+ return ''."\n";
+}
+
sub print_upload_manager_header {
my ($r,$datatoken,$distotal,$krbdefdom)=@_;
my $javascript;
@@ -185,53 +198,72 @@ sub print_upload_manager_header {
} else {
$javascript=&upload_manager_javascript_forward_associate();
}
- my $javascript_validations=&javascript_validations($krbdefdom);
+ my $javascript_validations=&javascript_validations('auth',$krbdefdom);
my $checked=(($ENV{'form.noFirstLine'})?' checked="1"':'');
- $r->print(<Uploading Class List
-
-
Identify fields
-Total number of records found in file: $distotal
-Enter as many fields as you can. The system will inform you and bring you back
-to this page if the data selected is insufficient to run your class.
-
-
-
-
-
-
-Ignore First Line
-
-
-
-
-ENDPICK
+ $r->print('
'.&mt('Uploading Class List')."
\n".
+ "\n".
+ '
'.&mt('Identify fields')."
\n");
+ $r->print("
\n".
+ &mt('Total number of records found in file: [_1].',$distotal).
+ "\n".
+ "
\n");
+ $r->print(&mt('Enter as many fields as you can. '.
+ 'The system will inform you and bring you back to '.
+ 'this page if the data selected is insufficient to '.
+ 'enroll students in your class.')."\n");
+ $r->print(&hidden_input('action','upload').
+ &hidden_input('state','got_file').
+ &hidden_input('associate','').
+ &hidden_input('datatoken',$datatoken).
+ &hidden_input('fileupload',$ENV{'form.fileupload'}).
+ &hidden_input('upfiletype',$ENV{'form.upfiletype'}).
+ &hidden_input('upfile_associate',$ENV{'form.upfile_associate'}));
+ $r->print('');
+ $r->print(''.
+ &mt('Ignore First Line'));
+ $r->print("\n".
+ '');
}
###############################################################
###############################################################
sub javascript_validations {
- my ($krbdefdom)=@_;
- my %param = ( formname => 'studentform',
- kerb_def_dom => $krbdefdom );
- my $authheader = &Apache::loncommon::authform_header(%param);
- my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
- return (< 'studentform',
+ kerb_def_dom => $krbdefdom );
+ $authheader = &Apache::loncommon::authform_header(%param);
+ }
+ my %alert = &Apache::lonlocal::texthash
+ (username => 'You need to specify the username field.',
+ authen => 'You must choose an authentication type.',
+ krb => 'You need to specify the Kerberos domain.',
+ ipass => 'You need to specify the initial password.',
+ name => 'The optional name field was not specified.',
+ snum => 'The optional student number field was not specified.',
+ section => 'The optional section or group field was not specified.',
+ email => 'The optional email address field was not specified.',
+ continue => 'Continue enrollment?',
+ );
+
+# my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
+ my $function_name =(<print(<
-
-
+
+
Login Type
Note: this will not take effect if the user already exists
@@ -763,7 +791,7 @@ sub print_enroll_single_student_form {
# Set up authentication forms
my ($krbdef,$krbdefdom) =
&Apache::loncommon::get_kerberos_defaults($domain);
- $javascript_validations=&javascript_validations($krbdefdom);
+ $javascript_validations=&javascript_validations('auth',$krbdefdom);
my %param = ( formname => 'document.studentform',
kerb_def_dom => $krbdefdom,
kerb_def_auth => $krbdef
@@ -812,7 +840,7 @@ END
} else {
# User already exists. Do not worry about authentication
my %uenv = &Apache::lonnet::dump('environment',$domain,$username);
- $javascript_validations = &javascript_validations_without_auth();
+ $javascript_validations = &javascript_validations('noauth');
$user_data_html = <User Data for $username\@$domain
@@ -1521,27 +1549,25 @@ END
#
sub print_first_courselist_upload_form {
my $r=shift;
- my $upfile_select=&Apache::loncommon::upfile_select_html();
- my $create_classlist_help =
- &Apache::loncommon::help_open_topic("Course_Create_Class_List",
- "How do I create a class list from a spreadsheet");
- my $create_csv_help =
- &Apache::loncommon::help_open_topic("Course_Convert_To_CSV",
- "How do I create a CSV file from a spreadsheet");
- $r->print(<
-