version 1.15, 2006/04/25 21:25:13
|
version 1.16, 2006/04/25 23:12:34
|
Line 612 sub disfolder {
|
Line 612 sub disfolder {
|
my $numblocked = 0; |
my $numblocked = 0; |
&blockcheck(\%setters,\$startblock,\$endblock); |
&blockcheck(\%setters,\$startblock,\$endblock); |
$r->print(<<ENDDISHEADER); |
$r->print(<<ENDDISHEADER); |
<script> |
<script type="text/javascript"> |
function checkall() { |
function checkall() { |
for (i=0; i<document.forms.disall.elements.length; i++) { |
for (i=0; i<document.forms.disall.elements.length; i++) { |
if |
if |
Line 1286 sub get_blockdates {
|
Line 1286 sub get_blockdates {
|
sub display_blocker_status { |
sub display_blocker_status { |
my ($r,$records,$ltext) = @_; |
my ($r,$records,$ltext) = @_; |
my $parmcount = 0; |
my $parmcount = 0; |
my @bgcols = ("#eeeeee","#dddddd"); |
|
my $function = &Apache::loncommon::get_users_function(); |
|
my $color = &Apache::loncommon::designparm($function.'.tabbg', |
|
$env{'user.domain'}); |
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'modi' => 'Modify', |
'modi' => 'Modify', |
'canc' => 'Cancel', |
'canc' => 'Cancel', |
); |
); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<table border="0" cellpadding="0" cellspacing="0"> |
<table class="LC_data_table"> |
<tr> |
<tr> |
<td width="100%" bgcolor="#000000"> |
<th>$$ltext{'dura'}</th> |
<table width="100%" border="0" cellpadding="1" cellspacing="0"> |
<th>$$ltext{'setb'}</th> |
<tr> |
<th>$$ltext{'even'}</th> |
<td width="100%" bgcolor="#000000"> |
<th>$$ltext{'actn'}?</th> |
<table border="0" cellpadding="3" cellspacing="3" bgcolor="#FFFFFF"> |
</tr> |
<tr bgcolor="$color"> |
|
<td><b>$$ltext{'dura'}</b></td> |
|
<td><b>$$ltext{'setb'}</b></td> |
|
<td><b>$$ltext{'even'}</b></td> |
|
<td><b>$$ltext{'actn'}?</b></td> |
|
</tr> |
|
END |
END |
foreach (sort keys %{$records}) { |
foreach (sort keys %{$records}) { |
my $iter = $parmcount%2; |
my $iter = $parmcount%2; |
Line 1321 END
|
Line 1312 END
|
my ($setuname,$setudom,$title) = &parse_block_record($$records{$_}); |
my ($setuname,$setudom,$title) = &parse_block_record($$records{$_}); |
my $settername = &Apache::loncommon::plainname($setuname,$setudom); |
my $settername = &Apache::loncommon::plainname($setuname,$setudom); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<tr bgcolor="$bgcols[$iter]"> |
<tr> |
<td>$$ltext{'star'}: $startform<br/>$$ltext{'endd'}: $endform</td> |
<td>$$ltext{'star'}: $startform<br/>$$ltext{'endd'}: $endform</td> |
<td>$settername</td> |
<td>$settername</td> |
<td><input type="text" name="title_$parmcount" size="15" value="$title" /><input type="hidden" name="key_$parmcount" value="$_" /></td> |
<td><input type="text" name="title_$parmcount" size="15" value="$title" /><input type="hidden" name="key_$parmcount" value="$_" /></td> |
Line 1331 END
|
Line 1322 END
|
$parmcount ++; |
$parmcount ++; |
} |
} |
$r->print(<<"END"); |
$r->print(<<"END"); |
</table> |
|
</td> |
|
</tr> |
|
</table> |
|
</td> |
|
</tr> |
|
</table> |
</table> |
<br /> |
<br /> |
<br /> |
<br /> |
Line 1366 sub display_addblocker_table {
|
Line 1351 sub display_addblocker_table {
|
'checked=true;"'; |
'checked=true;"'; |
my $startform = &Apache::lonhtmlcommon::date_setter('blockform','startdate_'.$parmcount,$start,$onchange); |
my $startform = &Apache::lonhtmlcommon::date_setter('blockform','startdate_'.$parmcount,$start,$onchange); |
my $endform = &Apache::lonhtmlcommon::date_setter('blockform','enddate_'.$parmcount,$end,$onchange); |
my $endform = &Apache::lonhtmlcommon::date_setter('blockform','enddate_'.$parmcount,$end,$onchange); |
my $function = &Apache::loncommon::get_users_function(); |
|
my $color = &Apache::loncommon::designparm($function.'.tabbg', |
|
$env{'user.domain'}); |
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'addb' => 'Add block', |
'addb' => 'Add block', |
'exam' => 'e.g., Exam 1', |
'exam' => 'e.g., Exam 1', |
Line 1376 sub display_addblocker_table {
|
Line 1358 sub display_addblocker_table {
|
); |
); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<h4>$lt{'addn'}</h4> |
<h4>$lt{'addn'}</h4> |
<table border="0" cellpadding="0" cellspacing="0"> |
<table class="LC_data_table"> |
<tr> |
<tr> |
<td width="100%" bgcolor="#000000"> |
<th>$$ltext{'dura'}</th> |
<table width="100%" border="0" cellpadding="1" cellspacing="0"> |
<th>$$ltext{'even'} $lt{'exam'}</th> |
<tr> |
<th>$$ltext{'actn'}?</th> |
<td width="100%" bgcolor="#000000"> |
</tr> |
<table border="0" cellpadding="3" cellspacing="3" bgcolor="#FFFFFF"> |
<tr> |
<tr bgcolor="#CCCCFF"> |
<td>$$ltext{'star'}: $startform<br />$$ltext{'endd'}: $endform</td> |
<td><b>$$ltext{'dura'}</b></td> |
<td><input type="text" name="title_$parmcount" size="15" value="" /></td> |
<td><b>$$ltext{'even'} $lt{'exam'}</b></td> |
<td><label>$lt{'addb'}? <input type="checkbox" name="add_$parmcount" value="1" /></label></td> |
<td><b>$$ltext{'actn'}?</b></td> |
</tr> |
</tr> |
</table> |
<tr bgcolor="#eeeeee"> |
|
<td>$$ltext{'star'}: $startform<br />$$ltext{'endd'}: $endform</td> |
|
<td><input type="text" name="title_$parmcount" size="15" value="" /></td> |
|
<td><label>$lt{'addb'}? <input type="checkbox" name="add_$parmcount" value="1" /></label></td> |
|
</tr> |
|
</table> |
|
</td> |
|
</tr> |
|
</table> |
|
</td> |
|
</tr> |
|
</table> |
|
END |
END |
return; |
return; |
} |
} |
Line 1453 sub blockcheck {
|
Line 1423 sub blockcheck {
|
|
|
sub build_block_table { |
sub build_block_table { |
my ($r,$startblock,$endblock,$setters) = @_; |
my ($r,$startblock,$endblock,$setters) = @_; |
my $function = &Apache::loncommon::get_users_function(); |
|
my $color = &Apache::loncommon::designparm($function.'.tabbg', |
|
$env{'user.domain'}); |
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
'cacb' => 'Currently active communication blocks', |
'cacb' => 'Currently active communication blocks', |
'cour' => 'Course', |
'cour' => 'Course', |
Line 1464 sub build_block_table {
|
Line 1431 sub build_block_table {
|
); |
); |
$r->print(<<"END"); |
$r->print(<<"END"); |
<br /<br />$lt{'cacb'}:<br /><br /> |
<br /<br />$lt{'cacb'}:<br /><br /> |
<table border="0" cellpadding="0" cellspacing="0"> |
<table class="LC_data_table"> |
<tr> |
<tr> |
<td width="100%" bgcolor="#000000"> |
<th>$lt{'cour'}</th> |
<table width="100%" border="0" cellpadding="1" cellspacing="0"> |
<th>$lt{'dura'}</th> |
<tr> |
<th>$lt{'blse'}</th> |
<td width="100%" bgcolor="#000000"> |
</tr> |
<table border="0" cellpadding="3" cellspacing="3" bgcolor="#FFFFFF"> |
|
<tr bgcolor="$color"> |
|
<td><b>$lt{'cour'}</b></td> |
|
<td><b>$lt{'dura'}</b></td> |
|
<td><b>$lt{'blse'}</b></td> |
|
</tr> |
|
END |
END |
foreach (keys %{$setters}) { |
foreach (keys %{$setters}) { |
my %courseinfo=&Apache::lonnet::coursedescription($_); |
my %courseinfo=&Apache::lonnet::coursedescription($_); |
Line 1491 END
|
Line 1452 END
|
')</td></tr>'); |
')</td></tr>'); |
} |
} |
} |
} |
$r->print('</table></td></tr></table></td></tr></table>'); |
$r->print('</table>'); |
} |
} |
|
|
# ----------------------------------------------------------- Display a message |
# ----------------------------------------------------------- Display a message |