--- loncom/interface/lonnavmaps.pm 2002/06/24 14:28:10 1.36 +++ loncom/interface/lonnavmaps.pm 2002/08/18 21:45:41 1.42 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.36 2002/06/24 14:28:10 www Exp $ +# $Id: lonnavmaps.pm,v 1.42 2002/08/18 21:45:41 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -278,8 +278,7 @@ sub addresource { } my $brepriv=&Apache::lonnet::allowed('bre',$resource); if ($hash{'src_'.$rid}) { - if ((($brepriv eq '2') && (!$hash{'randomout_'.$rid})) - || ($brepriv eq 'F')) { + if (($brepriv eq '2') || ($brepriv eq 'F')) { my $pprefix=''; if ($resource=~/\.(problem|exam|quiz|assess|survey|form)$/) { $pprefix=&astatus($rid); @@ -412,10 +411,10 @@ sub handler { if ($ENV{'request.course.fn'}) { $fn=$ENV{'request.course.fn'}; if (-e "$fn.db") { - if ((tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER,0640)) && + if ((tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) && (tie(%parmhash,'GDBM_File', $ENV{'request.course.fn'}.'_parms.db', - &GDBM_READER,0640))) { + &GDBM_READER(),0640))) { $hashtied=1; } } @@ -435,8 +434,10 @@ sub handler { &Apache::loncommon::no_cache($r); $r->send_http_header; - my $firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}}; - my $lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}}; + my $firstres=$hash{'map_start_'. + &Apache::lonnet::clutter($ENV{'request.course.uri'})}; + my $lastres=$hash{'map_finish_'. + &Apache::lonnet::clutter($ENV{'request.course.uri'})}; if (!(($firstres) && ($lastres))) { $r->print('Coursemap undefined.'); } else { @@ -576,8 +577,10 @@ sub handler { } $r->print('>'. ''. - '

Navigate Course Map

'. - "

$date

"); + '

Navigate Course Map

'); + my $desc=$ENV{'course.'.$ENV{'request.course.id'}.'.description'}; + if (defined($desc)) { $r->print("

$desc

\n"); } + $r->print("

$date

\n"); $r->rflush(); $r->print(' New discussion since '. localtime($lastcheck). @@ -711,10 +714,14 @@ sub handler { for(my $i=-1;$i<$indent;$i++) { $indentstr.=$is; } } if (!$linkid) { $linkid=$rid; } + if ($hash{'randomout_'.$rid}) { + $adde=' (hidden)'.$adde; + } $r->print($add.$indentstr); if ($rid) { $r->print(''. $hwk.$hash{'title_'.$rid}.$hwke.''); }