Diff for /loncom/interface/coursecatalog.pm between versions 1.53.4.5 and 1.58

version 1.53.4.5, 2010/04/14 18:58:37 version 1.58, 2009/11/23 22:02:50
Line 190  sub course_details { Line 190  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=>$brtextone},                text=>"Course listing"},
              {text=>$brtexttwo});               {text=>"Course details"});
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'));      $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'));
     $r->print('<br />');      $r->print('<br />'.&mt('Detailed course information:').'<br /><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()">'.
     if ($env{'form.currcat_0'} eq 'communities::0') {                &mt('Back to course listing').'</a>'.
         $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 306  sub instcode_course_selector { Line 289  sub instcode_course_selector {
 sub cat_header {  sub cat_header {
     my ($r,$codedom,$js,$add_entries,$catlinks,$numtitles) = @_;      my ($r,$codedom,$js,$add_entries,$catlinks,$numtitles) = @_;
     my $start_page =      my $start_page =
         &Apache::loncommon::start_page('Course/Community Catalog',$js,          &Apache::loncommon::start_page('Other',$js,
                                        {                                         {
                                          'add_entries' => $add_entries,                                           'add_entries' => $add_entries,
                                          'no_inline_link'   => 1,});                                           'no_inline_link'   => 1,});
     $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=>$brtext});                   {text=>"Course listing"});
         } else {          } else {
             &Apache::lonhtmlcommon::add_breadcrumb              &Apache::lonhtmlcommon::add_breadcrumb
             ({text=>$brtext});              ({text=>"Course listing"});
         }          }
     } else {      } else {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
Line 332  sub cat_header { Line 311  sub cat_header {
     }      }
     $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'));      $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course/Community Catalog'));
     my $onchange;      my $onchange;
     unless (($env{'browser.interface'} eq 'textual') || ($env{'form.interface'} eq 'textual')) {      unless ($env{'form.interface'} eq 'textual') {
         $onchange = 'this.form.submit()';          $onchange = 'this.form.submit()';
     }      }
     $r->print('<form name="coursecatdom" method="post" action="/adm/coursecatalog">'.      $r->print('<form name="coursecatdom" method="post" action="/adm/coursecatalog">'.
Line 387  sub category_breadcrumbs { Line 366  sub category_breadcrumbs {
     } else {      } else {
         $catlinks .= &mt('Official courses (with institutional codes)');          $catlinks .= &mt('Official courses (with institutional codes)');
                      $env{'form.currcat_0'} = 'instcode::0';                       $env{'form.currcat_0'} = 'instcode::0';
         $currcat_str .= '<input type="hidden" name="currcat_0" value="'.$env{'form.currcat_0'}.'" />';           $currcat_str .= '<input type="hidden" name="currcat_0" value="'.$env{'form.currcat_0'}.'" />';
     }      }
     if ($deeper) {      if ($deeper) {
         for (my $i=1; $i<=$deeper; $i++) {          for (my $i=1; $i<=$deeper; $i++) {
Line 655  sub print_course_listing { Line 634  sub print_course_listing {
                                                  $env{'form.coursenum'},                                                   $env{'form.coursenum'},
                                                  undef,undef,'.',1);                                                   undef,undef,'.',1);
         if (keys(%courses) == 0) {          if (keys(%courses) == 0) {
             if ($env{'form.currcat_0'} eq 'communities::0') {              $output .= &mt('The courseID provided does not match a course in this domain.');
                 $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 728  sub construct_data_table { Line 703  sub construct_data_table {
     }      }
     if ($knownuser) {      if ($knownuser) {
         if ($details) {          if ($details) {
             if ($env{'form.currcat_0'} eq 'communities::0') {              $output .=
                 $output .= '<th>'.&mt('Default Access Dates for Members').'</th>';                '<th>'.&mt('Default Access Dates for Students').'</th>'.
             } else {                '<th>'.&mt('Student Counts').'</th>'.
                 $output .=                '<th>'.&mt('Auto-enrollment of[_1]registered students','<br />').'</th>';
                     '<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 1004  sub courseinfo_row { Line 975  sub courseinfo_row {
                '<td>'.$ownerlast.'</td>';                 '<td>'.$ownerlast.'</td>';
     if ($knownuser) {      if ($knownuser) {
         if ($details) {          if ($details) {
             if ($env{'form.currcat_0'} eq 'communities::0') {              $output .=
                 $output .= '<td>'.$accessdates.'</td>';                 '<td>'.$accessdates.'</td>'. 
             } else {                 '<td>'.$counts.'</td>'.
                 $output .=                 '<td>'.$autoenrollment.'</td>';
                     '<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.53.4.5  
changed lines
  Added in v.1.58


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