Diff for /loncom/interface/lonparmset.pm between versions 1.229 and 1.230

version 1.229, 2005/06/18 17:23:25 version 1.230, 2005/06/18 18:51:50
Line 525  sub plink { Line 525  sub plink {
         }          }
     }      }
     my ($parmname)=((split(/\&/,$marker))[1]=~/\_([^\_]+)$/);      my ($parmname)=((split(/\&/,$marker))[1]=~/\_([^\_]+)$/);
     &Apache::lonnet::logthis($marker.'-'.$parmname);  
     my ($hour,$min,$sec,$val)=&preset_defaults($parmname);      my ($hour,$min,$sec,$val)=&preset_defaults($parmname);
     unless (defined($winvalue)) { $winvalue=$val; }      unless (defined($winvalue)) { $winvalue=$val; }
     return       return 
Line 2223  sub listdata { Line 2222  sub listdata {
  $oldpart=$part;   $oldpart=$part;
     }      }
 #  #
   # Preset defaults?
   #
               my ($hour,$min,$sec,$val)=('','','','');
       unless ($$resourcedata{$thiskey}) {
    my ($parmname)=($thiskey=~/\.(\w+)$/);
    ($hour,$min,$sec,$val)=&preset_defaults($parmname);
       }
   
   #
 # Ready to print  # Ready to print
 #  #
     $r->print(&tablestart().'<tr><td><b>'.$name.      $r->print(&tablestart().'<tr><td><b>'.$name.
Line 2236  sub listdata { Line 2244  sub listdata {
   &Apache::lonhtmlcommon::date_setter('overviewform',    &Apache::lonhtmlcommon::date_setter('overviewform',
       $jskey,        $jskey,
       $$resourcedata{$thiskey},        $$resourcedata{$thiskey},
       '',1).        '',1,'','',$hour,$min,$sec).
 '<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />'  '<input type="hidden" name="datepointer_'.$thiskey.'" value="'.$jskey.'" />'
   );    );
     } elsif ($thistype eq 'string_yesno') {      } elsif ($thistype eq 'string_yesno') {
    my $showval;
    if (defined($$resourcedata{$thiskey})) {
       $showval=$$resourcedata{$thiskey};
    } else {
       $showval=$val;
    }
  $r->print('<label><input type="radio" name="set_'.$thiskey.   $r->print('<label><input type="radio" name="set_'.$thiskey.
   '" value="yes"');    '" value="yes"');
  if ($$resourcedata{$thiskey} eq 'yes') {   if ($showval eq 'yes') {
     $r->print(' checked="checked"');      $r->print(' checked="checked"');
  }   }
                 $r->print(' />'.&mt('Yes').'</label> ');                  $r->print(' />'.&mt('Yes').'</label> ');
  $r->print('<label><input type="radio" name="set_'.$thiskey.   $r->print('<label><input type="radio" name="set_'.$thiskey.
   '" value="no"');    '" value="no"');
  if ($$resourcedata{$thiskey} eq 'no') {   if ($showval eq 'no') {
     $r->print(' checked="checked"');      $r->print(' checked="checked"');
  }   }
                 $r->print(' />'.&mt('No').'</label>');                  $r->print(' />'.&mt('No').'</label>');
     } else {      } else {
    my $showval;
    if (defined($$resourcedata{$thiskey})) {
       $showval=$$resourcedata{$thiskey};
    } else {
       $showval=$val;
    }
  $r->print('<input type="text" name="set_'.$thiskey.'" value="'.   $r->print('<input type="text" name="set_'.$thiskey.'" value="'.
   $$resourcedata{$thiskey}.'">');    $showval.'">');
     }      }
     $r->print('<input type="hidden" name="typeof_'.$thiskey.'" value="'.      $r->print('<input type="hidden" name="typeof_'.$thiskey.'" value="'.
       $thistype.'">');        $thistype.'">');
Line 2278  $html Line 2298  $html
 </head>  </head>
 $bodytag  $bodytag
 $breadcrumbs  $breadcrumbs
 <form method="post" action="/adm/parmset?action=newoverview" name="parmform">  <form method="post" action="/adm/parmset?action=newoverview" name="overviewform">
 ENDOVER  ENDOVER
     my @ids=();      my @ids=();
     my %typep=();      my %typep=();

Removed from v.1.229  
changed lines
  Added in v.1.230


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