--- loncom/interface/lonhtmlcommon.pm 2006/07/29 00:31:58 1.147
+++ loncom/interface/lonhtmlcommon.pm 2006/08/04 21:33:53 1.150
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.147 2006/07/29 00:31:58 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.150 2006/08/04 21:33:53 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1014,9 +1014,12 @@ sub crumbs {
$output.=qq{$dir/};
}
} else {
- $output.=$uri;
+ foreach my $dir (split('/',$uri)) {
+ if (! $dir) { next; }
+ $output.=$dir.'/';
+ }
}
- unless ($uri=~/\/$/) { $output=~s/\/$//; }
+ if ($uri !~ m|/$|) { $output=~s|/$||; }
return $output.''.($noformat?'':'
');
}
@@ -1784,7 +1787,7 @@ sub set_form_elements {
($$elements{$name} eq 'checkbox')) {
$output .= qq|
if (courseForm.elements['$name'].value == "$value") {
- courseForm.elemenst['$name'].checked = true;
+ courseForm.elements['$name'].checked = true;
}|;
}
}