- Posts: 417
- Thank you received: 34
Ask the community, share ideas, and connect with other LimeSurvey users!
/** * Check validity of a quotaid against a survey id * @param integer $iSurveyId * @param integer $quotaid * throw Exception * @return void */ private function checkValidQuotaId($surveyId, $quotaId) { $model = Quota::model()->find( "id = :quotaid AND sid = :surveyid", [':quotaid' => $quotaId, ':surveyid' => $surveyId] ); if (empty($model)) { throw new CHttpException(403, gT("Bad quota id with this survey id.")); } }
Please Log in to join the conversation.
public function insertquotaanswer(int $iSurveyId) { $this->requirePostRequest(); $iSurveyId = sanitize_int($iSurveyId); $qid = Yii::app()->request->getPost('quota_qid'); $quota_id = Yii::app()->request->getPost('quota_id'); $this->checkPermissions($iSurveyId, 'update'); //$this->checkValidQuotaId($surveyId, $quota_id);
Please Log in to join the conversation.
Please Log in to join the conversation.