PRFL-766 merge 309156 to 10.x

git-svn-id: https://source.sakaiproject.org/svn/profile2/branches/sakai-10.x@309336 66ffb92e-73f9-0310-93c1-f5514f145a0a
PRFL-857 merge 309282 to 10.x

git-svn-id: https://source.sakaiproject.org/svn/profile2/branches/sakai-10.x@309337 66ffb92e-73f9-0310-93c1-f5514f145a0a