--- loncom/interface/lonnavmaps.pm 2010/03/29 14:50:46 1.446 +++ loncom/interface/lonnavmaps.pm 2010/06/16 23:42:55 1.448 @@ -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.448 2010/06/16 23:42:55 raeburn Exp $ # # Copyright Michigan State University Board of Trustees @@ -1802,40 +1802,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 +2304,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 +2574,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 +3840,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 +3876,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