version 1.35, 2009/04/22 13:43:48
|
version 1.40.2.1, 2010/08/16 14:39:20
|
Line 139 sub handler {
|
Line 139 sub handler {
|
$start_page = |
$start_page = |
&Apache::loncommon::start_page($title,$js, |
&Apache::loncommon::start_page($title,$js, |
{'no_inline_link' => 1,}); |
{'no_inline_link' => 1,}); |
|
|
my %domconfig = |
my %domconfig = |
&Apache::lonnet::get_dom('configuration',['usercreation'],$domain); |
&Apache::lonnet::get_dom('configuration',['usercreation'],$domain); |
my ($cancreate,$statustocreate) = &get_creation_controls($domain,$domconfig{'usercreation'}); |
my ($cancreate,$statustocreate) = &get_creation_controls($domain,$domconfig{'usercreation'}); |
Line 278 sub selfenroll_crumbs {
|
Line 277 sub selfenroll_crumbs {
|
my ($r,$courseid,$desc) = @_; |
my ($r,$courseid,$desc) = @_; |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"javascript:ToCatalog('backupcrumbs','')", |
({href=>"javascript:ToCatalog('backupcrumbs','')", |
text=>"Course Catalog"}); |
text=>"Course/Community Catalog"}); |
if ($env{'form.coursenum'} ne '') { |
if ($env{'form.coursenum'} ne '') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"javascript:ToCatalog('backupcrumbs','details')", |
({href=>"javascript:ToCatalog('backupcrumbs','details')", |
Line 547 sub process_email_request {
|
Line 546 sub process_email_request {
|
if ($uhome eq 'no_host') { |
if ($uhome eq 'no_host') { |
my (%rulematch,%inst_results,%curr_rules,%got_rules,%alerts); |
my (%rulematch,%inst_results,%curr_rules,%got_rules,%alerts); |
&call_rulecheck($useremail,$domain,\%alerts,\%rulematch, |
&call_rulecheck($useremail,$domain,\%alerts,\%rulematch, |
\%inst_results,\%curr_rules,%got_rules,'username'); |
\%inst_results,\%curr_rules,\%got_rules,'username'); |
if (ref($alerts{'username'}) eq 'HASH') { |
if (ref($alerts{'username'}) eq 'HASH') { |
if (ref($alerts{'username'}{$domain}) eq 'HASH') { |
if (ref($alerts{'username'}{$domain}) eq 'HASH') { |
if ($alerts{'username'}{$domain}{$useremail}) { |
if ($alerts{'username'}{$domain}{$useremail}) { |
Line 645 sub process_mailtoken {
|
Line 644 sub process_mailtoken {
|
if ($result eq 'ok') { |
if ($result eq 'ok') { |
$msg = $output; |
$msg = $output; |
my $shownow = &Apache::lonlocal::locallocaltime($now); |
my $shownow = &Apache::lonlocal::locallocaltime($now); |
my $mailmsg = &mt('A LON-CAPA account for the institution: [_1] has been created [_2] from IP address: [_3]. If you did not perform this action or authorize it, please contact the [_4] ([_5]).',$domdesc,$shownow,$ENV{'REMOTE_ADDR'},$contact_name,$contact_email)."\n"; |
my $mailmsg = &mt('A LON-CAPA account for the institution: [_1] has been created [_2] from IP address: [_3]. If you did not perform this action or authorize it, please contact the [_4] ([_5]).',$domdesc,$shownow,$ENV{'REMOTE_ADDR'},$contact_name,$contact_email)."\n"; |
my $mailresult = &Apache::resetpw::send_mail($domdesc,$data{'email'}, |
my $mailresult = &Apache::resetpw::send_mail($domdesc,$data{'email'}, |
$mailmsg,$contact_name, |
$mailmsg,$contact_name, |
$contact_email); |
$contact_email); |
Line 918 sub username_check {
|
Line 917 sub username_check {
|
my (%rulematch,%inst_results,$checkfail,$rowcount,$editable,$output,$msg, |
my (%rulematch,%inst_results,$checkfail,$rowcount,$editable,$output,$msg, |
%alerts,%curr_rules,%got_rules); |
%alerts,%curr_rules,%got_rules); |
&call_rulecheck($username,$domain,\%alerts,\%rulematch, |
&call_rulecheck($username,$domain,\%alerts,\%rulematch, |
\%inst_results,\%curr_rules,%got_rules,'username'); |
\%inst_results,\%curr_rules,\%got_rules,'username'); |
if (ref($alerts{'username'}) eq 'HASH') { |
if (ref($alerts{'username'}) eq 'HASH') { |
if (ref($alerts{'username'}{$domain}) eq 'HASH') { |
if (ref($alerts{'username'}{$domain}) eq 'HASH') { |
if ($alerts{'username'}{$domain}{$username}) { |
if ($alerts{'username'}{$domain}{$username}) { |
Line 1065 sub username_activation {
|
Line 1064 sub username_activation {
|
# Call modifyuser |
# Call modifyuser |
my (%rulematch,%inst_results,%curr_rules,%got_rules,%alerts,%info); |
my (%rulematch,%inst_results,%curr_rules,%got_rules,%alerts,%info); |
&call_rulecheck($username,$domain,\%alerts,\%rulematch, |
&call_rulecheck($username,$domain,\%alerts,\%rulematch, |
\%inst_results,\%curr_rules,%got_rules); |
\%inst_results,\%curr_rules,\%got_rules); |
my @userinfo = ('firstname','middlename','lastname','generation', |
my @userinfo = ('firstname','middlename','lastname','generation', |
'permanentemail','id'); |
'permanentemail','id'); |
my %canmodify = |
my %canmodify = |
Line 1186 sub create_captcha {
|
Line 1185 sub create_captcha {
|
$output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n". |
$output = '<input type="hidden" name="crypt" value="'.$md5sum.'" />'."\n". |
&mt('Type in the letters/numbers shown below').' '. |
&mt('Type in the letters/numbers shown below').' '. |
'<input type="text" size="5" name="code" value="" /><br />'. |
'<input type="text" size="5" name="code" value="" /><br />'. |
'<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png">'; |
'<img src="'.$captcha_params{'www_output_dir'}.'/'.$md5sum.'.png" />'; |
last; |
last; |
} |
} |
} |
} |