--- loncom/homework/bridgetask.pm 2005/11/03 22:59:35 1.75
+++ loncom/homework/bridgetask.pm 2005/11/21 17:47:37 1.80
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.75 2005/11/03 22:59:35 albertel Exp $
+# $Id: bridgetask.pm,v 1.80 2005/11/21 17:47:37 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -470,7 +470,11 @@ DONESCREEN
}
} elsif ($target eq 'grade' && !$env{'form.webgrade'}) {
if ($status eq 'NEEDS_CHECKIN') {
- &proctor_check_auth($slot_name,$slot);
+ if(&proctor_check_auth($slot_name,$slot)) {
+ my $result=&add_to_queue('gradingqueue',
+ $Apache::inputtags::slot_name);
+ &Apache::lonxml::debug("add_to_queue said $result");
+ }
}
}
} elsif ($target eq 'web') {
@@ -667,7 +671,6 @@ sub get_key_todo {
}
return (undef,undef)
}
-
sub end_Task {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
my $result='';
@@ -690,6 +693,9 @@ sub end_Task {
'.&mt('Submit Portfolio Files for Grading').'
'.&mt('Indicate the files from your portfolio to be evaluated in grading this task.').'
').
"";
+ }
+ if (!$previous && $status ne 'SHOW_ANSWER' &&
+ &show_task($status,$previous)) {
$result.=&Apache::inputtags::gradestatus('0');
$result.='';
$result.=<
DONEBUTTON
- }
+ }
if (&show_task($status,$previous) &&
$Apache::lonhomework::history{"resource.$version.status"} =~ /^(pass|fail)$/) {
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 $slot_name=
+ $Apache::lonhomework::history{"resource.$version.checkedin.slot"};
+ my %slot=&Apache::lonnet::get_slot($slot_name);
my $start_time=
&Apache::lonlocal::locallocaltime($slot{'starttime'});
- my $status;
- $status.="\n\n";
+ my $status = "\n
\n";
if ($bt_status eq 'pass') {
$status.='
You passed the '.$title.' given on '.
- $start_time.'.
';
+ $start_time.'';
}
if ($bt_status eq 'fail') {
$status.='You did not pass the '.$title.' given on '.
- $start_time.'.
';
+ $start_time.'';
if (!$previous) {
$status.=&add_request_another_attempt_button();
}
@@ -765,12 +773,15 @@ DONEBUTTON
$Apache::lonhomework::results{"resource.$version.0.submission"}='';
} else {
delete($Apache::lonhomework::results{"resource.$version.0.bridgetask.portfiles"});
+ $award = '';
}
&Apache::lonhomework::showhash(%Apache::lonhomework::results);
&Apache::structuretags::finalize_storage();
if ($award eq 'SUBMITTED') {
&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') {
my $optional_required=
@@ -882,13 +893,14 @@ DONEBUTTON
$result.=''.&Apache::loncommon::endbodytag().'