--- loncom/interface/lonnavmaps.pm 2008/11/21 20:17:11 1.417
+++ loncom/interface/lonnavmaps.pm 2009/02/14 14:39:31 1.425
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.417 2008/11/21 20:17:11 jms Exp $
+# $Id: lonnavmaps.pm,v 1.425 2009/02/14 14:39:31 schulted Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -670,7 +670,7 @@ sub getDescription {
my $maxtries = $res->maxtries($part);
my $triesString = "";
if ($tries && $maxtries) {
- $triesString = '('.&mt('[_1] of [_2] tries used',$tries,$maxtries).')';
+ $triesString = '('.&mt('[_1] of [quant,_2,try,tries] used',$tries,$maxtries).')';
if ($maxtries > 1 && $maxtries - $tries == 1) {
$triesString = "$triesString";
}
@@ -966,9 +966,9 @@ sub render_resource {
# Is this the current resource?
if (!$params->{'displayedHereMarker'} &&
$resource->symb() eq $params->{'here'} ) {
- $curMarkerBegin = '>';
- $curMarkerEnd = '<';
- $params->{'displayedHereMarker'} = 1;
+ $curMarkerBegin = '';
+ $curMarkerEnd = '';
+ $params->{'displayedHereMarker'} = 1;
}
if ($resource->is_problem() && $part ne '0' &&
@@ -1020,7 +1020,7 @@ sub render_communication_status {
if ($msgid) {
$feedbackHTML .= ' '
- . '
';
}
}
@@ -1269,7 +1269,7 @@ sub render {
if (!defined($navmap)) {
$navmap = Apache::lonnavmaps::navmap->new();
if (!defined($navmap)) {
- # no londer in course
+ # no longer in course
return ''.&mt('No course selected').'
'.&mt('Select a course').'
';
}
@@ -1337,6 +1337,11 @@ sub render {
# 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 ''.&mt('No course selected').'
+ '.&mt('Select a course').'
';
+ }
}
# See if we're being passed a specific map
@@ -1381,7 +1386,7 @@ sub render {
my $printKey = $args->{'printKey'};
my $printCloseAll = $args->{'printCloseAll'};
if (!defined($printCloseAll)) { $printCloseAll = 1; }
-
+
# Print key?
if ($printKey) {
$result .= '
';
@@ -1456,6 +1461,7 @@ END
$result.='';
}
+
if ($args->{'caller'} eq 'navmapsdisplay') {
$result .= ''.
&Apache::loncommon::help_open_menu('Navigation Screen','Navigation_Screen',undef,'RAT').' | ';
@@ -1479,14 +1485,17 @@ END
$result.=$args->{'sort_html'};
}
- $result .= "
\n";
+ #$result .= "
\n";
if ($r) {
$r->print($result);
$r->rflush();
$result = "";
}
# End parameter setting
-
+
+ $result .= "\n\n";
+ $result .= "
\n";
+
# Data
$result .= '' ."\n";
my $res = "Apache::lonnavmaps::resource";
@@ -1828,7 +1837,7 @@ ENDBLOCK
$result.='}
'."\n";
+ '."\n";
return $result;
}
1;
+
+
+
+
+
+
+
+
package Apache::lonnavmaps::navmap;
=pod