ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilSCORMQuestionOverviewTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2021 ILIAS open source, Extended GPL, see docs/LICENSE */
4
6
11{
15 protected $ctrl;
16
20 protected $lng;
21
25 protected $ui;
26
30 function __construct($a_parent_obj, $a_parent_cmd)
31 {
32 global $DIC;
33
34 $this->id = "sahs_sco_quest";
35 $this->lng = $DIC->language();
36 $this->ctrl = $DIC->ctrl();
37 $this->ui = $DIC->ui();
38
39 parent::__construct($a_parent_obj, $a_parent_cmd);
40
41 $this->setTitle($this->lng->txt("sahs_questions"));
42
43 $this->addColumn($this->lng->txt("page"));
44 $this->addColumn($this->lng->txt("question"));
45
46 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
47 $this->setRowTemplate("tpl.question_overview_row.html", "Modules/Scorm2004/Editor");
48 }
49
53 protected function fillRow($a_set)
54 {
57 $ui = $this->ui;
58
59 $ctrl->setParameterByClass("ilscorm2004pagenodegui", "obj_id", $a_set["page"]["obj_id"]);
60 $link = $ui->factory()->link()->standard(
61 $a_set["page"]["title"],
62 $ctrl->getLinkTargetByClass("ilscorm2004pagenodegui", "edit")
63 );
64 $tpl->setVariable("PAGE", $ui->renderer()->render($link));
65 $tpl->setVariable("QUESTION", \assQuestion::_getTitle($a_set["qid"]));
66 }
67}
An exception for terminatinating execution or to throw for unit testing.
static _getTitle($a_q_id)
Returns the title of a question.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46