4require_once
'./Modules/TestQuestionPool/classes/class.assQuestion.php';
5require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
6require_once
'./Modules/TestQuestionPool/interfaces/interface.ilObjQuestionScoringAdjustable.php';
7require_once
'./Modules/TestQuestionPool/interfaces/interface.ilObjAnswerScoringAdjustable.php';
8require_once
'./Modules/TestQuestionPool/interfaces/interface.iQuestionCondition.php';
9require_once
'./Modules/TestQuestionPool/classes/class.ilUserQuestionResult.php';
10require_once
'Modules/TestQuestionPool/interfaces/interface.ilAssSpecificFeedbackOptionLabelProvider.php';
116 $this->thumb_size = 150;
117 $this->answers = array();
119 $this->selectionLimit =
null;
120 $this->feedback_setting = 0;
147 if (strlen($this->title) and ($this->author) and ($this->question) and (count($this->answers)) and ($this->
getMaximumPoints() > 0)) {
165 $this->ensureNoInvalidObligation($this->
getId());
176 if (strlen($answer->getImage())) {
202 switch (strtoupper($path_info[
'extension'])) {
235 $this->
setId($question_id);
244 include_once(
"./Services/RTE/classes/class.ilRTE.php");
250 $this->isSingleline = (
$data[
'allow_images']) ?
false :
true;
251 $this->lastChange =
$data[
'tstamp'];
253 $this->feedback_setting =
$data[
'feedback_setting'];
268 "SELECT * FROM qpl_a_mc WHERE question_fi = %s ORDER BY aorder ASC",
272 include_once
"./Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php";
276 if (!@file_exists($imagefilename)) {
277 $data[
"imagefile"] =
"";
279 include_once(
"./Services/RTE/classes/class.ilRTE.php");
285 parent::loadFromDb($question_id);
293 if ($this->
id <= 0) {
298 $this_id = $this->
getId();
302 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
306 if ((
int) $testObjId > 0) {
307 $clone->setObjId($testObjId);
328 $clone->copyPageOfQuestion($this_id);
330 $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
332 $clone->duplicateImages($this_id, $thisObjId);
334 $clone->onDuplicate($thisObjId, $this_id, $clone->getObjId(), $clone->getId());
344 if ($this->
id <= 0) {
350 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
353 $source_questionpool_id = $this->
getObjId();
354 $clone->setObjId($target_questionpool_id);
364 $clone->copyImages(
$original_id, $source_questionpool_id);
366 $clone->onCopy($source_questionpool_id,
$original_id, $clone->getObjId(), $clone->getId());
373 if ($this->
id <= 0) {
378 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
381 $sourceParentId = $this->
getObjId();
387 $clone->setObjId($targetParentId);
389 if ($targetQuestionTitle) {
390 $clone->setTitle($targetQuestionTitle);
395 $clone->copyPageOfQuestion($sourceQuestionId);
397 $clone->copyXHTMLMediaObjectsOfQuestion($sourceQuestionId);
399 $clone->copyImages($sourceQuestionId, $sourceParentId);
401 $clone->onCopy($sourceParentId, $sourceQuestionId, $clone->getObjId(), $clone->getId());
446 $points_unchecked = 0.0,
451 include_once
"./Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php";
453 if (array_key_exists($order, $this->answers)) {
456 $newchoices = array();
457 for (
$i = 0;
$i < $order;
$i++) {
458 array_push($newchoices, $this->answers[
$i]);
460 array_push($newchoices, $answer);
461 for (
$i = $order;
$i < count($this->answers);
$i++) {
466 $this->answers = $newchoices;
470 array_push($this->answers, $answer);
482 return count($this->answers);
498 if (count($this->answers) < 1) {
501 if (
$index >= count($this->answers)) {
505 return $this->answers[
$index];
520 if (count($this->answers) < 1) {
523 if (
$index >= count($this->answers)) {
526 $answer = $this->answers[
$index];
527 if (strlen($answer->getImage())) {
530 unset($this->answers[
$index]);
531 $this->answers = array_values($this->answers);
532 for (
$i = 0;
$i < count($this->answers);
$i++) {
533 if ($this->answers[
$i]->getOrder() >
$index) {
534 $this->answers[
$i]->setOrder(
$i);
546 $this->answers = array();
558 foreach ($this->answers as $key => $value) {
559 if ($value->getPoints() > $value->getPointsUnchecked()) {
560 $allpoints += $value->getPoints();
562 $allpoints += $value->getPointsUnchecked();
581 if ($returndetails) {
582 throw new ilTestException(
'return details not implemented for ' . __METHOD__);
588 $found_values = array();
589 if (is_null(
$pass)) {
594 if (strcmp(
$data[
"value1"],
"") != 0) {
595 array_push($found_values,
$data[
"value1"]);
610 $failureMsg = sprintf(
611 $this->lng->txt(
'ass_mc_sel_lim_exhausted_hint'),
612 $this->getSelectionLimit(),
613 $this->getAnswerCount()
626 if (!count($solutionSubmit) && !empty(
$_POST[
'tst_force_form_diff_input'])) {
647 if (is_null(
$pass)) {
648 include_once
"./Modules/Test/classes/class.ilObjTest.php";
654 $this->
getProcessLocker()->executeUserSolutionUpdateLockOperation(
function () use (&$entered_values, $active_id,
$pass, $authorized) {
659 foreach ($solutionSubmit as $value) {
660 if (strlen($value)) {
674 if ($entered_values) {
675 include_once(
"./Modules/Test/classes/class.ilObjAssessmentFolder.php");
680 include_once(
"./Modules/Test/classes/class.ilObjAssessmentFolder.php");
704 $oldthumbsize =
$data[
'thumb_size'];
708 if (!$this->isSingleline) {
716 'shuffle' => array(
'text', $this->
getShuffle()),
717 'allow_images' => array(
'text', $this->isSingleline ? 0 : 1),
722 [
'question_fi' => array(
'integer', $this->
getId())]
739 "SELECT * FROM qpl_fb_specific WHERE question_fi = %s",
749 "SELECT answer_id, aorder FROM qpl_a_mc WHERE question_fi = %s",
756 $post_answer_order_for_id = [];
757 foreach ($this->answers as $answer){
759 if ($answer->getId() !==
null && !in_array($answer->getId(), array_keys($post_answer_order_for_id))) {
761 if ($answer->getId() == -1) {
764 $post_answer_order_for_id[$answer->getId()] = $answer->getOrder();
770 if (
sizeof($post_answer_order_for_id) >= 1) {
771 $db_answer_order_for_id = [];
772 $db_answer_id_for_order = [];
773 foreach ($db_answers as $db_answer){
774 $db_answer_order_for_id[intval($db_answer[
'answer_id'])] = intval($db_answer[
'aorder']);
775 $db_answer_id_for_order[intval($db_answer[
'aorder'])] = intval($db_answer[
'answer_id']);
781 $db_answer_ids = array_keys($db_answer_order_for_id);
782 $post_answer_ids = array_keys($post_answer_order_for_id);
783 $diff_db_post_answer_ids = array_diff($db_answer_ids, $post_answer_ids);
784 $unused_answer_ids = array_keys($diff_db_post_answer_ids);
787 $this->feedbackOBJ->deleteSpecificAnswerFeedbacks($this->
getId(),
false);
789 foreach ($db_feedback as $feedback_option) {
791 if (in_array(intval($feedback_option[
'answer']), $unused_answer_ids)) {
796 $feedback_order_db = intval($feedback_option[
'answer']);
797 $db_answer_id = $db_answer_id_for_order[$feedback_order_db];
801 if (is_null($db_answer_id) || $db_answer_id < 0) {
804 $feedback_order_post = $post_answer_order_for_id[$db_answer_id];
805 $feedback_option[
'answer'] = $feedback_order_post;
808 $next_id =
$ilDB->nextId(
'qpl_fb_specific');
810 "INSERT INTO qpl_fb_specific (feedback_id, question_fi, answer, tstamp, feedback, question)
811 VALUES (%s, %s, %s, %s, %s, %s)",
812 [
'integer',
'integer',
'integer',
'integer',
'text',
'integer'],
815 $feedback_option[
'question_fi'],
816 $feedback_option[
'answer'],
818 $feedback_option[
'feedback'],
819 $feedback_option[
'question']
828 "DELETE FROM qpl_a_mc WHERE question_fi = %s",
834 foreach ($this->answers as $key => $value) {
835 $answer_obj = $this->answers[$key];
836 $next_id =
$ilDB->nextId(
'qpl_a_mc');
838 "INSERT INTO qpl_a_mc (answer_id, question_fi, answertext, points, points_unchecked, aorder, imagefile, tstamp)
839 VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
840 [
'integer',
'integer',
'text',
'float',
'float',
'integer',
'text',
'integer'],
845 $answer_obj->getPoints(),
846 $answer_obj->getPointsUnchecked(),
847 $answer_obj->getOrder(),
848 $answer_obj->getImage(),
860 parent::syncWithOriginal();
871 return "assMultipleChoice";
901 public function setImageFile($image_filename, $image_tempfilename =
"")
904 if (!empty($image_tempfilename)) {
905 $image_filename = str_replace(
" ",
"_", $image_filename);
907 if (!file_exists($imagepath)) {
913 include_once
"./Services/MediaObjects/classes/class.ilObjMediaObject.php";
915 if (!preg_match(
"/^image/", $mimetype)) {
916 unlink($imagepath . $image_filename);
937 @unlink($imagepath . $image_filename);
938 $thumbpath = $imagepath . $this->
getThumbPrefix() . $image_filename;
942 public function duplicateImages($question_id, $objectId =
null)
946 $ilLog =
$DIC[
'ilLog'];
949 $imagepath_original = str_replace(
"/$this->id/images",
"/$question_id/images", $imagepath);
951 if ((
int) $objectId > 0) {
952 $imagepath_original = str_replace(
"/$this->obj_id/",
"/$objectId/", $imagepath_original);
955 foreach ($this->answers as $answer) {
958 if (!file_exists($imagepath)) {
962 if (file_exists($imagepath_original .
$filename)) {
964 $ilLog->warning(sprintf(
965 "Could not clone source image '%s' to '%s' (srcQuestionId: %s|tgtQuestionId: %s|srcParentObjId: %s|tgtParentObjId: %s)",
976 if (file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
978 $ilLog->warning(sprintf(
979 "Could not clone thumbnail source image '%s' to '%s' (srcQuestionId: %s|tgtQuestionId: %s|srcParentObjId: %s|tgtParentObjId: %s)",
993 public function copyImages($question_id, $source_questionpool)
996 $ilLog =
$DIC[
'ilLog'];
998 $imagepath_original = str_replace(
"/$this->id/images",
"/$question_id/images", $imagepath);
999 $imagepath_original = str_replace(
"/$this->obj_id/",
"/$source_questionpool/", $imagepath_original);
1000 foreach ($this->answers as $answer) {
1003 if (!file_exists($imagepath)) {
1007 $ilLog->write(
"image could not be duplicated!!!!", $ilLog->ERROR);
1008 $ilLog->write(
"object: " . print_r($this,
true), $ilLog->ERROR);
1010 if (@file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
1012 $ilLog->write(
"image thumbnail could not be duplicated!!!!", $ilLog->ERROR);
1013 $ilLog->write(
"object: " . print_r($this,
true), $ilLog->ERROR);
1026 $ilLog =
$DIC[
'ilLog'];
1029 $originalObjId = parent::lookupParentObjId($this->
getOriginalId());
1030 $imagepath_original = $this->
getImagePath($question_id, $originalObjId);
1033 foreach ($this->answers as $answer) {
1036 if (@file_exists($imagepath .
$filename)) {
1037 if (!file_exists($imagepath)) {
1040 if (!file_exists($imagepath_original)) {
1044 $ilLog->write(
"image could not be duplicated!!!!", $ilLog->ERROR);
1045 $ilLog->write(
"object: " . print_r($this,
true), $ilLog->ERROR);
1048 if (@file_exists($imagepath . $this->
getThumbPrefix() . $filename)) {
1050 $ilLog->write(
"image thumbnail could not be duplicated!!!!", $ilLog->ERROR);
1051 $ilLog->write(
"object: " . print_r($this,
true), $ilLog->ERROR);
1063 $text = parent::getRTETextWithMediaObjects();
1064 foreach ($this->answers as
$index => $answer) {
1065 $text .= $this->feedbackOBJ->getSpecificAnswerFeedbackContent($this->
getId(), 0,
$index);
1066 $answer_obj = $this->answers[
$index];
1067 $text .= $answer_obj->getAnswertext();
1085 parent::setExportDetailsXLS($worksheet, $startrow, $active_id,
$pass);
1091 $worksheet->setCell($startrow +
$i, 0, $answer->getAnswertext());
1092 $worksheet->setBold($worksheet->getColumnCoord(0) . ($startrow +
$i));
1094 foreach ($solution as $solutionvalue) {
1095 if (
$id == $solutionvalue[
"value1"]) {
1100 $worksheet->setCell($startrow +
$i, 2, 1);
1102 $worksheet->setCell($startrow +
$i, 2, 0);
1107 return $startrow +
$i + 1;
1117 $this->thumb_size = $a_size;
1136 require_once
'./Services/RTE/classes/class.ilRTE.php';
1146 'onenotcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
false)),
1147 'allcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
true))
1152 foreach ($this->
getAnswers() as $key => $answer_obj) {
1153 if ((
string) $answer_obj->getImage()) {
1157 "answertext" => (
string) $this->
formatSAQuestion($answer_obj->getAnswertext()),
1158 "points_checked" => (
float) $answer_obj->getPointsChecked(),
1159 "points_unchecked" => (
float) $answer_obj->getPointsUnchecked(),
1160 "order" => (
int) $answer_obj->getOrder(),
1161 "image" => (
string) $answer_obj->getImage(),
1162 "feedback" => $this->formatSAQuestion(
1163 $this->feedbackOBJ->getSpecificAnswerFeedbackExportPresentation($this->getId(), 0, $key)
1182 $answer = $this->answers[
$index];
1183 if (is_object($answer)) {
1185 $answer->setImage(
'');
1194 $multilineAnswerSetting =
$ilUser->getPref(
"tst_multiline_answers");
1195 if ($multilineAnswerSetting != 1) {
1196 $multilineAnswerSetting = 0;
1198 return $multilineAnswerSetting;
1205 $ilUser->writePref(
"tst_multiline_answers", $a_setting);
1219 $this->feedback_setting = $a_feedback_setting;
1233 if ($this->feedback_setting) {
1242 return 'feedback_correct_sc_mc';
1260 return $numExistingSolutionRecords > 0;
1281 SELECT SUM(points) points_for_checked_answers
1283 WHERE question_fi = %s AND points > 0
1290 return $row[
'points_for_checked_answers'] > 0;
1301 public function ensureNoInvalidObligation($questionId)
1308 SELECT SUM(qpl_a_mc.points) points_for_checked_answers,
1311 FROM tst_test_question
1314 ON qpl_a_mc.question_fi = tst_test_question.question_fi
1316 WHERE tst_test_question.question_fi = %s
1317 AND tst_test_question.obligatory = 1
1319 GROUP BY test_question_id
1324 $updateTestQuestionIds = array();
1326 while ($row =
$ilDB->fetchAssoc(
$res)) {
1327 if ($row[
'points_for_checked_answers'] <= 0) {
1328 $updateTestQuestionIds[] = $row[
'test_question_id'];
1332 if (count($updateTestQuestionIds)) {
1333 $test_question_id__IN__updateTestQuestionIds =
$ilDB->in(
1335 $updateTestQuestionIds,
1341 UPDATE tst_test_question
1343 WHERE $test_question_id__IN__updateTestQuestionIds
1355 $solutionSubmit = array();
1356 foreach (
$_POST as $key => $value) {
1357 if (preg_match(
"/^multiple_choice_result_(\d+)/", $key)) {
1358 if (strlen($value)) {
1359 $solutionSubmit[] = $value;
1363 return $solutionSubmit;
1374 foreach ($this->answers as $key => $answer) {
1375 if (in_array($key, $found_values)) {
1376 $points += $answer->getPoints();
1378 $points += $answer->getPointsUnchecked();
1382 include_once
"./Modules/Test/classes/class.ilObjTest.php";
1384 if (($mc_scoring == 0) && (count($found_values) == 0)) {
1401 require_once
"./Modules/TestQuestionPool/classes/class.ilOperatorsExpressionMapping.php";
1434 $maxStep = $this->lookupMaxStep($active_id,
$pass);
1436 if ($maxStep !==
null) {
1438 "SELECT value1+1 as value1 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s AND step = %s",
1439 array(
"integer",
"integer",
"integer",
"integer"),
1440 array($active_id,
$pass, $this->
getId(), $maxStep)
1444 "SELECT value1+1 as value1 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s",
1445 array(
"integer",
"integer",
"integer"),
1451 $result->addKeyValue($row[
"value1"], $row[
"value1"]);
1481 $config = parent::buildTestPresentationConfig();
1482 $config->setUseUnchangedAnswerLabel($this->lng->txt(
'tst_mc_label_none_above'));
ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked,...
An exception for terminatinating execution or to throw for unit testing.
Class for multiple choice tests.
buildTestPresentationConfig()
build basic test question configuration instance
syncImages()
Sync images of a MC question on synchronisation with the original question.
toJSON()
Returns a JSON representation of the question.
getSpecificFeedbackSetting()
Gets the current feedback settings in effect for the question.
setExportDetailsXLS($worksheet, $startrow, $active_id, $pass)
{Creates an Excel worksheet for the detailed cumulated results of this question.object}
copyImages($question_id, $source_questionpool)
saveToDb($original_id="")
Saves a assMultipleChoice object to a database.
loadFromDb($question_id)
Loads a assMultipleChoice object from a database.
duplicate($for_test=true, $title="", $author="", $owner="", $testObjId=null)
Duplicates an assMultipleChoiceQuestion.
getMaximumPoints()
Returns the maximum points, a learner can reach answering the question.
getAnswerCount()
Returns the number of answers.
getAnswerTableName()
Returns the name of the answer table in the database.
isForcedEmptySolution($solutionSubmit)
getAdditionalTableName()
Returns the name of the additional question data table in the database.
getSpecificFeedbackAllCorrectOptionLabel()
setSpecificFeedbackSetting($a_feedback_setting)
Sets the feedback settings in effect for the question.
removeAnswerImage($index)
getAvailableAnswerOptions($index=null)
If index is null, the function returns an array with all anwser options Else it returns the specific ...
setSelectionLimit($selectionLimit)
calculateReachedPointsForSolution($found_values, $active_id=0)
addAnswer( $answertext="", $points=0.0, $points_unchecked=0.0, $order=0, $answerimage="", $answer_id=-1)
Adds a possible answer for a multiple choice question.
getOutputType()
Gets the multiple choice output type which is either OUTPUT_ORDER (=0) or OUTPUT_RANDOM (=1).
setLastChange($lastChange)
copyObject($target_questionpool_id, $title="")
Copies an assMultipleChoice object.
createNewOriginalFromThisDuplicate($targetParentId, $targetQuestionTitle="")
getMultilineAnswerSetting()
lmMigrateQuestionTypeSpecificContent(ilAssSelfAssessmentMigrator $migrator)
setMultilineAnswerSetting($a_setting=0)
isComplete()
Returns true, if a multiple choice question is complete for use.
flushAnswers()
Deletes all answers.
deleteAnswer($index=0)
Deletes an answer with a given index.
getQuestionType()
Returns the question type of the question.
deleteImage($image_filename)
Deletes an image file.
setImageFile($image_filename, $image_tempfilename="")
Sets the image file and uploads the image to the object's image directory.
__construct( $title="", $comment="", $author="", $owner=-1, $question="", $output_type=OUTPUT_ORDER)
assMultipleChoice constructor
setIsSingleline($isSingleline)
setOutputType($output_type=OUTPUT_ORDER)
Sets the output type of the assMultipleChoice object.
calculateReachedPoints($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
Returns the points, a learner has reached answering the question.
isAnswered($active_id, $pass=null)
returns boolean wether the question is answered during test pass or not
getAnswer($index=0)
Returns an answer with a given index.
generateThumbForFile($path, $file)
getExpressionTypes()
Get all available expression types for a specific question.
getRTETextWithMediaObjects()
Collects all text in the question which could contain media objects which were created with the Rich ...
rebuildThumbnails()
Rebuild the thumbnail images with a new thumbnail size.
& getAnswers()
Returns a reference to the answers array.
getOperators($expression)
Get all available operations for a specific question.
Abstract basic class which is to be extended by the concrete assessment question type classes.
getCurrentSolutionResultSet($active_id, $pass, $authorized=true)
Get a restulset for the current user solution for a this question by active_id and pass.
getSolutionValues($active_id, $pass=null, $authorized=true)
Loads solutions of a given user from the database an returns it.
static _getOriginalId($question_id)
Returns the original id of a question.
formatSAQuestion($a_q)
Format self assessment question.
setShuffle($shuffle=true)
Sets the shuffle flag.
setId($id=-1)
Sets the id of the assQuestion object.
setOriginalId($original_id)
setObjId($obj_id=0)
Set the object id of the container object.
static isObligationPossible($questionId)
returns boolean wether it is possible to set this question type as obligatory or not considering the ...
getSolutionMaxPass($active_id)
Returns the maximum pass a users question solution.
saveQuestionDataToDb($original_id="")
getHtmlQuestionContentPurifier()
getId()
Gets the id of the assQuestion object.
saveCurrentSolution($active_id, $pass, $value1, $value2, $authorized=true, $tstamp=null)
getObjId()
Get the object id of the container object.
setTitle($title="")
Sets the title string of the assQuestion object.
getAdditionalContentEditingMode()
getter for additional content editing mode for this question
setOwner($owner="")
Sets the creator/owner ID of the assQuestion object.
setEstimatedWorkingTime($hour=0, $min=0, $sec=0)
Sets the estimated working time of a question from given hour, minute and second.
static logAction($logtext="", $active_id="", $question_id="")
Logs an action into the Test&Assessment log.
getImagePath($question_id=null, $object_id=null)
Returns the image path for web accessable images of a question.
removeCurrentSolution($active_id, $pass, $authorized=true)
static getNumExistingSolutionRecords($activeId, $pass, $questionId)
returns the number of existing solution records for the given test active / pass and given question i...
setAuthor($author="")
Sets the authors name of the assQuestion object.
saveWorkingData($active_id, $pass=null, $authorized=true)
Saves the learners input of the question to the database.
getShuffle()
Gets the shuffle flag.
setLifecycle(ilAssQuestionLifecycle $lifecycle)
getTitle()
Gets the title string of the assQuestion object.
setPoints($a_points)
Sets the maximum available points for the question.
setComment($comment="")
Sets the comment string of the assQuestion object.
setNrOfTries($a_nr_of_tries)
getQuestion()
Gets the question string of the question object.
setAdditionalContentEditingMode($additinalContentEditingMode)
setter for additional content editing mode for this question
setQuestion($question="")
Sets the question string of the question object.
getImagePathWeb()
Returns the web image path for web accessable images of a question.
static getDraftInstance()
static getInstance($identifier)
static _getLogLanguage()
retrieve the log language for assessment logging
static _enabledAssessmentLogging()
check wether assessment logging is enabled or not
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
static _getMCScoring($active_id)
Gets the scoring type for multiple choice questions.
static getOperatorsByExpression($expression)
static _replaceMediaObjectImageSrc($a_text, $a_direction=0, $nic=IL_INST_ID)
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
Base Exception for all Exceptions relating to Modules/Test.
Class ilUserQuestionResult.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static convertImage( $a_from, $a_to, $a_target_format="", $a_geometry="", $a_background_color="")
convert image
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
Class iQuestionCondition.
const PercentageResultExpression
getUserQuestionResult($active_id, $pass)
Get the user solution for a question by active_id and the test pass.
const EmptyAnswerExpression
const ExclusiveResultExpression
const NumberOfResultExpression
migrateToLmContent($content)
Interface ilObjAnswerScoringAdjustable.
saveAnswerSpecificDataToDb()
Saves the answer specific records into a question types answer table.
Interface ilObjQuestionScoringAdjustable.
saveAdditionalQuestionDataToDb()
Saves a record to the question types additional data table.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
foreach($_POST as $key=> $value) $res