version 1.328, 2006/03/07 02:50:15
|
version 1.329, 2006/03/08 21:56:49
|
Line 1497 sub handback_box {
|
Line 1497 sub handback_box {
|
sub show_problem { |
sub show_problem { |
my ($request,$symb,$uname,$udom,$removeform,$viewon,$mode) = @_; |
my ($request,$symb,$uname,$udom,$removeform,$viewon,$mode) = @_; |
my $rendered; |
my $rendered; |
|
&Apache::lonxml::remember_problem_counter(); |
if ($mode eq 'both' or $mode eq 'text') { |
if ($mode eq 'both' or $mode eq 'text') { |
$rendered=&Apache::loncommon::get_student_view($symb,$uname,$udom, |
$rendered=&Apache::loncommon::get_student_view($symb,$uname,$udom, |
$env{'request.course.id'}); |
$env{'request.course.id'}); |
Line 1508 sub show_problem {
|
Line 1509 sub show_problem {
|
} |
} |
my $companswer; |
my $companswer; |
if ($mode eq 'both' or $mode eq 'answer') { |
if ($mode eq 'both' or $mode eq 'answer') { |
|
&Apache::lonxml::restore_problem_counter(); |
$companswer=&Apache::loncommon::get_student_answers($symb,$uname,$udom, |
$companswer=&Apache::loncommon::get_student_answers($symb,$uname,$udom, |
$env{'request.course.id'}); |
$env{'request.course.id'}); |
} |
} |
Line 1594 sub submission {
|
Line 1596 sub submission {
|
} elsif ($env{'form.vAns'} eq 'yes') { |
} elsif ($env{'form.vAns'} eq 'yes') { |
$mode='answer'; |
$mode='answer'; |
} |
} |
|
&Apache::lonxml::clear_problem_counter(); |
$request->print(&show_problem($request,$symb,$uname,$udom,0,1,$mode)); |
$request->print(&show_problem($request,$symb,$uname,$udom,0,1,$mode)); |
} |
} |
|
|
Line 1692 KEYWORDS
|
Line 1695 KEYWORDS
|
} elsif ($env{'form.vAns'} eq 'all') { |
} elsif ($env{'form.vAns'} eq 'all') { |
$mode='answer'; |
$mode='answer'; |
} |
} |
|
&Apache::lonxml::clear_problem_counter(); |
$request->print(&show_problem($request,$symb,$uname,$udom,1,1,$mode)); |
$request->print(&show_problem($request,$symb,$uname,$udom,1,1,$mode)); |
} |
} |
|
|
Line 3755 sub displayPage {
|
Line 3759 sub displayPage {
|
'<td align="center"><b> Prob. </b></td>'. |
'<td align="center"><b> Prob. </b></td>'. |
'<td><b> '.($env{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade</b></td></tr>'; |
'<td><b> '.($env{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade</b></td></tr>'; |
|
|
|
&Apache::lonxml::clear_problem_counter(); |
my ($depth,$question,$prob) = (1,1,1); |
my ($depth,$question,$prob) = (1,1,1); |
$iterator->next(); # skip the first BEGIN_MAP |
$iterator->next(); # skip the first BEGIN_MAP |
my $curRes = $iterator->next(); # for "current resource" |
my $curRes = $iterator->next(); # for "current resource" |