--- loncom/interface/lonbulletin.pm 2012/12/07 17:15:56 1.66 +++ loncom/interface/lonbulletin.pm 2016/02/26 21:44:39 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network # Bulletin Board Handler # -# $Id: lonbulletin.pm,v 1.66 2012/12/07 17:15:56 raeburn Exp $ +# $Id: lonbulletin.pm,v 1.68 2016/02/26 21:44:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,9 +33,12 @@ use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonnet; use Apache::lontexconvert; -use Apache::lonfeedback; +use Apache::lonfeedback; +use Apache::lonhtmlgateway; use Apache::lonlocal; use Apache::lonhtmlcommon; +use Apache::longroup; +use Apache::lonnavmaps; use HTML::Entities(); use LONCAPA; @@ -211,8 +214,9 @@ sub handler { if (($allowed) && ($env{'form.storesyl'})) { foreach my $syl_field (keys(%syllabusfields)) { my $field=$env{'form.'.$syl_field}; - $field=~s/\s+$//s; - $field=&Apache::lonfeedback::clear_out_html($field,1); + chomp($field); + my $gateway = Apache::lonhtmlgateway->new(); + $field = $gateway->process_incoming_html($field,1); $syllabus{$syl_field}=$field; } $syllabus{'uploaded.lastmodified'}=time; @@ -312,10 +316,22 @@ sub groupboard_breadcrumbs { text=>"Groups", title=>"View course groups"}); } + my $view_permission = + &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); + my $navmap=Apache::lonnavmaps::navmap->new(); + my $grouppagelink = &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap,$view_permission,$refarg); + if ($grouppagelink) { + push(@{$brcrum}, + {href=>$grouppagelink, + text=>"$ucgpterm: $description", + title=>"Go to group's home page"}, + ); + } else { + push(@{$brcrum}, + {text=>"$ucgpterm: $description",} + ); + } push(@{$brcrum}, - {href=>"/adm/$cdom/$cnum/$group/smppg?$refarg", - text=>"$ucgpterm: $description", - title=>"Go to group's home page"}, {href=>"/adm/groupboards?group=$group&$refarg", text=>"Discussion Boards", title=>"Display group discussion boards"},