Diff for /loncom/interface/lonpickcode.pm between versions 1.8 and 1.9

version 1.8, 2005/12/20 18:54:54 version 1.9, 2006/03/15 22:11:04
Line 60  sub handler { Line 60  sub handler {
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
     return OK if $r->header_only;      return OK if $r->header_only;
     my $html=&Apache::lonxml::xmlbegin();  
     $r->print(<<ENDDOCUMENT);  
 $html  
   <head>  
     <title>The LearningOnline Network with CAPA</title>  
   </head>  
 ENDDOCUMENT  
   
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
     ['curCODE','scantron_selectfile',      ['curCODE','scantron_selectfile',
Line 75  ENDDOCUMENT Line 68  ENDDOCUMENT
   
     if  (!($env{'request.course.id'}) &&       if  (!($env{'request.course.id'}) && 
  (&Apache::lonnet::allowed('usc',$env{'request.course.id'}))) {   (&Apache::lonnet::allowed('usc',$env{'request.course.id'}))) {
  $r->print('<body>Access not allowed.</body>');   $r->print(&Apache::loncommon::start_page().
     &mt('Access not allowed.').
     &Apache::loncommon::end_page());
         return OK;          return OK;
     }      }
     if      ($env{'form.command'} eq 'codelist') {      if      ($env{'form.command'} eq 'codelist') {
Line 85  ENDDOCUMENT Line 80  ENDDOCUMENT
     } else {      } else {
  &picking_a_code($r);   &picking_a_code($r);
     }      }
     $r->print('</body></html>');      $r->print(&Apache::loncommon::end_page());
     return OK;      return OK;
 }  }
   
 sub code_list {  sub code_list {
     my ($r,$secondview)=@_;      my ($r,$secondview)=@_;
     if (!$secondview) {      if (!$secondview) {
  $r->print(&Apache::loncommon::bodytag("View CODEs"));   $r->print(&Apache::loncommon::start_page("View CODEs"));
  $r->print("<p>".&mt('Select a set of saved CODEs to view.')."</p>");   $r->print("<p>".&mt('Select a set of saved CODEs to view.')."</p>");
     } else {      } else {
  $r->print("<p>".&mt('Select another set of saved CODEs to view.')."</p>");   $r->print("<p>".&mt('Select another set of saved CODEs to view.')."</p>");
Line 110  sub code_list { Line 105  sub code_list {
   
 sub show_codes {  sub show_codes {
     my ($r)=@_;      my ($r)=@_;
     $r->print(&Apache::loncommon::bodytag("View CODEs"));      $r->print(&Apache::loncommon::start_page("View CODEs"));
     my %codes=&Apache::grades::get_codes();      my %codes=&Apache::grades::get_codes();
     $r->print("<h2>".$env{'form.scantron_CODElist'}."</h2>");      $r->print("<h2>".$env{'form.scantron_CODElist'}."</h2>");
     $r->print('<pre>');      $r->print('<pre>');
Line 123  sub show_codes { Line 118  sub show_codes {
   
 sub picking_a_code {  sub picking_a_code {
     my ($r)=@_;      my ($r)=@_;
     $r->print(&Apache::loncommon::bodytag("Selecting a CODE"));      $r->print(&Apache::loncommon::start_page("Selecting a CODE"));
     $r->print(<<ENDSCRIPT);      $r->print(<<ENDSCRIPT);
 <script>  <script>
 function gochoose(newcode) {  function gochoose(newcode) {

Removed from v.1.8  
changed lines
  Added in v.1.9


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