Showing only sections '.join(', ',@chosen_sections).
+ '.
'."\n";
+ }
my $regexp="^$symb\0";
my %queue=&Apache::lonnet::dump($queue,$cdom,$cnum,$regexp);
@@ -1187,13 +1214,19 @@ sub get_from_queue {
sub select_user {
my ($symb,$cid)=&Apache::lonxml::whichuser();
- my $result.='
';
my @chosen_sections=
&Apache::loncommon::get_env_multiple('form.chosensections');
&Apache::grades::init_perm();
my ($classlist,$section,$fullname)=&Apache::grades::getclasslist(\@chosen_sections,);
&Apache::grades::reset_perm();
+
+ my $result;
+ if (!(grep(/^all$/,@chosen_sections))) {
+ $result.='
Showing only sections '.join(', ',@chosen_sections).
+ '.
'."\n";
+ }
+ $result.='
';
foreach my $student (sort {lc($$fullname{$a}) cmp lc($$fullname{$b}) } keys %$fullname) {
my ($uname,$udom) = split(/:/,$student);
@@ -1370,6 +1403,7 @@ sub get_instance {
$dim_info.='
Question : you did not pass this '.$mandatory.' question
';
}
my $man_count=0;
+ my $man_passed=0;
my $opt_count=0;
my $opt_passed=0;
foreach my $id (@{$dimension{$instance.'.criterias'}}) {
@@ -1381,12 +1415,16 @@ sub get_instance {
}
} else {
$man_count++;
+ if ($Apache::lonhomework::history{"resource.$version.$dim.$instance.$id.status"} eq 'pass') {
+ $man_passed++;
+ }
}
}
+ if ($man_passed eq $man_count) { $man_passed='all'; }
my $opt_req=&Apache::lonxml::get_param('OptionalRequired',
$parstack,$safeeval);
if ($opt_req !~ /\S/) { $opt_req='0'; }
- $dim_info.="\n
".&mt('You passed all of the mandatory components and [_1] of the [_2] optional components, of which you were required to pass [_3].',$opt_passed,$opt_count,$opt_req)."
\n";
+ $dim_info.="\n
".&mt('You passed [_1] of the [_2] mandatory components and [_3] of the [_4] optional components, of which you were required to pass [_5].',$man_passed,$man_count,$opt_passed,$opt_count,$opt_req)."
\n";
my $internal_location=&internal_location($dim);
$result=~s/\Q$internal_location\E/$dim_info/;