version 1.41, 2002/05/06 17:48:57
|
version 1.43, 2002/07/31 14:56:34
|
Line 145 sub domain_form {
|
Line 145 sub domain_form {
|
sub menu_phase_one { |
sub menu_phase_one { |
my $r=shift; |
my $r=shift; |
my $upfile_select=&Apache::loncommon::upfile_select_html(); |
my $upfile_select=&Apache::loncommon::upfile_select_html(); |
|
my $create_classlist_help = |
|
&Apache::loncommon::help_open_topic("Course_Create_Class_List"); |
|
my $create_csv_help = |
|
&Apache::loncommon::help_open_topic("Course_Convert_To_CSV"); |
$r->print(<<ENDUPFORM); |
$r->print(<<ENDUPFORM); |
<input type=hidden name=phase value=two> |
<input type=hidden name=phase value=two> |
<hr> |
<hr> |
<h3>Upload a courselist</h3> |
<h3>Upload a courselist</h3> |
$upfile_select |
$upfile_select |
<p><input type=submit name="fileupload" value="Upload Courselist"> |
<p><input type=submit name="fileupload" value="Upload Courselist"> |
|
<br /> |
|
How to create a class list from a spreadsheet $create_classlist_help |
|
<br /> |
|
How to create a CSV file from your spreadsheet $create_csv_help |
|
|
<hr /> |
<hr /> |
<h3>Enroll a single student</h3> |
<h3>Enroll a single student</h3> |
<p><input type=submit name="enroll" value="Enroll Student"></p> |
<p><input type=submit name="enroll" value="Enroll Student"></p> |
Line 763 sub menu_phase_two_viewcsv {
|
Line 772 sub menu_phase_two_viewcsv {
|
sub show_class_list { |
sub show_class_list { |
my ($r,$mode,%currentlist)=@_; |
my ($r,$mode,%currentlist)=@_; |
my $cid=$ENV{'request.course.id'}; |
my $cid=$ENV{'request.course.id'}; |
|
# Print out header |
if ($mode eq 'view') { |
if ($mode eq 'view') { |
$r->print(<<END); |
$r->print(<<END); |
<p> |
<p> |
Line 803 END
|
Line 813 END
|
</tr> |
</tr> |
END |
END |
} elsif ($mode eq 'csv') { |
} elsif ($mode eq 'csv') { |
$r->print($sname.','. |
my @line = (); |
$sdom.','. |
foreach ($sname,$sdom,$reply{$sname}, |
$reply{$sname}.','. |
$info{'lastname'},$info{'firstname'}, |
$info{'lastname'}.','. |
$info{'middlename'},$info{'generation'},$ssec) { |
$info{'firstname'}.','. |
push @line,&Apache::loncommon::csv_translate($_); |
$info{'middlename'}.','. |
} |
$info{'generation'}.','. |
my $tmp = $"; |
$ssec."\n"); |
$" = '","'; |
|
$r->print("\"@line\"\n"); |
|
$" = $tmp; |
} |
} |
} |
} |
} |
} |