Diff for /loncom/interface/coursecatalog.pm between versions 1.59 and 1.60

version 1.59, 2010/03/22 20:11:22 version 1.60, 2010/04/04 15:38:34
Line 188  sub course_details { Line 188  sub course_details {
                 ({href=>"/adm/coursecatalog",                  ({href=>"/adm/coursecatalog",
                   text=>"Course/Community Catalog"});                    text=>"Course/Community Catalog"});
     }      }
       my $brtextone = 'Course listing';
       my $brtexttwo = 'Course details';
       if ($env{'form.currcat_0'} eq 'communities::0') {
           $brtextone = 'Community listing';
           $brtextone = 'Community details';
       }
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
              ({href=>"javascript:document.$formname.submit()",               ({href=>"javascript:document.$formname.submit()",
               text=>"Course listing"},                text=>$brtextone},
              {text=>"Course details"});               {text=>$brtexttwo});
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'));      $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'));
     $r->print('<br />'.&mt('Detailed course information:').'<br /><br />'.      $r->print('<br />');
       if ($env{'form.currcat_0'} eq 'communities::0') {
           $r->print(&mt('Detailed community information:'));
       } else {
           $r->print(&mt('Detailed course information:'));
       }
       $r->print('<br /><br />'.
               &print_course_listing($codedom,undef,$trails,$allitems).                &print_course_listing($codedom,undef,$trails,$allitems).
               '<br /><br />');                '<br /><br />');
     $r->print('<form name="'.$formname.'" method="post" action="/adm/coursecatalog">'.      $r->print('<form name="'.$formname.'" method="post" action="/adm/coursecatalog">'.
               '<a href = "javascript:document.coursecatalog.submit()">'.                '<a href = "javascript:document.coursecatalog.submit()">');
               &mt('Back to course listing').'</a>'.      if ($env{'form.currcat_0'} eq 'communities::0') {
           $r->print(&mt('Back to community listing'));
       } else {
           $r->print(&mt('Back to course listing'));
       }
       $r->print('</a>'.
               &Apache::lonhtmlcommon::echo_form_input(['coursenum','catalogfilter',                &Apache::lonhtmlcommon::echo_form_input(['coursenum','catalogfilter',
                                                        'showdetails','courseid']).'</form>');                                                         'showdetails','courseid']).'</form>');
     return;      return;
Line 290  sub cat_header { Line 307  sub cat_header {
         &Apache::loncommon::start_page('Other',$js,          &Apache::loncommon::start_page('Other',$js,
                                        { 'add_entries' => $add_entries, });                                         { 'add_entries' => $add_entries, });
     $r->print($start_page);      $r->print($start_page);
       my $brtext = 'Course listing';
       if ($env{'form.currcat_0'} eq 'communities::0') {
           $brtext = 'Community listing';
       }
     if ($env{'form.state'} eq 'listing') {      if ($env{'form.state'} eq 'listing') {
         if ($numtitles > 0) {          if ($numtitles > 0) {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
                 ({href=>"/adm/coursecatalog",                  ({href=>"/adm/coursecatalog",
                   text=>"Course/Community Catalog"},                    text=>"Course/Community Catalog"},
                  {text=>"Course listing"});                   {text=>$brtext});
         } else {          } else {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
             ({text=>"Course listing"});              ({text=>$brtext});
         }          }
     } else {      } else {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
Line 630  sub print_course_listing { Line 651  sub print_course_listing {
                                                  $env{'form.coursenum'},                                                   $env{'form.coursenum'},
                                                  undef,undef,'.',1);                                                   undef,undef,'.',1);
         if (keys(%courses) == 0) {          if (keys(%courses) == 0) {
             $output .= &mt('The courseID provided does not match a course in this domain.');              if ($env{'form.currcat_0'} eq 'communities::0') {
                   $output .= &mt('The courseID provided does not match a community in this domain.');
               } else { 
                   $output .= &mt('The courseID provided does not match a course in this domain.');
               }
             return $output;              return $output;
         }          }
     } else {      } else {
Line 699  sub construct_data_table { Line 724  sub construct_data_table {
     }      }
     if ($knownuser) {      if ($knownuser) {
         if ($details) {          if ($details) {
             $output .=              if ($env{'form.currcat_0'} eq 'communities::0') {
               '<th>'.&mt('Default Access Dates for Students').'</th>'.                  $output .= '<th>'.&mt('Default Access Dates for Members').'</th>';
               '<th>'.&mt('Student Counts').'</th>'.              } else {
               '<th>'.&mt('Auto-enrollment of[_1]registered students','<br />').'</th>';                  $output .=
                       '<th>'.&mt('Default Access Dates for Students').'</th>'.
                       '<th>'.&mt('Student Counts').'</th>'.
                       '<th>'.&mt('Auto-enrollment of[_1]registered students','<br />').'</th>';
               }
         } else {          } else {
             $output .= '<th>'.&mt('Details').'</th>';              $output .= '<th>'.&mt('Details').'</th>';
         }          }
Line 971  sub courseinfo_row { Line 1000  sub courseinfo_row {
                '<td>'.$ownerlast.'</td>';                 '<td>'.$ownerlast.'</td>';
     if ($knownuser) {      if ($knownuser) {
         if ($details) {          if ($details) {
             $output .=              if ($env{'form.currcat_0'} eq 'communities::0') {
                '<td>'.$accessdates.'</td>'.                   $output .= '<td>'.$accessdates.'</td>';
                '<td>'.$counts.'</td>'.              } else { 
                '<td>'.$autoenrollment.'</td>';                  $output .=
                       '<td>'.$accessdates.'</td>'. 
                       '<td>'.$counts.'</td>'.
                       '<td>'.$autoenrollment.'</td>';
               }
         } else {          } else {
             $output .= "<td><a href=\"javascript:setCourseId('$cnum')\">".&mt('Show more details').'</a></td>';              $output .= "<td><a href=\"javascript:setCourseId('$cnum')\">".&mt('Show more details').'</a></td>';
         }          }

Removed from v.1.59  
changed lines
  Added in v.1.60


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>