version 1.1, 2008/05/19 17:13:06
|
version 1.5, 2014/01/08 17:18:11
|
Line 53 sub handler {
|
Line 53 sub handler {
|
&Apache::loncommon::get_unprocessed_cgi |
&Apache::loncommon::get_unprocessed_cgi |
($ENV{'QUERY_STRING'},['form','roledom','sortby']); |
($ENV{'QUERY_STRING'},['form','roledom','sortby']); |
my $then=$env{'user.login.time'}; |
my $then=$env{'user.login.time'}; |
|
my $update=$env{'user.update.time'}; |
|
if (!$update) { |
|
$update = $then; |
|
} |
my (%dcroles,%dom_roles,$earlyout,$domdesc); |
my (%dcroles,%dom_roles,$earlyout,$domdesc); |
my $numdc = &Apache::lonroles::check_fordc(\%dcroles,$then); |
my $numdc = &Apache::lonroles::check_fordc(\%dcroles,$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 63 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 Construction 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 cannot choose a Construction 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 cannot choose a Construction 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 118 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 Construction 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; |