[LON-CAPA-cvs] cvs: loncom /interface loncoursedata.pm lonhtmlcommon.pm lonstatistics.pm /interface/statistics lonproblemanalysis.pm lonproblemstatistics.pm lonstudentassessment.pm
stredwic
lon-capa-cvs@mail.lon-capa.org
Thu, 01 Aug 2002 20:49:06 -0000
This is a MIME encoded message
--stredwic1028234946
Content-Type: text/plain
stredwic Thu Aug 1 16:49:06 2002 EDT
Modified files:
/loncom/interface loncoursedata.pm lonhtmlcommon.pm
lonstatistics.pm
/loncom/interface/statistics lonproblemanalysis.pm
lonproblemstatistics.pm
lonstudentassessment.pm
Log:
First, added the parenthesis thing to the GDBM stuff. Fixed the interface
problem statistics so that the buttons work correctly. How the data
is interpretted is not finished.
--stredwic1028234946
Content-Type: text/plain
Content-Disposition: attachment; filename="stredwic-20020801164906.txt"
Index: loncom/interface/loncoursedata.pm
diff -u loncom/interface/loncoursedata.pm:1.9 loncom/interface/loncoursedata.pm:1.10
--- loncom/interface/loncoursedata.pm:1.9 Tue Jul 30 19:07:10 2002
+++ loncom/interface/loncoursedata.pm Thu Aug 1 16:49:06 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: loncoursedata.pm,v 1.9 2002/07/30 23:07:10 minaeibi Exp $
+# $Id: loncoursedata.pm,v 1.10 2002/08/01 20:49:06 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -246,7 +246,7 @@
=cut
sub ProcessTopResourceMap {
- my ($cache,$c)=@_;
+ my ($cache,$c,$r)=@_;
my %hash;
my $fn=$ENV{'request.course.fn'};
if(-e "$fn.db") {
@@ -255,7 +255,7 @@
if($c->aborted()) {
return;
}
- if(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER,0640)) {
+ if(tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) {
last;
}
$tieTries++;
@@ -337,8 +337,6 @@
':'.$currentResourceID;
}
- $cache->{$currentResourceID.':source'} =
- $hash{'src_'.$currentResourceID};
my $meta=$hash{'src_'.$currentResourceID};
# $cache->{$currentResourceID.':title'}=
# &Apache::lonnet::metdata($meta,'title');
@@ -531,6 +529,7 @@
$cache->{$name.':username'}=$studentName;
$cache->{$name.':domain'}=$studentDomain;
+ # Initialize timestamp for student
if(!defined($cache->{$name.':lastDownloadTime'})) {
$cache->{$name.':lastDownloadTime'}='Not downloaded';
$cache->{$name.':updateTime'}=' Not updated';
@@ -798,9 +797,9 @@
while($tieTries < $totalDelay) {
my $result=0;
if($isCached) {
- $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_READER,0640);
+ $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_READER(),0640);
} else {
- $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_NEWDB,0640);
+ $result=tie(%testData,'GDBM_File',$ChartDB,&GDBM_NEWDB(),0640);
}
if($result) {
last;
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.5 loncom/interface/lonhtmlcommon.pm:1.6
--- loncom/interface/lonhtmlcommon.pm:1.5 Fri Jul 26 12:22:09 2002
+++ loncom/interface/lonhtmlcommon.pm Thu Aug 1 16:49:06 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.5 2002/07/26 16:22:09 stredwic Exp $
+# $Id: lonhtmlcommon.pm,v 1.6 2002/08/01 20:49:06 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -30,11 +30,40 @@
use strict;
+sub AscendOrderOptions {
+ my ($order, $page, $formName)=@_;
+
+ my $OpSel1 = '';
+ my $OpSel2 = '';
+
+ if($order eq 'Ascending') {
+ $OpSel1 = ' selected';
+ } else {
+ $OpSel2 = ' selected';
+ }
+
+ my $Str = '';
+ $Str .= '<select name="'.(($page)?$page:'').'Ascend"';
+ if($formName) {
+ $Str .= ' onchange="document.'.$formName.'.submit()"';
+ }
+ $Str .= '>'."\n";
+ $Str .= '<option'.$OpSel1.'>Ascending</option>'."\n".
+ '<option'.$OpSel2.'>Descending</option>'."\n";
+ $Str .= '</select>'."\n";
+
+ return $Str;
+}
+
sub MapOptions {
- my ($data, $page)=@_;
+ my ($data, $page, $formName)=@_;
my $Str = '';
$Str .= '<select name="';
- $Str .= (($page)?$page:'').'Map">'."\n";
+ $Str .= (($page)?$page:'').'Maps"';
+ if($formName) {
+ $Str .= ' onchange="document.'.$formName.'.submit()"';
+ }
+ $Str .= '>'."\n";
my $selected = 0;
foreach my $sequence (split(':',$data->{'orderedSequences'})) {
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.37 loncom/interface/lonstatistics.pm:1.38
--- loncom/interface/lonstatistics.pm:1.37 Tue Jul 30 17:31:48 2002
+++ loncom/interface/lonstatistics.pm Thu Aug 1 16:49:06 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonstatistics.pm,v 1.37 2002/07/30 21:31:48 stredwic Exp $
+# $Id: lonstatistics.pm,v 1.38 2002/08/01 20:49:06 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -83,6 +83,7 @@
&CheckFormElement($cache, 'sort', 'sort', 'fullname');
&CheckFormElement($cache, 'download', 'download', 'false');
+ # student assessment
if(defined($ENV{'form.CreateStudentAssessment'}) ||
defined($ENV{'form.NextStudent'}) ||
defined($ENV{'form.PreviousStudent'})) {
@@ -110,6 +111,18 @@
$cache->{'sectionsSelected'} = $cache->{'sectionList'};
}
+ # Problem analysis
+ &CheckFormElement($cache, 'Interval', 'Interval', '1');
+
+ # ProblemStatistcs
+ &CheckFormElement($cache, 'DisplayCSVFormat',
+ 'DisplayFormat', 'Display Table Format');
+ &CheckFormElement($cache, 'ProblemStatisticsAscend',
+ 'ProblemStatisticsAscend', 'Ascending');
+ &CheckFormElement($cache, 'ProblemStatisticsMaps',
+ 'ProblemStatisticsMaps', 'All Maps');
+
+ # Search only form elements
my @headingColumns=();
my @sequenceColumns=();
my $foundColumn = 0;
@@ -131,6 +144,18 @@
$cache->{'reportKey'} = 'false';
if($cache->{'reportSelected'} eq 'Analyze') {
$cache->{'reportKey'} = 'Analyze';
+ } elsif($cache->{'reportSelected'} eq 'DoDiffGraph') {
+ $cache->{'reportKey'} = 'DoDiffGraph';
+ } elsif($cache->{'reportSelected'} eq 'PercentWrongGraph') {
+ $cache->{'reportKey'} = 'PercentWrongGraph';
+ }
+
+ if(defined($ENV{'form.DoDiffGraph'})) {
+ $cache->{'reportSelected'} = 'DoDiffGraph';
+ $cache->{'reportKey'} = 'DoDiffGraph';
+ } elsif(defined($ENV{'form.PercentWrongGraph'})) {
+ $cache->{'reportSelected'} = 'PercentWrongGraph';
+ $cache->{'reportKey'} = 'PercentWrongGraph';
}
foreach (keys(%ENV)) {
@@ -140,8 +165,6 @@
my $data;
(undef, $data)=split(':::', $_);
$cache->{'AnalyzeInfo'}=$data;
-
- &CheckFormElement($cache, 'Interval', 'Interval', '1');
} elsif(/form\.HeadingColumn/) {
my $value = $_;
$value =~ s/form\.//;
@@ -170,34 +193,6 @@
$cache->{'DefaultColumns'} = 'false';
return;
-
- # Select page to display
- if(defined($ENV{'form.ProblemStatistics'}) ||
- defined($ENV{'form.ProblemStatisticsRecalculate'}) ||
- defined($ENV{'form.DisplayCSVFormat'})) {
- $cache->{'GoToPage'} = 'ProblemStatistics';
- &CheckFormElement($cache, 'DisplayCSVFormat',
- 'DisplayFormat', 'Display Table Format');
- &CheckFormElement($cache, 'Ascend','ProblemStatisticsAscend',
- 'Ascending');
- &CheckFormElement($cache, 'Maps', 'ProblemStatisticsMap',
- 'All Maps');
- } elsif(defined($ENV{'form.ProblemAnalysis'})) {
- $cache->{'GoToPage'} = 'ProblemAnalysis';
- &CheckFormElement($cache, 'Interval', 'Interval', '1');
- } elsif(defined($ENV{'form.DoDiffGraph'})) {
- $cache->{'GoToPage'} = 'DoDiffGraph';
- } elsif(defined($ENV{'form.PercentWrongGraph'})) {
- $cache->{'GoToPage'} = 'PercentWrongGraph';
- } elsif(defined($ENV{'form.ActivityLog'})) {
- $cache->{'GoToPage'} = 'ActivityLog';
- } else {
- $cache->{'GoToPage'} = 'Menu';
- }
-
- &CheckFormElement($cache, 'Status', 'Status', 'Active');
-
- return;
}
=pod
@@ -298,7 +293,7 @@
}
sub PrepareData {
- my ($c, $cacheDB, $studentInformation, $headings)=@_;
+ my ($c, $cacheDB, $studentInformation, $headings,$r)=@_;
# Test for access to the cache data
my $courseID=$ENV{'request.course.id'};
@@ -315,13 +310,13 @@
# Download class list information if not using cached data
my %cache;
- unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) {
+ unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) {
return "Unable to tie hash to db file.";
}
if(!$isCached) {
my $processTopResourceMapReturn=
- &Apache::loncoursedata::ProcessTopResourceMap(\%cache, $c);
+ &Apache::loncoursedata::ProcessTopResourceMap(\%cache, $c, $r);
if($processTopResourceMapReturn ne 'OK') {
untie(%cache);
return $processTopResourceMapReturn;
@@ -441,7 +436,7 @@
my ($cacheDB,$students,$studentInformation,$headings)=@_;
my %cache;
- unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {
+ unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
return '<html><body>Unable to tie database.</body></html>';
}
@@ -544,6 +539,7 @@
my %reports = ('classlist' => 'Class list',
'problem_statistics' => 'Problem Statistics',
'student_assessment' => 'Student Assessment',
+ 'activitylog' => 'Activity Log',
'reportSelected' => 'Class list');
my %cache;
@@ -553,14 +549,14 @@
my ($returnValue, $students) = &PrepareData($c, $cacheDB,
\@studentInformation,
- \@headings);
+ \@headings,$r);
if($returnValue ne 'OK') {
$r->print('<html><body>'.$returnValue."\n".'</body></html>');
return OK;
}
my $GoToPage;
- if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {
+ if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
$GoToPage = $cache{'reportSelected'};
$reports{'reportSelected'} = $cache{'reportSelected'};
if(defined($cache{'reportKey'}) &&
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.2 loncom/interface/statistics/lonproblemanalysis.pm:1.3
--- loncom/interface/statistics/lonproblemanalysis.pm:1.2 Tue Jul 30 17:31:48 2002
+++ loncom/interface/statistics/lonproblemanalysis.pm Thu Aug 1 16:49:06 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonproblemanalysis.pm,v 1.2 2002/07/30 21:31:48 stredwic Exp $
+# $Id: lonproblemanalysis.pm,v 1.3 2002/08/01 20:49:06 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -48,7 +48,7 @@
my %cache;
my $Str = '';
- unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {
+ unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
$Str .= '<html><body>Unable to tie database.</body></html>';
return $Str;
}
@@ -73,20 +73,26 @@
if($c->aborted) {
return $Str;
}
- my $courseData =
- &Apache::loncoursedata::DownloadCourseInformation($_,
- $courseID);
- if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT,0640)) {
- &Apache::loncoursedata::ProcessStudentData(\%cache,
- $courseData, $_);
+ my $downloadTime='';
+ if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
+ $downloadTime = $cache{$_.':lastDownloadTime'};
untie(%cache);
- } else {
- last if($c->aborted());
- next;
+ }
+ if($downloadTime eq 'Not downloaded') {
+ my $courseData =
+ &Apache::loncoursedata::DownloadCourseInformation($_,
+ $courseID);
+ if(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) {
+ &Apache::loncoursedata::ProcessStudentData(\%cache,
+ $courseData, $_);
+ untie(%cache);
+ } else {
+ next;
+ }
}
}
- unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER,0640)) {
+ unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) {
$Str .= '<html><body>Unable to tie database.</body></html>';
return $Str;
}
@@ -108,17 +114,22 @@
return $Str;
}
+ if($c->aborted()) { untie(%cache); return $Str; }
+
#compute the intervals
&Interval($part, $problem, $interval, $analyzeData->{'concepts'},
\%ConceptData);
$title =~ s/\ /"_"/eg;
$Str .= '<br><b>'.$uri.'</b>';
+
+ if($c->aborted()) { untie(%cache); return $Str; }
#Java script Progress window
# &Create_PrgWin();
# &Update_PrgWin("Starting-to-analyze-problem");
for(my $index=0; $index<(scalar @$students); $index++) {
+ if($c->aborted()) { untie(%cache); return $Str; }
# &Update_PrgWin($index);
# &OpStatus($problem, $students->[$index], $courseID, \%ConceptData,
# $analyzeData->{'foil_to_concept'}, $analyzeData, \%cache);
@@ -129,10 +140,12 @@
$Str .= '<br>';
for (my $k=0; $k<$interval; $k++ ) {
+ if($c->aborted()) { untie(%cache); return $Str; }
$Str .= &DrawGraph($k, $title, $analyzeData->{'concepts'},
\%ConceptData);
}
for (my $k=0; $k<$interval; $k++ ) {
+ if($c->aborted()) { untie(%cache); return $Str; }
$Str .= &DrawTable($k, $analyzeData->{'concepts'}, \%ConceptData);
}
my $Answ=&Apache::lonnet::ssi($uri);
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.8 loncom/interface/statistics/lonproblemstatistics.pm:1.9
--- loncom/interface/statistics/lonproblemstatistics.pm:1.8 Tue Jul 30 19:08:56 2002
+++ loncom/interface/statistics/lonproblemstatistics.pm Thu Aug 1 16:49:06 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonproblemstatistics.pm,v 1.8 2002/07/30 23:08:56 minaeibi Exp $
+# $Id: lonproblemstatistics.pm,v 1.9 2002/08/01 20:49:06 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -56,9 +56,16 @@
$Ptr .= '<table border="0"><tbody>';
$Ptr .= '<tr><td align="right"><b>Select Map</b></td>'."\n";
$Ptr .= '<td align="left">';
- $Ptr .= &Apache::lonhtmlcommon::MapOptions(\%cache, 'ProblemStatistics');
+ $Ptr .= &Apache::lonhtmlcommon::MapOptions(\%cache, 'ProblemStatistics',
+ 'Statistics');
+ $Ptr .= '</td></tr>'."\n";
+ $Ptr .= '<tr><td align="right"><b>Sorting Type:</b></td>'."\n";
+ $Ptr .= '<td align="left">'."\n";
+ $Ptr .= &Apache::lonhtmlcommon::AscendOrderOptions(
+ $cache{'ProblemStatisticsAscend'},
+ 'ProblemStatistics',
+ 'Statistics');
$Ptr .= '</td></tr>'."\n";
- $Ptr .= &AscendOrderOptions($cache{'Ascend'});
$Ptr .= &ProblemStatisticsButtons($cache{'DisplayFormat'});
$Ptr .= '</table>';
$Ptr .= &ProblemStatisticsLegend();
@@ -166,13 +173,13 @@
foreach my $sequence (split(':', $cache->{'orderedSequences'})) {
my $tempProblemOrder=100;
- $tempSequenceOrder++;
-# if($cache->{'ProblemStatisticsMap'} ne 'All Maps' &&
-# $cache->{'ProblemStatisticsMap'} ne $cache->{$sequence.':title'}) {
+ if($cache->{'ProblemStatisticsMaps'} ne 'All Maps' &&
+ $cache->{'ProblemStatisticsMaps'} ne $cache->{$sequence.':title'}) {
# $r->print("<br>sequences=$cache->{'orderedSequences'}");
# $r->print("<br>".$cache->{$sequence.':title'});
-# next;
-# }
+ next;
+ }
+ $tempSequenceOrder++;
#$discrim .= '&';
foreach my $problemID (split(':', $cache->{$sequence.':problems'})) {
@@ -383,8 +390,12 @@
my $cIdx=0;
foreach my $sequence (split(':', $cache->{'orderedSequences'})) {
-
- &CreateProblemStatisticsTableHeading(1,$cache->{$sequence.':source'},
+ if($cache->{'ProblemStatisticsMaps'} ne 'All Maps' &&
+ $cache->{'ProblemStatisticsMaps'} ne $cache->{$sequence.':title'}) {
+ next;
+ }
+ &CreateProblemStatisticsTableHeading($cache->{'DisplayFormat'},
+ $cache->{$sequence.':source'},
$cache->{$sequence.':title'},
$headings,$r);
my ($tar,$Tries,$Wrongs,$Code,$Disc)=split(/\&/,
@@ -584,7 +595,7 @@
$Wrng,$DoD,$SD,$Sk,$_D1,$_D2,$DiscNo,$Prob)=split(/\&/,$Str);
# $r->print('<br>'.$Str);
my $Ptr;
- if ($ENV{'form.showcsv'}) {
+ if($cache->{'DisplayFormat'} eq 'Display CSV Format') {
my ($ResId,$Dummy)=split(/\*/,$Prob);
$Ptr="\n".'<br>'.
"\n".'"'.($RealIdx+1).'",'.
@@ -650,59 +661,10 @@
return \%color;
}
-
-sub StatusOptions {
- my ($cache)=@_;
-
- my $Status = $cache->{'Status'};
- my $OpSel1 = '';
- my $OpSel2 = '';
- my $OpSel3 = '';
-
- if($Status eq 'Any') { $OpSel3 = ' selected'; }
- elsif($Status eq 'Expired' ) { $OpSel2 = ' selected'; }
- else { $OpSel1 = ' selected'; }
-
- my $Ptr = '';
- $Ptr .= '<tr><td align="right"><b>Student Status:</b></td>'."\n";
- $Ptr .= '<td align="left"><select name="Status">';
- $Ptr .= '<option'.$OpSel1.'>Active</option>'."\n";
- $Ptr .= '<option'.$OpSel2.'>Expired</option>'."\n";
- $Ptr .= '<option'.$OpSel3.'>Any</option>'."\n";
- $Ptr .= '</select></td></tr>'."\n";
-
- return $Ptr;
-}
-
-sub AscendOrderOptions {
- my ($order)=@_;
-
- my $OpSel1 = '';
- my $OpSel2 = '';
-
- if($order eq 'Ascending') {
- $OpSel1 = ' selected';
- } else {
- $OpSel2 = ' selected';
- }
-
- my $Ptr = '';
- $Ptr .= '<tr><td align="right"><b>Sorting Type:</b></td>'."\n";
- $Ptr .= '<td align="left"><select name="Ascend">'."\n";
- $Ptr .= '<option'.$OpSel1.'>Ascending</option>'."\n".
- '<option'.$OpSel2.'>Descending</option>'."\n";
- $Ptr .= '</select></td></tr>'."\n";
-
- return $Ptr;
-}
-
sub ProblemStatisticsButtons {
my ($displayFormat)=@_;
my $Ptr = '<tr><td></td><td align="left">';
- $Ptr .= '<input type=submit name="ProblemStatisticsRecalculate" ';
- $Ptr .= 'value="Recalculate Statistics"/>'."\n";
- $Ptr .= ' ';
$Ptr .= '<input type="submit" name="DoDiffGraph" ';
$Ptr .= 'value="DoDiff Graph" />'."\n";
$Ptr .= ' ';
@@ -711,9 +673,9 @@
$Ptr .= ' ';
$Ptr .= '<input type="submit" name="DisplayCSVFormat" ';
if($displayFormat eq 'Display CSV Format') {
- $Ptr .= 'value="Display CSV Format" />'."\n";
- } else {
$Ptr .= 'value="Display Table Format" />'."\n";
+ } else {
+ $Ptr .= 'value="Display CSV Format" />'."\n";
}
$Ptr .= '</td></tr>';
@@ -858,14 +820,18 @@
my ($r)=@_;
my $graphData = &GetGraphData('DiffGraph', $r);
- return '<IMG src="/cgi-bin/graph.gif?'.$graphData.'" />';
+ $r->print('<IMG src="/cgi-bin/graph.gif?'.$graphData.'" />');
+
+ return;
}
sub BuildWrongGraph {
my ($r)=@_;
my $graphData = &GetGraphData('WrongGraph', $r);
- return '<IMG src="/cgi-bin/graph.gif?'.$graphData.'" />';
+ $r->print('<IMG src="/cgi-bin/graph.gif?'.$graphData.'" />');
+
+ return;
}
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.5 loncom/interface/statistics/lonstudentassessment.pm:1.6
--- loncom/interface/statistics/lonstudentassessment.pm:1.5 Wed Jul 31 10:35:38 2002
+++ loncom/interface/statistics/lonstudentassessment.pm Thu Aug 1 16:49:06 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonstudentassessment.pm,v 1.5 2002/07/31 14:35:38 stredwic Exp $
+# $Id: lonstudentassessment.pm,v 1.6 2002/08/01 20:49:06 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -49,7 +49,7 @@
$studentInformation,$r,$c)=@_;
# $jr = $r;
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>');
return;
}
@@ -98,10 +98,12 @@
$r->print(&CreateTableHeadings(\%cache, $spacing, $infoKeys, $infoHeadings,
$sequenceKeys, $sequenceHeadings));
untie(%cache);
+ if($c->aborted()) { return $Str; }
my $selected=0;
$r->print('<pre>'."\n");
foreach (@$students) {
+ if($c->aborted()) { return $Str; }
next if ($_ ne $selectedName &&
$selectedName ne 'All Students');
$selected = 1;
@@ -116,7 +118,6 @@
&Apache::loncoursedata::DownloadCourseInformation($_,
$courseID);
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_WRCREAT(),0640)) {
- last if($c->aborted());
next;
}
&Apache::loncoursedata::ProcessStudentData(\%cache,
@@ -124,9 +125,9 @@
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;
$r->print(&Apache::lonhtmlcommon::FormatStudentInformation(
\%cache, $_,
--stredwic1028234946--