-
-
+
+
-
END
+ $discussion .= &action_links_bar($colspan,$ressymb,$visible,
+ $newpostsflag,$group,
+ $prevread,$markondisp);
+ $discussion .= "
+ |
+
\n";
}
if ($outputtarget eq 'export') {
if ($manifestok) {
@@ -759,26 +733,97 @@ END
}
}
} else {
- $discussion.='';
+ $discussion.='';
if (&discussion_open($status) &&
&Apache::lonnet::allowed('pch',
$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
if ($outputtarget ne 'tex') {
- $discussion.=' '.
- ''.
- &mt('Post Discussion').'';
+ $discussion.= &send_feedback_link($ressymb,$target);
}
}
- $discussion.=' '.
- &mt('Send Message').' | ';
+ if ($outputtarget ne 'tex') {
+ $discussion.= &send_message_link($ressymb);
+ }
+ $discussion.='';
}
return $discussion;
}
+sub send_feedback_link {
+ my ($ressymb,$target) = @_;
+ my $output = ''.
+ ' '.
+ ''.&mt('Post Discussion').'';
+ return $output;
+}
+
+sub send_message_link {
+ my ($ressymb) = @_;
+ my $output = ''.
+ ' '.&mt('Send Message').'';
+ return $output;
+}
+
+sub action_links_bar {
+ my ($colspan,$ressymb,$visible,$newpostsflag,$group,$prevread,$markondisp) = @_;
+ my $discussion = ' | '.
+ ' | ';
+ return $discussion;
+}
+
sub postingform_display {
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum,
$currnewattach,$currdelold,$group) = @_;
@@ -815,11 +860,16 @@ ENDDISCUSS
if ($group ne '') {
$postingform .='';
}
+ my $blockblog = &Apache::loncommon::blocking_status('blogs');
+ if (!$blockblog) {
+ $postingform .= &add_blog_checkbox();
+ }
$postingform .= "\n";
if ($outputtarget ne 'tex') {
$postingform .= &generate_attachments_button('',$attachnum,$ressymb,
$now,$currnewattach,
- $currdelold,'',$mode);
+ $currdelold,'',$mode,
+ $blockblog);
if ((ref($currnewattach) eq 'ARRAY') && (@{$currnewattach} > 0)) {
$newattachmsg = ' '.$lt{'newa'}.' ';
if (@{$currnewattach} > 1) {
@@ -851,6 +901,9 @@ sub build_posting_display {
$env{'course.'.$env{'request.course.id'}.'.domain'},
$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}))) {
$skip_group_check = 1;
}
@@ -951,18 +1004,20 @@ sub build_posting_display {
@{$$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(
$plainname,
$contrib{$idx.':sendername'},
$contrib{$idx.':senderdomain'}).' ('.
- $contrib{$idx.':sendername'}.' at '.
+ $contrib{$idx.':sendername'}.':'.
$contrib{$idx.':senderdomain'}.')';
if ($contrib{$idx.':anonymous'}) {
$sender.=' ['.$$anonhash{$key}.'] '.
$screenname;
}
-
+ if ($see_anonymous) {
+ $sender.=&Apache::loncommon::student_image_tag($contrib{$idx.':senderdomain'},$contrib{$idx.':sendername'});
+ }
# Set up for sorting by domain, then username
unless (defined($$usernamesort{$contrib{$idx.':senderdomain'}})) {
%{$$usernamesort{$contrib{$idx.':senderdomain'}}} = ();
@@ -1186,14 +1241,14 @@ sub build_posting_display {
$$newitem{$idx} = 1;
$$discussionitems[$idx] .= '
- NEW | ';
+ '.&mt('NEW').' | ';
} else {
$$newitem{$idx} = 0;
$$discussionitems[$idx] .= '
| ';
}
- $$discussionitems[$idx] .= ' '.
+ $$discussionitems[$idx] .= ' | '.
''.$subject.' '.
$sender.' '.$vgrlink.' ('.
&Apache::lonlocal::locallocaltime($posttime).') | ';
@@ -1418,7 +1473,7 @@ sub replicate_attachments {
}
sub mail_screen {
- my ($r,$feedurl,$options) = @_;
+ my ($r,$feedurl,$options,$caller_symb,$attachmaxtext) = @_;
if (exists($env{'form.origpage'})) {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog','group','ref']);
}
@@ -1428,10 +1483,9 @@ sub mail_screen {
'myqu' => 'My question/comment/feedback:',
'title' => 'Title',
'reta' => 'Retained attachments',
- 'atta' => 'Attachment (128 KB max size)',
- );
- my $title=&Apache::lonnet::gettitle($feedurl);
- if (!$title) { $title = $feedurl; }
+ 'atta' => 'Attachment',
+ );
+ my $restitle = &get_resource_title($caller_symb,$feedurl);
my $quote='';
my $subject = '';
my $comment = '';
@@ -1520,7 +1574,7 @@ END
if ($idx > 0) {
my %subversions = ();
&get_post_versions(\%subversions,$contrib{$idx.':subject'},1,$numoldver);
- $subject = &mt('Re: ')..$subversions{$numoldver};
+ $subject = &mt('Re: ').$subversions{$numoldver};
}
$subject = &HTML::Entities::encode($subject,'<>&"');
} else {
@@ -1565,7 +1619,7 @@ END
$comment = &unescape($env{'form.comment'});
&process_attachments(\@currnewattach,\@currdelold,\@keepold);
}
- my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
+ my $latexHelp=&Apache::loncommon::helpLatexCheatsheet(undef,undef,1);
my $send=&mt('Send');
my $alert = &mt('Please select a feedback type.');
my $js= <print(<$title
+$restitle
|