[LON-CAPA-cvs] cvs: loncom /interface lonrequestcourse.pm
raeburn
raeburn@source.lon-capa.org
Fri, 01 Jan 2010 23:17:31 -0000
raeburn Fri Jan 1 23:17:31 2010 EDT
Modified files:
/loncom/interface lonrequestcourse.pm
Log:
- Set start date for requestor's roles (excluding student) to
1 second before last role refresh time, so role switcher will be functional.
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.41 loncom/interface/lonrequestcourse.pm:1.42
--- loncom/interface/lonrequestcourse.pm:1.41 Thu Dec 10 18:21:22 2009
+++ loncom/interface/lonrequestcourse.pm Fri Jan 1 23:17:31 2010
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Request a course
#
-# $Id: lonrequestcourse.pm,v 1.41 2009/12/10 18:21:22 raeburn Exp $
+# $Id: lonrequestcourse.pm,v 1.42 2010/01/01 23:17:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3000,7 +3000,14 @@
@roles = ($ccrole);
}
foreach my $role (@roles) {
- my $start = $now;
+ my $refresh=$env{'user.refresh.time'};
+ if ($refresh eq '') {
+ $refresh = $env{'user.login.time'};
+ }
+ if ($refresh eq '') {
+ $refresh = $now;
+ }
+ my $start = $refresh-1;
my $end = '0';
if ($role eq 'st') {
if ($details->{'accessstart'} ne '') {