...Человеческий поиск в разработке...
- Модуль: vote
- Путь к файлу: ~/bitrix/modules/vote/lib/copy/implement/vote.php
- Класс: BitrixVoteCopyImplementVote
- Вызов: Vote::getEventBallots
private function getEventBallots($voteId, $copiedIdsRelation) { $ballots = []; $questionIds = []; $answerIds = []; foreach ($copiedIdsRelation as $key => $value) { if (is_int($key)) { $questionIds[$key] = $value; } else { $answerIds = $answerIds + $value; } } $voteBase = new VoteBase($voteId); foreach ($voteBase->getStatistic() as $data) { $ballot = []; foreach ($data["BALLOT"] as $questionId => $answer) { foreach ($answer as $answerId => $answerMessage) { $ballot[$questionIds[$questionId]] = [ $answerIds[$answerId] => $answerMessage ]; } } $ballots[$data["ID"]] = ["BALLOT" => $ballot]; } return $ballots; }