anchor.diff:  			String middleName = null;
   			LinkedHashMap userParams = new LinkedHashMap();
   
  +			userParams.put("notInCourseRoleTeach", new CustomSQLParam("WHERE User_.userId NOT IN "
  +		              + " (SELECT UserGroupRole.userId " + "  FROM UserGroupRole "
  +		              + "  WHERE  (UserGroupRole.groupId = ?) AND (UserGroupRole.roleId = ?))", new Long[] {
  +		              course.getGroupCreatedId(),
  +		              RoleLocalServiceUtil.getRole(prefs.getTeacherRole()).getRoleId() }));
  +		           
  +
  +
  +		       	userParams.put("notInCourseRoleEdit", new CustomSQLParam("WHERE User_.userId NOT IN "
  +		              + " (SELECT UserGroupRole.userId " + "  FROM UserGroupRole "
  +		              + "  WHERE  (UserGroupRole.groupId = ?) AND (UserGroupRole.roleId = ?))", new Long[] {
  +		              course.getGroupCreatedId(),
  +		              RoleLocalServiceUtil.getRole(prefs.getEditorRole()).getRoleId() }));
  +		           
  +			
  +			
   			if(theTeam==null){
   				if(criteria.trim().length()==0){
  +					OrderByComparator obc = null;
   					userParams.put("usersGroups", new Long(themeDisplay.getScopeGroupId()));
  -					userListPage = UserLocalServiceUtil.getGroupUsers(themeDisplay.getScopeGroupId());
  +
  +					userListPage  = UserLocalServiceUtil.search(themeDisplay.getCompanyId(), criteria, 0, userParams, searchContainer.getStart(), searchContainer.getEnd(), obc);
  +					System.out.println("HERE "+userListPage.size());
   				}else{
   					userParams.put("usersGroups", new Long(themeDisplay.getScopeGroupId()));
   					OrderByComparator obc = null;
  
positive.code: 				userListPage  = UserLocalServiceUtil.search(themeDisplay.getCompanyId(), criteria, 0, userParams, searchContainer.getStart(), searchContainer.getEnd(), obc);
  			}
  			
  				List<User> finalUserList = new LinkedList<User>();
  				
  				Iterator<User> ituserlistpage = userListPage.iterator();
  				
  				while(ituserlistpage.hasNext()){
  					User u = ituserlistpage.next();
  					
  					boolean isStudent = (!(PermissionCheckerFactoryUtil.create(u).hasPermission(themeDisplay.getScopeGroupId(), "com.liferay.lms.model", themeDisplay.getScopeGroupId(), "VIEW_RESULTS"))
  								&&
  								!UserGroupRoleLocalServiceUtil.hasUserGroupRole(u.getUserId(), themeDisplay.getScopeGroupId(), teacherRoleId)
  								&&
  								!UserGroupRoleLocalServiceUtil.hasUserGroupRole(u.getUserId(), themeDisplay.getScopeGroupId(), editorRoleId));
  							//System.out.println("User "+u.getFullName()+" isStudent "+ isStudent);
  					
  					if(isStudent)finalUserList.add(u);
  				}
  				
  				//int userCount = UserLocalServiceUtil.searchCount(themeDisplay.getCompanyId(), criteria, 0, params);
  				int userCount = finalUserList.size();
  						
  				//pageContext.setAttribute("results", userListPage);
  				pageContext.setAttribute("results", finalUserList);
  			    	pageContext.setAttribute("total", userCount);
  			
  			
  
negative.code: 
  	long teacherRoleId=RoleLocalServiceUtil.getRole(prefs.getTeacherRole()).getRoleId();
  	long editorRoleId=RoleLocalServiceUtil.getRole(prefs.getEditorRole()).getRoleId();
  
  	Role commmanager=RoleLocalServiceUtil.getRole(themeDisplay.getCompanyId(), RoleConstants.SITE_MEMBER) ;
  
  	
  %>
  
  