version 1.67, 2019/02/24 01:38:14
|
version 1.69, 2022/09/08 01:41:14
|
Line 363 sub gettimezone {
|
Line 363 sub gettimezone {
|
} |
} |
return $timezone; |
return $timezone; |
} |
} |
my $cid = $Apache::lonnet::env{'request.course.id'}; |
my $cid = $Apache::lonnet::env{'request.course.id'}; |
|
if (&Apache::lonnet::usertools_access($Apache::lonnet::env{'user.name'}, |
|
$Apache::lonnet::env{'user.domain'}, |
|
'timezone')) { |
|
if ($Apache::lonnet::env{'environment.timezone'} ne '') { |
|
$timezone = $Apache::lonnet::env{'environment.timezone'}; |
|
if ($cid ne '') { |
|
if (($Apache::lonnet::env{'course.'.$cid.'.tzover'}) && |
|
($Apache::lonnet::env{'course.'.$cid.'.timezone'} ne '')) { |
|
$timezone = $Apache::lonnet::env{'course.'.$cid.'.timezone'}; |
|
} |
|
} |
|
if ($timezone ne '') { |
|
if (DateTime::TimeZone->is_valid_name($timezone)) { |
|
return $timezone; |
|
} |
|
} |
|
} |
|
} |
if ($cid ne '') { |
if ($cid ne '') { |
if ($Apache::lonnet::env{'course.'.$cid.'.timezone'}) { |
if ($Apache::lonnet::env{'course.'.$cid.'.timezone'}) { |
$timezone = $Apache::lonnet::env{'course.'.$cid.'.timezone'}; |
$timezone = $Apache::lonnet::env{'course.'.$cid.'.timezone'}; |
Line 616 sub js_escape {
|
Line 634 sub js_escape {
|
|
|
=item * html_escape() |
=item * html_escape() |
|
|
js_escape takes a string, string reference or hash reference, |
html_escape takes a string, string reference or hash reference, |
and escapes the values so that they can be used as HTML. |
and escapes the values so that they can be used as HTML. |
It encodes <, >, &, ' and ". |
It encodes <, >, &, ' and ". |
|
|