19 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
106 $this->answers = array();
108 $this->selectionLimit = null;
109 $this->feedback_setting = 0;
136 if (strlen($this->title) and ($this->author) and ($this->question) and (count($this->answers)) and ($this->
getMaximumPoints() > 0)) {
158 $this->ensureNoInvalidObligation($this->
getId());
169 if (strlen($answer->getImage())) {
195 switch (strtoupper($path_info[
'extension'])) {
218 $ilDB = $DIC[
'ilDB'];
221 $result =
$ilDB->queryF(
226 if ($result->numRows() == 1) {
228 $this->
setId($question_id);
237 include_once(
"./Services/RTE/classes/class.ilRTE.php");
245 $this->lastChange =
$data[
'tstamp'];
247 $this->feedback_setting =
$data[
'feedback_setting'];
261 $result =
$ilDB->queryF(
262 "SELECT * FROM qpl_a_mc WHERE question_fi = %s ORDER BY aorder ASC",
266 include_once
"./Modules/TestQuestionPool/classes/class.assAnswerMultipleResponseImage.php";
267 if ($result->numRows() > 0) {
270 if (!@file_exists($imagefilename)) {
271 $data[
"imagefile"] =
"";
273 include_once(
"./Services/RTE/classes/class.ilRTE.php");
282 $answer->setPointsUnchecked(
$data[
"points_unchecked"]);
283 $answer->setImage(
$data[
"imagefile"]);
284 array_push($this->answers, $answer);
288 parent::loadFromDb($question_id);
296 if ($this->
id <= 0) {
301 $this_id = $this->
getId();
305 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
309 if ((
int) $testObjId > 0) {
310 $clone->setObjId($testObjId);
331 $clone->copyPageOfQuestion($this_id);
333 $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
335 $clone->duplicateImages($this_id, $thisObjId);
337 $clone->onDuplicate($thisObjId, $this_id, $clone->getObjId(), $clone->getId());
347 if ($this->
getId() <= 0) {
348 throw new RuntimeException(
'The question has not been saved. It cannot be duplicated');
352 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
355 $source_questionpool_id = $this->
getObjId();
356 $clone->setObjId($target_questionpool_id);
366 $clone->copyImages(
$original_id, $source_questionpool_id);
368 $clone->onCopy($source_questionpool_id,
$original_id, $clone->getObjId(), $clone->getId());
375 if ($this->
getId() <= 0) {
376 throw new RuntimeException(
'The question has not been saved. It cannot be duplicated');
379 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
382 $sourceParentId = $this->
getObjId();
388 $clone->setObjId($targetParentId);
390 if ($targetQuestionTitle) {
391 $clone->setTitle($targetQuestionTitle);
396 $clone->copyPageOfQuestion($sourceQuestionId);
398 $clone->copyXHTMLMediaObjectsOfQuestion($sourceQuestionId);
400 $clone->copyImages($sourceQuestionId, $sourceParentId);
402 $clone->onCopy($sourceParentId, $sourceQuestionId, $clone->getObjId(), $clone->getId());
447 $points_unchecked = 0.0,
453 if (array_key_exists($order, $this->answers)) {
456 $answer->setPointsUnchecked($points_unchecked);
457 $answer->setImage($answerimage);
458 $newchoices = array();
459 for (
$i = 0;
$i < $order;
$i++) {
460 $newchoices[] = $this->answers[
$i];
462 $newchoices[] = $answer;
463 for (
$i = $order, $iMax = count($this->answers);
$i < $iMax;
$i++) {
464 $changed = $this->answers[
$i];
465 $changed->setOrder(
$i + 1);
466 $newchoices[] = $changed;
468 $this->answers = $newchoices;
471 $answer->setPointsUnchecked($points_unchecked);
472 $answer->setImage($answerimage);
473 $this->answers[] = $answer;
485 return count($this->answers);
501 if (count($this->answers) < 1) {
504 if (
$index >= count($this->answers)) {
508 return $this->answers[
$index];
523 if (count($this->answers) < 1) {
526 if (
$index >= count($this->answers)) {
529 $answer = $this->answers[
$index];
530 if (strlen($answer->getImage())) {
533 unset($this->answers[
$index]);
534 $this->answers = array_values($this->answers);
535 for (
$i = 0, $iMax = count($this->answers);
$i < $iMax;
$i++) {
536 if ($this->answers[
$i]->getOrder() > $index) {
537 $this->answers[
$i]->setOrder(
$i);
549 $this->answers = array();
561 foreach ($this->answers as
$key => $value) {
562 if ($value->getPoints() > $value->getPointsUnchecked()) {
563 $allpoints += $value->getPoints();
565 $allpoints += $value->getPointsUnchecked();
584 if ($returndetails) {
585 throw new ilTestException(
'return details not implemented for ' . __METHOD__);
589 $ilDB = $DIC[
'ilDB'];
591 $found_values = array();
592 if (is_null($pass)) {
597 if (strcmp(
$data[
"value1"],
"") != 0) {
598 array_push($found_values,
$data[
"value1"]);
613 $failureMsg = sprintf(
614 $this->
lng->txt(
'ass_mc_sel_lim_exhausted_hint'),
619 $this->tpl->setOnScreenMessage(
'failure', $failureMsg,
true);
629 if (!count($solutionSubmit) && !empty($_POST[
'tst_force_form_diff_input'])) {
644 public function saveWorkingData($active_id, $pass = null, $authorized =
true):
bool 648 $ilDB = $DIC[
'ilDB'];
650 if (is_null($pass)) {
651 include_once
"./Modules/Test/classes/class.ilObjTest.php";
657 $this->
getProcessLocker()->executeUserSolutionUpdateLockOperation(
function () use (&$entered_values, $active_id, $pass, $authorized) {
662 foreach ($solutionSubmit as $value) {
663 if (strlen($value)) {
677 if ($entered_values) {
678 include_once(
"./Modules/Test/classes/class.ilObjAssessmentFolder.php");
682 "log_user_entered_values",
684 ), $active_id, $this->
getId());
687 include_once(
"./Modules/Test/classes/class.ilObjAssessmentFolder.php");
691 "log_user_not_entered_values",
693 ), $active_id, $this->
getId());
704 $ilDB = $DIC[
'ilDB'];
708 $result =
$ilDB->queryF(
713 if ($result->numRows() == 1) {
715 $oldthumbsize =
$data[
'thumb_size'];
727 'shuffle' => array(
'text', $this->
getShuffle()),
728 'allow_images' => array(
'text', $this->
isSingleline ? 0 : 1),
733 [
'question_fi' => array(
'integer', $this->
getId())]
746 $ilDB = $DIC[
'ilDB'];
749 $result =
$ilDB->queryF(
750 "SELECT * FROM qpl_fb_specific WHERE question_fi = %s",
754 $db_feedback =
$ilDB->fetchAll($result);
759 $result =
$ilDB->queryF(
760 "SELECT answer_id, aorder FROM qpl_a_mc WHERE question_fi = %s",
764 $db_answers =
$ilDB->fetchAll($result);
767 $post_answer_order_for_id = [];
768 foreach ($this->answers as $answer) {
770 if ($answer->getId() !== null && !in_array($answer->getId(), array_keys($post_answer_order_for_id))) {
772 if ($answer->getId() == -1) {
775 $post_answer_order_for_id[$answer->getId()] = $answer->getOrder();
781 if (
sizeof($post_answer_order_for_id) >= 1) {
782 $db_answer_order_for_id = [];
783 $db_answer_id_for_order = [];
784 foreach ($db_answers as $db_answer) {
785 $db_answer_order_for_id[intval($db_answer[
'answer_id'])] = intval($db_answer[
'aorder']);
786 $db_answer_id_for_order[intval($db_answer[
'aorder'])] = intval($db_answer[
'answer_id']);
792 $db_answer_ids = array_keys($db_answer_order_for_id);
793 $post_answer_ids = array_keys($post_answer_order_for_id);
794 $diff_db_post_answer_ids = array_diff($db_answer_ids, $post_answer_ids);
795 $unused_answer_ids = array_keys($diff_db_post_answer_ids);
798 $this->feedbackOBJ->deleteSpecificAnswerFeedbacks($this->
getId(),
false);
800 foreach ($db_feedback as $feedback_option) {
802 if (in_array(intval($feedback_option[
'answer']), $unused_answer_ids)) {
807 $feedback_order_db = intval($feedback_option[
'answer']);
808 $db_answer_id = $db_answer_id_for_order[$feedback_order_db];
812 if (is_null($db_answer_id) || $db_answer_id < 0) {
815 $feedback_order_post = $post_answer_order_for_id[$db_answer_id];
816 $feedback_option[
'answer'] = $feedback_order_post;
819 $next_id =
$ilDB->nextId(
'qpl_fb_specific');
821 "INSERT INTO qpl_fb_specific (feedback_id, question_fi, answer, tstamp, feedback, question) 822 VALUES (%s, %s, %s, %s, %s, %s)",
823 [
'integer',
'integer',
'integer',
'integer',
'text',
'integer'],
826 $feedback_option[
'question_fi'],
827 $feedback_option[
'answer'],
829 $feedback_option[
'feedback'],
830 $feedback_option[
'question']
839 "DELETE FROM qpl_a_mc WHERE question_fi = %s",
845 foreach ($this->answers as
$key => $value) {
846 $answer_obj = $this->answers[
$key];
847 $next_id =
$ilDB->nextId(
'qpl_a_mc');
849 "INSERT INTO qpl_a_mc (answer_id, question_fi, answertext, points, points_unchecked, aorder, imagefile, tstamp) 850 VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
851 [
'integer',
'integer',
'text',
'float',
'float',
'integer',
'text',
'integer'],
856 $answer_obj->getPoints(),
857 $answer_obj->getPointsUnchecked(),
858 $answer_obj->getOrder(),
859 $answer_obj->getImage(),
871 parent::syncWithOriginal();
882 return "assMultipleChoice";
915 if (!empty($image_tempfilename)) {
916 $image_filename = str_replace(
" ",
"_", $image_filename);
918 if (!file_exists($imagepath)) {
924 include_once
"./Services/MediaObjects/classes/class.ilObjMediaObject.php";
926 if (!preg_match(
"/^image/", $mimetype)) {
927 unlink($imagepath . $image_filename);
948 @unlink($imagepath . $image_filename);
949 $thumbpath = $imagepath . $this->
getThumbPrefix() . $image_filename;
953 public function duplicateImages($question_id, $objectId = null):
void 960 $imagepath_original = str_replace(
"/$this->id/images",
"/$question_id/images", $imagepath);
962 if ((
int) $objectId > 0) {
963 $imagepath_original = str_replace(
"/$this->obj_id/",
"/$objectId/", $imagepath_original);
966 foreach ($this->answers as $answer) {
969 if (!file_exists($imagepath)) {
973 if (file_exists($imagepath_original .
$filename)) {
974 if (!copy($imagepath_original . $filename, $imagepath . $filename)) {
976 "Could not clone source image '%s' to '%s' (srcQuestionId: %s|tgtQuestionId: %s|srcParentObjId: %s|tgtParentObjId: %s)",
977 $imagepath_original . $filename,
978 $imagepath . $filename,
987 if (file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
990 "Could not clone thumbnail source image '%s' to '%s' (srcQuestionId: %s|tgtQuestionId: %s|srcParentObjId: %s|tgtParentObjId: %s)",
1004 public function copyImages($question_id, $source_questionpool): void
1009 $imagepath_original = str_replace(
"/$this->id/images",
"/$question_id/images", $imagepath);
1010 $imagepath_original = str_replace(
"/$this->obj_id/",
"/$source_questionpool/", $imagepath_original);
1011 foreach ($this->answers as $answer) {
1014 if (!file_exists($imagepath)) {
1017 if (!@copy($imagepath_original .
$filename, $imagepath . $filename)) {
1018 $ilLog->write(
"image could not be duplicated!!!!",
$ilLog->ERROR);
1019 $ilLog->write(
"object: " . print_r($this,
true),
$ilLog->ERROR);
1021 if (@file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
1023 $ilLog->write(
"image thumbnail could not be duplicated!!!!",
$ilLog->ERROR);
1024 $ilLog->write(
"object: " . print_r($this,
true),
$ilLog->ERROR);
1040 $originalObjId = parent::lookupParentObjId($this->
getOriginalId());
1041 $imagepath_original = $this->
getImagePath($question_id, $originalObjId);
1044 foreach ($this->answers as $answer) {
1047 if (@file_exists($imagepath .
$filename)) {
1048 if (!file_exists($imagepath)) {
1051 if (!file_exists($imagepath_original)) {
1054 if (!@copy($imagepath . $filename, $imagepath_original . $filename)) {
1055 $ilLog->write(
"image could not be duplicated!!!!",
$ilLog->ERROR);
1056 $ilLog->write(
"object: " . print_r($this,
true),
$ilLog->ERROR);
1059 if (@file_exists($imagepath . $this->
getThumbPrefix() . $filename)) {
1061 $ilLog->write(
"image thumbnail could not be duplicated!!!!",
$ilLog->ERROR);
1062 $ilLog->write(
"object: " . print_r($this,
true),
$ilLog->ERROR);
1074 $text = parent::getRTETextWithMediaObjects();
1075 foreach ($this->answers as
$index => $answer) {
1076 $text .= $this->feedbackOBJ->getSpecificAnswerFeedbackContent($this->
getId(), 0,
$index);
1077 $answer_obj = $this->answers[
$index];
1078 $text .= $answer_obj->getAnswertext();
1096 parent::setExportDetailsXLS($worksheet, $startrow, $active_id, $pass);
1102 $worksheet->
setCell($startrow +
$i, 0, $answer->getAnswertext());
1105 foreach ($solution as $solutionvalue) {
1106 if (
$id == $solutionvalue[
"value1"]) {
1111 $worksheet->
setCell($startrow +
$i, 2, 1);
1113 $worksheet->
setCell($startrow +
$i, 2, 0);
1118 return $startrow +
$i + 1;
1137 require_once
'./Services/RTE/classes/class.ilRTE.php';
1139 $result[
'id'] = $this->
getId();
1146 $result[
'feedback'] = array(
1147 'onenotcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
false)),
1148 'allcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
true))
1154 if ((
string) $answer_obj->getImage()) {
1157 array_push($answers, array(
1159 "points_checked" => (
float) $answer_obj->getPointsChecked(),
1160 "points_unchecked" => (float) $answer_obj->getPointsUnchecked(),
1161 "order" => (
int) $answer_obj->getOrder(),
1162 "image" => (string) $answer_obj->getImage(),
1164 $this->feedbackOBJ->getSpecificAnswerFeedbackExportPresentation($this->getId(), 0,
$key)
1176 $result[
'mobs'] =
$mobs;
1178 return json_encode($result);
1183 $answer = $this->answers[
$index];
1184 if (is_object($answer)) {
1186 $answer->setImage(
'');
1195 $multilineAnswerSetting =
$ilUser->getPref(
"tst_multiline_answers");
1196 if ($multilineAnswerSetting != 1) {
1197 $multilineAnswerSetting = 0;
1199 return $multilineAnswerSetting;
1206 $ilUser->writePref(
"tst_multiline_answers", $a_setting);
1220 $this->feedback_setting = $a_feedback_setting;
1234 if ($this->feedback_setting) {
1243 return 'feedback_correct_sc_mc';
1261 return $numExistingSolutionRecords > 0;
1279 $ilDB = $DIC[
'ilDB'];
1282 SELECT SUM(points) points_for_checked_answers 1284 WHERE question_fi = %s AND points > 0 1291 return $row[
'points_for_checked_answers'] > 0;
1302 public function ensureNoInvalidObligation($questionId):
void 1306 $ilDB = $DIC[
'ilDB'];
1309 SELECT SUM(qpl_a_mc.points) points_for_checked_answers, 1312 FROM tst_test_question 1315 ON qpl_a_mc.question_fi = tst_test_question.question_fi 1317 WHERE tst_test_question.question_fi = %s 1318 AND tst_test_question.obligatory = 1 1320 GROUP BY test_question_id 1325 $updateTestQuestionIds = array();
1327 while ($row =
$ilDB->fetchAssoc(
$res)) {
1328 if ($row[
'points_for_checked_answers'] <= 0) {
1329 $updateTestQuestionIds[] = $row[
'test_question_id'];
1333 if (count($updateTestQuestionIds)) {
1334 $test_question_id__IN__updateTestQuestionIds =
$ilDB->in(
1336 $updateTestQuestionIds,
1342 UPDATE tst_test_question 1344 WHERE $test_question_id__IN__updateTestQuestionIds 1353 $solutionSubmit = [];
1354 $post = $this->dic->http()->wrapper()->post();
1357 if (
$post->has(
"multiple_choice_result_$index")) {
1358 $value =
$post->retrieve(
"multiple_choice_result_$index", $this->dic->refinery()->kindlyTo()->string());
1359 if (is_numeric($value)) {
1360 $solutionSubmit[] = $value;
1364 return $solutionSubmit;
1374 if ($found_values == null) {
1378 foreach ($this->answers as
$key => $answer) {
1379 if (in_array(
$key, $found_values)) {
1380 $points += $answer->getPoints();
1382 $points += $answer->getPointsUnchecked();
1386 if (count($found_values) == 0) {
1432 $ilDB = $DIC[
'ilDB'];
1437 if ($maxStep !== null) {
1439 "SELECT value1+1 as value1 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s AND step = %s",
1440 array(
"integer",
"integer",
"integer",
"integer"),
1441 array($active_id, $pass, $this->
getId(), $maxStep)
1445 "SELECT value1+1 as value1 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s",
1446 array(
"integer",
"integer",
"integer"),
1447 array($active_id, $pass, $this->
getId())
1452 $result->addKeyValue($row[
"value1"], $row[
"value1"]);
1458 $result->setReachedPercentage((
$points / $max_points) * 100);
1480 $config = parent::buildTestPresentationConfig();
1481 $config->setUseUnchangedAnswerLabel($this->
lng->txt(
'tst_mc_label_none_above'));
static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
flushAnswers()
Deletes all answers.
getSolutionValues($active_id, $pass=null, bool $authorized=true)
Loads solutions of a given user from the database an returns it.
calculateReachedPointsForSolution($found_values, $active_id=0)
setNrOfTries(int $a_nr_of_tries)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance($identifier)
getRTETextWithMediaObjects()
Collects all text in the question which could contain media objects which were created with the Rich ...
const PercentageResultExpression
toJSON()
Returns a JSON representation of the question.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isAnswered(int $active_id, int $pass)
returns boolean wether the question is answered during test pass or not
generateThumbForFile($path, $file)
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
isComplete()
Returns true, if a multiple choice question is complete for use.
copyObject($target_questionpool_id, $title="")
Copies an assMultipleChoice object.
const NumberOfResultExpression
createNewOriginalFromThisDuplicate($targetParentId, $targetQuestionTitle="")
duplicate(bool $for_test=true, string $title="", string $author="", string $owner="", $testObjId=null)
Duplicates an assMultipleChoiceQuestion.
saveAdditionalQuestionDataToDb()
Saves a record to the question types additional data table.
const ExclusiveResultExpression
rebuildThumbnails()
Rebuild the thumbnail images with a new thumbnail size.
addAnswer( $answertext="", $points=0.0, $points_unchecked=0.0, $order=0, $answerimage="", $answer_id=-1)
Adds a possible answer for a multiple choice question.
calculateReachedPoints($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
Returns the points, a learner has reached answering the question.
Abstract basic class which is to be extended by the concrete assessment question type classes...
setExportDetailsXLS(ilAssExcelFormatHelper $worksheet, int $startrow, int $active_id, int $pass)
{}
static isObligationPossible(int $questionId)
saveWorkingData(int $active_id, int $pass, bool $authorized=true)
Saves the learners input of the question to the database.
getColumnCoord(int $a_col)
Get column "name" from number.
bool $shuffle
Indicates whether the answers will be shuffled or not.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSelectionLimit($selectionLimit)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getImagePathWeb()
Returns the web image path for web accessable images of a question.
setThumbSize(int $a_size)
static _getOriginalId(int $question_id)
migrateToLmContent($content)
static getNumExistingSolutionRecords(int $activeId, int $pass, int $questionId)
setOutputType($output_type=OUTPUT_ORDER)
Sets the output type of the assMultipleChoice object.
getQuestionType()
Returns the question type of the question.
getAdditionalContentEditingMode()
getUserQuestionResult($active_id, $pass)
Get the user solution for a question by active_id and the test pass.
loadFromDb($question_id)
Loads a assMultipleChoice object from a database.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
setComment(string $comment="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getSpecificFeedbackAllCorrectOptionLabel()
float $points
The maximum available points for the question.
lmMigrateQuestionTypeSpecificContent(ilAssSelfAssessmentMigrator $migrator)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getMultilineAnswerSetting()
removeAnswerImage($index)
saveToDb($original_id="")
Saves a assMultipleChoice object to a database.
deleteAnswer($index=0)
Deletes an answer with a given index.
saveCurrentSolution(int $active_id, int $pass, $value1, $value2, bool $authorized=true, $tstamp=0)
setBold(string $a_coords)
Set cell(s) to bold.
static _enabledAssessmentLogging()
getImagePath($question_id=null, $object_id=null)
Returns the image path for web accessable images of a question.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAnswerCount()
Returns the number of answers.
static logAction(string $logtext, int $active_id, int $question_id)
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
getSpecificFeedbackSetting()
Gets the current feedback settings in effect for the question.
isForcedEmptySolution($solutionSubmit)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAvailableAnswerOptions($index=null)
If index is null, the function returns an array with all anwser options Else it returns the specific ...
__construct( $title="", $comment="", $author="", $owner=-1, $question="", $output_type=OUTPUT_ORDER)
assMultipleChoice constructor
syncImages()
Sync images of a MC question on synchronisation with the original question.
getOperators($expression)
Get all available operations for a specific question.
setIsSingleline($isSingleline)
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
getAnswer($index=0)
Returns an answer with a given index.
& getAnswers()
Returns a reference to the answers array.
string $question
The question text.
setSpecificFeedbackSetting($a_feedback_setting)
Sets the feedback settings in effect for the question.
static convertImage(string $a_from, string $a_to, string $a_target_format="", string $a_geometry="", string $a_background_color="")
convert image
buildTestPresentationConfig()
deleteImage($image_filename)
Deletes an image file.
getExpressionTypes()
Get all available expression types for a specific question.
static getOperatorsByExpression($expression)
saveAnswerSpecificDataToDb()
Saves the answer specific records into a question types answer table.
getMaximumPoints()
Returns the maximum points, a learner can reach answering the question.
saveQuestionDataToDb(int $original_id=-1)
setImageFile($image_filename, $image_tempfilename="")
Sets the image file and uploads the image to the object's image directory.
getSolutionMaxPass(int $active_id)
removeCurrentSolution(int $active_id, int $pass, bool $authorized=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
getAdditionalTableName()
Returns the name of the additional question data table in the database.
setOriginalId(?int $original_id)
setTitle(string $title="")
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
setLifecycle(ilAssQuestionLifecycle $lifecycle)
getAnswerTableName()
Returns the name of the answer table in the database.
getCurrentSolutionResultSet(int $active_id, int $pass, bool $authorized=true)
getOutputType()
Gets the multiple choice output type which is either OUTPUT_ORDER (=0) or OUTPUT_RANDOM (=1)...
ILIAS DI LoggingServices $ilLog
getHtmlQuestionContentPurifier()
lookupMaxStep(int $active_id, int $pass)
setAuthor(string $author="")
setShuffle(?bool $shuffle=true)
setAdditionalContentEditingMode(?string $additionalContentEditingMode)
static getDraftInstance()
setMultilineAnswerSetting($a_setting=0)
copyImages($question_id, $source_questionpool)
setQuestion(string $question="")
const EmptyAnswerExpression