version 1.161.2.1, 2024/07/03 23:49:50
|
version 1.164, 2022/11/14 18:50:42
|
Line 84 use Apache::lonlocal;
|
Line 84 use Apache::lonlocal;
|
use Apache::lonmsgdisplay(); |
use Apache::lonmsgdisplay(); |
use Apache::lontemplate; |
use Apache::lontemplate; |
use Apache::longroup; |
use Apache::longroup; |
|
use Apache::lonhtmlcommon(); |
use HTML::Entities(); |
use HTML::Entities(); |
use Image::Magick; |
use Image::Magick; |
|
|
Line 112 sub handler {
|
Line 113 sub handler {
|
my $candisplay = 1; |
my $candisplay = 1; |
if (!$is_course) { |
if (!$is_course) { |
if ($action ne 'portfolio') { |
if ($action ne 'portfolio') { |
if (($env{'user.name'} eq $cnum) && ($env{'user.domain'} eq $cdom)) { |
$candisplay = &Apache::lonnet::usertools_access($cnum,$cdom,'aboutme'); |
$candisplay = &Apache::lonnet::usertools_access($cnum,$cdom,'aboutme'); |
|
} else { |
|
$candisplay = &Apache::loncommon::aboutme_on($cnum,$cdom); |
|
} |
|
if ((!$candisplay) && ($env{'request.course.id'})) { |
if ((!$candisplay) && ($env{'request.course.id'})) { |
$candisplay = &aboutme_access($cnum,$cdom); |
$candisplay = &aboutme_access($cnum,$cdom); |
} |
} |
Line 226 sub handler {
|
Line 223 sub handler {
|
$args->{'no_nav_bar'} = 1; |
$args->{'no_nav_bar'} = 1; |
} elsif (!$env{'form.register'}) { #Don't show breadcrumbs twice, when this page is part of course content and you call it |
} elsif (!$env{'form.register'}) { #Don't show breadcrumbs twice, when this page is part of course content and you call it |
if (($env{'request.course.id'}) && |
if (($env{'request.course.id'}) && |
($env{'form.folderpath'} =~ /^supplemental/)) { |
($env{'form.folderpath'} =~ /^supplemental/)) { |
|
&Apache::loncommon::validate_folderpath(1,'',$coursenum,$coursedomain); |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
my $title = $env{'form.title'}; |
my $title = $env{'form.title'}; |
if ($title eq '') { |
if ($title eq '') { |
$title = &mt('Personal Information Page'); |
$title = &mt('Personal Information Page'); |
} |
} |
|
$title = &HTML::Entities::encode($title,'\'"<>&'); |
my $brcrum = |
my $brcrum = |
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
if (ref($brcrum) eq 'ARRAY') { |
if (ref($brcrum) eq 'ARRAY') { |
Line 809 sub parse_directory {
|
Line 808 sub parse_directory {
|
sub aboutme_access { |
sub aboutme_access { |
my ($uname,$udom) = @_; |
my ($uname,$udom) = @_; |
my $privcheck = $env{'request.course.id'}; |
my $privcheck = $env{'request.course.id'}; |
my $sec; |
|
if ($env{'request.course.sec'} ne '') { |
if ($env{'request.course.sec'} ne '') { |
$sec = $env{'request.course.sec'}; |
$privcheck .= '/'.$env{'request.course.sec'}; |
$privcheck .= '/'.$sec; |
|
} |
} |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |