function showSurveyCompleted($primkey, $suid = 1) { $type = 1; if ($suid == 1) { $respondentorhousehold = new Household($primkey); //check completed coverscreen $this->checkCompletedCoverscreen($respondentorhousehold); $type = 2; } else { $respondentorhousehold = new Respondent($primkey); //respondent completed. set 10% to be validated if (mt_rand(1, 10) == 1) { $respondentorhousehold->setValidation(1); } } $respondentorhousehold->setStatus(2); $respondentorhousehold->saveChanges(); //add contact 500 $contactcode = Language::completedInterviewCode(); $contactts = date('Y-m-d H:i:s'); $contacts = new Contacts(); $errorMessage = $contacts->addContact($respondentorhousehold->getPrimkey(), $contactcode, $contactts, '', '', '', '', $_SESSION['URID']); //end add contact $display = new Display(); return $this->showInfo($primkey, $display->displaySuccess(Language::labelInterviewerSurveyCompleted()), $type); }