version 1.247, 2007/05/02 01:33:49
|
version 1.248, 2007/08/06 19:55:51
|
Line 48 use LONCAPA;
|
Line 48 use LONCAPA;
|
|
|
sub discussion_open { |
sub discussion_open { |
my ($status,$symb)=@_; |
my ($status,$symb)=@_; |
if ($env{'request.role.adv'}) { return 1; } |
if ($env{'request.role.adv'}) { return 0; } |
if (defined($status) && |
if (defined($status) && |
!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER' |
!($status eq 'CAN_ANSWER' || $status eq 'CANNOT_ANSWER' |
|| $status eq 'OPEN')) { |
|| $status eq 'OPEN')) { |
Line 901 sub build_posting_display {
|
Line 901 sub build_posting_display {
|
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
$env{'course.'.$env{'request.course.id'}.'.num'}); |
|
|
|
my $see_anonymous = |
|
&Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); |
|
|
if ((@{$grouppick} == 0) || (grep(/^all$/,@{$grouppick}))) { |
if ((@{$grouppick} == 0) || (grep(/^all$/,@{$grouppick}))) { |
$skip_group_check = 1; |
$skip_group_check = 1; |
} |
} |
Line 1001 sub build_posting_display {
|
Line 1004 sub build_posting_display {
|
@{$$subjectsort{$subject}} = ("$idx"); |
@{$$subjectsort{$subject}} = ("$idx"); |
} |
} |
} |
} |
if ((!$contrib{$idx.':anonymous'}) || (&Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) { |
if (!$contrib{$idx.':anonymous'} || $see_anonymous) { |
$sender=&Apache::loncommon::aboutmewrapper( |
$sender=&Apache::loncommon::aboutmewrapper( |
$plainname, |
$plainname, |
$contrib{$idx.':sendername'}, |
$contrib{$idx.':sendername'}, |
Line 1012 sub build_posting_display {
|
Line 1015 sub build_posting_display {
|
$sender.=' <font color="red"><b>['.$$anonhash{$key}.']</b></font> '. |
$sender.=' <font color="red"><b>['.$$anonhash{$key}.']</b></font> '. |
$screenname; |
$screenname; |
} |
} |
$sender.=&Apache::loncommon::student_image_tag($contrib{$idx.':senderdomain'},$contrib{$idx.':sendername'}); |
if ($see_anonymous) { |
|
$sender.=&Apache::loncommon::student_image_tag($contrib{$idx.':senderdomain'},$contrib{$idx.':sendername'}); |
|
} |
# Set up for sorting by domain, then username |
# Set up for sorting by domain, then username |
unless (defined($$usernamesort{$contrib{$idx.':senderdomain'}})) { |
unless (defined($$usernamesort{$contrib{$idx.':senderdomain'}})) { |
%{$$usernamesort{$contrib{$idx.':senderdomain'}}} = (); |
%{$$usernamesort{$contrib{$idx.':senderdomain'}}} = (); |