Diff for /loncom/interface/lonparmset.pm between versions 1.291 and 1.292

version 1.291, 2006/04/17 21:28:50 version 1.292, 2006/04/18 02:13:49
Line 3053  ENDMAINFORMHEAD Line 3053  ENDMAINFORMHEAD
             action => 'setdefaults',              action => 'setdefaults',
             permission => $parm_permission,              permission => $parm_permission,
             },                        },          
   { text => 'Parameter Change Log and Course Blog Posting',    { text => 'Parameter Change Log and Course Blog Posting/User Notification',
             action => 'parameterchangelog',              action => 'parameterchangelog',
             permission => $parm_permission,              permission => $parm_permission,
             },              },
Line 3355  sub components { Line 3355  sub components {
     return ($realm,$section,$name,$part,$typeflag,      return ($realm,$section,$name,$part,$typeflag,
     $what,$middle,$uname,$udom,$issection);      $what,$middle,$uname,$udom,$issection);
 }  }
   sub standard_parameter_names {
       my ($name)=@_;
       my %standard_parms=&Apache::lonlocal::texthash('duedate' => 'Due Date',
      'answerdate' => 'Answer Date',
      'opendate' => 'Open Date',
      'maxtries' => 'Max. Number of Tries',
      'weight' => 'Weight',
      'date_start' => 'Starting Date',
      'date_end' => 'Ending Date');
       if ($standard_parms{$name}) {
    return $standard_parms{$name}; 
       } else { 
    return $name; 
       }
   }
   
 sub parm_change_log {  sub parm_change_log {
     my ($r)=@_;      my ($r)=@_;
Line 3406  sub parm_change_log { Line 3421  sub parm_change_log {
     if ($typeflag) { $istype{$parmname}=$value; }      if ($typeflag) { $istype{$parmname}=$value; }
     if ($makenewrow) { $r->print('<tr>'); } else { $makenewrow=1; }      if ($makenewrow) { $r->print('<tr>'); } else { $makenewrow=1; }
     $r->print('<td>'.$realm.'</td><td>'.$section.'</td><td>'.      $r->print('<td>'.$realm.'</td><td>'.$section.'</td><td>'.
       &mt('Part: [_1]',$part).'</td><td>');        &standard_parameter_names($parmname).'</td><td>'.
         ($part?&mt('Part: [_1]',$part):&mt('All Parts')).'</td><td>');
     my $stillactive=0;      my $stillactive=0;
     if ($parmlog{$id.'_deleteflag'}) {      if ($parmlog{$id.'_deleteflag'}) {
  $r->print(&mt('Deleted'));   $r->print(&mt('Deleted'));
     } else {      } else {
  if ($typeflag) {   if ($typeflag) {
     $r->print(&mt('Type: [_1]',$value));      $r->print(&mt('Type: [_1]',&standard_parameter_names($value)));
  } else {   } else {
     my ($level,@all)=&parmval_by_symb($what,$middle,&Apache::lonnet::metadata($middle,$what),      my ($level,@all)=&parmval_by_symb($what,$middle,&Apache::lonnet::metadata($middle,$what),
       $uname,$udom,$issection,$issection,$courseopt);        $uname,$udom,$issection,$issection,$courseopt);
Line 3430  sub parm_change_log { Line 3446  sub parm_change_log {
     }      }
     $r->print('</td>');      $r->print('</td>');
     if ($stillactive) {      if ($stillactive) {
  $r->print('<td>Notify Link</td>');   if (($uname) && ($udom)) {
       $r->print('<td>Notify Link</td>');
    } else {
       $r->print('<td>Blog Link</td>');
    }
     } else {      } else {
  $r->print('<td>&nbsp;</td>');   $r->print('<td>&nbsp;</td>');
     }      }
Line 3535  sub handler { Line 3555  sub handler {
     &assessparms($r);      &assessparms($r);
         } elsif ($env{'form.action'} eq 'parameterchangelog' && $parm_permission) {          } elsif ($env{'form.action'} eq 'parameterchangelog' && $parm_permission) {
             &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable',              &Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/parmset?action=settable',
     text=>"Parameter Change Log and Course Blog Posting"});      text=>"Parameter Change Log"});
     &parm_change_log($r);      &parm_change_log($r);
  }          }       
     } else {      } else {

Removed from v.1.291  
changed lines
  Added in v.1.292


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