version 1.166, 2023/09/27 14:52:26
|
version 1.171, 2025/03/16 21:04:09
|
Line 358 sub handler {
|
Line 358 sub handler {
|
} |
} |
|
|
if ($allowed) { |
if ($allowed) { |
|
my $labeltext = &HTML::Entities::encode(&mt('Choose photo file'),'"&<>'); |
$r->print( |
$r->print( |
'<form name="UploadPhoto" method="post" enctype="multipart/form-data" action="">'. |
'<form name="UploadPhoto" method="post" enctype="multipart/form-data" action="">'. |
'<h3>'.&mt('Upload a Photo').'</h3>'. |
'<h3>'.&mt('Upload a Photo').'</h3>'. |
'<p class="LC_info">'. |
'<p class="LC_info">'. |
&mt('LON-CAPA will automatically scale your uploaded file so the image will not exceed a width of 400px and a height of 500px.').'</p>'. |
&mt('LON-CAPA will automatically scale your uploaded file so the image will not exceed a width of 400px and a height of 500px.').'</p>'. |
'<input type="file" name="uploaddoc" size="50" />'. |
'<input type="file" name="uploaddoc" size="50" aria-label="'.$labeltext.'" />'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'. |
'<input type="submit" name="storeupl" value="'.&mt('Upload').'" />'. |
'<input type="hidden" name="popup" value="'.$env{'form.popup'}.'" />'. |
'<input type="hidden" name="popup" value="'.$env{'form.popup'}.'" />'. |
'</form>'); |
'</form>'); |
Line 388 sub handler {
|
Line 389 sub handler {
|
|
|
if ($target ne 'tex') { #Begin Print RSS and portfiles |
if ($target ne 'tex') { #Begin Print RSS and portfiles |
&print_portfiles_link($r,$is_course); |
&print_portfiles_link($r,$is_course); |
if (&Apache::lonrss::advertisefeeds($cnum,$cdom) ne '') { |
if (&Apache::lonrss::advertisefeeds($cnum,$cdom,'','','',1) ne '') { |
&Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_Box'); |
&Apache::lontemplate::print_start_template($r,'RSS Feeds and Blogs','LC_Box'); |
$r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom)); |
$r->print(&Apache::lonrss::advertisefeeds($cnum,$cdom,'','','',1)); |
&Apache::lontemplate::print_end_template($r); |
&Apache::lontemplate::print_end_template($r); |
} |
} |
|
|
Line 407 sub handler {
|
Line 408 sub handler {
|
if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');} |
if ($target ne 'tex') {$r->print('<br />');} else {$r->print('\\\\');} |
} else { |
} else { |
$r->print('<p class="LC_info">'.&mt('No personal information provided').'.</p>'); |
$r->print('<p class="LC_info">'.&mt('No personal information provided').'.</p>'); |
|
if ($target ne 'tex') { |
|
&print_portfiles_link($r,$is_course); |
|
} |
} |
} |
|
|
if ($env{'request.course.id'} |
if ($env{'request.course.id'} |
Line 636 sub portfolio_files {
|
Line 640 sub portfolio_files {
|
withoutpass => 0, |
withoutpass => 0, |
both => 0, |
both => 0, |
}; |
}; |
|
unless (($is_course) || |
|
(&Apache::lonnet::usertools_access($cnum,$cdom,'portaccess',undef,'tools'))) { |
|
return $filecounts; |
|
} |
my $current_permissions = |
my $current_permissions = |
&Apache::lonnet::get_portfile_permissions($cdom,$cnum); |
&Apache::lonnet::get_portfile_permissions($cdom,$cnum); |
my %access_controls = |
my %access_controls = |
&Apache::lonnet::get_access_controls($current_permissions); |
&Apache::lonnet::get_access_controls($current_permissions); |
my $portaccess; |
my $portaccess; |
if ($mode eq 'showlink') { |
if ($mode eq 'showlink') { |
$portaccess = 'both'; |
$portaccess = 'both'; |
Line 694 sub build_hierarchy {
|
Line 702 sub build_hierarchy {
|
my ($r,$cdom,$cnum,$portaccess,$is_course,$filecounts,$mode,$access_info, |
my ($r,$cdom,$cnum,$portaccess,$is_course,$filecounts,$mode,$access_info, |
$allfileshash,$group) = @_; |
$allfileshash,$group) = @_; |
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
|
my $usercanshare = &Apache::lonnet::usertools_access($cnum,$cdom,'portaccess',undef,'tools'); |
foreach my $filename (sort(keys(%{$access_info}))) { |
foreach my $filename (sort(keys(%{$access_info}))) { |
my $access_status = |
my $access_status = |
&Apache::lonnet::get_portfolio_access($cdom,$cnum,$filename,$group,$clientip, |
&Apache::lonnet::get_portfolio_access($cdom,$cnum,$filename,$group,$clientip, |
$access_info->{$filename}); |
$access_info->{$filename},\$usercanshare); |
if ($portaccess eq 'both') { |
if ($portaccess eq 'both') { |
if (($access_status ne 'ok') && |
if (($access_status ne 'ok') && |
($access_status !~ /^[^:]+:guest_/)) { |
($access_status !~ /^[^:]+:guest_/)) { |