Diff for /rat/lonratparms.pm between versions 1.25 and 1.29

version 1.25, 2008/11/11 16:40:38 version 1.29, 2011/12/08 22:11:48
Line 26 Line 26
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
   
 =head1 NAME  
   
 Apache::lonratparams  
   
 =head1 SYNOPSIS  
   
 Handler to set resource parameters inside of  
 the RAT based on metadata.  
   
 This is part of the LearningOnline Network with CAPA project  
 described at http://www.lon-capa.org.  
   
 =head1 HANDLER SUBROUTINE  
   
 handler()  
   
 =head1 OTHER SUBROUTINES  
   
 =over  
   
 =item *  
   
 none  
   
 =back  
   
 =cut  
   
 package Apache::lonratparms;  package Apache::lonratparms;
   
 use strict;  use strict;
Line 108  sub handler { Line 80  sub handler {
     my %lt=&Apache::lonlocal::texthash('pa' => 'Parameter',      my %lt=&Apache::lonlocal::texthash('pa' => 'Parameter',
                'de' => 'Default',                 'de' => 'Default',
        'va' => 'Value',         'va' => 'Value',
        'se' => 'Set');         'se' => 'Set?');
     my $js = (<<ENDHEADER);      my $js = (<<ENDHEADER);
 <script type="text/javascript">  <script type="text/javascript">
   
     function pclose() {  
         parmwin=window.open("/adm/rat/empty.html","LONCAPAparms",  
                  "height=350,width=350,scrollbars=no,menubar=no");  
         parmwin.close();  
     }  
   
     $pjump_def      $pjump_def
   
     function stpr() {      function stpr() {
         eval("document.parameters."+document.parameters.pres_marker.value+          eval("document.parameters."+document.parameters.pres_marker.value+
             ".value=document.parameters.pres_value.value");              ".value=document.parameters.pres_value.value");
         pclose();          modalWindow.close();
     }      }
   
   
Line 148  ENDHEADER Line 114  ENDHEADER
     $r->print(<<ENDDOCUMENT);      $r->print(<<ENDDOCUMENT);
 $start_page  $start_page
 <form action="javascript:setparms();" method="post" name="parameters">  <form action="javascript:setparms();" method="post" name="parameters">
 <input type="hidden" value='' name="pres_value">  <input type="hidden" value="" name="pres_value" />
 <input type="hidden" value='' name="pres_type">  <input type="hidden" value="" name="pres_type" />
 <input type="hidden" value='' name="pres_marker">  <input type="hidden" value="" name="pres_marker" />
 <table border=2>  <table border="2">
 <tr><th>$lt{'pa'}</th><th>$lt{'de'}</th><th>$lt{'va'}</th><th>$lt{'se'}?</th></tr>  <tr><th>$lt{'pa'}</th><th>$lt{'de'}</th><th>$lt{'va'}</th><th>$lt{'se'}</th></tr>
 ENDDOCUMENT  ENDDOCUMENT
   
 ###    %display=&Apache::lonlocal::texthash(%display);  ###    %display=&Apache::lonlocal::texthash(%display);
Line 162  ENDDOCUMENT Line 128  ENDDOCUMENT
         # Should if(defined($value{$key})) be if(exists($value{$key})) ?          # Should if(defined($value{$key})) be if(exists($value{$key})) ?
         if (defined($value{$key})) { $cur=$value{$key}; };          if (defined($value{$key})) { $cur=$value{$key}; };
         $r->print(<<"END");          $r->print(<<"END");
 <tr><td><b>$display{$key}</b><br><tt>$key</tt></td>  <tr><td><b>$display{$key}</b><br /><tt>$key</tt></td>
 <td>&nbsp;$content{$key}</td>  <td>&nbsp;$content{$key}</td>
 <td><input type="text" size="10" name="$key" value="$cur">&nbsp;  <td><input type="text" size="10" name="$key" value="$cur" />&nbsp;
 <a href='javascript:pjump("$type{$key}","$display{$key}",document.parameters.$key.value,"$key","parameters.pres","stpr");'>$enter</a></td>  <a href='javascript:pjump("$type{$key}","$display{$key}",document.parameters.$key.value,"$key","parameters.pres","stpr");'>$enter</a></td>
 <td><input type="checkbox" name="def_$key"   <td><input type="checkbox" name="def_$key" 
 END  END
         if ($value{$key}) { $r->print(' checked'); }          if ($value{$key}) { $r->print(' checked="checked"'); }
         $r->print('></td></tr>');          $r->print(' /></td></tr>');
     }      }
     $r->print('</table><br />      $r->print('</table><br />
                <input type="submit" value="'.&mt('Set').'"></form>'.                 <input type="submit" value="'.&mt('Set').'" /></form>'.
       &Apache::loncommon::end_page());        &Apache::loncommon::end_page());
     return OK;      return OK;
 }   } 
Line 180  END Line 146  END
 1;  1;
 __END__  __END__
   
   
   
   =head1 NAME
   
   Apache::lonratparams
   
   =head1 SYNOPSIS
   
   Handler to set resource parameters inside of
   the RAT based on metadata.
   
   This is part of the LearningOnline Network with CAPA project
   described at http://www.lon-capa.org.
   
   =head1 HANDLER SUBROUTINE
   
   handler()
   
   =head1 OTHER SUBROUTINES
   
   =over
   
   =item *
   
   none
   
   =back
   
   =cut
   

Removed from v.1.25  
changed lines
  Added in v.1.29


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