header_only) {
if ($ENV{'browser.mathml'}) {
@@ -178,6 +165,8 @@ sub real_handler {
&Apache::loncommon::no_cache($r);
$r->send_http_header;
+ my %toplinkitems=();
+ &add_linkitem(\%toplinkitems,'blank','',"Select Action");
if ($ENV{QUERY_STRING} eq 'collapseExternal') {
&Apache::lonnet::put('environment',{'remotenavmap' => 'off'});
&Apache::lonnet::appenv('environment.remotenavmap' => 'off');
@@ -197,8 +186,9 @@ MENU
$navstatus
MENU
}
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<<"ENDSUBM");
-
+ $html
'.
- &Apache::loncommon::help_open_menu('','Navigation Screen','Navigation_Screen','',undef,'RAT'));
+ $r->print('');
$r->rflush();
# Check that it's defined
if (!($navmap->courseMapDefined())) {
+ $r->print(&Apache::loncommon::help_open_menu('','Navigation Screen','Navigation_Screen','',undef,'RAT'));
$r->print('Coursemap undefined.' .
'');
return OK;
@@ -308,18 +298,16 @@ ENDSUBM
}
if ($ENV{'environment.remotenavmap'} ne 'on') {
- $r->print(&launch_win('link','yes'));
+ $r->print(&launch_win('link','yes',\%toplinkitems));
}
if ($ENV{'environment.remotenavmap'} eq 'on') {
-# $r->print("" .
- $r->print("" .
- &mt("Close navigation window").
- " ");
+ &add_linkitem(\%toplinkitems,'closenav','collapse()',
+ "Close navigation window");
}
my $jumpToFirstHomework = 0;
# Check to see if the student is jumping to next open, do-able problem
- if ($ENV{QUERY_STRING} eq 'jumpToFirstHomework') {
+ if ($ENV{QUERY_STRING} =~ /^jumpToFirstHomework/) {
$jumpToFirstHomework = 1;
# Find the next homework problem that they can do.
my $iterator = $navmap->getIterator(undef, undef, undef, 1);
@@ -352,8 +340,9 @@ ENDSUBM
$r->print("All homework assignments have been completed.
");
}
} else {
- $r->print("" .
- &mt("Go To My First Homework Problem")." ");
+ &add_linkitem(\%toplinkitems,'firsthomework',
+ 'location.href="navmaps?jumpToFirstHomework"',
+ "Show Me My First Homework Problem");
}
my $suppressEmptySequences = 0;
@@ -368,15 +357,18 @@ ENDSUBM
$filterFunc = sub { my $res = shift;
return $res->completable() || $res->is_map();
};
- $r->print("" .
- &mt("Show Everything")." ");
+ &add_linkitem(\%toplinkitems,'everything',
+ 'location.href="navmaps?sort='.$ENV{'form.sort'}.'"',
+ "Show Everything");
$r->print("".&mt("Uncompleted Homework")."
");
$ENV{'form.filter'} = '';
$ENV{'form.condition'} = 1;
$resource_no_folder_link = 1;
} else {
- $r->print("" .
- &mt("Show Only Uncompleted Homework")." ");
+ &add_linkitem(\%toplinkitems,'uncompleted',
+ 'location.href="navmaps?sort='.$ENV{'form.sort'}.
+ '&showOnlyHomework=1"',
+ "Show Only Uncompleted Homework");
}
my %selected=($ENV{'form.sort'} => 'selected=on');
@@ -388,11 +380,12 @@ ENDSUBM
+
");
# renderer call
- my $renderArgs = { 'cols' => [0,2,3],
+ my $renderArgs = { 'cols' => [0,1,2,3],
'sort' => $ENV{'form.sort'},
'url' => '/adm/navmaps',
'navmap' => $navmap,
@@ -401,9 +394,10 @@ ENDSUBM
'filterFunc' => $filterFunc,
'resource_no_folder_link' => $resource_no_folder_link,
'sort_html'=> $sort_html,
- 'r' => $r};
+ 'r' => $r,
+ 'caller' => 'navmapsdisplay',
+ 'linkitems' => \%toplinkitems};
my $render = render($renderArgs);
- $navmap->untieHashes();
# If no resources were printed, print a reassuring message so the
# user knows there was no error.
@@ -414,6 +408,8 @@ ENDSUBM
$r->print("This course is empty.
");
}
}
+ #my $td=&tv_interval($t0);
+ #$r->print("
$td");
$r->print("