--- loncom/interface/lonhtmlcommon.pm 2006/05/30 12:46:09 1.130 +++ 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.130 2006/05/30 12:46:09 www 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;} } @@ -820,10 +825,10 @@ sub Create_PrgWin { function openpopwin () { popwin=open(\'\',\'popwin\',\'width=400,height=100\');". "popwin.document.writeln(\'".$start_page. - "

$heading

". - "
". + "

$heading<\/h4>". + "". ''.$end_page. + &mt('Starting').'" /><\\/form>'.$end_page. "\');". "popwin.document.close();}". "\nwindow.setTimeout(openpopwin,0)"); @@ -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= @@ -998,7 +1010,7 @@ var checkwin; function spellcheckerwindow() { checkwin=window.open($nothing,'spellcheckwin','height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'); - checkwin.document.writeln('$start_page
$end_page'); + checkwin.document.writeln('$start_page
<\\/form>$end_page'); checkwin.document.close(); } // END LON-CAPA Internal -->