'.&mt('Following roles may create user accounts: [_1]',
- join(', ',@{$confhash{$itemid}{'makeuser'}})).' ';
- if ($confhash{$itemid}{'lcauth'} eq 'lti') {
- $resulttext .= &mt('New users will only be able to authenticate via LTI').'
';
- } else {
- $resulttext .= &mt('New users will be assigned LON-CAPA authentication: [_1]',
- $confhash{$itemid}{'lcauth'});
- if ($confhash{$itemid}{'lcauth'} eq 'internal') {
- $resulttext .= '; '.&mt('a randomly generated password will be created');
- } elsif ($confhash{$itemid}{'lcauth'} eq 'localauth') {
- if ($confhash{$itemid}{'lcauthparm'} ne '') {
- $resulttext .= ' '.&mt('with argument: [_1]',$confhash{$itemid}{'lcauthparm'});
- }
+ if (ref($confhash{$itemid}{'maproles'}) eq 'HASH') {
+ my $rolemaps;
+ foreach my $role (@ltiroles) {
+ if ($confhash{$itemid}{'maproles'}{$role}) {
+ $rolemaps .= (' 'x2).$role.'='.
+ &Apache::lonnet::plaintext($confhash{$itemid}{'maproles'}{$role},
+ 'Course').',';
+ }
+ }
+ if ($rolemaps) {
+ $rolemaps =~ s/,$//;
+ $resulttext .= '
'.&mt('Following roles may create user accounts: [_1]',
+ join(', ',@{$confhash{$itemid}{'makeuser'}})).' ';
+ if ($confhash{$itemid}{'lcauth'} eq 'lti') {
+ $resulttext .= &mt('New users will only be able to authenticate via LTI').'
';
}
- }
- if (ref($confhash{$itemid}{'instdata'}) eq 'ARRAY') {
- if (@{$confhash{$itemid}{'instdata'}} > 0) {
- $resulttext .= '
'.&mt('Institutional data will be used when creating a new user for: [_1]',
- join(', ',map { $fieldtitles{$_}; } @{$confhash{$itemid}{'instdata'}})).'
';
- } else {
- $resulttext .= '
'.&mt('No institutional data used when creating a new user.').'
';
+ if (ref($confhash{$itemid}{'instdata'}) eq 'ARRAY') {
+ if (@{$confhash{$itemid}{'instdata'}} > 0) {
+ $resulttext .= '
'.&mt('Institutional data will be used when creating a new user for: [_1]',
+ join(', ',map { $fieldtitles{$_}; } @{$confhash{$itemid}{'instdata'}})).'
';
+ } else {
+ $resulttext .= '
'.&mt('No institutional data used when creating a new user.').'