Diff for /loncom/interface/groupboards.pm between versions 1.17 and 1.23

version 1.17, 2013/07/15 14:32:45 version 1.23, 2020/09/08 23:54:40
Line 33  use Apache::Constants qw(:common :http); Line 33  use Apache::Constants qw(:common :http);
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lonuserstate();  use Apache::lonuserstate();
   use Apache::longroup;
   use Apache::lonnavmaps;
 use LONCAPA::map();  use LONCAPA::map();
 use Apache::lonlocal;  use Apache::lonlocal;
 use LONCAPA;  use LONCAPA;
Line 72  sub handler { Line 74  sub handler {
   
     &Apache::lonhtmlcommon::clear_breadcrumbs();      &Apache::lonhtmlcommon::clear_breadcrumbs();
     if (!defined($group)) {      if (!defined($group)) {
         $earlyout = &mt('No [_1] defined, so there are no [_1] discussion boards to display',$gpterm);          $earlyout = &mt("No $gpterm defined, so there are no $gpterm discussion boards to display");
         $r->print(&display_error($cdom,$cnum,$group,$description,$gpterm,          $r->print(&display_error($cdom,$cnum,$group,$description,$gpterm,
                                  $ucgpterm,$bodytitle,$earlyout,$refarg));                                   $ucgpterm,$bodytitle,$earlyout,$refarg));
         return OK;          return OK;
Line 96  sub handler { Line 98  sub handler {
                                           '/'.$group);                                            '/'.$group);
     }      }
     if (!$can_view) {      if (!$can_view) {
         $earlyout=&mt('You do not have privileges to view discussion boards in this [_1]',$gpterm);          $earlyout=&mt("You do not have privileges to view discussion boards in this $gpterm");
         $r->print(&display_error($cdom,$cnum,$group,$description,$gpterm,          $r->print(&display_error($cdom,$cnum,$group,$description,$gpterm,
                                  $ucgpterm,$bodytitle,$earlyout,$refarg));                                   $ucgpterm,$bodytitle,$earlyout,$refarg));
         return OK;          return OK;
Line 109  sub handler { Line 111  sub handler {
  &create_board($cdom,$cnum,$group,$env{'form.newbul'});   &create_board($cdom,$cnum,$group,$env{'form.newbul'});
             if ($outcome eq 'ok') {              if ($outcome eq 'ok') {
                 my ($furl,$ferr)= &Apache::lonuserstate::readmap($cdom.'/'.$cnum);                  my ($furl,$ferr)= &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
                 $r->print(&mt('The new discussion board was added successfully.<br />'));                  $r->print(&mt('The new discussion board was added successfully.').'<br />');
                 $r->print('<table border="0"><tr><td>'.                  $r->print('<table border="0"><tr><td>'.
                           '<a href="'.$newurl.'?group='.$group.'&amp;'.$refarg.                            '<a href="'.$newurl.'?group='.$group.'&amp;'.$refarg.
                           '">'.&mt('Edit [_1] board',$bbtitle).'</a></td>'.                            '">'.&mt('Edit [_1] board',$bbtitle).'</a></td>'.
Line 119  sub handler { Line 121  sub handler {
                           '</a></td></tr></table>');                            '</a></td></tr></table>');
                 if ($lockfreed ne 'ok') {                  if ($lockfreed ne 'ok') {
                     $r->print(&mt('There was a problem removing a lockfile for the group ([_1]).',$description).'<br />'.                      $r->print(&mt('There was a problem removing a lockfile for the group ([_1]).',$description).'<br />'.
                               &mt('This may prevent creation of additional bulletin boards in this group.').'<br />'.                                &mt('This may prevent creation of additional discussion boards in this group.').'<br />'.
                               &mt('Please contact the domain coordinator for your LON-CAPA domain.'));                                &mt('Please contact the [_1]helpdesk[_2] for assistance.',
                                     '<a href="/adm/helpdesk">','</a>')
                                );
                 }                  }
             } else {              } else {
                 $r->print(&mt('There was a problem creating the new discussion board - [_1]','<span class="LC_error">'.$outcome.'</span>').'<br /><a href="/adm/groupboards?group='.$group.'">'.                  $r->print(&mt('There was a problem creating the new discussion board - [_1]','<span class="LC_error">'.$outcome.'</span>').'<br /><a href="/adm/groupboards?group='.$group.'">'.
Line 255  sub boards_header { Line 259  sub boards_header {
           text=>"Groups",            text=>"Groups",
           title=>"View course 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) {
           &Apache::lonhtmlcommon::add_breadcrumb
               ({href=>$grouppagelink,
                 text=>&mt('Group').": $description",
                 title=>&mt("Go to group's home page"),
                 no_mt=>1});
       } else {
           &Apache::lonhtmlcommon::add_breadcrumb
               ({text=>&mt('Group').": $description",
                 no_mt=>1});
       }
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
         ({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg",           ({href=>"/adm/groupboards?group=$group&amp;$refarg",
           text=>"$ucgpterm: $description",  
           title=>"Go to group's home page"},  
          {href=>"/adm/groupboards?group=$group&amp;$refarg",  
           text=>"Discussion Boards",            text=>"Discussion Boards",
           title=>"Display group discussion boards"},);            title=>"Display group discussion boards"},);
     $output .= &Apache::lonhtmlcommon::breadcrumbs(&mt('[_1] discussion boards - [_2]',$gpterm,$description));      $output .= &Apache::lonhtmlcommon::breadcrumbs(&mt('Group discussion boards - [_1]',$description),
                                                      undef,undef,undef,undef,1);
     return $output;      return $output;
 }  }
   

Removed from v.1.17  
changed lines
  Added in v.1.23


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>