version 1.4, 2013/06/04 22:32:23
|
version 1.7, 2017/03/15 20:18:06
|
Line 57 sub handler {
|
Line 57 sub handler {
|
if (!$update) { |
if (!$update) { |
$update = $then; |
$update = $then; |
} |
} |
my (%dcroles,%dom_roles,$earlyout,$domdesc); |
my (%dcroles,%helpdeskroles,%dom_roles,$earlyout,$domdesc); |
my $numdc = &Apache::lonroles::check_fordc(\%dcroles,$update,$then); |
my ($numdc) = &Apache::lonroles::check_for_adhoc(\%dcroles,\%helpdeskroles,$update,$then); |
if ($env{'form.roledom'} ne '') { |
if ($env{'form.roledom'} ne '') { |
$domdesc = &Apache::lonnet::domain($env{'form.roledom'}); |
$domdesc = &Apache::lonnet::domain($env{'form.roledom'}); |
if ($domdesc eq '') { |
if ($domdesc eq '') { |
Line 67 sub handler {
|
Line 67 sub handler {
|
if ($dcroles{$env{'form.roledom'}}) { |
if ($dcroles{$env{'form.roledom'}}) { |
%dom_roles = &Apache::lonnet::get_domain_roles($env{'form.roledom'},['au']); |
%dom_roles = &Apache::lonnet::get_domain_roles($env{'form.roledom'},['au']); |
if (keys(%dom_roles) == 0) { |
if (keys(%dom_roles) == 0) { |
$earlyout = &mt('There are no library servers containing Authoring spaces currently in domain: [_1], so you can not assume a co-author role.',$domdesc); |
$earlyout = &mt('There are no library servers containing Authoring Spaces currently in domain: [_1], so you can not assume a co-author role.',$domdesc); |
} |
} |
} else { |
} else { |
$earlyout = &mt('You do not have a domain coordinator role in domain: [_1], so you cannot choose an Authoring space for which you can assume a co-author role.',$domdesc); |
$earlyout = &mt('You do not have a domain coordinator role in domain: [_1], so you cannot choose an Authoring Space for which you can assume a co-author role.',$domdesc); |
} |
} |
} else { |
} else { |
$earlyout = &mt('You do not have a domain coordinator role, so you cannot choose an Authoring space for which you can assume a co-author role.'); |
$earlyout = &mt('You do not have a domain coordinator role, so you cannot choose an Authoring Space for which you can assume a co-author role.'); |
} |
} |
} else { |
} else { |
$earlyout = &mt('Invalid domain'); |
$earlyout = &mt('Invalid domain'); |
Line 122 ENDSCRIPT
|
Line 122 ENDSCRIPT
|
$r->print('<input type="hidden" name="roledom" value="'.$env{'form.roledom'}.'" />'."\n". |
$r->print('<input type="hidden" name="roledom" value="'.$env{'form.roledom'}.'" />'."\n". |
'<input type="hidden" name="form" value="'.$env{'form.form'}.'" /></form>'); |
'<input type="hidden" name="form" value="'.$env{'form.form'}.'" /></form>'); |
} else { |
} else { |
$r->print(&mt('There are no author roles currently in domain: [_1], so there are no Authoring spaces for which you can assume a co-author role.',$domdesc)); |
$r->print(&mt('There are no author roles currently in domain: [_1], so there are no Authoring Spaces for which you can assume a co-author role.',$domdesc)); |
} |
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |