--- loncom/interface/lonuserutils.pm 2013/09/21 14:10:30 1.155 +++ loncom/interface/lonuserutils.pm 2013/09/26 17:46:42 1.156 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.155 2013/09/21 14:10:30 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.156 2013/09/26 17:46:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1988,7 +1988,7 @@ sub get_cols_array { } if (($context eq 'course') && ($mode ne 'autoenroll') && ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'})) { - push(@cols,'photos'); + push(@cols,'photo'); } if ($context eq 'domain') { push (@cols,'extent'); @@ -2468,7 +2468,9 @@ sub show_users_list { if ($mode eq 'pickauthor') { @sortable = ('username','fullname','email','status'); } - if (!grep(/^\Q$sortby\E$/,@sortable)) { + my %is_sortable; + map { $is_sortable{$_} => 1; } @sortable; + unless ($is_sortable{$sortby}) { $sortby = 'username'; } my $setting = $env{'form.roletype'}; @@ -2712,7 +2714,13 @@ END } } foreach my $item (@cols) { - $output .= "