19 declare(strict_types=1);
40 $this->question_repo = $repo->
sequence();
43 $this->log = $domain->
log();
48 int $survey_question_id,
49 bool $duplicate =
true,
50 bool $force_duplicate =
false 52 $this->log->debug(
"append question, id: " . $survey_question_id .
", duplicate: " . $duplicate .
", force: " . $force_duplicate);
57 $survey_question_id = $this->survey->duplicateQuestionForSurvey($survey_question_id, $force_duplicate);
61 if ($this->survey->isQuestionInSurvey($survey_question_id)) {
62 return $survey_question_id;
66 $next_id = $this->question_repo->insert($this->survey_id, $survey_question_id);
68 $this->log->debug(
"insert svy_svy_qst, id: " . $next_id .
", qfi: " . $survey_question_id);
70 return $survey_question_id;
SequenceDBRepository $question_repo
Survey internal data service.
appendQuestion(int $survey_question_id, bool $duplicate=true, bool $force_duplicate=false)
InternalDomainService $domain
__construct(InternalRepoService $repo, InternalDomainService $domain, int $survey_id, \ilObjSurvey $survey)