'."\n";
}
return $result;
}
@@ -258,18 +302,19 @@ sub add_request_another_attempt_button {
my $description=&Apache::slotrequest::get_description($slot_name,
$slot);
$result.=(< Will be next available: $description
+
Will be next available: $description
STUFF
}
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); }
- $symb=&Apache::lonnet::escape($symb);
- $result.='';
+ &mt($text).'" />'."\n\t".
+ ''."\n";
return $result;
}
@@ -289,9 +334,22 @@ sub style {
my ($target) = @_;
if ($target eq 'web'
|| $target eq 'webgrade') {
- return (<
STYLE
+ if ($env{'browser.type'} eq 'explorer'
+ && $env{'browser.os'} eq 'win' ) {
+ if ($env{'browser.version'} < 7) {
+ $style .= (<
+STYLE
+ } else {
+ $style .= (<
+STYLE
+ }
+ }
+ return $style;
}
return;
}
@@ -313,18 +371,52 @@ sub show_task {
return 1;
}
+my @delay;
+sub nest {
+ if (@delay) {
+ return $delay[-1];
+ } else {
+ return;
+ }
+}
+
+sub nested_parse {
+ my ($str,$env,$args) = @_;
+ my @old_env = @Apache::scripttag::parser_env;
+ @Apache::scripttag::parser_env = @$env;
+ if (exists($args->{'set_dim_id'})) {
+ &enable_dimension_parsing($args->{'set_dim_id'});
+ }
+ push(@delay,(($args->{'delayed_dim_results'})? 1 : 0));
+ my $result = &Apache::scripttag::xmlparse($$str);
+ pop(@delay);
+ if (exists($args->{'set_dim_id'})) {
+ &disable_dimension_parsing();
+ }
+ @Apache::scripttag::parser_env = @old_env;
+ if ($args->{'delayed_dim_results'}) {
+ my $dim = &get_dim_id();
+ &Apache::lonxml::debug(" tossing out $result ");
+ &Apache::lonxml::debug(" usining out $dim 's ". $dimension{$dim}{'result'});
+ return $dimension{$dim}{'result'};
+ }
+ return $result;
+}
+
sub internal_location {
my ($id)=@_;
return '';
}
sub submission_time_stamp {
- my ($symb,$courseid,$udom,$uname)=&Apache::lonxml::whichuser();
+ my ($symb,$courseid,$udom,$uname)=&Apache::lonnet::whichuser();
my $submissiontime;
my $version=$Apache::lonhomework::history{'resource.0.version'};
for (my $v=$Apache::lonhomework::history{'version'};$v>0;$v--) {
- if (defined($Apache::lonhomework::history{$v.':resource.'.$version.'.0.bridgetask.portfiles'})) {
+ if (defined($Apache::lonhomework::history{$v.':resource.'.$version.'.0.bridgetask.portfiles'})
+ && defined($Apache::lonhomework::history{$v.':resource.'.$version.'.0.tries'})) {
$submissiontime=$Apache::lonhomework::history{$v.':timestamp'};
+ last;
}
}
my $result;
@@ -335,16 +427,18 @@ sub submission_time_stamp {
my ($color,$when)=('#FF6666','after');
if ($diff > 0) { ($color,$when)=('#336600','before'); }
my $info;
+ $diff = abs($diff);
if ($diff%60) { $info=($diff%60).' seconds'; }
$diff=int($diff/60);
if ($diff%60) { $info=($diff%60).' minutes '.$info; }
$diff=int($diff/60);
if ($diff) { $info=$diff.' hours '.$info; }
$result='
'.
- &mt('Student submitted [_1] [_2] the deadline.
- (Submission was at [_3], end of period was [_4].)',
- $info,$when,scalar(localtime($submissiontime)),
- scalar(localtime($slot{'endtime'}))).
+ &mt('Student submitted [_1] [_2] the deadline. '.
+ '(Submission was at [_3], end of period was [_4].)',
+ $info,$when,
+ &Apache::lonlocal::locallocaltime($submissiontime),
+ &Apache::lonlocal::locallocaltime($slot{'endtime'})).
'
';
}
return $result;
@@ -353,7 +447,7 @@ sub submission_time_stamp {
sub file_list {
my ($files,$uname,$udom) = @_;
if (!defined($uname) || !defined($udom)) {
- (undef,undef,$udom,$uname) = &Apache::lonxml::whichuser();
+ (undef,undef,$udom,$uname) = &Apache::lonnet::whichuser();
}
my $file_url = '/uploaded/'.$udom.'/'.$uname.'/portfolio/';
@@ -362,26 +456,44 @@ sub file_list {
my $file=$file_url.$partial_file;
$file=~s|/+|/|g;
&Apache::lonnet::allowuploaded('/adm/bridgetask',$file);
- $file_list.='
+$message_status
+$comment_status
+DONESCREEN
+
+}
+
sub start_Task {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
my ($status,$accessmsg,$slot);
+ &Apache::structuretags::init_problem_globals('Task');
if ($target ne 'webgrade') {
- &Apache::structuretags::init_problem_globals('Task');
&Apache::structuretags::initialize_storage();
&Apache::lonhomework::showhash(%Apache::lonhomework::history);
if ($env{'request.state'} eq 'construct') {
@@ -428,7 +592,7 @@ sub start_Task {
$result.='";
+ $result.=$uri.'">'.&add_grading_button()."\n";
my $symb=&Apache::lonnet::symbread();
if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) {
$result.='