--- loncom/interface/Attic/londropadd.pm 2002/05/06 17:48:57 1.41 +++ loncom/interface/Attic/londropadd.pm 2002/07/31 14:56:34 1.43 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.41 2002/05/06 17:48:57 matthew Exp $ +# $Id: londropadd.pm,v 1.43 2002/07/31 14:56:34 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -145,12 +145,21 @@ sub domain_form { sub menu_phase_one { my $r=shift; 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(<

Upload a courselist

$upfile_select

+
+How to create a class list from a spreadsheet $create_classlist_help +
+How to create a CSV file from your spreadsheet $create_csv_help +


Enroll a single student

@@ -763,6 +772,7 @@ sub menu_phase_two_viewcsv { sub show_class_list { my ($r,$mode,%currentlist)=@_; my $cid=$ENV{'request.course.id'}; + # Print out header if ($mode eq 'view') { $r->print(< @@ -803,14 +813,16 @@ END END } elsif ($mode eq 'csv') { - $r->print($sname.','. - $sdom.','. - $reply{$sname}.','. - $info{'lastname'}.','. - $info{'firstname'}.','. - $info{'middlename'}.','. - $info{'generation'}.','. - $ssec."\n"); + my @line = (); + foreach ($sname,$sdom,$reply{$sname}, + $info{'lastname'},$info{'firstname'}, + $info{'middlename'},$info{'generation'},$ssec) { + push @line,&Apache::loncommon::csv_translate($_); + } + my $tmp = $"; + $" = '","'; + $r->print("\"@line\"\n"); + $" = $tmp; } } }