version 1.116, 2006/06/22 19:01:30
|
version 1.118, 2006/06/22 19:23:56
|
Line 99 sub display_common {
|
Line 99 sub display_common {
|
</table> |
</table> |
TABLE |
TABLE |
my @tree = split (/\//,$current_path); |
my @tree = split (/\//,$current_path); |
$r->print('<font size="+2">'.&make_anchor($url,$port_path,'/',$env{"form.mode"},$env{"form.fieldname"},$env{"form.continue"},$group).'/'); |
$r->print('<span class="LC_current_location">'.&make_anchor($url,$port_path,'/',$env{"form.mode"},$env{"form.fieldname"},$env{"form.continue"},$group).'/'); |
if (@tree > 1){ |
if (@tree > 1){ |
my $newCurrentPath = ''; |
my $newCurrentPath = ''; |
for (my $i = 1; $i< @tree; $i++){ |
for (my $i = 1; $i< @tree; $i++){ |
Line 107 TABLE
|
Line 107 TABLE
|
$r->print(&make_anchor($url,$tree[$i],'/'.$newCurrentPath, $env{"form.mode"},$env{"form.fieldname"}, $env{"form.continue"},$group).'/'); |
$r->print(&make_anchor($url,$tree[$i],'/'.$newCurrentPath, $env{"form.mode"},$env{"form.fieldname"}, $env{"form.continue"},$group).'/'); |
} |
} |
} |
} |
$r->print('</font>'); |
$r->print('</span>'); |
&Apache::lonhtmlcommon::store_recent($namespace,$current_path,$current_path); |
&Apache::lonhtmlcommon::store_recent($namespace,$current_path,$current_path); |
$r->print('<br /><form method="post" action="'.$url.'?mode='.$env{"form.mode"}.'&fieldname='.$env{"form.fieldname"}); |
$r->print('<br /><form method="post" action="'.$url.'?mode='.$env{"form.mode"}.'&fieldname='.$env{"form.fieldname"}); |
if (defined($group)) { |
if (defined($group)) { |
Line 513 sub display_access {
|
Line 513 sub display_access {
|
|
|
sub update_access { |
sub update_access { |
my ($r,$url,$group) = @_; |
my ($r,$url,$group) = @_; |
my $function = &Apache::loncommon::get_users_function(); |
|
my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg'); |
|
my $totalprocessed = 0; |
my $totalprocessed = 0; |
my %processing; |
my %processing; |
my %title = ( |
my %title = ( |
Line 614 sub update_access {
|
Line 612 sub update_access {
|
if ($scope eq 'guest') { |
if ($scope eq 'guest') { |
$r->print(&mt('Password').': '.$content->{'password'}); |
$r->print(&mt('Password').': '.$content->{'password'}); |
} elsif ($scope eq 'course' || $scope eq 'group') { |
} elsif ($scope eq 'course' || $scope eq 'group') { |
$r->print('<table border="0"><tr bgcol = "'. |
$r->print('<table><tr>'); |
$tablecolor.'">'); |
|
$r->print('<th>'.&mt('Roles').'</th><th>'. |
$r->print('<th>'.&mt('Roles').'</th><th>'. |
&mt('Access').'</th><th>'. |
&mt('Access').'</th><th>'. |
&mt('Sections').'</th>'); |
&mt('Sections').'</th>'); |
Line 937 sub display_access_row {
|
Line 934 sub display_access_row {
|
my ($r,$status,$type,$items,$access_controls,$now,$then) = @_; |
my ($r,$status,$type,$items,$access_controls,$now,$then) = @_; |
if (@{$items} > 0) { |
if (@{$items} > 0) { |
my @all_doms; |
my @all_doms; |
my $tablecolor; |
|
my $colspan = 3; |
my $colspan = 3; |
my $uctype = $type; |
my $uctype = $type; |
$uctype =~ s/^(\w)/uc($1)/e; |
$uctype =~ s/^(\w)/uc($1)/e; |
Line 949 sub display_access_row {
|
Line 945 sub display_access_row {
|
$r->print('<th>'.&mt('Allowed [_1] member affiliations',$type). |
$r->print('<th>'.&mt('Allowed [_1] member affiliations',$type). |
'</th>'); |
'</th>'); |
$colspan ++; |
$colspan ++; |
my $function = &Apache::loncommon::get_users_function(); |
|
$tablecolor=&Apache::loncommon::designparm($function.'.tabbg'); |
|
} elsif ($type eq 'domains') { |
} elsif ($type eq 'domains') { |
@all_doms = &Apache::loncommon::get_domains(); |
@all_doms = &Apache::loncommon::get_domains(); |
} |
} |
$r->print(&Apache::loncommon::end_data_table_header_row()); |
$r->print(&Apache::loncommon::end_data_table_header_row()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
|
foreach my $key (@{$items}) { |
foreach my $key (@{$items}) { |
|
$r->print(&Apache::loncommon::start_data_table_row()); |
if (($type eq 'course') || ($type eq 'group')) { |
if (($type eq 'course') || ($type eq 'group')) { |
&course_row($r,$status,$type,$key,$access_controls, |
&course_row($r,$status,$type,$key,$access_controls,$now,$then); |
$tablecolor,$now,$then); |
|
} elsif ($type eq 'domains') { |
} elsif ($type eq 'domains') { |
&domains_row($r,$status,$key,\@all_doms,$access_controls,$now, |
&domains_row($r,$status,$key,\@all_doms,$access_controls,$now, |
$then); |
$then); |
} elsif ($type eq 'users') { |
} elsif ($type eq 'users') { |
&users_row($r,$status,$key,$access_controls,$now,$then); |
&users_row($r,$status,$key,$access_controls,$now,$then); |
} |
} |
|
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
$r->print(&Apache::loncommon::end_data_table_row()); |
|
if ($status eq 'old') { |
if ($status eq 'old') { |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print('<td colspan="',$colspan.'">'.&additional_item($type). |
$r->print('<td colspan="',$colspan.'">'.&additional_item($type). |
Line 1026 function getIndex(name,value) {
|
Line 1019 function getIndex(name,value) {
|
} |
} |
|
|
sub course_row { |
sub course_row { |
my ($r,$status,$type,$item,$access_controls,$tablecolor,$now,$then) = @_; |
my ($r,$status,$type,$item,$access_controls,$now,$then) = @_; |
my $content; |
my $content; |
my $defdom = $env{'user.domain'}; |
my $defdom = $env{'user.domain'}; |
if ($status eq 'old') { |
if ($status eq 'old') { |
Line 1052 sub course_row {
|
Line 1045 sub course_row {
|
$r->print('<td>'.&Apache::loncommon::selectcourse_link('portform','crsnum_'.$num,'crsdom_'.$num,'description_'.$num,undef,undef,$uctype).' <input type="text" name="description_'.$num.'" size="30" /><input type="hidden" name="crsdom_'.$num.'" /><input type="hidden" name="crsnum_'.$num.'" /></td>'); |
$r->print('<td>'.&Apache::loncommon::selectcourse_link('portform','crsnum_'.$num,'crsdom_'.$num,'description_'.$num,undef,undef,$uctype).' <input type="text" name="description_'.$num.'" size="30" /><input type="hidden" name="crsdom_'.$num.'" /><input type="hidden" name="crsnum_'.$num.'" /></td>'); |
} |
} |
$r->print('<td>'.&dateboxes($num,$start,$end).'</td>'); |
$r->print('<td>'.&dateboxes($num,$start,$end).'</td>'); |
$r->print('<td><table border="0"><tr bgcolor="'.$tablecolor.'">'); |
$r->print('<td><table><tr>'); |
$r->print('<th>'.&mt('Action').'</th><th>'.&mt('Roles').'</th><th>'. |
$r->print('<th>'.&mt('Action').'</th><th>'.&mt('Roles').'</th><th>'. |
&mt('Access').'</th><th>'.&mt('Sections').'</th><th>'. |
&mt('Access').'</th><th>'.&mt('Sections').'</th><th>'. |
&mt($crsgrptext).'</th></tr>'); |
&mt($crsgrptext).'</th></tr>'); |