--- loncom/homework/bridgetask.pm 2007/01/13 06:11:17 1.219
+++ loncom/homework/bridgetask.pm 2007/03/26 23:33:26 1.224.2.2
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: bridgetask.pm,v 1.219 2007/01/13 06:11:17 albertel Exp $
+# $Id: bridgetask.pm,v 1.224.2.2 2007/03/26 23:33:26 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -868,8 +868,8 @@ sub get_key_todo {
my ($symb,$cid)=&Apache::lonnet::whichuser();
my $cnum = $env{'course.'.$cid.'.num'};
my $cdom = $env{'course.'.$cid.'.domain'};
- my $uname = $env{'form.gradinguser'};
- my $udom = $env{'form.gradingdomain'};
+ my $uname = &LONCAPA::clean_username($env{'form.gradinguser'});
+ my $udom = &LONCAPA::clean_domain($env{'form.gradingdomain'});
my $gradingkey=&encode_queue_key($symb,$udom,$uname);
@@ -2245,7 +2245,6 @@ sub end_Dimension {
my $result=&Apache::lonxml::endredirection();
my $dim=&get_id($parstack,$safeeval);
if (&skip_dimension_parsing($dim)) {
- &disable_dimension_parsing($dim);
pop(@Apache::bridgetask::dimension);
return;
}
@@ -2290,10 +2289,10 @@ sub end_Dimension {
('sub' x $dimension{$dim}{'depth'}).'question';
$ucquestion =~ s/^(.)/uc($1)/e;
if ($dim_status eq 'pass') {
- $dim_info.='
'.$ucquestion.' : you passed the above '.$mandatory.' '.$question.'
';
+ $dim_info.=''.$ucquestion.' : you passed this '.$mandatory.' '.$question.'
';
}
if ($dim_status eq 'fail') {
- $dim_info.=''.$ucquestion.' : you did not pass the above '.$mandatory.' '.$question.'
';
+ $dim_info.=''.$ucquestion.' : you did not pass this '.$mandatory.' '.$question.'
';
}
my %counts = &get_counts($dim,$instance,$parstack,
$safeeval);
@@ -2323,8 +2322,11 @@ sub end_Dimension {
}
}
# puts the results at the end of the dimension
- $result .= $dim_info;
-
+ if ($result =~m{}) {
+ $result=~s{}{$dim_info};
+ } else {
+ $result .= $dim_info;
+ }
# puts the results at the beginning of the dimension
# my $internal_location=&internal_location($dim);
# $result=~s/\Q$internal_location\E/$dim_info/;
@@ -2486,13 +2488,13 @@ sub question_status_message {
$status .= '.';
if ($counts->{'opt'}) {
$status .= ' You were required to pass '.$counts->{'opt_req'}.
- 'optional ';
+ ' optional ';
if ($counts->{'opt_dim'} + $counts->{'man_dim'} < 1) {
$status .=
- ' component'.($counts->{'opt_req'} == 1?'':'s');
+ ($counts->{'opt_req'} == 1?'criterion':'criteria');
} else {
$status .=
- ($counts->{'opt_req'} == 1?'criterion':'criteria');
+ 'component'.($counts->{'opt_req'} == 1?'':'s');
}
$status .= '.';
}
@@ -2834,11 +2836,13 @@ sub proctor_validation_screen {
.'';
}
if (!$env{'form.proctordomain'}) { $env{'form.proctordomain'}=$domain; }
+ my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
+ $uri = &HTML::Entities::encode($uri,'<>&"');
my $result= (<Proctor Validation
Your room's proctor needs to validate your access to this resource.
$msg
-