Diff for /loncom/interface/lonannounce.pm between versions 1.27 and 1.31

version 1.27, 2004/02/17 01:46:34 version 1.31, 2004/08/27 21:41:39
Line 47  sub editfield { Line 47  sub editfield {
     my $enddateform = &Apache::lonhtmlcommon::date_setter('anno',      my $enddateform = &Apache::lonhtmlcommon::date_setter('anno',
                                                           'enddate',                                                            'enddate',
                                                           $end);                                                            $end);
     my $help=&Apache::loncommon::help_open_topic('Calendar_Add_Announcement').      my $help=&Apache::loncommon::help_open_menu('','Calendar Add Announcement','Calendar_Add_Announcement','',274,'Communication Tools');
  &Apache::loncommon::help_open_faq(274).  
  &Apache::loncommon::help_open_bug('Communication Tools');  
     $r->print(<<ENDFORM);      $r->print(<<ENDFORM);
 $help  $help
 <form name="anno" method="post">  <form name="anno" method="post">
Line 81  sub readcalendar { Line 79  sub readcalendar {
     ($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);      ($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);
  my $section=&mt('All Students');   my $section=&mt('All Students');
  if ($middle=~/^\[(.*)\]\./) {   if ($middle=~/^\[(.*)\]\./) {
       my $sec=$1;
       # if we have a section don't show ones that aren't ours
       if ($ENV{'request.course.sec'} &&
    $ENV{'request.course.sec'} ne $sec) { next; }
       # if a student without a section don't show any section ones
       if (!$ENV{'request.role.adv'} &&
    !$ENV{'request.course.sec'}) { next; }
     $section=&mt('Group/Section').': '.$1;      $section=&mt('Group/Section').': '.$1;
     $middle=~s/^\[(.*)\]\.//;      $middle=~s/^\[(.*)\]\.//;
  }   }
Line 92  sub readcalendar { Line 97  sub readcalendar {
     $realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle);      $realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle);
  }   }
  my $datetype='';   my $datetype='';
  if ($name eq 'duedate') { $datetype=&mt('Due'); }   if ($name eq 'duedate') { 
       $datetype=&mt('Due'); 
   # see if accidentally answerdate is before duedate
       my $answerkey=$thiskey;
       $answerkey=~s/duedate$/answerdate/;
       if ($resourcedata{$thiskey}>$resourcedata{$answerkey}) {
    $datetype='Due and Answer Available';
       }
    }
  if ($name eq 'opendate') { $datetype=&mt('Opening'); }   if ($name eq 'opendate') { $datetype=&mt('Opening'); }
  if ($name eq 'answerdate') { $datetype=&mt('Answer Available'); }   if ($name eq 'answerdate') {
   # see if accidentally answerdate is before duedate
       my $duekey=$thiskey;
       $duekey=~s/answerdate$/duedate/;
       if ($resourcedata{$duekey}>$resourcedata{$thiskey}) {
   # forget it
    next;
       } 
       $datetype=&mt('Answer Available'); 
    }
  $returnhash{$courseid.'@'.$resourcedata{$thiskey}.'_'.   $returnhash{$courseid.'@'.$resourcedata{$thiskey}.'_'.
     $resourcedata{$thiskey}}=      $resourcedata{$thiskey}}=
     'INTERNAL:'.$datetype.': '.$realm.' ('.$section.')';      'INTERNAL:'.$datetype.': '.$realm.' ('.$section.')';
Line 142  sub normalcell { Line 164  sub normalcell {
        substr($msg,0,20).'...</a><br />';         substr($msg,0,20).'...</a><br />';
        }         }
     }      }
     return '<td'.      return '<td valign="top"'.
  ((($day eq $todayhash{'day'}) &&   ((($day eq $todayhash{'day'}) &&
           ($month eq $todayhash{'month'}) &&            ($month eq $todayhash{'month'}) &&
           ($year eq $todayhash{'year'}))?' bgcolor="#FFFF00"':'').            ($year eq $todayhash{'year'}))?' bgcolor="#FFFF00"':'').
            '>'.&tfont('<b>'.&picklink($day,$day,$month,$year).'</b><br>'.$output).'</td>';             '>'.&tfont('<b>'.&picklink($day,$day,$month,$year).'</b><br />'.$output).'</td>';
 }  }
   
 sub plaincell {  sub plaincell {
Line 298  sub handler { Line 320  sub handler {
        &Apache::loncommon::maketime( 'day' => 1, 'month'=> $month,         &Apache::loncommon::maketime( 'day' => 1, 'month'=> $month,
                                      'year' => $year, 'hours' => 0,                                       'year' => $year, 'hours' => 0,
      'minutes' => 0, 'seconds' => 0,       'minutes' => 0, 'seconds' => 0,
                                      'dlsav' => $todayhash{'dlsav'} ));                                       'dlsav' => -1 ));
     my $weekday=$firstday{'weekday'};      my $weekday=$firstday{'weekday'};
 # ------------------------------------------------------------ Print the screen  # ------------------------------------------------------------ Print the screen
   

Removed from v.1.27  
changed lines
  Added in v.1.31


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