4 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
28 $this->user_id = $a_user_id;
29 $this->container_id = $a_course_id;
49 $adapter->initTestRun($a_test_session);
50 $adapter->updateQuestions($a_test_session, $a_test_sequence);
51 $adapter->hideQuestions($a_test_sequence);
52 $adapter->storeTestRun();
53 $adapter->initUserResult($a_test_session);
58 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.print_r($a_test_sequence,
true));
74 $adapter->initTestRun($a_test_session);
75 $adapter->updateQuestionResult($a_test_session,$a_question);
126 $is_qualified_run =
false;
129 $is_qualified_run =
true;
132 foreach($this->run as $run)
134 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
135 include_once
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
140 $run->getObjectiveId(),
146 include_once
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
150 $run->getObjectiveId(),
162 $GLOBALS[
'ilLog']->write(__METHOD__.
': check for qualified...');
163 if(!$is_qualified_run)
165 $GLOBALS[
'ilLog']->write(__METHOD__.
': and increase attempts');
166 ++$old_result[
'tries'];
168 $old_result[
'is_final'] = ($old_result[
'tries'] >= $max_attempts);
172 $ur->saveObjectiveResult(
173 $run->getObjectiveId(),
176 ilLOUserResults::TYPE_INITIAL,
177 $old_result[
'status'],
178 $old_result[
'result_perc'],
180 $old_result[
'tries'],
181 $old_result[
'is_final']
195 $GLOBALS[
'ilLog']->write(__METHOD__.
': is intial');
200 $GLOBALS[
'ilLog']->write(__METHOD__.
': is not qualified');
203 include_once
'./Services/Container/classes/class.ilContainerStartObjects.php';
206 $GLOBALS[
'ilLog']->write(__METHOD__.
': no start object');
212 $container_ref_id = end($container_ref_ids);
218 if($start->isFullfilled($this->getUserId(),$session->
getRefId()))
220 $GLOBALS[
'ilLog']->write(__METHOD__.
': is fullfilled');
224 $GLOBALS[
'ilLog']->write(__METHOD__.
': is not fullfilled');
235 foreach($this->run as $run)
237 if($run->questionExists($qst->
getId()))
240 $run->setQuestionResult(
246 $res = $run->getResult();
248 include_once
'./Modules/Course/classes/Objectives/class.ilLOUserResults.php';
249 include_once
'./Modules/Course/classes/Objectives/class.ilLOUtils.php';
254 $run->getObjectiveId(),
261 $ur->saveObjectiveResult(
262 $run->getObjectiveId(),
265 ilLOUserResults::TYPE_INITIAL,
269 $run->getObjectiveId(),
270 $res[
'max'],
$res[
'reached'],$old_result[
'limit_perc']) ?
273 (
int) $res[
'percentage'],
274 $old_result[
'limit_perc'],
275 $old_result[
'tries'],
276 $old_result[
'is_final']
278 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.print_r($run->getResult(),
true));
280 include_once(
"./Services/Tracking/classes/class.ilLPStatusWrapper.php");
308 include_once
'./Modules/Course/classes/Objectives/class.ilLOTestRun.php';
314 #$GLOBALS['ilLog']->write(__METHOD__.': '.print_r($this->run,true));
322 foreach ($this->run as $tst_run)
344 foreach ($this->run as $tst_run)
346 $tst_run->clearQuestions();
347 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
350 $tst_run->getObjectiveId()
352 $GLOBALS[
'ilLog']->write(__METHOD__.
': '.print_r($qst,
true));
356 $tst_run->addQuestion($id);
359 $tst_run->setMaxPoints($points);
365 include_once
'./Modules/Course/classes/Objectives/class.ilLORandomTestQuestionPools.php';
366 include_once
'./Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
368 foreach($this->run as $tst_run)
371 $tst_run->clearQuestions();
374 $tst_run->getObjectiveId(),
379 $stored_sequence_id = $rnd->getQplSequence();
385 $tst_run->addQuestion($qst);
389 $tst_run->setMaxPoints($points);
395 foreach($this->run as $run)
397 if($run->questionExists($a_qid))
410 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
414 $questionList->setQuestionIdsFilter($questionIds);
416 $questionList->load();
418 return $questionList->getQuestionDataArray();