version 1.4, 2002/07/26 19:49:26
|
version 1.7, 2002/08/05 20:53:38
|
Line 49 sub BuildStudentAssessmentPage {
|
Line 49 sub BuildStudentAssessmentPage {
|
$studentInformation,$r,$c)=@_; |
$studentInformation,$r,$c)=@_; |
# $jr = $r; |
# $jr = $r; |
my %cache; |
my %cache; |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { |
$r->print('<html><body>Unable to tie database.</body></html>'); |
$r->print('<html><body>Unable to tie database.</body></html>'); |
return; |
return; |
} |
} |
Line 86 sub BuildStudentAssessmentPage {
|
Line 86 sub BuildStudentAssessmentPage {
|
$students); |
$students); |
$r->print(&CreateInterface(\%cache, $selectedName, $students, $formName, |
$r->print(&CreateInterface(\%cache, $selectedName, $students, $formName, |
$doNotShow)); |
$doNotShow)); |
|
$r->rflush(); |
|
|
my $Str = ''; |
my $Str = ''; |
if($selectedName eq 'No Student Selected') { |
if($selectedName eq 'No Student Selected') { |
Line 98 sub BuildStudentAssessmentPage {
|
Line 99 sub BuildStudentAssessmentPage {
|
$r->print(&CreateTableHeadings(\%cache, $spacing, $infoKeys, $infoHeadings, |
$r->print(&CreateTableHeadings(\%cache, $spacing, $infoKeys, $infoHeadings, |
$sequenceKeys, $sequenceHeadings)); |
$sequenceKeys, $sequenceHeadings)); |
untie(%cache); |
untie(%cache); |
|
if($c->aborted()) { return $Str; } |
|
|
my $selected=0; |
my $selected=0; |
$r->print('<pre>'."\n"); |
$r->print('<pre>'."\n"); |
foreach (@$students) { |
foreach (@$students) { |
|
if($c->aborted()) { return $Str; } |
next if ($_ ne $selectedName && |
next if ($_ ne $selectedName && |
$selectedName ne 'All Students'); |
$selectedName ne 'All Students'); |
$selected = 1; |
$selected = 1; |
my $courseData; |
my $courseData; |
if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { |
my $downloadTime=''; |
if($cache{$_.':lastDownloadTime'} eq 'Not downloaded') { |
if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { |
untie(%cache); |
$downloadTime = $cache{$_.':lastDownloadTime'}; |
$courseData = |
untie(%cache); |
&Apache::loncoursedata::DownloadCourseInformation($_, |
} |
$courseID); |
if($downloadTime eq 'Not downloaded') { |
if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) { |
$courseData = |
&Apache::loncoursedata::ProcessStudentData(\%cache, |
&Apache::loncoursedata::DownloadCourseInformation($_, |
$courseData, $_); |
$courseID); |
untie(%cache); |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) { |
} else { |
next; |
last if($c->aborted()); |
|
next; |
|
} |
|
} else { |
|
untie(%cache); |
|
} |
} |
} else { |
&Apache::loncoursedata::ProcessStudentData(\%cache, |
last if($c->aborted()); |
$courseData, $_); |
next; |
untie(%cache); |
} |
} |
|
|
last if ($c->aborted()); |
next if($c->aborted()); |
|
|
if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) { |
if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { |
my $displayString = 'DISPLAYDATA'.$spacing; |
my $displayString = 'DISPLAYDATA'.$spacing; |
$r->print(&Apache::lonhtmlcommon::FormatStudentInformation( |
$r->print(&Apache::lonhtmlcommon::FormatStudentInformation( |
\%cache, $_, |
\%cache, $_, |
Line 139 sub BuildStudentAssessmentPage {
|
Line 137 sub BuildStudentAssessmentPage {
|
'preformatted')); |
'preformatted')); |
$r->print(&StudentReport(\%cache, $_, $spacing, $sequenceKeys)); |
$r->print(&StudentReport(\%cache, $_, $spacing, $sequenceKeys)); |
$r->print("\n"); |
$r->print("\n"); |
|
$r->rflush(); |
untie(%cache); |
untie(%cache); |
} |
} |
} |
} |