Diff for /loncom/interface/lonsupportreq.pm between versions 1.13 and 1.14

version 1.13, 2004/12/18 22:30:28 version 1.14, 2004/12/18 23:58:34
Line 39  sub print_request_form { Line 39  sub print_request_form {
     my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0",marginheight="0"',1);      my $bodytag = &Apache::loncommon::bodytag('',$function,'topmargin="0",marginheight="0"',1);
     my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');      my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
     if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {      if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {
         $tablecolor = '#CCCCFF';          $tablecolor = '#EEEE99';
     }      }
     $ccode = '';      $ccode = '';
     $os = $ENV{'browser.os'};      $os = $ENV{'browser.os'};
Line 148  END Line 148  END
             &javascript_code_selections($numtypes,\$jscript,\%idlist,\%idnums,\%idlist_titles,\@codetitles);              &javascript_code_selections($numtypes,\$jscript,\%idlist,\%idnums,\%idlist_titles,\@codetitles);
         }          }
     }      }
     $r->print(<<END);      $r->print(<<ENDHEAD);
 <html>  <html>
 <head>  <head>
  <title>LON-CAPA support request</title>   <title>LON-CAPA support request</title>
Line 158  $jscript Line 158  $jscript
 </script>  </script>
 </head>  </head>
 $bodytag  $bodytag
   ENDHEAD
       if ($r->uri() eq '/adm/helpdesk') {
           &print_header($r,$origurl);
       }
       $r->print(<<"END");
  <table width="580" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">   <table width="580" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
   <tr>    <tr>
    <td>     <td>
Line 289  END Line 294  END
              <table width="100%" border="0" cellpadding="8" cellspacing="0">               <table width="100%" border="0" cellpadding="8" cellspacing="0">
               <tr>                <tr>
                <td>                 <td>
                 http://$server$origurl<input type="hidden" name="origurl" value="http://$server$origurl" />                  http://$server$origurl<input type="hidden" name="sourceurl" value="http://$server$origurl" />
                </td>                 </td>
               </tr>                </tr>
              </table>               </table>
Line 560  END Line 565  END
    </td>     </td>
   </tr>    </tr>
  </table>   </table>
   </form>
   </body>
   </html>
 END  END
     return;      return;
 }  }
Line 577  sub print_request_receipt { Line 585  sub print_request_receipt {
     my $fontcolor = &Apache::loncommon::designparm($function.'.font');      my $fontcolor = &Apache::loncommon::designparm($function.'.font');
     my $vlinkcolor = &Apache::loncommon::designparm($function.'.vlink');      my $vlinkcolor = &Apache::loncommon::designparm($function.'.vlink');
     my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');      my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
     my @formvars = ('username','email','uname','udom','origurl','phone','section','coursecode','title','subject','description','screenshot');      my @formvars = ('username','email','uname','udom','sourceurl','phone','section','coursecode','title','subject','description','screenshot');
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},\@formvars);      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},\@formvars);
   
     my $supportmsg = qq|      my $supportmsg = qq|
Line 588  Tel: $ENV{'form.phone'} Line 596  Tel: $ENV{'form.phone'}
 Course Information: $ENV{'form.title'} - $ENV{'form.coursecode'} - section: $ENV{'form.section'}  Course Information: $ENV{'form.title'} - $ENV{'form.coursecode'} - section: $ENV{'form.section'}
 Subject: $ENV{'form.subject'}  Subject: $ENV{'form.subject'}
 Description: $ENV{'form.description'}  Description: $ENV{'form.description'}
 URL: $ENV{'form.origurl'}  URL: $ENV{'form.sourceurl'}
 Date/Time: $reporttime  Date/Time: $reporttime
   
     |;      |;
Line 602  Date/Time: $reporttime Line 610  Date/Time: $reporttime
 <font color="$fontcolor">Course Information: </font><font color="$vlinkcolor">$ENV{'form.title'} - $ENV{'form.coursecode'} - section: $ENV{'form.section'}</font><br />  <font color="$fontcolor">Course Information: </font><font color="$vlinkcolor">$ENV{'form.title'} - $ENV{'form.coursecode'} - section: $ENV{'form.section'}</font><br />
 <font color="$fontcolor">Subject: </font><font color="$vlinkcolor">$ENV{'form.subject'}</font><br />  <font color="$fontcolor">Subject: </font><font color="$vlinkcolor">$ENV{'form.subject'}</font><br />
 <font color="$fontcolor">Description: </font><font color="$vlinkcolor">$descrip</font><br />  <font color="$fontcolor">Description: </font><font color="$vlinkcolor">$descrip</font><br />
 <font color="$fontcolor">URL: </font><font color="$vlinkcolor">$ENV{'form.origurl'}</font><br />  <font color="$fontcolor">URL: </font><font color="$vlinkcolor">$ENV{'form.sourceurl'}</font><br />
 <font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br />  <font color="$fontcolor">Date/Time: </font><font color="$vlinkcolor">$reporttime</font><br />
     |;      |;
       $r->print(<<"END");
     if ($to =~ m/^[^\@]+\@[^\@]+$/) {  
         $r->print(<<END);  
 <html>  <html>
 <head>  <head>
  <title>LON-CAPA support request recorded</title>   <title>LON-CAPA support request recorded</title>
 </head>  </head>
 $bodytag  $bodytag
  <h3>A support request has been sent to $to</h3>  
 END  END
       if ($r->uri eq '/adm/helpdesk') {
           &print_header($r,$url,'process');
       }
       if ($to =~ m/^[^\@]+\@[^\@]+$/) {
           $r->print("<h3>A support request has been sent to $to</h3>");
     } else {      } else {
         $to = $admin;          $to = $admin;
         if ($to =~ m/^[^\@]+\@[^\@]+$/) {          if ($to =~ m/^[^\@]+\@[^\@]+$/) {
             $r->print(<<END);              $r->print("<h3>A support request has been sent to $to</h3>");
 <html>  
 <head>  
  <title>LON-CAPA support request recorded</title>  
 </head>  
 $bodytag  
  <h3>A support request has been sent to $to</h3>  
 END  END
         } else {          } else {
             $r->print(<<END);              $r->print(<<END);
 <html>  
 <head>  
  <title>LON-CAPA support request recorded</title>  
 </head>  
 $bodytag  
  <h3>Warning: Problem with support e-mail address</h3>   <h3>Warning: Problem with support e-mail address</h3>
 As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has <b>not</b> been sent to the LON-CAPA support staff or administrator at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University.   As the e-mail address provided for this LON-CAPA server ($to) does not appear to be a valid e-mail address, your support request has <b>not</b> been sent to the LON-CAPA support staff or administrator at your institution. Instead a copy has been sent to the LON-CAPA support team at Michigan State University. 
 END  END
Line 784  END Line 783  END
    </td>     </td>
   </tr>    </tr>
  </table>   </table>
   </body>
   </html>
     ");      ");
 }  }
   
   sub print_header {
       my ($r,$origurl,$action) = @_;
       my $location=&Apache::loncommon::lonhttpdurl("/adm");
       my $tablecolor = '#EEEE99';
       my ($component_url);
       my $helpdesk_link = '<a href="javascript:validate()">';
       if ($action eq 'process') {
           $helpdesk_link = '<a href="/adm/helpdesk">';
       }
       my %lt = &Apache::lonlocal::texthash (
                                              login => 'Log-in help',
                                              ask   => 'Ask helpdesk',
                                              getst => 'Getting started guide',
                                              back =>  'Back to last location'
                                            );  
       $r->print(<<END);
   <table width="620" border="0" cellspacing="0" cellpadding="0" height="55">   <tr height="50">    <td width='5'>&nbsp;</td>
      <td>
       <fieldset><legend><img src="$location/lonIcons/minilogo.gif" height='20' width='29' valign='bottom' />&nbsp;&nbsp;<b><font size="+1">LON-CAPA help/support</font></b></legend>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
     <tr>
      <td>
       <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
        <tr>
         <td>
          <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
           <tr>
            <td>
             <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ffffff">
              <tr bgcolor="$tablecolor">
               <td align="center"><img src="$location/help/gif/smallHelp.gif" border="0" alt="(Login help)" valign="middle" />&nbsp;<b><a href="/adm/loginproblems.html">$lt{'login'}</a></td>
               <td align="center">&nbsp;<b>$helpdesk_link<img src="$location/lonIcons/helpdesk.gif" border="0" alt="(Ask helpdesk)" valign="middle" />&nbsp;$lt{'ask'}</a></b>&nbsp;</td>
               <td align="center">&nbsp;<b><a href="/adm/gettingstarted.html">$lt{'getst'}</a></td>
               <td align="center">&nbsp;<b><a href="$origurl" target="_top"><img src="$location/lonIcons/move_up.gif" border="0" alt="(Back to last location)" valign="middle" />&nbsp;$lt{'back'}</a></b>&nbsp;</td>
              </tr>
             </table>
            </td>
           </tr>
          </table>
         </td>
        </tr>
       </table>
      </td>
     </tr>
    </table>
   </fieldset>
     </td>
     <td width='5'>&nbsp;</td>
    </tr>
    <tr height='5'>
     <td colspan='3' height='5'>&nbsp;</td>
    </tr>
   END
       unless ($action eq 'process') {
           $r->print('
    <tr>
     <td colspan="3">'.&mt('
   Please read the "Log-in help" and "Getting started guide" if you can not log-in').'.  '.&mt('If your problem is still unresolved, the form below can be used to send a question to the LON-CAPA helpdesk').'.<br /><font size="-1"><b>'.&mt('Note').':</b> '.&mt('Student questions about course content should be directed to the course instructor').'.</font><br /><br />
     </td>
    </tr>');
       }
       $r->print('
   </table>');
       return;
   }
   
 sub retrieve_instcodes {  sub retrieve_instcodes {
     my ($coursecodes,$codedom,$totcodes) = @_;      my ($coursecodes,$codedom,$totcodes) = @_;
     my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.');      my %courses = &Apache::lonnet::courseiddump($codedom,'.',1,'.','.');

Removed from v.1.13  
changed lines
  Added in v.1.14


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