version 1.7, 2004/03/07 20:41:28
|
version 1.9, 2004/03/16 16:30:32
|
Line 163 sub BuildStudentSubmissionsPage {
|
Line 163 sub BuildStudentSubmissionsPage {
|
######################################################### |
######################################################### |
sub prepare_excel_output { |
sub prepare_excel_output { |
my ($r,$problem,$ProblemData,$Students) = @_; |
my ($r,$problem,$ProblemData,$Students) = @_; |
|
my $c = $r->connection(); |
my ($resource,$respid,$partid) = ($problem->{'resource'}, |
my ($resource,$respid,$partid) = ($problem->{'resource'}, |
$problem->{'respid'}, |
$problem->{'respid'}, |
$problem->{'part'}); |
$problem->{'part'}); |
Line 209 sub prepare_excel_output {
|
Line 210 sub prepare_excel_output {
|
# |
# |
# Populate the worksheet with the student data |
# Populate the worksheet with the student data |
foreach my $student (@$Students) { |
foreach my $student (@$Students) { |
|
last if ($c->aborted()); |
my $results = &Apache::loncoursedata::get_response_data_by_student |
my $results = &Apache::loncoursedata::get_response_data_by_student |
($student,$resource->{'symb'},$respid); |
($student,$resource->{'symb'},$respid); |
my %row; |
my %row; |
Line 288 sub prepare_excel_output {
|
Line 290 sub prepare_excel_output {
|
|
|
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 307 sub GetStudentAnswers {
|
Line 312 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); |
return; |
return; |
} |
} |
|
|
|
|
######################################################### |
######################################################### |
######################################################### |
######################################################### |
## |
## |