version 1.79.2.3.2.1, 2017/10/15 03:43:52
|
version 1.79.2.11, 2024/07/03 23:58:21
|
Line 69 sub handler {
|
Line 69 sub handler {
|
} |
} |
} |
} |
my $origurl = $env{'form.origurl'}; |
my $origurl = $env{'form.origurl'}; |
$origurl =~ s{^https?://}{}; |
if ($origurl =~ m{^https?://[^/]+(.*)$}) { |
|
$origurl = $1; |
|
} |
$origurl =~ s/(`)//g; |
$origurl =~ s/(`)//g; |
$origurl =~ s/\$/\(\$\)/g; |
$origurl =~ s/\$/\(\$\)/g; |
my $command = $env{'form.command'}; |
my $command = $env{'form.command'}; |
Line 151 sub print_request_form {
|
Line 153 sub print_request_form {
|
} |
} |
} |
} |
|
|
my %coursecodes; |
|
my %codes; |
my %codes; |
my @codetitles; |
my @codetitles; |
my %cat_titles; |
my %cat_titles; |
Line 159 sub print_request_form {
|
Line 160 sub print_request_form {
|
my %idlist; |
my %idlist; |
my %idnums; |
my %idnums; |
my %idlist_titles; |
my %idlist_titles; |
my $caller = 'global'; |
|
my $totcodes = 0; |
my $totcodes = 0; |
my $format_reply; |
|
my $jscript = ''; |
my $jscript = ''; |
my $loaditems = qq| |
my $loaditems = qq| |
function initialize_codes() { |
function initialize_codes() { |
Line 169 function initialize_codes() {
|
Line 168 function initialize_codes() {
|
} |
} |
|; |
|; |
unless ($helpform{'course'} eq 'no') { |
unless ($helpform{'course'} eq 'no') { |
$totcodes = &Apache::courseclassifier::retrieve_instcodes(\%coursecodes,$codedom); |
my $instcats = &Apache::lonnet::get_dom_instcats($codedom); |
if ($totcodes > 0) { |
if (ref($instcats) eq 'HASH') { |
$format_reply = &Apache::lonnet::auto_instcode_format($caller,$codedom,\%coursecodes,\%codes,\@codetitles,\%cat_titles,\%cat_order); |
if ((ref($instcats->{'codetitles'}) eq 'ARRAY') && (ref($instcats->{'codes'}) eq 'HASH') && |
if ($format_reply eq 'ok') { |
(ref($instcats->{'cat_titles'}) eq 'HASH') && (ref($instcats->{'cat_order'}) eq 'HASH')) { |
|
%codes = %{$instcats->{'codes'}}; |
|
@codetitles = @{$instcats->{'codetitles'}}; |
|
%cat_titles = %{$instcats->{'cat_titles'}}; |
|
%cat_order = %{$instcats->{'cat_order'}}; |
|
$totcodes = scalar(keys(%codes)); |
|
} |
|
if ($totcodes > 0) { |
my $numtypes = @codetitles; |
my $numtypes = @codetitles; |
&Apache::courseclassifier::build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles); |
&Apache::courseclassifier::build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles); |
my ($scripttext,$longtitles) = &Apache::courseclassifier::javascript_definitions(\@codetitles,\%idlist,\%idlist_titles,\%idnums,\%cat_titles); |
my ($scripttext,$longtitles) = &Apache::courseclassifier::javascript_definitions(\@codetitles,\%idlist,\%idlist_titles,\%idnums,\%cat_titles); |
Line 316 $loaditems
|
Line 322 $loaditems
|
// ]]> |
// ]]> |
</script> |
</script> |
ENDJS |
ENDJS |
if ($recaptcha_version >=2) { |
if ($knownuser) { |
|
$js .="\n".'<script type="text/javascript" src="/res/adm/includes/file_upload.js"></script>'; |
|
} elsif ($recaptcha_version >=2) { |
$js.= "\n".'<script src="https://www.google.com/recaptcha/api.js"></script>'."\n"; |
$js.= "\n".'<script src="https://www.google.com/recaptcha/api.js"></script>'."\n"; |
} |
} |
my %add_entries = ( |
my %add_entries = ( |
Line 385 ENDJS
|
Line 393 ENDJS
|
$i = $num%2; |
$i = $num%2; |
if ($knownuser) { |
if ($knownuser) { |
if ($homeserver) { |
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]). |
$output .= &Apache::lonhtmlcommon::row_title($html_lt{'emac'},undef,$css[$i]). |
'<input type="text" size="50" name="cc" value="" /><br />'."\n". |
'<input type="text" size="50" name="cc" value="" /><br />'."\n". |
&Apache::lonhtmlcommon::row_closure(); |
&Apache::lonhtmlcommon::row_closure(); |
Line 454 ENDJS
|
Line 466 ENDJS
|
my $numtitles = @codetitles; |
my $numtitles = @codetitles; |
if ($numtitles == 0) { |
if ($numtitles == 0) { |
$output .= $html_lt{'enin'}.': |
$output .= $html_lt{'enin'}.': |
<input type="text" name="coursecode" size="15" value="" />'."\n"; |
<input type="text" name="coursecode" size="15" value="'.&HTML::Entities::encode($ccode,'\'"&<>').'" />'."\n"; |
} else { |
} else { |
my @standardnames = &Apache::loncommon::get_standard_codeitems(); |
my @standardnames = &Apache::loncommon::get_standard_codeitems(); |
my $lasttitle = $numtitles; |
my $lasttitle = $numtitles; |
Line 574 ENDJS
|
Line 586 ENDJS
|
$showmax = $helpform{'maxsize'}; |
$showmax = $helpform{'maxsize'}; |
} |
} |
$showmax = ' ('.sprintf("%.2f",$showmax).' '.&mt('MB max.').')'; |
$showmax = ' ('.sprintf("%.2f",$showmax).' '.&mt('MB max.').')'; |
$output .= &Apache::lonhtmlcommon::row_title($html_lt{'opfi'},undef,$css[$i]). |
$output .= &Apache::lonhtmlcommon::row_title($html_lt{'opfi'},undef,$css[$i]) |
' <input type="file" name="screenshot" size="20" /><br />'. |
.' <input type="file" name="screenshot" class="LC_flUpload" size="20" />' |
"\n".$html_lt{'uplf'}.$showmax."\n". |
.'<input type="hidden" id="LC_free_space" value="'.$max.'" />' |
&Apache::lonhtmlcommon::row_closure(); |
.'<br />'."\n".$html_lt{'uplf'}.$showmax."\n" |
|
.&Apache::lonhtmlcommon::row_closure(); |
$num ++; |
$num ++; |
$i = $num%2; |
$i = $num%2; |
} |
} |
Line 654 sub print_request_receipt {
|
Line 667 sub print_request_receipt {
|
return; |
return; |
} |
} |
} |
} |
my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','SERVER_ADDR','SERVER_NAME'); |
my $ip = &Apache::lonnet::get_requestor_ip($r); |
|
my %setters; |
|
my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) = |
|
&Apache::loncommon::blockcheck(\%setters,'com',$ip); |
|
my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','SERVER_ADDR','SERVER_NAME'); |
my @envvars = ('browser.os','browser.type','browser.version','user.home','request.role'); |
my @envvars = ('browser.os','browser.type','browser.version','user.home','request.role'); |
my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id'); |
my @loncvars = ('user.name','user.domain','request.course.sec','request.course.id'); |
my @cookievars = ('lonID'); |
my @cookievars; |
|
if ($ENV{'SERVER_PORT'} == 443) { |
|
@cookievars = ('lonLinkID'); |
|
} else { |
|
@cookievars = ('lonID'); |
|
} |
|
|
my $admin = $Apache::lonnet::perlvar{'lonAdminMail'}; |
my $admin = $Apache::lonnet::perlvar{'lonAdminMail'}; |
my $origmail = $Apache::lonnet::perlvar{'lonSupportEMail'}; |
my $origmail = $Apache::lonnet::perlvar{'lonSupportEMail'}; |
Line 694 sub print_request_receipt {
|
Line 716 sub print_request_receipt {
|
unless ($helpform{'course'} eq 'no') { |
unless ($helpform{'course'} eq 'no') { |
$formvars{'course'} = 1; |
$formvars{'course'} = 1; |
} |
} |
unless ($helpform{'cc'} eq 'no') { |
unless (($helpform{'cc'} eq 'no') || ($by_ip)) { |
$formvars{'cc'} = 1; |
$formvars{'cc'} = 1; |
} |
} |
unless ($helpform{'screenshot'} eq 'no') { |
unless ($helpform{'screenshot'} eq 'no') { |
Line 705 sub print_request_receipt {
|
Line 727 sub print_request_receipt {
|
$coursecode = $env{'form.coursecode'}; |
$coursecode = $env{'form.coursecode'}; |
if ($coursecode eq '') { |
if ($coursecode eq '') { |
my $totcodes = 0; |
my $totcodes = 0; |
my %coursecodes; |
my $instcats = &Apache::lonnet::get_dom_instcats($defdom); |
$totcodes = &Apache::courseclassifier::retrieve_instcodes(\%coursecodes,$defdom); |
if (ref($instcats) eq 'HASH') { |
|
if (ref($instcats->{'codes'}) eq 'HASH') { |
|
$totcodes = scalar(keys(%{$instcats->{'codes'}})); |
|
} |
|
} |
my @standardnames = &Apache::loncommon::get_standard_codeitems(); |
my @standardnames = &Apache::loncommon::get_standard_codeitems(); |
if ($totcodes > 0) { |
if ($totcodes > 0) { |
my $noregexps = 1; |
my $noregexps = 1; |
Line 882 $lt{'date'}: $reporttime
|
Line 908 $lt{'date'}: $reporttime
|
$env{'form.'.$field} =~ s/\s+$//; |
$env{'form.'.$field} =~ s/\s+$//; |
} |
} |
if ($env{'form.uname'} =~ /^$match_username$/) { |
if ($env{'form.uname'} =~ /^$match_username$/) { |
$requdom = $env{'form.udom'}; |
$requname = $env{'form.uname'}; |
} |
} |
if ($env{'form.udom'} =~ /^$match_domain$/) { |
if ($env{'form.udom'} =~ /^$match_domain$/) { |
$requdom = $env{'form.udom'}; |
$requdom = $env{'form.udom'}; |
Line 1016 END
|
Line 1042 END
|
if ($$cookie{'lonID'} =~ /lonID=($LONCAPA::handle_re);/) { |
if ($$cookie{'lonID'} =~ /lonID=($LONCAPA::handle_re);/) { |
$cookies{'lonID'} = $1; |
$cookies{'lonID'} = $1; |
} |
} |
|
if ($$cookie{'lonLinkID'} =~ /lonLinkID=([a-f0-9]+_linked);/) { |
|
$cookies{'lonLinkID'} = $1; |
|
} |
if ($attachmentpath =~ m-/([^/]+)$-) { |
if ($attachmentpath =~ m-/([^/]+)$-) { |
$fname = $1; |
$fname = $1; |
$displaymsg .= '<br />' |
$displaymsg .= '<br />' |
Line 1031 END
|
Line 1059 END
|
foreach my $var(@ENVvars) { |
foreach my $var(@ENVvars) { |
$supportmsg .= "$var: $ENV{$var}\n"; |
$supportmsg .= "$var: $ENV{$var}\n"; |
} |
} |
|
$supportmsg .= "REMOTE_ADDR: $ip\n"; |
foreach my $var (@envvars) { |
foreach my $var (@envvars) { |
$supportmsg .= "$var: $env{$var}\n"; |
$supportmsg .= "$var: $env{$var}\n"; |
} |
} |
Line 1051 END
|
Line 1080 END
|
foreach my $var (@ENVvars) { |
foreach my $var (@ENVvars) { |
$attachment_text .= "$var: $ENV{$var}\n"; |
$attachment_text .= "$var: $ENV{$var}\n"; |
} |
} |
|
$attachment_text .= "REMOTE_ADDR: $ip\n"; |
foreach my $var (@envvars) { |
foreach my $var (@envvars) { |
$attachment_text .= "$var: $env{$var}\n"; |
$attachment_text .= "$var: $env{$var}\n"; |
} |
} |
Line 1125 END
|
Line 1155 END
|
$var.'</span>: '.$ENV{$var}.', '; |
$var.'</span>: '.$ENV{$var}.', '; |
} |
} |
} |
} |
|
if ($ip ne '') { |
|
$envmsg .= '<span class="LC_helpform_receipt_cat">'. |
|
'REMOTE_ADDR</span>: '.$ip.', '; |
|
} |
foreach my $var (@envvars) { |
foreach my $var (@envvars) { |
if ($env{$var} ne '') { |
if ($env{$var} ne '') { |
$envmsg .= '<span class="LC_helpform_receipt_cat">'. |
$envmsg .= '<span class="LC_helpform_receipt_cat">'. |