--- loncom/interface/loncreateuser.pm 2024/09/03 03:45:35 1.482 +++ loncom/interface/loncreateuser.pm 2025/01/13 01:00:58 1.483 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.482 2024/09/03 03:45:35 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.483 2025/01/13 01:00:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2917,6 +2917,24 @@ sub personal_data_display { $rowcount ++; } } + my %shownfields; + if ($env{'request.role.domain'} ne $ccdomain) { + my %shownfields_by_type = + &Apache::lonuserutils::get_othdom_shownfields($ccdomain,\@userinfo); + my @types = split(/:/,$userenv{'inststatus'}); + if (@types == 0) { + @types = ('default'); + } + foreach my $type (@types) { + if (ref($shownfields_by_type{$type}) eq 'HASH') { + foreach my $field (keys(%{$shownfields_by_type{$type}})) { + if ($shownfields_by_type{$type}{$field}) { + $shownfields{$field} = 1; + } + } + } + } + } foreach my $item (@userinfo) { my $rowtitle = $lt{$item}; my $hiderow = 0; @@ -2963,7 +2981,15 @@ sub personal_data_display { $row .= '
'.&Apache::lonuserutils::forceid_change($context); } } else { - $row .= $userenv{$item}; + if ($env{'request.role.domain'} ne $ccdomain) { + if ($shownfields{$item}) { + $row .= $userenv{$item}; + } else { + $row .= &mt('not shown'); + } + } else { + $row .= $userenv{$item}; + } } } $row .= &Apache::lonhtmlcommon::row_closure(1);