4 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
27 $this->question = $a_question;
31 $this->
setId(
"il_svy_spl_sync");
33 $this->
setTitle($this->question->getTitle());
34 $this->
setDescription($lng->txt(
"survey_sync_question_copies_info"));
36 $this->
addCommandButton(
"synccopies", $lng->txt(
"survey_sync_question_copies"));
47 $this->
setRowTemplate(
"tpl.il_svy_qpl_sync.html",
"Modules/SurveyQuestionPool");
57 global $ilAccess,
$lng;
59 include_once
"Modules/Survey/classes/class.ilObjSurvey.php";
61 $table_data = array();
62 foreach($this->question->getCopyIds(
true) as $survey_obj_id => $questions)
64 $survey_id =
new ilObjSurvey($survey_obj_id,
false);
65 $survey_id->loadFromDB();
66 $survey_id = $survey_id->getSurveyId();
77 if($ilAccess->checkAccess(
"edit",
"", $ref_id))
86 $message = $lng->txt(
"survey_sync_insufficient_permissions");
91 $message = $lng->txt(
"survey_has_datasets_warning");
95 $survey_path = $this->
buildPath($ref_ids);
97 foreach($questions as $question_id)
106 $table_data[] = array(
107 "id" => $question_id,
109 "path" => $survey_path,
110 "message" => $message
127 $this->tpl->setVariable(
"TXT_PATH", $lng->txt(
"path"));
129 if($a_set[
"message"])
131 $this->tpl->setCurrentBlock(
"message");
132 $this->tpl->setVariable(
"TXT_MESSAGE", $a_set[
"message"]);
133 $this->tpl->parseCurrentBlock();
139 $this->tpl->setCurrentBlock(
"checkbox");
140 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
141 $this->tpl->parseCurrentBlock();
145 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
146 $this->tpl->setVariable(
"VALUE_PATH", implode(
"<br />", $a_set[
"path"]));
159 include_once
'classes/class.ilLink.php';
170 $path_full = $tree->getPathFull($ref_id);
171 if(
sizeof($path_full))
173 foreach($path_full as
$data)
175 if(++$counter < (count($path_full)-1))
179 $path .=
" » ";
180 if($ref_id != $data[
'ref_id'])
182 $path .= $data[
'title'];
186 $path .= (
'<a target="_top" href="'.
188 $data[
'title'].
'</a>');