-$inlineremote[21] $inlineremote[23]
-ENDARROWSINLINE
- if (&hidden_button_check() ne 'yes') {
- $inlinebuttons .= (<
-ENDINLINEICONS
- }
- } else {
- 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
- }
- }
- }
- }
- }
- }
- $result =(<
-// BEGIN LON-CAPA Internal
-
-$timesync
-$tablestart
-$inlinebuttons
-$tableend
-$newmail
-
+ foreach (@inlineremote) { if ($_ ne '') { $addremote=1; last;} }
+ if ($addremote) {
-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 = (<
-// BEGIN LON-CAPA Internal
-var swmenu=null;
+ &Apache::lonhtmlcommon::clear_breadcrumb_tools();
- function LONCAPAreg() {
- swmenu=$reopen;
- swmenu.clearTimeout(swmenu.menucltim);
- $timesync
- $newmail
- $buttons
- swmenu.currentURL="$requri";
- swmenu.reloadURL=swmenu.currentURL+window.location.search;
- swmenu.currentSymb="$cursymb";
- swmenu.reloadSymb="$cursymb";
- swmenu.currentStale=0;
- $navstatus
- $hwkadd
- $editbutton
- }
-
- function LONCAPAstale() {
- swmenu=$reopen
- swmenu.currentStale=1;
- if (swmenu.reloadURL!='' && swmenu.reloadURL!= null) {
- swmenu.switchbutton
- (3,1,'reload.gif','return','location','go(reloadURL)','Return to the last known location in the course sequence');
- }
- swmenu.clearbut(7,2);
- swmenu.clearbut(7,3);
- swmenu.menucltim=swmenu.setTimeout(
- 'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+
- 'clearbut(9,1);clearbut(9,3);clearbut(6,3);$clearcstr',
- 2000);
- }
+ &Apache::lonhtmlcommon::add_breadcrumb_tool(
+ 'navigation', @inlineremote[21,23]);
-// END LON-CAPA Internal
-
-ENDREGTHIS
+ if(hidden_button_check() ne 'yes') {
+ &Apache::lonhtmlcommon::add_breadcrumb_tool(
+ 'tools', @inlineremote[93,91,81,82,83]);
+
+ #publish button in construction space
+ if ($env{'request.state'} eq 'construct'){
+ &Apache::lonhtmlcommon::add_breadcrumb_tool(
+ 'advtools', $inlineremote[63]);
+ } else {
+ &Apache::lonhtmlcommon::add_breadcrumb_tool(
+ 'tools', $inlineremote[63]);
+ }
+
+ unless ($env{'request.noversionuri'}=~ m{^/adm/(navmaps|viewclasslist)(\?|$)}) {
+ &Apache::lonhtmlcommon::add_breadcrumb_tool(
+ 'advtools', @inlineremote[61,71,72,73,74,92]);
+ }
}
-# =============================================================================
- } else {
-# ========================================== This can or will not be registered
- if ($textual) {
-# Not registered, textual
- $result= (<
-// BEGIN LON-CAPA Internal
-var swmenu=null;
-
- function LONCAPAreg() {
- swmenu=$reopen
- $timesync
- swmenu.currentStale=1;
- swmenu.clearbut(2,1);
- swmenu.clearbut(2,3);
- swmenu.clearbut(8,1);
- swmenu.clearbut(8,2);
- swmenu.clearbut(8,3);
- if (swmenu.currentURL) {
- swmenu.switchbutton
- (3,1,'reload.gif','return','location','go(currentURL)');
- } else {
- swmenu.clearbut(3,1);
- }
- }
-
- function LONCAPAstale() {
}
-// END LON-CAPA Internal
-
-ENDDONOTREGTHIS
- }
-# =============================================================================
- }
- return $result;
+ return &Apache::lonhtmlcommon::scripttag('', 'start')
+ . &Apache::lonhtmlcommon::breadcrumbs(undef,undef,0)
+ . &Apache::lonhtmlcommon::scripttag('', 'end');
}
-sub loadevents() {
- if ($env{'request.state'} eq 'construct' ||
- $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; }
- return 'LONCAPAreg();';
+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 unloadevents() {
- if ($env{'request.state'} eq 'construct' ||
- $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { return ''; }
- return 'LONCAPAstale();';
+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 startupremote {
my ($lowerurl)=@_;
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ if ($env{'environment.remote'} eq 'off') {
return ('');
}
#
@@ -833,28 +816,29 @@ sub startupremote {
my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited');
return(<
+//
ENDREMOTESTARTUP
}
@@ -890,18 +875,21 @@ ENDREMOTESTARTUP
sub setflags() {
return(<
+//
ENDSETFLAGS
}
sub maincall() {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
return(<
+//
ENDMAINCALL
}
@@ -909,12 +897,12 @@ ENDMAINCALL
sub load_remote_msg {
my ($lowerurl)=@_;
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $esclowerurl=&escape($lowerurl);
- my $link=&mt('Continue on in Inline Menu mode',
- "/adm/remote?action=collapse&url=$esclowerurl");
+ my $link=&mt('[_1]Continue[_2] on in Inline Menu mode'
+ ,''
+ ,'');
return(<
|