Diff for /loncom/interface/groupboards.pm between versions 1.11 and 1.15

version 1.11, 2007/05/02 01:33:48 version 1.15, 2012/07/21 21:20:06
Line 1 Line 1
 # The LearningOnline Network  # The LearningOnline Network
 # Group Bulletin Boards Manager  # Group Bulletin Boards Manager
 #  #
   # $Id$
   #
 # Copyright Michigan State University Board of Trustees  # Copyright Michigan State University Board of Trustees
 #  #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).  # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
Line 59  sub handler { Line 61  sub handler {
     my $gpterm =  &Apache::loncommon::group_term();      my $gpterm =  &Apache::loncommon::group_term();
     my $ucgpterm = $gpterm;      my $ucgpterm = $gpterm;
     $ucgpterm =~ s/^(\w)/uc($1)/e;      $ucgpterm =~ s/^(\w)/uc($1)/e;
     my $bodytitle = $crstype.' Discussion Boards';      my $bodytitle = $ucgpterm.' Discussion Boards';
     my $group = $env{'form.group'};      my $group = $env{'form.group'};
     $group =~ s/\W//g;      $group =~ s/\W//g;
     my ($description,$earlyout,$refarg);      my ($description,$earlyout,$refarg);
Line 155  function makebulboard() { Line 157  function makebulboard() {
                   "\n".'</form><br />');                    "\n".'</form><br />');
     }      }
     if (@{$groupboards} > 0) {      if (@{$groupboards} > 0) {
         $r->print('<br />');          $r->print('<br />'
                    .&Apache::loncommon::start_data_table()
                    .&Apache::loncommon::start_data_table_header_row()
                    .'<th>'.&mt('Discussion Boards').'</th>'
                    .&Apache::loncommon::end_data_table_header_row()
           );
         foreach my $board (@{$groupboards}) {          foreach my $board (@{$groupboards}) {
             my $board_url = $$boards{$board}{'url'};              my $board_url = $$boards{$board}{'url'};
             if ($board_url =~ /\?/) {              if ($board_url =~ /\?/) {
Line 163  function makebulboard() { Line 170  function makebulboard() {
             } else {              } else {
                 $board_url .= '?group='.$group;                  $board_url .= '?group='.$group;
             }              }
             $r->print('<a href="'.$board_url.'&amp;'.$refarg.'">'.              $r->print(&Apache::loncommon::start_data_table_row()
                       $$boards{$board}{'title'}.'</a><br />');                       .'<td>'
                        .'<a href="'.$board_url.'&amp;'.$refarg.'">'
                        .$$boards{$board}{'title'}.'</a>'
                        .'</td>'
                        .&Apache::loncommon::end_data_table_row()
               );
         }          }
           $r->print(&Apache::loncommon::end_data_table());
     } else {      } else {
         $r->print('<br />'.&mt('There are currently no discussion boards in this [_1].',          $r->print('<p class="LC_info">'
                       $gpterm));                   .&mt('There are currently no discussion boards in this '.$gpterm.'.',)
                    .'</p>'
           );
     }      }
     $r->print(&Apache::loncommon::end_page());      $r->print(&Apache::loncommon::end_page());
     return OK;      return OK;
Line 236  sub create_board { Line 251  sub create_board {
             $LONCAPA::map::resources[$newidx]=$bbtitle.':'.$newurl.              $LONCAPA::map::resources[$newidx]=$bbtitle.':'.$newurl.
                                                    ':false:normal:res';                                                     ':false:normal:res';
             push(@LONCAPA::map::order,$newidx);              push(@LONCAPA::map::order,$newidx);
             my ($errtext,$fatal)=&LONCAPA::map::storemap($allbbsmap,1);              my ($errtext,$fatal)=&LONCAPA::map::storemap($allbbsmap,1,1);
             if ($fatal) {              if ($fatal) {
                 $outcome = "error: failed to save discussion boards map - $errtext\n";                  $outcome = "error: failed to save discussion boards map - $errtext\n";
             } else {              } else {

Removed from v.1.11  
changed lines
  Added in v.1.15


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