version 1.358, 2019/05/06 01:30:14
|
version 1.369, 2020/02/05 23:46:01
|
Line 831 sub print_config_box {
|
Line 831 sub print_config_box {
|
if ($numheaders > 1) { |
if ($numheaders > 1) { |
my $colspan = ''; |
my $colspan = ''; |
my $rightcolspan = ''; |
my $rightcolspan = ''; |
|
my $leftnobr = ''; |
if (($action eq 'rolecolors') || ($action eq 'defaults') || |
if (($action eq 'rolecolors') || ($action eq 'defaults') || |
($action eq 'directorysrch') || |
($action eq 'directorysrch') || |
(($action eq 'login') && ($numheaders < 4))) { |
(($action eq 'login') && ($numheaders < 4))) { |
Line 839 sub print_config_box {
|
Line 840 sub print_config_box {
|
if ($action eq 'usersessions') { |
if ($action eq 'usersessions') { |
$rightcolspan = ' colspan="3"'; |
$rightcolspan = ' colspan="3"'; |
} |
} |
|
if ($action eq 'passwords') { |
|
$leftnobr = ' LC_nobreak'; |
|
} |
$output .= ' |
$output .= ' |
<tr> |
<tr> |
<td> |
<td> |
<table class="LC_nested"> |
<table class="LC_nested"> |
<tr class="LC_info_row"> |
<tr class="LC_info_row"> |
<td class="LC_left_item"'.$colspan.'>'.&mt($item->{'header'}->[0]->{'col1'}).'</td> |
<td class="LC_left_item'.$leftnobr.'"'.$colspan.'>'.&mt($item->{'header'}->[0]->{'col1'}).'</td> |
<td class="LC_right_item"'.$rightcolspan.'>'.&mt($item->{'header'}->[0]->{'col2'}).'</td> |
<td class="LC_right_item"'.$rightcolspan.'>'.&mt($item->{'header'}->[0]->{'col2'}).'</td> |
</tr>'; |
</tr>'; |
$rowtotal ++; |
$rowtotal ++; |
Line 889 sub print_config_box {
|
Line 893 sub print_config_box {
|
($action eq 'usersessions') || ($action eq 'coursecategories') || |
($action eq 'usersessions') || ($action eq 'coursecategories') || |
($action eq 'trust') || ($action eq 'contacts') || |
($action eq 'trust') || ($action eq 'contacts') || |
($action eq 'privacy') || ($action eq 'passwords')) { |
($action eq 'privacy') || ($action eq 'passwords')) { |
|
my $leftnobr = ' LC_nobreak'; |
if ($action eq 'coursecategories') { |
if ($action eq 'coursecategories') { |
$output .= &print_coursecategories('middle',$dom,$item,$settings,\$rowtotal); |
$output .= &print_coursecategories('middle',$dom,$item,$settings,\$rowtotal); |
$colspan = ' colspan="2"'; |
$colspan = ' colspan="2"'; |
Line 956 sub print_config_box {
|
Line 961 sub print_config_box {
|
<td> |
<td> |
<table class="LC_nested"> |
<table class="LC_nested"> |
<tr class="LC_info_row"> |
<tr class="LC_info_row"> |
<td class="LC_left_item"'.$colspan.'>'.&mt($item->{'header'}->[3]->{'col1'}).'</td> |
<td class="LC_left_item'.$leftnobr.'"'.$colspan.'>'.&mt($item->{'header'}->[3]->{'col1'}).'</td> |
<td class="LC_right_item"'.$colspan.'>'.&mt($item->{'header'}->[3]->{'col2'}).'</td></tr>'."\n"; |
<td class="LC_right_item"'.$colspan.'>'.&mt($item->{'header'}->[3]->{'col2'}).'</td></tr>'."\n"; |
if ($action eq 'passwords') { |
if ($action eq 'passwords') { |
$output .= $item->{'print'}->('bottom',$dom,$confname,$settings,\$rowtotal); |
$output .= $item->{'print'}->('bottom',$dom,$confname,$settings,\$rowtotal); |
Line 2905 function toggleLTI(form,setting,item) {
|
Line 2910 function toggleLTI(form,setting,item) {
|
} |
} |
} |
} |
} |
} |
} else if ((setting == 'user') || (setting == 'crs') || (setting == 'passback')) { |
} else if ((setting == 'user') || (setting == 'crs') || (setting == 'passback') || (setting == 'callback')) { |
var radioname = ''; |
var radioname = ''; |
var divid = ''; |
var divid = ''; |
if (setting == 'user') { |
if (setting == 'user') { |
Line 2914 function toggleLTI(form,setting,item) {
|
Line 2919 function toggleLTI(form,setting,item) {
|
} else if (setting == 'crs') { |
} else if (setting == 'crs') { |
radioname = 'lti_mapcrs_'+item; |
radioname = 'lti_mapcrs_'+item; |
divid = 'lti_crsfield_'+item; |
divid = 'lti_crsfield_'+item; |
|
} else if (setting == 'callback') { |
|
radioname = 'lti_callback_'+item; |
|
divid = 'lti_callbackfield_'+item; |
} else { |
} else { |
radioname = 'lti_passback_'+item; |
radioname = 'lti_passback_'+item; |
divid = 'lti_passback_'+item; |
divid = 'lti_passback_'+item; |
Line 2923 function toggleLTI(form,setting,item) {
|
Line 2931 function toggleLTI(form,setting,item) {
|
var setvis = ''; |
var setvis = ''; |
for (var i=0; i<num; i++) { |
for (var i=0; i<num; i++) { |
if (form.elements[radioname][i].checked) { |
if (form.elements[radioname][i].checked) { |
if (setting == 'passback') { |
if ((setting == 'passback') || (setting == 'callback')) { |
if (form.elements[radioname][i].value == '1') { |
if (form.elements[radioname][i].value == '1') { |
if (document.getElementById(divid)) { |
if (document.getElementById(divid)) { |
document.getElementById(divid).style.display = 'inline-block'; |
document.getElementById(divid).style.display = 'inline-block'; |
Line 4957 sub lti_names {
|
Line 4965 sub lti_names {
|
|
|
sub lti_options { |
sub lti_options { |
my ($num,$current,$itemcount,%lt) = @_; |
my ($num,$current,$itemcount,%lt) = @_; |
my (%checked,%rolemaps,$crssecsrc,$userfield,$cidfield); |
my (%checked,%rolemaps,$crssecsrc,$userfield,$cidfield,$callback); |
$checked{'mapuser'}{'sourcedid'} = ' checked="checked"'; |
$checked{'mapuser'}{'sourcedid'} = ' checked="checked"'; |
$checked{'mapcrs'}{'course_offering_sourcedid'} = ' checked="checked"'; |
$checked{'mapcrs'}{'course_offering_sourcedid'} = ' checked="checked"'; |
$checked{'makecrs'}{'N'} = ' checked="checked"'; |
$checked{'makecrs'}{'N'} = ' checked="checked"'; |
Line 4975 sub lti_options {
|
Line 4983 sub lti_options {
|
my $crsfieldsty = 'none'; |
my $crsfieldsty = 'none'; |
my $crssecfieldsty = 'none'; |
my $crssecfieldsty = 'none'; |
my $secsrcfieldsty = 'none'; |
my $secsrcfieldsty = 'none'; |
|
my $callbacksty = 'none'; |
my $passbacksty = 'none'; |
my $passbacksty = 'none'; |
my $optionsty = 'block'; |
my $optionsty = 'block'; |
my $lcauthparm; |
my $lcauthparm; |
Line 5054 sub lti_options {
|
Line 5063 sub lti_options {
|
} else { |
} else { |
$checked{'crssec'}{'N'} = ' checked="checked"'; |
$checked{'crssec'}{'N'} = ' checked="checked"'; |
} |
} |
|
if ($current->{'callback'} ne '') { |
|
$callback = $current->{'callback'}; |
|
$checked{'callback'}{'Y'} = ' checked="checked"'; |
|
$callbacksty = 'inline-block'; |
|
} else { |
|
$checked{'callback'}{'N'} = ' checked="checked"'; |
|
} |
if ($current->{'topmenu'}) { |
if ($current->{'topmenu'}) { |
$checked{'topmenu'}{'Y'} = ' checked="checked"'; |
$checked{'topmenu'}{'Y'} = ' checked="checked"'; |
} else { |
} else { |
Line 5079 sub lti_options {
|
Line 5095 sub lti_options {
|
} else { |
} else { |
$checked{'makecrs'}{'N'} = ' checked="checked"'; |
$checked{'makecrs'}{'N'} = ' checked="checked"'; |
$checked{'crssec'}{'N'} = ' checked="checked"'; |
$checked{'crssec'}{'N'} = ' checked="checked"'; |
|
$checked{'callback'}{'N'} = ' checked="checked"'; |
$checked{'topmenu'}{'N'} = ' checked="checked"'; |
$checked{'topmenu'}{'N'} = ' checked="checked"'; |
$checked{'inlinemenu'}{'Y'} = ' checked="checked"'; |
$checked{'inlinemenu'}{'Y'} = ' checked="checked"'; |
$checked{'menuitem'}{'grades'} = ' checked="checked"'; |
$checked{'menuitem'}{'grades'} = ' checked="checked"'; |
Line 5107 sub lti_options {
|
Line 5124 sub lti_options {
|
my $onclickuser = ' onclick="toggleLTI(this.form,'."'user','$num'".');"'; |
my $onclickuser = ' onclick="toggleLTI(this.form,'."'user','$num'".');"'; |
my $onclickcrs = ' onclick="toggleLTI(this.form,'."'crs','$num'".');"'; |
my $onclickcrs = ' onclick="toggleLTI(this.form,'."'crs','$num'".');"'; |
my $onclicksec = ' onclick="toggleLTI(this.form,'."'sec','$num'".');"'; |
my $onclicksec = ' onclick="toggleLTI(this.form,'."'sec','$num'".');"'; |
|
my $onclickcallback = ' onclick="toggleLTI(this.form,'."'callback','$num'".');"'; |
my $onclicksecsrc = ' onclick="toggleLTI(this.form,'."'secsrc','$num'".')"'; |
my $onclicksecsrc = ' onclick="toggleLTI(this.form,'."'secsrc','$num'".')"'; |
my $onclicklcauth = ' onclick="toggleLTI(this.form,'."'lcauth','$num'".')"'; |
my $onclicklcauth = ' onclick="toggleLTI(this.form,'."'lcauth','$num'".')"'; |
my $onclickmenu = ' onclick="toggleLTI(this.form,'."'lcmenu','$num'".');"'; |
my $onclickmenu = ' onclick="toggleLTI(this.form,'."'lcmenu','$num'".');"'; |
Line 5256 sub lti_options {
|
Line 5274 sub lti_options {
|
'<label><input type="radio" name="lti_passbackformat_'.$num.'" value="1.1"'.$pb1p1chk.' />'. |
'<label><input type="radio" name="lti_passbackformat_'.$num.'" value="1.1"'.$pb1p1chk.' />'. |
&mt('Outcomes Service (1.1)').'</label>'.(' 'x2). |
&mt('Outcomes Service (1.1)').'</label>'.(' 'x2). |
'<label><input type="radio" name="lti_passbackformat_'.$num.'" value="1.0"'.$pb1p0chk.'/>'. |
'<label><input type="radio" name="lti_passbackformat_'.$num.'" value="1.0"'.$pb1p0chk.'/>'. |
&mt('Outcomes Extension (1.0)').'</label></span></div></fieldset>'. |
&mt('Outcomes Extension (1.0)').'</label></span></div>'. |
|
'<div style="padding:0;clear:both;margin:0;border:0"></div>'. |
|
'<div class="LC_floatleft"><span class="LC_nobreak">'.&mt('Callback on logout').': '. |
|
'<label><input type="radio" name="lti_callback_'.$num.'" value="0"'. |
|
$checked{'callback'}{'N'}.$onclickcallback.' />'.&mt('No').'</label>'.(' 'x2). |
|
'<label><input type="radio" name="lti_callback_'.$num.'" value="1"'. |
|
$checked{'callback'}{'Y'}.$onclickcallback.' />'.&mt('Yes').'</label></span></div>'. |
|
'<div class="LC_floatleft" style="display:'.$callbacksty.';" id="lti_callbackfield_'.$num.'">'. |
|
'<span class="LC_nobreak">'.&mt('Parameter').': '. |
|
'<input type="text" name="lti_callbackparam_'.$num.'" value="'.$callback.'" /></span>'. |
|
'</div><div style="padding:0;clear:both;margin:0;border:0"></div></fieldset>'. |
'<fieldset class="ltioption_'.$num.'" style="display:'.$optionsty.'"><legend>'.&mt('Course defaults (Course Coordinator can override)').'</legend>'. |
'<fieldset class="ltioption_'.$num.'" style="display:'.$optionsty.'"><legend>'.&mt('Course defaults (Course Coordinator can override)').'</legend>'. |
'<div class="LC_floatleft"><span class="LC_nobreak">'.$lt{'topmenu'}.': '. |
'<div class="LC_floatleft"><span class="LC_nobreak">'.$lt{'topmenu'}.': '. |
'<label><input type="radio" name="lti_topmenu_'.$num.'" value="0"'. |
'<label><input type="radio" name="lti_topmenu_'.$num.'" value="0"'. |
Line 5904 sub print_privacy {
|
Line 5932 sub print_privacy {
|
'',$othertitle); |
'',$othertitle); |
$itemcount ++; |
$itemcount ++; |
} else { |
} else { |
$datatable .= &mt('Nothing to set here, as there are no other domains'); |
my (@insttypes,%insttitles); |
|
if ((ref($types) eq 'ARRAY') && (ref($usertypes) eq 'HASH')) { |
|
@insttypes = @{$types}; |
|
%insttitles = %{$usertypes}; |
|
} |
|
foreach my $item (@insttypes,'default') { |
|
my $title; |
|
if ($item eq 'default') { |
|
$title = $othertitle; |
|
} else { |
|
$title = $insttitles{$item}; |
|
} |
|
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
|
$datatable .= '<tr'.$css_class.'>'. |
|
'<td class="LC_left_item">'.$title.'</td>'. |
|
'<td class="LC_left_item">'. |
|
&mt('Nothing to set here, as there are no other domains'). |
|
'</td></tr>'; |
|
$itemcount ++; |
|
} |
} |
} |
} |
} |
} else { |
} else { |
Line 6014 sub print_passwords {
|
Line 6061 sub print_passwords {
|
$datatable .= '<span class="LC_nobreak"><label>'. |
$datatable .= '<span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="passwords_case_sensitive" value="'. |
'<input type="checkbox" name="passwords_case_sensitive" value="'. |
$item.'"'.$checkedcase.' />'.$usertypes->{$item}.'</label>'. |
$item.'"'.$checkedcase.' />'.$usertypes->{$item}.'</label>'. |
'<span> '; |
'</span> '; |
} |
} |
} |
} |
my $checkedcase; |
my $checkedcase; |
Line 6118 sub print_passwords {
|
Line 6165 sub print_passwords {
|
&mt('(If you use the same account ... reset a password from this page.)').'</span><br /><br />'. |
&mt('(If you use the same account ... reset a password from this page.)').'</span><br /><br />'. |
&mt('Include custom text:'); |
&mt('Include custom text:'); |
if ($customurl) { |
if ($customurl) { |
my $link = &Apache::loncommon::modal_link($customurl,&mt('Custom text file'),600,500, |
my $link = &Apache::loncommon::modal_link($customurl,&mt('custom text'),600,500, |
undef,undef,undef,undef,'background-color:#ffffff'); |
undef,undef,undef,undef,'background-color:#ffffff'); |
$datatable .= '<span class="LC_nobreak"> '.$link. |
$datatable .= '<span class="LC_nobreak"> '.$link. |
'<label><input type="checkbox" name="passwords_custom_del"'. |
'<label><input type="checkbox" name="passwords_custom_del"'. |
Line 6214 sub print_passwords {
|
Line 6261 sub print_passwords {
|
} |
} |
} elsif ($position eq 'lower') { |
} elsif ($position eq 'lower') { |
my ($min,$max,%chars,$expire,$numsaved); |
my ($min,$max,%chars,$expire,$numsaved); |
|
$min = $Apache::lonnet::passwdmin; |
if (ref($settings) eq 'HASH') { |
if (ref($settings) eq 'HASH') { |
if ($settings->{min}) { |
if ($settings->{min}) { |
$min = $settings->{min}; |
$min = $settings->{min}; |
Line 6230 sub print_passwords {
|
Line 6278 sub print_passwords {
|
if ($settings->{numsaved}) { |
if ($settings->{numsaved}) { |
$numsaved = $settings->{numsaved}; |
$numsaved = $settings->{numsaved}; |
} |
} |
} else { |
|
$min = '7'; |
|
} |
} |
my %rulenames = &Apache::lonlocal::texthash( |
my %rulenames = &Apache::lonlocal::texthash( |
uc => 'At least one upper case letter', |
uc => 'At least one upper case letter', |
Line 6242 sub print_passwords {
|
Line 6288 sub print_passwords {
|
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'min'}.'</td>'. |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'min'}.'</td>'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<input type="text" name="passwords_min" value="'.$min.'" size="3" />'. |
'<input type="text" name="passwords_min" value="'.$min.'" size="3" '. |
'<span class="LC_fontsize_small"> '.&mt('(Leave blank for no minimum)').'</span>'. |
'onblur="javascript:warnIntPass(this);" />'. |
|
'<span class="LC_fontsize_small"> '.&mt('(Enter an integer: 7 or larger)').'</span>'. |
'</span></td></tr>'; |
'</span></td></tr>'; |
$itemcount ++; |
$itemcount ++; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'max'}.'</td>'. |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'max'}.'</td>'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<input type="text" name="passwords_max" value="'.$max.'" size="3" />'. |
'<input type="text" name="passwords_max" value="'.$max.'" size="3" '. |
|
'onblur="javascript:warnIntPass(this);" />'. |
'<span class="LC_fontsize_small"> '.&mt('(Leave blank for no maximum)').'</span>'. |
'<span class="LC_fontsize_small"> '.&mt('(Leave blank for no maximum)').'</span>'. |
'</span></td></tr>'; |
'</span></td></tr>'; |
$itemcount ++; |
$itemcount ++; |
Line 6289 sub print_passwords {
|
Line 6337 sub print_passwords {
|
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'expire'}.'</td>'. |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'expire'}.'</td>'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<input type="text" name="passwords_expire" value="'.$expire.'" size="4" />'. |
'<input type="text" name="passwords_expire" value="'.$expire.'" size="4" '. |
|
'onblur="javascript:warnIntPass(this);" />'. |
'<span class="LC_fontsize_small"> '.&mt('(Leave blank for no expiration)').'</span>'. |
'<span class="LC_fontsize_small"> '.&mt('(Leave blank for no expiration)').'</span>'. |
'</span></td></tr>'; |
'</span></td></tr>'; |
$itemcount ++; |
$itemcount ++; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'numsaved'}.'</td>'. |
$datatable .= '<tr'.$css_class.'><td>'.$titles{'numsaved'}.'</td>'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<td class="LC_left_item"><span class="LC_nobreak">'. |
'<input type="text" name="passwords_numsaved" value="'.$numsaved.'" size="3" />'. |
'<input type="text" name="passwords_numsaved" value="'.$numsaved.'" size="3" '. |
|
'onblur="javascript:warnIntPass(this);" />'. |
'<span class="LC_fontsize_small"> '.&mt('(Leave blank to not save previous passwords)').'</span>'. |
'<span class="LC_fontsize_small"> '.&mt('(Leave blank to not save previous passwords)').'</span>'. |
'</span></td></tr>'; |
'</span></td></tr>'; |
} else { |
} else { |
my $checkedon; |
my ($othertitle,$usertypes,$types) = &Apache::loncommon::sorted_inst_types($dom); |
my $checkedoff = ' checked="checked"'; |
my %ownerchg = ( |
|
by => {}, |
|
for => {}, |
|
); |
|
my %ownertitles = &Apache::lonlocal::texthash ( |
|
by => 'Course owner status(es) allowed', |
|
for => 'Student status(es) allowed', |
|
); |
if (ref($settings) eq 'HASH') { |
if (ref($settings) eq 'HASH') { |
if ($settings->{crsownerchg}) { |
if (ref($settings->{crsownerchg}) eq 'HASH') { |
$checkedon = $checkedoff; |
if (ref($settings->{crsownerchg}{'by'}) eq 'ARRAY') { |
$checkedoff = ''; |
map { $ownerchg{by}{$_} = 1; } (@{$settings->{crsownerchg}{'by'}}); |
|
} |
|
if (ref($settings->{crsownerchg}{'for'}) eq 'ARRAY') { |
|
map { $ownerchg{for}{$_} = 1; } (@{$settings->{crsownerchg}{'for'}}); |
|
} |
} |
} |
} |
} |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
$datatable .= '<tr '.$css_class.'>'. |
$datatable .= '<tr '.$css_class.'>'. |
'<td>'. |
'<td>'. |
&mt('Requirements').'<ul>'. |
&mt('Requirements').'<ul>'. |
'<li>'.&mt("Course 'type' is not a Community").'</li>'. |
'<li>'.&mt("Course 'type' is not a Community or Placement Test").'</li>'. |
'<li>'.&mt('User is Course Coordinator and also course owner').'</li>'. |
'<li>'.&mt('User is Course Coordinator and also course owner').'</li>'. |
'<li>'.&mt("Student's only active roles are student role(s) in course(s) owned by this user").'</li>'. |
'<li>'.&mt("Student's only active roles are student role(s) in course(s) owned by this user").'</li>'. |
|
'<li>'.&mt('User, course, and student share same domain').'</li>'. |
'</ul>'. |
'</ul>'. |
'</td>'. |
'</td>'. |
'<td class="LC_left_item" colspan="2"><span class="LC_nobreak">'. |
'<td class="LC_left_item">'; |
'<label><input type="radio" name="passwords_crsowner" value="1"'.$checkedon.' />'.&mt('Yes').'</label></span> '. |
foreach my $item ('by','for') { |
'<span class="LC_nobreak"><label><input type="radio" name="passwords_crsowner" value="0"'.$checkedoff.' />'. |
$datatable .= '<fieldset style="display: inline-block;">'. |
&mt('No').'</label></span>'. |
'<legend>'.$ownertitles{$item}.'</legend>'; |
'</td></tr>'; |
if ((ref($types) eq 'ARRAY') && (ref($usertypes) eq 'HASH')) { |
|
foreach my $type (@{$types}) { |
|
my $checked; |
|
if ($ownerchg{$item}{$type}) { |
|
$checked = ' checked="checked"'; |
|
} |
|
$datatable .= '<span class="LC_nobreak"><label>'. |
|
'<input type="checkbox" name="passwords_crsowner_'.$item.'" value="'. |
|
$type.'"'.$checked.' />'.$usertypes->{$type}.'</label>'. |
|
'</span> '; |
|
} |
|
} |
|
my $checked; |
|
if ($ownerchg{$item}{'default'}) { |
|
$checked = ' checked="checked"'; |
|
} |
|
$datatable .= '<span class="LC_nobreak"><label><input type="checkbox" '. |
|
'name="passwords_crsowner_'.$item.'" value="default"'.$checked.' />'. |
|
$othertitle.'</label></span></fieldset>'; |
|
} |
|
$datatable .= '</td></tr>'; |
} |
} |
return $datatable; |
return $datatable; |
} |
} |
Line 9222 ENDSCRIPT
|
Line 9303 ENDSCRIPT
|
} |
} |
|
|
sub passwords_javascript { |
sub passwords_javascript { |
my $intauthcheck = &mt('Warning: disallowing login for an authenticated user if the stored cost is less than the default will require a password reset by/for the user.'); |
my %intalert = &Apache::lonlocal::texthash ( |
my $intauthcost = &mt('Warning: bcrypt encryption cost for internal authentication must be an integer.'); |
authcheck => 'Warning: disallowing login for an authenticated user if the stored cost is less than the default will require a password reset by/for the user.', |
&js_escape(\$intauthcheck); |
authcost => 'Warning: bcrypt encryption cost for internal authentication must be an integer.', |
&js_escape(\$intauthcost); |
passmin => 'Warning: minimum password length must be a positive integer greater than 6.', |
|
passmax => 'Warning: maximum password length must be a positive integer (or blank).', |
|
passexp => 'Warning: days before password expiration must be a positive integer (or blank).', |
|
passnum => 'Warning: number of previous passwords to save must be a positive integer (or blank).', |
|
); |
|
&js_escape(\%intalert); |
|
my $defmin = $Apache::lonnet::passwdmin; |
my $intauthjs = <<"ENDSCRIPT"; |
my $intauthjs = <<"ENDSCRIPT"; |
|
|
function warnIntAuth(field) { |
function warnIntAuth(field) { |
if (field.name == 'intauth_check') { |
if (field.name == 'intauth_check') { |
if (field.value == '2') { |
if (field.value == '2') { |
alert('$intauthcheck'); |
alert('$intalert{authcheck}'); |
} |
} |
} |
} |
if (field.name == 'intauth_cost') { |
if (field.name == 'intauth_cost') { |
Line 9239 function warnIntAuth(field) {
|
Line 9326 function warnIntAuth(field) {
|
if (field.value != '') { |
if (field.value != '') { |
var regexdigit=/^\\d+\$/; |
var regexdigit=/^\\d+\$/; |
if (!regexdigit.test(field.value)) { |
if (!regexdigit.test(field.value)) { |
alert('$intauthcost'); |
alert('$intalert{authcost}'); |
|
} |
|
} |
|
} |
|
return; |
|
} |
|
|
|
function warnIntPass(field) { |
|
field.value.replace(/^\s+/,''); |
|
field.value.replace(/\s+\$/,''); |
|
var regexdigit=/^\\d+\$/; |
|
if (field.name == 'passwords_min') { |
|
if (field.value == '') { |
|
alert('$intalert{passmin}'); |
|
field.value = '$defmin'; |
|
} else { |
|
if (!regexdigit.test(field.value)) { |
|
alert('$intalert{passmin}'); |
|
field.value = '$defmin'; |
|
} |
|
var minval = parseInt(field.value,10); |
|
if (minval < $defmin) { |
|
alert('$intalert{passmin}'); |
|
field.value = '$defmin'; |
|
} |
|
} |
|
} else { |
|
if (field.value == '0') { |
|
field.value = ''; |
|
} |
|
if (field.value != '') { |
|
if (field.name == 'passwords_expire') { |
|
var regexpposnum=/^\\d+(|\\.\\d*)\$/; |
|
if (!regexpposnum.test(field.value)) { |
|
alert('$intalert{passexp}'); |
|
field.value = ''; |
|
} else { |
|
var expval = parseFloat(field.value); |
|
if (expval == 0) { |
|
alert('$intalert{passexp}'); |
|
field.value = ''; |
|
} |
|
} |
|
} else { |
|
if (!regexdigit.test(field.value)) { |
|
if (field.name == 'passwords_max') { |
|
alert('$intalert{passmax}'); |
|
} else { |
|
if (field.name == 'passwords_numsaved') { |
|
alert('$intalert{passnum}'); |
|
} |
|
} |
|
} |
|
field.value = ''; |
} |
} |
} |
} |
} |
} |
Line 10747 sub check_configuser {
|
Line 10887 sub check_configuser {
|
my ($configuserok,%currroles); |
my ($configuserok,%currroles); |
if ($uhome eq 'no_host') { |
if ($uhome eq 'no_host') { |
srand( time() ^ ($$ + ($$ << 15)) ); # Seed rand. |
srand( time() ^ ($$ + ($$ << 15)) ); # Seed rand. |
my $configpass = &LONCAPA::Enrollment::create_password(); |
my $configpass = &LONCAPA::Enrollment::create_password($dom); |
$configuserok = |
$configuserok = |
&Apache::lonnet::modifyuser($dom,$confname,'','internal', |
&Apache::lonnet::modifyuser($dom,$confname,'','internal', |
$configpass,'','','','','',undef,$servadm); |
$configpass,'','','','','',undef,$servadm); |
Line 12625 sub modify_lti {
|
Line 12765 sub modify_lti {
|
} |
} |
} |
} |
} |
} |
|
if ($env{'form.lti_callback_'.$idx}) { |
|
if ($env{'form.lti_callbackparam_'.$idx}) { |
|
my $callback = $env{'form.lti_callbackparam_'.$idx}; |
|
$callback =~ s/^\s+|\s+$//g; |
|
$confhash{$itemid}{'callback'} = $callback; |
|
} |
|
} |
foreach my $field ('passback','roster','topmenu','inlinemenu') { |
foreach my $field ('passback','roster','topmenu','inlinemenu') { |
if ($env{'form.lti_'.$field.'_'.$idx}) { |
if ($env{'form.lti_'.$field.'_'.$idx}) { |
$confhash{$itemid}{$field} = 1; |
$confhash{$itemid}{$field} = 1; |
Line 12650 sub modify_lti {
|
Line 12797 sub modify_lti {
|
} |
} |
} |
} |
unless (($idx eq 'add') || ($changes{$itemid})) { |
unless (($idx eq 'add') || ($changes{$itemid})) { |
foreach my $field ('mapuser','mapcrs','makecrs','section','passback','roster','lcauth','lcauthparm','topmenu','inlinemenu') { |
foreach my $field ('mapuser','mapcrs','makecrs','section','passback','roster','lcauth','lcauthparm','topmenu','inlinemenu','callback') { |
if ($domconfig{$action}{$itemid}{$field} ne $confhash{$itemid}{$field}) { |
if ($domconfig{$action}{$itemid}{$field} ne $confhash{$itemid}{$field}) { |
$changes{$itemid} = 1; |
$changes{$itemid} = 1; |
} |
} |
Line 12876 sub modify_lti {
|
Line 13023 sub modify_lti {
|
} else { |
} else { |
$resulttext .= '<li>'.&mt('No section assignment').'</li>'; |
$resulttext .= '<li>'.&mt('No section assignment').'</li>'; |
} |
} |
|
if ($confhash{$itemid}{'callback'}) { |
|
$resulttext .= '<li>'.&mt('Callback setting').': '.$confhash{$itemid}{'callback'}.'</li>'; |
|
} else { |
|
$resulttext .= '<li>'.&mt('No callback to logout LON-CAPA session when user logs out of Comsumer'); |
|
} |
foreach my $item ('passback','roster','topmenu','inlinemenu') { |
foreach my $item ('passback','roster','topmenu','inlinemenu') { |
$resulttext .= '<li>'.$lt{$item}.': '; |
$resulttext .= '<li>'.$lt{$item}.': '; |
if ($confhash{$itemid}{$item}) { |
if ($confhash{$itemid}{$item}) { |
Line 14405 sub modify_passwords {
|
Line 14557 sub modify_passwords {
|
'intauth_cost' => 10, |
'intauth_cost' => 10, |
'intauth_check' => 0, |
'intauth_check' => 0, |
'intauth_switch' => 0, |
'intauth_switch' => 0, |
'min' => 7, |
|
); |
); |
|
$staticdefaults{'min'} = $Apache::lonnet::passwdmin; |
foreach my $type (@oktypes) { |
foreach my $type (@oktypes) { |
$staticdefaults{'resetpostlink'}{$type} = ['email','username']; |
$staticdefaults{'resetpostlink'}{$type} = ['email','username']; |
} |
} |
Line 14418 sub modify_passwords {
|
Line 14570 sub modify_passwords {
|
if ($current{'resetlink'} ne $linklife) { |
if ($current{'resetlink'} ne $linklife) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
} |
} |
} elsif (!exists($domconfig{passwords})) { |
} elsif (!ref($domconfig{passwords}) eq 'HASH') { |
if ($staticdefaults{'resetlink'} ne $linklife) { |
if ($staticdefaults{'resetlink'} ne $linklife) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
} |
} |
Line 14439 sub modify_passwords {
|
Line 14591 sub modify_passwords {
|
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
} |
} |
} elsif (!exists($domconfig{passwords})) { |
} elsif (!ref($domconfig{passwords}) eq 'HASH') { |
my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetcase'},\@casesens); |
my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetcase'},\@casesens); |
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
Line 14451 sub modify_passwords {
|
Line 14603 sub modify_passwords {
|
if ($current{'resetprelink'} ne $newvalues{'resetprelink'}) { |
if ($current{'resetprelink'} ne $newvalues{'resetprelink'}) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
} |
} |
} elsif (!exists($domconfig{passwords})) { |
} elsif (!ref($domconfig{passwords}) eq 'HASH') { |
if ($staticdefaults{'resetprelink'} ne $newvalues{'resetprelink'}) { |
if ($staticdefaults{'resetprelink'} ne $newvalues{'resetprelink'}) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
} |
} |
Line 14478 sub modify_passwords {
|
Line 14630 sub modify_passwords {
|
} else { |
} else { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
} |
} |
} elsif (!exists($domconfig{passwords})) { |
} elsif (!ref($domconfig{passwords}) eq 'HASH') { |
my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetpostlink'}{$type},\@postlink); |
my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetpostlink'}{$type},\@postlink); |
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
Line 14500 sub modify_passwords {
|
Line 14652 sub modify_passwords {
|
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
} |
} |
} elsif (!exists($domconfig{passwords})) { |
} elsif (!ref($domconfig{passwords}) eq 'HASH') { |
my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetemail'},\@resetemail); |
my @diffs = &Apache::loncommon::compare_arrays($staticdefaults{'resetemail'},\@resetemail); |
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{'reset'} = 1; |
$changes{'reset'} = 1; |
Line 14587 sub modify_passwords {
|
Line 14739 sub modify_passwords {
|
$env{'form.passwords_'.$rule} =~ s/^\s+|\s+$//g; |
$env{'form.passwords_'.$rule} =~ s/^\s+|\s+$//g; |
my $ruleok; |
my $ruleok; |
if ($rule eq 'expire') { |
if ($rule eq 'expire') { |
if ($env{'form.passwords_'.$rule} =~ /^\d+(|\.\d*)$/) { |
if (($env{'form.passwords_'.$rule} =~ /^\d+(|\.\d*)$/) && |
$ruleok = 1; |
($env{'form.passwords_'.$rule} ne '0')) { |
|
$ruleok = 1; |
|
} |
|
} elsif ($rule eq 'min') { |
|
if ($env{'form.passwords_'.$rule} =~ /^\d+$/) { |
|
if ($env{'form.passwords_'.$rule} >= $Apache::lonnet::passwdmin) { |
|
$ruleok = 1; |
|
} |
} |
} |
} elsif ($env{'form.passwords_'.$rule} =~ /^\d+$/) { |
} elsif (($env{'form.passwords_'.$rule} =~ /^\d+$/) && |
|
($env{'form.passwords_'.$rule} ne '0')) { |
$ruleok = 1; |
$ruleok = 1; |
} |
} |
if ($ruleok) { |
if ($ruleok) { |
Line 14628 sub modify_passwords {
|
Line 14788 sub modify_passwords {
|
} |
} |
} |
} |
} |
} |
if ($env{'form.passwords_crsowner'}) { |
my %crsownerchg = ( |
$newvalues{'crsownerchg'} = 1; |
by => [], |
unless ($current{'crsownerchg'}) { |
for => [], |
$changes{'crsownerchg'} = 1; |
); |
|
foreach my $item ('by','for') { |
|
my @posstypes = &Apache::loncommon::get_env_multiple('form.passwords_crsowner_'.$item); |
|
foreach my $type (sort(@posstypes)) { |
|
if (grep(/^\Q$type\E$/,@oktypes)) { |
|
push(@{$crsownerchg{$item}},$type); |
|
} |
|
} |
|
} |
|
$newvalues{'crsownerchg'} = \%crsownerchg; |
|
if (ref($current{'crsownerchg'}) eq 'HASH') { |
|
foreach my $item ('by','for') { |
|
if (ref($current{'crsownerchg'}{$item}) eq 'ARRAY') { |
|
my @diffs = &Apache::loncommon::compare_arrays($current{'crsownerchg'}{$item},$crsownerchg{$item}); |
|
if (@diffs > 0) { |
|
$changes{'crsownerchg'} = 1; |
|
last; |
|
} |
|
} |
|
} |
|
} elsif (!(ref($domconfig{passwords}) eq 'HASH')) { |
|
foreach my $item ('by','for') { |
|
if (@{$crsownerchg{$item}} > 0) { |
|
$changes{'crsownerchg'} = 1; |
|
last; |
|
} |
} |
} |
} elsif ($current{'crsownerchg'}) { |
|
$changes{'crsownerchg'} = 1; |
|
} |
} |
|
|
my %confighash = ( |
my %confighash = ( |
Line 14658 sub modify_passwords {
|
Line 14841 sub modify_passwords {
|
$resulttext .= '<li>'.&mt('CAPTCHA validation set to use: original CAPTCHA').'</li>'; |
$resulttext .= '<li>'.&mt('CAPTCHA validation set to use: original CAPTCHA').'</li>'; |
} elsif ($confighash{'passwords'}{'captcha'} eq 'recaptcha') { |
} elsif ($confighash{'passwords'}{'captcha'} eq 'recaptcha') { |
$resulttext .= '<li>'.&mt('CAPTCHA validation set to use: reCAPTCHA').' '. |
$resulttext .= '<li>'.&mt('CAPTCHA validation set to use: reCAPTCHA').' '. |
&mt('version: [_1]',$confighash{'passwords'}{'recaptchaversion'}).'<br />'. |
&mt('version: [_1]',$confighash{'passwords'}{'recaptchaversion'}).'<br />'; |
&mt('Public key: [_1]',$confighash{'passwords'}{'recaptchapub'}).'</br>'. |
if (ref($confighash{'passwords'}{'recaptchakeys'}) eq 'HASH') { |
&mt('Private key: [_1]',$confighash{'passwords'}{'recaptchapriv'}).'</li>'; |
$resulttext .= &mt('Public key: [_1]',$confighash{'passwords'}{'recaptchakeys'}{'public'}).'</br>'. |
|
&mt('Private key: [_1]',$confighash{'passwords'}{'recaptchakeys'}{'private'}).'</li>'; |
|
} |
} else { |
} else { |
$resulttext .= '<li>'.&mt('No CAPTCHA validation').'</li>'; |
$resulttext .= '<li>'.&mt('No CAPTCHA validation').'</li>'; |
} |
} |
Line 14739 sub modify_passwords {
|
Line 14924 sub modify_passwords {
|
} |
} |
if ($confighash{'passwords'}{'resetcustom'}) { |
if ($confighash{'passwords'}{'resetcustom'}) { |
my $customlink = &Apache::loncommon::modal_link($confighash{'passwords'}{'resetcustom'}, |
my $customlink = &Apache::loncommon::modal_link($confighash{'passwords'}{'resetcustom'}, |
$titles{custom},600,500); |
&mt('custom text'),600,500,undef,undef, |
$resulttext .= '<li>'.&mt('Preamble to "Forgot Password" form includes [_1]',$customlink).'</li>'; |
undef,undef,'background-color:#ffffff'); |
|
$resulttext .= '<li>'.&mt('Preamble to "Forgot Password" form includes: [_1]',$customlink).'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('No custom text included in preamble to "Forgot Password" form').'</li>'; |
$resulttext .= '<li>'.&mt('No custom text included in preamble to "Forgot Password" form').'</li>'; |
} |
} |
Line 14777 sub modify_passwords {
|
Line 14963 sub modify_passwords {
|
if ($confighash{'passwords'}{$rule} eq '') { |
if ($confighash{'passwords'}{$rule} eq '') { |
if ($rule eq 'min') { |
if ($rule eq 'min') { |
$resulttext .= '<li>'.&mt('[_1] not set.',$titles{$rule}); |
$resulttext .= '<li>'.&mt('[_1] not set.',$titles{$rule}); |
' '.&mt('Default of 7 will be used').'</li>'; |
' '.&mt('Default of [_1] will be used', |
|
$Apache::lonnet::passwdmin).'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('[_1] set to none',$titles{$rule}).'</li>'; |
$resulttext .= '<li>'.&mt('[_1] set to none',$titles{$rule}).'</li>'; |
} |
} |
Line 14786 sub modify_passwords {
|
Line 14973 sub modify_passwords {
|
} |
} |
} |
} |
} elsif ($key eq 'crsownerchg') { |
} elsif ($key eq 'crsownerchg') { |
if ($confighash{'passwords'}{'crsownerchg'}) { |
if (ref($confighash{'passwords'}{'crsownerchg'}) eq 'HASH') { |
$resulttext .= '<li>'.&mt('Course owner may change student passwords.').'</li>'; |
if ((@{$confighash{'passwords'}{'crsownerchg'}{'by'}} == 0) || |
|
(@{$confighash{'passwords'}{'crsownerchg'}{'for'}} == 0)) { |
|
$resulttext .= '<li>'.&mt('Course owner may not change student passwords.').'</li>'; |
|
} else { |
|
my %crsownerstr; |
|
foreach my $item ('by','for') { |
|
if (ref($confighash{'passwords'}{'crsownerchg'}{$item}) eq 'ARRAY') { |
|
foreach my $type (@{$confighash{'passwords'}{'crsownerchg'}{$item}}) { |
|
if ($type eq 'default') { |
|
$crsownerstr{$item} .= $othertitle.', '; |
|
} elsif ($usertypes->{$type} ne '') { |
|
$crsownerstr{$item} .= $usertypes->{$type}.', '; |
|
} |
|
} |
|
$crsownerstr{$item} =~ s/\Q, \E$//; |
|
} |
|
} |
|
$resulttext .= '<li>'.&mt('Course owner (with status: [_1]) may change passwords for students (with status: [_2]).', |
|
$crsownerstr{'by'},$crsownerstr{'for'}).'</li>'; |
|
} |
} else { |
} else { |
$resulttext .= '<li>'.&mt('Course owner may not change student passwords.'); |
$resulttext .= '<li>'.&mt('Course owner may not change student passwords.').'</li>'; |
} |
} |
} |
} |
$resulttext .= '</ul></li>'; |
$resulttext .= '</ul></li>'; |
Line 15636 sub modify_selfcreation {
|
Line 15842 sub modify_selfcreation {
|
$chgtext .= &mt('For self-created accounts verified by e-mail address, username is set as follows:'). |
$chgtext .= &mt('For self-created accounts verified by e-mail address, username is set as follows:'). |
'<ul>'; |
'<ul>'; |
foreach my $status (@statuses) { |
foreach my $status (@statuses) { |
if ($type eq 'default') { |
if ($status eq 'default') { |
$chgtext .= '<li>'.$othertitle.' -- '.$options{$cancreate{'emailverified'}{$status}}.'</li>'; |
$chgtext .= '<li>'.$othertitle.' -- '.$options{$cancreate{'emailverified'}{$status}}.'</li>'; |
} else { |
} else { |
$chgtext .= '<li>'.$usertypes{$status}.' -- '.$options{$cancreate{'emailverified'}{$status}}.'</li>'; |
$chgtext .= '<li>'.$usertypes{$status}.' -- '.$options{$cancreate{'emailverified'}{$status}}.'</li>'; |
Line 15905 sub modify_selfcreation {
|
Line 16111 sub modify_selfcreation {
|
} |
} |
|
|
sub process_captcha { |
sub process_captcha { |
my ($container,$changes,$newsettings,$current) = @_; |
my ($container,$changes,$newsettings,$currsettings) = @_; |
return unless ((ref($changes) eq 'HASH') && (ref($newsettings) eq 'HASH') || (ref($current) eq 'HASH')); |
return unless ((ref($changes) eq 'HASH') && (ref($newsettings) eq 'HASH')); |
$newsettings->{'captcha'} = $env{'form.'.$container.'_captcha'}; |
$newsettings->{'captcha'} = $env{'form.'.$container.'_captcha'}; |
unless ($newsettings->{'captcha'} eq 'recaptcha' || $newsettings->{'captcha'} eq 'notused') { |
unless ($newsettings->{'captcha'} eq 'recaptcha' || $newsettings->{'captcha'} eq 'notused') { |
$newsettings->{'captcha'} = 'original'; |
$newsettings->{'captcha'} = 'original'; |
} |
} |
if ($current->{'captcha'} ne $newsettings->{'captcha'}) { |
my %current; |
|
if (ref($currsettings) eq 'HASH') { |
|
%current = %{$currsettings}; |
|
} |
|
if ($current{'captcha'} ne $newsettings->{'captcha'}) { |
if ($container eq 'cancreate') { |
if ($container eq 'cancreate') { |
if (ref($changes->{'cancreate'}) eq 'ARRAY') { |
if (ref($changes->{'cancreate'}) eq 'ARRAY') { |
push(@{$changes->{'cancreate'}},'captcha'); |
push(@{$changes->{'cancreate'}},'captcha'); |
} elsif (!defined($changes->{'cancreate'})) { |
} elsif (!defined($changes->{'cancreate'})) { |
$changes->{'cancreate'} = ['captcha']; |
$changes->{'cancreate'} = ['captcha']; |
} |
} |
|
} elsif ($container eq 'passwords') { |
|
$changes->{'reset'} = 1; |
} else { |
} else { |
$changes->{'captcha'} = 1; |
$changes->{'captcha'} = 1; |
} |
} |
Line 15939 sub process_captcha {
|
Line 16151 sub process_captcha {
|
} |
} |
$newsettings->{'recaptchaversion'} = $newversion; |
$newsettings->{'recaptchaversion'} = $newversion; |
} |
} |
if (ref($current->{'recaptchakeys'}) eq 'HASH') { |
if (ref($current{'recaptchakeys'}) eq 'HASH') { |
$currpub = $current->{'recaptchakeys'}{'public'}; |
$currpub = $current{'recaptchakeys'}{'public'}; |
$currpriv = $current->{'recaptchakeys'}{'private'}; |
$currpriv = $current{'recaptchakeys'}{'private'}; |
unless ($newsettings->{'captcha'} eq 'recaptcha') { |
unless ($newsettings->{'captcha'} eq 'recaptcha') { |
$newsettings->{'recaptchakeys'} = { |
$newsettings->{'recaptchakeys'} = { |
public => '', |
public => '', |
Line 15949 sub process_captcha {
|
Line 16161 sub process_captcha {
|
} |
} |
} |
} |
} |
} |
if ($current->{'captcha'} eq 'recaptcha') { |
if ($current{'captcha'} eq 'recaptcha') { |
$currversion = $current->{'recaptchaversion'}; |
$currversion = $current{'recaptchaversion'}; |
if ($currversion ne '2') { |
if ($currversion ne '2') { |
$currversion = 1; |
$currversion = 1; |
} |
} |
Line 15962 sub process_captcha {
|
Line 16174 sub process_captcha {
|
} elsif (!defined($changes->{'cancreate'})) { |
} elsif (!defined($changes->{'cancreate'})) { |
$changes->{'cancreate'} = ['recaptchaversion']; |
$changes->{'cancreate'} = ['recaptchaversion']; |
} |
} |
|
} elsif ($container eq 'passwords') { |
|
$changes->{'reset'} = 1; |
} else { |
} else { |
$changes->{'recaptchaversion'} = 1; |
$changes->{'recaptchaversion'} = 1; |
} |
} |
Line 15973 sub process_captcha {
|
Line 16187 sub process_captcha {
|
} elsif (!defined($changes->{'cancreate'})) { |
} elsif (!defined($changes->{'cancreate'})) { |
$changes->{'cancreate'} = ['recaptchakeys']; |
$changes->{'cancreate'} = ['recaptchakeys']; |
} |
} |
|
} elsif ($container eq 'passwords') { |
|
$changes->{'reset'} = 1; |
} else { |
} else { |
$changes->{'recaptchakeys'} = 1; |
$changes->{'recaptchakeys'} = 1; |
} |
} |
Line 16768 sub modify_coursecategories {
|
Line 16984 sub modify_coursecategories {
|
} |
} |
$resulttext .= '</ul></li>'; |
$resulttext .= '</ul></li>'; |
} |
} |
|
&Apache::lonnet::do_cache_new('cats',$dom,$cathash,3600); |
|
if (ref($lastactref) eq 'HASH') { |
|
$lastactref->{'cats'} = 1; |
|
} |
} |
} |
$resulttext .= '</ul>'; |
$resulttext .= '</ul>'; |
if ($changes{'unauth'} || $changes{'auth'}) { |
if ($changes{'unauth'} || $changes{'auth'}) { |
Line 19548 sub devalidate_remote_domconfs {
|
Line 19768 sub devalidate_remote_domconfs {
|
my %thismachine; |
my %thismachine; |
map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); |
map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); |
my @posscached = ('domainconfig','domdefaults','ltitools','usersessions', |
my @posscached = ('domainconfig','domdefaults','ltitools','usersessions', |
'directorysrch','passwdconf'); |
'directorysrch','passwdconf','cats'); |
if (keys(%servers)) { |
if (keys(%servers)) { |
foreach my $server (keys(%servers)) { |
foreach my $server (keys(%servers)) { |
next if ($thismachine{$server}); |
next if ($thismachine{$server}); |