--- loncom/interface/Attic/londropadd.pm 2002/05/06 17:48:57 1.41 +++ loncom/interface/Attic/londropadd.pm 2002/05/09 15:56:02 1.42 @@ -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.42 2002/05/09 15:56:02 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -763,6 +763,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 +804,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; } } }