[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework grades.pm
raeburn
raeburn at source.lon-capa.org
Tue Mar 10 13:01:25 EDT 2015
raeburn Tue Mar 10 17:01:25 2015 EDT
Modified files: (Branch: version_2_11_X)
/loncom/homework grades.pm
Log:
- For 2.11
Backport 1.731, 1.732, 1.733
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.596.2.12.2.32 loncom/homework/grades.pm:1.596.2.12.2.33
--- loncom/homework/grades.pm:1.596.2.12.2.32 Sat Jan 24 02:27:01 2015
+++ loncom/homework/grades.pm Tue Mar 10 17:01:24 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.596.2.12.2.32 2015/01/24 02:27:01 raeburn Exp $
+# $Id: grades.pm,v 1.596.2.12.2.33 2015/03/10 17:01:24 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2632,7 +2632,7 @@
}
unless ($hide) {
if (@randomize) {
- foreach my $id (@hidden) {
+ foreach my $id (@randomize) {
if ($key =~ /^\Q$id\E/) {
$hide = 'rand';
last;
@@ -5947,8 +5947,17 @@
my ($classlist)= @_;
my %idmap;
foreach my $student (keys(%$classlist)) {
- $idmap{$classlist->{$student}->[&Apache::loncoursedata::CL_ID]}=
- $student;
+ my $id = $classlist->{$student}->[&Apache::loncoursedata::CL_ID];
+ unless ($id eq '') {
+ if (!exists($idmap{$id})) {
+ $idmap{$id} = $student;
+ } else {
+ my $status = $classlist->{$student}->[&Apache::loncoursedata::CL_STATUS];
+ if ($status eq 'Active') {
+ $idmap{$id} = $student;
+ }
+ }
+ }
}
return %idmap;
}
More information about the LON-CAPA-cvs
mailing list