-
-
+
+
@@ -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'})) {
@@ -639,9 +643,9 @@ END
if ($dischash{$toggkey}) {
my $storebutton = &mt('Save read/unread changes');
$discussion.=' | '.
- ''."\n".
+ ''."\n".
''."\n".
+ ' onclick="this.form.submit();" />'."\n".
' | ';
}
$discussion .= (<'.
' '.
- ''.&mt('Post Discussion').'';
+ '" border="0" />';
return $output;
}
@@ -764,55 +768,53 @@ sub send_message_link {
my ($ressymb) = @_;
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').'
- '.(' ' x2);
- } else {
- $discussion .= ' | ';
}
- $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 .= ' | ';
}
@@ -825,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',
@@ -834,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 = (<
@@ -842,7 +847,7 @@ sub postingform_display {
$lt{'note'}
$lt{'title'}:
-
+
ENDDISCUSS
if ($env{'form.origpage'}) {
$postingform .= '\n";
if ($outputtarget ne 'tex') {
@@ -1010,6 +1015,7 @@ sub build_posting_display {
$contrib{$idx.':senderdomain'}).' ('.
$contrib{$idx.':sendername'}.':'.
$contrib{$idx.':senderdomain'}.')';
+ $sender = ''.$sender.'';
if ($contrib{$idx.':anonymous'}) {
$sender.=' ['.$$anonhash{$key}.'] '.
$screenname;
@@ -1051,7 +1057,7 @@ sub build_posting_display {
$sender.=' '.&mt('Edit').'';
@@ -1069,7 +1075,7 @@ sub build_posting_display {
$sender.=' '.&mt('Make Visible').'';
}
@@ -1077,7 +1083,7 @@ sub build_posting_display {
$sender.=' '.&mt('Hide').'';
@@ -1093,6 +1099,7 @@ sub build_posting_display {
} else {
$sender=''.$$anonhash{$key}.'';
}
+ $sender = ''.$sender.'';
# Set up for sorting by domain, then username for anonymous
unless (defined($$usernamesort{'__anon'})) {
%{$$usernamesort{'__anon'}} = ();
@@ -1118,7 +1125,7 @@ sub build_posting_display {
$sender.=' '.&mt('Reply').'';
@@ -1129,7 +1136,7 @@ sub build_posting_display {
$sender.=' '.&mt('Reply').'';
}
@@ -1166,7 +1173,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'}) {
@@ -1239,24 +1246,24 @@ sub build_posting_display {
if ($prevread > 0 && $prevread <= $posttime) {
$$newitem{$idx} = 1;
$$discussionitems[$idx] .= '
-
+
'.&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.');
@@ -1363,7 +1370,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 = ();
@@ -1391,7 +1398,9 @@ sub get_post_contents {
my ($timesent,$attachmsg);
my %currattach = ();
$timesent = &Apache::lonlocal::locallocaltime($postversions[$i]);
- &newline_to_br(\$messages->{$i});
+ unless (&contains_block_html($messages->{$i})) {
+ &newline_to_br(\$messages->{$i});
+ }
$$messages{$i}=&Apache::lontexconvert::msgtexconverted($$messages{$i});
$$subjects{$i}=~s/\n/\ /g;
$$subjects{$i}=&Apache::lontexconvert::msgtexconverted($$subjects{$i});
@@ -1405,7 +1414,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.' ';
}
}
@@ -1478,7 +1487,6 @@ sub mail_screen {
}
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',
@@ -1660,13 +1668,21 @@ END
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);
+ $quote = &HTML::Entities::decode($quote);
+ unless (&contains_block_html($quote)) {
+ &newline_to_br(\$quote);
+ }
$quote=''.&Apache::lontexconvert::msgtexconverted($quote).' ';
}
@@ -1684,22 +1700,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'}) {
@@ -1721,6 +1737,7 @@ END
}
} else {
$r->print(<
$lt{'atta'} $attachmaxtext:
END
@@ -1734,7 +1751,7 @@ END
$r->print(<
-
+
END
@@ -1925,7 +1942,7 @@ END
&Apache::loncommon::end_page();
$r->print(<
+
|
| | |