version 1.158, 2003/11/12 21:20:54
|
version 1.159, 2003/11/12 21:37:07
|
Line 3371 sub getSequenceDropDown {
|
Line 3371 sub getSequenceDropDown {
|
return $result; |
return $result; |
} |
} |
|
|
#FIXME, I am in loncreatecourse, use that one instead |
|
sub propath { |
|
my ($udom,$uname)=@_; |
|
$udom=~s/\W//g; |
|
$uname=~s/\W//g; |
|
my $subdir=$uname.'__'; |
|
$subdir =~ s/(.)(.)(.).*/$1\/$2\/$3/; |
|
my $proname="$Apache::lonnet::perlvar{'lonUsersDir'}/$udom/$subdir/$uname"; |
|
return $proname; |
|
} |
|
|
|
sub scantron_uploads { |
sub scantron_uploads { |
if (!-e $Apache::lonnet::perlvar{'lonScansDir'}) { return ''}; |
if (!-e $Apache::lonnet::perlvar{'lonScansDir'}) { return ''}; |
my $result= '<select name="scantron_selectfile">'; |
my $result= '<select name="scantron_selectfile">'; |
my $cdom=$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; |
my $cdom=$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}; |
my $cname=$ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
my $cname=$ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
my @files=&Apache::lonnet::dirlist('userfiles',$cdom,$cname, |
my @files=&Apache::lonnet::dirlist('userfiles',$cdom,$cname, |
&propath($cdom,$cname)); |
&Apache::locommon::propath($cdom,$cname)); |
foreach my $filename (@files) { |
foreach my $filename (@files) { |
($filename)=split(/&/,$filename); |
($filename)=split(/&/,$filename); |
if ($filename!~/^scantron_orig_/) { next ; } |
if ($filename!~/^scantron_orig_/) { next ; } |