version 1.172, 2010/09/05 20:46:58
|
version 1.173, 2010/12/19 00:52:00
|
Line 103 sub start_foilgroup {
|
Line 103 sub start_foilgroup {
|
my $result=''; |
my $result=''; |
%Apache::response::foilgroup=(); |
%Apache::response::foilgroup=(); |
$Apache::optionresponse::conceptgroup=0; |
$Apache::optionresponse::conceptgroup=0; |
&Apache::response::pushrandomnumber(); |
&Apache::response::pushrandomnumber(undef,$target); |
if ($target eq 'edit') { |
if ($target eq 'edit') { |
my $optionlist="<option></option>\n"; |
my $optionlist="<option></option>\n"; |
my $option; |
my $option; |
Line 262 sub end_foilgroup {
|
Line 262 sub end_foilgroup {
|
$Apache::lonhomework::results{"resource.$part.$id.submission"}= |
$Apache::lonhomework::results{"resource.$part.$id.submission"}= |
$responsestr; |
$responsestr; |
$Apache::lonhomework::results{"resource.$part.$id.submissiongrading"}=$gradestr; |
$Apache::lonhomework::results{"resource.$part.$id.submissiongrading"}=$gradestr; |
|
if ($Apache::lonhomework::type eq 'randomizetry') { |
|
$Apache::lonhomework::results{"resource.$part.$id.foilorder"} = &Apache::lonnet::array2str(@whichopt); |
|
} |
if (($Apache::lonhomework::type eq 'survey') || |
if (($Apache::lonhomework::type eq 'survey') || |
($Apache::lonhomework::type eq 'surveycred') || |
($Apache::lonhomework::type eq 'surveycred') || |
($Apache::lonhomework::type eq 'anonsurvey') || |
($Apache::lonhomework::type eq 'anonsurvey') || |
Line 469 sub displayfoils {
|
Line 471 sub displayfoils {
|
} |
} |
} else { |
} else { |
my $temp=1; |
my $temp=1; |
my %lastresponse=&Apache::lonnet::str2hash($Apache::lonhomework::history{"resource.$part.$id.submission"}); |
my %lastresponse; |
|
my $newvariation; |
|
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 ($newvariation) { |
|
%lastresponse=&Apache::lonnet::str2hash($Apache::lonhomework::history{"resource.$part.$id.submission"}); |
|
} |
my $internal_counter=$Apache::lonxml::counter; |
my $internal_counter=$Apache::lonxml::counter; |
my $checkboxopt=&check_box_opt($target,$checkboxvalue,@opt); |
my $checkboxopt=&check_box_opt($target,$checkboxvalue,@opt); |
if ($checkboxopt) { |
if ($checkboxopt) { |
Line 610 sub displayfoils {
|
Line 624 sub displayfoils {
|
} |
} |
|
|
if ($target eq 'web') { |
if ($target eq 'web') { |
&Apache::response::setup_prior_tries_hash(\&Apache::rankresponse::format_prior_answer, |
my $data = [\@whichopt,'submissiongrading']; |
[\@whichopt, |
my $questiontype; |
'submissiongrading']); |
if ($Apache::lonhomework::type eq 'randomizetry') { |
|
$questiontype = $Apache::lonhomework::type, |
|
} |
|
&Apache::response::setup_prior_tries_hash(\&Apache::rankresponse::format_prior_answer,$data,$questiontype); |
} |
} |
|
|
if ($target ne 'tex') { |
if ($target ne 'tex') { |