'
-.$message_status
-.$comment_status;
-
+ .$shown
+ .$message_status
+ .$comment_status;
}
sub start_Task {
@@ -655,7 +672,11 @@ sub start_Task {
if ($status eq 'CAN_ANSWER' && $version eq '') {
# CAN_ANSWER mode, and no current version, unproctored access
# thus self-checkedin
- &check_in('Task',undef,undef,$slot_name);
+ my $check = &check_in('Task',undef,undef,$slot_name);
+ if ($check =~ /^error: /) {
+ my $symb=&Apache::lonnet::symbread();
+ &Apache::lonnet::logthis("Error during self-checkin of version $version of Task (symb: $symb) using slot: $slot_name");
+ }
&add_to_queue('gradingqueue',{'type' => 'Task',
'time' => time,
'slot' => $slot_name});
@@ -685,7 +706,7 @@ sub start_Task {
$msg.='
'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'
';
} elsif ($status eq 'NOT_IN_A_SLOT') {
$msg.='
'.&mt('You are not currently signed up to work at this time and/or place.').'
';
- $msg.=&add_request_another_attempt_button("Sign up for time to work.");
+ $msg.=&add_request_another_attempt_button("Sign up for time to work");
} elsif ($status eq 'NEEDS_CHECKIN') {
$msg.='
'.&mt('You need the Proctor to validate you.').
'
'.&proctor_validation_screen($slot);
@@ -701,7 +722,7 @@ sub start_Task {
}
$result.=$msg.' ';
} elsif ($target eq 'tex') {
- $result.='\begin{document}\noindent \vskip 1 mm \begin{minipage}{\textwidth}\vskip 0 mm';
+ $result.='\noindent \vskip 1 mm \begin{minipage}{\textwidth}\vskip 0 mm';
if ($status eq 'UNAVAILABLE') {
$result.=&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'\vskip 0 mm ';
} else {
@@ -771,6 +792,11 @@ sub start_Task {
$result.=''.&mt("Stopped grading.").''.$back;
} elsif ($status_code eq 'cancel') {
$result.=''.&mt("Cancelled grading.").''.$back;
+ } elsif ($status_code eq 'terminated') {
+ $result.= ''.&mt('Terminated grading').' '.
+ ''.
+ &mt('Grading for [_1] has not been saved because of a grading key mismatch.',
+ ''.$env{'form.terminated'}.'').' '.$back;
} elsif ($status_code eq 'never_versioned') {
$result.=''.
&mt("Requested user has never accessed the task.").
@@ -991,6 +1017,8 @@ sub get_key_todo {
return (undef,'stop');
} elsif ($env{'form.cancel'}) {
return (undef,'cancel');
+ } elsif ($env{'form.terminated'}) {
+ return (undef, 'terminated');
} elsif ($env{'form.next'}) {
return (undef,'select_user');
}
@@ -1036,13 +1064,17 @@ sub get_key_todo {
if ($env{'form.queuemode'} ne 'selected') {
# don't get something new from the queue if they hit the stop button
- if (!(($env{'form.cancel'} || $env{'form.stop'})
+ if (!(($env{'form.cancel'} || $env{'form.stop'} || $env{'form.terminated'})
&& $target eq 'webgrade')
&& !$env{'form.gradingaction'}) {
&Apache::lonxml::debug("Getting anew $queue");
return (&get_from_queue($queue));
} else {
- return (undef,'stop');
+ if ($env{'form.terminated'}) {
+ return (undef,'terminated');
+ } else {
+ return (undef,'stop');
+ }
}
}
return (undef,undef)
@@ -1072,14 +1104,21 @@ sub end_Task {
}
if ($status eq 'CAN_ANSWER' && !$previous &&
!$env{'form.donescreen'}) {
- $result.="\n".'
'.
+ my ($portheader,$porttext);
+ if ($Apache::lonhomework::history{"resource.$version.0.bridgetask.portfiles"}) {
+ $portheader = &mt('Submit Additional Portfolio Files for Grading');
+ $porttext = &mt('Indicate which additional files from your portfolio are to be evaluated in grading this task.');
+ } else {
+ $portheader = &mt('Submit Portfolio Files for Grading');
+ $porttext = &mt('Indicate the files from your portfolio to be evaluated in grading this task.');
+ }
+ $result.="\n".'