--- loncom/interface/lonsupportreq.pm 2022/01/01 19:55:31 1.79.2.9
+++ loncom/interface/lonsupportreq.pm 2024/07/15 17:12:40 1.106
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Helpdesk request form
#
-# $Id: lonsupportreq.pm,v 1.79.2.9 2022/01/01 19:55:31 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.106 2024/07/15 17:12:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,8 +29,6 @@
package Apache::lonsupportreq;
use strict;
-use MIME::Types;
-use MIME::Lite;
use CGI::Cookie();
use Apache::Constants qw(:common);
use Apache::loncommon();
@@ -393,7 +391,11 @@ ENDJS
$i = $num%2;
if ($knownuser) {
if ($homeserver) {
- unless ($helpform{'cc'} eq 'no') {
+ my $ip = &Apache::lonnet::get_requestor_ip($r);
+ my %setters;
+ my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) =
+ &Apache::loncommon::blockcheck(\%setters,'com',$ip);
+ unless (($helpform{'cc'} eq 'no') || ($by_ip)) {
$output .= &Apache::lonhtmlcommon::row_title($html_lt{'emac'},undef,$css[$i]).
'
'."\n".
&Apache::lonhtmlcommon::row_closure();
@@ -402,7 +404,7 @@ ENDJS
}
}
}
- unless ($helpform{'user'} eq 'no') {
+ unless (($helpform{'user'} eq 'no') || ($env{'request.lti.login'})) {
$output .= &Apache::lonhtmlcommon::row_title("$html_lt{'unme'}/$html_lt{'doma'}",undef,$css[$i]);
my $udom_input = '&').'" />'."\n";
@@ -439,12 +441,14 @@ ENDJS
}
$output .= &Apache::lonhtmlcommon::row_closure();
$num ++;
+ $i = $num%2;
+ }
+ unless ($env{'request.lti.login'}) {
+ $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'urlp'}",undef,$css[$i]).
+ $server."\n".'&').'" />'."\n".
+ &Apache::lonhtmlcommon::row_closure();
}
- $i = $num%2;
- $output .= &Apache::lonhtmlcommon::row_title("$html_lt{'urlp'}",undef,$css[$i]).
- $server."\n".'&').'" />'."\n".
- &Apache::lonhtmlcommon::row_closure();
unless ($helpform{'phone'} eq 'no') {
my $reqd;
if ($helpform{'phone'} eq 'req') {
@@ -456,13 +460,13 @@ ENDJS
$num ++;
$i = $num%2;
}
- unless ($helpform{'course'} eq 'no') {
+ unless (($helpform{'course'} eq 'no') || ($env{'request.lti.login'})) {
$output .= &Apache::lonhtmlcommon::row_title("$html_lt{'crsd'}$details_title",undef,$css[$i]);
if ($totcodes > 0) {
my $numtitles = @codetitles;
if ($numtitles == 0) {
$output .= $html_lt{'enin'}.':
- '."\n";
+ ').'" />'."\n";
} else {
my @standardnames = &Apache::loncommon::get_standard_codeitems();
my $lasttitle = $numtitles;
@@ -531,7 +535,7 @@ ENDJS
$num ++;
$i = $num%2;
}
- unless ($helpform{'section'} eq 'no') {
+ unless (($helpform{'section'} eq 'no') || ($env{'request.lti.login'})) {
$output .= &Apache::lonhtmlcommon::row_title($html_lt{'secn'},undef,$css[$i]);
if ($sectionlist) {
$output .= "