Diff for /loncom/interface/lonnotify.pm between versions 1.20 and 1.24

version 1.20, 2006/07/07 13:43:20 version 1.24, 2006/10/12 22:47:31
Line 27  package Apache::lonnotify; Line 27  package Apache::lonnotify;
 use strict;  use strict;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::loncommon;  use Apache::loncommon;
 use Apache::lonsupportreq;  use Apache::courseclassifier;
 use LONCAPA::Enrollment;  use LONCAPA::Enrollment;
 use Apache::Constants qw(:common :http);  use Apache::Constants qw(:common :http);
 use Apache::lonlocal;  use Apache::lonlocal;
Line 265  ENDSCRIPT Line 265  ENDSCRIPT
     }      }
     $output .= &Apache::loncommon::start_data_table();      $output .= &Apache::loncommon::start_data_table();
     if ($msgcount > 0) {      if ($msgcount > 0) {
         my $rowNum = 0;  
         $output .= &Apache::loncommon::start_data_table_header_row().          $output .= &Apache::loncommon::start_data_table_header_row().
     '<th><a href="javascript:changeSort(\'date\')">Date</a></th>'.      '<th><a href="javascript:changeSort(\'date\')">Date</a></th>'.
     '<th><a href="javascript:changeSort(\'subject\')">Subject</a></th>'.      '<th><a href="javascript:changeSort(\'subject\')">Subject</a></th>'.
Line 380  sub print_selection_form { Line 379  sub print_selection_form {
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
           ({text=>"Select Audience"});            ({text=>"Select Audience"});
   
     $totcodes = &Apache::lonsupportreq::retrieve_instcodes(\%coursecodes,$cdom,$totcodes);      $totcodes = &Apache::courseclassifier::retrieve_instcodes(\%coursecodes,$cdom,$totcodes);
     if ($totcodes > 0) {      if ($totcodes > 0) {
         $format_reply = &Apache::lonnet::auto_instcode_format($caller,$cdom,\%coursecodes,\%codes,\@codetitles,\%cat_titles,\%cat_order);          $format_reply = &Apache::lonnet::auto_instcode_format($caller,$cdom,\%coursecodes,\%codes,\@codetitles,\%cat_titles,\%cat_order);
         if ($format_reply eq 'ok') {          if ($format_reply eq 'ok') {
             my $numtypes = @codetitles;              my $numtypes = @codetitles;
             &Apache::lonsupportreq::build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles);              &Apache::courseclassifier::build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles);
             &Apache::lonsupportreq::javascript_code_selections($formname,$numtypes,\%cat_titles,\$jscript,\%idlist,\%idnums,\%idlist_titles,\@codetitles);              my ($scripttext,$longtitles) = &Apache::courseclassifier::javascript_definitions(\@codetitles,\%idlist,\%idlist_titles,\%idnums,\%cat_titles);
               my $longtitles_str = join('","',@{$longtitles});
               my $allidlist = $idlist{$codetitles[0]};
               $jscript .= &Apache::courseclassifier::courseset_js_start($formname,$longtitles_str,$allidlist);
               $jscript .= $scripttext;
               $jscript .= &Apache::courseclassifier::javascript_code_selections($formname,@codetitles);
         }          }
     }      }
   
Line 499  function goBack(target) { Line 503  function goBack(target) {
     my $coursefilter = $env{'form.coursepick'};      my $coursefilter = $env{'form.coursepick'};
     my %courses = ();      my %courses = ();
     if ($coursefilter eq 'all') {      if ($coursefilter eq 'all') {
         %courses = &Apache::lonnet::courseiddump($cdom,'.','.','.','.','.');          %courses = &Apache::lonnet::courseiddump($cdom,'.','.','.','.','.',
                                                    undef,undef,'Course');
     } elsif ($coursefilter eq 'category') {      } elsif ($coursefilter eq 'category') {
         my $instcode = '';          my $instcode = '';
         my @cats = ('Semester','Year','Department','Number');          my @cats = ('Semester','Year','Department','Number');
Line 513  function goBack(target) { Line 518  function goBack(target) {
         if ($instcode eq '') {          if ($instcode eq '') {
             $instcode = '.';              $instcode = '.';
         }          }
         %courses = &Apache::lonnet::courseiddump($cdom,'.','.',$instcode,'.','.');          %courses = &Apache::lonnet::courseiddump($cdom,'.','.',$instcode,'.','.',
                                                    undef,undef,'Course');
     } elsif ($coursefilter eq 'specific') {      } elsif ($coursefilter eq 'specific') {
         if ($env{'form.coursetotal'} > 1) {          if ($env{'form.coursetotal'} > 1) {
             my @course_ids = split(/&&/,$env{'form.courselist'});              my @course_ids = split(/&&/,$env{'form.courselist'});
Line 606  function goBack(target) { Line 612  function goBack(target) {
  $output .= &Apache::loncommon::start_data_table();   $output .= &Apache::loncommon::start_data_table();
         if (keys(%recipients) > 0) {          if (keys(%recipients) > 0) {
     $output .= &Apache::loncommon::start_data_table_header_row();      $output .= &Apache::loncommon::start_data_table_header_row();
             $output .= '<th>&nbsp;<th>username:domain</th><th>&nbsp;&nbsp;</th><th>'.$lt{'emad'}.'</th>';              $output .= '<th>&nbsp;<th>username:domain</th><th>'.$lt{'emad'}.'</th>';
     $output .= &Apache::loncommon::end_data_table_header_row();      $output .= &Apache::loncommon::end_data_table_header_row();
         }          }
         foreach my $username (sort(keys(%recipients))) {          foreach my $username (sort(keys(%recipients))) {
     $output .= &Apache::loncommon::start_data_table_row();      $output .= &Apache::loncommon::start_data_table_row();
             if ($recipients{$username} =~ /\@/) {              if ($recipients{$username} =~ /\@/) {
                 my $value=&escape($username).':'.&escape($recipients{$username});                  my $value=&escape($username).':'.&escape($recipients{$username});
                 $output .= '<td><input type="checkbox" name="recipient" value="'.$value.'" /></td><td>'.$username.'</td><td>&nbsp;&nbsp;</td><td>'.$recipients{$username}.'</td>';                  $output .= '<td><input type="checkbox" name="recipient" value="'.$value.'" /></td><td>'.$username.'</td><td>'.$recipients{$username}.'</td>';
             }              }
     $output .= &Apache::loncommon::end_data_table_row();      $output .= &Apache::loncommon::end_data_table_row();
         }          }

Removed from v.1.20  
changed lines
  Added in v.1.24


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