--- loncom/interface/loncreateuser.pm 2009/08/13 20:20:12 1.295.2.3 +++ loncom/interface/loncreateuser.pm 2009/08/14 14:21:00 1.295.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.295.2.3 2009/08/13 20:20:12 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.295.2.4 2009/08/14 14:21:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -143,6 +143,7 @@ sub portfolio_quota { $custom_off = ' checked="checked" '; my $quota_javascript = <<"END_SCRIPT"; END_SCRIPT if ($quotatype eq 'custom') { @@ -387,7 +389,9 @@ sub print_username_entry_form { my $jscript = &Apache::loncommon::studentbrowser_javascript()."\n". ''."\n"; my %loaditems = ( @@ -554,6 +558,7 @@ sub user_modification_js { return < +// END } @@ -590,6 +595,7 @@ sub print_user_selection_page { my $jscript = (< +// ENDSCRIPT @@ -846,7 +853,9 @@ $crumbs $response $forminfo

$lt{'cnu'} "$ccuname" $lt{'ind'} $ccdomain @@ -903,7 +912,7 @@ KERB } else { if ($authtype eq 'int') { $varauth = '
'. -&mt('[_1] Internally authenticated (with initial password [_2])','','')."'; +&mt('[_1] Internally authenticated (with initial password [_2])','','')."'; } elsif ($authtype eq 'loc') { $varauth = '
'. &mt('[_1] Local Authentication with argument [_2]','','')."\n"; @@ -962,7 +971,7 @@ ENDCHANGEUSER } if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) { $r->print('

'.&mt('User Can Request Creation of Courses?').'

'. - &Apache::loncommon::start_data_table()). + &Apache::loncommon::start_data_table()); if ($env{'request.role.domain'} eq $ccdomain) { $r->print(&build_tools_display($ccuname,$ccdomain,'requestcourses')); } else { @@ -1045,7 +1054,7 @@ ENDNOTOOLSPRIV } ## End of new user/old user logic if ($env{'form.action'} eq 'singlestudent') { - $r->print('
'."\n"); + $r->print('
'."\n"); } else { $r->print('

'.&mt('Add Roles').'

'); my $addrolesdisplay = 0; @@ -1058,14 +1067,14 @@ ENDNOTOOLSPRIV $addrolesdisplay = $add_domainroles; } $r->print(&course_level_dc($env{'request.role.domain'},'Course')); - $r->print('
'."\n"); + $r->print('
'."\n"); } elsif ($context eq 'author') { if ($addrolesdisplay) { $r->print('
print(' onClick="auth_check()" \>'."\n"); + $r->print(' onclick="auth_check()" \>'."\n"); } else { - $r->print('onClick="this.form.submit()" \>'."\n"); + $r->print('onclick="this.form.submit()" \>'."\n"); } } else { $r->print('
'. @@ -1073,7 +1082,7 @@ ENDNOTOOLSPRIV } } else { $r->print(&course_level_table(%inccourses)); - $r->print('
'."\n"); + $r->print('
'."\n"); } } $r->print(&Apache::lonhtmlcommon::echo_form_input(['phase','userrole','ccdomain','prevphase','currstate','ccuname','ccdomain'])); @@ -1141,7 +1150,11 @@ sub validation_javascript { $nondc_setsection_code,$groupslist); my ($jsback,$elements) = &crumb_utilities(); $js .= "\n". - ''; + ''."\n"; return $js; } @@ -1494,7 +1507,9 @@ sub user_authentication { my $choices = &Apache::lonuserutils::set_login($ccdomain,$authformkrb,$authformint,$authformloc); $outcome = < +// $lt{'err'}: $lt{'uuas'} ($currentauth). $lt{'sldb'}. @@ -1523,7 +1538,9 @@ ENDBADAUTH ); $outcome = ''."\n". '

'.$lt{'ld'}.'

'. &Apache::loncommon::start_data_table(). @@ -1854,7 +1871,10 @@ sub update_user_data { my $newuser = 0; my ($jsback,$elements) = &crumb_utilities(); my $jscript = ''."\n"; + '// '."\n". + ''."\n"; my %breadcrumb_text = &singleuser_breadcrumb(); my $args; if ($env{'form.popup'}) { @@ -3316,13 +3336,16 @@ sub custom_role_editor { my ($jsback,$elements) = &crumb_utilities(); my $button_code = "\n"; my $head_script = "\n"; - $head_script .= ''."\n"; + $head_script .= "\n".$jsback."\n". + '// ]]>'."\n". + ''."\n"; $r->print(&Apache::loncommon::start_page('Custom Role Editor',$head_script)); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"javascript:backPage(document.form1,'pickrole','')", @@ -3452,7 +3475,7 @@ sub make_script_template { sub make_button_code { my ($role) = @_; my $label = &Apache::lonnet::plaintext($role); - my $button_code = ''; + my $button_code = ''; return ($button_code); } # ---------------------------------------------------------- Call to definerole @@ -3465,7 +3488,11 @@ sub set_custom_role { return; } my ($jsback,$elements) = &crumb_utilities(); - my $jscript = ''; + my $jscript = ''; $r->print(&Apache::loncommon::start_page('Save Custom Role'),$jscript); &Apache::lonhtmlcommon::add_breadcrumb @@ -3837,7 +3864,11 @@ sub header { sub add_script { my ($js) = @_; - return ''; + return ''."\n"; } sub verify_user_display { @@ -4171,7 +4202,9 @@ ENDSCRIPT my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; my $output = ''."\n". '

'.$lt->{'selfenroll'}.'

'."\n"; my ($visible,$cansetvis,$vismsgs,$visactions) = &visible_in_cat($cdom,$cnum); @@ -5063,6 +5096,7 @@ sub print_userchangelogs_display { $r->print(''); $r->print(<<"ENDSCRIPT"); ENDSCRIPT } } else { - $r->print(&mt('There are no records to display')); + $r->print('

'. + &mt('There are no records to display'). + '

'); } $r->print(''. ''); @@ -5089,7 +5126,7 @@ sub role_display_filter { my $context = 'course'; my $nolink = 1; my $output = ''; @@ -5130,7 +5167,7 @@ sub role_display_filter { foreach my $chgtype ('any','auto','updatenow','createcourse','course','domain','selfenroll') { my $selstr = ''; if ($curr->{'chgcontext'} eq $chgtype) { - $output .= $selstr = ' selected="selected"'; + $selstr = ' selected="selected"'; } if (($chgtype eq 'auto') || ($chgtype eq 'updatenow')) { next if (!&Apache::lonnet::auto_run($cnum,$cdom)); @@ -5772,7 +5809,7 @@ sub course_level_dc { ''. &Apache::loncommon::end_data_table_header_row(); my $otheritems = &Apache::loncommon::start_data_table_row()."\n". - ''."\n". + ''."\n". '
'. - ''.&mt('Changes/page:').'
'. + ''.&mt('Changes/page:').'
'. &Apache::lonmeta::selectbox('show',$curr->{'show'},undef, (&mt('all'),5,10,20,50,100,1000,10000)). '
  '.$courseform.''.$lt{'rol'}.''.$lt{'grs'}.''.$lt{'sta'}.''.$lt{'end'}.'