5 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
22 $this->
setId(
'tstAvgReachedPointsTbl');
23 $this->
setPrefix(
'tstAvgReachedPointsTbl');
25 parent::__construct($a_parent_obj, $a_parent_cmd);
35 $this->
setTitle($this->lng->txt(
'average_reached_points'));
36 $this->
setStyle(
'table',
'fullwidth');
37 $this->
addColumn($this->lng->txt(
"question_id"),
'qid',
'');
38 $this->
addColumn($this->lng->txt(
"question_title"),
'title',
'');
39 $this->
addColumn($this->lng->txt(
"points"),
'points',
'');
40 $this->
addColumn($this->lng->txt(
"percentage"),
'percentage',
'');
41 $this->
addColumn($this->lng->txt(
"number_of_answers"),
'answers',
'');
43 $this->
setRowTemplate(
"tpl.il_as_tst_average_reached_points_row.html",
"Modules/Test");
45 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
83 $this->tpl->setVariable(
"ID",
$data[
"qid"]);
84 $this->tpl->setVariable(
"TITLE",
$data[
"title"]);
86 $this->tpl->setVariable(
"PERCENTAGE", sprintf(
"%.2f",
$data[
"percentage"]) .
"%");
87 $this->tpl->setVariable(
"ANSWERS",
$data[
"answers"]);
96 return sprintf(
"%.2f", $data[
'points_reached']) .
" " . strtolower($this->lng->txt(
"of")) .
" " . sprintf(
"%.2f", $data[
'points_max']);
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setStyle($a_element, $a_style)
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
fillRow($data)
fill row public
enable($a_module_name)
enables particular modules of table
setRowTemplate($a_template, $a_template_dir="")
Set row template.
__construct($a_parent_obj, $a_parent_cmd)
Constructor public.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
setFormName($a_formname="")
Set Form name.
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.
formatPoints(array $data)
numericOrdering($a_field)
Should this field be sorted numeric?