version 1.4, 2013/05/03 21:57:13
|
version 1.5, 2017/08/13 20:52:59
|
Line 101 sub handler {
|
Line 101 sub handler {
|
my $docs_url = $env{'form.url'}; |
my $docs_url = $env{'form.url'}; |
my $folderpath = &unescape($env{'form.folderpath'}); |
my $folderpath = &unescape($env{'form.folderpath'}); |
my ($mimetype,$numpathchgs,$numrefchanges,%allfiles,%codebase,$url); |
my ($mimetype,$numpathchgs,$numrefchanges,%allfiles,%codebase,$url); |
|
my $earlyout; |
if ($symb) { |
if ($symb) { |
(undef,undef,$url) = &Apache::lonnet::decode_symb($symb); |
(undef,undef,$url) = &Apache::lonnet::decode_symb($symb); |
|
unless (&Apache::lonnet::is_on_map($url)) { |
|
$earlyout = 1; |
|
} |
} elsif (($docs_url) && (($env{'httpref.'.$docs_url} ne '') || |
} elsif (($docs_url) && (($env{'httpref.'.$docs_url} ne '') || |
($docs_url =~ m{^\Q/uploaded/$cdom/$cnum/\E(portfolio/syllabus)/}))) { |
($docs_url =~ m{^\Q/uploaded/$cdom/$cnum/\E(portfolio/syllabus)/}))) { |
$url = $docs_url; |
$url = $docs_url; |
Line 122 sub handler {
|
Line 126 sub handler {
|
($destination) = |
($destination) = |
($url =~ m{^\Quploaded/$cdom/$cnum/\E((?:docs|supplemental)/(?:default|\d+)/\d+)/}); |
($url =~ m{^\Quploaded/$cdom/$cnum/\E((?:docs|supplemental)/(?:default|\d+)/\d+)/}); |
$context = 'coursedoc'; |
$context = 'coursedoc'; |
|
if ($destination eq '') { |
|
$earlyout = 1; |
|
} |
} |
} |
my $js = &Apache::loncommon::ask_embedded_js(); |
my $js = &Apache::loncommon::ask_embedded_js(); |
my $output = &Apache::loncommon::start_page($title,$js, |
my $output = &Apache::loncommon::start_page($title,$js, |
{'only_body' => 1}); |
{'only_body' => 1}); |
|
if ($earlyout) { |
|
$r->print($output.&mt('Cannot display dependency information - invalid file: [_1].',$url). |
|
&Apache::loncommon::end_page()); |
|
return OK; |
|
} |
if ($action eq 'modifyhrefs') { |
if ($action eq 'modifyhrefs') { |
my ($result,$count,$codebasecount) = |
my ($result,$count,$codebasecount) = |
&Apache::loncommon::modify_html_refs('manage_dependencies',$destination, |
&Apache::loncommon::modify_html_refs('manage_dependencies',$destination, |