version 1.1491, 2022/09/13 12:22:15
|
version 1.1493, 2022/10/07 12:53:32
|
Line 2707 sub get_domain_defaults {
|
Line 2707 sub get_domain_defaults {
|
$domdefaults{'timezone_def'} = $domconfig{'defaults'}{'timezone_def'}; |
$domdefaults{'timezone_def'} = $domconfig{'defaults'}{'timezone_def'}; |
$domdefaults{'datelocale_def'} = $domconfig{'defaults'}{'datelocale_def'}; |
$domdefaults{'datelocale_def'} = $domconfig{'defaults'}{'datelocale_def'}; |
$domdefaults{'portal_def'} = $domconfig{'defaults'}{'portal_def'}; |
$domdefaults{'portal_def'} = $domconfig{'defaults'}{'portal_def'}; |
|
$domdefaults{'portal_def_email'} = $domconfig{'defaults'}{'portal_def_email'}; |
|
$domdefaults{'portal_def_web'} = $domconfig{'defaults'}{'portal_def_web'}; |
$domdefaults{'intauth_cost'} = $domconfig{'defaults'}{'intauth_cost'}; |
$domdefaults{'intauth_cost'} = $domconfig{'defaults'}{'intauth_cost'}; |
$domdefaults{'intauth_switch'} = $domconfig{'defaults'}{'intauth_switch'}; |
$domdefaults{'intauth_switch'} = $domconfig{'defaults'}{'intauth_switch'}; |
$domdefaults{'intauth_check'} = $domconfig{'defaults'}{'intauth_check'}; |
$domdefaults{'intauth_check'} = $domconfig{'defaults'}{'intauth_check'}; |
Line 2967 sub course_portal_url {
|
Line 2969 sub course_portal_url {
|
return $firsturl; |
return $firsturl; |
} |
} |
|
|
|
sub url_prefix { |
|
my ($r,$dom,$home,$context) = @_; |
|
my $prefix; |
|
my %domdefs = &get_domain_defaults($dom); |
|
if ($domdefs{'portal_def'} && $domdefs{'portal_def_'.$context}) { |
|
if ($domdefs{'portal_def'} =~ m{^(https?://[^/]+)}) { |
|
$prefix = $1; |
|
} |
|
} |
|
if ($prefix eq '') { |
|
my $hostname = &hostname($home); |
|
my $protocol = $protocol{$home}; |
|
$protocol = 'http' if ($protocol{$home} ne 'https'); |
|
my $alias = &use_proxy_alias($r,$home); |
|
$hostname = $alias if ($alias ne ''); |
|
$prefix = $protocol.'://'.$hostname; |
|
} |
|
return $prefix; |
|
} |
|
|
# --------------------------------------------- Get domain config for passwords |
# --------------------------------------------- Get domain config for passwords |
|
|
sub get_passwdconf { |
sub get_passwdconf { |
Line 12394 sub courselti_itemid {
|
Line 12416 sub courselti_itemid {
|
$chome = &homeserver($cnum,$cdom); |
$chome = &homeserver($cnum,$cdom); |
return if ($chome eq 'no_host'); |
return if ($chome eq 'no_host'); |
if (ref($params) eq 'HASH') { |
if (ref($params) eq 'HASH') { |
my $items = &freeze_escape($params); |
|
my $rep; |
my $rep; |
if (grep { $_ eq $chome } current_machine_ids()) { |
if (grep { $_ eq $chome } current_machine_ids()) { |
$rep = LONCAPA::Lond::crslti_itemid($cdom,$cnum,$url,$method,$params,$perlvar{'lonVersion'}); |
$rep = LONCAPA::Lond::crslti_itemid($cdom,$cnum,$url,$method,$params,$perlvar{'lonVersion'}); |
Line 12418 sub domainlti_itemid {
|
Line 12439 sub domainlti_itemid {
|
$primary_id = &domain($cdom,'primary'); |
$primary_id = &domain($cdom,'primary'); |
return if ($primary_id eq ''); |
return if ($primary_id eq ''); |
if (ref($params) eq 'HASH') { |
if (ref($params) eq 'HASH') { |
my $items = &freeze_escape($params); |
|
my $rep; |
my $rep; |
if (grep { $_ eq $primary_id } current_machine_ids()) { |
if (grep { $_ eq $primary_id } current_machine_ids()) { |
$rep = LONCAPA::Lond::domlti_itemid($cdom,$context,$url,$method,$params,$perlvar{'lonVersion'}); |
$rep = LONCAPA::Lond::domlti_itemid($cdom,$context,$url,$method,$params,$perlvar{'lonVersion'}); |