Diff for /loncom/interface/lonsupportreq.pm between versions 1.32 and 1.35

version 1.32, 2006/03/23 22:32:11 version 1.35, 2006/05/30 12:46:09
Line 35  use Apache::Constants qw(:common); Line 35  use Apache::Constants qw(:common);
 use Apache::loncommon();  use Apache::loncommon();
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::lonlocal;  use Apache::lonlocal;
   use Apache::lonacc();
   use lib '/home/httpd/lib/perl/';
   use LONCAPA;
    
   
 sub handler {  sub handler {
     my ($r) = @_;      my ($r) = @_;
Line 46  sub handler { Line 50  sub handler {
     }      }
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['origurl','function']);      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['origurl','function']);
     if ($r->uri eq '/adm/helpdesk') {      if ($r->uri eq '/adm/helpdesk') {
         &Apache::loncommon::get_posted_cgi($r);          &Apache::lonacc::get_posted_cgi($r);
     }      }
     my $function = $env{'form.function'};      my $function = $env{'form.function'};
     my $origurl = &Apache::lonnet::unescape($env{'form.origurl'});      my $origurl = &unescape($env{'form.origurl'});
     my $action = $env{'form.action'};      my $action = $env{'form.action'};
   
     if ($action eq 'process') {      if ($action eq 'process') {
Line 197  function initialize_codes() { Line 201  function initialize_codes() {
   
     my $js = '<script type"text/javascript">'."\n$scripttag\n$jscript\n".      my $js = '<script type"text/javascript">'."\n$scripttag\n$jscript\n".
  '</script>';   '</script>';
     my $add_entries =      my %add_entries = (topmargin    => "0",
  'topmargin="0" marginheight="0" onLoad="initialize_codes()"',         marginheight => "0",
          onLoad       =>"initialize_codes()",);
   
     my $start_page =      my $start_page =
  &Apache::loncommon::start_page('Support Request',$js,   &Apache::loncommon::start_page('Support Request',$js,
        { 'function'    => $function,         { 'function'    => $function,
  'add_entries' => $add_entries,   'add_entries' => \%add_entries,
  'only_body'   => 1,});   'only_body'   => 1,});
     $r->print($start_page);      $r->print($start_page);
   
Line 696  Date/Time: $reporttime Line 702  Date/Time: $reporttime
   
     my $start_page =       my $start_page = 
  &Apache::loncommon::start_page('Support request recorded',undef,   &Apache::loncommon::start_page('Support request recorded',undef,
        {'function'   => $function,         {'function'    => $function,
  'addentries' =>    'add_entries' => {
     'topmargin="0" marginheight="0"',      topmargin    => "0",
  'only_body' => 1,});      marginheight => "0",
    },
    'only_body'   => 1,});
   
     $r->print(<<"END");      $r->print(<<"END");
 $start_page  $start_page
Line 971  sub retrieve_instcodes { Line 979  sub retrieve_instcodes {
     my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.','.');      my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.','.');
     foreach my $course (keys %courses) {      foreach my $course (keys %courses) {
         if ($courses{$course} =~ m/^[^:]*:([^:]+)/) {          if ($courses{$course} =~ m/^[^:]*:([^:]+)/) {
             $$coursecodes{$course} = &Apache::lonnet::unescape($1);              $$coursecodes{$course} = &unescape($1);
             $totcodes ++;              $totcodes ++;
         }          }
     }      }

Removed from v.1.32  
changed lines
  Added in v.1.35


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