--- loncom/interface/lonextresedit.pm 2016/11/29 16:28:16 1.8.2.1
+++ loncom/interface/lonextresedit.pm 2019/07/28 04:10:31 1.8.2.3
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: lonextresedit.pm,v 1.8.2.1 2016/11/29 16:28:16 raeburn Exp $
+# $Id: lonextresedit.pm,v 1.8.2.3 2019/07/28 04:10:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -229,6 +229,7 @@ sub extedit_form {
$fieldsetstyle,$action,$hiddenelem,$form);
$fieldsetstyle = 'display: none;';
$action = '/adm/coursedocs';
+ my $protocol = ($ENV{'SERVER_PORT'} == 443?'https':'http');
if ($residx) {
if ($caller eq 'direct') {
$fieldsetstyle = 'display: block;';
@@ -252,7 +253,7 @@ sub extedit_form {
$urlid = "exturl_$residx";
$srcclass = ' class="LC_nobreak"';
$extsrc = ''.$lt{'ul'}.' ';
- $preview = ' '.$lt{'pr'}.'';
+ $preview = ' '.$lt{'pr'}.'';
$title = ''.$lt{'ti'}.' ';
$save = $lt{'sv'};
} else {
@@ -263,7 +264,7 @@ sub extedit_form {
$residx = 0;
$orig_url = 'http://';
$orig_title = $lt{'ex'};
- $preview = '';
+ $preview = '';
$save = $lt{'al'};
$pathitem .= '
';
}
@@ -297,7 +298,7 @@ ENDFORM
}
sub display_editor {
- my ($url,$folderpath,$symb,$idx) = @_;
+ my ($url,$folderpath,$symb,$idx,$type,$cdom,$cnum,$hostname) = @_;
my ($residx,$supplementalflag,$title,$pathitem,$output,$js,$navmap);
if ($folderpath =~ /^supplemental/) {
$supplementalflag = 1;
@@ -313,6 +314,9 @@ sub display_editor {
}
$js = &Apache::lonhtmlcommon::scripttag(&extedit_javascript());
my $args = { 'force_register' => $env{'form.register'} };
+ if ($hostname) {
+ $args->{'hostname'} = $hostname;
+ }
return &Apache::loncommon::start_page('External Resource Editor',$js,$args).
'