Diff for /loncom/interface/lonparmset.pm between versions 1.277 and 1.280

version 1.277, 2006/03/04 22:17:36 version 1.280, 2006/03/16 20:38:19
Line 580  sub plink { Line 580  sub plink {
  &valout($value,$type).'</a></td></tr></table>';   &valout($value,$type).'</a></td></tr></table>';
 }  }
   
 sub startpage {  sub page_js {
     my $r=shift;  
     my $loaditems = qq|onUnload="pclose()" onLoad="group_or_section('cgroup')"|;  
     my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','',  
                                             $loaditems);  
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Table Mode Parameter Setting');  
     my $selscript=&Apache::loncommon::studentbrowser_javascript();      my $selscript=&Apache::loncommon::studentbrowser_javascript();
     my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();      my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition();
     my $html=&Apache::lonxml::xmlbegin();  
     $r->print(<<ENDHEAD);      return(<<ENDJS);
 $html  <script type="text/javascript">
 <head>  
 <title>LON-CAPA Course Parameters</title>  
 <script>  
   
     function pclose() {      function pclose() {
         parmwin=window.open("/adm/rat/empty.html","LONCAPAparms",          parmwin=window.open("/adm/rat/empty.html","LONCAPAparms",
Line 635  $html Line 628  $html
     }      }
 </script>  </script>
 $selscript  $selscript
 </head>  ENDJS
   
   }
   sub startpage {
       my ($r) = @_;
       my $html = &Apache::lonxml::xmlbegin();
       my $head = &Apache::loncommon::head('LON-CAPA Course Parameters',
    &page_js());
       my $loaditems = 
    qq|onUnload="pclose()" onLoad="group_or_section('cgroup')"|;
   
       my $bodytag=&Apache::loncommon::bodytag('Set/Modify Course Parameters','',
                                               $loaditems);
       my $breadcrumbs = 
    &Apache::lonhtmlcommon::breadcrumbs(undef,
       'Table Mode Parameter Setting');
       $r->print(<<ENDHEAD);
   $html
   $head
 $bodytag  $bodytag
 $breadcrumbs  $breadcrumbs
 <form method="post" action="/adm/parmset?action=settable" name="parmform">  <form method="post" action="/adm/parmset?action=settable" name="parmform">
 <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" />
 <input type="hidden" value='1' name="prevvisit">  <input type="hidden" value='1' name="prevvisit" />
 ENDHEAD  ENDHEAD
 }  }
   
Line 1947  ENDMAPONE Line 1958  ENDMAPONE
             $r->print("</table></center>");              $r->print("</table></center>");
         } # end of $parmlev eq general          } # end of $parmlev eq general
     }      }
     $r->print('</form></body></html>');      $r->print('</form>'.&Apache::loncommon::end_page());
 } # end sub assessparms  } # end sub assessparms
   
   
Line 1972  Returns: nothing Line 1983  Returns: nothing
 sub crsenv {  sub crsenv {
     my $r=shift;      my $r=shift;
     my $setoutput='';      my $setoutput='';
     my $bodytag=&Apache::loncommon::bodytag(  
                              'Set Course Environment Parameters');  
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,      my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,
     'Edit Course Environment');      'Edit Course Environment');
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
Line 2197  sub crsenv { Line 2207  sub crsenv {
      'disableexampointprint'       'disableexampointprint'
          => '<b>'.&mt('Disable automatically printing point values onto exams.').'</b><br />'.           => '<b>'.&mt('Disable automatically printing point values onto exams.').'</b><br />'.
                     ' ('.&mt('"[_1]" to disable, anything else if not','<tt>yes</tt>').')',                      ' ('.&mt('"[_1]" to disable, anything else if not','<tt>yes</tt>').')',
                'externalsyllabus'
                    => '<b>'.&mt('URL of Syllabus (not using internal handler)').'</b>',
      'tthoptions'       'tthoptions'
          => '<b>'.&mt('Default set of options to pass to tth/m when converting tex').'</b>'           => '<b>'.&mt('Default set of options to pass to tth/m when converting tex').'</b>'
              );                ); 
         my @Display_Order = ('url','description','courseid','cloners','grading',          my @Display_Order = ('url','description','courseid','cloners','grading',
                                'externalsyllabus',
                              'default_xml_style','pageseparators',                               'default_xml_style','pageseparators',
                              'question.email','comment.email','policy.email',                               'question.email','comment.email','policy.email',
                              'student_classlist_view',                               'student_classlist_view',
Line 2279  sub crsenv { Line 2292  sub crsenv {
     my $Parameter=&mt('Parameter');      my $Parameter=&mt('Parameter');
     my $Value=&mt('Value');      my $Value=&mt('Value');
     my $Set=&mt('Set');      my $Set=&mt('Set');
     my $browse_js=&Apache::loncommon::browser_and_searcher_javascript('parmset');      my $browse_js=
    '<script type="text/javascript" language="Javascript">'.
    &Apache::loncommon::browser_and_searcher_javascript('parmset').
    '</script>';
       
     my $html=&Apache::lonxml::xmlbegin();      my $html=&Apache::lonxml::xmlbegin();
     $r->print(<<ENDenv);      my $start_page = 
 $html   &Apache::loncommon::start_page('Set Course Environment Parameters',
 <head>         $browse_js);
 <script type="text/javascript" language="Javascript" >      my $end_page = 
 $browse_js   &Apache::loncommon::end_page();
 </script>      $r->print(<<ENDENV);
 <title>LON-CAPA Course Environment</title>  $start_page
 </head>  
 $bodytag  
 $breadcrumbs  $breadcrumbs
 <form method="post" action="/adm/parmset?action=crsenv" name="envform">  <form method="post" action="/adm/parmset?action=crsenv" name="envform">
 $setoutput  $setoutput
Line 2300  $output Line 2315  $output
 </table>  </table>
 <input type="submit" name="crsenv" value="$lt{'sce'}">  <input type="submit" name="crsenv" value="$lt{'sce'}">
 </form>  </form>
 </body>  $end_page
 </html>      ENDENV
 ENDenv  
 }  }
 ##################################################  ##################################################
 # Overview mode  # Overview mode
Line 2620  sub listdata { Line 2634  sub listdata {
 }  }
   
 sub newoverview {  sub newoverview {
     my $r=shift;      my ($r) = @_;
     my $bodytag=&Apache::loncommon::bodytag('Set Parameters');  
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};      my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
       my $start_page = &Apache::loncommon::start_page('Set Parameters');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Overview');      my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Overview');
     my $html=&Apache::lonxml::xmlbegin();  
     $r->print(<<ENDOVER);      $r->print(<<ENDOVER);
 $html  $start_page
 <head>  
 <title>LON-CAPA Parameters</title>  
 </head>  
 $bodytag  
 $breadcrumbs  $breadcrumbs
 <form method="post" action="/adm/parmset?action=newoverview" name="parmform">  <form method="post" action="/adm/parmset?action=newoverview" name="parmform">
 ENDOVER  ENDOVER
Line 2739  ENDOVER Line 2749  ENDOVER
     }      }
     $r->print(&tableend().      $r->print(&tableend().
      ((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Store').'" /></p>':'').       ((($env{'form.store'}) || ($env{'form.dis'}))?'<p><input type="submit" name="store" value="'.&mt('Store').'" /></p>':'').
       '</form></body></html>');        '</form>'.&Apache::loncommon::end_page());
 }  }
   
 sub secgroup_lister {  sub secgroup_lister {
Line 2778  sub secgroup_lister { Line 2788  sub secgroup_lister {
 }  }
   
 sub overview {  sub overview {
     my $r=shift;      my ($r) = @_;
     my $bodytag=&Apache::loncommon::bodytag('Modify Parameters');  
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
     my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};      my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
   
       my $start_page=&Apache::loncommon::start_page('Modify Parameters');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Overview');      my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Overview');
     my $html=&Apache::lonxml::xmlbegin();  
     $r->print(<<ENDOVER);      $r->print(<<ENDOVER);
 $html  $start_page
 <head>  
 <title>LON-CAPA Parameters</title>  
 </head>  
 $bodytag  
 $breadcrumbs  $breadcrumbs
 <form method="post" action="/adm/parmset?action=setoverview" name="parmform">  <form method="post" action="/adm/parmset?action=setoverview" name="parmform">
 ENDOVER  ENDOVER
Line 2811  ENDOVER Line 2817  ENDOVER
     my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder);      my $foundkeys=&listdata($r,$resourcedata,$resourcedata,$sortorder);
   
     $r->print(&tableend().'<p>'.      $r->print(&tableend().'<p>'.
  ($foundkeys?'<input type="submit" value="'.&mt('Modify Parameters').'" />':&mt('There are no parameters.')).'</p></form></body></html>');   ($foundkeys?'<input type="submit" value="'.&mt('Modify Parameters').'" />':&mt('There are no parameters.')).'</p></form>'.
         &Apache::loncommon::end_page());
 }  }
   
 ##################################################  ##################################################
Line 2960  Output html header for page Line 2967  Output html header for page
 ##################################################  ##################################################
 ##################################################  ##################################################
 sub header {  sub header {
     my $html=&Apache::lonxml::xmlbegin();      return &Apache::loncommon::start_page('Parameter Manager');
     my $bodytag=&Apache::loncommon::bodytag('Parameter Manager');  
     my $title = &mt('LON-CAPA Parameter Manager');  
     return(<<ENDHEAD);  
 $html  
 <head>  
 <title>$title</title>  
 </head>  
 $bodytag  
 ENDHEAD  
 }  }
 ##################################################  ##################################################
 ##################################################  ##################################################
Line 3079  sub setrestrictmeta { Line 3077  sub setrestrictmeta {
     my $output;      my $output;
     my $item_num;      my $item_num;
     my $put_result;      my $put_result;
     $r->print(&Apache::lonxml::xmlbegin());      
     $r->print('<head>      $r->print(&Apache::loncommon::start_page('Restrict Metadata'));
             <title>LON-CAPA Restrict Metadata</title>  
             </head>');  
     $r->print(&Apache::loncommon::bodytag('Restrict Metadata'));  
     $r->print(&Apache::lonhtmlcommon::breadcrumbs(undef,      $r->print(&Apache::lonhtmlcommon::breadcrumbs(undef,
     'Restrict Metadata'));      'Restrict Metadata'));
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
Line 3131  sub setrestrictmeta { Line 3126  sub setrestrictmeta {
         <input type="submit" name="restrictmeta" value="Update Metadata Restrictions">          <input type="submit" name="restrictmeta" value="Update Metadata Restrictions">
         </form>          </form>
 ENDenv  ENDenv
     $r->print('</body>      $r->print(&Apache::loncommon::end_page());
                 </html>');  
     return 'ok';      return 'ok';
 }  }
 ##################################################  ##################################################
   
 sub defaultsetter {  sub defaultsetter {
     my $r=shift;      my ($r) = @_;
     my $bodytag=&Apache::loncommon::bodytag('Parameter Setting Default Actions');  
     my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};      my $start_page = 
     my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};   &Apache::loncommon::start_page('Parameter Setting Default Actions');
     my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Defaults');      my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs(undef,'Defaults');
     my $html=&Apache::lonxml::xmlbegin();  
     $r->print(<<ENDDEFHEAD);      $r->print(<<ENDDEFHEAD);
 $html  $start_page
 <head>  
 <title>LON-CAPA Parameters</title>  
 </head>  
 $bodytag  
 $breadcrumbs  $breadcrumbs
 <form method="post" action="/adm/parmset?action=setdefaults" name="defaultform">  <form method="post" action="/adm/parmset?action=setdefaults" name="defaultform">
 ENDDEFHEAD  ENDDEFHEAD
   
       my $dom = $env{'course.'.$env{'request.course.id'}.'.domain'};
       my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
     my @ids=();      my @ids=();
     my %typep=();      my %typep=();
     my %keyp=();      my %keyp=();
Line 3289  ENDYESNO Line 3281  ENDYESNO
         $r->print('</td></tr>');          $r->print('</td></tr>');
     }      }
     $r->print("</table>\n<input type='submit' name='storerules' value='".      $r->print("</table>\n<input type='submit' name='storerules' value='".
       &mt('Store Rules')."' /></form>\n</body>\n</html>");        &mt('Store Rules')."' /></form>\n".
         &Apache::loncommon::end_page());
     return;      return;
 }  }
   

Removed from v.1.277  
changed lines
  Added in v.1.280


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