[LON-CAPA-cvs] cvs: loncom /auth lonroles.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 29 Jun 2006 17:10:39 -0000


albertel		Thu Jun 29 13:10:39 2006 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  - why be generic when we can be specific
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.161 loncom/auth/lonroles.pm:1.162
--- loncom/auth/lonroles.pm:1.161	Tue Jun 27 10:10:11 2006
+++ loncom/auth/lonroles.pm	Thu Jun 29 13:10:39 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.161 2006/06/27 14:10:11 albertel Exp $
+# $Id: lonroles.pm,v 1.162 2006/06/29 17:10:39 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -266,15 +266,14 @@
 			    }
 			    return OK;
 			} else {
-                            my $type = 'Course/Group';
 			    if (!$env{'request.course.id'}) {
-				$type = &Apache::loncommon::course_type();
 				&Apache::lonnet::appenv(
 				      "request.course.id"  => $cdom.'_'.$cnum);
 				$furl='/adm/roles?tryagain=1';
 				$msg=
 				    '<h1><span class="LC_error">'.
-				    &mt('Could not initialize '.lc($type).' at this time.').
+				    &mt('Could not initialize [_1] at this time.',
+					$env{'course.'.$cdom.'_'.$cnum.'.description'}).
 				    '</span></h1><h3>'.&mt('Please try again.').'</h3>'.$ferr;
 			    }
 			    if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; }
@@ -303,7 +302,8 @@
 					) {
 					my $startpage = &courseloadpage($courseid);
 					unless ($startpage eq 'firstres') {         
-					    $msg = &mt('Entering '.lc($type).' ....');
+					    $msg = &mt('Entering [_1] ....',
+						       $env{'course.'.$courseid.'.description'});
 					    &redirect_user($r,&mt('New in course'),
 							   '/adm/whatsnew?refpage=start',$msg,
 							   $env{'environment.remotenavmap'});
@@ -316,8 +316,10 @@
 # Guess not ...
 				    $furl=&Apache::lonpageflip::first_accessible_resource();
 				}
-                                $msg = &mt('Entering '.lc($type).' ...');
-				&redirect_user($r,&mt('Entering '.$type),
+                                $msg = &mt('Entering [_1] ...',
+					   $env{'course.'.$courseid.'.description'});
+				&redirect_user($r,&mt('Entering [_1]',
+						      $env{'course.'.$courseid.'.description'}),
 					       $furl,$msg,
 					       $env{'environment.remotenavmap'});
 			    }