version 1.78, 2004/03/12 20:29:48
|
version 1.80, 2004/03/16 16:30:31
|
Line 160 sub BuildProblemAnalysisPage {
|
Line 160 sub BuildProblemAnalysisPage {
|
$ProblemData, |
$ProblemData, |
\@Students); |
\@Students); |
} elsif ($current_problem->{'resptype'} eq 'numerical') { |
} elsif ($current_problem->{'resptype'} eq 'numerical') { |
# if (exists($ENV{'form.ExcelOutput'})) { |
|
# &Apache::lonstudentsubmissions::prepare_excel_output |
|
# ($r,$current_problem,$ProblemData,\@Students); |
|
# } else { |
|
&NumericalResponseAnalysis($r,$current_problem, |
&NumericalResponseAnalysis($r,$current_problem, |
$ProblemData,\@Students); |
$ProblemData,\@Students); |
# } |
|
} else { |
} else { |
$r->print('<h2>This analysis is not supported</h2>'); |
$r->print('<h2>This analysis is not supported</h2>'); |
} |
} |
Line 192 sub BuildProblemAnalysisPage {
|
Line 187 sub BuildProblemAnalysisPage {
|
######################################################### |
######################################################### |
sub NumericalResponseAnalysis { |
sub NumericalResponseAnalysis { |
my ($r,$problem,$ProblemData,$Students) = @_; |
my ($r,$problem,$ProblemData,$Students) = @_; |
|
my $c = $r->connection(); |
my ($resource,$respid) = ($problem->{'resource'}, |
my ($resource,$respid) = ($problem->{'resource'}, |
$problem->{'respid'}); |
$problem->{'respid'}); |
|
$r->print('Response '.$respid.'</br />'); |
my $analysis_html; |
my $analysis_html; |
my $PerformanceData = |
my $PerformanceData = |
&Apache::loncoursedata::get_response_data |
&Apache::loncoursedata::get_response_data |
Line 209 sub NumericalResponseAnalysis {
|
Line 206 sub NumericalResponseAnalysis {
|
# |
# |
# This next call causes all the waiting around that people complain about |
# This next call causes all the waiting around that people complain about |
my ($max,$min) = &GetStudentAnswers($r,$problem,$Students); |
my ($max,$min) = &GetStudentAnswers($r,$problem,$Students); |
|
return if ($c->aborted()); |
# |
# |
# Collate the data |
# Collate the data |
my %Data; |
my %Data; |
Line 312 sub circle {
|
Line 310 sub circle {
|
|
|
sub GetStudentAnswers { |
sub GetStudentAnswers { |
my ($r,$problem,$Students) = @_; |
my ($r,$problem,$Students) = @_; |
|
my $c = $r->connection(); |
my %Answers; |
my %Answers; |
my ($resource,$partid,$respid) = ($problem->{'resource'}, |
my ($resource,$partid,$respid) = ($problem->{'resource'}, |
$problem->{'part'}, |
$problem->{'part'}, |
$problem->{'respid'}); |
$problem->{'respid'}); |
|
# Read in the cache (if it exists) before we start timing things. |
|
&Apache::lonstathelpers::ensure_proper_cache($resource->{'symb'}); |
# Open progress window |
# Open progress window |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin |
($r,'Student Answer Compilation Status', |
($r,'Student Answer Compilation Status', |
'Student Answer Compilation Progress', scalar(@$Students)); |
'Student Answer Compilation Progress', scalar(@$Students)); |
$r->print("<table>\n"); |
|
$r->rflush(); |
$r->rflush(); |
foreach my $student (@$Students) { |
foreach my $student (@$Students) { |
|
last if ($c->aborted()); |
my $sname = $student->{'username'}; |
my $sname = $student->{'username'}; |
my $sdom = $student->{'domain'}; |
my $sdom = $student->{'domain'}; |
my $answer = &Apache::lonstathelpers::analyze_problem_as_student |
my $answer = &Apache::lonstathelpers::analyze_problem_as_student |
Line 331 sub GetStudentAnswers {
|
Line 332 sub GetStudentAnswers {
|
&mt('last student')); |
&mt('last student')); |
$student->{'answer'} = $answer; |
$student->{'answer'} = $answer; |
} |
} |
$r->print("</table>\n"); |
&Apache::lonstathelpers::write_answer_cache(); |
|
return if ($c->aborted()); |
$r->rflush(); |
$r->rflush(); |
# close progress window |
# close progress window |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); |