[LON-CAPA-cvs] cvs: loncom /interface selfenroll.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 08 Jul 2008 01:55:54 -0000
raeburn Mon Jul 7 21:55:54 2008 EDT
Modified files:
/loncom/interface selfenroll.pm
Log:
- Do not append 'none' to the course role passed to &jump_to_role() if there is no section.
Index: loncom/interface/selfenroll.pm
diff -u loncom/interface/selfenroll.pm:1.6 loncom/interface/selfenroll.pm:1.7
--- loncom/interface/selfenroll.pm:1.6 Mon Jun 30 13:04:11 2008
+++ loncom/interface/selfenroll.pm Mon Jul 7 21:55:52 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Allow users to self-enroll in a course
#
-# $Id: selfenroll.pm,v 1.6 2008/06/30 17:04:11 raeburn Exp $
+# $Id: selfenroll.pm,v 1.7 2008/07/08 01:55:52 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -92,9 +92,6 @@
foreach my $key (keys(%env)) {
if ($key =~ m-^user\.role\.st\./$cdom/$cnum/?(\w*)$-) {
my $sec = $1;
- if ($sec eq '') {
- $sec = &mt('none');
- }
my ($start,$end) = split(/\./,$env{$key});
my $status = 'active';
if (($end) && ($end<=$now)) {
@@ -106,6 +103,9 @@
if ($status eq 'active' || $status eq 'future') {
$curr_role{'status'} = $status;
$curr_role{'section'} = $sec;
+ if ($curr_role{'section'} eq '') {
+ $curr_role{'section'} = &mt('none');
+ }
$curr_role{'start'} = &Apache::lonlocal::locallocaltime($start);
$curr_role{'role'} = 'st./'.$cdom.'/'.$cnum;
if ($sec ne '') {