--- loncom/interface/lonhtmlcommon.pm 2006/06/01 19:30:49 1.131
+++ loncom/interface/lonhtmlcommon.pm 2006/06/14 18:34:46 1.133
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.131 2006/06/01 19:30:49 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.133 2006/06/14 18:34:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -150,8 +150,13 @@ sub get_recent {
# Create hash with key as time and recent as value
my %time_hash = ();
+ my $nfrozen = 0;
foreach (keys %recent) {
- my $thistime=(split(/\&/,$recent{$_}))[0];
+ my ($thistime,$thisvalue)=(split(/\&/,$recent{$_}));
+ if (($thisvalue eq 'role_frozen') && ($area='roles')) {
+ $thistime=time+$nfrozen;
+ $nfrozen++;
+ }
$time_hash{$thistime} = $_;
}
@@ -160,7 +165,7 @@ sub get_recent {
my $idx = 1;
foreach (reverse sort keys %time_hash) {
$return_hash{$time_hash{$_}} =
- &unescape((split(/\&/,$recent{$_}))[1]);
+ &unescape((split(/\&/,$recent{$time_hash{$_}}))[1]);
if ($n && ($idx++ >= $n)) {last;}
}
@@ -948,7 +953,7 @@ sub r_print {
# ------------------------------------------------------- Puts directory header
sub crumbs {
- my ($uri,$target,$prefix,$form,$size,$noformat)=@_;
+ my ($uri,$target,$prefix,$form,$size,$noformat,$skiplast)=@_;
if (! defined($size)) {
$size = '+2';
}
@@ -964,7 +969,14 @@ sub crumbs {
foreach my $dir (split('/',$uri)) {
if (! $dir) { next; }
$path .= $dir;
- unless ($path eq $uri) { $path.='/'; }
+ if ($path eq $uri) {
+ if ($skiplast) {
+ $output.=$dir;
+ last;
+ }
+ } else {
+ $path.='/';
+ }
my $linkpath = &Apache::loncommon::escape_single($path);
if ($form) {
$linkpath=