Diff for /loncom/interface/coursecatalog.pm between versions 1.73 and 1.77

version 1.73, 2013/03/01 18:09:16 version 1.77, 2013/12/30 01:33:21
Line 66  sub handler { Line 66  sub handler {
     }      }
     my $formname = 'coursecatalog';      my $formname = 'coursecatalog';
     if ($env{'form.showdom'} ne '') {      if ($env{'form.showdom'} ne '') {
           $env{'form.showdom'} = &LONCAPA::clean_domain($env{'form.showdom'});
         if (&Apache::lonnet::domain($env{'form.showdom'}) ne '') {          if (&Apache::lonnet::domain($env{'form.showdom'}) ne '') {
             $codedom = $env{'form.showdom'};              $codedom = $env{'form.showdom'};
           } else {
               $env{'form.showdom'} = '';
         }          }
     }      }
     my $domdesc = &Apache::lonnet::domain($codedom,'description');      my $domdesc = &Apache::lonnet::domain($codedom,'description');
     &Apache::lonhtmlcommon::clear_breadcrumbs();      &Apache::lonhtmlcommon::clear_breadcrumbs();
   
       if ($env{'form.catalog_maxdepth'} ne '') {
           $env{'form.catalog_maxdepth'} =~ s{\D}{}g;
       }
   
     my %domconfig =      my %domconfig =
         &Apache::lonnet::get_dom('configuration',['coursecategories'],$codedom);          &Apache::lonnet::get_dom('configuration',['coursecategories'],$codedom);
     my (@cats,@trails,%allitems,%idx,@jsarray,%subcathash,$cathash);      my (@cats,@trails,%allitems,%idx,@jsarray,%subcathash,$cathash);
Line 631  sub additional_filters { Line 638  sub additional_filters {
                                ' />'.$title.'</label></span>';                                 ' />'.$title.'</label></span>';
                     if ($type eq 'Previous') {                      if ($type eq 'Previous') {
                         my %milestonetext = &Apache::lonlocal::texthash (                          my %milestonetext = &Apache::lonlocal::texthash (
                             accessend => 'prior to default end access date',                              accessend => 'immediately prior to default end access date',
                             enrollend => 'prior to end date for auto-enrollment',                              enrollend => 'immediately prior to end date for auto-enrollment',
                             date      => 'prior to specific date:',                              date      => 'immediately prior to specific date:',
                         );                          );
                         my @statuses = &Apache::loncommon::get_env_multiple('form.showcounts');                          my @statuses = &Apache::loncommon::get_env_multiple('form.showcounts');
                         $output .= '<span id="choosewasacctext">';                          $output .= '<span id="choosewasacctext" class="LC_nobreak">';
                         if ($checked) {                          if ($checked) {
                             $output .= &get_wasactive_text();                              $output .= &get_wasactive_text();
                         }                          }
Line 734  sub get_statustitles { Line 741  sub get_statustitles {
 sub get_wasactive_text {  sub get_wasactive_text {
     my $wasacctext = ' -- ';      my $wasacctext = ' -- ';
     if ($env{'form.currcat_0'} eq 'communities::0') {      if ($env{'form.currcat_0'} eq 'communities::0') {
         $wasacctext .= &mt('where members had access ...');          $wasacctext .= &mt('where member access status was current ...');
     } else {      } else {
         $wasacctext .= &mt('where students had access ...');          $wasacctext .= &mt('where student access status was current ...');
     }      }
     return $wasacctext;      return $wasacctext;
 }  }
Line 944  sub construct_data_table { Line 951  sub construct_data_table {
     $output .= '<th>'.&mt('Self-enroll (if permitted)').'</th>';      $output .= '<th>'.&mt('Self-enroll (if permitted)').'</th>';
     &Apache::loncommon::end_data_table_header_row();      &Apache::loncommon::end_data_table_header_row();
     my (%numbers,%creditsum);      my (%numbers,%creditsum);
     my ($showcredits,$defofficial,$defunofficial);      my ($showcredits,$defofficial,$defunofficial,$deftextbook);
     my %domdefaults = &Apache::lonnet::get_domain_defaults($domain);      my %domdefaults = &Apache::lonnet::get_domain_defaults($domain);
     unless ($env{'form.currcat_0'} eq 'communities::0') {      unless ($env{'form.currcat_0'} eq 'communities::0') {
         if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'}) {          if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'} || $domdefaults{'textbookcredits'}) {
             $showcredits = 1;              $showcredits = 1;
             $defofficial = $domdefaults{'officialcredits'};              $defofficial = $domdefaults{'officialcredits'};
             $defunofficial = $domdefaults{'unofficialcredits'};               $defunofficial = $domdefaults{'unofficialcredits'};
               $deftextbook = $domdefaults{'textbookcredits'};
         }          }
     }      }
     my %courseinfo = &build_courseinfo_hash($courses,$knownuser,$domain,$details,      my %courseinfo = &build_courseinfo_hash($courses,$knownuser,$domain,$details,
                                             $usersections,\@fields,\%fieldtitles,                                              $usersections,\@fields,\%fieldtitles,
                                             $wasactiveon,\%numbers,\%creditsum,                                              $wasactiveon,\%numbers,\%creditsum,
                                             $showcredits,$defofficial,$defunofficial);                                              $showcredits,$defofficial,$defunofficial,$deftextbook);
     my %Sortby;      my %Sortby;
     foreach my $course (sort(keys(%{$courses}))) {      foreach my $course (sort(keys(%{$courses}))) {
         if ($env{'form.sortby'} eq 'code') {          if ($env{'form.sortby'} eq 'code') {

Removed from v.1.73  
changed lines
  Added in v.1.77


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