--- loncom/auth/lonroles.pm 2007/03/02 23:17:48 1.176 +++ loncom/auth/lonroles.pm 2008/03/22 03:52:04 1.181.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # User Roles Screen # -# $Id: lonroles.pm,v 1.176 2007/03/02 23:17:48 albertel Exp $ +# $Id: lonroles.pm,v 1.181.2.2 2008/03/22 03:52:04 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -201,7 +201,7 @@ sub handler { } $r->print(< +
@@ -224,7 +224,7 @@ ENDENTEREDKEY my $end_page=&Apache::loncommon::end_page(); $r->print(< + @@ -365,11 +365,15 @@ ENDENTERKEY my $start_page=&Apache::loncommon::start_page('User Roles'); my $standby=&mt('Role selected. Please stand by.'); $standby=~s/\n/\\n/g; + my $noscript=''.&mt('Use of LON-CAPA requires Javascript to be enabled in your web browser.').'
'.&mt('As this is not the case, most functionality in the system will be unavailable.').'

'; $r->print(< -'); + $r->print(''); $r->print(&Apache::loncommon::end_page()); return OK; } # More than one possible role # ----------------------------------------------------------------------- Table - unless (($advanced) || ($nochoose)) { + unless ((!&Apache::lonmenu::show_course()) || ($nochoose)) { $r->print("

".&mt('Select a Course to Enter')."

\n"); } - $r->print('
'); + $r->print('
'); unless ($nochoose) { $r->print(''); } $r->print(''."\n"); @@ -730,8 +727,8 @@ ENDHEADER $r->print(''); } } - $r->print(''."\n"); $r->print('
 '.&mt('User Role').''.&mt('Extent'). ''.&mt('Start').''.&mt('End').'
 '.&mt('No role specified'). - ''.$tremark. + $r->print(''.&mt('No role specified'). + ''.$tremark. ' 
'); @@ -835,7 +832,7 @@ sub role_status { sub build_roletext { my ($trolecode,$tdom,$trest,$tstatus,$tryagain,$advanced,$tremark,$tbg,$tfont,$trole,$twhere,$tpstart,$tpend,$nochoose,$button,$switchserver) = @_; - my $roletext=''; + my $roletext=''; my $is_dc=($trolecode =~ m/^dc\./); my $rowspan=($is_dc) ? '' : ' rowspan="2" '; @@ -845,8 +842,8 @@ sub build_roletext { $buttonname=~s/\W//g; if (!$button) { if ($switchserver) { - $roletext.=''.&mt('Switch Server').''; + $roletext.=''.&mt('Switch Server').''; } else { $roletext.=(' '); } @@ -878,8 +875,8 @@ sub build_roletext { ''.$tpend. ''; if (!$is_dc) { - $roletext.=''.$tremark. - ' '."\n"; + $roletext.=''.$tremark. + ' '."\n"; } return $roletext; } @@ -933,8 +930,12 @@ sub courselink { } sub coursepick_jscript { + my %lt = &Apache::lonlocal::texthash( + plsu => "Please use the 'Select Course' link to open a separate pick course window where you may select the course you wish to enter.", + youc => 'You can only use this screen to select courses in the current domain.', + ); my $verify_script = <<"END"; - -END - return $process_pick; -} - sub display_cc_role { my $rolekey = shift; my $roletext; @@ -1032,10 +1007,9 @@ sub allcourses_row { ' '; my $selectlink = &courselink($dcdom,$rowtype); my $ccrole = &Apache::lonnet::plaintext('cc'); - $output.= ''.$ccrole.''. - ' '.$selectlink.''. - ' from '.&mt('Domain').' '.$dcdom.'
'; - $output .= ''."\n"; + $output.= ''. + &mt('[_1]: [_2] from domain [_3]',$ccrole,$selectlink,$dcdom). + '
'."\n"; return $output; }