version 1.67.2.1, 2013/01/04 19:07:17
|
version 1.70, 2013/01/04 16:57:38
|
Line 36 use Apache::lonhtmlcommon;
|
Line 36 use Apache::lonhtmlcommon;
|
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonacc(); |
use Apache::lonacc(); |
|
use Apache::lonauth(); |
use Apache::courseclassifier; |
use Apache::courseclassifier; |
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
use HTML::Entities; |
use HTML::Entities; |
Line 494 ENDJS
|
Line 495 ENDJS
|
$num ++; |
$num ++; |
$i = $num%2; |
$i = $num%2; |
} |
} |
|
} else { |
|
my $lonhost = $r->dir_config('lonHostID'); |
|
my ($captchaform,$error) = |
|
&Apache::loncommon::captcha_display('login',$lonhost); |
|
if ($captchaform) { |
|
$output .= &Apache::lonhtmlcommon::row_title(&mt('Validation'),undef, |
|
$css[$i])."\n". |
|
$captchaform."\n". |
|
&Apache::lonhtmlcommon::row_closure(); |
|
$num ++; |
|
$i = $num%2; |
|
} |
} |
} |
$output .= &Apache::lonhtmlcommon::row_title($lt{'fini'},undef,$css[$i]); |
$output .= &Apache::lonhtmlcommon::row_title($lt{'fini'},undef,$css[$i]); |
$output .= <<END; |
$output .= <<END; |
Line 523 END
|
Line 536 END
|
|
|
sub print_request_receipt { |
sub print_request_receipt { |
my ($r,$url,$function) = @_; |
my ($r,$url,$function) = @_; |
|
my $public; |
|
if (($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public')) { |
|
$public = 1; |
|
} |
|
unless (($env{'user.name'} =~ /^$match_username$/) && (!$public)) { |
|
my $lonhost = $r->dir_config('lonHostID'); |
|
my ($captcha_chk,$captcha_error) = |
|
&Apache::loncommon::captcha_response('login',$lonhost); |
|
if ($captcha_chk != 1) { |
|
$r->print(&Apache::loncommon::start_page('Support request failed',undef, |
|
{'function' => $function, |
|
'add_entries' => { |
|
topmargin => "0", |
|
marginheight => "0", |
|
}, |
|
'only_body' => 1,})); |
|
if ($r->uri eq '/adm/helpdesk') { |
|
&print_header($r,$url,'process'); |
|
} |
|
$r->print('<h3>'.&mt('Support request failed').'</h3>'. |
|
'<span class="LC_error">'. |
|
&mt('Validation of the code you entered failed.'). |
|
&Apache::loncommon::end_page()); |
|
return; |
|
} |
|
} |
my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','SERVER_ADDR','SERVER_NAME'); |
my @ENVvars = ('HTTP_HOST','HTTP_USER_AGENT','REMOTE_ADDR','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'); |
Line 638 sub print_request_receipt {
|
Line 677 sub print_request_receipt {
|
$okcclist = join(', ',@ok_ccs); |
$okcclist = join(', ',@ok_ccs); |
} |
} |
if (@bad_ccs == 1) { |
if (@bad_ccs == 1) { |
if ($bad_ccs[0] ne '') { |
$badccmsg .= '<br />'.&mt('The following Cc e-mail address is invalid: ').$bad_ccs[0]; |
$badccmsg .= '<br />'.&mt('The following Cc e-mail address is invalid: ').&cleanup_html($bad_ccs[0]); |
|
} |
|
} elsif (@bad_ccs > 1) { |
} elsif (@bad_ccs > 1) { |
$badccmsg .= '<br />'.&mt('The following Cc e-mail addresses are invalid: '). &cleanup_html(join(', ',@bad_ccs)); |
my $bad_cc_string = join(', ',@bad_ccs); |
|
$badccmsg .= '<br />'.&mt('The following Cc e-mail addresses are invalid: ').$bad_cc_string; |
} |
} |
} |
} |
$env{'form.user'} = "'".$env{'form.uname'}.':'.$env{'form.udom'}."'"; |
$env{'form.user'} = "'".$env{'form.uname'}.':'.$env{'form.udom'}."'"; |
Line 678 END
|
Line 716 END
|
'<span class="LC_helpform_receipt_cat">'. |
'<span class="LC_helpform_receipt_cat">'. |
"$lt{$item}</span>: $showurl<br />\n"; |
"$lt{$item}</span>: $showurl<br />\n"; |
} elsif ($item eq 'cc') { |
} elsif ($item eq 'cc') { |
if ($okcclist) { |
$displaymsg .= |
my $showcclist = &cleanup_html($okcclist); |
'<span class="LC_helpform_receipt_cat">'. |
$displaymsg .= |
"$lt{$item}</span>: $okcclist<br />\n"; |
'<span class="LC_helpform_receipt_cat">'. |
|
"$lt{$item}</span>: $showcclist<br />\n"; |
|
} |
|
} else { |
} else { |
my $showitem = $env{'form.'.$item}; |
my $showitem = $env{'form.'.$item}; |
$showitem = &cleanup_html($showitem); |
$showitem = &cleanup_html($showitem); |
Line 929 sub print_header {
|
Line 964 sub print_header {
|
} else { |
} else { |
$linkback = &HTML::Entities::encode($origurl,'"<>&'); |
$linkback = &HTML::Entities::encode($origurl,'"<>&'); |
} |
} |
|
my $loginhelp = &Apache::lonauth::loginhelpdisplay(); |
|
if ($loginhelp eq '') { |
|
$loginhelp = '/adm/loginproblems.html'; |
|
} |
$r->print(<<"END"); |
$r->print(<<"END"); |
<table width="620" border="0" cellspacing="0" cellpadding="0" style="height: 55px;"> |
<table width="620" border="0" cellspacing="0" cellpadding="0" style="height: 55px;"> |
<tr> |
<tr> |
Line 941 sub print_header {
|
Line 980 sub print_header {
|
</legend> |
</legend> |
<table id="LC_helpmenu_links"> |
<table id="LC_helpmenu_links"> |
<tr> |
<tr> |
<td align="center"><span class="LC_nobreak"><img src="$location/help/help.png" border="0" alt="($lt{'login'})" style="vertical-align:middle" /> <b><a href="/adm/loginproblems.html">$lt{'login'}</a></b> </span></td> |
<td align="center"><span class="LC_nobreak"><img src="$location/help/help.png" border="0" alt="($lt{'login'})" style="vertical-align:middle" /> <b><a href="$loginhelp">$lt{'login'}</a></b> </span></td> |
<td align="center"><span class="LC_nobreak"> <b>$helpdesk_link<img src="$location/lonIcons/helpdesk.gif" border="0" alt="($lt{'ask'})" style="vertical-align:middle" /> $lt{'ask'}</a></b> </span></td>$getstartlink |
<td align="center"><span class="LC_nobreak"> <b>$helpdesk_link<img src="$location/lonIcons/helpdesk.gif" border="0" alt="($lt{'ask'})" style="vertical-align:middle" /> $lt{'ask'}</a></b> </span></td>$getstartlink |
<td align="center"><span class="LC_nobreak"> <b><a href="$linkback" target="_top"><img src="$location/lonIcons/move_up.gif" border="0" alt="($lt{'back'})" style="vertical-align:middle" /> $lt{'back'}</a></b> </span></td> |
<td align="center"><span class="LC_nobreak"> <b><a href="$linkback" target="_top"><img src="$location/lonIcons/move_up.gif" border="0" alt="($lt{'back'})" style="vertical-align:middle" /> $lt{'back'}</a></b> </span></td> |
</tr> |
</tr> |