version 1.88, 2017/01/23 18:30:30
|
version 1.89, 2017/01/23 19:49:07
|
Line 79 sub handler {
|
Line 79 sub handler {
|
} |
} |
return OK; |
return OK; |
} |
} |
|
|
sub print_request_form { |
sub print_request_form { |
my ($r,$origurl,$function) = @_; |
my ($r,$origurl,$function) = @_; |
my ($os,$browser,$bversion,$uname,$udom,$uhome,$urole,$usec,$email,$cid, |
my ($os,$browser,$bversion,$uname,$udom,$uhome,$urole,$usec,$email,$cid, |
Line 105 sub print_request_form {
|
Line 105 sub print_request_form {
|
} |
} |
} |
} |
} |
} |
if (($env{'user.name'} =~ /^$match_username$/) && |
if (($env{'user.name'} =~ /^$match_username$/) && |
($env{'user.domain'} =~ /^$match_domain$/) && (!$public)) { |
($env{'user.domain'} =~ /^$match_domain$/) && (!$public)) { |
$knownuser = 1; |
$knownuser = 1; |
} else { |
} else { |
Line 350 ENDJS
|
Line 350 ENDJS
|
unless ($helpform{'username'} eq 'no') { |
unless ($helpform{'username'} eq 'no') { |
my ($reqd,$namefield,$fullname); |
my ($reqd,$namefield,$fullname); |
if ((defined($lastname) && $lastname ne '') && (defined($firstname) && $firstname ne '')) { |
if ((defined($lastname) && $lastname ne '') && (defined($firstname) && $firstname ne '')) { |
$fullname = "$firstname $lastname"; |
$fullname = "$firstname $lastname"; |
$namefield = $fullname.'<input type="hidden" name="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />'."\n"; |
$namefield = $fullname.'<input type="hidden" name="username" value="'.&HTML::Entities::encode($fullname,'"<>&').'" />'."\n"; |
} else { |
} else { |
if (defined($firstname) && $firstname ne '') { |
if (defined($firstname) && $firstname ne '') { |
Line 378 ENDJS
|
Line 378 ENDJS
|
&HTML::Entities::encode($email,'"<>&').'" />'."\n"; |
&HTML::Entities::encode($email,'"<>&').'" />'."\n"; |
unless ($shownsubmit) { |
unless ($shownsubmit) { |
$output .= $topsubmit; |
$output .= $topsubmit; |
} |
} |
$output .= &Apache::lonhtmlcommon::row_closure(); |
$output .= &Apache::lonhtmlcommon::row_closure(); |
$num ++; |
$num ++; |
$i = $num%2; |
$i = $num%2; |
Line 541 ENDJS
|
Line 541 ENDJS
|
$output .= '</select></div>'."\n". |
$output .= '</select></div>'."\n". |
'<div id="LC_helpdesk_section" style="display:none">'. |
'<div id="LC_helpdesk_section" style="display:none">'. |
'<input type="text" name="sectiontxt" size="10" /></div>'."\n"; |
'<input type="text" name="sectiontxt" size="10" /></div>'."\n"; |
} else { |
} else { |
$output .= '<input type="text" name="section" size="10" />'."\n"; |
$output .= '<input type="text" name="section" size="10" />'."\n"; |
} |
} |
$output .= &Apache::lonhtmlcommon::row_closure(); |
$output .= &Apache::lonhtmlcommon::row_closure(); |
Line 569 ENDJS
|
Line 569 ENDJS
|
my $max = 1048576; |
my $max = 1048576; |
my $showmax = 1.00; |
my $showmax = 1.00; |
if ($helpform{'maxsize'} =~ /^\d+\.\d*$/) { |
if ($helpform{'maxsize'} =~ /^\d+\.\d*$/) { |
$max *= $helpform{'maxsize'}; |
$max *= $helpform{'maxsize'}; |
$showmax = $helpform{'maxsize'}; |
$showmax = $helpform{'maxsize'}; |
} |
} |
$showmax = ' ('.sprintf("%.2f",$showmax).' '.&mt('MB max.').')'; |
$showmax = ' ('.sprintf("%.2f",$showmax).' '.&mt('MB max.').')'; |
Line 627 sub print_request_receipt {
|
Line 627 sub print_request_receipt {
|
if (($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public')) { |
if (($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public')) { |
$public = 1; |
$public = 1; |
} |
} |
my $lonhost = $r->dir_config('lonHostID'); |
my $lonhost = $r->dir_config('lonHostID'); |
unless (($env{'user.name'} =~ /^$match_username$/) && (!$public)) { |
unless (($env{'user.name'} =~ /^$match_username$/) && (!$public)) { |
my ($captcha_chk,$captcha_error) = |
my ($captcha_chk,$captcha_error) = |
&Apache::loncommon::captcha_response('login',$lonhost); |
&Apache::loncommon::captcha_response('login',$lonhost); |
Line 833 sub print_request_receipt {
|
Line 833 sub print_request_receipt {
|
} |
} |
if ($formvars{'course'}) { |
if ($formvars{'course'}) { |
$supportmsg .= "$lt{'crsi'}: $env{'form.crsi'}\n"; |
$supportmsg .= "$lt{'crsi'}: $env{'form.crsi'}\n"; |
} |
} |
$supportmsg .= "$lt{'subject'}: $env{'form.subject'} |
$supportmsg .= "$lt{'subject'}: $env{'form.subject'} |
$lt{'description'}: $env{'form.description'} |
$lt{'description'}: $env{'form.description'} |
$lt{'sourceurl'}: $env{'form.sourceurl'} |
$lt{'sourceurl'}: $env{'form.sourceurl'} |
Line 962 END
|
Line 962 END
|
|
|
my $attachmentpath = ''; |
my $attachmentpath = ''; |
my $showsize = ''; |
my $showsize = ''; |
|
|
if ((defined($env{'user.name'})) && (!$public)) { |
if ((defined($env{'user.name'})) && (!$public)) { |
if ($homeserver && $env{'form.screenshot.filename'}) { |
if ($homeserver && $env{'form.screenshot.filename'}) { |
unless ($helpform{'screenshot'} eq 'no') { |
unless ($helpform{'screenshot'} eq 'no') { |
Line 973 END
|
Line 973 END
|
$max *= $helpform{'maxsize'}; |
$max *= $helpform{'maxsize'}; |
$showmax = $helpform{'maxsize'}; |
$showmax = $helpform{'maxsize'}; |
} |
} |
$showmax = '('.sprintf("%.2f",$showmax).' MB)'; |
$showmax = '('.sprintf("%.2f",$showmax).' MB)'; |
$showsize = $attachmentsize/1048576; |
$showsize = $attachmentsize/1048576; |
$showsize = '('.sprintf("%.2f",$showsize).' MB)'; |
$showsize = '('.sprintf("%.2f",$showsize).' MB)'; |
if ($attachmentsize > $max) { |
if ($attachmentsize > $max) { |
Line 1010 END
|
Line 1010 END
|
$supportmsg .= "$var: $env{$var}\n"; |
$supportmsg .= "$var: $env{$var}\n"; |
} |
} |
} |
} |
|
|
my $cc_string; |
my $cc_string; |
if ($homeserver) { |
if ($homeserver) { |
if (@ok_ccs > 0) { |
if (@ok_ccs > 0) { |