4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
27 public function __construct($a_parent_obj_gui, $a_parent_obj, $a_parent_cmd)
29 $this->parent_container = $a_parent_obj;
31 $this->
setId(
'lomemtstres_' . $a_parent_obj->getId());
32 parent::__construct($a_parent_obj_gui, $a_parent_cmd);
61 $this->current_user = $a_id;
80 if (strlen(
$name[
'firstname']) and strlen(
$name[
'lastname'])) {
81 $name_string =
$name[
'lastname'] .
', ' .
$name[
'firstname'] .
' [' .
$name[
'login'] .
']';
82 } elseif (strlen(
$name[
'lastname'])) {
83 $name_string =
$name[
'lastname'] .
' [' .
$name[
'login'] .
']';
85 $name_string =
$name[
'login'];
88 $this->
setTitle(
$GLOBALS[
'lng']->txt(
'crs_loc_test_results_of') .
' ' . $name_string);
99 $this->
setRowTemplate(
'tpl.crs_objectives_usr_result_row.html',
'Modules/Course');
112 $this->tpl->setVariable(
'VAL_TITLE', $set[
'title']);
113 if ($this->
getSettings()->worksWithInitialTest()) {
114 if ($set[
'has_result_it']) {
115 $this->tpl->setCurrentBlock(
'it_has_result');
116 $this->tpl->setVariable(
'IT_LINK', $set[
'link_it']);
117 $this->tpl->setVariable(
'IT_VAL', $set[
'res_it'] .
'%');
118 $this->tpl->parseCurrentBlock();
120 $this->tpl->setVariable(
'IT_NO_RES',
'-');
124 if ($set[
'has_result_qt']) {
125 $this->tpl->setCurrentBlock(
'qt_has_result');
126 $this->tpl->setVariable(
'QT_LINK', $set[
'link_qt']);
127 $this->tpl->setVariable(
'QT_VAL', $set[
'res_qt'] .
'%');
128 $this->tpl->parseCurrentBlock();
130 $this->tpl->setVariable(
'QT_NO_RES',
'-');
140 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
142 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
145 foreach ((
array) $objective_ids as $objective_id) {
146 $objective =
array();
147 $objective[
'id'] = $objective_id;
151 if ($this->
getSettings()->worksWithInitialTest()) {
158 $objective[
'tries_it'] = $results_it[
'tries'];
159 $objective[
'res_it'] = $results_it[
'result_perc'];
161 $objective[
'has_result_it'] = (bool) $results_it[
'has_result'];
169 $objective[
'tries_qt'] = $results_qt[
'tries'];
170 $objective[
'res_qt'] = $results_qt[
'result_perc'];
172 $objective[
'has_result_qt'] = (bool) $results_qt[
'has_result'];
174 $tbl_data[] = $objective;
177 return $this->
setData($tbl_data);
187 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
190 $test_ref_id = $assignments->getTestByObjective($a_objective_id,
$a_type);
194 include_once
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
static _lookupName($a_user_id)
lookup user name
static getInstanceByObjId($a_obj_id)
get singleton instance
static getInstance($a_container_id)
Get instance by container id.
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
parse()
Parse user results for table.
Class ilLOmemberTestResultTableGUI.
static lookupResult($a_course_obj_id, $a_user_id, $a_objective_id, $a_tst_type)
Lookup user result.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getObjectiveIds($course_id, $a_activated_only=false)
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
getSettings()
return ilLOSettings
getUserId()
Get current user id.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
__construct($a_parent_obj_gui, $a_parent_obj, $a_parent_cmd)
Constructor.
disable($a_module_name)
diesables particular modules of table
static getTestResultLinkForUser($a_test_ref_id, $a_user_id)
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.
createTestResultLink($a_type, $a_objective_id)
Create test result link.
const TYPE_TEST_QUALIFIED
setUserId($a_id)
Set user id.
fillRow($set)
Fill table rows.