--- loncom/interface/loncoursequeueadmin.pm 2011/03/07 02:13:02 1.27 +++ loncom/interface/loncoursequeueadmin.pm 2011/08/26 15:57:56 1.28 @@ -1,7 +1,7 @@ # The LearningOnline Network # Utilities to administer domain course requests and course self-enroll requests # -# $Id: loncoursequeueadmin.pm,v 1.27 2011/03/07 02:13:02 raeburn Exp $ +# $Id: loncoursequeueadmin.pm,v 1.28 2011/08/26 15:57:56 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -482,7 +482,7 @@ sub update_request_queue { mt => 'Your request for enrollment has been approved.', }, { - mt => 'Visit [_1], to log-in and access the course', + mt => 'Visit [_1] to log-in and access the course', args => [$firsturl], }]; $rejectedmsg = [{ @@ -497,7 +497,6 @@ sub update_request_queue { $queue = 'pending'; } %requesthash = &Apache::lonnet::dump_dom($namespace,$cdom,'_'.$queue); - $firsturl= &course_portal_url($cnum,$cdom); my %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$cdom); if (ref($domconfig{'requestcourses'}) eq 'HASH') { if (ref($domconfig{'requestcourses'}{'notify'}) eq 'HASH') { @@ -509,8 +508,8 @@ sub update_request_queue { mt => 'Your course request has been approved.', }, { - mt => 'Visit [_1], to log-in and access the course', - args => [$firsturl], + mt => 'Visit [_1] to log-in and access the course', + args => [], }]; $rejectionmsg{'course'} = [{ @@ -522,8 +521,8 @@ sub update_request_queue { mt => 'Your community request has been approved.', }, { - mt => 'Visit [_1], to log-in and access the community', - args => [$firsturl], + mt => 'Visit [_1] to log-in and access the community', + args => [], }]; $rejectionmsg{'community'} = @@ -645,6 +644,12 @@ sub update_request_queue { } else { $approvedmsg = $approvalmsg{'course'}; } + my $firsturl = &course_portal_url($cnum,$cdom); + if (ref($approvedmsg) eq 'ARRAY') { + if (ref($approvedmsg->[1]) eq 'HASH') { + $approvedmsg->[1]->{'args'} = [$firsturl]; + } + } push(@completed,$cnum); unless (&Apache::lonnet::del_dom($namespace,[$cnum.'_'.$queue],$cdom) eq 'ok') { @@ -1432,7 +1437,7 @@ sub process_official_reqs { args => [$cdescr], }, { - mt => 'Visit [_1], to log-in and access the course.', + mt => 'Visit [_1] to log-in and access the course.', args => [$firsturl], }, {