Skip to content

Commit

Permalink
Fixed issue #8137: Relevance equation cannot be edited for unknown re…
Browse files Browse the repository at this point in the history
…asons

Dev Fix for hasConditions
  • Loading branch information
c-schmitz committed Sep 23, 2013
1 parent 9c3fc5b commit 66dacc0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion application/models/Questions.php
Expand Up @@ -332,9 +332,15 @@ public function getQuestionList($surveyid, $language)
->bindParam(":sid", $surveyid, PDO::PARAM_INT)->queryAll();
}

/**
* Checks if a certain question has conditions set in the condition table
* Returns the number of conditions set
*
* @param mixed $iQuestionID The question ID
*/
public function hasConditions($iQuestionID)
{
return self::model()->count('qid = '.$iQuestionID);
return Conditions::model()->count('qid = '.$iQuestionID);
}

}
Expand Down

0 comments on commit 66dacc0

Please sign in to comment.