[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 23 Sep 2005 22:21:53 -0000
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.