5include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
   24                $this->
object = $a_survey;
 
   25                include_once(
"./Modules/Survey/classes/class.ilSurveySkill.php");
 
   28                include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
 
   31                parent::__construct($a_parent_obj, $a_parent_cmd);
 
   35                $this->
addColumn($this->lng->txt(
"question"));
 
   36                $this->
addColumn($this->lng->txt(
"survey_skill"));
 
   37                $this->
addColumn($this->lng->txt(
"actions"));
 
   40                $this->
setRowTemplate(
"tpl.svy_skill_ass_row.html", 
"Modules/Survey");
 
   56                $survey_questions = $this->
object->getSurveyQuestions();
 
   58                if (count($survey_questions) > 0)
 
   60                        $table_data = array();
 
   61                        $last_questionblock_id = $position = $block_position = 0;
 
   62                        foreach ($survey_questions as $question_id => 
$data)
 
   67                                if (in_array(
$data[
"questiontype_fi"], array(2)))
 
   72                                $id = 
$data[
"question_id"];
 
   74                                $table_data[$id] = array(
"id" => $id,
 
   76                                        "supported" => $supported,
 
   77                                        "heading" => 
$data[
"heading"],
 
   78                                        "title" => 
$data[
"title"],
 
   79                                        "description" => 
$data[
"description"],
 
   80                                        "author" => 
$data[
"author"],
 
   81                                        "obligatory" => (
bool)
$data[
"obligatory"]);
 
   96                $ilCtrl->setParameter($this->parent_obj, 
"q_id", $a_set[
"id"]);
 
   98                if ($a_set[
"supported"])
 
  100                        $this->tpl->setCurrentBlock(
"cmd");
 
  101                        $this->tpl->setVariable(
"HREF_CMD",
 
  102                                $ilCtrl->getLinkTarget($this->parent_obj,
 
  103                                "assignSkillToQuestion"));
 
  104                        $this->tpl->setVariable(
"TXT_CMD", 
$lng->txt(
"survey_assign_competence"));
 
  105                        $this->tpl->parseCurrentBlock();
 
  107                        if ($s = $this->skill_survey->getSkillForQuestion($a_set[
"id"]))
 
  109                                $this->tpl->setCurrentBlock(
"cmd");
 
  110                                $this->tpl->setVariable(
"HREF_CMD",
 
  111                                        $ilCtrl->getLinkTarget($this->parent_obj,
 
  112                                        "removeSkillFromQuestion"));
 
  113                                $this->tpl->setVariable(
"TXT_CMD", 
$lng->txt(
"survey_remove_competence"));
 
  114                                $this->tpl->parseCurrentBlock();
 
  116                                include_once(
"./Services/Skill/classes/class.ilBasicSkill.php");
 
  117                                $this->tpl->setVariable(
"COMPETENCE",
 
  121                                $path = $this->skill_tree->getSkillTreePath($s[
"base_skill_id"], $s[
"tref_id"]);
 
  122                                $path_nodes = array();
 
  123                                foreach (
$path as $p)
 
  125                                        if ($p[
"child"] > 1 && $p[
"skill_id"] != $s[
"base_skill_id"])
 
  130                                $this->tpl->setVariable(
"PATH", implode($path_nodes, 
" > "));
 
  131                                $this->tpl->setVariable(
"COMP_ID", 
"comp_".$a_set[
"id"]);
 
  140                        $this->tpl->setVariable(
"NOT_SUPPORTED", 
$lng->txt(
"svy_skl_comp_assignm_not_supported"));
 
  143                $this->tpl->setVariable(
"QUESTION_TITLE", $a_set[
"title"]);
 
  145                $ilCtrl->setParameter($this->parent_obj, 
"q_id", 
"");
 
An exception for terminatinating execution or to throw for unit testing.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
TableGUI class for survey questions to skill assignment.
getQuestions()
Get questions.
fillRow($a_set)
Fill table row.
__construct($a_parent_obj, $a_parent_cmd, $a_survey)
Constructor.
Skill/Competence handling in surveys.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.