version 1.242, 2005/02/07 17:07:58
|
version 1.243, 2005/02/12 02:37:00
|
Line 2655 sub csvupload_javascript_reverse_associa
|
Line 2655 sub csvupload_javascript_reverse_associa
|
function verify(vf) { |
function verify(vf) { |
var foundsomething=0; |
var foundsomething=0; |
var founduname=0; |
var founduname=0; |
|
var foundID=0; |
var founddomain=0; |
var founddomain=0; |
for (i=0;i<=vf.nfields.value;i++) { |
for (i=0;i<=vf.nfields.value;i++) { |
tw=eval('vf.f'+i+'.selectedIndex'); |
tw=eval('vf.f'+i+'.selectedIndex'); |
if (i==0 && tw!=0) { founduname=1; } |
if (i==0 && tw!=0) { foundID=1; } |
if (i==1 && tw!=0) { founddomain=1; } |
if (i==1 && tw!=0) { founduname=1; } |
if (i!=0 && i!=1 && tw!=0) { foundsomething=1; } |
if (i==2 && tw!=0) { founddomain=1; } |
|
if (i!=0 && i!=1 && i!=2 && tw!=0) { foundsomething=1; } |
} |
} |
if (founduname==0 || founddomain==0) { |
if ((founduname==0 && foundID==0) || founddomain==0) { |
alert('You need to specify at both the username and domain'); |
alert('You need to specify the domain and either the username or ID'); |
return; |
return; |
} |
} |
if (foundsomething==0) { |
if (foundsomething==0) { |
Line 2693 sub csvupload_javascript_forward_associa
|
Line 2695 sub csvupload_javascript_forward_associa
|
function verify(vf) { |
function verify(vf) { |
var foundsomething=0; |
var foundsomething=0; |
var founduname=0; |
var founduname=0; |
|
var foundID=0; |
var founddomain=0; |
var founddomain=0; |
for (i=0;i<=vf.nfields.value;i++) { |
for (i=0;i<=vf.nfields.value;i++) { |
tw=eval('vf.f'+i+'.selectedIndex'); |
tw=eval('vf.f'+i+'.selectedIndex'); |
if (tw==1) { founduname=1; } |
if (tw==1) { foundID=1; } |
if (tw==2) { founddomain=1; } |
if (tw==2) { founduname=1; } |
if (tw>2) { foundsomething=1; } |
if (tw==3) { founddomain=1; } |
|
if (tw>3) { foundsomething=1; } |
} |
} |
if (founduname==0 || founddomain==0) { |
if ((founduname==0 && foundID==0) || founddomain==0) { |
alert('You need to specify at both the username and domain'); |
alert('You need to specify the domain and either the username or ID'); |
return; |
return; |
} |
} |
if (foundsomething==0) { |
if (foundsomething==0) { |
Line 2768 ENDPICK
|
Line 2772 ENDPICK
|
sub csvupload_fields { |
sub csvupload_fields { |
my ($url,$symb) = @_; |
my ($url,$symb) = @_; |
my (@parts) = &getpartlist($url,$symb); |
my (@parts) = &getpartlist($url,$symb); |
my @fields=(['username','Student Username'],['domain','Student Domain']); |
my @fields=(['ID','Student ID'], |
|
['username','Student Username'], |
|
['domain','Student Domain']); |
foreach my $part (sort(@parts)) { |
foreach my $part (sort(@parts)) { |
my @datum; |
my @datum; |
my $display=&Apache::lonnet::metadata($url,$part.'.display'); |
my $display=&Apache::lonnet::metadata($url,$part.'.display'); |
Line 2899 sub csvuploadassign {
|
Line 2905 sub csvuploadassign {
|
my $countdone=0; |
my $countdone=0; |
foreach my $grade (@gradedata) { |
foreach my $grade (@gradedata) { |
my %entries=&Apache::loncommon::record_sep($grade); |
my %entries=&Apache::loncommon::record_sep($grade); |
my $username=$entries{$fields{'username'}}; |
|
$username=~s/\s//g; |
|
my $domain=$entries{$fields{'domain'}}; |
my $domain=$entries{$fields{'domain'}}; |
$domain=~s/\s//g; |
$domain=~s/\s//g; |
|
my $username=$entries{$fields{'username'}}; |
|
$username=~s/\s//g; |
|
if (!$username) { |
|
my $id=$entries{$fields{'ID'}}; |
|
my %ids=&Apache::lonnet::idget($domain,$id); |
|
$username=$ids{$id}; |
|
} |
if (!exists($$classlist{"$username:$domain"})) { |
if (!exists($$classlist{"$username:$domain"})) { |
push(@skipped,"$username:$domain"); |
push(@skipped,"$username:$domain"); |
next; |
next; |