version 1.372, 2016/03/23 02:19:09
|
version 1.373, 2017/05/30 00:01:32
|
Line 1290 sub build_posting_display {
|
Line 1290 sub build_posting_display {
|
if (&editing_allowed($escsymb.':::'.$idx,$group)) { |
if (&editing_allowed($escsymb.':::'.$idx,$group)) { |
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) { |
if (($env{'user.domain'} eq $contrib{$idx.':senderdomain'}) && ($env{'user.name'} eq $contrib{$idx.':sendername'})) { |
$sender.=' '. |
$sender.=' '. |
&discussion_link($symb,&mt('Edit'),'editdisc',$idx,$$newpostsflag,$prevread,&group_args($group)); |
&discussion_link($ressymb,&mt('Edit'),'editdisc',$idx,$$newpostsflag,$prevread,&group_args($group)); |
unless ($seehidden) { |
unless ($seehidden) { |
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')"; |
Line 1302 sub build_posting_display {
|
Line 1302 sub build_posting_display {
|
if ($hiddens{$idx}) { |
if ($hiddens{$idx}) { |
unless ($studenthidden) { |
unless ($studenthidden) { |
$sender.=' '. |
$sender.=' '. |
&discussion_link($symb,&mt('Make Visible'),'unhide',$idx,$$newpostsflag,$prevread,&group_args($group)); |
&discussion_link($ressymb,&mt('Make Visible'),'unhide',$idx,$$newpostsflag,$prevread,&group_args($group)); |
} |
} |
} else { |
} else { |
$sender.=' '. |
$sender.=' '. |
&discussion_link($symb,&mt('Hide'),'hide',$idx,$$newpostsflag,$prevread,&group_args($group)); |
&discussion_link($ressymb,&mt('Hide'),'hide',$idx,$$newpostsflag,$prevread,&group_args($group)); |
} |
} |
my $grpargs = &group_args($group); |
my $grpargs = &group_args($group); |
$sender.= |
$sender.= |
Line 1345 sub build_posting_display {
|
Line 1345 sub build_posting_display {
|
if (($group ne '') && |
if (($group ne '') && |
(&check_group_priv($group,'pgd') eq 'ok')) { |
(&check_group_priv($group,'pgd') eq 'ok')) { |
$sender.=' '. |
$sender.=' '. |
&discussion_link($symb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread,&group_args($group)); |
&discussion_link($ressymb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread,&group_args($group)); |
} elsif (&Apache::lonnet::allowed('pch', |
} elsif (&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'}:''))) { |
$sender.=' '. |
$sender.=' '. |
&discussion_link($symb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread); |
&discussion_link($ressymb,&mt('Reply'),'replydisc',$idx,$$newpostsflag,$prevread); |
} |
} |
} |
} |
if ($viewgrades) { |
if ($viewgrades) { |
Line 1518 sub build_posting_display {
|
Line 1518 sub build_posting_display {
|
if ($userlikes{$idx}) { |
if ($userlikes{$idx}) { |
$$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsup_gray.png" alt="'.&mt('You like this posting').'" />'; |
$$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsup_gray.png" alt="'.&mt('You like this posting').'" />'; |
} else { |
} else { |
$$discussionitems[$idx].=' '.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsup.png" alt="'.&mt('Like').'" />','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting")); |
$$discussionitems[$idx].=' '.&discussion_link($ressymb,'<img border="0" src="/res/adm/pages/thumbsup.png" alt="'.&mt('Like').'" />','like',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Like this posting")); |
} |
} |
if ($userunlikes{$idx}) { |
if ($userunlikes{$idx}) { |
$$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsdown_gray.png" alt="'.&mt('You unlike this posting').'" />'; |
$$discussionitems[$idx].='<img border="0" src="/res/adm/pages/thumbsdown_gray.png" alt="'.&mt('You unlike this posting').'" />'; |
} else { |
} else { |
$$discussionitems[$idx].=' '.&discussion_link($symb,'<img border="0" src="/res/adm/pages/thumbsdown.png" alt="'.&mt('Unlike').'" />','unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting")); |
$$discussionitems[$idx].=' '.&discussion_link($ressymb,'<img border="0" src="/res/adm/pages/thumbsdown.png" alt="'.&mt('Unlike').'" />','unlike',$idx,$$newpostsflag,$prevread,&group_args($group),&mt("Unlike this posting")); |
} |
} |
} |
} |
} |
} |
Line 1541 sub build_posting_display {
|
Line 1541 sub build_posting_display {
|
$$discussionitems[$idx] .= ' '.&mt('This post has been edited by the author.'); |
$$discussionitems[$idx] .= ' '.&mt('This post has been edited by the author.'); |
if ($seehidden) { |
if ($seehidden) { |
$$discussionitems[$idx] .= ' '. |
$$discussionitems[$idx] .= ' '. |
&discussion_link($symb,&mt('Display all versions'),'allversions',$idx,$$newpostsflag,$prevread,&group_args($group)); |
&discussion_link($ressymb,&mt('Display all versions'),'allversions',$idx,$$newpostsflag,$prevread,&group_args($group)); |
} |
} |
$$discussionitems[$idx].='<br/>'.&mt('Earlier version(s) were posted on: '); |
$$discussionitems[$idx].='<br/>'.&mt('Earlier version(s) were posted on: '); |
if ($contrib{$idx.':history'} =~ m/:/) { |
if ($contrib{$idx.':history'} =~ m/:/) { |