version 1.156, 2003/03/14 23:23:45
|
version 1.157, 2003/04/02 19:52:05
|
Line 337 sub start_problem {
|
Line 337 sub start_problem {
|
my $name= &get_resource_name($parstack,$safeeval); |
my $name= &get_resource_name($parstack,$safeeval); |
if ($status eq 'CAN_ANSWER') { |
if ($status eq 'CAN_ANSWER') { |
# create a page header and exit |
# create a page header and exit |
|
my $WeightOfProblem = ''; |
|
if ($Apache::lonhomework::type eq 'exam') { |
|
my $weight = &Apache::lonnet::EXT("resource.$Apache::inputtags::part.weight"); |
|
$WeightOfProblem = "<table border=1><tr><td><i>$weight pt</i></td></tr></table>"; |
|
} |
$result.="$head_tag_start<title>$name</title></head> |
$result.="$head_tag_start<title>$name</title></head> |
$body_tag_start \n $form_tag_start". |
$body_tag_start \n $form_tag_start $WeightOfProblem". |
'<input type="hidden" name="submitted" value="yes" />'; |
'<input type="hidden" name="submitted" value="yes" />'; |
if ($ENV{'request.state'} eq "construct") { |
if ($ENV{'request.state'} eq "construct") { |
$result.= &problem_web_to_edit_header($rndseed); |
$result.= &problem_web_to_edit_header($rndseed); |
Line 435 sub end_problem {
|
Line 440 sub end_problem {
|
# if part is zero, no <part>s existed, so we need show the current |
# if part is zero, no <part>s existed, so we need show the current |
# grading status |
# grading status |
my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target); |
my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target); |
if ($Apache::lonhomework::type ne 'exam') {$result.= $gradestatus;} |
$result.= $gradestatus; |
} |
} |
if ( |
if ( |
(($target eq 'web') && ($ENV{'request.state'} ne 'construct')) || |
(($target eq 'web') && ($ENV{'request.state'} ne 'construct')) || |