4 require_once
'./Modules/TestQuestionPool/classes/class.assQuestion.php';
5 require_once
'./Modules/Test/classes/inc.AssessmentConstants.php';
6 require_once
'./Modules/TestQuestionPool/interfaces/interface.ilObjQuestionScoringAdjustable.php';
7 require_once
'./Modules/TestQuestionPool/interfaces/interface.ilObjAnswerScoringAdjustable.php';
8 require_once
'./Modules/TestQuestionPool/interfaces/interface.iQuestionCondition.php';
9 require_once
'./Modules/TestQuestionPool/classes/class.ilUserQuestionResult.php';
11 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElementList.php';
112 $elements = array_filter(
114 function ($element) {
115 return trim($element->getContent()) !=
'';
118 $has_at_least_two_elements = count($elements) > 1;
124 && $has_at_least_two_elements;
131 protected function getRepository() :
ILIAS\TA\Questions\Ordering\assOrderingQuestionDatabaseRepository
133 if (is_null($this->oq_repository)) {
135 $ilDB = $DIC[
'ilDB'];
136 $this->oq_repository =
new OQRepository(
$ilDB);
170 $ilDB = $DIC[
'ilDB'];
179 $this->
setId($question_id);
188 include_once(
"./Services/RTE/classes/class.ilRTE.php");
190 $this->ordering_type = strlen(
$data[
"ordering_type"]) ?
$data[
"ordering_type"] :
OQ_TERMS;
191 $this->thumb_geometry =
$data[
"thumb_geometry"];
192 $this->element_height =
$data[
"element_height"];
207 parent::loadFromDb($question_id);
217 if ($this->
id <= 0) {
222 $this_id = $this->
getId();
225 $clone = clone $this;
229 if ((
int) $testObjId > 0) {
230 $clone->setObjId($testObjId);
250 ->withQuestionId($clone->getId());
251 $list->distributeNewRandomIdentifiers();
252 $clone->setOrderingElementList($list);
255 $clone->copyPageOfQuestion($this_id);
256 $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
257 $clone->duplicateImages($this_id, $thisObjId, $clone->getId(), $testObjId);
259 $clone->onDuplicate($thisObjId, $this_id, $clone->getObjId(), $clone->getId());
260 return $clone->getId();
270 if ($this->
id <= 0) {
275 $clone = clone $this;
276 $this_id = $this->
getId();
279 $source_questionpool_id = $this->
getObjId();
280 $clone->setObjId($target_questionpool_id);
287 ->withQuestionId($clone->getId());
288 $list->distributeNewRandomIdentifiers();
289 $clone->setOrderingElementList($list);
294 $clone->duplicateImages(
$original_id, $source_questionpool_id, $clone->getId(), $target_questionpool_id);
296 $clone->onCopy($source_questionpool_id,
$original_id, $clone->getObjId(), $clone->getId());
298 return $clone->getId();
303 if ($this->
getId() <= 0) {
304 throw new RuntimeException(
'The question has not been saved. It cannot be duplicated');
307 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
310 $sourceParentId = $this->
getObjId();
313 $clone = clone $this;
316 $clone->setObjId($targetParentId);
318 if ($targetQuestionTitle) {
319 $clone->setTitle($targetQuestionTitle);
325 ->withQuestionId($clone->getId());
326 $list->distributeNewRandomIdentifiers();
327 $clone->setOrderingElementList($list);
331 $clone->copyPageOfQuestion($sourceQuestionId);
333 $clone->copyXHTMLMediaObjectsOfQuestion($sourceQuestionId);
335 $clone->duplicateImages($sourceQuestionId, $sourceParentId, $clone->getId(), $clone->getObjId());
337 $clone->onCopy($sourceParentId, $sourceQuestionId, $clone->getObjId(), $clone->getId());
342 public function duplicateImages($src_question_id, $src_object_id, $dest_question_id, $dest_object_id)
345 $ilLog = $DIC[
'ilLog'];
347 $imagepath_original = $this->
getImagePath($src_question_id, $src_object_id);
348 $imagepath = $this->
getImagePath($dest_question_id, $dest_object_id);
350 if (!file_exists($imagepath)) {
360 if (!file_exists($imagepath_original .
$filename)
361 || !copy($imagepath_original . $filename, $imagepath . $filename)) {
362 $ilLog->write(
"image could not be duplicated!!!!");
363 $ilLog->write($imagepath_original . $filename);
364 $ilLog->write($imagepath . $filename);
366 if (file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)
368 $ilLog->write(
"image thumbnail could not be duplicated!!!!");
379 public function copyImages($question_id, $source_questionpool)
382 $ilLog = $DIC[
'ilLog'];
385 $imagepath_original = str_replace(
"/$this->id/images",
"/$question_id/images", $imagepath);
386 $imagepath_original = str_replace(
"/$this->obj_id/",
"/$source_questionpool/", $imagepath_original);
387 if (!file_exists($imagepath)) {
392 if (!@copy($imagepath_original .
$filename, $imagepath . $filename)) {
393 $ilLog->write(
"Ordering Question image could not be copied: ${imagepath_original}${filename}");
395 if (@file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
397 $ilLog->write(
"Ordering Question image thumbnail could not be copied: $imagepath_original" . $this->
getThumbPrefix() . $filename);
417 throw new \InvalidArgumentException(
'Must be valid ordering type.');
448 self::OQ_CT_PICTURES,
451 throw new \InvalidArgumentException(
"use OQ content-type", 1);
453 if ($ct == self::OQ_CT_PICTURES) {
461 if ($ct == self::OQ_CT_TERMS) {
500 if ($forceCorrectSolution || !$activeId || $passIndex === null) {
504 $solutionValues = $this->
getSolutionValues($activeId, $passIndex, !$getUseIntermediateSolution);
506 if (!count($solutionValues)) {
529 #if( $pass === null && !ilObjTest::_getUsePreviousAnswers($activeId, true) ) 530 #// condition looks strange? yes - keep it null when previous solutions not enabled (!) 532 # $pass = ilObjTest::_getPass($activeId); 542 if (count($indexedSolutionValues)) {
556 $value2 = explode(
':', $value2);
558 $randomIdentifier = $value2[0];
559 $selectedPosition = $value1;
560 $selectedIndentation = $value2[1];
564 $element->setPosition($selectedPosition);
565 $element->setIndentation($selectedIndentation);
577 $solutionIdentifier = $value1;
578 $selectedPosition = ($value2 - 1);
579 $selectedIndentation = 0;
581 $element = $this->
getOrderingElementList()->getElementBySolutionIdentifier($solutionIdentifier)->getClone();
583 $element->setPosition($selectedPosition);
584 $element->setIndentation($selectedIndentation);
597 $solutionOrderingList->setQuestionId($this->
getId());
599 foreach ($indexedSolutionValues as $value1 => $value2) {
606 $solutionOrderingList->addElement($element);
613 return $solutionOrderingList;
623 $shuffledRandomIdentifierIndex = $this->
getShuffler()->shuffle(
628 $shuffledElementList->reorderByRandomIdentifiers($shuffledRandomIdentifierIndex);
629 $shuffledElementList->resetElementsIndentations();
631 return $shuffledElementList;
650 foreach ($elements as
$e) {
712 if ($returndetails) {
713 throw new ilTestException(
'return details not implemented for ' . __METHOD__);
716 if (is_null(
$pass)) {
722 if (!count($solutionValuePairs)) {
738 $solutionOrderingElementList = unserialize(
770 if (preg_match(
"/.*\\.(\\w+)$/",
$filename, $matches)) {
771 $extension = $matches[1];
773 return md5(
$filename) .
"." . $extension;
781 foreach ($contents as
$f) {
782 if (strcmp($f[
'type'],
'file') == 0) {
785 if (strcmp($f[
'entry'], $orderElement->getContent()) == 0) {
788 if (strcmp($f[
'entry'], $this->
getThumbPrefix() . $orderElement->getContent()) == 0) {
793 if (@file_exists($this->
getImagePath() . $f[
'entry'])) {
815 if (!strlen($imageFilename)) {
827 if (!strlen($imageFilename)) {
831 if (!file_exists($this->
getImagePath() . $imageFilename)) {
852 public function storeImageFile(
string $upload_file,
string $upload_name) : ?string
854 $suffix = strtolower(array_pop(explode(
".", $upload_name)));
855 if (!in_array($suffix, self::VALID_UPLOAD_SUFFIXES)) {
861 $target_filepath = $this->
getImagePath() . $target_filename;
867 return $target_filename;
884 if (!$submittedSolutionList->hasElements()) {
903 if (is_null(
$pass)) {
904 include_once
"./Modules/Test/classes/class.ilObjTest.php";
909 function () use (&$entered_values, $active_id,
$pass, $authorized) {
913 $value1 = $orderingElement->getStorageValue1($this->
getOrderingType());
914 $value2 = $orderingElement->getStorageValue2($this->
getOrderingType());
923 if ($entered_values) {
924 $this->
log($active_id,
'log_user_entered_values');
926 $this->
log($active_id,
'log_user_not_entered_values');
943 $ilDB = $DIC[
'ilDB'];
949 array( $this->
getId() )
953 "INSERT INTO " . $this->
getAdditionalTableName() .
" (question_fi, ordering_type, thumb_geometry, element_height) 954 VALUES (%s, %s, %s, %s)",
955 array(
"integer",
"text",
"integer",
"integer" ),
958 $this->ordering_type,
969 $ilDB = $DIC[
'ilDB'];
970 return new \ILIAS\TA\Questions\Ordering\assOrderingQuestionDatabaseRepository(
$ilDB);
985 return "assOrderingQuestion";
996 return "qpl_qst_ordering";
1007 return "qpl_a_ordering";
1016 $text = parent::getRTETextWithMediaObjects();
1019 $text .= $orderingElement->getContent();
1055 parent::setExportDetailsXLS($worksheet, $startrow, $active_id,
$pass);
1059 foreach ($solutions as $solution) {
1060 $sol[$solution[
"value1"]] = $solution[
"value2"];
1063 $sol = array_keys($sol);
1066 foreach ($sol as $idx) {
1067 foreach ($solutions as $solution) {
1068 if ($solution[
"value1"] == $idx) {
1069 $worksheet->setCell($startrow +
$i, 0, $solution[
"value2"]);
1070 $worksheet->setBold($worksheet->getColumnCoord(0) . ($startrow +
$i));
1074 $worksheet->setCell($startrow +
$i, 2, $element->getContent());
1078 return $startrow +
$i + 1;
1103 $this->thumb_geometry = ((int) $a_geometry < 1) ? 100 : $a_geometry;
1123 $this->element_height = ($a_height < 20) ?
"" : $a_height;
1150 switch (strtoupper($path_info[
'extension'])) {
1170 include_once(
"./Services/RTE/classes/class.ilRTE.php");
1177 $result[
'shuffle'] = (bool)
true;
1180 'onenotcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
false)),
1181 'allcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(),
true))
1190 $answers[$counter] = $orderingElement->getContent();
1193 $answers = $this->
getShuffler()->shuffle($answers);
1195 foreach ($answers as $order => $answer) {
1196 array_push($arr, array(
1197 "answertext" => (
string) $answer,
1198 "order" => (
int) $order
1229 $formField->setInteractionEnabled(
true);
1237 $formField->setEditElementOccuranceEnabled(
true);
1238 $formField->setEditElementOrderEnabled(
true);
1247 $formField->
setInfo($this->lng->txt(
'ordering_answer_sequence_info'));
1248 $formField->
setTitle($this->lng->txt(
'answers'));
1258 require_once
'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingTextsInputGUI.php';
1262 self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
1267 return $orderingElementInput;
1277 require_once
'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingImagesInputGUI.php';
1281 self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
1284 $orderingElementInput->setImageUploadCommand(self::ORDERING_ELEMENT_FORM_CMD_UPLOAD_IMG);
1285 $orderingElementInput->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
1289 return $orderingElementInput;
1299 require_once
'Modules/TestQuestionPool/classes/forms/class.ilAssNestedOrderingElementsInputGUI.php';
1303 self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
1306 $orderingElementInput->setUniquePrefix($this->
getId());
1313 return $orderingElementInput;
1326 $orderingGUI->setValueByArray($userSolutionPost);
1328 if (!$orderingGUI->checkInput()) {
1329 require_once
'Modules/Test/exceptions/class.ilTestException.php';
1333 require_once
'Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElementList.php';
1338 foreach ($orderingGUI->getElementList($this->getId()) as $submittedElement) {
1339 $solutionElement = $storedElementList->getElementByRandomIdentifier(
1340 $submittedElement->getRandomIdentifier()
1343 $solutionElement->setPosition($submittedElement->getPosition());
1346 $solutionElement->setIndentation($submittedElement->getIndentation());
1349 $solutionOrderingElementList->addElement($solutionElement);
1352 return $solutionOrderingElementList;
1365 if ($this->postSolutionOrderingElementList === null) {
1367 $this->postSolutionOrderingElementList = $list;
1391 $userElement = $solutionOrderingElementList->
getElementByPosition($correctElement->getPosition());
1393 if (!$correctElement->isSameElement($userElement)) {
1399 return $reachedPoints;
1412 require_once
"./Modules/TestQuestionPool/classes/class.ilOperatorsExpressionMapping.php";
1442 $ilDB = $DIC[
'ilDB'];
1445 $maxStep = $this->lookupMaxStep($active_id,
$pass);
1447 if ($maxStep !== null) {
1449 "SELECT value1, value2 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s AND step = %s ORDER BY value1 ASC ",
1450 array(
"integer",
"integer",
"integer",
"integer"),
1451 array($active_id,
$pass, $this->
getId(), $maxStep)
1455 "SELECT value1, value2 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s ORDER BY value1 ASC ",
1456 array(
"integer",
"integer",
"integer"),
1461 $elements = array();
1463 $newKey = explode(
":", $row[
"value2"]);
1468 if ($answer->getSolutionIdentifier() == $row[
"value1"]) {
1469 $elements[$row[
"value2"]] = $answer->getSolutionIdentifier() + 1;
1473 if ($answer->getRandomIdentifier() == $newKey[0]) {
1474 $elements[$row[
"value1"]] = $answer->getSolutionIdentifier() + 1;
1483 foreach (array_values($elements) as $element) {
1484 $result->addKeyValue($element, $element);
1517 parent::afterSyncWithOriginal($origQuestionId, $dupQuestionId, $origParentObjId, $dupParentObjId);
1518 $this->
duplicateImages($dupQuestionId, $dupParentObjId, $origQuestionId, $origParentObjId);
1531 return parent::buildTestPresentationConfig()
1533 ->setIsUnchangedAnswerPossible(
true)
1534 ->setUseUnchangedAnswerLabel($this->lng->txt(
'tst_unchanged_order_is_correct'));
1550 $solutionSubmit = array();
1552 if (isset($formSubmissionDataStructure[
'orderresult'])) {
1553 $orderresult = $formSubmissionDataStructure[
'orderresult'];
1555 if (strlen($orderresult)) {
1556 $orderarray = explode(
":", $orderresult);
1558 foreach ($orderarray as
$index) {
1560 if (preg_match(
"/id_(\\d+)/", $index, $idmatch)) {
1561 $randomid = $idmatch[1];
1563 if ($answer->getRandomIdentifier() == $randomid) {
1564 $solutionSubmit[$answeridx] = $ordervalue;
1573 foreach ($formSubmissionDataStructure[
'content'] as $randomId => $content) {
1574 $indentation = $formSubmissionDataStructure[
'indentation'];
1577 $value2 = implode(
':', array($randomId, $indentation));
1579 $solutionSubmit[$value1] = $value2;
1582 foreach ($formSubmissionDataStructure as $key => $value) {
1584 if (preg_match(
"/^order_(\d+)/", $key, $matches)) {
1585 if (!(preg_match(
"/initial_value_\d+/", $value))) {
1586 if (strlen($value)) {
1588 if ($answer->getRandomIdentifier() == $matches[1]) {
1589 $solutionSubmit[$answeridx] = $value;
1598 return $solutionSubmit;
1606 require_once
'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingFormValuesObjectsConverter.php';
1608 $converter->setPostVar(self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR);
1621 $formDataConverter->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
1623 $formDataConverter->setImageFsPath($this->
getImagePath());
1628 return $formDataConverter;
1638 return $formDataConverter;
1650 $formDataConverter->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
1655 return $formDataConverter;
duplicateImages($src_question_id, $src_object_id, $dest_question_id, $dest_object_id)
setElementHeight($a_height)
static makeDirParents($a_dir)
Create a new directory and all parent directories.
initOrderingElementAuthoringProperties(ilFormPropertyGUI $formField)
fetchSolutionListFromFormSubmissionData($userSolutionPost)
getId()
Gets the id of the assQuestion object.
static getInstance($identifier)
static _getOriginalId($question_id)
Returns the original id of a question.
formatSAQuestion($a_q)
Format self assessment question.
const PercentageResultExpression
getSolutionOrderingElementListForTestOutput(ilAssNestedOrderingElementsInputGUI $inputGUI, $lastPost, $activeId, $pass)
Class iQuestionCondition.
buildOrderingImagesFormDataConverter()
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
buildHashedImageFilename($plain_image_filename, $unique=false)
const VALID_UPLOAD_SUFFIXES
calculateReachedPointsForSolution(ilAssOrderingElementList $solutionOrderingElementList)
getSolutionOrderingElementList($indexedSolutionValues)
saveAdditionalQuestionDataToDb()
Saves a record to the question types additional data table.
getPoints()
Returns the maximum available points for the question.
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
ensureNonNegativePoints($points)
getQuestionType()
Returns the question type of the question.
getOrderElements()
Returns the answers array.
getSolutionValues($active_id, $pass=null, $authorized=true)
Loads solutions of a given user from the database an returns it.
setId($id=-1)
Sets the id of the assQuestion object.
copyObject($target_questionpool_id, $title="")
Copies an assOrderingQuestion object.
static getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
afterSyncWithOriginal($origQuestionId, $dupQuestionId, $origParentObjId, $dupParentObjId)
{}
getImagePathWeb()
Returns the web image path for web accessable images of a question.
getSolutionMaxPass($active_id)
Returns the maximum pass a users question solution.
static buildInstance(int $question_id, array $elements=[])
setOrderingElementList(ilAssOrderingElementList $list)
setEstimatedWorkingTime($hour=0, $min=0, $sec=0)
Sets the estimated working time of a question from given hour, minute and second. ...
savePreviewData(ilAssQuestionPreviewSession $previewSession)
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.
setNrOfTries($a_nr_of_tries)
setAdditionalContentEditingMode($additinalContentEditingMode)
setter for additional content editing mode for this question
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...
getObjId()
Get the object id of the container object.
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()
setExportDetailsXLS($worksheet, $startrow, $active_id, $pass)
{}
setParticipantsSolution($participantSolution)
duplicate($for_test=true, $title="", $author="", $owner="", $testObjId=null)
Duplicates an assOrderingQuestion.
validateSolutionSubmit()
Checks the data to be saved for consistency.
buildOrderingElementFormDataConverter()
setAuthor($author="")
Sets the authors name of the assQuestion object.
getAuthor()
Gets the authors name of the assQuestion object.
getImagePath($question_id=null, $object_id=null)
Returns the image path for web accessable images of a question.
getExpressionTypes()
Get all available expression types for a specific question.
const ORDERING_ELEMENT_FORM_FIELD_POSTVAR
const OQ_PICTURES
Ordering question constants.
Class ilUserQuestionResult.
getAnswerTableName()
Returns the name of the answer table in the database.
log($active_id, $langVar)
saveCurrentSolution($active_id, $pass, $value1, $value2, $authorized=true, $tstamp=null)
const NumericResultExpression
saveWorkingData($active_id, $pass=null, $authorized=true)
Saves the learners input of the question to the database.
static moveUploadedFile($a_file, $a_name, $a_target, $a_raise_errors=true, $a_mode="move_uploaded")
move uploaded file
deleteAnswer($randomIdentifier)
Deletes an answer with a given index.
Interface ilObjAnswerScoringAdjustable.
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
getQuestion()
Gets the question string of the question object.
static convertImage( $a_from, $a_to, $a_target_format="", $a_geometry="", $a_background_color="")
convert image
getOrderingElementListForSolutionOutput($forceCorrectSolution, $activeId, $passIndex, $getUseIntermediateSolution=false)
const OrderingResultExpression
calculateReachedPoints($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
Returns the points, a learner has reached answering the question.
getEncryptedFilename($filename)
calculateReachedPointsFromPreviewSession(ilAssQuestionPreviewSession $previewSession)
static getOperatorsByExpression($expression)
getTestOutputSolutions($activeId, $pass)
deductHintPointsFromReachedPoints(ilAssQuestionPreviewSession $previewSession, $reachedPoints)
setPoints($a_points)
Sets the maximum available points for the question.
saveQuestionDataToDb($original_id="")
getSolutionValuePairBrandedOrderingElementByRandomIdentifier($value1, $value2)
setNestingType(bool $nesting)
storeImageFile(string $upload_file, string $upload_name)
supportsJavascriptOutput()
Returns true if the question type supports JavaScript output.
setQuestion($question="")
Sets the question string of the question object.
Interface ilObjQuestionScoringAdjustable.
removeCurrentSolution($active_id, $pass, $authorized=true)
__construct(Container $dic, ilPlugin $plugin)
setOriginalId($original_id)
setThumbGeometry($a_geometry)
Class for ordering questions.
buildOrderingTextsInputGui()
setOrderingType($ordering_type=self::OQ_TERMS)
setLifecycle(ilAssQuestionLifecycle $lifecycle)
getElementByPosition($position)
getShuffledOrderingElementList()
getTitle()
Gets the title string of the assQuestion object.
buildTestPresentationConfig()
Get the test question configuration.
hasOrderingTypeUploadSupport()
getMaximumPoints()
Returns the maximum points, a learner can reach answering the question.
copyImages($question_id, $source_questionpool)
isImageFileStored($imageFilename)
setTitle($title="")
Sets the title string of the assQuestion object.
setObjId($obj_id=0)
Set the object id of the container object.
buildNestedOrderingElementInputGui()
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
withQuestionId(int $question_id)
setComment($comment="")
Sets the comment string of the assQuestion object.
loadFromDb($question_id)
Loads a assOrderingQuestion object from a database.
generateThumbForFile($path, $file)
static getDraftInstance()
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.
setOwner($owner="")
Sets the creator/owner ID of the assQuestion object.
const ORDERING_ELEMENT_FORM_CMD_UPLOAD_IMG
const EmptyAnswerExpression
getAnswerCount()
Returns the number of answers.