version 1.568, 2024/01/25 23:37:14
|
version 1.570, 2024/04/14 17:12:28
|
Line 1702 ENDSCRIPT
|
Line 1702 ENDSCRIPT
|
} |
} |
|
|
sub seteditor_javascript { |
sub seteditor_javascript { |
|
my ($is_course_doc,$is_supp,$supp_path,$supp_title) = @_; |
|
my $symb; |
|
if ($is_course_doc) { |
|
if (!$is_supp) { |
|
($symb) = &Apache::lonnet::whichuser(); |
|
if ($symb) { |
|
$symb = &escape($symb); |
|
} |
|
} |
|
} |
return <<"ENDSCRIPT"; |
return <<"ENDSCRIPT"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
// <![CDATA[ |
// <![CDATA[ |
function seteditmode(form,editor) { |
function seteditmode(form,editor) { |
|
var querystr = ''; |
|
var supplemental = '$is_supp'; |
|
var coursedoc = '$is_course_doc'; |
|
if (coursedoc) { |
|
if (supplemental) { |
|
var supppath = '$supp_path'; |
|
var supptitle = '$supp_title'; |
|
if (supppath) { |
|
querystr = 'folderpath='+supppath; |
|
} |
|
if (supptitle) { |
|
if (querystr) { |
|
querystr += '&'; |
|
} |
|
querystr += 'title='+supptitle; |
|
} |
|
} |
|
} |
if (editor == 'daxe') { |
if (editor == 'daxe') { |
var url = new URL(document.location.href); |
var url = new URL(document.location.href); |
window.location = url.protocol+'//'+url.hostname+'/daxepage'+url.pathname; |
var newloc = url.protocol+'//'+url.hostname+'/daxepage'+url.pathname; |
|
if (querystr) { |
|
if (/\\?/.test(url.pathname)) { |
|
newloc += '&'; |
|
} else { |
|
newloc += '?'; |
|
} |
|
newloc += querystr; |
|
} |
|
window.location = newloc; |
} else { |
} else { |
form.editmode.value = editor; |
if (coursedoc) { |
|
form.action += '?forceedit=1'; |
|
if (!supplemental) { |
|
form.action += '®ister=1'; |
|
} |
|
if (querystr) { |
|
form.action += '&'+querystr; |
|
} |
|
} |
|
if (editor == 'edit') { |
|
form.editmode.value = editor; |
|
} else { |
|
form.editmode.value = ''; |
|
} |
form.submit(); |
form.submit(); |
} |
} |
} |
} |
Line 1957 ENDNOTFOUND
|
Line 2007 ENDNOTFOUND
|
if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/supplemental/\E}) { |
if ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/supplemental/\E}) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['folderpath','title']); |
['folderpath','title']); |
|
if (($env{'request.state'} eq 'edit') && ($env{'form.editmode'} eq 'edit') && |
|
($filetype eq 'html')) { |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
} |
} elsif ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E(.+)$}) { |
} elsif ($request->uri =~ m{^\Q/uploaded/$cdom/$cnum/portfolio/syllabus/\E(.+)$}) { |
my $filename = $1; |
my $filename = $1; |
if ($1 eq 'loncapa.html') { |
if ($1 eq 'loncapa.html') { |
Line 2054 sub get_courseupload_hierarchy {
|
Line 2108 sub get_courseupload_hierarchy {
|
} |
} |
if ($title) { |
if ($title) { |
push(@pathitems,&unescape($title)); |
push(@pathitems,&unescape($title)); |
|
$itemtitle = $title; |
} |
} |
$displaypath = join(' » ',@pathitems); |
$displaypath = join(' » ',@pathitems); |
} else { |
} else { |