');
}
- &display_launcher($r,$actionitem,$refpage,$checkallowed,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,\%interval,$countunread,\%expired,$expirecount,\%activated,$activecount,$crstype,$itemserror,\%loggedin,$logincount);
+ &display_launcher($r,$actionitem,$refpage,$checkallowed,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,\%interval,$countunread,\%expired,$expirecount,\%activated,$activecount,$crstype,$itemserror,\%loggedin,$logincount,$classlist);
$displayed ++;
}
}
@@ -688,7 +693,7 @@ sub display_threshold_config {
foreach my $type (@thresholditems) {
my $parameter = $env{'request.course.id'}.':threshold_'.$type;
# onchange is javascript to automatically check the 'Set' button.
- my $onchange = 'onFocus="javascript:window.document.forms'.
+ my $onchange = 'onfocus="javascript:window.document.forms'.
"['thresholdform'].elements['".$parameter."_setparmval']".
'.checked=true;"';
$r->print(&Apache::loncommon::start_data_table_row()."\n".
@@ -795,7 +800,7 @@ function toggle_countunread(choice) {
.' '
.&mt("This can increase the time taken to gather data for the [_1]What's New Page[_2] by a few seconds.",'','')
.' '
- .&mt('Currently set to [_1].',''.$current.'.')
+ .&mt('Currently set to [_1].',''.$current.'')
);
$r->print('
'.
'
'.$lt{'part'}.'
'.$lt{'nust'}.'
'.
'
'.$lt{'avat'}.'
'.$lt{'dedi'}.'
'.
- '
'.$lt{'lare'}.'
'.
- $lt{'reco'}.'
');
+ '
'.$lt{'lare'}.'
');
+ if ($checkallowed->{'resetcounters'}) {
+ $r->print('
'.$lt{'reco'}.'
');
+ }
+ $r->print('');
my $row;
foreach my $res (@{$warnings}) {
$row++;
@@ -1709,7 +1741,9 @@ sub display_abovethreshold {
}
}
}
- $r->print('
');
+ if ($checkallowed->{'resetcounters'}) {
+ $r->print('
');
+ }
} elsif ($itemserror) {
$r->print('
'.$itemserror.'
');
} else {
@@ -1755,7 +1789,7 @@ sub display_versionchanges {
}
sub display_rolechanges {
- my ($r,$chgcount,$changed,$interval,$crstype) = @_;
+ my ($r,$chgcount,$changed,$interval,$crstype,$classlist) = @_;
my $now = time();
my %lt = &Apache::lonlocal::texthash(
'user' => 'User',
@@ -1774,6 +1808,7 @@ sub display_rolechanges {
if (ref($changed) eq 'HASH') {
my @changes = sort { $b <=> $a } (keys(%{$changed}));
my $changenum = 0;
+ my $fullnameidx = &Apache::loncoursedata::CL_FULLNAME();
foreach my $item (@changes) {
if (ref($changed->{$item}) eq 'ARRAY') {
foreach my $chg (@{$changed->{$item}}) {
@@ -1791,8 +1826,14 @@ sub display_rolechanges {
my $udom = $chg->{'udom'};
$changenum ++;
my $css_class = $changenum%2?' class="LC_odd_row"':'';
+ my $fullname;
+ if (ref($classlist->{$uname.':'.$udom}) eq 'ARRAY') {
+ $fullname = $classlist->{$uname.':'.$udom}->[$fullnameidx];
+ } else {
+ $fullname = &Apache::loncommon::plainname($uname,$udom,'lastname');
+ }
my $link =
- &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom);
+ &Apache::loncommon::aboutmewrapper($fullname,$uname,$udom);
$r->print('
'.
'
'.&Apache::lonlocal::locallocaltime($item).'
'.
'
'.$link.'
'.
@@ -1812,7 +1853,8 @@ sub display_rolechanges {
}
sub display_crslogins {
- my ($r,$logincount,$loggedin,$interval,$crstype) = @_;
+ my ($r,$logincount,$loggedin,$interval,$crstype,$classlist) = @_;
+ return unless (ref($classlist) eq 'HASH');
my %lt = &Apache::lonlocal::texthash(
'user' => 'User',
'role' => 'Role',
@@ -1833,6 +1875,7 @@ sub display_crslogins {
if (ref($loggedin) eq 'HASH') {
my @logins = sort { $b <=> $a } (keys(%{$loggedin}));
my $numlogin = 0;
+ my $fullnameidx = &Apache::loncoursedata::CL_FULLNAME();
foreach my $item (@logins) {
if (ref($loggedin->{$item}) eq 'ARRAY') {
foreach my $user (@{$loggedin->{$item}}) {
@@ -1849,7 +1892,12 @@ sub display_crslogins {
$counts{$user->{'role'}}{$section} ++;
my $uname = $user->{'uname'};
my $udom = $user->{'udom'};
- my $fullname = &Apache::loncommon::plainname($uname,$udom,'lastname');
+ my $fullname;
+ if (ref($classlist->{$uname.':'.$udom}) eq 'ARRAY') {
+ $fullname = $classlist->{$uname.':'.$udom}->[$fullnameidx];
+ } else {
+ $fullname = &Apache::loncommon::plainname($uname,$udom,'lastname');
+ }
my $link =
&Apache::loncommon::aboutmewrapper($fullname,$uname,$udom);
push(@{$bylastname{$fullname}},
@@ -1926,7 +1974,7 @@ sub display_coursediscussion {
my $forum_title = $$unread{$ressymb}{'title'};
my $type = 'Resource';
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);
- my $disclink = $feedurl.'?symb='.&escape($$unread{$ressymb}{symb});
+ my $disclink = $feedurl.'?symb='. &escape($$unread{$ressymb}{symb});
if ($feedurl =~ /bulletinboard/) {
$type = 'Discussion Board';
}