--- loncom/homework/bridgetask.pm 2005/05/31 16:27:43 1.34
+++ loncom/homework/bridgetask.pm 2005/05/31 21:11:56 1.36
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.34 2005/05/31 16:27:43 albertel Exp $
+# $Id: bridgetask.pm,v 1.36 2005/05/31 21:11:56 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -91,6 +91,7 @@ sub proctor_check_auth {
sub get_version {
my ($version,$previous);
if ($env{'form.previousversion'} &&
+ $env{'form.previousversion'} ne 'current' &&
defined($Apache::lonhomework::history{'resource.'.$env{'form.previousversion'}.'.status'})) {
$version=$env{'form.previousversion'};
$previous=1;
@@ -129,6 +130,7 @@ sub add_previous_version_button {
my $list=''.
join(" \n",@to_show).
" \n";
+ $list.=''.&mt('Current').' ';
$result.='
';
+ my $symb=&Apache::lonnet::symbread();
+ if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); }
+ $symb=&Apache::lonnet::escape($symb);
+ $result.='';
return $result;
}
@@ -264,9 +272,8 @@ sub start_Task {
} elsif ($target eq 'web') {
my $name= &Apache::structuretags::get_resource_name($parstack,$safeeval);
$result.="$head_tag_start$name
- $body_tag_start \n $form_tag_start".
- ' ';
- $result.=&preserve_grade_info();
+ $body_tag_start \n";
+
my ($version,$previous)=&get_version();
if ($Apache::lonhomework::history{"resource.$version.status"} eq 'fail') {
$result.=''.&mt('Did not pass').' ';
@@ -277,6 +284,10 @@ sub start_Task {
if ($Apache::lonhomework::history{"resource.$version.status"} eq 'pass') {
$result.=''.&mt('Passed').' ';
}
+ $result.=$form_tag_start.
+ ' ';
+ $result.=&preserve_grade_info();
+
}
} elsif ( ($target eq 'grade' && $env{'form.webgrade'}) ||
$target eq 'webgrade') {
@@ -661,6 +672,8 @@ sub show_queue {
my ($symb,$uname,$udom) = &decode_queue_key($key);
my $title=&Apache::lonnet::gettitle($symb);
$result.="";
+ my $slot=$queue{$key}->[0];
+ my %slot_data=&Apache::lonnet::get_slot($slot);
if ($with_selects) {
my $ekey=&Apache::lonnet::escape($key);
my ($action,$description)=('select',&mt('Select'));
@@ -672,7 +685,8 @@ sub show_queue {
($action,$description)=('unlock',&mt('Unlock'));
}
}
- $result.=(<
FORM
+
+ } else {
+ $result.=''.&mt("In Progress").' '
+ }
}
$result.="$title $uname ";
- my $slot=$queue{$key}->[0];
- my %slot_data=&Apache::lonnet::get_slot($slot);
$result.='queue entry Slot: '.$slot.' End time: '.
&Apache::lonlocal::locallocaltime($slot_data{'endtime'}).
" ";