--- loncom/interface/Attic/londropadd.pm 2002/01/04 15:56:07 1.18 +++ loncom/interface/Attic/londropadd.pm 2002/04/04 17:32:45 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.18 2002/01/04 15:56:07 www Exp $ +# $Id: londropadd.pm,v 1.22 2002/04/04 17:32:45 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -129,22 +129,22 @@ sub record_sep { if ($ENV{'form.upfiletype'} eq 'xml') { } elsif ($ENV{'form.upfiletype'} eq 'space') { my $i=0; - map { + foreach (split(/\s+/,$record)) { my $field=$_; $field=~s/^(\"|\')//; $field=~s/(\"|\')$//; $components{$i}=$field; $i++; - } split(/\s+/,$record); + } } elsif ($ENV{'form.upfiletype'} eq 'tab') { my $i=0; - map { + foreach (split(/\t+/,$record)) { my $field=$_; $field=~s/^(\"|\')//; $field=~s/(\"|\')$//; $components{$i}=$field; $i++; - } split(/\t+/,$record); + } } else { my @allfields=split(/\,/,$record); my $i=0; @@ -173,7 +173,9 @@ sub dropstudent { my ($udom,$unam,$courseid,$csec)=@_; $courseid=~s/\_/\//g; $courseid=~s/^(\w)/\/$1/; - map { + foreach (split(/\&/, + &Apache::lonnet::reply('dump:'.$udom.':'.$unam.':roles', + &Apache::lonnet::homeserver($unam,$udom)))) { my ($key,$value)=split(/\=/,$_); $key=&Apache::lonnet::unescape($key); if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { @@ -197,8 +199,7 @@ sub dropstudent { } } } - } split(/\&/,&Apache::lonnet::reply('dump:'.$udom.':'.$unam.':roles', - &Apache::lonnet::homeserver($unam,$udom))); + } } # ============================================================== Menu Phase One @@ -252,7 +253,9 @@ sub menu_phase_two_upload {

Identify fields

-Total number of records found in file: $distotal +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.