[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-cvs
Subject:    [LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
From:       albertel <lon-capa-cvs () mail ! lon-capa ! org>
Date:       2005-09-23 22:21:53
Message-ID: cvsalbertel1127514113 () cvsserver
[Download RAW message or body]

albertel		Fri Sep 23 18:21:53 2005 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - can't get a navmap if you arent in a course
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.339 loncom/interface/lonnavmaps.pm:1.340
--- loncom/interface/lonnavmaps.pm:1.339	Fri Sep 23 18:18:26 2005
+++ loncom/interface/lonnavmaps.pm	Fri Sep 23 18:21:51 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.339 2005/09/23 22:18:26 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.340 2005/09/23 22:21:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1449,7 +1449,12 @@
         # Step 1: Check to see if we have a navmap
         if (!defined($navmap)) {
             $navmap = Apache::lonnavmaps::navmap->new();
-        }
+	    if (!defined($navmap)) {
+		# no londer in course
+		return '<font color="red">No course selected</font><br />
+                        <a href="/adm/roles">Select a course</a><br />';
+	    }
+	}
 
         # Step two: Locate what kind of here marker is necessary
         # Determine where the "here" marker is and where the screen jumps to.


_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic