version 1.105.2.5, 2013/03/05 23:42:37
|
version 1.106, 2012/08/19 00:18:16
|
Line 285 END
|
Line 285 END
|
$scripttag.='document.visible.submit(); |
$scripttag.='document.visible.submit(); |
} |
} |
|
|
function thresholdreset() { |
|
document.visible.command.value="reset"; |
|
document.visible.submit(); |
|
} |
|
|
|
function togglelogins() { |
function togglelogins() { |
var total = document.visible.logincount.value; |
var total = document.visible.logincount.value; |
var sumrow = document.visible.loginrow.value; |
var sumrow = document.visible.loginrow.value; |
Line 532 sub display_actions_box {
|
Line 527 sub display_actions_box {
|
$headings{'crslogin'} = &mt('Last login for users in last 24 hours'); |
$headings{'crslogin'} = &mt('Last login for users in last 24 hours'); |
} |
} |
|
|
my ($now,$starttime,$activatedstart,$expiredstart,$crsloginstart); |
my $now = time; |
$now = time; |
|
|
|
if ($timediff{'versions'} == -1) { |
if ($timediff{'versions'} == -1) { |
$starttime = 0; |
$timediff{'versions'} = time; |
} else { |
|
$starttime = $now - $timediff{'versions'}; |
|
} |
} |
|
my $starttime = $now - $timediff{'versions'}; |
|
|
if ($timediff{'newroles'} == -1) { |
if ($timediff{'newroles'} == -1) { |
$activatedstart = 0; |
$timediff{'newroles'} = time; |
} else { |
|
$activatedstart = $now - $timediff{'newroles'}; |
|
} |
} |
|
my $activatedstart = $now - $timediff{'newroles'}; |
|
|
if ($timediff{'oldroles'} == -1) { |
if ($timediff{'oldroles'} == -1) { |
$expiredstart = 0; |
$timediff{'oldroles'} = time; |
} else { |
|
$expiredstart = $now - $timediff{'oldroles'}; |
|
} |
} |
|
my $expiredstart = $now - $timediff{'oldroles'}; |
|
|
if ($timediff{'crslogin'} == -1) { |
if ($timediff{'crslogin'} == -1) { |
$crsloginstart = 0; |
$timediff{'crslogin'} = time; |
} else { |
|
$crsloginstart = $now - $timediff{'crslogin'}; |
|
} |
} |
|
|
|
my $crsloginstart = $now - $timediff{'crslogin'}; |
|
|
my $countunread = $display_settings{$cid.':countunread'}; |
my $countunread = $display_settings{$cid.':countunread'}; |
unless (defined($countunread)) { |
unless (defined($countunread)) { |
$countunread = 'on'; |
$countunread = 'on'; |
Line 1345 sub getactivated {
|
Line 1335 sub getactivated {
|
my (%stucounted,%advcounted); |
my (%stucounted,%advcounted); |
my $activatedcount = 0; |
my $activatedcount = 0; |
if (keys(%changes) > 0) { |
if (keys(%changes) > 0) { |
foreach my $chg (keys(%changes)) { |
foreach my $chg (sort { $b <=> $a } (keys(%changes))) { |
if (ref($changes{$chg}) eq 'HASH') { |
if (ref($changes{$chg}) eq 'HASH') { |
next if ($changes{$chg}{'delflag'}); |
my $timestamp = $changes{$chg}{'exe_time'}; |
if ($rolechgtime > 0) { |
if ($timestamp) { |
next if ($changes{$chg}{'exe_time'} < $rolechgtime); |
if ($rolechgtime > 0) { |
} |
if ($timestamp < $rolechgtime) { |
if ($changes{$chg}{'exe_time'}) { |
last; |
my $timestamp = $changes{$chg}{'exe_time'}; |
} |
|
} |
if (ref($changes{$chg}{'logentry'}) eq 'HASH') { |
if (ref($changes{$chg}{'logentry'}) eq 'HASH') { |
my $end = $changes{$chg}{'logentry'}{'end'}; |
next if ($changes{$chg}{'delflag'}); |
next if ($end && $end <= $now); |
|
my $start = $changes{$chg}{'logentry'}{'start'}; |
my $start = $changes{$chg}{'logentry'}{'start'}; |
next if ($start >= $timestamp); |
my $end = $changes{$chg}{'logentry'}{'end'}; |
my $section = $changes{$chg}{'logentry'}{'section'}; |
my $section = $changes{$chg}{'logentry'}{'section'}; |
if (($viewablesec ne '') && ($section ne '')) { |
|
next if ($viewablesec ne $section); |
|
} |
|
my $role = $changes{$chg}{'logentry'}{'role'}; |
my $role = $changes{$chg}{'logentry'}{'role'}; |
my $uname = $changes{$chg}{'uname'}; |
my $uname = $changes{$chg}{'uname'}; |
my $udom = $changes{$chg}{'udom'}; |
my $udom = $changes{$chg}{'udom'}; |
|
next if ($end && $end <= $now); |
|
if (($viewablesec ne '') && ($section ne '')) { |
|
next if ($viewablesec ne $section); |
|
} |
|
next if ($start >= $timestamp); |
if ($role eq 'st') { |
if ($role eq 'st') { |
$stucounted{$uname.':'.$udom.':'.$section} = $start.':'.$end; |
$stucounted{$uname.':'.$udom.':'.$section} = $start.':'.$end; |
} else { |
} else { |
Line 1612 sub display_handgrade {
|
Line 1604 sub display_handgrade {
|
foreach my $res (@{$tograde}) { |
foreach my $res (@{$tograde}) { |
$rowNum ++; |
$rowNum ++; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my ($map,$id,$url)=&Apache::lonnet::decode_symb($res); |
my $linkurl='/adm/grades'; |
my $linkurl=&Apache::lonnet::clutter($url); |
|
$linkurl .= '?symb='.&escape($res); |
|
if ($$ungraded{$res}{'enclink'}) { |
if ($$ungraded{$res}{'enclink'}) { |
$linkurl = |
$linkurl.='?symb='.$$ungraded{$res}{'encsymb'}; |
$$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'}; |
} else { |
|
$linkurl.='?symb='.&escape($res); |
} |
} |
|
$linkurl.='&command=ungraded'; |
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
Line 1671 sub display_abovethreshold {
|
Line 1663 sub display_abovethreshold {
|
); |
); |
if (@{$warnings} > 0) { |
if (@{$warnings} > 0) { |
@{$warnings} = sort { &cmp_title($a,$b,$res_title) } @{$warnings}; |
@{$warnings} = sort { &cmp_title($a,$b,$res_title) } @{$warnings}; |
|
$r->print('<form name="reset_tracking" method="post" action="/adm/whatsnew">'. |
|
' <input type="hidden" name="command" value="reset" />'."\n". |
|
' <input type="hidden" name="refpage" value="'.$refpage.'" />'. |
|
"\n"); |
$r->print('<tr class="LC_info_row">'. |
$r->print('<tr class="LC_info_row">'. |
'<td class="LC_left_item">'.$lt{'reso'}. |
'<td class="LC_left_item">'.$lt{'reso'}.'</td>'. |
'<input type="hidden" name="command" value="" /></td>'. |
|
'<td>'.$lt{'part'}.'</td><td>'.$lt{'nust'}.'</td>'. |
'<td>'.$lt{'part'}.'</td><td>'.$lt{'nust'}.'</td>'. |
'<td>'.$lt{'avat'}.'</td><td>'.$lt{'dedi'}.'</td>'. |
'<td>'.$lt{'avat'}.'</td><td>'.$lt{'dedi'}.'</td>'. |
'<td>'.$lt{'lare'}.'</td><td class="LC_right_item">'. |
'<td>'.$lt{'lare'}.'</td><td class="LC_right_item">'. |
Line 1703 sub display_abovethreshold {
|
Line 1698 sub display_abovethreshold {
|
if (ref($$triggered{$res}{text}) eq 'ARRAY') { |
if (ref($$triggered{$res}{text}) eq 'ARRAY') { |
if (@{$$triggered{$res}{text}} > 1) { |
if (@{$$triggered{$res}{text}} > 1) { |
for (my $i=1; $i<@{$$triggered{$res}{text}}; $i++) { |
for (my $i=1; $i<@{$$triggered{$res}{text}}; $i++) { |
$r->print('<tr '.$css_class.'>'. |
$r->print('<tr class="'.$css_class.'">'. |
$$triggered{$res}{text}[$i].'</tr>'); |
$$triggered{$res}{text}[$i].'</tr>'); |
} |
} |
} |
} |
} |
} |
} |
} |
$r->print('<tr class="LC_info_row"><td colspan="7" class="LC_right_item"><br /><input type="button" name="counters" value="'.$lt{'rese'}.'" onclick="javascript:thresholdreset();" /></td></tr>'); |
$r->print('<tr class="LC_info_row"><td colspan="7" class="LC_right_item"><br /><input type="submit" name="counters" value="'.$lt{'rese'}.'" /></td></tr></form>'); |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
$r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>'); |
$r->print('<tr class="LC_empty_row"><td>'.$itemserror.'</td></tr>'); |
} else { |
} else { |
Line 1926 sub display_coursediscussion {
|
Line 1921 sub display_coursediscussion {
|
my $forum_title = $$unread{$ressymb}{'title'}; |
my $forum_title = $$unread{$ressymb}{'title'}; |
my $type = 'Resource'; |
my $type = 'Resource'; |
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb); |
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb); |
my $disclink = $feedurl.'?symb='.&escape($$unread{$ressymb}{symb}); |
my $disclink = $feedurl.'?symb='.$$unread{$ressymb}{symb}; |
if ($feedurl =~ /bulletinboard/) { |
if ($feedurl =~ /bulletinboard/) { |
$type = 'Discussion Board'; |
$type = 'Discussion Board'; |
} |
} |