--- loncom/auth/lonroles.pm 2003/05/21 20:10:53 1.57 +++ loncom/auth/lonroles.pm 2003/06/18 13:13:10 1.60 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.57 2003/05/21 20:10:53 www Exp $ +# $Id: lonroles.pm,v 1.60 2003/06/18 13:13:10 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -152,10 +152,23 @@ ENDENTERKEY unless ($ENV{'request.course.id'}) { &Apache::lonnet::appenv( "request.course.id" => $cdom.'_'.$cnum); - $furl='/adm/notfound.html'; + $furl='/adm/roles'; $msg= - '

Could not initialize top-level map.

'; + '

Could not initialize course at this time.

Please try again.

'; } + + # Check to see if the user is a CC entering a course + # for the first time + my (undef, undef, $role, $courseid) = split(/\./, $envkey); + if (substr($courseid, 0, 1) eq '/') { + $courseid = substr($courseid, 1); + } + $courseid =~ s/\//_/; + if ($role eq 'cc' && $ENV{'course.' . $courseid . + '.course.helper.not.run'}) { + $furl = "/adm/helper/course.initialization.helper"; + } + $r->content_type('text/html'); &Apache::loncommon::no_cache($r); $r->send_http_header; @@ -263,7 +276,7 @@ ENDHEADER $r->print("Author and Co-Author roles may not be available on ". "servers other than your home server."); } else { - $r->print("

Enter a Course

\n"); + $r->print("

Select a Course to Enter

\n"); } if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) { $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};