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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 14 Mar 2006 22:17:21 -0000


albertel		Tue Mar 14 17:17:21 2006 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - adding an is_exam tester
  
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.368 loncom/interface/lonnavmaps.pm:1.369
--- loncom/interface/lonnavmaps.pm:1.368	Mon Mar 13 12:29:50 2006
+++ loncom/interface/lonnavmaps.pm	Tue Mar 14 17:17:20 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.368 2006/03/13 17:29:50 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.369 2006/03/14 22:17:20 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3775,6 +3775,16 @@
    return $self->{NAV_MAP}->retrieveResources(@_);
 }
 
+sub is_exam {
+    my ($self,$part) = @_;
+    if ($self->parmval('type',$part) eq 'exam') {
+        return 1;
+    }
+    if ($self->src() =~ /\.(exam)$/) {
+        return 1;
+    }
+    return 0;
+}
 sub is_html {
     my $self=shift;
     my $src = $self->src();