[LON-CAPA-cvs] cvs: loncom(GCI_3) /interface lonnavmaps.pm

raeburn raeburn@source.lon-capa.org
Mon, 13 Sep 2010 03:07:56 -0000


raeburn		Mon Sep 13 03:07:56 2010 EDT

  Modified files:              (Branch: GCI_3)
    /loncom/interface	lonnavmaps.pm 
  Log:
  - Customization for GCI_3.
    - Backport 1.448.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.440.2.1 loncom/interface/lonnavmaps.pm:1.440.2.2
--- loncom/interface/lonnavmaps.pm:1.440.2.1	Mon Dec  7 03:25:16 2009
+++ loncom/interface/lonnavmaps.pm	Mon Sep 13 03:07:56 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.440.2.1 2009/12/07 03:25:16 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.440.2.2 2010/09/13 03:07:56 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -2385,7 +2385,7 @@
 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<getMapByMapPc>(map_pc):
+=item * B<getByMapPc>(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.
@@ -3879,6 +3879,12 @@
 
 Returns a string with the type of the map in it.
 
+=item *B<map_hierarchy>:
+
+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
@@ -3909,6 +3915,11 @@
     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