--- loncom/interface/lonnavmaps.pm 2002/10/14 14:14:49 1.76
+++ loncom/interface/lonnavmaps.pm 2002/10/28 20:48:29 1.89
@@ -2,7 +2,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.76 2002/10/14 14:14:49 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.89 2002/10/28 20:48:29 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -823,7 +823,7 @@ sub new_handle {
# Initialize the nav map
my $navmap = Apache::lonnavmaps::navmap->new(
$ENV{"request.course.fn"}.".db",
- $ENV{"request.course.fn"}."_parms.db", 1);
+ $ENV{"request.course.fn"}."_parms.db", 1, 1);
if (!defined($navmap)) {
@@ -849,10 +849,6 @@ sub new_handle {
$r->print(' Discussions'.
'
New message (click to open)
'); } - #if (($currenturl=~/^\/res/) && - # ($currenturl!~/^\/res\/adm/)) { - # $r->print('Current Location
'); - #} # Check that it's defined if (!($navmap->courseMapDefined())) { @@ -880,7 +876,7 @@ sub new_handle { $res->NOTHING_SET => '' ); # And a special case in the nav map; what to do when the assignment # is not yet done and due in less then 24 hours - my $hurryUpColor = "#FFCCCC"; + my $hurryUpColor = "#FF0000"; my %statusIconMap = ( $res->NETWORK_FAILURE => '', @@ -894,7 +890,7 @@ sub new_handle { $res->TRIES_LEFT => 'navmap.open.gif', $res->INCORRECT => 'navmap.wrong.gif', $res->OPEN => 'navmap.open.gif', - $res->ATTEMPTED => '' ); + $res->ATTEMPTED => 'navmap.open.gif' ); my %iconAltTags = ( 'navmap.correct.gif' => 'Correct', @@ -914,6 +910,11 @@ sub new_handle { } } + # Is this a new-style course? If so, we want to suppress showing the top-level + # maps in their own folders, in favor of "inlining" them. + my $topResource = $navmap->getById("0.0"); + my $inlineTopLevelMaps = $topResource->src() =~ m|^/uploaded/.*default\.sequence$|; + my $currenturl = $ENV{'form.postdata'}; $currenturl=~s/^http\:\/\///; $currenturl=~s/^[^\/]+//; @@ -929,7 +930,7 @@ sub new_handle { # Begin the HTML table # four cols: resource + indent, chat+feedback, icon, text string - $r->print('