--- loncom/interface/lonhelper.pm 2003/06/19 19:28:52 1.39
+++ loncom/interface/lonhelper.pm 2003/08/07 17:26:44 1.41
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.39 2003/06/19 19:28:52 bowersj2 Exp $
+# $Id: lonhelper.pm,v 1.41 2003/08/07 17:26:44 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2654,17 +2654,19 @@ sub render {
}
}
- if (scalar(@results) == 0) {
- return '';
- }
-
- my $result = "
\n";
- for my $re (@results) {
- $result .= ' - ' . $re . "
\n";
- }
+ my $result;
- if (!@results) {
- $result .= ' - No changes were made to current settings.
';
+ if (scalar(@results) != 0) {
+ $result .= "\n";
+ for my $re (@results) {
+ $result .= ' - ' . $re . "
\n";
+ }
+
+ if (!@results) {
+ $result .= ' - No changes were made to current settings.
';
+ }
+
+ $result .= '
';
}
if ($self->{'restartCourse'}) {
@@ -2678,7 +2680,7 @@ sub render {
"";
}
- return $result . '
';
+ return $result;
}
sub overrideForm {
@@ -2753,9 +2755,7 @@ sub render {
$symb = 'a';
$paramlevel = 'general';
} elsif ($vars->{GRANULARITY} eq 'map') {
- my $navmap = Apache::lonnavmaps::navmap->new(
- $ENV{"request.course.fn"}.".db",
- $ENV{"request.course.fn"}."_parms.db", 0, 0);
+ my $navmap = Apache::lonnavmaps::navmap->new();
my $res = $navmap->getByMapPc($vars->{RESOURCE_ID});
my $title = $res->compTitle();
$symb = $res->symb();
@@ -2765,9 +2765,7 @@ sub render {
$affectedResourceId = $vars->{RESOURCE_ID};
$paramlevel = 'map';
} else {
- my $navmap = Apache::lonnavmaps::navmap->new(
- $ENV{"request.course.fn"}.".db",
- $ENV{"request.course.fn"}."_parms.db", 0, 0);
+ my $navmap = Apache::lonnavmaps::navmap->new();
my $res = $navmap->getById($vars->{RESOURCE_ID});
$symb = $res->symb();
my $title = $res->compTitle();