';
return $result;
@@ -1265,8 +1287,16 @@ sub submission {
# option to display problem, only once else it cause problems
# with the form later since the problem has a form.
- if ($ENV{'form.vProb'} eq 'yes' or !$ENV{'form.vProb'}) {
- $request->print(&show_problem($request,$symb,$uname,$udom,0,1));
+ if ($ENV{'form.vProb'} eq 'yes' or $ENV{'form.vAns'} eq 'yes') {
+ my $mode;
+ if ($ENV{'form.vProb'} eq 'yes' && $ENV{'form.vAns'} eq 'yes') {
+ $mode='both';
+ } elsif ($ENV{'form.vProb'} eq 'yes') {
+ $mode='text';
+ } elsif ($ENV{'form.vAns'} eq 'yes') {
+ $mode='answer';
+ }
+ $request->print(&show_problem($request,$symb,$uname,$udom,0,1,$mode));
}
# kwclr is the only variable that is guaranteed to be non blank
@@ -1301,6 +1331,7 @@ sub submission {
''."\n".
''."\n".
''."\n".
+ ''."\n".
''."\n".
''."\n".
''."\n".
@@ -1351,10 +1382,19 @@ KEYWORDS
}
}
- if ($ENV{'form.vProb'} eq 'all') {
+ if ($ENV{'form.vProb'} eq 'all' or $ENV{'form.vAns'} eq 'all') {
$request->print('