--- loncom/interface/lonnavmaps.pm 2004/08/31 15:28:03 1.285
+++ loncom/interface/lonnavmaps.pm 2004/09/29 19:13:20 1.298
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.285 2004/08/31 15:28:03 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.298 2004/09/29 19:13:20 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -127,7 +127,7 @@ sub nav_control_js {
function gonav(url) {
if (w_loncapanav_flag != 1) {
- go(url);
+ gopost(url,'');
} else {
navwindow=window.open(url,
"loncapanav","height=600,width=400,scrollbars=1");
@@ -354,7 +354,7 @@ ENDSUBM
} else {
&add_linkitem(\%toplinkitems,'firsthomework',
'location.href="navmaps?jumpToFirstHomework"',
- "Go To My First Homework Problem");
+ "Show Me My First Homework Problem");
}
my $suppressEmptySequences = 0;
@@ -370,7 +370,7 @@ ENDSUBM
return $res->completable() || $res->is_map();
};
&add_linkitem(\%toplinkitems,'everything',
- 'location.href="locatnavmaps?sort='.$ENV{'form.sort'}.'"',
+ 'location.href="navmaps?sort='.$ENV{'form.sort'}.'"',
"Show Everything");
$r->print("
".&mt("Uncompleted Homework")."
");
$ENV{'form.filter'} = '';
@@ -392,6 +392,7 @@ ENDSUBM
+
");
@@ -1034,10 +1035,10 @@ sub render_resource {
my $partLabel = "";
my $newBranchText = "";
-
+ my $location=&Apache::loncommon::lonhttpdurl("/adm/lonIcons");
# If this is a new branch, label it so
if ($params->{'isNewBranch'}) {
- $newBranchText = "";
+ $newBranchText = "";
}
# links to open and close the folder
@@ -1045,17 +1046,16 @@ sub render_resource {
my $linkclose = "";
# Default icon: unknown page
- my $icon = "";
+ my $icon = "";
if ($resource->is_problem()) {
if ($part eq '0' || $params->{'condensed'}) {
- $icon = '';
+ $icon ='';
} else {
$icon = $params->{'indentString'};
}
} else {
- $icon = "";
+ $icon = "";
}
# Display the correct map icon to open or shut map
@@ -1070,7 +1070,7 @@ sub render_resource {
if (!$params->{'resource_no_folder_link'}) {
$icon = "navmap.$folderType." . ($nowOpen ? 'closed' : 'open') . '.gif';
- $icon = "";
+ $icon = "";
$linkopen = "{'queryString'} . '&filter=';
@@ -1087,7 +1087,7 @@ sub render_resource {
# Don't allow users to manipulate folder
$icon = "navmap.$folderType." . ($nowOpen ? 'closed' : 'open') .
'.nomanip.gif';
- $icon = "";
+ $icon = "";
$linkopen = "";
$linkclose = "";
@@ -1155,10 +1155,10 @@ sub render_communication_status {
my $link = $params->{"resourceLink"};
my $linkopen = "";
my $linkclose = "";
-
+ my $location=&Apache::loncommon::lonhttpdurl("/adm/lonMisc");
if ($resource->hasDiscussion()) {
$discussionHTML = $linkopen .
- '' .
+ '' .
$linkclose;
}
@@ -1168,7 +1168,7 @@ sub render_communication_status {
if ($_) {
$feedbackHTML .= ' '
- . '';
}
}
@@ -1183,7 +1183,7 @@ sub render_communication_status {
$errorcount++;
$errorHTML .= ' '
- . '';
}
}
@@ -1212,7 +1212,9 @@ sub render_quick_status {
my $icon = $statusIconMap{$resource->simpleStatus($part)};
my $alt = $iconAltTags{$icon};
if ($icon) {
- $result .= "
$linkopen$linkclose
\n";
+ my $location=
+ &Apache::loncommon::lonhttpdurl("/adm/lonIcons/$icon");
+ $result .= "
$linkopen$linkclose
\n";
} else {
$result .= "
\n";
}
@@ -1343,11 +1345,17 @@ sub setDefault {
return $val;
}
+sub cmp_title {
+ my ($atitle,$btitle) = (lc($_[0]->compTitle),lc($_[1]->compTitle));
+ $atitle=~s/^\s*//;
+ $btitle=~s/^\s*//;
+ return $atitle cmp $btitle;
+}
+
sub render {
my $args = shift;
&Apache::loncommon::get_unprocessed_cgi($ENV{QUERY_STRING});
my $result = '';
-
# Configure the renderer.
my $cols = $args->{'cols'};
if (!defined($cols)) {
@@ -1428,7 +1436,7 @@ sub render {
# We only need to do this if we need to open the maps to show the
# current position. This will change the counter so we can't count
# for the jump marker with this loop.
- while (($curRes = $mapIterator->next()) && !$found) {
+ while ($here && ($curRes = $mapIterator->next()) && !$found) {
if (ref($curRes) && $curRes->symb() eq $here) {
my $mapStack = $mapIterator->getStack();
@@ -1504,23 +1512,24 @@ sub render {
my $printKey = $args->{'printKey'};
my $printCloseAll = $args->{'printCloseAll'};
if (!defined($printCloseAll)) { $printCloseAll = 1; }
-
+
# Print key?
if ($printKey) {
$result .= '
';
my $date=localtime;
$result.='
Key:
';
+ my $location=&Apache::loncommon::lonhttpdurl("/adm/lonMisc");
if ($navmap->{LAST_CHECK}) {
$result .=
- ' '.&mt('New discussion since').' '.
+ ' '.&mt('New discussion since').' '.
strftime("%A, %b %e at %I:%M %P", localtime($navmap->{LAST_CHECK})).
'