[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm
raeburn
raeburn at source.lon-capa.org
Tue Mar 5 18:23:11 EST 2013
raeburn Tue Mar 5 23:23:11 2013 EDT
Modified files:
/loncom/interface lonwhatsnew.pm
Log:
- Skip to next record when looping through nohist_rolelog.db contents,
immediately particular condition not met.
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.111 loncom/interface/lonwhatsnew.pm:1.112
--- loncom/interface/lonwhatsnew.pm:1.111 Tue Mar 5 22:51:48 2013
+++ loncom/interface/lonwhatsnew.pm Tue Mar 5 23:23:11 2013
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.111 2013/03/05 22:51:48 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.112 2013/03/05 23:23:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1347,24 +1347,24 @@
if (keys(%changes) > 0) {
foreach my $chg (keys(%changes)) {
if (ref($changes{$chg}) eq 'HASH') {
+ next if ($changes{$chg}{'delflag'});
if ($rolechgtime > 0) {
- next if ($changes{$chg}{'exe_time'} < $rolechgtime);
+ next if ($changes{$chg}{'exe_time'} < $rolechgtime);
}
if ($changes{$chg}{'exe_time'}) {
my $timestamp = $changes{$chg}{'exe_time'};
if (ref($changes{$chg}{'logentry'}) eq 'HASH') {
- next if ($changes{$chg}{'delflag'});
- my $start = $changes{$chg}{'logentry'}{'start'};
my $end = $changes{$chg}{'logentry'}{'end'};
- my $section = $changes{$chg}{'logentry'}{'section'};
- my $role = $changes{$chg}{'logentry'}{'role'};
- my $uname = $changes{$chg}{'uname'};
- my $udom = $changes{$chg}{'udom'};
next if ($end && $end <= $now);
+ my $start = $changes{$chg}{'logentry'}{'start'};
+ next if ($start >= $timestamp);
+ my $section = $changes{$chg}{'logentry'}{'section'};
if (($viewablesec ne '') && ($section ne '')) {
next if ($viewablesec ne $section);
}
- next if ($start >= $timestamp);
+ my $role = $changes{$chg}{'logentry'}{'role'};
+ my $uname = $changes{$chg}{'uname'};
+ my $udom = $changes{$chg}{'udom'};
if ($role eq 'st') {
$stucounted{$uname.':'.$udom.':'.$section} = $start.':'.$end;
} else {
More information about the LON-CAPA-cvs
mailing list