--- loncom/interface/loncreateuser.pm 2007/12/21 20:34:26 1.221 +++ loncom/interface/loncreateuser.pm 2007/12/23 15:50:23 1.223 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.221 2007/12/21 20:34:26 raeburn Exp $ +# $Id: loncreateuser.pm,v 1.223 2007/12/23 15:50:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2109,7 +2109,11 @@ sub update_roles { if ($url =~ m-^/($match_domain)/($match_courseid)/?(\w*)$-) { my $result = &Apache::loncommon::commit_studentrole(\$logmsg,$udom,$uname,$url,$role,$now,0,$1,$2,$3); if (($result =~ /^error/) || ($result eq 'not_in_class') || ($result eq 'unknown_course') || ($result eq 'refused')) { - $output = "Error: $result\n"; + if ($result eq 'refused' && $logmsg) { + $output = $logmsg; + } else { + $output = "Error: $result\n"; + } } else { $output = &mt('Assigning').' '.$role.' in '.$url. &mt('starting').' '.localtime($now). @@ -2836,10 +2840,10 @@ sub handler { 'User_Management_List')); if ($permission->{'cusr'}) { &Apache::lonuserutils::update_user_list($r,$context,$setting,$choice); - $r->print('

'.&mt('Display User Lists').''); $r->print(&Apache::loncommon::end_page()); } else { $r->print(&mt('You are not authorized to make bulk changes to user roles')); + $r->print('

'.&mt('Display User Lists').''); $r->print(&Apache::loncommon::end_page()); } } else { @@ -3561,48 +3565,49 @@ $table. sub course_level_row { my ($protectedcourse,$role,$area,$domain,$plrole,$sections_count,$lt) = @_; - my $table = &Apache::loncommon::start_data_table_row(). - ' '."\n". - ' '.$plrole.''."\n". - ''.$area.'
Domain: '.$domain.''."\n"; + my $row = &Apache::loncommon::start_data_table_row(). + ' '."\n". + ' '.$plrole.''."\n". + ' '.$area.'
Domain: '.$domain.''."\n"; if ($role eq 'cc') { - $table .= ' '; + $row .= ' '; } elsif ($env{'request.course.sec'} ne '') { - $table .= ' '. - $env{'request.course.sec'}.''; + $row .= ' '. + $env{'request.course.sec'}.''; } else { if (ref($sections_count) eq 'HASH') { my $currsec = &Apache::lonuserutils::course_sections($sections_count, $protectedcourse.'_'.$role); - $table .= ''. - ' - - - '; + '
'.$lt->{'exs'}.'
'. - $currsec.'
   '.$lt->{'new'}.'
'. + $row .= '
'."\n". + ''."\n". + ' '."\n". + ' '."\n". + ' '."\n". - '
'.$lt->{'exs'}.'
'. + $currsec.'
   '.$lt->{'new'}.'
'. ''. '
'."\n"; } else { - $table .= ''; + $row .= ''."\n"; } } - $table .= < + $row .= < $lt->{'ssd'} - + $lt->{'sed'} ENDTIMEENTRY - $table.= &Apache::loncommon::end_data_table_row(); + $row .= &Apache::loncommon::end_data_table_row(); + return $row; } sub course_level_dc {