Thanks for your help! In the given sample I found a way to get reference to API:
github.com/LimeSurvey/LimeSurvey/blob/41...untFunctions.php#L31
And all IDs I got like this:
Code:
$api = new LimesurveyApi();
$lang = $api->getCurrentUser()['lang'];
$questions = $api->getQuestions($surveyId, $lang, ['gid' => $groupId]);
$questionIds = [];
foreach ($questions as $question) {
$questionIds[] = $question['qid'];
}
And use of a direct query to DB I'll remember for later, if there will be issues with big dataset.
I'm making another solution to the problem of how to show random X questions out of Y in the group, and soon I'll make a post about it.
P.S. I'm a newbie to PHP, so if you see any possible improvements to my code, you are welcome to tell me.