version 1.15, 2002/11/25 18:12:52
|
version 1.21, 2003/03/03 22:00:03
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# (Publication Handler |
|
# |
# |
# $Id$ |
# $Id$ |
# |
# |
Line 56 sub BuildProblemAnalysisPage {
|
Line 55 sub BuildProblemAnalysisPage {
|
$Ptr .= '<td align="left">'."\n"; |
$Ptr .= '<td align="left">'."\n"; |
my @sectionsSelected = split(':',$cache{'sectionsSelected'}); |
my @sectionsSelected = split(':',$cache{'sectionsSelected'}); |
my @sections = split(':',$cache{'sectionList'}); |
my @sections = split(':',$cache{'sectionList'}); |
$Ptr .= &Apache::lonhtmlcommon::MultipleSectionSelect(\@sections, |
$Ptr .= &Apache::lonstatistics::SectionSelect('Section','multiple',5); |
\@sectionsSelected, |
|
'Statistics'); |
|
$Ptr .= '</td></tr>'."\n"; |
$Ptr .= '</td></tr>'."\n"; |
$Ptr .= '<tr><td align="right"><b>Intervals</b></td>'."\n"; |
$Ptr .= '<tr><td align="right"><b>Intervals</b></td>'."\n"; |
$Ptr .= '<td align="left">'; |
$Ptr .= '<td align="left">'; |
Line 66 sub BuildProblemAnalysisPage {
|
Line 63 sub BuildProblemAnalysisPage {
|
$Ptr .= '</td></tr></table><br>'; |
$Ptr .= '</td></tr></table><br>'; |
$r->print($Ptr); |
$r->print($Ptr); |
$r->rflush(); |
$r->rflush(); |
|
# $r->print($cache{'OptionResponses'}.'<br>'); |
$r->print(&OptionResponseTable($cache{'OptionResponses'}, \%cache, $r)); |
$r->print(&OptionResponseTable($cache{'OptionResponses'}, \%cache, $r)); |
|
|
untie(%cache); |
untie(%cache); |
Line 117 sub BuildAnalyzePage {
|
Line 115 sub BuildAnalyzePage {
|
$r->print('Can not untie hash.'); |
$r->print('Can not untie hash.'); |
$r->rflush(); |
$r->rflush(); |
} |
} |
#if($status eq 'true') |
|
{ &Apache::lonhtmlcommon::Close_PrgWin($r); } |
|
|
|
|
&Apache::lonhtmlcommon::Close_PrgWin($r); |
|
|
|
### jason code for checing is there data in cache |
# my $error = |
# my $error = |
# &Apache::loncoursedata::DownloadStudentCourseDataSeparate($students, |
# &Apache::loncoursedata::DownloadStudentCourseDataSeparate($students, |
# 'true', |
# 'true', |
Line 134 sub BuildAnalyzePage {
|
Line 132 sub BuildAnalyzePage {
|
# return; |
# return; |
# } |
# } |
|
|
|
|
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { |
unless(tie(%cache,'GDBM_File',$cacheDB,&GDBM_READER(),0640)) { |
$Str .= 'Unable to tie database.'; |
$Str .= 'Unable to tie database.'; |
$r->print($Str); |
$r->print($Str); |
Line 146 sub BuildAnalyzePage {
|
Line 143 sub BuildAnalyzePage {
|
my $problem = $cache{$problemId.':problem'}; |
my $problem = $cache{$problemId.':problem'}; |
my $title = $cache{$problemId.':title'}; |
my $title = $cache{$problemId.':title'}; |
my $interval = $cache{'Interval'}; |
my $interval = $cache{'Interval'}; |
|
|
# my $title = 'LON-CAPA Statistics'; |
|
my $heading = 'Restore this particular Option Response Problem '. |
my $heading = 'Restore this particular Option Response Problem '. |
'Results, Please wait...'; |
'Results, Please wait...'; |
|
|
Line 178 sub BuildAnalyzePage {
|
Line 173 sub BuildAnalyzePage {
|
$Str = ''; |
$Str = ''; |
if($c->aborted()) { untie(%cache); return; } |
if($c->aborted()) { untie(%cache); return; } |
|
|
&Apache::lonhtmlcommon::Create_PrgWin($r, $title, $heading); |
|
|
|
my $count=0; |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r, $title, |
|
$heading,$#$students+1); |
|
|
#Java script Progress window |
#Java script Progress window |
for(my $index=0; $index<(scalar @$students); $index++) { |
for(my $index=0; $index<(scalar @$students); $index++) { |
if($c->aborted()) { untie(%cache); return; } |
if($c->aborted()) { untie(%cache); return; } |
$count++; |
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, |
my $displayString = $count.'/'.$studentCount.': '.$_; |
'last student '.$students->[$index]); |
&Apache::lonhtmlcommon::Update_PrgWin($displayString, $r); |
|
&OpStatus($problemId, $students->[$index], \%ConceptData, |
&OpStatus($problemId, $students->[$index], \%ConceptData, |
$analyzeData->{'foil_to_concept'}, $analyzeData, |
$analyzeData->{'foil_to_concept'}, $analyzeData, |
\%cache, $courseID); |
\%cache, $courseID); |
} |
} |
&Apache::lonhtmlcommon::Close_PrgWin($r); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
|
|
$Str .= '<br>'; |
$Str .= '<br>'; |
for (my $k=0; $k<$interval; $k++ ) { |
for (my $k=0; $k<$interval; $k++ ) { |
Line 438 sub DrawGraph {
|
Line 433 sub DrawGraph {
|
$GData = $Titr.'&Concepts&Answers&'.$Max.'&'.$P_No.'&'; |
$GData = $Titr.'&Concepts&Answers&'.$Max.'&'.$P_No.'&'; |
$GData .= (join(',',@data1)).'&'.(join(',',@data2)); |
$GData .= (join(',',@data1)).'&'.(join(',',@data2)); |
|
|
return '<IMG src="/cgi-bin/graph.gif?'.$GData.'" border=1/>'; |
return '<IMG src="/cgi-bin/graph.png?'.$GData.'" border=1/>'; |
} |
} |
|
|
sub DrawTable { |
sub DrawTable { |