version 1.44, 2006/05/05 20:03:43
|
version 1.45, 2006/05/30 12:46:50
|
Line 37 use Apache::lonstathelpers;
|
Line 37 use Apache::lonstathelpers;
|
use HTML::Entities(); |
use HTML::Entities(); |
use Time::Local(); |
use Time::Local(); |
use Spreadsheet::WriteExcel(); |
use Spreadsheet::WriteExcel(); |
|
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA; |
|
|
|
|
my @SubmitButtons = ({ name => 'SelectAnother', |
my @SubmitButtons = ({ name => 'SelectAnother', |
text => 'Choose a different Problem' }, |
text => 'Choose a different Problem' }, |
Line 555 sub html_non_essay_results {
|
Line 558 sub html_non_essay_results {
|
return ''; |
return ''; |
} |
} |
# |
# |
my $submission = &HTML::Entities::decode(&Apache::lonnet::unescape($response->{'Submission'})); |
my $submission = &HTML::Entities::decode(&unescape($response->{'Submission'})); |
return '' if (! defined($submission) || $submission eq ''); |
return '' if (! defined($submission) || $submission eq ''); |
$submission =~ s/\\\"/\"/g; |
$submission =~ s/\\\"/\"/g; |
$submission =~ s/\\\'/\'/g; |
$submission =~ s/\\\'/\'/g; |
Line 570 sub html_non_essay_results {
|
Line 573 sub html_non_essay_results {
|
if ($resptype =~ /^(option|match|rank)$/) { |
if ($resptype =~ /^(option|match|rank)$/) { |
my %submission = |
my %submission = |
map { |
map { |
my ($foil,$value) = split('=',&Apache::lonnet::unescape($_)); |
my ($foil,$value) = split('=',&unescape($_)); |
($foil,$value); |
($foil,$value); |
} split('&',$response->{'Submission'}); |
} split('&',$response->{'Submission'}); |
my %correct; |
my %correct; |
if (exists($response->{'Correct'})) { |
if (exists($response->{'Correct'})) { |
%correct = |
%correct = |
map { |
map { |
my ($foil,$value)=split('=',&Apache::lonnet::unescape($_)); |
my ($foil,$value)=split('=',&unescape($_)); |
($foil,$value); |
($foil,$value); |
} split('&',$response->{'Correct'}); |
} split('&',$response->{'Correct'}); |
} |
} |
Line 828 sub compile_response_data {
|
Line 831 sub compile_response_data {
|
# |
# |
my $submission = |
my $submission = |
&HTML::Entities::decode |
&HTML::Entities::decode |
(&Apache::lonnet::unescape($response->{'Submission'})); |
(&unescape($response->{'Submission'})); |
if (!$prob->is_task()) { |
if (!$prob->is_task()) { |
return () if (! defined($submission) || $submission eq ''); |
return () if (! defined($submission) || $submission eq ''); |
} |
} |
Line 843 sub compile_response_data {
|
Line 846 sub compile_response_data {
|
if ($resptype =~ /^(option|match|rank)$/) { |
if ($resptype =~ /^(option|match|rank)$/) { |
my %submission = |
my %submission = |
map { |
map { |
my ($foil,$value) = split('=',&Apache::lonnet::unescape($_)); |
my ($foil,$value) = split('=',&unescape($_)); |
($foil,$value); |
($foil,$value); |
} split('&',$response->{'Submission'}); |
} split('&',$response->{'Submission'}); |
my %correct; |
my %correct; |
if (exists($response->{'Correct'})) { |
if (exists($response->{'Correct'})) { |
%correct = |
%correct = |
map { |
map { |
my ($foil,$value)=split('=',&Apache::lonnet::unescape($_)); |
my ($foil,$value)=split('=',&unescape($_)); |
($foil,$value); |
($foil,$value); |
} split('&',$response->{'Correct'}); |
} split('&',$response->{'Correct'}); |
} |
} |