--- loncom/interface/lonpickcourse.pm 2008/05/19 21:40:26 1.71 +++ loncom/interface/lonpickcourse.pm 2008/09/21 16:41:47 1.73.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Pick a course # -# $Id: lonpickcourse.pm,v 1.71 2008/05/19 21:40:26 bisitz Exp $ +# $Id: lonpickcourse.pm,v 1.73.2.4 2008/09/21 16:41:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -228,14 +228,23 @@ sub display_matched_courses { $menuchk = ' checked="checked" '; } $r->print( + ''. + ''. + ''. + ''. + ''. + '
'.&mt('Action').''. ''.(' 'x3).'
'. + ''.(' 'x3).''. + '
'. '

'); + ''. + '
'. + '
'); } } my %by_descrip; @@ -267,14 +276,14 @@ sub display_matched_courses { .''.&mt('Course Description').'' .''.&mt('Domain').'' .''.&mt('Course Code').'' - .''.&mt('Owner:Domain').'' - .''.&mt('Type').'' + .''.&mt('Owner/Co-owner(s)').'' +# .''.&mt('Type').'' ); $r->print(&Apache::loncommon::end_data_table_header_row()); } foreach my $description (sort { lc($a) cmp lc($b) } (keys(%by_descrip))) { - $r->print(&Apache::loncommon::start_data_table_row()); foreach my $course (@{$by_descrip{$description}}) { + $r->print(&Apache::loncommon::start_data_table_row()); my $cleandesc=&HTML::Entities::encode($description,'<>&"'); $cleandesc=~s/'/\\'/g; my ($cdom,$cnum)=split(/\_/,$course); @@ -294,7 +303,7 @@ sub display_matched_courses { ($descr,$instcode,$singleowner,$ttype)=split(/:/,$courses{$course}); push(@owners,&unescape($singleowner)); } - my $owner = join(', ',@owners); + my $ownerstr = join(', ',@owners); $r->print(''.&course_chooser($multiple,$cdom,$cnum,$cleandesc).''); $r->print(''.$description.''); $r->print(''); @@ -308,28 +317,22 @@ sub display_matched_courses { $r->print(' '); } $r->print(''); - $r->print(''); - if (@owners > 1) { -# $r->print(', '.&mt('owners').' - ',join(', ',@owners)); - $r->print(join(', ',@owners)); - } elsif (@owners == 1) { -# $r->print(', '.&mt('owner').' - '.$owner); - $r->print($owner); - } - $r->print(''); - $r->print(''); - if ($ttype ne '') { - $r->print(&mt(&unescape($ttype))); - } else { - $r->print(' '); - } - $r->print(''); + $r->print(''.$ownerstr.''); +# $r->print(''); +# if ($ttype ne '') { +# $r->print(&mt(&unescape($ttype))); +# } else { +# $r->print(' '); +# } +# $r->print(''); if ($multiple) { $r->print("\n"); } + $r->print(&Apache::loncommon::end_data_table_row()); # $r->print("
\n"); } - $r->print(&Apache::loncommon::end_data_table_row()); } - $r->print(&Apache::loncommon::end_data_table()); + if (%courses) { + $r->print(&Apache::loncommon::end_data_table()); + } if (!%courses) { $r->print(&mt('None found')); @@ -433,12 +436,12 @@ sub build_filters { '15552000','31104000'])); my %lt = ( - 'cac' => &mt('[_1] Activity',$type), - 'cde' => &mt('[_1] Description',$type), - 'cdo' => &mt('[_1] Domain',$type), + 'cac' => &mt("$type Activity"), + 'cde' => &mt("$type Description"), + 'cdo' => &mt("$type Domain"), 'cin' => &mt('Course Institutional Code'), - 'cow' => &mt("[_1] Owner's Username",$type), - 'cod' => &mt("[_1] Owner's Domain", $type), + 'cow' => &mt("$type Owner's Username"), + 'cod' => &mt("$type Owner's Domain"), 'cog' => &mt('Course Type') ); @@ -449,8 +452,8 @@ sub build_filters { $list->{'instcodefilter'}.'" />'; } foreach my $posstype ('Course','Non-standard Course') { - $typeselectform.='\n"; + $typeselectform.='\n"; } $typeselectform.=""; my $output = qq| @@ -484,9 +487,9 @@ $multelement if ($domainselectform) { $output .= $lt{'cdo'}.': '.$domainselectform.'
'."\n"; } - if ($typeselectform) { - $output .= $lt{'cog'}.': '.$typeselectform.'
'."\n"; - } +# if ($typeselectform) { +# $output .= $lt{'cog'}.': '.$typeselectform.'
'."\n"; +# } if ($instcodeform) { $output .= $lt{'cin'}.': '.$instcodeform.'
'."\n"; }