version 1.78, 2005/11/15 21:41:10
|
version 1.80, 2005/11/21 17:47:37
|
Line 671 sub get_key_todo {
|
Line 671 sub get_key_todo {
|
} |
} |
return (undef,undef) |
return (undef,undef) |
} |
} |
|
|
sub end_Task { |
sub end_Task { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
my $result=''; |
my $result=''; |
Line 710 DONEBUTTON
|
Line 709 DONEBUTTON
|
$Apache::lonhomework::history{"resource.$version.status"} =~ /^(pass|fail)$/) { |
$Apache::lonhomework::history{"resource.$version.status"} =~ /^(pass|fail)$/) { |
my $bt_status=$Apache::lonhomework::history{"resource.$version.status"}; |
my $bt_status=$Apache::lonhomework::history{"resource.$version.status"}; |
my $title=&Apache::lonnet::gettitle(); |
my $title=&Apache::lonnet::gettitle(); |
my %slot=&Apache::lonnet::get_slot($Apache::inputtags::slot_name); |
|
|
my $slot_name= |
|
$Apache::lonhomework::history{"resource.$version.checkedin.slot"}; |
|
my %slot=&Apache::lonnet::get_slot($slot_name); |
my $start_time= |
my $start_time= |
&Apache::lonlocal::locallocaltime($slot{'starttime'}); |
&Apache::lonlocal::locallocaltime($slot{'starttime'}); |
|
|
my $status; |
my $status = "\n<div class='$bt_status'>\n"; |
$status.="\n<div class='$bt_status'>\n"; |
|
|
|
if ($bt_status eq 'pass') { |
if ($bt_status eq 'pass') { |
$status.='<h2>You passed the '.$title.' given on '. |
$status.='<h2>You passed the '.$title.' given on '. |
$start_time.'.</h2>'; |
$start_time.'</h2>'; |
} |
} |
if ($bt_status eq 'fail') { |
if ($bt_status eq 'fail') { |
$status.='<h2>You did not pass the '.$title.' given on '. |
$status.='<h2>You did not pass the '.$title.' given on '. |
$start_time.'.</h2>'; |
$start_time.'</h2>'; |
if (!$previous) { |
if (!$previous) { |
$status.=&add_request_another_attempt_button(); |
$status.=&add_request_another_attempt_button(); |
} |
} |
Line 779 DONEBUTTON
|
Line 780 DONEBUTTON
|
if ($award eq 'SUBMITTED') { |
if ($award eq 'SUBMITTED') { |
&add_to_queue('gradingqueue',$Apache::inputtags::slot_name); |
&add_to_queue('gradingqueue',$Apache::inputtags::slot_name); |
} |
} |
|
} elsif ($Apache::lonhomework::results{'INTERNAL_store'}) { |
|
&Apache::structuretags::finalize_storage(); |
} |
} |
if ($target eq 'grade' && $env{'form.webgrade'} eq 'yes') { |
if ($target eq 'grade' && $env{'form.webgrade'} eq 'yes') { |
my $optional_required= |
my $optional_required= |
Line 1466 sub get_instance {
|
Line 1469 sub get_instance {
|
$instance = $instances[($version-1)%scalar(@instances)]; |
$instance = $instances[($version-1)%scalar(@instances)]; |
$Apache::lonhomework::results{"resource.$version.0.$dim.instance"} = |
$Apache::lonhomework::results{"resource.$version.0.$dim.instance"} = |
$instance; |
$instance; |
|
$Apache::lonhomework::results{'INTERNAL_store'} = 1; |
&Apache::response::poprandomnumber(); |
&Apache::response::poprandomnumber(); |
return $instance; |
return $instance; |
} |
} |