+#$inlineremote[21] $inlineremote[23]
+#ENDARROWSINLINE
+# if ( &hidden_button_check() ne 'yes' ) {
+# $inlinebuttons .= (<
+#ENDINLINEICONS
+# }
+# } else { # not iconsonly
+# if ( $inlineremote[21] ne '' || $inlineremote[23] ne '' ) {
+# $inlinebuttons = (<$inlineremote[21] | | $inlineremote[23] |
+#ENDFIRSTLINE
+# }
+# if ( &hidden_button_check() ne 'yes' ) {
+# foreach my $row ( 6 .. 9 ) {
+# if ( $inlineremote[ ${row} . '1' ] ne ''
+# || $inlineremote[ $row . '2' ] ne ''
+# || $inlineremote[ $row . '3' ] ne '' )
+# {
+# $inlinebuttons .= <<"ENDLINE";
+#$inlineremote["${row}1"] | $inlineremote["${row}2"] | $inlineremote["${row}3"] |
+#ENDLINE
+# }
+# }
+# }
+# }
+ }
+ $breadcrumb = &Apache::lonhtmlcommon::breadcrumbs(undef,undef,0);
+ $result =(<
+// BEGIN LON-CAPA Internal
+
+$timesync
+$breadcrumb
+
+
+
+$newmail
+
+
+
+ENDREGTEXT
+# Registered, graphical output
+ } else {
+ my $requri=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0]));
+ $requri=&Apache::lonenc::check_encrypt(&unescape($requri));
+ my $cursymb=&Apache::lonenc::check_encrypt($env{'request.symb'});
+ my $navstatus=&get_nav_status();
+ my $clearcstr;
+
+ if ($env{'user.adv'}) { $clearcstr='clearbut(6,1)'; }
+ $result = (<
+//
+
+ENDREGTHIS
+ }
+# =============================================================================
+ } else {
+# ========================================== This can or will not be registered
+ if ($noremote) {
+# Not registered
+ $result= (<
+//
+
+ENDDONOTREGTHIS
+ }
+# =============================================================================
+ }
+ return $result;
+}
+
+sub is_course_upload {
+ my ($file,$cnum,$cdom) = @_;
+ my $uploadpath = &LONCAPA::propath($cdom,$cnum);
+ $uploadpath =~ s{^\/}{};
+ if (($file =~ m{^\Q$uploadpath\E/userfiles/docs/}) ||
+ ($file =~ m{^userfiles/\Q$cdom\E/\Q$cnum\E/docs/})) {
+ return 1;
+ }
+ return;
+}
+
+sub edit_course_upload {
+ my ($file,$cnum,$cdom) = @_;
+ my $cfile;
+ if ($file =~/\.(htm|html|css|js|txt)$/) {
+ my $ext = $1;
+ my $url = &Apache::lonnet::hreflocation('',$file);
+ my $home = &Apache::lonnet::homeserver($cnum,$cdom);
+ my @ids=&Apache::lonnet::current_machine_ids();
+ my $dest;
+ if ($home && grep(/^\Q$home\E$/,@ids)) {
+ $dest = $url.'?forceedit=1';
+ } else {
+ unless (&Apache::lonnet::get_locks()) {
+ $dest = '/adm/switchserver?otherserver='.
+ $home.'&role='.$env{'request.role'}.
+ '&url='.$url.'&forceedit=1';
+ }
+ }
+ if ($dest) {
+ $cfile = &HTML::Entities::encode($dest,'"<>&');
+ }
+ }
+ return $cfile;
+}
+
+sub loadevents() {
+ if ($env{'request.state'} eq 'construct' ||
+ $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; }
+ return 'LONCAPAreg();';
+}
+
+sub unloadevents() {
+ if ($env{'request.state'} eq 'construct' ||
+ $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; }
+ return 'LONCAPAstale();';
+}
-# ============================================================= Start up remote
sub startupremote {
my ($lowerurl)=@_;
- if ($ENV{'browser.interface'} eq 'textual') {
+ if ($env{'environment.remote'} eq 'off') {
return ('');
}
+#
+# The Remote actually gets launched!
+#
my $configmenu=&rawconfig();
+ my $esclowerurl=&escape($lowerurl);
+ my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited');
return(<
-
+
ENDREMOTESTARTUP
}
sub setflags() {
return(<
+
ENDSETFLAGS
}
sub maincall() {
- if ($ENV{'browser.interface'} eq 'textual') { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
return(<
+
ENDMAINCALL
}
-# ================================================================= Reopen menu
+
+sub load_remote_msg {
+ my ($lowerurl)=@_;
+
+ if ($env{'environment.remote'} eq 'off') { return ''; }
+
+ my $esclowerurl=&escape($lowerurl);
+ my $link=&mt('[_1]Continue[_2] on in Inline Menu mode'
+ ,''
+ ,'');
+ return(<
+
+
+$link
+ENDREMOTEFORM
+}
+
+sub get_menu_name {
+ my $hostid = $Apache::lonnet::perlvar{'lonHostID'};
+ $hostid =~ s/\W//g;
+ return 'LCmenu'.$hostid;
+}
+
sub reopenmenu {
- my $nothing='';
- if ($ENV{'browser.interface'} eq 'textual') { return ''; }
- my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
- if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; }
- return('window.open("'.$nothing.'","'.$menuname.'","",false);');
+ if ($env{'environment.remote'} eq 'off') { return ''; }
+ my $menuname = &get_menu_name();
+ my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
+ return('window.open('.$nothing.',"'.$menuname.'","",false);');
}
-# =============================================================== Open the menu
sub open {
my $returnval='';
- if ($ENV{'browser.interface'} eq 'textual') { return ''; }
- my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
- unless (shift eq 'unix') {
-# resizing does not work on linux because of virtual desktop sizes
- $returnval.=(<'."\n"
+ .'// '."\n"
+ .'';
}
- $returnval.=(<
ENDOPEN
- return '';
+ return '';
}
-# ============================================================ Switch Menu Item
-
-sub switchmenu {
- my ($row,$col,$imgsrc,$texttop,$textbot,$action,$description)=@_;
- if ($ENV{'browser.interface'} eq 'textual') { return ''; }
- my $openwin=&openmenu();
- return(<
- var swmenu=$openwin
- swmenu.switchbutton($row,$col,"$imgsrc","$texttop","$textbot","$action","$description");
-
-ENDSMENU
-}
# ================================================================== Raw Config
sub clear {
my ($row,$col)=@_;
- unless ($ENV{'browser.interface'} eq 'textual') {
+ unless ($env{'environment.remote'} eq 'off') {
+ if (($row<1) || ($row>13)) { return ''; }
return "\n".qq(window.status+='.';swmenu.clearbut($row,$col););
- } else { return ''; }
+ } else {
+ $inlineremote[10*$row+$col]='';
+ return '';
+ }
}
+# ============================================ Switch a button or create a link
# Switch acts on the javascript that is executed when a button is clicked.
# The javascript is usually similar to "go('/adm/roles')" or "cstrgo(..)".
+
sub switch {
- my ($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc)=@_;
+ my ($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat,$nobreak,$inlinetools)=@_;
$act=~s/\$uname/$uname/g;
$act=~s/\$udom/$udom/g;
- unless ($ENV{'browser.interface'} eq 'textual') {
+ $top=&mt($top);
+ $bot=&mt($bot);
+ $desc=&mt($desc);
+ if (($env{'environment.remote'} ne 'off') || ($env{'environment.icons'} eq 'classic')) {
+ $img=&mt($img);
+ }
+ my $idx=10*$row+$col;
+ if ($cat ne '') {
+ $category_members{$cat}.=':'.$idx;
+ }
+
+ unless ($env{'environment.remote'} eq 'off') {
+ if (($row<1) || ($row>13)) { return ''; }
+# Remote
return "\n".
qq(window.status+='.';swmenu.switchbutton($row,$col,"$img","$top","$bot","$act","$desc"););
} else {
+# Inline Remote
+ if ($env{'environment.icons'} ne 'classic') {
+ $img=~s/\.gif$/\.png/;
+ }
+ if ($nobreak==2) { return ''; }
my $text=$top.' '.$bot;
- $text=~s/\- //;
- return ' '.$text.' '.$desc;
+ $text=~s/\s*\-\s*//gs;
+
+ my $pic=
+ '';
+ if ($env{'browser.interface'} eq 'faketextual') {
+# Main Menu
+ if ($nobreak==3) {
+ $inlineremote[$idx]="\n".
+ ''.
+ ''.$pic.' | ';
+ } elsif ($nobreak) {
+ $inlineremote[$idx]="\n".
+ ''.
+ ''.$pic.' |
+ ';
+ } else {
+ $inlineremote[$idx]="\n ".
+ ''.
+ ''.$pic.
+ ' | ';
+ }
+ } else {
+# Inline Menu
+ if ($env{'environment.icons'} eq 'iconsonly') {
+ $inlineremote[$idx]=''.$pic.'';
+ } else {
+ my $icon_text = $desc;
+ if ($inlinetools) {
+ $icon_text = $inlinetools.' ';
+ }
+ $inlineremote[$idx]=
+ '';
+ }
+ }
}
+ return '';
}
sub secondlevel {
my $output='';
my
- ($uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc)=@_;
+ ($uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat)=@_;
if ($prt eq 'any') {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
} elsif ($prt=~/^r(\w+)/) {
if ($rol eq $1) {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
}
}
return $output;
}
sub openmenu {
- my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
- if ($ENV{'browser.interface'} eq 'textual') { return ''; }
- if ($ENV{'browser.type'} eq 'explorer') {
- return "window.open('javascript:void(0);','".$menuname."');";
- } else {
- return "window.open('','".$menuname."');";
- }
+ my $menuname = &get_menu_name();
+ if ($env{'environment.remote'} eq 'off') { return ''; }
+ my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
+ return "window.open(".$nothing.",'".$menuname."');";
+}
+
+sub inlinemenu {
+ undef(@inlineremote);
+ undef(%category_members);
+# calling rawconfig with "1" will evaluate mydesk.tab, even if there is no active remote control
+ &rawconfig(1);
+ my $output='';
+ for (my $col=1; $col<=2; $col++) {
+ $output.='';
+ for (my $row=1; $row<=8; $row++) {
+ foreach my $cat (keys(%category_members)) {
+ if ($category_positions{$cat} ne "$col,$row") { next; }
+ #$output.=' ';
+ $output.='';
+ $output.=' '.&mt($category_names{$cat}).'';
+ $output.=' ';
+ my %active=();
+ foreach my $menu_item (split(/\:/,$category_members{$cat})) {
+ if ($inlineremote[$menu_item]) {
+ $active{$menu_item}=1;
+ }
+ }
+ foreach my $item (sort(keys(%active))) {
+ $output.=$inlineremote[$item];
+ }
+ $output.=' ';
+ $output.=' ';
+ }
+ }
+ $output.="";
+ }
+ $output.=" ";
+ return $output;
}
sub rawconfig {
+#
+# This evaluates mydesk.tab
+# Need to add more positions and more privileges to deal with all
+# menu items.
+#
my $textualoverride=shift;
my $output='';
- unless ($ENV{'browser.interface'} eq 'textual') {
+ unless ($env{'environment.remote'} eq 'off') {
$output.=
"window.status='Opening Remote Control';var swmenu=".&openmenu().
"\nwindow.status='Configuring Remote Control ';";
} else {
unless ($textualoverride) { return ''; }
}
- my $uname=$ENV{'user.name'};
- my $udom=$ENV{'user.domain'};
- my $adv=$ENV{'user.adv'};
- my $author=$ENV{'user.author'};
+ my $uname=$env{'user.name'};
+ my $udom=$env{'user.domain'};
+ my $adv=$env{'user.adv'};
+ my $show_course=&Apache::loncommon::show_course();
+ my $author=$env{'user.author'};
my $crs='';
- if ($ENV{'request.course.id'}) {
- $crs='/'.$ENV{'request.course.id'};
- if ($ENV{'request.course.sec'}) {
- $crs.='_'.$ENV{'request.course.sec'};
+ my $crstype='';
+ if ($env{'request.course.id'}) {
+ $crs='/'.$env{'request.course.id'};
+ if ($env{'request.course.sec'}) {
+ $crs.='_'.$env{'request.course.sec'};
}
$crs=~s/\_/\//g;
+ $crstype = &Apache::loncommon::course_type();
}
- my $pub=($ENV{'request.state'} eq 'published');
- my $con=($ENV{'request.state'} eq 'construct');
- my $rol=$ENV{'request.role'};
- my $requested_domain = $ENV{'request.role.domain'};
- foreach (@desklines) {
- my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc)=split(/\:/,$_);
+ my $pub=($env{'request.state'} eq 'published');
+ my $con=($env{'request.state'} eq 'construct');
+ my $rol=$env{'request.role'};
+ my $requested_domain = $env{'request.role.domain'};
+ foreach my $line (@desklines) {
+ my ($row,$col,$pro,$prt,$img,$top,$bot,$act,$desc,$cat)=split(/\:/,$line);
$prt=~s/\$uname/$uname/g;
$prt=~s/\$udom/$udom/g;
- $prt=~s/\$crs/$crs/g;
+ if ($env{'environment.remotenavmap'} eq 'on') {
+ unless ($env{'environment.remote'} eq 'on') {
+ if ($img eq 'nav.gif') {
+ $act = "gonav('/adm/navmaps','')";
+ }
+ }
+ }
+ if ($prt =~ /\$crs/) {
+ next unless ($env{'request.course.id'});
+ next if ($crstype eq 'Community');
+ $prt=~s/\$crs/$crs/g;
+ } elsif ($prt =~ /\$cmty/) {
+ next unless ($env{'request.course.id'});
+ next if ($crstype ne 'Community');
+ $prt=~s/\$cmty/$crs/g;
+ }
$prt=~s/\$requested_domain/$requested_domain/g;
+ if ($category_names{$cat}!~/\w/) { $cat='oth'; }
if ($pro eq 'clear') {
$output.=&clear($row,$col);
} elsif ($pro eq 'any') {
$output.=&secondlevel(
- $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
} elsif ($pro eq 'smp') {
unless ($adv) {
$output.=&secondlevel(
- $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
} elsif ($pro eq 'adv') {
if ($adv) {
$output.=&secondlevel(
- $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc);
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
+ }
+ } elsif ($pro eq 'shc') {
+ if ($show_course) {
+ $output.=&secondlevel(
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
- } elsif (($pro=~/p(\w+)/) && ($prt)) {
- if (&Apache::lonnet::allowed($1,$prt)) {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
- }
- } elsif ($pro eq 'course') {
- if ($ENV{'request.course.fn'}) {
- $output.=switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc);
+ } elsif ($pro eq 'nsc') {
+ if (!$show_course) {
+ $output.=&secondlevel(
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
+ }
+ } elsif (($pro=~/^p(\w+)/) && ($prt)) {
+ my $priv = $1;
+ if ($priv =~ /^mdc(Course|Community)/) {
+ if ($crstype eq $1) {
+ $priv = 'mdc';
+ } else {
+ next;
+ }
+ }
+ if (&Apache::lonnet::allowed($priv,$prt)) {
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
+ }
+ } elsif ($pro eq 'course') {
+ if (($env{'request.course.fn'}) && ($crstype ne 'Community')) {
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
}
+ } elsif ($pro eq 'community') {
+ if (($env{'request.course.fn'}) && ($crstype eq 'Community')) {
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
+ }
+ } elsif ($pro =~ /^courseenv_(.*)$/) {
+ my $key = $1;
+ if ($crstype ne 'Community') {
+ my $coursepref = $env{'course.'.$env{'request.course.id'}.'.'.$key};
+ if ($key eq 'canuse_pdfforms') {
+ if ($env{'request.course.id'} && $coursepref eq '') {
+ my %domdefs = &Apache::lonnet::get_domain_defaults($env{'course.'.$env{'request.course.id'}.'.domain'});
+ $coursepref = $domdefs{'canuse_pdfforms'};
+ }
+ }
+ if ($coursepref) {
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
+ }
+ }
+ } elsif ($pro =~ /^communityenv_(.*)$/) {
+ my $key = $1;
+ if ($crstype eq 'Community') {
+ my $coursepref = $env{'course.'.$env{'request.course.id'}.'.'.$key};
+ if ($key eq 'canuse_pdfforms') {
+ if ($env{'request.course.id'} && $coursepref eq '') {
+ my %domdefs = &Apache::lonnet::get_domain_defaults($env{'course.'.$env{'request.course.id'}.'.domain'});
+ $coursepref = $domdefs{'canuse_pdfforms'};
+ }
+ }
+ if ($coursepref) {
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
+ }
+ }
+ } elsif ($pro =~ /^course_(.*)$/) {
+ # Check for permissions inside of a course
+ if (($env{'request.course.id'}) && ($crstype ne 'Community') &&
+ (&Apache::lonnet::allowed($1,$env{'request.course.id'}.
+ ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))
+ )) {
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
+ }
+ } elsif ($pro =~ /^community_(.*)$/) {
+ # Check for permissions inside of a community
+ if (($env{'request.course.id'}) && ($crstype eq 'Community') &&
+ (&Apache::lonnet::allowed($1,$env{'request.course.id'}.
+ ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))
+ )) {
+ $output.=&switch($uname,$udom,$row,$col,$img,$top,$bot,$act,$desc,$cat);
+ }
} elsif ($pro eq 'author') {
if ($author) {
- if ((($prt eq 'rca') && ($ENV{'request.role'}=~/^ca/)) ||
- (($prt eq 'rau') && ($ENV{'request.role'}=~/^au/))) {
+ if ((($prt eq 'rca') && ($env{'request.role'}=~/^ca/)) ||
+ (($prt eq 'raa') && ($env{'request.role'}=~/^aa/)) ||
+ (($prt eq 'rau') && ($env{'request.role'}=~/^au/))) {
# Check that we are on the correct machine
my $cadom=$requested_domain;
- my $caname=$ENV{'user.name'};
- if ($prt eq 'rca') {
+ my $caname=$env{'user.name'};
+ if (($prt eq 'rca') || ($prt eq 'raa')) {
($cadom,$caname)=
- ($ENV{'request.role'}=~/(\w+)\/(\w+)$/);
+ ($env{'request.role'}=~/($match_domain)\/($match_username)$/);
}
$act =~ s/\$caname/$caname/g;
my $home = &Apache::lonnet::homeserver($caname,$cadom);
- if ($home eq $Apache::lonnet::perlvar{'lonHostID'}) {
- $output.=switch($caname,$cadom,
- $row,$col,$img,$top,$bot,$act,$desc);
+ my $allowed=0;
+ my @ids=&Apache::lonnet::current_machine_ids();
+ foreach my $id (@ids) { if ($id eq $home) { $allowed=1; } }
+ if ($allowed) {
+ $output.=&switch($caname,$cadom,
+ $row,$col,$img,$top,$bot,$act,$desc,$cat);
}
}
}
+ } elsif ($pro eq 'tools') {
+ my @tools = ('aboutme','blog','portfolio');
+ if (grep(/^\Q$prt\E$/,@tools)) {
+ if (!&Apache::lonnet::usertools_access($env{'user.name'},
+ $env{'user.domain'},
+ $prt,undef,'tools')) {
+ $output.=&clear($row,$col);
+ next;
+ }
+ } elsif (($prt eq 'reqcrsnsc') || ($prt eq 'reqcrsshc')) {
+ if (($prt eq 'reqcrsnsc') && ($show_course)) {
+ next;
+ }
+ if (($prt eq 'reqcrsshc') && (!$show_course)) {
+ next;
+ }
+ my $showreqcrs = &check_for_rcrs();
+ if (!$showreqcrs) {
+ $output.=&clear($row,$col);
+ next;
+ }
+ }
+ $prt='any';
+ $output.=&secondlevel(
+ $uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
}
- unless ($ENV{'browser.interface'} eq 'textual') {
+ unless ($env{'environment.remote'} eq 'off') {
$output.="\nwindow.status='Synchronizing Time';swmenu.syncclock(1000*".time.");\nwindow.status='Remote Control Configured.';";
+ if (&Apache::lonmsg::newmail()) {
+ $output.='swmenu.setstatus("you have","messages");';
+ }
}
+
return $output;
}
+sub check_for_rcrs {
+ my $showreqcrs = 0;
+ my @reqtypes = ('official','unofficial','community');
+ foreach my $type (@reqtypes) {
+ if (&Apache::lonnet::usertools_access($env{'user.name'},
+ $env{'user.domain'},
+ $type,undef,'requestcourses')) {
+ $showreqcrs = 1;
+ last;
+ }
+ }
+ if (!$showreqcrs) {
+ foreach my $type (@reqtypes) {
+ if ($env{'environment.reqcrsotherdom.'.$type} ne '') {
+ $showreqcrs = 1;
+ last;
+ }
+ }
+ }
+ return $showreqcrs;
+}
+
# ======================================================================= Close
sub close {
- if ($ENV{'browser.interface'} eq 'textual') { return ''; }
- my $menuname='LCmenu'.$Apache::lonnet::perlvar{'lonHostID'};
+ if ($env{'environment.remote'} eq 'off') { return ''; }
+ my $menuname = &get_menu_name();
return(<
+
ENDCLOSE
}
@@ -317,49 +1590,689 @@ sub footer {
}
-# ================================================ Handler when called directly
+sub nav_control_js {
+ my $nav=($env{'environment.remotenavmap'} eq 'on');
+ return (<content_type('text/html');
- $r->send_http_header;
- return OK if $r->header_only;
-
- my $bodytag=&Apache::loncommon::bodytag('Main Menu');
-# ------------------------------------------------------------ Print the screen
- $r->print('LON-CAPA Main Menu'.$bodytag);
- $r->print(&rawconfig(1));
- $r->print(' |
|