--- loncom/interface/portfolio.pm 2006/06/22 15:33:35 1.109 +++ loncom/interface/portfolio.pm 2006/06/22 15:42:38 1.110 @@ -547,11 +547,11 @@ sub update_access { my $updated_controls = $access_controls{$file_name}; my ($showstart,$showend); $r->print(&Apache::loncommon::start_data_table()); - $r->print(&Apache::loncommon::start_data_table_row()); + $r->print(&Apache::loncommon::start_data_table_header_row()); $r->print(''.&mt('Type of change').''. &mt('Access control').''.&mt('Dates available'). ''.&mt('Additional information').''); - $r->print(&Apache::loncommon::end_data_table_row()); + $r->print(&Apache::loncommon::end_data_table_header_row()); foreach my $chg (sort(keys(%processing))) { if (@{$processing{$chg}} > 0) { if ($chg eq 'delete') { @@ -830,9 +830,9 @@ sub access_setting_table { $r->print(''); - $r->print(&Apache::loncommon::end_data_table_row()); + $r->print(&Apache::loncommon::end_data_table_header_row()); $r->print(&Apache::loncommon::start_data_table_row()); if ($public) { $r->print(''); - $r->print(&Apache::loncommon::end_data_table_row()); + $r->print(&Apache::loncommon::end_data_table_header_row()); $r->print(&Apache::loncommon::start_data_table_row()); my $passwd; if ($guest) { @@ -926,8 +926,8 @@ sub display_access_row { my $uctype = $type; $uctype =~ s/^(\w)/uc($1)/e; $r->print(&Apache::loncommon::start_data_table()); - $r->print(&Apache::loncommon::start_data_table_row()); - $r->print(''); if (($type eq 'course') || ($type eq 'group')) { $r->print(''); } + $r->print(&Apache::loncommon::end_data_table_row()); $r->print(&Apache::loncommon::end_data_table()); } else { $r->print(&mt('No [_1]-based conditions defined.
',$type). @@ -964,15 +966,8 @@ sub display_access_row { return; } -sub course_row { - my ($r,$status,$type,$item,$access_controls,$tablecolor,$now,$then) = @_; - my %content; - my $defdom = $env{'user.domain'}; - if ($status eq 'old') { - $defdom = $$access_controls{$item}{'domain'}; - } - $r->print(&Apache::loncommon::coursebrowser_javascript($defdom)); - $r->print(qq| +sub course_js { + return qq| -|); - $r->print(&Apache::loncommon::start_data_table_row()); +|; +} + +sub course_row { + my ($r,$status,$type,$item,$access_controls,$tablecolor,$now,$then) = @_; + my %content; + my $defdom = $env{'user.domain'}; + if ($status eq 'old') { + $defdom = $$access_controls{$item}{'domain'}; + } + my $js = &Apache::loncommon::coursebrowser_javascript($defdom) + .&course_js(); my $crsgrptext = 'Groups'; if ($type eq 'group') { $crsgrptext = 'Teams'; } my ($num,$scope,$end,$start) = &set_identifiers($status,$item,$now,$then, $type); - $r->print(''); + $r->print(''); if ($status eq 'old') { my $cid = $content{'domain'}.'_'.$content{'number'}; my %course_description = &Apache::lonnet::coursedescription($cid); @@ -1051,18 +1056,15 @@ function getIndex(name,value) { $r->print(''.$role_selects); $r->print('
'); $r->print('

'.&mt('Public access:').' '.$publictext.'

'); $r->print(&Apache::loncommon::start_data_table()); - $r->print(&Apache::loncommon::start_data_table_row()); + $r->print(&Apache::loncommon::start_data_table_header_row()); $r->print('
'.&mt('Action').''.&mt('Dates available').''.&actionbox('old',$publicnum,'public').''. @@ -846,10 +846,10 @@ sub access_setting_table { $r->print(' '); $r->print('

'.&mt('Password-protected access:').' '.$guesttext.'

'); $r->print(&Apache::loncommon::start_data_table()); - $r->print(&Apache::loncommon::start_data_table_row()); + $r->print(&Apache::loncommon::start_data_table_header_row()); $r->print('
'.&mt('Action').''.&mt('Dates available'). ''. &mt('Password').''.&mt('Action?').''.&mt($uctype).''. + $r->print(&Apache::loncommon::start_data_table_header_row()); + $r->print(''.&mt('Action?').''.&mt($uctype).''. &mt('Dates available').''.&mt('Allowed [_1] member affiliations',$type). @@ -938,7 +938,8 @@ sub display_access_row { } elsif ($type eq 'domains') { @all_doms = &Apache::loncommon::get_domains(); } - $r->print(&Apache::loncommon::end_data_table_row()); + $r->print(&Apache::loncommon::end_data_table_header_row()); + $r->print(&Apache::loncommon::start_data_table_row()); foreach my $key (@{$items}) { if (($type eq 'course') || ($type eq 'group')) { &course_row($r,$status,$type,$key,$access_controls, @@ -956,6 +957,7 @@ sub display_access_row { $r->print(''.&additional_item($type). ''.&actionbox($status,$num,$scope).''.$js.&actionbox($status,$num,$scope).'
'.&mt('Add').'
'); } - $r->print(&Apache::loncommon::end_data_table_row()); return; } sub domains_row { my ($r,$status,$item,$all_doms,$access_controls,$now,$then) = @_; - $r->print(&Apache::loncommon::start_data_table_row()); my ($num,$scope,$end,$start) = &set_identifiers($status,$item,$now,$then, 'domains'); my $dom_select = ''.&dateboxes($num,$start,$end).''); - $r->print(&Apache::loncommon::end_data_table_row()); } sub additional_item {