version 1.63, 2010/08/02 10:52:54
|
version 1.64, 2010/12/19 00:48:50
|
Line 96 sub start_foilgroup {
|
Line 96 sub start_foilgroup {
|
my $result; |
my $result; |
%Apache::response::foilgroup=(); |
%Apache::response::foilgroup=(); |
$Apache::rankresponse::conceptgroup=0; |
$Apache::rankresponse::conceptgroup=0; |
&Apache::response::pushrandomnumber(); |
&Apache::response::pushrandomnumber(undef,$target); |
return $result; |
return $result; |
} |
} |
|
|
Line 280 sub grade_response {
|
Line 280 sub grade_response {
|
} else { |
} else { |
$Apache::lonhomework::results{"resource.$part.$id.submissiongrading"}=$gradestr; |
$Apache::lonhomework::results{"resource.$part.$id.submissiongrading"}=$gradestr; |
} |
} |
|
if ($Apache::lonhomework::type eq 'randomizetry') { |
|
if ($Apache::lonhomework::type eq 'randomizetry') { |
|
$Apache::lonhomework::results{"resource.$part.$id.foilorder"} = &Apache::lonnet::array2str(@whichfoils); |
|
} |
|
} |
$Apache::lonhomework::results{"resource.$part.$id.submission"}= |
$Apache::lonhomework::results{"resource.$part.$id.submission"}= |
$responsestr; |
$responsestr; |
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$ad; |
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=$ad; |
Line 326 sub displayfoils {
|
Line 331 sub displayfoils {
|
my $temp=1; |
my $temp=1; |
my $id=$Apache::inputtags::response[-1]; |
my $id=$Apache::inputtags::response[-1]; |
my $part=$Apache::inputtags::part; |
my $part=$Apache::inputtags::part; |
my $lastresponse; |
my ($lastresponse,$newvariation); |
unless ((($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurvey') || ($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurveycred')) && (defined($env{'form.grade_symb'}))) { |
if ((($Apache::lonhomework::history{"resource.$part.type"} eq 'randomizetry') || |
|
($Apache::lonhomework::type eq 'randomizetry')) && |
|
($Apache::inputtags::status[-1] eq 'CAN_ANSWER')) { |
|
if ($env{'form.'.$part.'.rndseed'} ne |
|
$Apache::lonhomework::history{"resource.$part.rndseed"}) { |
|
$newvariation = 1; |
|
} |
|
} |
|
unless (((($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurvey') || ($Apache::lonhomework::history{"resource.$part.type"} eq 'anonsurveycred')) && (defined($env{'form.grade_symb'}))) || $newvariation) { |
$lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"}; |
$lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"}; |
} |
} |
my %lastresponse=&Apache::lonnet::str2hash($lastresponse); |
my %lastresponse=&Apache::lonnet::str2hash($lastresponse); |
Line 350 sub displayfoils {
|
Line 363 sub displayfoils {
|
foreach $option (@whichopt) { |
foreach $option (@whichopt) { |
if ($option eq $lastopt) { |
if ($option eq $lastopt) { |
if ($target ne 'tex' ) { |
if ($target ne 'tex' ) { |
$optionlist.="<option selected=\"on\">$option</option>\n"; |
$optionlist.="<option selected=\"selected\">$option</option>\n"; |
} elsif ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes') { |
} elsif ($target eq 'tex' && $env{'form.pdfFormFields'} eq 'yes') { |
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option); |
$optionlist .= &Apache::lonxml::print_pdf_add_combobox_option($option); |
} |
} |
Line 403 sub displayfoils {
|
Line 416 sub displayfoils {
|
} |
} |
} |
} |
if ($target eq 'web') { |
if ($target eq 'web') { |
|
my $questiontype; |
|
if ($Apache::lonhomework::type eq 'randomizetry') { |
|
$questiontype = $Apache::lonhomework::type; |
|
} |
&Apache::response::setup_prior_tries_hash(\&format_prior_answer, |
&Apache::response::setup_prior_tries_hash(\&format_prior_answer, |
[\@whichfoils, |
[\@whichfoils, |
'submissiongrading']); |
'submissiongrading'], |
|
$questiontype); |
} |
} |
if ($target ne 'tex') {$result.="<br />";} else {$result.=' \vskip 0 mm ';} |
if ($target ne 'tex') {$result.="<br />";} else {$result.=' \vskip 0 mm ';} |
return $result; |
return $result; |