[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm
raeburn
raeburn at source.lon-capa.org
Wed Aug 15 12:56:53 EDT 2012
raeburn Wed Aug 15 16:56:53 2012 EDT
Modified files:
/loncom/auth lonroles.pm
Log:
- Remove routines which are no loger used
(equivalents from loncoursequeueadmin.pm used instead).
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.272 loncom/auth/lonroles.pm:1.273
--- loncom/auth/lonroles.pm:1.272 Wed Aug 15 14:37:23 2012
+++ loncom/auth/lonroles.pm Wed Aug 15 16:56:52 2012
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# User Roles Screen
#
-# $Id: lonroles.pm,v 1.272 2012/08/15 14:37:23 raeburn Exp $
+# $Id: lonroles.pm,v 1.273 2012/08/15 16:56:52 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -799,7 +799,7 @@
my ($requestauthor,$requestcrs);
unless ($reqauthor) {
if ($env{'environment.canrequest.author'}) {
- unless (&is_active_author()) {
+ unless (&Apache::loncoursequeueadmin::is_active_author()) {
my ($status,$timestamp) = split(/:/,$env{'environment.requestauthorqueued'});
if ($status eq 'approval') {
$requestauthor = &mt('A request for authoring space submitted on [_1] is awaiting approval',&Apache::lonlocal::locallocaltime($timestamp));
@@ -1049,33 +1049,6 @@
return OK;
}
-sub is_active_author {
- if ($env{'user.role.au./'.$env{'user.domain'}.'/'} =~ /^(\d*)\.(\d*)$/) {
- if ((!$1 || $1 < time) &&
- (!$2 || $2 > time)) {
- return 1;
- }
- }
- return;
-}
-
-sub reqauthor_check {
- my $queued = $env{'environment.requestauthorqueued'};
- my %reqauthor = &Apache::lonnet::get('requestauthor',['author_status','author'],
- $env{'user.domain'},$env{'user.name'});
- my $reqstatus = $reqauthor{'author_status'};
- if (($reqstatus eq '' && $queued ne '') ||
- ($env{'environment.requestauthorqueued'} !~ /^\Q$reqstatus\E/)) {
- if (ref($reqauthor{'author'}) eq 'HASH') {
- $queued = $reqstatus.':'.$reqauthor{'author'}{'timestamp'};
- } else {
- undef($queued);
- }
- &Apache::lonnet::appenv({'environment.requestauthorqueued' => $queued});
- }
- return $queued;
-}
-
sub gather_roles {
my ($update,$refresh,$now,$reinit,$nochoose,$roletext,$sortrole,$roleclass,$futureroles,$timezones,$loncaparev) = @_;
my ($countactive,$countfuture,$inrole,$possiblerole) = (0,0,0,'');
More information about the LON-CAPA-cvs
mailing list