$name
$body_tag_start \n".&style();
- my ($version,$previous)=&get_version();
- if ($Apache::lonhomework::history{"resource.$version.status"} eq 'fail') {
- $result.='
'.&mt('Did not pass').'
';
- if (!$previous) {
- $result.=&add_request_another_attempt_button();
- }
- }
- if ($Apache::lonhomework::history{"resource.$version.status"} eq 'pass') {
- $result.='
'.&mt('Passed').'
';
- }
$result.=$form_tag_start.
'';
$result.=&preserve_grade_info();
-
+ $result.=&internal_location();
+ &Apache::lonxml::startredirection();
}
} elsif ( ($target eq 'grade' && $env{'form.webgrade'}) ||
$target eq 'webgrade') {
@@ -384,7 +388,6 @@ sub start_Task {
# there isn't reshow the queue....
my ($todo,$status_code)=&get_key_todo($target);
- &Apache::lonnet::logthis("got todo -$todo- stat -$status_code-");
if ($todo) {
&setup_env_for_other_user($todo,$safeeval);
my ($symb,$uname,$udom)=&decode_queue_key($todo);
@@ -448,7 +451,7 @@ sub get_key_todo {
my $todo;
if (defined($env{'form.reviewasubmission'})) {
- &Apache::lonnet::logthis("review a submission....");
+ &Apache::lonxml::debug("review a submission....");
$env{'form.queue'}='reviewqueue';
return (undef,'show_list');
}
@@ -547,6 +550,9 @@ sub end_Task {
($target eq 'answer') || ($target eq 'tex')
) {
if ($target eq 'web') {
+ if (&show_task($status,$previous)) {
+ $result.=&Apache::lonxml::endredirection();
+ }
if ($status eq 'CAN_ANSWER' && !$previous) {
$result.="\n".'
'.
&Apache::inputtags::file_selector("$version.0",
@@ -558,6 +564,49 @@ sub end_Task {
"
";
$result.=&Apache::inputtags::gradestatus('0');
}
+ if (&show_task($status,$previous)) {
+ my $bt_status=$Apache::lonhomework::history{"resource.$version.status"};
+ my $title=&Apache::lonnet::gettitle();
+ my %slot=&Apache::lonnet::get_slot($Apache::inputtags::slot_name);
+ my $start_time=
+ &Apache::lonlocal::locallocaltime($slot{'starttime'});
+
+ my $status;
+ $status.="\n
\n";
+
+ if ($bt_status eq 'pass') {
+ $status.='
You passed the '.$title.' given on '.
+ $start_time.'.
';
+ }
+ if ($bt_status eq 'fail') {
+ $status.='
You did not pass the '.$title.' given on '.
+ $start_time.'.
';
+ if (!$previous) {
+ $status.=&add_request_another_attempt_button();
+ }
+ }
+ my $man_count=0;
+ my $opt_count=0;
+ my $opt_passed=0;
+ foreach my $dim_id (@Apache::bridgetask::dimensionlist) {
+ if ($Apache::bridgetask::dimensionmandatory{$dim_id}
+ eq 'N') {
+ $opt_count++;
+ if ($Apache::lonhomework::history{"resource.$version.$dim_id.status"} eq 'pass') {
+ $opt_passed++;
+ }
+ } else {
+ $man_count++;
+ }
+ }
+ my $opt_req=&Apache::lonxml::get_param('OptionalRequired',
+ $parstack,$safeeval);
+ if ($opt_req !~ /\S/) { $opt_req='0'; }
+ $status.="\n
".&mt('You needed to pass all of the [_1] mandatory components and [_2] of the [_3] optional components on the bridge task.',$man_count,$opt_req,$opt_count)."
\n";
+
+ my $internal_location=&internal_location();
+ $result=~s/\Q$internal_location\E/$status/;
+ }
}
if ($target eq 'web' || $target eq 'webgrade') {
$result.=&Apache::lonxml::xmlend().'