version 1.298, 2010/08/14 15:24:46
|
version 1.299, 2010/08/14 17:48:13
|
Line 722 END
|
Line 722 END
|
$attachnum += @{$currnewattach}; |
$attachnum += @{$currnewattach}; |
} |
} |
} |
} |
if (&discussion_open($status)) { |
if ((&discussion_open($status)) && ($outputtarget ne 'tex')) { |
if (($group ne '') && ($mode eq 'board')) { |
if (($group ne '') && ($mode eq 'board')) { |
if (&check_group_priv($group,'pgd') eq 'ok') { |
if (&check_group_priv($group,'pgd') eq 'ok') { |
$discussion .= |
$discussion .= |
Line 738 END
|
Line 738 END
|
$currnewattach,$currdelold,'',$crstype); |
$currnewattach,$currdelold,'',$crstype); |
} |
} |
} |
} |
} else { |
} elsif ($outputtarget ne 'tex') { |
$discussion.='<div class="LC_feedback_link">'; |
$discussion.='<div class="LC_feedback_link">'; |
if (&discussion_open($status) && |
if (&discussion_open($status) && |
&Apache::lonnet::allowed('pch', |
&Apache::lonnet::allowed('pch', |
$env{'request.course.id'}. |
$env{'request.course.id'}. |
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { |
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) { |
if ($outputtarget ne 'tex') { |
$discussion.= &send_feedback_link($ressymb,$target); |
$discussion.= &send_feedback_link($ressymb,$target); |
if ($env{'request.role.adv'}) { |
if ($env{'request.role.adv'}) { |
my $close = &Apache::lonnet::EXT('resource.0.discussend',$ressymb); |
my $close = &Apache::lonnet::EXT('resource.0.discussend',$ressymb); |
if (defined($close) && $close ne '' && $close < time) { |
if (defined($close) && $close ne '' && $close < time) { |
$discussion .= ' '.&mt('(Closed for [_1] roles)', |
$discussion .= ' '.&mt('(Closed for [_1] roles)', |
&Apache::lonnet::plaintext('st',$crstype)); |
&Apache::lonnet::plaintext('st',$crstype)); |
|
} |
|
} |
} |
} |
} |
} else { |
} else { |
if ($outputtarget ne 'tex') { |
$discussion.= '<span class="LC_feedback_link">'.&mt('This discussion is closed.').'</span>'; |
$discussion.= '<span class="LC_feedback_link">'.&mt('This discussion is closed.').'</span>'; |
|
} |
|
} |
|
if ($outputtarget ne 'tex') { |
|
$discussion.= &send_message_link($ressymb); |
|
} |
} |
$discussion.='</div>'; |
$discussion.= &send_message_link($ressymb).'</div>'; |
} |
} |
return $discussion; |
return $discussion; |
} |
} |
Line 842 sub action_links_bar {
|
Line 835 sub action_links_bar {
|
sub postingform_display { |
sub postingform_display { |
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum, |
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum, |
$currnewattach,$currdelold,$group,$crstype) = @_; |
$currnewattach,$currdelold,$group,$crstype) = @_; |
if ($outputtarget eq 'tex') { return ''; } |
|
my $newattachmsg; |
my $newattachmsg; |
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'note' => 'Note: in anonymous discussion, your name is visible only to course faculty', |
'note' => 'Note: in anonymous discussion, your name is visible only to course faculty', |
Line 1070 sub build_posting_display {
|
Line 1062 sub build_posting_display {
|
} else { |
} else { |
@{$$namesort{$lastname}{$firstname}} = ("$idx"); |
@{$$namesort{$lastname}{$firstname}} = ("$idx"); |
} |
} |
if ((&editing_allowed($escsymb.':::'.$idx,$group)) && ($outputtarget ne 'tex')) { |
if ($outputtarget ne 'tex') { |
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) { |
if (&editing_allowed($escsymb.':::'.$idx,$group)) { |
$sender.=' <a href="/adm/feedback?editdisc='. |
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) { |
$escsymb.':::'.$idx; |
$sender.=' <a href="/adm/feedback?editdisc='. |
if ($$newpostsflag) { |
$escsymb.':::'.$idx; |
$sender .= '&previous='.$prevread; |
if ($$newpostsflag) { |
} |
$sender .= '&previous='.$prevread; |
$sender .= &group_args($group); |
} |
$sender .= '" '.$target.'>'.&mt('Edit').'</a>'; |
$sender .= &group_args($group); |
|
$sender .= '" '.$target.'>'.&mt('Edit').'</a>'; |
|
|
unless ($seeid) { |
unless ($seeid) { |
my $grpargs = &group_args($group); |
my $grpargs = &group_args($group); |
$sender.=" <a href=\"javascript:verifydelete('studentdelete','$escsymb','$idx','$$newpostsflag','$prevread','$grpargs')"; |
$sender.=" <a href=\"javascript:verifydelete('studentdelete','$escsymb','$idx','$$newpostsflag','$prevread','$grpargs')"; |
$sender .= '">'.&mt('Delete').'</a>'; |
$sender .= '">'.&mt('Delete').'</a>'; |
|
} |
} |
} |
} |
} |
} |
if ($seeid) { |
if (($seeid) && ($outputtarget ne 'tex')) { |
if ($hidden) { |
if ($hidden) { |
unless ($studenthidden) { |
unless ($studenthidden) { |
$sender.=' <a href="/adm/feedback?unhide='. |
$sender.=' <a href="/adm/feedback?unhide='. |
$escsymb.':::'.$idx; |
$escsymb.':::'.$idx; |
if ($$newpostsflag) { |
|
$sender .= '&previous='.$prevread; |
|
} |
|
$sender .= '">'.&mt('Make Visible').'</a>'; |
|
} |
|
} else { |
|
$sender.=' <a href="/adm/feedback?hide='. |
|
$escsymb.':::'.$idx; |
if ($$newpostsflag) { |
if ($$newpostsflag) { |
$sender .= '&previous='.$prevread; |
$sender .= '&previous='.$prevread; |
} |
} |
$sender .= '">'.&mt('Make Visible').'</a>'; |
$sender .= &group_args($group); |
} |
$sender .= '">'.&mt('Hide').'</a>'; |
} else { |
} |
$sender.=' <a href="/adm/feedback?hide='. |
my $grpargs = &group_args($group); |
$escsymb.':::'.$idx; |
$sender.= |
if ($$newpostsflag) { |
" <a href=\"javascript:verifydelete('seeiddelete','$escsymb','$idx','$$newpostsflag','$prevread','$grpargs')\">"; |
$sender .= '&previous='.$prevread; |
$sender .= &mt('Delete').'</a>'; |
} |
} |
$sender .= &group_args($group); |
|
$sender .= '">'.&mt('Hide').'</a>'; |
|
} |
|
my $grpargs = &group_args($group); |
|
$sender.= |
|
" <a href=\"javascript:verifydelete('seeiddelete','$escsymb','$idx','$$newpostsflag','$prevread','$grpargs')\">"; |
|
$sender .= &mt('Delete').'</a>'; |
|
} |
} |
} else { |
} else { |
if ($screenname) { |
if ($screenname) { |
$sender='<i>'.$screenname.'</i>'; |
$sender='<i>'.$screenname.'</i>'; |
} else { |
} else { |
Line 1137 sub build_posting_display {
|
Line 1131 sub build_posting_display {
|
@{$$namesort{'__anon'}{'__anon'}} = ("$idx"); |
@{$$namesort{'__anon'}{'__anon'}} = ("$idx"); |
} |
} |
} |
} |
if ((&discussion_open($status)) && ($outputtarget ne 'tex')) { |
if ($outputtarget ne 'tex') { |
if (($group ne '') && |
if (&discussion_open($status)) { |
(&check_group_priv($group,'pgd') eq 'ok')) { |
if (($group ne '') && |
$sender.=' <a href="/adm/feedback?replydisc='. |
(&check_group_priv($group,'pgd') eq 'ok')) { |
$escsymb.':::'.$idx; |
$sender.=' <a href="/adm/feedback?replydisc='. |
if ($$newpostsflag) { |
$escsymb.':::'.$idx; |
$sender .= '&previous='.$prevread; |
if ($$newpostsflag) { |
} |
$sender .= '&previous='.$prevread; |
$sender .= &group_args($group); |
} |
$sender .= '" '.$target.'>'.&mt('Reply').'</a>'; |
$sender .= &group_args($group); |
} elsif (&Apache::lonnet::allowed('pch', |
$sender .= '" '.$target.'>'.&mt('Reply').'</a>'; |
$env{'request.course.id'}. |
} elsif (&Apache::lonnet::allowed('pch', |
($env{'request.course.sec'}?'/'. |
$env{'request.course.id'}. |
$env{'request.course.sec'}:''))) { |
($env{'request.course.sec'}?'/'. |
$sender.=' <a href="/adm/feedback?replydisc='. |
$env{'request.course.sec'}:''))) { |
$escsymb.':::'.$idx; |
$sender.=' <a href="/adm/feedback?replydisc='. |
if ($$newpostsflag) { |
$escsymb.':::'.$idx; |
$sender .= '&previous='.$prevread; |
if ($$newpostsflag) { |
|
$sender .= '&previous='.$prevread; |
|
} |
|
$sender .= '" '.$target.'>'.&mt('Reply').'</a>'; |
} |
} |
$sender .= '" '.$target.'>'.&mt('Reply').'</a>'; |
|
} |
} |
} |
if ($viewgrades) { |
if (($viewgrades) && ($outputtarget ne 'tex')) { |
|
$vgrlink=&Apache::loncommon::submlink(&mt('Submissions'), |
$vgrlink=&Apache::loncommon::submlink(&mt('Submissions'), |
$contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$ressymb); |
$contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$ressymb); |
} |
} |
if (($$dischash{$readkey}=~/\.$idx\./) && ($outputtarget ne 'tex')) { |
if ($$dischash{$readkey}=~/\.$idx\./) { |
$ctlink = '<label><b>'.&mt('Mark unread').'?</b> <input type="checkbox" name="postunread_'.$idx.'" /></label>'; |
$ctlink = '<label><b>'.&mt('Mark unread').'?</b> <input type="checkbox" name="postunread_'.$idx.'" /></label>'; |
} else { |
} else { |
$ctlink = '<label><b>'.&mt('Mark read').'?</b> <input type="checkbox" name="postread_'.$idx.'" /></label>'; |
$ctlink = '<label><b>'.&mt('Mark read').'?</b> <input type="checkbox" name="postread_'.$idx.'" /></label>'; |
|
} |
} |
} |
} |
} |
#figure out at what position this needs to print |
#figure out at what position this needs to print |