--- loncom/auth/lonroles.pm 2003/04/07 18:24:05 1.56 +++ loncom/auth/lonroles.pm 2003/06/03 14:08:32 1.58 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.56 2003/04/07 18:24:05 www Exp $ +# $Id: lonroles.pm,v 1.58 2003/06/03 14:08:32 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -50,6 +50,7 @@ use Apache::Constants qw(:common); use Apache::File(); use Apache::lonmenu; use Apache::loncommon; +use Apache::lonannounce; sub handler { @@ -155,6 +156,19 @@ ENDENTERKEY $msg= '

Could not initialize top-level map.

'; } + + # 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; @@ -437,6 +451,9 @@ ENDHEADER $r->print(' '); } } + $tremark.=&Apache::lonannounce::showday(time,1, + &Apache::lonannounce::readcalendar($tdom.'_'.$trest)); + $r->print(''.$trole. ''.$ttype. ''.$twhere.