version 1.444, 2024/10/11 23:29:34
|
version 1.451, 2025/03/13 14:28:53
|
Line 2009 sub commblocktype_text {
|
Line 2009 sub commblocktype_text {
|
'passwd' => 'Change Password', |
'passwd' => 'Change Password', |
'grades' => 'Gradebook', |
'grades' => 'Gradebook', |
'search' => 'Course search', |
'search' => 'Course search', |
|
'index' => 'Course content index', |
'wishlist' => 'Stored links', |
'wishlist' => 'Stored links', |
'annotate' => 'Annotations', |
'annotate' => 'Annotations', |
); |
); |
my $typeorder = ['com','chat','boards','port','groups','blogs','about','wishlist','printout','grades','search','annotate','passwd']; |
my $typeorder = ['com','chat','boards','port','groups','blogs','about','wishlist','printout','grades','search','index','annotate','passwd']; |
return ($typeorder,\%types); |
return ($typeorder,\%types); |
} |
} |
|
|
Line 2021 sub print_rolecolors {
|
Line 2022 sub print_rolecolors {
|
my %choices = &color_font_choices(); |
my %choices = &color_font_choices(); |
my @bgs = ('pgbg','tabbg','sidebg'); |
my @bgs = ('pgbg','tabbg','sidebg'); |
my @links = ('link','alink','vlink'); |
my @links = ('link','alink','vlink'); |
my @images = ('img'); |
my @images = (); |
my %alt_text = &Apache::lonlocal::texthash(img => "Banner for $role role"); |
my %alt_text = &Apache::lonlocal::texthash(img => "Banner for $role role"); |
my %designhash = &Apache::loncommon::get_domainconf($dom); |
my %designhash = &Apache::loncommon::get_domainconf($dom); |
my %defaultdesign = %Apache::loncommon::defaultdesign; |
my %defaultdesign = %Apache::loncommon::defaultdesign; |
Line 2029 sub print_rolecolors {
|
Line 2030 sub print_rolecolors {
|
my %defaults = &role_defaults($role,\@bgs,\@links,\@images); |
my %defaults = &role_defaults($role,\@bgs,\@links,\@images); |
if (ref($settings) eq 'HASH') { |
if (ref($settings) eq 'HASH') { |
if (ref($settings->{$role}) eq 'HASH') { |
if (ref($settings->{$role}) eq 'HASH') { |
if ($settings->{$role}->{'img'} ne '') { |
|
$designs{'img'} = $settings->{$role}->{'img'}; |
|
$is_custom{'img'} = 1; |
|
} |
|
if ($settings->{$role}->{'font'} ne '') { |
if ($settings->{$role}->{'font'} ne '') { |
$designs{'font'} = $settings->{$role}->{'font'}; |
$designs{'font'} = $settings->{$role}->{'font'}; |
$is_custom{'font'} = 1; |
$is_custom{'font'} = 1; |
Line 2055 sub print_rolecolors {
|
Line 2052 sub print_rolecolors {
|
} |
} |
} |
} |
} else { |
} else { |
if ($designhash{$dom.'.'.$role.'.img'} ne '') { |
|
$designs{img} = $designhash{$dom.'.'.$role.'.img'}; |
|
$is_custom{'img'} = 1; |
|
} |
|
if ($designhash{$dom.'.'.$role.'.fontmenu'} ne '') { |
if ($designhash{$dom.'.'.$role.'.fontmenu'} ne '') { |
$designs{fontmenu} = $designhash{$dom.'.'.$role.'.fontmenu'}; |
$designs{fontmenu} = $designhash{$dom.'.'.$role.'.fontmenu'}; |
$is_custom{'fontmenu'} = 1; |
$is_custom{'fontmenu'} = 1; |
Line 2108 sub role_defaults {
|
Line 2101 sub role_defaults {
|
} |
} |
} else { |
} else { |
%defaults = ( |
%defaults = ( |
img => $defaultdesign{$role.'.img'}, |
|
font => $defaultdesign{$role.'.font'}, |
font => $defaultdesign{$role.'.font'}, |
fontmenu => $defaultdesign{$role.'.fontmenu'}, |
fontmenu => $defaultdesign{$role.'.fontmenu'}, |
); |
); |
Line 5407 sub print_ltitools {
|
Line 5399 sub print_ltitools {
|
return $datatable; |
return $datatable; |
} |
} |
|
|
sub ltitools_names { |
|
my %lt = &Apache::lonlocal::texthash( |
|
'title' => 'Title', |
|
'version' => 'Version', |
|
'msgtype' => 'Message Type', |
|
'sigmethod' => 'Signature Method', |
|
'url' => 'URL', |
|
'key' => 'Key', |
|
'lifetime' => 'Nonce lifetime (s)', |
|
'secret' => 'Secret', |
|
'icon' => 'Icon', |
|
'user' => 'User', |
|
'fullname' => 'Full Name', |
|
'firstname' => 'First Name', |
|
'lastname' => 'Last Name', |
|
'email' => 'E-mail', |
|
'roles' => 'Role', |
|
'window' => 'Window', |
|
'tab' => 'Tab', |
|
'iframe' => 'iFrame', |
|
'height' => 'Height', |
|
'width' => 'Width', |
|
'linktext' => 'Default Link Text', |
|
'explanation' => 'Default Explanation', |
|
'passback' => 'Tool can return grades:', |
|
'roster' => 'Tool can retrieve roster:', |
|
'crstarget' => 'Display target', |
|
'crslabel' => 'Course label', |
|
'crstitle' => 'Course title', |
|
'crslinktext' => 'Link Text', |
|
'crsexplanation' => 'Explanation', |
|
'crsappend' => 'Provider URL', |
|
); |
|
return %lt; |
|
} |
|
|
|
sub secrets_form { |
sub secrets_form { |
my ($dom,$context,$encrypt,$privkeys,$rowtotal) = @_; |
my ($dom,$context,$encrypt,$privkeys,$rowtotal) = @_; |
my @ids=&Apache::lonnet::current_machine_ids(); |
my @ids=&Apache::lonnet::current_machine_ids(); |
Line 12148 sub modifiable_userdata_row {
|
Line 12104 sub modifiable_userdata_row {
|
my $hashref; |
my $hashref; |
if ($context eq 'lti') { |
if ($context eq 'lti') { |
if (ref($settings) eq 'HASH') { |
if (ref($settings) eq 'HASH') { |
$hashref = $settings->{'instdata'}; |
my %instdata; |
|
if (ref($settings->{'instdata'}) eq 'ARRAY') { |
|
map { $instdata{$_} = 1; } @{$settings->{'instdata'}}; |
|
} |
|
$hashref = \%instdata; |
} |
} |
} elsif ($context eq 'privacy') { |
} elsif ($context eq 'privacy') { |
my ($key,$inner) = split(/_/,$role); |
my ($key,$inner) = split(/_/,$role); |
Line 12159 sub modifiable_userdata_row {
|
Line 12119 sub modifiable_userdata_row {
|
} |
} |
} elsif (ref($settings->{$context}) eq 'HASH') { |
} elsif (ref($settings->{$context}) eq 'HASH') { |
if (ref($settings->{$context}->{$role}) eq 'HASH') { |
if (ref($settings->{$context}->{$role}) eq 'HASH') { |
$hashref = $settings->{'lti_instdata'}; |
$hashref = $settings->{$context}->{$role}; |
} |
} |
if ($role eq 'emailusername') { |
if ($role eq 'emailusername') { |
if ($statustype) { |
if ($statustype) { |
Line 13134 sub check_exempt_addresses {
|
Line 13094 sub check_exempt_addresses {
|
sub color_font_choices { |
sub color_font_choices { |
my %choices = |
my %choices = |
&Apache::lonlocal::texthash ( |
&Apache::lonlocal::texthash ( |
img => "Header", |
|
bgs => "Background colors", |
bgs => "Background colors", |
links => "Link colors", |
links => "Link colors", |
images => "Images", |
images => "Images", |
Line 13189 sub modify_ipaccess {
|
Line 13148 sub modify_ipaccess {
|
foreach my $idx (@items) { |
foreach my $idx (@items) { |
my $itemid = $itemids{$idx}; |
my $itemid = $itemids{$idx}; |
next unless ($itemid); |
next unless ($itemid); |
my %current; |
my ($position,%current); |
unless ($idx eq 'add') { |
if ($idx eq 'add') { |
|
$position = $env{'form.ipaccess_pos_add'}; |
|
} else { |
|
$position = $env{'form.ipaccess_pos_'.$itemid}; |
if (ref($domconfig{'ipaccess'}{$itemid}) eq 'HASH') { |
if (ref($domconfig{'ipaccess'}{$itemid}) eq 'HASH') { |
%current = %{$domconfig{'ipaccess'}{$itemid}}; |
%current = %{$domconfig{'ipaccess'}{$itemid}}; |
} |
} |
} |
} |
my $position = $env{'form.ipaccess_pos_'.$itemid}; |
|
$position =~ s/\D+//g; |
$position =~ s/\D+//g; |
if ($position ne '') { |
if ($position ne '') { |
$allpos[$position] = $itemid; |
$allpos[$position] = $itemid; |
Line 13728 sub modify_colors {
|
Line 13689 sub modify_colors {
|
@images = ('img','logo','domlogo','login'); |
@images = ('img','logo','domlogo','login'); |
@bgs = ('pgbg','mainbg','sidebg'); |
@bgs = ('pgbg','mainbg','sidebg'); |
} else { |
} else { |
@images = ('img'); |
@images = (); |
@bgs = ('pgbg','tabbg','sidebg'); |
@bgs = ('pgbg','tabbg','sidebg'); |
} |
} |
my %defaults = &role_defaults($role,\@bgs,\@links,\@images,\@logintext); |
my %defaults = &role_defaults($role,\@bgs,\@links,\@images,\@logintext); |
Line 13754 sub modify_colors {
|
Line 13715 sub modify_colors {
|
if ($env{'form.'.$role.'_fontmenu'} =~ /^\w+/) { |
if ($env{'form.'.$role.'_fontmenu'} =~ /^\w+/) { |
$env{'form.'.$role.'_fontmenu'} = '#'.$env{'form.'.$role.'_fontmenu'}; |
$env{'form.'.$role.'_fontmenu'} = '#'.$env{'form.'.$role.'_fontmenu'}; |
} |
} |
unless($env{'form.'.$role.'_fontmenu'} eq lc($defaults{'fontmenu'})) { |
unless ($env{'form.'.$role.'_fontmenu'} eq lc($defaults{'fontmenu'})) { |
$confhash->{$role}{'fontmenu'} = $env{'form.'.$role.'_fontmenu'}; |
$confhash->{$role}{'fontmenu'} = $env{'form.'.$role.'_fontmenu'}; |
} |
} |
} |
} |
Line 16094 sub modify_lti {
|
Line 16055 sub modify_lti {
|
} |
} |
my @possinstdata = &Apache::loncommon::get_env_multiple('form.lti_instdata_'.$idx); |
my @possinstdata = &Apache::loncommon::get_env_multiple('form.lti_instdata_'.$idx); |
if (@possinstdata) { |
if (@possinstdata) { |
foreach my $field (@possinstdata) { |
foreach my $field (sort(@possinstdata)) { |
if (exists($fieldtitles{$field})) { |
if (exists($fieldtitles{$field})) { |
push(@{$confhash{$itemid}{'instdata'}}); |
push(@{$confhash{$itemid}{'instdata'}},$field); |
} |
} |
} |
} |
} |
} |
Line 16258 sub modify_lti {
|
Line 16219 sub modify_lti {
|
} |
} |
} |
} |
unless ($changes{$itemid}) { |
unless ($changes{$itemid}) { |
foreach my $field ('makeuser','lcmenu') { |
foreach my $field ('makeuser','lcmenu','instdata') { |
if (ref($currlti{$field}) eq 'ARRAY') { |
if (ref($currlti{$field}) eq 'ARRAY') { |
if (ref($confhash{$itemid}{$field}) eq 'ARRAY') { |
if (ref($confhash{$itemid}{$field}) eq 'ARRAY') { |
my @diffs = &Apache::loncommon::compare_arrays($currlti{$field}, |
my @diffs = &Apache::loncommon::compare_arrays($currlti{$field}, |
Line 16472 sub modify_lti {
|
Line 16433 sub modify_lti {
|
$resulttext .= '<li>'.&mt('Institutional data will be used when creating a new user for: [_1]', |
$resulttext .= '<li>'.&mt('Institutional data will be used when creating a new user for: [_1]', |
join(', ',map { $fieldtitles{$_}; } @{$confhash{$itemid}{'instdata'}})).'</li>'; |
join(', ',map { $fieldtitles{$_}; } @{$confhash{$itemid}{'instdata'}})).'</li>'; |
} else { |
} else { |
$resulttext .= '<li>'.&mt('No institutional data used when creating a new user.').'</li>'; |
$resulttext .= '<li>'.&mt('No institutional data used when creating a new user').'</li>'; |
} |
} |
|
} else { |
|
$resulttext .= '<li>'.&mt('No institutional data used when creating a new user').'</li>'; |
} |
} |
foreach my $item ('topmenu','inlinemenu') { |
foreach my $item ('topmenu','inlinemenu') { |
$resulttext .= '<li>'.$lt{$item}.': '; |
$resulttext .= '<li>'.$lt{$item}.': '; |
Line 17984 sub modify_privacy {
|
Line 17947 sub modify_privacy {
|
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{$status} = 1; |
$changes{$status} = 1; |
} |
} |
|
} elsif (@newvalues > 0) { |
|
$changes{$status} = 1; |
} |
} |
} else { |
} else { |
my @stdfields; |
my @stdfields; |
Line 18023 sub modify_privacy {
|
Line 17988 sub modify_privacy {
|
if (@diffs > 0) { |
if (@diffs > 0) { |
$changes{'othdom'} = 1; |
$changes{'othdom'} = 1; |
} |
} |
|
} elsif (@newvalues > 0) { |
|
$changes{'othdom'} = 1; |
} |
} |
} else { |
} else { |
my @stdfields = ('lastname','firstname','middlename','generation','permanentemail'); |
my @stdfields = ('lastname','firstname','middlename','generation','permanentemail'); |