version 1.47, 2002/08/21 17:18:08
|
version 1.48, 2002/08/28 22:42:15
|
Line 359 sub PrepareData {
|
Line 359 sub PrepareData {
|
&SpaceColumns($students, $studentInformation, $headings, \%cache); |
&SpaceColumns($students, $studentInformation, $headings, \%cache); |
$cache{'updateTime:columnWidth'}=24; |
$cache{'updateTime:columnWidth'}=24; |
|
|
if($cache{'download'} ne 'false') { |
my $download = $cache{'download'}; |
my @who = ($cache{'download'}); |
my $downloadAll = $cache{'DownloadAll'}; |
|
my @allStudents=(); |
|
if($download ne 'false') { |
$cache{'download'} = 'false'; |
$cache{'download'} = 'false'; |
|
} elsif($downloadAll ne 'false') { |
|
$cache{'DownloadAll'} = 'false'; |
|
if($downloadAll eq 'sorted') { |
|
@allStudents = @$students; |
|
} else { |
|
@allStudents = split(':::', $cache{'NamesOfStudents'}); |
|
} |
|
} |
|
|
|
untie(%cache); |
|
|
|
if($download ne 'false') { |
|
my @who = ($download); |
if(&Apache::loncoursedata::DownloadStudentCourseData(\@who, 'false', |
if(&Apache::loncoursedata::DownloadStudentCourseData(\@who, 'false', |
$cacheDB, 'true', |
$cacheDB, 'true', |
'false', $courseID, |
'false', $courseID, |
$r, $c) ne 'OK') { |
$r, $c) ne 'OK') { |
untie(%cache); |
|
return 'Stop at download individual'; |
return 'Stop at download individual'; |
} |
} |
} elsif($cache{'DownloadAll'} ne 'false') { |
} elsif($downloadAll ne 'false') { |
$cache{'DownloadAll'} = 'false'; |
|
my @allStudents; |
|
if($cache{'DownloadAll'} eq 'sorted') { |
|
@allStudents = @$students; |
|
} else { |
|
@allStudents = split(':::', $cache{'NamesOfStudents'}); |
|
} |
|
if(&Apache::loncoursedata::DownloadStudentCourseData(\@allStudents, |
if(&Apache::loncoursedata::DownloadStudentCourseData(\@allStudents, |
'false', |
'false', |
$cacheDB, 'true', |
$cacheDB, 'true', |
'true', $courseID, |
'true', $courseID, |
$r, $c) ne 'OK') { |
$r, $c) ne 'OK') { |
untie(%cache); |
|
return 'Stop at download all'; |
return 'Stop at download all'; |
} |
} |
} |
} |
|
|
if($c->aborted()) { |
|
untie(%cache); |
|
return 'aborted'; |
|
} |
|
|
|
untie(%cache); |
|
|
|
return ('OK', $students); |
return ('OK', $students); |
} |
} |
|
|