-
-
+
+
@@ -596,7 +600,7 @@ END
my %sort_types = ();
my %role_types = ();
my %status_types = ();
- &sort_filter_names(\%sort_types,\%role_types,\%status_types);
+ &sort_filter_names(\%sort_types,\%role_types,\%status_types,$crstype);
$discussion .= ' | '.&mt('Sorted by').': '.$sort_types{$sortposts}.' ';
if (defined($env{'form.totposters'})) {
@@ -625,7 +629,7 @@ END
$filterchoice .= ' '.$role_types{$role}.',';
}
$filterchoice =~ s/,$//;
- $filterchoice .= '     ';
+ $filterchoice .= ' '.(' ' x8);
}
if ($statusfilter) {
$filterchoice .= ''.&mt('status').'- '.$status_types{$statusfilter};
@@ -637,11 +641,11 @@ END
}
}
if ($dischash{$toggkey}) {
- my $storebutton = &mt('Store read/unread changes');
+ my $storebutton = &mt('Save read/unread changes');
$discussion.=' | '.
- ''."\n".
+ ''."\n".
''."\n".
+ ' onclick="this.form.submit();" />'."\n".
' | ';
}
$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.= &send_feedback_link($ressymb,$target).
- ' ';
+ $discussion.= &send_feedback_link($ressymb,$target);
}
}
if ($outputtarget ne 'tex') {
$discussion.= &send_message_link($ressymb);
}
- $discussion.=' | ';
+ $discussion.='';
}
return $discussion;
}
@@ -755,65 +758,63 @@ sub send_feedback_link {
my $output = ''.
' '.
- ''.&mt('Post Discussion').'';
+ '" border="0" />';
return $output;
}
sub send_message_link {
my ($ressymb) = @_;
- my $output = ''.
+ my $output = ''.
' '.&mt('Send Message').'';
+ &escape($ressymb).'">';
return $output;
}
sub action_links_bar {
my ($colspan,$ressymb,$visible,$newpostsflag,$group,$prevread,$markondisp) = @_;
- my $discussion = ' | '.
- '';
+ my $discussion = ' '.
+ ''.
+ '';
my $escsymb=&escape($ressymb);
if ($visible>2) {
- $discussion .= ' | '.
- ' '.
''.&mt('Chronological View').'
-  ';
- } else {
- $discussion .= ' | ';
+ $discussion .='">'.&mt('Sorting/Filtering options').''.(' ' x2);
}
- $discussion .=' | ';
if ($newpostsflag) {
if (!$markondisp) {
- $discussion .=''.
&mt('Preferences on what is marked as NEW').
' '.&mt('Mark NEW posts no longer new').'';
+ $discussion .= '">'.&mt('Mark NEW posts no longer new').' | ';
} else {
$discussion .= ' | ';
}
@@ -826,7 +827,7 @@ sub action_links_bar {
sub postingform_display {
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum,
- $currnewattach,$currdelold,$group) = @_;
+ $currnewattach,$currdelold,$group,$crstype) = @_;
my $newattachmsg;
my %lt = &Apache::lonlocal::texthash(
'note' => 'Note: in anonymous discussion, your name is visible only to course faculty',
@@ -835,6 +836,9 @@ sub postingform_display {
'poan' => 'Post Anonymous Discussion',
'newa' => 'New attachments',
);
+ if ($crstype eq 'Community') {
+ $lt{'note'} = &mt('Note: in anonymous discussion, your name is visible only to community facilitators');
+ }
my $postingform = (<
@@ -843,7 +847,7 @@ sub postingform_display {
$lt{'note'}
$lt{'title'}:
-
+
ENDDISCUSS
if ($env{'form.origpage'}) {
$postingform .= '\n";
if ($outputtarget ne 'tex') {
@@ -901,6 +905,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;
}
@@ -1001,18 +1008,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'}}} = ();
@@ -1047,7 +1056,7 @@ sub build_posting_display {
$sender.=' '.&mt('Edit').'';
@@ -1065,7 +1074,7 @@ sub build_posting_display {
$sender.=' '.&mt('Make Visible').'';
}
@@ -1073,7 +1082,7 @@ sub build_posting_display {
$sender.=' '.&mt('Hide').'';
@@ -1114,7 +1123,7 @@ sub build_posting_display {
$sender.=' '.&mt('Reply').'';
@@ -1125,7 +1134,7 @@ sub build_posting_display {
$sender.=' '.&mt('Reply').'';
}
@@ -1162,7 +1171,7 @@ sub build_posting_display {
$$imsitems{$idx}{'attach'}=$attachtxt{$numoldver};
$$imsitems{$idx}{'timestamp'}=$contrib{$idx.':timestamp'};
$$imsitems{$idx}{'sender'}=$plainname.' ('.
- $contrib{$idx.':sendername'}.' at '.
+ $contrib{$idx.':sendername'}.':'.
$contrib{$idx.':senderdomain'}.')';
$$imsitems{$idx}{'isanonymous'}='false';
if ($contrib{$idx.':anonymous'}) {
@@ -1235,24 +1244,24 @@ sub build_posting_display {
if ($prevread > 0 && $prevread <= $posttime) {
$$newitem{$idx} = 1;
$$discussionitems[$idx] .= '
-
- NEW | ';
+
+ '.&mt('NEW').' | ';
} else {
$$newitem{$idx} = 0;
$$discussionitems[$idx] .= '
-
+
| ';
}
- $$discussionitems[$idx] .= ' '.
+ $$discussionitems[$idx] .= ' | '.
''.$subject.' '.
- $sender.' '.$vgrlink.' ('.
+ ''.$sender.' '.$vgrlink.' ('.
&Apache::lonlocal::locallocaltime($posttime).') | ';
if ($$dischash{$toggkey}) {
$$discussionitems[$idx].=' '.
$ctlink.' | ';
}
$$discussionitems[$idx].= ' '.
- $message.' ';
+ $message.'';
if ($contrib{$idx.':history'}) {
my @postversions = ();
$$discussionitems[$idx] .= &mt('This post has been edited by the author.');
@@ -1359,7 +1368,7 @@ sub get_post_contents {
$$plainname,
$$contrib{$idx.':sendername'},
$$contrib{$idx.':senderdomain'}).' ('.
- $$contrib{$idx.':sendername'}.' at '.
+ $$contrib{$idx.':sendername'}.':'.
$$contrib{$idx.':senderdomain'}.')';
my $attachmenturls = $$contrib{$idx.':attachmenturl'};
my @postversions = ();
@@ -1401,7 +1410,7 @@ sub get_post_contents {
foreach my $key (sort(keys(%currattach))) {
if ($$allattachments{$key}{'filename'} =~ m-^/uploaded/([^/]+/[^/]+)(/feedback)?(/?\d*)/([^/]+)$-) {
my $fname = $1.$3.'/'.$4;
- $$imsfiles{$idx}{$i} .= ''."\n";
+ $$imsfiles{$idx}{$i} .= ''."\n";
$$attachtxt{$i}.= ''.$4.' ';
}
}
@@ -1468,17 +1477,16 @@ sub replicate_attachments {
}
sub mail_screen {
- my ($r,$feedurl,$options,$caller_symb) = @_;
+ 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']);
}
my %lt = &Apache::lonlocal::texthash(
- 'plch' => 'Please check at least one of the following feedback types:',
'myqu' => 'My question/comment/feedback:',
'title' => 'Title',
'reta' => 'Retained attachments',
- 'atta' => 'Attachment (128 KB max size)',
+ 'atta' => 'Attachment',
);
my $restitle = &get_resource_title($caller_symb,$feedurl);
my $quote='';
@@ -1614,7 +1622,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= <
END
+ # Breadcrumbs
+ my $brcrum = [{'href' => '',
+ 'text' => 'Resource Feedback and Discussion'}];
+
my %onload = ('onload' => 'window.focus();setposttype();');
my $start_page=
&Apache::loncommon::start_page('Resource Feedback and Discussion',$js,
- {'add_entries' => \%onload});
+ {'add_entries' => \%onload,
+ 'bread_crumbs' => $brcrum,});
if ($quote ne '') {
&newline_to_br(\$quote);
@@ -1680,22 +1693,22 @@ END
END
} elsif ($env{'form.editdisc'}) {
$r->print(<
-
+
+
END
}
$r->print(<
$quote
$lt{'myqu'}
$latexHelp
+
+
$lt{'title'}:
-
-
END
if ( ($env{'form.editdisc'}) || ($env{'form.replydisc'}) ) {
if ($env{'form.origpage'}) {
@@ -1717,7 +1730,8 @@ END
}
} else {
$r->print(<
+
+$lt{'atta'} $attachmaxtext:
END
}
@@ -1730,7 +1744,7 @@ END
$r->print(<
-
+
END
@@ -1791,14 +1805,14 @@ sub print_display_options {
'actn' => 'Action',
'deff' => 'Default for all discussions',
'prca' => 'Preferences can be set for this discussion that determine ....',
- 'whpo' => 'Which posts are displayed when you display this bulletin board or resource, and',
+ 'whpo' => 'Which posts are displayed when you display this discussion board or resource, and',
'unwh' => 'Under what circumstances posts are identified as "NEW", and',
'wipa' => 'Whether individual posts can be marked as read/unread',
'allposts' => 'All posts',
'unread' => 'New posts only',
'unmark' => 'Posts not marked read',
'ondisp' => 'Once displayed',
- 'onmark' => 'Once marked not NEW ',
+ 'onmark' => 'Once marked not NEW',
'toggon' => 'Shown',
'toggoff' => 'Not shown',
'disa' => 'Posts displayed?',
@@ -1921,7 +1935,7 @@ END
&Apache::loncommon::end_page();
$r->print(<
+
|
| |