version 1.85, 2004/03/08 23:23:04
|
version 1.89, 2004/05/27 04:25:13
|
Line 77 sub start_radiobuttonresponse {
|
Line 77 sub start_radiobuttonresponse {
|
$result .= ' \renewcommand{\labelenumi}{\alph{enumi}.}'; |
$result .= ' \renewcommand{\labelenumi}{\alph{enumi}.}'; |
} elsif ($type eq 'i') { |
} elsif ($type eq 'i') { |
$result .= ' \renewcommand{\labelenumi}{\roman{enumi}.}'; |
$result .= ' \renewcommand{\labelenumi}{\roman{enumi}.}'; |
|
} else { |
|
$result .= ' \renewcommand{\labelenumi}{\Alph{enumi}.}'; |
} |
} |
$result .= '\begin{enumerate}'; |
$result .= '\begin{enumerate}'; |
} elsif ($target eq 'analyze') { |
} elsif ($target eq 'analyze') { |
Line 104 sub start_foilgroup {
|
Line 106 sub start_foilgroup {
|
my $result; |
my $result; |
%Apache::response::foilgroup=(); |
%Apache::response::foilgroup=(); |
$Apache::radiobuttonresponse::conceptgroup=0; |
$Apache::radiobuttonresponse::conceptgroup=0; |
&Apache::response::setrandomnumber(); |
&Apache::response::pushrandomnumber(); |
if ($target eq 'tex' && $Apache::lonhomework::type eq 'exam') { |
if ($target eq 'tex' && $Apache::lonhomework::type eq 'exam') { |
$result.='\item[\textbf{'.$Apache::lonxml::counter.'}.]'; |
$result.='\item[\textbf{'.$Apache::lonxml::counter.'}.]'; |
} |
} |
Line 195 sub end_foilgroup {
|
Line 197 sub end_foilgroup {
|
} |
} |
} |
} |
} |
} |
|
&Apache::response::poprandomnumber(); |
&Apache::lonxml::increment_counter(); |
&Apache::lonxml::increment_counter(); |
return $result; |
return $result; |
} |
} |
Line 283 sub whichfoils {
|
Line 286 sub whichfoils {
|
push (@whichfalse,$name); |
push (@whichfalse,$name); |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'unused') { |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'unused') { |
} else { |
} else { |
&Apache::lonxml::error(&HTML::Entities::encode("No valid value assigned ($Apache::response::foilgroup{$name.'.value'}) for foil $name in <foilgroup>")); |
&Apache::lonxml::error(&HTML::Entities::encode("No valid value assigned ($Apache::response::foilgroup{$name.'.value'}) for foil $name in <foilgroup>",'<>&"')); |
} |
} |
} |
} |
} else { |
} else { |
Line 309 sub whichfoils {
|
Line 312 sub whichfoils {
|
} |
} |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'unused') { |
} elsif ($Apache::response::foilgroup{$name.'.value'} eq 'unused') { |
} else { |
} else { |
&Apache::lonxml::error(&HTML::Entities::encode("No valid value assigned ($Apache::response::foilgroup{$name.'.value'}) for foil $name in <foilgroup>")); |
&Apache::lonxml::error(&HTML::Entities::encode("No valid value assigned ($Apache::response::foilgroup{$name.'.value'}) for foil $name in <foilgroup>",'<>&"')); |
} |
} |
} |
} |
#pick a true statement |
#pick a true statement |
Line 547 sub end_foil {
|
Line 550 sub end_foil {
|
if (defined($Apache::response::foilnames{$name})) { |
if (defined($Apache::response::foilnames{$name})) { |
&Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name)); |
&Apache::lonxml::error(&mt("Foil name <b><tt>[_1]</tt></b> appears more than once. Foil names need to be unique.",$name)); |
} |
} |
|
$Apache::response::foilnames{$name}++; |
my $location =&Apache::lonxml::get_param('location',$parstack, |
my $location =&Apache::lonxml::get_param('location',$parstack, |
$safeeval); |
$safeeval); |
if ( $Apache::radiobuttonresponse::conceptgroup |
if ( $Apache::radiobuttonresponse::conceptgroup |