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

raeburn raeburn@source.lon-capa.org
Sun, 21 Dec 2008 16:27:27 -0000


raeburn		Sun Dec 21 16:27:27 2008 EDT

  Modified files:              (Branch: version_2_8_X)
    /loncom/interface	lonnavmaps.pm 
  Log:
  - Backport 1.423.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.415.2.2 loncom/interface/lonnavmaps.pm:1.415.2.3
--- loncom/interface/lonnavmaps.pm:1.415.2.2	Fri Dec 12 22:27:20 2008
+++ loncom/interface/lonnavmaps.pm	Sun Dec 21 16:27:26 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.415.2.2 2008/12/12 22:27:20 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.415.2.3 2008/12/21 16:27:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1182,7 +1182,7 @@
         if (!defined($navmap)) {
             $navmap = Apache::lonnavmaps::navmap->new();
 	    if (!defined($navmap)) {
-		# no londer in course
+		# no longer in course
 		return '<span class="LC_error">'.&mt('No course selected').'</span><br />
                         <a href="/adm/roles">'.&mt('Select a course').'</a><br />';
 	    }
@@ -1250,6 +1250,11 @@
         # Step 1: Check to see if we have a navmap
         if (!defined($navmap)) {
             $navmap = Apache::lonnavmaps::navmap->new();
+            if (!defined($navmap)) {
+                # no longer in course
+                return '<span class="LC_error">'.&mt('No course selected').'</span><br />
+                        <a href="/adm/roles">'.&mt('Select a course').'</a><br />';
+            }
         }
 
         # See if we're being passed a specific map