コード例 #1
0
 public function outGlossarySelector()
 {
     require_once 'Modules/TestQuestionPool/classes/tables/class.ilQuestionInternalLinkSelectionTableGUI.php';
     require_once 'Modules/Glossary/classes/class.ilObjGlossary.php';
     $this->ctrl->setParameter($this, 'q_id', $this->object->getId());
     $glossary = new ilObjGlossary($_GET['source_id'], true);
     $terms = $glossary->getTermList();
     $rows = array();
     foreach ($terms as $term) {
         $this->ctrl->setParameter($this, 'git', $term['id']);
         $rows[] = array('title' => $term['term'], 'description' => '', 'text_add' => $this->lng->txt('add'), 'href_add' => $this->ctrl->getLinkTarget($this, 'addGIT'));
     }
     $table = new ilQuestionInternalLinkSelectionTableGUI($this, 'cancelExplorer', __METHOD__);
     $table->setTitle($this->lng->txt('glossary_term'));
     $table->setData($rows);
     $this->tpl->setContent($table->getHTML());
 }