-$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
- }
- }
- }
- }
- }
- }
+ if ($addremote) {
+
+ Apache::lonhtmlcommon::clear_breadcrumb_tools();
+
+ Apache::lonhtmlcommon::add_breadcrumb_tool(
+ 'navigation', @inlineremote[21,23]);
+
+ 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,92]);
+ }
+ }
+
+# # Registered, textual output
+# if ( $env{'environment.icons'} eq 'iconsonly' ) {
+# $inlinebuttons = (<
+#$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
-$tablestart
-$inlinebuttons
-$tableend
+$breadcrumb
+
+
+
$newmail
+
@@ -627,6 +873,7 @@ ENDREGTEXT
$result = (<
+//
ENDREGTHIS
}
# =============================================================================
} else {
# ========================================== This can or will not be registered
- if ($textual) {
-# Not registered, textual
- $result= (<
+//
ENDDONOTREGTHIS
}
@@ -709,6 +959,42 @@ 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 ''; }
@@ -721,12 +1007,10 @@ sub unloadevents() {
return 'LONCAPAstale();';
}
-# ============================================================= Start up remote
sub startupremote {
my ($lowerurl)=@_;
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ if ($env{'environment.remote'} eq 'off') {
return ('');
}
#
@@ -737,6 +1021,7 @@ sub startupremote {
my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited');
return(<
+//
ENDREMOTESTARTUP
}
@@ -794,18 +1080,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
}
@@ -813,12 +1102,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(<
| |