19 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
110 $elements = array_filter(
112 fn($element) => trim($element->getContent()) !=
'' 114 $has_at_least_two_elements = count($elements) > 1;
120 && $has_at_least_two_elements;
127 protected function getRepository():
ILIAS\TA\Questions\Ordering\assOrderingQuestionDatabaseRepository
129 if (is_null($this->oq_repository)) {
131 $ilDB = $DIC[
'ilDB'];
132 $this->oq_repository =
new OQRepository(
$ilDB);
166 $ilDB = $DIC[
'ilDB'];
168 $result =
$ilDB->queryF(
173 if ($result->numRows() == 1) {
175 $this->
setId($question_id);
178 $this->
setComment((
string) $data[
"description"]);
185 $this->ordering_type = $data[
"ordering_type"] !== null ? (
int) $data[
"ordering_type"] :
OQ_TERMS;
186 if ($data[
'thumb_geometry'] !== null && $data[
'thumb_geometry'] >= $this->
getMinimumThumbSize()) {
189 $this->element_height = $data[
"element_height"] ? (
int) $data[
'element_height'] : null;
203 parent::loadFromDb($question_id);
207 bool $for_test =
true,
213 if ($this->
id <= 0) {
218 $this_id = $this->
getId();
221 $clone = clone $this;
222 $original_id = $this->questioninfo->getOriginalId($this->
id);
225 if ((
int) $testObjId > 0) {
226 $clone->setObjId($testObjId);
246 ->withQuestionId($clone->getId());
247 $list->distributeNewRandomIdentifiers();
248 $clone->setOrderingElementList($list);
251 $clone->copyPageOfQuestion($this_id);
252 $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
253 $clone->duplicateImages($this_id, $thisObjId, $clone->getId(), $testObjId);
255 $clone->onDuplicate($thisObjId, $this_id, $clone->getObjId(), $clone->getId());
256 return $clone->getId();
266 if ($this->
getId() <= 0) {
267 throw new RuntimeException(
'The question has not been saved. It cannot be duplicated');
270 $clone = clone $this;
271 $this_id = $this->
getId();
272 $original_id = $this->questioninfo->getOriginalId($this_id);
274 $source_questionpool_id = $this->
getObjId();
275 $clone->setObjId($target_questionpool_id);
282 ->withQuestionId($clone->getId());
283 $list->distributeNewRandomIdentifiers();
284 $clone->setOrderingElementList($list);
289 $clone->duplicateImages(
$original_id, $source_questionpool_id, $clone->getId(), $target_questionpool_id);
291 $clone->onCopy($source_questionpool_id,
$original_id, $clone->getObjId(), $clone->getId());
293 return $clone->getId();
298 if ($this->
getId() <= 0) {
299 throw new RuntimeException(
'The question has not been saved. It cannot be duplicated');
303 $sourceParentId = $this->
getObjId();
306 $clone = clone $this;
309 $clone->setObjId($targetParentId);
311 if ($targetQuestionTitle) {
312 $clone->setTitle($targetQuestionTitle);
318 ->withQuestionId($clone->getId());
319 $list->distributeNewRandomIdentifiers();
320 $clone->setOrderingElementList($list);
324 $clone->copyPageOfQuestion($sourceQuestionId);
326 $clone->copyXHTMLMediaObjectsOfQuestion($sourceQuestionId);
328 $clone->duplicateImages($sourceQuestionId, $sourceParentId, $clone->getId(), $clone->getObjId());
330 $clone->onCopy($sourceParentId, $sourceQuestionId, $clone->getObjId(), $clone->getId());
335 public function duplicateImages($src_question_id, $src_object_id, $dest_question_id, $dest_object_id): void
340 $imagepath_original = $this->
getImagePath($src_question_id, $src_object_id);
341 $imagepath = $this->
getImagePath($dest_question_id, $dest_object_id);
343 if (!file_exists($imagepath)) {
353 if (!file_exists($imagepath_original .
$filename)
354 || !copy($imagepath_original . $filename, $imagepath . $filename)) {
355 $ilLog->write(
"image could not be duplicated!!!!");
356 $ilLog->write($imagepath_original . $filename);
357 $ilLog->write($imagepath . $filename);
359 if (file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)
361 $ilLog->write(
"image thumbnail could not be duplicated!!!!");
372 public function copyImages($question_id, $source_questionpool): void
378 $imagepath_original = str_replace(
"/$this->id/images",
"/$question_id/images", $imagepath);
379 $imagepath_original = str_replace(
"/$this->obj_id/",
"/$source_questionpool/", $imagepath_original);
380 if (!file_exists($imagepath)) {
385 if (!@copy($imagepath_original .
$filename, $imagepath . $filename)) {
386 $ilLog->write(
'Ordering Question image could not be copied: ' . $imagepath_original . ${filename});
388 if (@file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
390 $ilLog->write(
'Ordering Question image thumbnail could not be copied: ' . $imagepath_original . $this->
getThumbPrefix() . $filename);
410 throw new \InvalidArgumentException(
'Must be valid ordering type.');
441 self::OQ_CT_PICTURES,
444 throw new \InvalidArgumentException(
"use OQ content-type", 1);
446 if ($ct == self::OQ_CT_PICTURES) {
454 if ($ct == self::OQ_CT_TERMS) {
493 if ($forceCorrectSolution || !$activeId || $passIndex === null) {
499 if (!count($solutionValues)) {
526 if (count($indexedSolutionValues)) {
540 $value2 = explode(
':', $value2);
542 $randomIdentifier = $value2[0];
543 $selectedPosition = $value1;
544 $selectedIndentation = $value2[1];
548 $element->setPosition($selectedPosition);
549 $element->setIndentation($selectedIndentation);
561 $solutionIdentifier = $value1;
562 $selectedPosition = ($value2 - 1);
563 $selectedIndentation = 0;
565 $element = $this->
getOrderingElementList()->getElementBySolutionIdentifier($solutionIdentifier)->getClone();
567 $element->setPosition($selectedPosition);
568 $element->setIndentation($selectedIndentation);
581 $solutionOrderingList->setQuestionId($this->
getId());
583 foreach ($indexedSolutionValues as $value1 => $value2) {
590 $solutionOrderingList->addElement($element);
597 return $solutionOrderingList;
607 $shuffledRandomIdentifierIndex = $this->
getShuffler()->transform(
612 $shuffledElementList->reorderByRandomIdentifiers($shuffledRandomIdentifierIndex);
613 $shuffledElementList->resetElementsIndentations();
615 return $shuffledElementList;
634 foreach ($elements as
$e) {
694 public function calculateReachedPoints($active_id, $pass = null, $authorizedSolution =
true, $returndetails =
false): float
696 if ($returndetails) {
697 throw new ilTestException(
'return details not implemented for ' . __METHOD__);
700 if (is_null($pass)) {
704 $solutionValuePairs = $this->
getSolutionValues($active_id, $pass, $authorizedSolution);
706 if (!count($solutionValuePairs)) {
722 $solutionOrderingElementList = unserialize(
724 [
"allowed_classes" =>
true]
755 if (preg_match(
"/.*\\.(\\w+)$/",
$filename, $matches)) {
756 $extension = $matches[1];
758 return md5(
$filename) .
"." . $extension;
766 foreach ($contents as
$f) {
767 if (strcmp($f[
'type'],
'file') == 0) {
770 if (strcmp($f[
'entry'], $orderElement->getContent()) == 0) {
773 if (strcmp($f[
'entry'], $this->
getThumbPrefix() . $orderElement->getContent()) == 0) {
778 if (@file_exists($this->
getImagePath() . $f[
'entry'])) {
800 if (!strlen($imageFilename)) {
804 $result = @unlink($this->
getImagePath() . $imageFilename);
812 if (!strlen($imageFilename)) {
816 if (!file_exists($this->
getImagePath() . $imageFilename)) {
837 public function storeImageFile(
string $upload_file,
string $upload_name): ?string
839 $name_parts = explode(
".", $upload_name);
840 $suffix = strtolower(array_pop($name_parts));
841 if (!in_array($suffix, self::VALID_UPLOAD_SUFFIXES)) {
847 $target_filepath = $this->
getImagePath() . $target_filename;
852 return $target_filename;
860 $existing_image_path = $this->
getImagePath() . $existing_image_name;
862 $target_filepath = $this->
getImagePath() . $target_filename;
868 return $target_filename;
871 return $existing_image_name;
878 if (!$submittedSolutionList->hasElements()) {
895 if ($this->dic->testQuestionPool()->internal()->request()->raw(
'test_answer_changed') === null) {
901 if (is_null($pass)) {
906 function () use (&$entered_values, $active_id, $pass, $authorized) {
910 $value1 = $orderingElement->getStorageValue1($this->
getOrderingType());
911 $value2 = $orderingElement->getStorageValue2($this->
getOrderingType());
920 if ($entered_values) {
921 $this->
log($active_id,
'log_user_entered_values');
923 $this->
log($active_id,
'log_user_not_entered_values');
940 $ilDB = $DIC[
'ilDB'];
950 "INSERT INTO " . $this->
getAdditionalTableName() .
" (question_fi, ordering_type, thumb_geometry, element_height) 951 VALUES (%s, %s, %s, %s)",
952 [
"integer",
"text",
"integer",
"integer"],
955 $this->ordering_type,
966 $ilDB = $DIC[
'ilDB'];
967 return new \ILIAS\TA\Questions\Ordering\assOrderingQuestionDatabaseRepository(
$ilDB);
982 return "assOrderingQuestion";
993 return "qpl_qst_ordering";
1004 return "qpl_a_ordering";
1013 $text = parent::getRTETextWithMediaObjects();
1016 $text .= $orderingElement->getContent();
1036 parent::setExportDetailsXLSX($worksheet, $startrow, $col, $active_id, $pass);
1040 foreach ($solutions as $solution) {
1041 $sol[$solution[
"value1"]] = $solution[
"value2"];
1044 $sol = array_keys($sol);
1047 foreach ($sol as $idx) {
1048 foreach ($solutions as $solution) {
1049 if ($solution[
"value1"] == $idx) {
1050 $worksheet->
setCell($startrow + $i, $col, $solution[
"value2"]);
1055 $worksheet->
setCell($startrow + $i, $col + 2, $element->getContent());
1059 return $startrow + $i + 1;
1069 $this->element_height = ($a_height < 20) ? null : $a_height;
1079 if ($orderingElement->getContent() !==
'') {
1098 switch (strtoupper($path_info[
'extension'])) {
1119 $result[
'id'] = $this->
getId();
1124 $result[
'shuffle'] =
true;
1126 $result[
'feedback'] = array(
1127 'onenotcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
false)),
1128 'allcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
true))
1137 $answers[$counter] = $orderingElement->getContent();
1140 $answers = $this->
getShuffler()->transform($answers);
1142 foreach ($answers as $order => $answer) {
1143 array_push($arr, array(
1144 "answertext" => (
string) $answer,
1145 "order" => (
int) $order
1148 $result[
'answers'] = $arr;
1151 $result[
'mobs'] = $mobs;
1153 return json_encode($result);
1176 $formField->setInteractionEnabled(
true);
1184 $formField->setEditElementOccuranceEnabled(
true);
1185 $formField->setEditElementOrderEnabled(
true);
1194 $formField->
setInfo($this->
lng->txt(
'ordering_answer_sequence_info'));
1207 self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
1212 return $orderingElementInput;
1224 self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
1227 $orderingElementInput->setImageUploadCommand(self::ORDERING_ELEMENT_FORM_CMD_UPLOAD_IMG);
1228 $orderingElementInput->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
1232 return $orderingElementInput;
1244 self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
1247 $orderingElementInput->setUniquePrefix($this->
getId());
1254 return $orderingElementInput;
1267 $orderingGUI->setValueByArray($userSolutionPost);
1269 if (!$orderingGUI->checkInput()) {
1277 foreach ($orderingGUI->getElementList($this->getId()) as $submittedElement) {
1278 $solutionElement = $storedElementList->getElementByRandomIdentifier(
1279 $submittedElement->getRandomIdentifier()
1282 $solutionElement->setPosition($submittedElement->getPosition());
1285 $solutionElement->setIndentation($submittedElement->getIndentation());
1288 $solutionOrderingElementList->addElement($solutionElement);
1291 return $solutionOrderingElementList;
1304 if ($this->postSolutionOrderingElementList === null) {
1308 $request = $DIC->http()->request();
1312 $this->postSolutionOrderingElementList = $list;
1336 $userElement = $solutionOrderingElementList->
getElementByPosition($correctElement->getPosition());
1338 if (!$correctElement->isSameElement($userElement)) {
1344 return $reachedPoints;
1386 $ilDB = $DIC[
'ilDB'];
1393 "SELECT value1, value2 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s AND step = %s ORDER BY value1 ASC ",
1394 array(
"integer",
"integer",
"integer",
"integer"),
1395 array($active_id, $pass, $this->
getId(), $maxStep)
1399 "SELECT value1, value2 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s ORDER BY value1 ASC ",
1400 array(
"integer",
"integer",
"integer"),
1401 array($active_id, $pass, $this->
getId())
1405 $elements = array();
1407 $newKey = explode(
":", $row[
"value2"]);
1412 if ($answer->getSolutionIdentifier() == $row[
"value1"]) {
1413 $elements[$row[
"value2"]] = $answer->getSolutionIdentifier() + 1;
1417 if ($answer->getRandomIdentifier() == $newKey[0]) {
1418 $elements[$row[
"value1"]] = $answer->getSolutionIdentifier() + 1;
1427 foreach (array_values($elements) as $element) {
1428 $result->addKeyValue($element, $element);
1434 $result->setReachedPercentage((
$points / $max_points) * 100);
1448 if ($index !== null) {
1460 parent::afterSyncWithOriginal($origQuestionId, $dupQuestionId, $origParentObjId, $dupParentObjId);
1461 $this->
duplicateImages($dupQuestionId, $dupParentObjId, $origQuestionId, $origParentObjId);
1474 return parent::buildTestPresentationConfig()
1477 ->setUseUnchangedAnswerLabel($this->
lng->txt(
'tst_unchanged_order_is_correct'));
1493 $solutionSubmit = array();
1495 if (isset($formSubmissionDataStructure[
'orderresult'])) {
1496 $orderresult = $formSubmissionDataStructure[
'orderresult'];
1498 if (strlen($orderresult)) {
1499 $orderarray = explode(
":", $orderresult);
1501 foreach ($orderarray as $index) {
1503 if (preg_match(
"/id_(\\d+)/", $index, $idmatch)) {
1504 $randomid = $idmatch[1];
1506 if ($answer->getRandomIdentifier() == $randomid) {
1507 $solutionSubmit[$answeridx] = $ordervalue;
1516 foreach ($formSubmissionDataStructure[
'content'] as $randomId => $content) {
1517 $indentation = $formSubmissionDataStructure[
'indentation'];
1520 $value2 = implode(
':', array($randomId, $indentation));
1522 $solutionSubmit[$value1] = $value2;
1525 foreach ($formSubmissionDataStructure as
$key => $value) {
1527 if (preg_match(
"/^order_(\d+)/",
$key, $matches)) {
1528 if (!(preg_match(
"/initial_value_\d+/", $value))) {
1529 if (strlen($value)) {
1531 if ($answer->getRandomIdentifier() == $matches[1]) {
1532 $solutionSubmit[$answeridx] = $value;
1541 return $solutionSubmit;
1550 $converter->setPostVar(self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR);
1563 $formDataConverter->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
1565 $formDataConverter->setImageFsPath($this->
getImagePath());
1570 return $formDataConverter;
1580 return $formDataConverter;
1592 $formDataConverter->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
1597 return $formDataConverter;
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...
duplicate(bool $for_test=true, ?string $title="", ?string $author="", ?int $owner=-1, $testObjId=null)
getSolutionValues($active_id, $pass=null, bool $authorized=true)
Loads solutions of a given user from the database an returns it.
setNrOfTries(int $a_nr_of_tries)
duplicateImages($src_question_id, $src_object_id, $dest_question_id, $dest_object_id)
initOrderingElementAuthoringProperties(ilFormPropertyGUI $formField)
fetchSolutionListFromFormSubmissionData($userSolutionPost)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance($identifier)
updateImageFile(string $existing_image_name)
const HAS_SPECIFIC_FEEDBACK
const PercentageResultExpression
getSolutionOrderingElementListForTestOutput(ilAssNestedOrderingElementsInputGUI $inputGUI, $lastPost, $activeId, $pass)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildOrderingImagesFormDataConverter()
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const VALID_UPLOAD_SUFFIXES
calculateReachedPointsForSolution(ilAssOrderingElementList $solutionOrderingElementList)
getSolutionOrderingElementList($indexedSolutionValues)
saveAdditionalQuestionDataToDb()
Saves a record to the question types additional data table.
setIsUnchangedAnswerPossible($isUnchangedAnswerPossible)
Set if the saving of an unchanged answer is supported with an additional checkbox.
repository for assOrderingQuestion (the answer elements within, at least...)
buildOrderingImagesInputGui()
getRTETextWithMediaObjects()
Collects all text in the question which could contain media objects which were created with the Rich ...
fetchSolutionSubmit($formSubmissionDataStructure)
buildOrderingTextsFormDataConverter()
Abstract basic class which is to be extended by the concrete assessment question type classes...
isComplete()
Returns true, if a ordering question is complete for use.
withElements(array $elements)
Class ChatMainBarProvider .
getSolutionListFromPostSubmit()
initOrderingElementFormFieldLabels(ilFormPropertyGUI $formField)
__construct( $title="", $comment="", $author="", $owner=-1, $question="", $ordering_type=self::OQ_TERMS)
assOrderingQuestion constructor
getColumnCoord(int $a_col)
Get column "name" from number.
ensureNonNegativePoints($points)
getQuestionType()
Returns the question type of the question.
getOrderElements()
Returns the answers array.
copyObject($target_questionpool_id, $title="")
Copies an assOrderingQuestion object.
afterSyncWithOriginal($origQuestionId, $dupQuestionId, $origParentObjId, $dupParentObjId)
{}
getImagePathWeb()
Returns the web image path for web accessable images of a question.
setThumbSize(int $a_size)
static buildInstance(int $question_id, array $elements=[])
setOrderingElementList(ilAssOrderingElementList $list)
savePreviewData(ilAssQuestionPreviewSession $previewSession)
getOrderingElementListForSolutionOutput($forceCorrectSolution, $activeId, $passIndex)
getAvailableAnswerOptions($index=null)
If index is null, the function returns an array with all anwser options Else it returns the specific ...
getParticipantsSolution()
getAnswer($index=0)
Returns the ordering element from the given position.
getOperators($expression)
Get all available operations for a specific question.
getUserQuestionResult($active_id, $pass)
Get the user solution for a question by active_id and the test pass.
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
setComment(string $comment="")
float $points
The maximum available points for the question.
isImageReplaced(ilAssOrderingElement $newElement, ilAssOrderingElement $oldElement)
getSolutionValuePairBrandedOrderingElementBySolutionIdentifier($value1, $value2)
createNewOriginalFromThisDuplicate($targetParentId, $targetQuestionTitle="")
Base Exception for all Exceptions relating to Modules/Test.
$postSolutionOrderingElementList
fetchIndexedValuesFromValuePairs(array $valuePairs)
dropImageFile($imageFilename)
buildOrderingElementInputGui()
setParticipantsSolution($participantSolution)
setElementHeight(?int $a_height)
buildOrderingElementFormDataConverter()
saveCurrentSolution(int $active_id, int $pass, $value1, $value2, bool $authorized=true, $tstamp=0)
setBold(string $a_coords)
Set cell(s) to bold.
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...
getExpressionTypes()
Get all available expression types for a specific question.
buildHashedImageFilename(string $plain_image_filename, bool $unique=false)
const ORDERING_ELEMENT_FORM_FIELD_POSTVAR
const OQ_PICTURES
Ordering question constants.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getAnswerTableName()
Returns the name of the answer table in the database.
const NumericResultExpression
saveWorkingData($active_id, $pass=null, $authorized=true)
Saves the learners input of the question to the database.
deleteAnswer($randomIdentifier)
Deletes an answer with a given index.
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
toJSON()
Returns a JSON representation of the question.
saveToDb($original_id="")
Saves a assOrderingQuestion object to a database.
buildNestedOrderingFormDataConverter()
const ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG
static getDir(string $a_dir, bool $a_rec=false, ?string $a_sub_dir="")
get directory
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file
string $question
The question text.
const OrderingResultExpression
static convertImage(string $a_from, string $a_to, string $a_target_format="", string $a_geometry="", string $a_background_color="")
calculateReachedPoints($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
Returns the points, a learner has reached answering the question.
getEncryptedFilename($filename)
log(int $active_id, string $langVar)
calculateReachedPointsFromPreviewSession(ilAssQuestionPreviewSession $previewSession)
static getOperatorsByExpression($expression)
deductHintPointsFromReachedPoints(ilAssQuestionPreviewSession $previewSession, $reachedPoints)
saveQuestionDataToDb(int $original_id=-1)
getSolutionMaxPass(int $active_id)
getSolutionValuePairBrandedOrderingElementByRandomIdentifier($value1, $value2)
setNestingType(bool $nesting)
removeCurrentSolution(int $active_id, int $pass, bool $authorized=true)
storeImageFile(string $upload_file, string $upload_name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setOriginalId(?int $original_id)
getTestOutputSolutions(int $activeId, int $pass)
setTitle(string $title="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildOrderingTextsInputGui()
setOrderingType($ordering_type=self::OQ_TERMS)
setLifecycle(ilAssQuestionLifecycle $lifecycle)
getElementByPosition($position)
getShuffledOrderingElementList()
buildTestPresentationConfig()
Get the test question configuration.
static rename(string $a_source, string $a_target)
hasOrderingTypeUploadSupport()
getMaximumPoints()
Returns the maximum points, a learner can reach answering the question.
copyImages($question_id, $source_questionpool)
isImageFileStored($imageFilename)
ILIAS DI LoggingServices $ilLog
lookupMaxStep(int $active_id, int $pass)
setAuthor(string $author="")
buildNestedOrderingElementInputGui()
withQuestionId(int $question_id)
setAdditionalContentEditingMode(?string $additionalContentEditingMode)
loadFromDb($question_id)
Loads a assOrderingQuestion object from a database.
generateThumbForFile($path, $file)
static getDraftInstance()
setExportDetailsXLSX(ilAssExcelFormatHelper $worksheet, int $startrow, int $col, int $active_id, int $pass)
{}
ensureValidIdentifiers(ilAssOrderingElement $element)
saveAnswerSpecificDataToDb()
Saves the answer specific records into a question types answer table.
getAdditionalTableName()
Returns the name of the additional question data table in the database.
const ORDERING_ELEMENT_FORM_CMD_UPLOAD_IMG
setQuestion(string $question="")
const EmptyAnswerExpression
getAnswerCount()
Returns the number of answers.