4 require_once
'Services/Form/classes/class.ilNumberInputGUI.php';
5 require_once
'Services/Table/classes/class.ilTable2GUI.php';
41 $tpl = $DIC->ui()->mainTemplate();
42 $tpl->addJavaScript(
'./Services/RTE/tiny_mce_3_5_11/tiny_mce.js');
43 $this->
setId(
'man_scor_by_qst_' . $parentObj->object->getId());
48 $this->
setRowTemplate(
"tpl.il_as_tst_man_scoring_by_question_tblrow.html",
"Modules/Test");
57 $this->
addColumn($this->lng->txt(
'name'),
'lastname');
58 $this->
addColumn($this->lng->txt(
'tst_reached_points'),
'reached_points');
59 $this->
addColumn($this->lng->txt(
'tst_maximum_points'),
'max_points');
60 $this->
addColumn($this->lng->txt(
'tst_feedback'),
'feedback',
'30%');
61 $this->
addColumn($this->lng->txt(
'finalized_evaluation'),
'finalized_evaluation');
62 $this->
addColumn($this->lng->txt(
'finalized_by'),
'finalized_by');
63 $this->
addColumn($this->lng->txt(
'finalized_on'),
'finalized_on');
71 include_once
'Services/Form/classes/class.ilSelectInputGUI.php';
72 $available_questions =
new ilSelectInputGUI($this->lng->txt(
'question'),
'question');
73 $select_questions = array();
77 $questions = $this->
getParentObject()->object->getPotentialRandomTestQuestions();
80 foreach ($questions as
$data) {
81 include_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
83 $type = $info[
"question_type_fi"];
84 if (in_array(
$type, $scoring)) {
86 if ($maxpoints == 1) {
87 $maxpoints =
' (' . $maxpoints .
' ' . $this->lng->txt(
'point') .
')';
89 $maxpoints =
' (' . $maxpoints .
' ' . $this->lng->txt(
'points') .
')';
92 $select_questions[$data[
"question_id"]] = $data[
'title'] . $maxpoints .
' [' . $this->lng->txt(
'question_id_short') .
': ' . $data[
"question_id"] .
']';
95 if (!$select_questions) {
96 $select_questions[0] = $this->lng->txt(
'tst_no_scorable_qst_available');
98 $available_questions->
setOptions(array(
'' => $this->lng->txt(
'please_choose')) + $select_questions);
100 $available_questions->readFromSession();
101 $this->filter[
'question'] = $available_questions->getValue();
106 for (
$i = 1;
$i <= $max_pass;
$i++) {
109 $pass->setOptions($passes);
111 $pass->readFromSession();
112 $this->filter[
'pass'] =
$pass->getValue();
114 $this->lng->txt(
'finalized_evaluation'),
115 'finalize_evaluation' 118 $this->lng->txt(
'all_users'),
119 $this->lng->txt(
'evaluated_users'),
120 $this->lng->txt(
'not_evaluated_users')
122 $correction->setOptions($evaluated);
124 $correction->readFromSession();
125 $this->filter[
'finalize_evaluation'] = $correction->getValue();
135 $ilAccess = $DIC->access();
137 $this->tpl->setVariable(
'VAL_NAME', $row[
'participant']->getName());
141 $this->getParentObject()->object->getAnonymity() == 2 &&
142 false == $ilAccess->checkAccess(
'write',
'', $this->
getParentObject()->object->getRefId())
145 $this->tpl->setVariable(
'VAL_NAME', $this->lng->txt(
"anonymous"));
148 if (!$this->first_row_rendered) {
149 $this->first_row_rendered =
true;
150 $this->tpl->touchBlock(
'row_js');
153 $this->tpl->setVariable(
'VAL_NAME', $row[
'participant']->getName());
154 $this->tpl->setVariable(
'VAL_REACHED_POINTS', $row[
'reached_points']);
155 $this->tpl->setVariable(
'VAL_MAX_POINTS', $row[
'maximum_points']);
156 $finalized = (isset($row[
'feedback'][
'finalized_evaluation']) && $row[
'feedback'][
'finalized_evaluation'] == 1);
157 $this->tpl->setVariable(
159 ($finalized) ? $this->lng->txt(
'yes') : $this->lng->txt(
'no')
161 $fin_usr_id = $row[
'feedback'][
'finalized_by_usr_id'];
163 $this->tpl->setVariable(
'VAL_MODAL_CORRECTION', $row[
'feedback'][
'feedback']);
164 if ($fin_usr_id > 0) {
167 $fin_timestamp = $row[
'feedback'][
'finalized_tstamp'];
168 if ($fin_timestamp > 0) {
173 $this->tpl->setVariable(
'VAL_PASS', $row[
'pass_id']);
174 $this->tpl->setVariable(
'VAL_ACTIVE_ID', $row[
'active_id']);
175 $this->tpl->setVariable(
'VAL_QUESTION_ID', $row[
'qst_id']);
177 if ($this->first_row) {
178 $this->tpl->touchBlock(
'scoring_by_question_refresher');
179 $this->tpl->parseCurrentBlock();
180 $this->first_row =
false;
186 $this->tpl->setVariable(
'VAL_LINK_ANSWER',
$ilCtrl->getLinkTarget($this->getParentObject(),
'getAnswerDetail',
'',
true,
false));
190 $this->tpl->setVariable(
'VAL_TXT_ANSWER', $this->lng->txt(
'tst_eval_show_answer'));
191 $this->tpl->setVariable(
'ANSWER_TITLE', $this->lng->txt(
'answer_of') .
': ' . $row[
'participant']->getName());
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.
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()
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.