--- loncom/interface/lonextresedit.pm 2013/02/13 04:41:35 1.5
+++ loncom/interface/lonextresedit.pm 2016/11/29 16:28:16 1.8.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: lonextresedit.pm,v 1.5 2013/02/13 04:41:35 raeburn Exp $
+# $Id: lonextresedit.pm,v 1.8.2.1 2016/11/29 16:28:16 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -59,9 +59,9 @@ sub handler {
my ($supplementalflag,$updated,$output,$errormsg,$residx,$url,$title,$symb);
if (($env{'form.folderpath'} =~ /^supplemental/) && ($env{'form.suppurl'})) {
$supplementalflag = 1;
- }
+ }
if (($supplementalflag) || ($env{'form.symb'} =~ /^uploaded/)) {
- ($updated,$output,$errormsg,$residx,$url,$title,$symb) =
+ ($updated,$output,$errormsg,$residx,$url,$title,$symb) =
&process_changes($supplementalflag,$cdom,$cnum,$chome);
if ($supplementalflag) {
if ($url ne $env{'form.suppurl'}) {
@@ -201,7 +201,7 @@ sub process_changes {
}
sub extedit_form {
- my ($supplementalflag,$residx,$orig_url,$orig_title,$pathitem,$helpitem,$caller,$symb) = @_;
+ my ($supplementalflag,$residx,$orig_url,$orig_title,$pathitem,$helpitem,$caller,$symb,$disabled) = @_;
my %lt = &Apache::lonlocal::texthash(
ex => 'External Resource',
ed => 'Edit',
@@ -263,7 +263,7 @@ sub extedit_form {
$residx = 0;
$orig_url = 'http://';
$orig_title = $lt{'ex'};
- $preview = '';
+ $preview = '';
$save = $lt{'al'};
$pathitem .= '
';
}
@@ -274,17 +274,17 @@ $legend
$active
$extsrc
-
+
$preview
$title
-
+
$pathitem
$hiddenelem
-
+
@@ -298,7 +298,7 @@ ENDFORM
sub display_editor {
my ($url,$folderpath,$symb,$idx) = @_;
- my ($residx,$supplementalflag,$title,$pathitem,$output);
+ my ($residx,$supplementalflag,$title,$pathitem,$output,$js,$navmap);
if ($folderpath =~ /^supplemental/) {
$supplementalflag = 1;
$residx = $idx;
@@ -308,10 +308,10 @@ sub display_editor {
(my $map,$residx,my $res) =
&Apache::lonnet::decode_symb($symb);
$title = &Apache::lonnet::gettitle($symb);
- my $path = &Apache::lonnet::getdocspath($symb);
+ my $path = &Apache::loncommon::symb_to_docspath($symb,\$navmap);
$pathitem = '';
}
- my $js = &Apache::lonhtmlcommon::scripttag(&extedit_javascript());
+ $js = &Apache::lonhtmlcommon::scripttag(&extedit_javascript());
my $args = { 'force_register' => $env{'form.register'} };
return &Apache::loncommon::start_page('External Resource Editor',$js,$args).
'