26 protected \ILIAS\TestQuestionPool\Questions\PublicInterface
$questioninfo;
38 $this->
ctrl = $DIC->ctrl();
39 $this->
lng = $DIC->language();
40 $this->
access = $DIC->access();
41 $this->rbacsystem = $DIC->rbac()->system();
42 $ilCtrl = $DIC->ctrl();
45 $this->questioninfo = $DIC->testQuestion();
46 $this->
setId(
"lm_qst" . $this->lm->getId());
52 $this->
addColumn($this->
lng->txt(
"cont_users_answered"));
53 $this->
addColumn($this->
lng->txt(
"cont_correct_after_first"));
55 $this->
addColumn($this->
lng->txt(
"cont_third_and_more"));
61 $this->
setFormAction($ilCtrl->getFormAction($this->parent_obj, $this->parent_cmd));
62 $this->
setRowTemplate(
"tpl.lm_question_row.html",
"components/ILIAS/LearningModule");
80 if (count($questions[
"set"]) == 0 && $this->
getOffset() > 0) {
92 $this->
setData($questions[
"set"]);
95 protected function fillRow(array $a_set): void
97 $this->tpl->setVariable(
101 $this->tpl->setVariable(
103 $this->questioninfo->getGeneralQuestionProperties($a_set[
"question_id"])->getQuestionText()
108 $this->tpl->setVariable(
"VAL_ANSWERED", (
int) $stats[
"all"]);
109 if ($stats[
"all"] == 0) {
110 $this->tpl->setVariable(
"VAL_CORRECT_FIRST", 0);
111 $this->tpl->setVariable(
"VAL_CORRECT_SECOND", 0);
112 $this->tpl->setVariable(
"VAL_CORRECT_THIRD_OR_MORE", 0);
113 $this->tpl->setVariable(
"VAL_NEVER", 0);
115 $this->tpl->setVariable(
"VAL_CORRECT_FIRST", $stats[
"first"] .
116 " (" . (100 / $stats[
"all"] * $stats[
"first"]) .
" %)");
117 $this->tpl->setVariable(
"VAL_CORRECT_SECOND", $stats[
"second"] .
118 " (" . (100 / $stats[
"all"] * $stats[
"second"]) .
" %)");
119 $this->tpl->setVariable(
"VAL_CORRECT_THIRD_AND_MORE", $stats[
"third_or_more"] .
120 " (" . (100 / $stats[
"all"] * $stats[
"third_or_more"]) .
" %)");
121 $nev = $stats[
"all"] - $stats[
"first"] - $stats[
"second"] - $stats[
"third_or_more"];
122 $this->tpl->setVariable(
"VAL_NEVER", $nev .
123 " (" . (100 / $stats[
"all"] * $nev) .
" %)");
static queryQuestionsOfLearningModule(int $a_lm_id, string $a_order_field, string $a_order_dir, int $a_offset, int $a_limit)
Get questions of learning module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_form_action, bool $a_multipart=false)
setEnableTitle(bool $a_enabletitle)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static _lookupTitle(int $a_obj_id)
resetOffset(bool $a_in_determination=false)
setExternalSorting(bool $a_val)
__construct(object $a_parent_obj, string $a_parent_cmd, ilObjLearningModule $a_lm)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
static getQuestionStatistics(int $a_q_id)
ILIAS TestQuestionPool Questions PublicInterface $questioninfo
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
determineOffsetAndOrder(bool $a_omit_offset=false)
setEnableHeader(bool $a_enableheader)
setMaxCount(int $a_max_count)
set max.
setExternalSegmentation(bool $a_val)