--- loncom/interface/statistics/lonstudentsubmissions.pm 2004/09/23 13:50:45 1.22 +++ loncom/interface/statistics/lonstudentsubmissions.pm 2004/10/08 16:40:54 1.25 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentsubmissions.pm,v 1.22 2004/09/23 13:50:45 matthew Exp $ +# $Id: lonstudentsubmissions.pm,v 1.25 2004/10/08 16:40:54 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -109,7 +109,7 @@ sub BuildStudentSubmissionsPage { my $resource = $navmap->getBySymb($symb); push(@Problems,$resource); } - # + # if (! scalar(@Problems) || ! defined($Problems[0])) { $r->print('resource is undefined'); } else { @@ -219,7 +219,7 @@ sub prepare_html_output { if (! $single_part) { my $tmpname = $partid; if ($partid =~/^\d+$/) { - $tmpname = &mt('Part [_1]',$partid); + $tmpname = $prob->part_display($partid); } $headers{'part'} .= qq{
'.$submission.'
'; } elsif ($resptype eq 'radiobutton') { + $submission = &HTML::Entities::encode($submission,'<>&"'); $submission =~ s/=([^=])$//; } elsif ($resptype =~ /^(option|match|rank)$/) { $submission = ''.&mt('LON-CAPA is unable to produce your Excel spreadsheet because your selections will result in more than 255 columns. Excel allows only 255 columns in a spreadsheet.').'
'.$/. ''.&mt('Consider selecting fewer problems to generate reports on, or reducing the number of items per problem. Or use HTML or CSV output.').'
'.$/. - ''.&mt('The last problem that will fit in the current spreadsheet is [_1].',&get_title($lastprob->title,$lastprob->src)).'
'); + ''.&mt('The last problem that will fit in the current spreadsheet is [_1].',$lastprob->compTitle).'
'); $r->rflush(); return; } @@ -565,11 +572,12 @@ sub prepare_excel_output { } # Problem headers foreach my $prob (@$Problems) { - my $title = &get_title($prob->title,$prob->src); + my $title = $prob->compTitle; $worksheet->write($title_row,$cols_output, $title,$format->{'h3'}); foreach my $partid (@{$prob->parts}) { - $worksheet->write($partid_row,$cols_output,$partid); + $worksheet->write($partid_row,$cols_output, + $prob->part_display($partid)); my $responses = [$prob->responseIds($partid)]; my $resptypes = [$prob->responseType($partid)]; for (my $i=0;$i