Skip to content

Commit

Permalink
Dev Added function to get the questions in a survey to the plugin api.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Oct 21, 2013
1 parent fe7b0c5 commit 8b9bfb1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/libraries/PluginManager/LimesurveyApi.php
Expand Up @@ -295,6 +295,12 @@ public function getParticipant($iParticipantID){
return Participant::model()->findByPk($iParticipantID);
}

public function getQuestions($surveyId, $language = 'en', $conditions = array())
{
$conditions['sid'] = $surveyId;
$conditions['language'] = $language;
return Question::model()->with('subquestions')->findAllByAttributes($conditions);
}
/**
* Gets the metadata for a table.
* For details on the object check: http://www.yiiframework.com/doc/api/1.1/CDbTableSchema
Expand Down

0 comments on commit 8b9bfb1

Please sign in to comment.