version 1.10, 2006/11/02 21:06:06
|
version 1.12, 2009/01/28 14:09:54
|
Line 155 function makebulboard() {
|
Line 155 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 168 function makebulboard() {
|
} else { |
} else { |
$board_url .= '?group='.$group; |
$board_url .= '?group='.$group; |
} |
} |
$r->print('<a href="'.$board_url.'&'.$refarg.'">'. |
$r->print(&Apache::loncommon::start_data_table_row() |
$$boards{$board}{'title'}.'</a><br />'); |
.'<td>' |
|
.'<a href="'.$board_url.'&'.$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 207 sub create_board {
|
Line 220 sub create_board {
|
my $putresult = &Apache::lonnet::put('nohist_groupboards',\%new_board, |
my $putresult = &Apache::lonnet::put('nohist_groupboards',\%new_board, |
$cdom,$cnum); |
$cdom,$cnum); |
if ($putresult ne 'ok') { |
if ($putresult ne 'ok') { |
$outcome = 'error storing new board: '.$putresult; |
$outcome = 'error saving new board: '.$putresult; |
} else { |
} else { |
$newurl = '/adm/'.$cdom.'/'.$cnum.'/'.$boardid. |
$newurl = '/adm/'.$cdom.'/'.$cnum.'/'.$boardid. |
'/bulletinboard'; |
'/bulletinboard'; |
Line 238 sub create_board {
|
Line 251 sub create_board {
|
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); |
if ($fatal) { |
if ($fatal) { |
$outcome = "error: failed to store discussion boards map - $errtext\n"; |
$outcome = "error: failed to save discussion boards map - $errtext\n"; |
} else { |
} else { |
my %boardinfo = ( |
my %boardinfo = ( |
'group' => $group, |
'group' => $group, |