@@ -992,8 +1039,10 @@ END
$message .= &mt('As the e-mail address provided for this LON-CAPA server ([_1]) does not appear to be a valid e-mail address, your support request has [_2]not[_3] been sent to the LON-CAPA support staff or administrator at your institution.',''.$to.'','','');
}
}
- $r->print(&Apache::loncommon::confirmwrapper(&Apache::lonhtmlcommon::confirm_success($message,$bad_email)));
-
+ $r->print('
');
+ if ($bad_email) {
+ $r->print(&Apache::loncommon::confirmwrapper(&Apache::lonhtmlcommon::confirm_success($message,$bad_email)).' ');
+ }
if ($reqemail ne '') {
$from = $reqemail;
}
@@ -1047,6 +1096,18 @@ END
if ($$cookie{'lonLinkID'} =~ /lonLinkID=([a-f0-9]+_linked);/) {
$cookies{'lonLinkID'} = $1;
}
+ my $lti_info;
+ if (($env{'request.lti.login'}) && ($env{'request.course.id'})) {
+ my $ltidom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+ if ($ltidom) {
+ my %lti = &Apache::lonnet::get_domain_lti($ltidom,'provider');
+ if (ref($lti{$env{'request.lti.login'}}) eq 'HASH') {
+ if ($lti{$env{'request.lti.login'}}{'consumer'}) {
+ $lti_info = "LTI consumer: ".$lti{$env{'request.lti.login'}}{'consumer'}."\n";
+ }
+ }
+ }
+ }
if ($attachmentpath =~ m-/([^/]+)$-) {
$fname = $1;
$displaymsg .= ' '
@@ -1065,6 +1126,9 @@ END
foreach my $var (@envvars) {
$supportmsg .= "$var: $env{$var}\n";
}
+ if ($lti_info) {
+ $supportmsg .= $lti_info;
+ }
}
my $cc_string;
@@ -1089,6 +1153,9 @@ END
foreach my $var (@loncvars) {
$attachment_text .= "$var: $env{$var}\n";
}
+ if ($lti_info) {
+ $attachment_text .= $lti_info;
+ }
}
if ($addtext) {
@@ -1101,50 +1168,17 @@ END
}
}
- unless ($bad_email) {
- my $msg = MIME::Lite->new(
- From => $from,
- To => $to,
- Subject => $subject,
- Type =>'TEXT',
- Data => $supportmsg,
- );
- if ($homeserver) {
- if (@ok_ccs > 0) {
- my $cc_string = join(', ',@ok_ccs);
- $msg->add("Cc" => $cc_string);
- }
- }
- if ($bcc ne '') {
- $msg->add("Bcc" => $bcc);
- }
- $msg->attr("content-type" => "text/plain");
- $msg->attr("content-type.charset" => "UTF-8");
-
- if ($homeserver && $attachmentpath) {
- my ($type, $encoding) = MIME::Types::by_suffix($attachmentpath);
- $msg->attach(Type => $type,
- Path => $attachmentpath,
- Filename => $fname
- );
-
- } elsif ($attachment_text ne '') {
- $msg->attach(Type => 'TEXT',
- Data => $attachment_text);
- }
-
- ### Send it:
- $msg->send('sendmail');
- }
-
- if ($attachmentpath =~ m|$Apache::lonnet::perlvar{'lonDaemons'}/tmp/helprequests/(\d+)/[^/]+|) {
- unlink($attachmentpath);
- }
if ($bad_email) {
$r->print(''.$lt{'belo'}.' '.
- $lt{'ifyk'}.'
|;
$reviewtext = &mt('Please review the information in "Log-in help" and the "Getting started" guide if you are unable to log-in.');
} else {
$reviewtext = &mt('Please review the information in "Log-in help" if you are unable to log-in.');
@@ -1218,47 +1260,34 @@ sub print_header {
$loginhelp = '/adm/loginproblems.html';
}
$r->print(<<"END");
-