4 require_once
'Services/Form/classes/class.ilNumberInputGUI.php';
5 require_once
'Services/Table/classes/class.ilTable2GUI.php';
40 $ilCtrl = $DIC->ctrl();
41 $tpl = $DIC->ui()->mainTemplate();
42 $tpl->addJavaScript(
'./node_modules/tinymce/tinymce.js');
43 $this->
setId(
'man_scor_by_qst_' . $parentObj->object->getId());
47 $this->
setFormAction($ilCtrl->getFormAction($parentObj, self::PARENT_DEFAULT_CMD));
48 $this->
setRowTemplate(
"tpl.il_as_tst_man_scoring_by_question_tblrow.html",
"Modules/Test");
58 $this->
addColumn($this->lng->txt(
'name'),
'name');
59 $this->
addColumn($this->lng->txt(
'tst_reached_points'),
'reached_points');
60 $this->
addColumn($this->lng->txt(
'tst_maximum_points'),
'maximum_points');
61 $this->
addColumn($this->lng->txt(
'tst_feedback'),
'feedback',
'30%');
62 $this->
addColumn($this->lng->txt(
'finalized_evaluation'),
'finalized_evaluation');
63 $this->
addColumn($this->lng->txt(
'finalized_by'),
'finalized_by_uid');
64 $this->
addColumn($this->lng->txt(
'finalized_on'),
'finalized_tstamp');
65 $this->
addColumn($this->lng->txt(
'actions'),
'',
'1%');
80 include_once
'Services/Form/classes/class.ilSelectInputGUI.php';
81 $available_questions =
new ilSelectInputGUI($this->lng->txt(
'question'),
'question');
82 $select_questions = array();
86 $questions = $this->
getParentObject()->object->getPotentialRandomTestQuestions();
89 foreach ($questions as
$data) {
90 include_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
92 $type = $info[
"question_type_fi"];
93 if (in_array(
$type, $scoring)) {
95 if ($maxpoints == 1) {
96 $maxpoints =
' (' . $maxpoints .
' ' . $this->lng->txt(
'point') .
')';
98 $maxpoints =
' (' . $maxpoints .
' ' . $this->lng->txt(
'points') .
')';
101 $select_questions[$data[
"question_id"]] = $data[
'title'] . $maxpoints .
' [' . $this->lng->txt(
'question_id_short') .
': ' . $data[
"question_id"] .
']';
104 if (!$select_questions) {
105 $select_questions[0] = $this->lng->txt(
'tst_no_scorable_qst_available');
107 $available_questions->
setOptions(array(
'' => $this->lng->txt(
'please_choose')) + $select_questions);
109 $available_questions->readFromSession();
110 $this->
filter[
'question'] = $available_questions->getValue();
115 for (
$i = 1;
$i <= $max_pass;
$i++) {
118 $pass->setOptions($passes);
120 $pass->readFromSession();
123 $only_answered =
new ilCheckboxInputGUI($this->lng->txt(
'tst_man_scoring_only_answered'),
'only_answered');
125 $only_answered->readFromSession();
127 $this->
filter[
'only_answered'] = $only_answered->getChecked();
130 $this->lng->txt(
'finalized_evaluation'),
131 'finalize_evaluation' 134 $this->lng->txt(
'all_users'),
135 $this->lng->txt(
'evaluated_users'),
136 $this->lng->txt(
'not_evaluated_users')
138 $correction->setOptions($evaluated);
140 $correction->readFromSession();
141 $this->
filter[
'finalize_evaluation'] = $correction->getValue();
150 $ilCtrl = $DIC->ctrl();
151 $ilAccess = $DIC->access();
156 $this->getParentObject()->object->getAnonymity() == 2 &&
157 false == $ilAccess->checkAccess(
'write',
'', $this->
getParentObject()->object->getRefId())
160 $this->tpl->setVariable(
'VAL_NAME', $this->lng->txt(
"anonymous"));
162 $this->tpl->setVariable(
'VAL_NAME', $row[
'name']);
165 if (!$this->first_row_rendered) {
166 $this->first_row_rendered =
true;
167 $this->tpl->touchBlock(
'row_js');
170 $this->tpl->setVariable(
'VAL_REACHED_POINTS', $row[
'reached_points']);
171 $this->tpl->setVariable(
'VAL_MAX_POINTS', $row[
'maximum_points']);
172 $finalized = (isset($row[
'finalized_evaluation']) && $row[
'finalized_evaluation'] == 1);
173 $this->tpl->setVariable(
175 ($finalized) ? $this->lng->txt(
'yes') : $this->lng->txt(
'no')
177 $fin_usr_id = $row[
'finalized_by_usr_id'];
179 $this->tpl->setVariable(
'VAL_MODAL_CORRECTION', $row[
'feedback']);
180 if ($fin_usr_id > 0) {
183 $fin_timestamp = $row[
'finalized_tstamp'];
184 if ($fin_timestamp > 0) {
189 $this->tpl->setVariable(
'VAL_PASS', $row[
'pass_id']);
190 $this->tpl->setVariable(
'VAL_ACTIVE_ID', $row[
'active_id']);
191 $this->tpl->setVariable(
'VAL_QUESTION_ID', $row[
'qst_id']);
193 if ($this->first_row) {
194 $this->tpl->touchBlock(
'scoring_by_question_refresher');
195 $this->tpl->parseCurrentBlock();
196 $this->first_row =
false;
199 $ilCtrl->setParameter($this->
getParentObject(),
'qst_id', $row[
'qst_id']);
200 $ilCtrl->setParameter($this->
getParentObject(),
'active_id', $row[
'active_id']);
201 $ilCtrl->setParameter($this->
getParentObject(),
'pass_id', $row[
'pass_id']);
202 $this->tpl->setVariable(
'VAL_LINK_ANSWER', $ilCtrl->getLinkTarget($this->getParentObject(),
'getAnswerDetail',
'',
true,
false));
206 $this->tpl->setVariable(
'VAL_TXT_ANSWER', $this->lng->txt(
'tst_eval_show_answer'));
207 $this->tpl->setVariable(
'ANSWER_TITLE', $this->lng->txt(
'answer_of') .
': ' . $row[
'name']);
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
ilTestManScoringParticipantsBySelectedQuestionAndPassTableGUI
static _lookupFullname($a_user_id)
Lookup Full Name.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
const PARENT_RESET_FILTER_CMD
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
const PARENT_APPLY_FILTER_CMD
getParentObject()
Get parent object.
static _getMaximumPoints($question_id)
Returns the maximum points, a learner can reach answering the question.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static _getQuestionInfo($question_id)
Returns question information from the database.
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
getCurQuestionMaxPoints()
enable($a_module_name)
enables particular modules of table
const PARENT_SAVE_SCORING_CMD
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setManualScoringPointsPostData($manPointsPostData)
static _getManualScoring()
Retrieve the manual scoring settings.
__construct(Container $dic, ilPlugin $plugin)
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.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setCurQuestionMaxPoints($curQuestionMaxPoints)
setFilterCommand($a_val, $a_caption=null)
Set filter command.