version 1.20.2.2, 2003/10/15 19:52:53
|
version 1.21, 2003/08/19 15:24:52
|
Line 102 sub start_itemgroup {
|
Line 102 sub start_itemgroup {
|
$safeeval,'randomize', |
$safeeval,'randomize', |
'location'); |
'location'); |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
} elsif ($target eq 'web') { |
} elsif ($target eq 'web' or $target eq 'tex') { |
$Apache::matchresponse::itemtable{'location'}= |
$Apache::matchresponse::itemtable{'location'}= |
&Apache::lonxml::get_param('location',$parstack,$safeeval); |
&Apache::lonxml::get_param('location',$parstack,$safeeval); |
} |
} |
Line 149 sub end_itemgroup {
|
Line 149 sub end_itemgroup {
|
foreach my $name (@names) { |
foreach my $name (@names) { |
$Apache::response::itemgroup{$name.'.text'}=~s/\$\$/\$/g; |
$Apache::response::itemgroup{$name.'.text'}=~s/\$\$/\$/g; |
$table.='\item['.$alphabet[$i].'] '. |
$table.='\item['.$alphabet[$i].'] '. |
$Apache::response::itemgroup{$name.'.text'}. |
$Apache::response::itemgroup{$name.'.text'}; |
' \\\\ '; |
|
$i++; |
$i++; |
} |
} |
$table.=' \end{description} \strut \\\\ '; |
$table.=' \end{description} \strut \\\\ '; |
Line 295 sub grade_response {
|
Line 294 sub grade_response {
|
%{ $Apache::response::itemgroup{'letter_name_map'} }; |
%{ $Apache::response::itemgroup{'letter_name_map'} }; |
} |
} |
foreach my $name (@whichfoils) { |
foreach my $name (@whichfoils) { |
my $response = &Apache::response::getresponse($temp); |
my $response = $ENV{'form.HWVAL_'.$Apache::inputtags::response['-1'].":$temp"}; |
my $responsename = $letter_name_map{$response}; |
my $responsename = $letter_name_map{$response}; |
$responsehash{$name}=$responsename; |
$responsehash{$name}=$responsename; |
my $value=$Apache::response::foilgroup{$name.'.value'}; |
my $value=$Apache::response::foilgroup{$name.'.value'}; |
Line 370 sub displayfoils {
|
Line 369 sub displayfoils {
|
%name_letter_map= |
%name_letter_map= |
%{ $Apache::response::itemgroup{'name_letter_map'} }; |
%{ $Apache::response::itemgroup{'name_letter_map'} }; |
} |
} |
if ( &Apache::response::show_answer() ) { |
if (($solved =~ /^correct/) || ($status eq 'SHOW_ANSWER')) { |
foreach my $name (@whichfoils) { |
foreach my $name (@whichfoils) { |
my $text=$Apache::response::foilgroup{$name.'.text'}; |
my $text=$Apache::response::foilgroup{$name.'.text'}; |
my $value=$Apache::response::foilgroup{$name.'.value'}; |
my $value=$Apache::response::foilgroup{$name.'.value'}; |
Line 423 sub displayfoils {
|
Line 422 sub displayfoils {
|
$question.='<br />'.$text."\n"; |
$question.='<br />'.$text."\n"; |
} |
} |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
$question.=&Apache::optionresponse::webbubbles(\@used_letters,\@used_letters,$temp,$last_letter); |
$question.=&Apache::optionresponse::webbubbles(\@used_letters,\@used_letters,$temp); |
} |
} |
} else { |
} else { |
if ($Apache::lonhomework::type eq 'exam') { |
if ($Apache::lonhomework::type eq 'exam') { |
Line 488 sub end_conceptgroup {
|
Line 487 sub end_conceptgroup {
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
$Apache::matchresponse::conceptgroup=0; |
$Apache::matchresponse::conceptgroup=0; |
my $result=''; |
my $result=''; |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' ) { |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') { |
#if not there aren't any foils to display and thus no question |
#if not there aren't any foils to display and thus no question |
if (defined(@{ $Apache::response::conceptgroup{'names'} })) { |
if (defined(@{ $Apache::response::conceptgroup{'names'} })) { |
my @names = @{ $Apache::response::conceptgroup{'names'} }; |
my @names = @{ $Apache::response::conceptgroup{'names'} }; |