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

raeburn raeburn@source.lon-capa.org
Mon, 18 May 2009 17:30:34 -0000


raeburn		Mon May 18 17:30:34 2009 EDT

  Modified files:              
    /loncom/auth	lonroles.pm 
  Log:
  - Use 'Courses' instead of 'Roles' for consistency with inline menu.
  - Wording change: Re-Initialize -> Re-Select.  
  
  
Index: loncom/auth/lonroles.pm
diff -u loncom/auth/lonroles.pm:1.223 loncom/auth/lonroles.pm:1.224
--- loncom/auth/lonroles.pm:1.223	Mon May 18 15:40:20 2009
+++ loncom/auth/lonroles.pm	Mon May 18 17:30:34 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # User Roles Screen
 #
-# $Id: lonroles.pm,v 1.223 2009/05/18 15:40:20 raeburn Exp $
+# $Id: lonroles.pm,v 1.224 2009/05/18 17:30:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -553,9 +553,18 @@
     $r->send_http_header;
     return OK if $r->header_only;
 
-    my $brcrum =[{href=>"/admm/roles",text=>"User Roles"}];
+    my $crumbtext = 'User Roles';
+    my $pagetitle = 'My Roles';
+    my $recent = &mt('Recent Roles');
+    my $show_course=&Apache::loncommon::show_course();
+    if ($show_course) {
+        $crumbtext = 'Courses';
+        $pagetitle = 'My Courses';
+        $recent = &mt('Recent Courses');
+    }
+    my $brcrum =[{href=>"/adm/roles",text=>$crumbtext}];
     my $swinfo=&Apache::lonmenu::rawconfig();
-    my $start_page=&Apache::loncommon::start_page('My Roles',undef,{bread_crumbs=>$brcrum});
+    my $start_page=&Apache::loncommon::start_page($pagetitle,undef,{bread_crumbs=>$brcrum});
     my $standby=&mt('Role selected. Please stand by.');
     $standby=~s/\n/\\n/g;
     my $noscript='<span class="LC_error">'.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'<br />'.&mt('As this is not the case, most functionality in the system will be unavailable.').'</span><br />';
@@ -875,7 +884,7 @@
 	return OK;
     }
 # ----------------------------------------------------------------------- Table
-    unless ((!&Apache::lonmenu::show_course()) || ($nochoose) || ($countactive==1)) {
+    unless ((!&Apache::loncommon::show_course()) || ($nochoose) || ($countactive==1)) {
 	$r->print("<h2>".&mt('Select a Course to Enter')."</h2>\n");
     }
     my $doheaders = &roletable_headers($r,\%roleclass,\%sortrole,$nochoose);
@@ -904,7 +913,7 @@
 	if ($output) {
 	    $r->print(&Apache::loncommon::start_data_table_empty_row()
                      .'<td align="center" colspan="5">'
-                     .&mt('Recent Roles')
+                     .$recent
                      .'</td>'
                      .&Apache::loncommon::end_data_table_empty_row()
             );
@@ -1261,7 +1270,7 @@
             $roletext.=
                 '<td'.$rowspan.' class="'.$tbg.'">'.
                 '<input name="'.$buttonname.'" type="button" value="'.
-                &mt('Re-Initialize').'" onClick="javascript:enterrole(this.form,\''.
+                &mt('Re-Select').'" onClick="javascript:enterrole(this.form,\''.
                         $trolecode."','".$buttonname.'\');" /></td>';
         }
     }