version 1.867, 2009/07/27 11:30:05
|
version 1.869, 2009/07/27 13:26:16
|
Line 3831 sub parse_block_record {
|
Line 3831 sub parse_block_record {
|
return ($setuname,$setudom,$title,$blocks); |
return ($setuname,$setudom,$title,$blocks); |
} |
} |
|
|
sub build_block_table { |
|
my ($startblock,$endblock,$setters) = @_; |
|
my %lt = &Apache::lonlocal::texthash( |
|
'cacb' => 'Currently active communication blocks', |
|
'cour' => 'Course', |
|
'dura' => 'Duration', |
|
'blse' => 'Block set by' |
|
); |
|
my $output; |
|
$output = '<br />'.$lt{'cacb'}.':<br />'; |
|
$output .= &start_data_table(); |
|
$output .= ' |
|
<tr> |
|
<th>'.$lt{'cour'}.'</th> |
|
<th>'.$lt{'dura'}.'</th> |
|
<th>'.$lt{'blse'}.'</th> |
|
</tr> |
|
'; |
|
foreach my $course (keys(%{$setters})) { |
|
my %courseinfo=&Apache::lonnet::coursedescription($course); |
|
for (my $i=0; $i<@{$$setters{$course}{staff}}; $i++) { |
|
my ($uname,$udom) = @{$$setters{$course}{staff}[$i]}; |
|
my $fullname = &plainname($uname,$udom); |
|
if (defined($env{'user.name'}) && defined($env{'user.domain'}) |
|
&& $env{'user.name'} ne 'public' |
|
&& $env{'user.domain'} ne 'public') { |
|
$fullname = &aboutmewrapper($fullname,$uname,$udom); |
|
} |
|
my ($openblock,$closeblock) = @{$$setters{$course}{times}[$i]}; |
|
$openblock = &Apache::lonlocal::locallocaltime($openblock); |
|
$closeblock= &Apache::lonlocal::locallocaltime($closeblock); |
|
$output .= &Apache::loncommon::start_data_table_row(). |
|
'<td>'.$courseinfo{'description'}.'</td>'. |
|
'<td>'.$openblock.' to '.$closeblock.'</td>'. |
|
'<td>'.$fullname.'</td>'. |
|
&Apache::loncommon::end_data_table_row(); |
|
} |
|
} |
|
$output .= &end_data_table(); |
|
} |
|
sub blocking_status { |
sub blocking_status { |
my $blocked; |
my $blocked; |
my ($activity,$uname,$udom) = @_; |
my ($activity,$uname,$udom) = @_; |
Line 3903 END_MYBLOCK
|
Line 3863 END_MYBLOCK
|
my $popupUrl = "/adm/blockingstatus/$querystring"; |
my $popupUrl = "/adm/blockingstatus/$querystring"; |
$output .= <<"END_BLOCK"; |
$output .= <<"END_BLOCK"; |
<div class='LC_comblock'> |
<div class='LC_comblock'> |
<a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'> |
<a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring' |
<img class='LC_noBorder LC_middle' src='/res/adm/pages/comblock.png' alt='Communication Blocking'/></a> |
title='Communication Blocked'> |
<a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring'>Communication Blocking</a> |
<img class='LC_noBorder LC_middle' title='Communication Blocked' src='/res/adm/pages/comblock.png' alt='Communication Blocked'/></a> |
|
<a onclick='openWindow("$popupUrl","Blocking Table",600,300,"no","no");return false;' href='/adm/blockingstatus/$querystring' |
|
title='Communication Blocked'>Communication Blocked</a> |
</div> |
</div> |
|
|
END_BLOCK |
END_BLOCK |