version 1.24, 2001/01/10 22:18:11
|
version 1.27, 2001/02/19 20:34:20
|
Line 99 sub end_textline {
|
Line 99 sub end_textline {
|
# my $usedtry='1'; |
# my $usedtry='1'; |
# my $response=''; |
# my $response=''; |
# if ( $target == 'web' ) { |
# if ( $target == 'web' ) { |
# if ( defined $ENV{'form.submit'}) { |
# if ( defined $ENV{'form.submitted'}) { |
# } |
# } |
# if ($showbutton > 0) { $result.=$button } |
# if ($showbutton > 0) { $result.=$button } |
# } |
# } |
Line 225 sub grade {
|
Line 225 sub grade {
|
# my $result=''; |
# my $result=''; |
my $response=''; |
my $response=''; |
if ( $target == 'web' ) { |
if ( $target == 'web' ) { |
if ( defined $ENV{'form.submit'}) { |
if ( defined $ENV{'form.submitted'}) { |
my @awards = (); |
my @awards = (); |
&Apache::lonxml::debug("$#Apache::inputtags::responselist"); |
&Apache::lonxml::debug("$#Apache::inputtags::responselist"); |
foreach $response (@Apache::inputtags::responselist) { |
foreach $response (@Apache::inputtags::responselist) { |
Line 261 sub gradestatus {
|
Line 261 sub gradestatus {
|
if ( $award ne '' ) { |
if ( $award ne '' ) { |
&Apache::lonxml::debug('Getting message'); |
&Apache::lonxml::debug('Getting message'); |
($showbutton,$message) = &decideoutput($award); |
($showbutton,$message) = &decideoutput($award); |
|
$message="<br /><table bgcolor=\"#aaffaa\"><tr><td>$message</td></tr></table>"; |
} |
} |
my $tries = $Apache::lonhomework::history{"resource.$id.tries"}; |
my $tries = $Apache::lonhomework::history{"resource.$id.tries"}; |
my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries"); |
my $maxtries = &Apache::lonnet::EXT("resource.$id.maxtries"); |
Line 269 sub gradestatus {
|
Line 270 sub gradestatus {
|
if ( $maxtries eq '' ) { $maxtries = '2'; } |
if ( $maxtries eq '' ) { $maxtries = '2'; } |
if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } |
if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } |
if ( $showbutton ) { |
if ( $showbutton ) { |
$trystr = "<br></br>Tries $tries/$maxtries"; |
$trystr = "<br />Tries $tries/$maxtries"; |
} |
} |
if ( $status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER') {$showbutton = 0;} |
if ( $status eq 'SHOW_ANSWER' || $status eq 'CANNOT_ANSWER') {$showbutton = 0;} |
if ( $showbutton ) { |
if ( $showbutton ) { |
$button = '<br></br><input type="submit" name="submit" value="Submit All Answers"><br></br>'; |
$button = '<br /><input type="submit" name="submit" value="Submit All Answers" />'; |
} |
} |
} |
} |
return $button.$message.$trystr; |
return $button.$message.$trystr; |