version 1.370.2.5.2.3, 2022/11/14 15:12:30
|
version 1.370.2.6, 2022/01/19 01:35:58
|
Line 118 sub list_discussion {
|
Line 118 sub list_discussion {
|
$outputtarget = 'export'; |
$outputtarget = 'export'; |
} |
} |
} |
} |
my ($nofooter,$nodisclink,$nofdbklink); |
|
if (not &discussion_visible($status)) { |
if (not &discussion_visible($status)) { |
if ($mode ne 'board') { |
if ($mode ne 'board') { |
($nofooter,$nodisclink,$nofdbklink) = &check_menucoll(); |
&Apache::lonenc::check_encrypt(\$ressymb); |
if ($nofooter || $nofdbklink) { |
return '<br /><div class="LC_feedback_link">'.&send_message_link($ressymb)."</div>"; |
return '<br />'; |
|
} else { |
|
&Apache::lonenc::check_encrypt(\$ressymb); |
|
return '<br /><div class="LC_feedback_link">'.&send_message_link($ressymb)."</div>"; |
|
} |
|
} |
} |
} |
} |
if ($group ne '' && $mode eq 'board') { |
if ($group ne '' && $mode eq 'board') { |
Line 136 sub list_discussion {
|
Line 130 sub list_discussion {
|
} |
} |
} |
} |
|
|
unless ($outputtarget eq 'export') { |
my ($blocked,$blocktext) = |
($nofooter,$nodisclink,$nofdbklink) = &check_menucoll(); |
&Apache::loncommon::blocking_status('boards'); |
} |
if ($blocked) { |
|
$blocktext = '<br /><div class="LC_feedback_link"><span class="LC_feedback_link">'.$blocktext."</span>"; |
unless ($nofooter) { |
&Apache::lonenc::check_encrypt(\$ressymb); |
my ($blocked,$blocktext) = |
if ($mode ne 'board') { |
&Apache::loncommon::blocking_status('boards'); |
$blocktext.=&send_message_link($ressymb).'</div>'; |
if ($blocked) { |
}else{ |
my $footer = '<br /><div class="LC_feedback_link">'; |
$blocktext.="</div>"; |
unless ($nodisclink) { |
|
$footer .= '<span class="LC_feedback_link">'.$blocktext.'</span>'; |
|
} |
|
&Apache::lonenc::check_encrypt(\$ressymb); |
|
if ($mode ne 'board') { |
|
unless ($nofdbklink) { |
|
$footer.=&send_message_link($ressymb); |
|
} |
|
} |
|
$footer.='</div>'; |
|
return $footer; |
|
} |
} |
|
return $blocktext; |
} |
} |
|
|
my @bgcols = ("LC_disc_old_item","LC_disc_new_item"); |
my @bgcols = ("LC_disc_old_item","LC_disc_new_item"); |
Line 690 END
|
Line 674 END
|
$newpostsflag,$group, |
$newpostsflag,$group, |
$prevread,$markondisp,$seehidden); |
$prevread,$markondisp,$seehidden); |
$discussion .= "</table></form>\n"; |
$discussion .= "</table></form>\n"; |
} |
} |
if ($outputtarget eq 'export') { |
if ($outputtarget eq 'export') { |
if ($manifestok) { |
if ($manifestok) { |
while ($currdepth > 0) { |
while ($currdepth > 0) { |
Line 790 END
|
Line 774 END
|
&mt('This discussion is closed.').'</span>'; |
&mt('This discussion is closed.').'</span>'; |
} |
} |
} elsif ($outputtarget ne 'tex') { |
} elsif ($outputtarget ne 'tex') { |
unless ($nofooter) { |
$discussion.='<div class="LC_feedback_link">'; |
$discussion.='<div class="LC_feedback_link">'; |
if (&discussion_open($status) && |
unless ($nodisclink) { |
&Apache::lonnet::allowed('pch', |
if (&discussion_open($status) && |
$env{'request.course.id'}. |
&Apache::lonnet::allowed('pch', |
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { |
$env{'request.course.id'}. |
$discussion.= &send_feedback_link($ressymb); |
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { |
if ($env{'request.role.adv'}) { |
$discussion.= &send_feedback_link($ressymb); |
my $close = &Apache::lonnet::EXT('resource.0.discussend',$ressymb); |
if ($env{'request.role.adv'}) { |
my $canvote = &Apache::lonnet::EXT('resource.0.discussvote',$ressymb); |
my $close = &Apache::lonnet::EXT('resource.0.discussend',$ressymb); |
if (defined($close) && $close ne '' && $close < time) { |
my $canvote = &Apache::lonnet::EXT('resource.0.discussvote',$ressymb); |
if ($canvote eq 'notended') { |
if (defined($close) && $close ne '' && $close < time) { |
$discussion .= ' '.&mt('(Posting and voting closed for [_1] roles)', |
if ($canvote eq 'notended') { |
&Apache::lonnet::plaintext('st',$crstype)); |
$discussion .= ' '.&mt('(Posting and voting closed for [_1] roles)', |
} else { |
&Apache::lonnet::plaintext('st',$crstype)); |
$discussion .= ' '.&mt('(Closed for [_1] roles)', |
} else { |
&Apache::lonnet::plaintext('st',$crstype)); |
$discussion .= ' '.&mt('(Closed for [_1] roles)', |
|
&Apache::lonnet::plaintext('st',$crstype)); |
|
} |
|
} |
|
} |
} |
} else { |
|
$discussion.= '<span class="LC_feedback_link">'.&mt('This discussion is closed.').'</span>'; |
|
} |
} |
} |
} |
unless ($nofdbklink) { |
} else { |
$discussion.= &send_message_link($ressymb); |
$discussion.= '<span class="LC_feedback_link">'.&mt('This discussion is closed.').'</span>'; |
} |
|
$discussion.='</div>'; |
|
} |
} |
|
$discussion.= &send_message_link($ressymb).'</div>'; |
} |
} |
return $discussion; |
return $discussion; |
} |
} |
|
|
sub check_menucoll { |
|
my ($nofooter,$nodisclink,$nofdbklink); |
|
my ($menucoll,$deeplinkmenu,$menuref) = &Apache::loncommon::menucoll_in_effect(); |
|
if ($menucoll) { |
|
if (ref($menuref) eq 'HASH') { |
|
if ($menuref->{'foot'} eq 'n') { |
|
$nofooter = 1; |
|
} else { |
|
unless ($menuref->{'disc'}) { |
|
$nodisclink = 1; |
|
} |
|
unless ($menuref->{'fdbk'}) { |
|
$nofdbklink = 1; |
|
} |
|
} |
|
} |
|
} |
|
return ($nofooter,$nodisclink,$nofdbklink); |
|
} |
|
|
|
sub can_see_hidden { |
sub can_see_hidden { |
my ($mode,$ressymb,$feedurl,$group,$cdom,$cnum,$crs) = @_; |
my ($mode,$ressymb,$feedurl,$group,$cdom,$cnum,$crs) = @_; |
my $seehidden; |
my $seehidden; |
Line 1307 sub build_posting_display {
|
Line 1264 sub build_posting_display {
|
@{$$usernamesort{$contrib{$idx.':senderdomain'}}{$contrib{$idx.':sendername'}}} = ("$idx"); |
@{$$usernamesort{$contrib{$idx.':senderdomain'}}{$contrib{$idx.':sendername'}}} = ("$idx"); |
} |
} |
# Set up for sorting by last name, then first name |
# Set up for sorting by last name, then first name |
my %names = &Apache::loncommon::getnames($contrib{$idx.':sendername'}, |
my %names = &Apache::lonnet::get('environment', |
$contrib{$idx.':senderdomain'}); |
['firstname','lastname'],$contrib{$idx.':senderdomain'}, |
|
,$contrib{$idx.':sendername'}); |
my $lastname = $names{'lastname'}; |
my $lastname = $names{'lastname'}; |
my $firstname = $names{'firstname'}; |
my $firstname = $names{'firstname'}; |
if ($lastname eq '') { |
if ($lastname eq '') { |
Line 2942 sub no_redirect_back {
|
Line 2900 sub no_redirect_back {
|
},$js_delay);"; |
},$js_delay);"; |
} |
} |
$parms{'add_entries'}={'onload' => $onload}; |
$parms{'add_entries'}={'onload' => $onload}; |
my $windowname = 'loncapaclient'; |
my $windowname = 'loncapaclient'; |
$form_for_modal = <<ENDFORM; |
$form_for_modal = <<ENDFORM; |
<form name="reldt" action="$feedurl" target="$windowname"> |
<form name="reldt" action="$feedurl" target="$windowname"> |
</form> |
</form> |
Line 4685 ENDREDIR
|
Line 4643 ENDREDIR
|
($env{'request.course.id'} && ($feedurl!~m:^/adm:)) |
($env{'request.course.id'} && ($feedurl!~m:^/adm:)) |
|| |
|| |
($env{'request.course.id'} && ($symb=~/^bulletin\_\_\_/)) |
($env{'request.course.id'} && ($symb=~/^bulletin\_\_\_/)) |
|| |
|
(($env{'request.course.id'}) && ($feedurl =~ /ext\.tool$/)) |
|
) { |
) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |