Usually we use the follow SPQuery to make sure whether a user has given a answer to our surveys:
Here we suppose you run these code in the administrator's role:
Code
string siteUrl="http://****";
string userForCheck="Domain\\useraccount";
//Check whether the user has responded to the survey
bool result=false;
//Check whether the user has completed the answer
bool isRespondComplete=false;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using(SPSite site =new SPSite(siteUrl))
{
using (SPWeb web=site.RootWeb)
{
SPUser imitationUser = web.EnsureUser(userForCheck);
using(SPSite siteWithUser = new SPSite(siteUrl, user.UserToken))
{
using ( SPWeb webWithUser = siteWithUser.RootWeb)
{
SPQuery q = new SPQuery();
q.Query=@"<Where>
<Eq>
<FieldRef Name=\"Author\"/>
<Value Type=\"User\">"+SPUser.Name+@"</Value>"
</Eq>
</Where>"
SPList list=webWithUser.Lists["your survey's name"];
SPListItemCollection items=list.GetItems(query);
if(items.Count>0)
{
result=true;
isRespondComplete=items[0]["Completed"].ToString()=="1";
}
}
}
}
}
});