@@ -2157,10 +2166,11 @@ $start_page
@@ -2477,7 +2487,8 @@ sub redirect_back {
}
my $grouptag;
if ($group ne '') {
- $grouptag = ''; my $refarg;
+ $grouptag = '';
+ my $refarg;
if (exists($env{'form.ref'})) {
$refarg = '&ref='.$env{'form.ref'};
$grouptag .= '';
@@ -2559,6 +2570,22 @@ ENDNOREDIRTWO
sub screen_header {
my ($feedurl,$symb) = @_;
+ my $crscontent = &mt('Question/Comment/Feedback about course content');
+ my $crspolicy = &mt('Question/Comment/Feedback about course policy');
+ my $contribdisc = &mt('Contribution to course discussion of resource');
+ my $anoncontrib = &mt('Anonymous contribution to course discussion of resource');
+ my $namevis = &mt('name only visible to course faculty');
+ my $crstype;
+ if ($env{'request.course.id'}) {
+ $crstype = &Apache::loncommon::course_type();
+ if ($crstype eq 'Community') {
+ $crscontent = &mt('Question/Comment/Feedback about community content');
+ $crspolicy = &mt('Question/Comment/Feedback about community policy');
+ $contribdisc = &mt('Contribution to community discussion of resource');
+ $anoncontrib = &mt('Anonymous contribution to community discussion of resource');
+ $namevis = &mt('name only visible to community facilitators');
+ }
+ }
my $msgoptions='';
my $discussoptions='';
unless (($env{'form.replydisc'}) || ($env{'form.editdisc'})) {
@@ -2579,13 +2606,13 @@ sub screen_header {
if (&feedback_available(0,1)) {
$msgoptions.=
'';
}
if (&feedback_available(0,0,1)) {
$msgoptions.=
'';
}
}
@@ -2596,20 +2623,28 @@ sub screen_header {
$env{'request.course.id'}.
($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''))) {
$discussoptions='
'.
+ $contribdisc.
+ '
'.
+
''.&mt('Change Screenname').'';
my $blockblog = &Apache::loncommon::blocking_status('blogs');
if (!$blockblog) {
- $discussoptions.= &add_blog_checkbox();
+ $discussoptions.= &add_blog_checkbox($crstype);
}
}
}
- if ($msgoptions) { $msgoptions='
'.&mt('Sending Messages').'
'.$msgoptions; }
+ if ($msgoptions) {
+ $msgoptions='
'
+ .' '.&mt('Send Feedback').'
'.&Apache::lonhtmlcommon::coursepreflink(&mt('Feedback Settings'),'feedback').'
'
+ .$msgoptions;
+ }
if ($discussoptions) {
- $discussoptions='
'.&mt('Discussion Contributions').'
'.$discussoptions; }
+ $discussoptions='
'
+ .' '.&mt('Discussion Contributions').'
'.&Apache::lonhtmlcommon::coursepreflink(&mt('Discussion Settings'),'discussion').'
'
+ .$discussoptions;
+ }
return $msgoptions.$discussoptions;
}
@@ -2935,7 +2970,7 @@ sub generate_preview_button {
return(<
$end_page
END
@@ -3106,8 +3141,8 @@ this.form.submit();" />
-
-
+
+
ENDATTACH
if (defined($deloldattach)) {
@@ -3236,7 +3271,8 @@ sub construct_attachmenturl {
}
sub add_blog_checkbox {
- my ($checkstatus);
+ my ($crstype) = @_;
+ my $checkstatus;
if ($env{'form.blog'}) {
$checkstatus = 'checked="checked"';
}
@@ -3250,8 +3286,13 @@ function setblogvalue() {
}
}
-
'."\n";
+
'."\n";
return $output;
}
@@ -3275,8 +3316,9 @@ sub has_discussion {
}
sub sort_filter_names {
- my ($sort_types,$role_types,$status_types) = @_;
- %{$sort_types} = (
+ my ($sort_types,$role_types,$status_types,$crstype) = @_;
+ if (ref($sort_types) eq 'HASH') {
+ %{$sort_types} = (
ascdate => 'Date order - oldest first',
descdate => 'Date order - newest first',
thread => 'Threaded',
@@ -3284,24 +3326,30 @@ sub sort_filter_names {
username => 'By domain and username',
lastfirst => 'By last name, first name'
);
- %{$role_types} = (
- all => 'All roles',
- st => 'Students',
- cc => 'Course Coordinators',
- in => 'Instructors',
- ta => 'TAs',
- ep => 'Exam proctors',
- ad => 'Administrators',
- cr => 'Custom roles'
- );
- %{$status_types} = (
- all => 'Roles of any status',
- Active => 'Only active roles',
- Expired => 'Only past roles',
- Future => 'Only future roles',
- );
+ }
+ my @courseroles = qw(st in ta ep ad);
+ if ($crstype eq 'Community') {
+ push(@courseroles,'co');
+ } else {
+ push(@courseroles,'cc');
+ }
+ if (ref($role_types) eq 'HASH') {
+ foreach my $role (@courseroles) {
+ $role_types->{$role} = &Apache::lonnet::plaintext($role,$crstype);
+ }
+ $role_types->{'all'} = 'All roles';
+ $role_types->{'cr'} = 'Custom role';
+ }
+ if (ref($status_types) eq 'HASH') {
+ %{$status_types} = (
+ all => 'Roles of any status',
+ Active => 'Only active roles',
+ Expired => 'Only past roles',
+ Future => 'Only future roles',
+ );
+ }
}
-
+
sub handler {
my $r = shift;
if ($r->header_only) {
@@ -3827,7 +3875,11 @@ ENDREDIR
$env{'user.domain'},
'CourseBlog_'.$env{'request.course.id'},
$subject,$message,$feedurl,'public');
- $blog='
'.&mt('Added to my course blog').'
';
+ if (&Apache::loncommon::course_type() eq 'Community') {
+ $blog='
'.&mt('Added to my community blog').'
';
+ } else {
+ $blog='
'.&mt('Added to my course blog').'
';
+ }
}
# Receipt screen and redirect back to where came from