--- loncom/interface/lonnavmaps.pm 2010/03/29 14:50:46 1.446
+++ loncom/interface/lonnavmaps.pm 2010/06/24 14:21:39 1.449
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.446 2010/03/29 14:50:46 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.449 2010/06/24 14:21:39 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
@@ -1401,11 +1401,11 @@ sub render {
my ($link,$text);
if ($condition) {
$link='navmaps?condition=0&filter=&'.$queryString.
- '&here='.&escape($here);
+ '&here='.&escape($here);
$text='Close all folders';
} else {
$link='navmaps?condition=1&filter=&'.$queryString.
- '&here='.&escape($here);
+ '&here='.&escape($here);
$text='Open all folders';
}
if ($env{'form.register'}) {
@@ -1715,7 +1715,7 @@ END
if (defined($anchor)) { $anchor='#'.$anchor; }
my $srcHasQuestion = $src =~ /\?/;
$args->{"resourceLink"} = $src.
- ($srcHasQuestion?'&':'?') .
+ ($srcHasQuestion?'&':'?') .
'symb=' . &escape($symb).$anchor;
}
# Now, we've decided what parts to show. Loop through them and
@@ -1777,12 +1777,11 @@ END
# it's quite likely this might fix other browsers, too, and
# certainly won't hurt anything.
if ($displayedJumpMarker) {
- $result .= "
-";
+");
}
$result.=&Apache::loncommon::end_data_table();
@@ -1802,40 +1801,6 @@ sub add_linkitem {
$$linkitems{$name}{'text'}=&mt($text);
}
-sub show_linkitems {
- my ($linkitems)=@_;
- my @linkorder = ("blank","launchnav","closenav","firsthomework",
- "everything","uncompleted","changefolder","clearbubbles");
-
- my $result .= (<
-
- '."\n";
-
- return $result;
-}
-
sub show_linkitems_toolbar {
my ($linkitems,$condition)=@_;
my @linkorder = ('firsthomework','everything','uncompleted',
@@ -2338,7 +2303,7 @@ resource object.
Based on the symb of the resource, get a resource object for that
resource. This is one of the proper ways to get a resource object.
-=item * B(map_pc):
+=item * B(map_pc):
Based on the map_pc of the resource, get a resource object for
the given map. This is one of the proper ways to get a resource object.
@@ -2608,7 +2573,7 @@ in the filter function.
Retrieves version infomation for a url. Returns the version (a number, or
the string "mostrecent") for resources which have version information in
the big hash.
-
+
=cut
@@ -3874,6 +3839,12 @@ resource of the map.
Returns a string with the type of the map in it.
+=item *B:
+
+Returns a string with a comma-separated ordered list of map_pc IDs
+for the hierarchy of maps containing a map, with the top level
+map first, then descending to deeper levels, with the enclosing map last.
+
=back
=cut
@@ -3904,6 +3875,11 @@ sub map_type {
my $pc = $self->map_pc();
return $self->navHash("map_type_$pc", 0);
}
+sub map_hierarchy {
+ my $self = shift;
+ my $pc = $self->map_pc();
+ return $self->navHash("map_hierarchy_$pc", 0);
+}
#####
# Property queries