$name
- $body_tag_start \n";
+ $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') {
@@ -323,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);
@@ -387,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');
}
@@ -486,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",
@@ -497,6 +564,48 @@ 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 $description=&Apache::slotrequest::get_description($Apache::inputtags::slot_name,\%slot);
+
+ my $status;
+ $status.="\n
\n";
+
+ if ($bt_status eq 'pass') {
+ $status.='
You passed the '.$title.' given on '.
+ $description.'.
';
+ }
+ if ($bt_status eq 'fail') {
+ $status.='
You did not pass the '.$title.' given on '.
+ $description.'.
';
+ 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().'