[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm
bowersj2
lon-capa-cvs@mail.lon-capa.org
Tue, 03 Jun 2003 14:08:32 -0000
bowersj2 Tue Jun 3 10:08:32 2003 EDT
Modified files:
/loncom/auth lonroles.pm
Log:
Add check: Is the user a course coordinator entering a course where the
initialization helper has not been run? If so, run the helper.
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.57 loncom/auth/lonroles.pm:1.58
--- loncom/auth/lonroles.pm:1.57 Wed May 21 16:10:53 2003
+++ loncom/auth/lonroles.pm Tue Jun 3 10:08:32 2003
@@ -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.58 2003/06/03 14:08:32 bowersj2 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -156,6 +156,19 @@
$msg=
'<h1><font color=red>Could not initialize top-level map.</font></h1>';
}
+
+ # 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;