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

version 1.53.4.7, 2010/10/07 14:45:04 version 1.60, 2010/04/04 15:38:34
Line 181  sub course_details { Line 181  sub course_details {
              &courselink_javascript().'</script>'."\n";               &courselink_javascript().'</script>'."\n";
     my $start_page =      my $start_page =
         &Apache::loncommon::start_page('Course/Community Catalog',$js,          &Apache::loncommon::start_page('Course/Community Catalog',$js,
                                            {                                             {'add_entries' => \%add_entries, });
                                              'add_entries' => \%add_entries,  
                                              'no_inline_link'   => 1,});  
     $r->print($start_page);      $r->print($start_page);
     if ($env{'form.numtitles'} > 0) {      if ($env{'form.numtitles'} > 0) {
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
Line 194  sub course_details { Line 192  sub course_details {
     my $brtexttwo = 'Course details';      my $brtexttwo = 'Course details';
     if ($env{'form.currcat_0'} eq 'communities::0') {      if ($env{'form.currcat_0'} eq 'communities::0') {
         $brtextone = 'Community listing';          $brtextone = 'Community listing';
         $brtexttwo = 'Community details';          $brtextone = 'Community details';
     }      }
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
              ({href=>"javascript:document.$formname.submit()",               ({href=>"javascript:document.$formname.submit()",
Line 306  sub instcode_course_selector { Line 304  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,});  
     $r->print($start_page);      $r->print($start_page);
     my $brtext = 'Course listing';      my $brtext = 'Course listing';
     if ($env{'form.currcat_0'} eq 'communities::0') {      if ($env{'form.currcat_0'} eq 'communities::0') {
Line 332  sub cat_header { Line 328  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 383  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 402  sub category_breadcrumbs { Line 398  sub category_breadcrumbs {
                     $catlinks .= '<option value="">'.&mt('De-select').'</option>';                      $catlinks .= '<option value="">'.&mt('De-select').'</option>';
                     for (my $j=0; $j<@{$cats[$shallower]{$container}}; $j++) {                      for (my $j=0; $j<@{$cats[$shallower]{$container}}; $j++) {
                         my $name = $cats[$shallower]{$container}[$j];                          my $name = $cats[$shallower]{$container}[$j];
                         my $item = &escape($name).':'.&escape($container).':'.$shallower;                          my $item = &escape($name).':'.$container.':'.$shallower;
                         my $selected = '';                          my $selected = '';
                         if ($item eq $env{'form.currcat_'.$shallower}) {                          if ($item eq $env{'form.currcat_'.$shallower}) {
                             $selected = ' selected="selected"';                              $selected = ' selected="selected"';
Line 657  sub print_course_listing { Line 653  sub print_course_listing {
         if (keys(%courses) == 0) {          if (keys(%courses) == 0) {
             if ($env{'form.currcat_0'} eq 'communities::0') {              if ($env{'form.currcat_0'} eq 'communities::0') {
                 $output .= &mt('The courseID provided does not match a community in this domain.');                  $output .= &mt('The courseID provided does not match a community in this domain.');
             } else {              } else { 
                 $output .= &mt('The courseID provided does not match a course in this domain.');                  $output .= &mt('The courseID provided does not match a course in this domain.');
             }              }
             return $output;              return $output;
Line 1006  sub courseinfo_row { Line 1002  sub courseinfo_row {
         if ($details) {          if ($details) {
             if ($env{'form.currcat_0'} eq 'communities::0') {              if ($env{'form.currcat_0'} eq 'communities::0') {
                 $output .= '<td>'.$accessdates.'</td>';                  $output .= '<td>'.$accessdates.'</td>';
             } else {              } else { 
                 $output .=                  $output .=
                     '<td>'.$accessdates.'</td>'.                      '<td>'.$accessdates.'</td>'. 
                     '<td>'.$counts.'</td>'.                      '<td>'.$counts.'</td>'.
                     '<td>'.$autoenrollment.'</td>';                      '<td>'.$autoenrollment.'</td>';
             }              }

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


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