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';
 
   11require_once 
'Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElementList.php';
 
  157            $this->
setId($question_id);
 
  166            include_once(
"./Services/RTE/classes/class.ilRTE.php");
 
  168            $this->ordering_type = strlen(
$data[
"ordering_type"]) ? 
$data[
"ordering_type"] : 
OQ_TERMS;
 
  169            $this->thumb_geometry = 
$data[
"thumb_geometry"];
 
  170            $this->element_height = 
$data[
"element_height"];
 
  179        $this->orderingElementList->setQuestionId($this->
getId());
 
  180        $this->orderingElementList->loadFromDb();
 
  182        parent::loadFromDb($question_id);
 
  192        if ($this->
id <= 0) {
 
  197        $this_id = $this->
getId();
 
  201        include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
 
  205        if ((
int) $testObjId > 0) {
 
  206            $clone->setObjId($testObjId);
 
  224        $clone->duplicateOrderlingElementList();
 
  227        $clone->copyPageOfQuestion($this_id);
 
  229        $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
 
  231        $clone->duplicateImages($this_id, $thisObjId, $clone->getId(), $testObjId);
 
  233        $clone->onDuplicate($thisObjId, $this_id, $clone->getObjId(), $clone->getId());
 
  252        if ($this->
id <= 0) {
 
  258        include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
 
  261        $source_questionpool_id = $this->
getObjId();
 
  262        $clone->setObjId($target_questionpool_id);
 
  274        $clone->duplicateImages(
$original_id, $source_questionpool_id, $clone->getId(), $target_questionpool_id);
 
  276        $clone->onCopy($source_questionpool_id, 
$original_id, $clone->getObjId(), $clone->getId());
 
  283        if ($this->
id <= 0) {
 
  288        include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
 
  291        $sourceParentId = $this->
getObjId();
 
  297        $clone->setObjId($targetParentId);
 
  299        if ($targetQuestionTitle) {
 
  300            $clone->setTitle($targetQuestionTitle);
 
  305        $clone->copyPageOfQuestion($sourceQuestionId);
 
  307        $clone->copyXHTMLMediaObjectsOfQuestion($sourceQuestionId);
 
  309        $clone->duplicateImages($sourceQuestionId, $sourceParentId, $clone->getId(), $clone->getObjId());
 
  311        $clone->onCopy($sourceParentId, $sourceQuestionId, $clone->getObjId(), $clone->getId());
 
  316    public function duplicateImages($src_question_id, $src_object_id, $dest_question_id, $dest_object_id)
 
  321            $imagepath_original = $this->
getImagePath($src_question_id, $src_object_id);
 
  322            $imagepath = $this->
getImagePath($dest_question_id, $dest_object_id);
 
  324            if (!file_exists($imagepath)) {
 
  330                    $ilLog->write(
"image could not be duplicated!!!!");
 
  332                if (@file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
 
  334                        $ilLog->write(
"image thumbnail could not be duplicated!!!!");
 
  346    public function copyImages($question_id, $source_questionpool)
 
  352            $imagepath_original = str_replace(
"/$this->id/images", 
"/$question_id/images", $imagepath);
 
  353            $imagepath_original = str_replace(
"/$this->obj_id/", 
"/$source_questionpool/", $imagepath_original);
 
  354            if (!file_exists($imagepath)) {
 
  360                    $ilLog->write(
"Ordering Question image could not be copied: ${imagepath_original}${filename}");
 
  362                if (@file_exists($imagepath_original . $this->
getThumbPrefix() . $filename)) {
 
  364                        $ilLog->write(
"Ordering Question image thumbnail could not be copied: $imagepath_original" . $this->
getThumbPrefix() . $filename);
 
  418        if ($forceCorrectSolution || !$activeId || $passIndex === 
null) {
 
  422        $solutionValues = $this->
getSolutionValues($activeId, $passIndex, !$getUseIntermediateSolution);
 
  424        if (!count($solutionValues)) {
 
  447        #if( $pass === null && !ilObjTest::_getUsePreviousAnswers($activeId, true) ) 
  450        #       $pass = ilObjTest::_getPass($activeId); 
  460        if (count($indexedSolutionValues)) {
 
  474        $value2 = explode(
':', $value2);
 
  476        $randomIdentifier = $value2[0];
 
  477        $selectedPosition = $value1;
 
  478        $selectedIndentation = $value2[1];
 
  482        $element->setPosition($selectedPosition);
 
  483        $element->setIndentation($selectedIndentation);
 
  495        $solutionIdentifier = $value1;
 
  496        $selectedPosition = ($value2 - 1);
 
  497        $selectedIndentation = 0;
 
  499        $element = $this->
getOrderingElementList()->getElementBySolutionIdentifier($solutionIdentifier)->getClone();
 
  501        $element->setPosition($selectedPosition);
 
  502        $element->setIndentation($selectedIndentation);
 
  515        $solutionOrderingList->setQuestionId($this->
getId());
 
  517        foreach ($indexedSolutionValues as $value1 => $value2) {
 
  524            $solutionOrderingList->addElement($element);
 
  531        return $solutionOrderingList;
 
  541        $shuffledRandomIdentifierIndex = $this->
getShuffler()->shuffle(
 
  546        $shuffledElementList->reorderByRandomIdentifiers($shuffledRandomIdentifierIndex);
 
  547        $shuffledElementList->resetElementsIndentations();
 
  549        return $shuffledElementList;
 
  661        if ($returndetails) {
 
  662            throw new ilTestException(
'return details not implemented for ' . __METHOD__);
 
  665        if (is_null(
$pass)) {
 
  671        if (!count($solutionValuePairs)) {
 
  687        $solutionOrderingElementList = unserialize(
 
  719        if (preg_match(
"/.*\\.(\\w+)$/", 
$filename, $matches)) {
 
  720            $extension = $matches[1];
 
  722        return md5(
$filename) . 
"." . $extension;
 
  730                foreach ($contents as 
$f) {
 
  731                    if (strcmp(
$f[
'type'], 
'file') == 0) {
 
  734                            if (strcmp(
$f[
'entry'], $orderElement->getContent()) == 0) {
 
  737                            if (strcmp(
$f[
'entry'], $this->
getThumbPrefix() . $orderElement->getContent()) == 0) {
 
  742                            if (@file_exists($this->
getImagePath() . $f[
'entry'])) {
 
  764        if (!strlen($imageFilename)) {
 
  776        if (!strlen($imageFilename)) {
 
  780        if (!file_exists($this->
getImagePath() . $imageFilename)) {
 
  810        if (!strlen($uploadFile)) {
 
  818        if (!ilUtil::moveUploadedFile($uploadFile, $targetFile, $this->
getImagePath() . $targetFile)) {
 
  827        foreach ($elementList as $element) {
 
  853        if (!$submittedSolutionList->hasElements()) {
 
  872        if (is_null(
$pass)) {
 
  873            include_once 
"./Modules/Test/classes/class.ilObjTest.php";
 
  878            function () use (&$entered_values, $active_id, 
$pass, $authorized) {
 
  882                    $value1 = $orderingElement->getStorageValue1($this->
getOrderingType());
 
  883                    $value2 = $orderingElement->getStorageValue2($this->
getOrderingType());
 
  892        if ($entered_values) {
 
  893            $this->
log($active_id, 
'log_user_entered_values');
 
  895            $this->
log($active_id, 
'log_user_not_entered_values');
 
  918            array( $this->
getId() )
 
  922            "INSERT INTO " . $this->
getAdditionalTableName() . 
" (question_fi, ordering_type, thumb_geometry, element_height)  
  923                                                        VALUES (%s, %s, %s, %s)",
 
  924            array( 
"integer", 
"text", 
"integer", 
"integer" ),
 
  927                                $this->ordering_type,
 
  953        return "assOrderingQuestion";
 
  964        return "qpl_qst_ordering";
 
  975        return "qpl_a_ordering";
 
  984        $text = parent::getRTETextWithMediaObjects();
 
  987            $text .= $orderingElement->getContent();
 
 1023        parent::setExportDetailsXLS($worksheet, $startrow, $active_id, 
$pass);
 
 1027        foreach ($solutions as $solution) {
 
 1028            $sol[$solution[
"value1"]] = $solution[
"value2"];
 
 1031        $sol = array_keys($sol);
 
 1034        foreach ($sol as $idx) {
 
 1035            foreach ($solutions as $solution) {
 
 1036                if ($solution[
"value1"] == $idx) {
 
 1037                    $worksheet->setCell($startrow + 
$i, 0, $solution[
"value2"]);
 
 1041            $worksheet->setCell($startrow + 
$i, 1, $element->getContent());
 
 1045        return $startrow + 
$i + 1;
 
 1070        $this->thumb_geometry = ($a_geometry < 1) ? 100 : $a_geometry;
 
 1090        $this->element_height = ($a_height < 20) ? 
"" : $a_height;
 
 1117            switch (strtoupper($path_info[
'extension'])) {
 
 1137        include_once(
"./Services/RTE/classes/class.ilRTE.php");
 
 1144        $result[
'shuffle'] = (bool) 
true;
 
 1147            'onenotcorrect' => $this->
formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), 
false)),
 
 1148            'allcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), 
true))
 
 1157            $answers[$counter] = $orderingElement->getContent();
 
 1160        $answers = $this->
getShuffler()->shuffle($answers);
 
 1162        foreach ($answers as $order => $answer) {
 
 1163            array_push($arr, array(
 
 1164                "answertext" => (
string) $answer,
 
 1165                "order" => (
int) $order
 
 1209                $formField->setInteractionEnabled(
true);
 
 1217                $formField->setEditElementOccuranceEnabled(
true);
 
 1218                $formField->setEditElementOrderEnabled(
true);
 
 1229        $formField->
setInfo($this->lng->txt(
'ordering_answer_sequence_info'));
 
 1230        $formField->
setTitle($this->lng->txt(
'answers'));
 
 1240        require_once 
'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingTextsInputGUI.php';
 
 1244            self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
 
 1249        return $orderingElementInput;
 
 1259        require_once 
'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingImagesInputGUI.php';
 
 1263            self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
 
 1266        $orderingElementInput->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
 
 1267        $orderingElementInput->setImageUploadCommand(self::ORDERING_ELEMENT_FORM_CMD_UPLOAD_IMG);
 
 1271        return $orderingElementInput;
 
 1281        require_once 
'Modules/TestQuestionPool/classes/forms/class.ilAssNestedOrderingElementsInputGUI.php';
 
 1285            self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR
 
 1288        $orderingElementInput->setUniquePrefix($this->
getId());
 
 1295        return $orderingElementInput;
 
 1304        return $form->getItemByPostVar(self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR)->getElementList($this->
getId());
 
 1316        $orderingGUI->setValueByArray($userSolutionPost);
 
 1318        if (!$orderingGUI->checkInput()) {
 
 1319            require_once 
'Modules/Test/exceptions/class.ilTestException.php';
 
 1323        require_once 
'Modules/TestQuestionPool/classes/questions/class.ilAssOrderingElementList.php';
 
 1328        foreach ($orderingGUI->getElementList($this->getId()) as $submittedElement) {
 
 1329            $solutionElement = $storedElementList->getElementByRandomIdentifier(
 
 1330                $submittedElement->getRandomIdentifier()
 
 1333            $solutionElement->setPosition($submittedElement->getPosition());
 
 1336                $solutionElement->setIndentation($submittedElement->getIndentation());
 
 1339            $solutionOrderingElementList->addElement($solutionElement);
 
 1342        return $solutionOrderingElementList;
 
 1355        if ($this->postSolutionOrderingElementList === 
null) {
 
 1357            $this->postSolutionOrderingElementList = 
$list;
 
 1381            $userElement = $solutionOrderingElementList->
getElementByPosition($correctElement->getPosition());
 
 1383            if (!$correctElement->isSameElement($userElement)) {
 
 1389        return $reachedPoints;
 
 1408            'SELECT depth FROM qpl_a_ordering WHERE question_fi = %s ORDER BY position ASC',
 
 1410            array($this->
getId())
 
 1413            $this->old_ordering_depth[] = 
$row[
'depth'];
 
 1428            'SELECT solution_key FROM qpl_a_ordering WHERE random_id = %s',
 
 1434        return $row[
'solution_key'];
 
 1444            array(
'solution_key' => array(
'integer', $a_index),
 
 1445              'depth' => array(
'integer', $a_depth)),
 
 1446            array(
'answertext' => array(
'text', $a_answer_text))
 
 1463        require_once 
"./Modules/TestQuestionPool/classes/class.ilOperatorsExpressionMapping.php";
 
 1496        $maxStep = $this->lookupMaxStep($active_id, 
$pass);
 
 1498        if ($maxStep !== 
null) {
 
 1500                "SELECT value1, value2 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s AND step = %s ORDER BY value1 ASC ",
 
 1501                array(
"integer", 
"integer", 
"integer",
"integer"),
 
 1502                array($active_id, 
$pass, $this->
getId(), $maxStep)
 
 1506                "SELECT value1, value2 FROM tst_solutions WHERE active_fi = %s AND pass = %s AND question_fi = %s ORDER BY value1 ASC ",
 
 1507                array(
"integer", 
"integer", 
"integer"),
 
 1512        $elements = array();
 
 1514            $newKey = explode(
":", 
$row[
"value2"]);
 
 1519                    if ($answer->getSolutionIdentifier() == 
$row[
"value1"]) {
 
 1520                        $elements[
$row[
"value2"]] = $answer->getSolutionIdentifier() + 1;
 
 1524                    if ($answer->getRandomIdentifier() == $newKey[0]) {
 
 1525                        $elements[
$row[
"value1"]] = $answer->getSolutionIdentifier() + 1;
 
 1534        foreach (array_values($elements) as $element) {
 
 1535            $result->addKeyValue($element, $element);
 
 1568        parent::afterSyncWithOriginal($origQuestionId, $dupQuestionId, $origParentObjId, $dupParentObjId);
 
 1569        $this->
duplicateImages($dupQuestionId, $dupParentObjId, $origQuestionId, $origParentObjId);
 
 1582        return parent::buildTestPresentationConfig()
 
 1584            ->setIsUnchangedAnswerPossible(
true)
 
 1585            ->setUseUnchangedAnswerLabel($this->lng->txt(
'tst_unchanged_order_is_correct'));
 
 1601        $solutionSubmit = array();
 
 1603        if (isset($formSubmissionDataStructure[
'orderresult'])) {
 
 1604            $orderresult = $formSubmissionDataStructure[
'orderresult'];
 
 1606            if (strlen($orderresult)) {
 
 1607                $orderarray = explode(
":", $orderresult);
 
 1609                foreach ($orderarray as 
$index) {
 
 1611                    if (preg_match(
"/id_(\\d+)/", 
$index, $idmatch)) {
 
 1612                        $randomid = $idmatch[1];
 
 1614                            if ($answer->getRandomIdentifier() == $randomid) {
 
 1615                                $solutionSubmit[$answeridx] = $ordervalue;
 
 1624            foreach ($formSubmissionDataStructure[
'content'] as $randomId => $content) {
 
 1625                $indentation = $formSubmissionDataStructure[
'indentation'];
 
 1628                $value2 = implode(
':', array($randomId, $indentation));
 
 1630                $solutionSubmit[$value1] = $value2;
 
 1633            foreach ($formSubmissionDataStructure as 
$key => $value) {
 
 1635                if (preg_match(
"/^order_(\d+)/", 
$key, $matches)) {
 
 1636                    if (!(preg_match(
"/initial_value_\d+/", $value))) {
 
 1637                        if (strlen($value)) {
 
 1639                                if ($answer->getRandomIdentifier() == $matches[1]) {
 
 1640                                    $solutionSubmit[$answeridx] = $value;
 
 1649        return $solutionSubmit;
 
 1657        require_once 
'Modules/TestQuestionPool/classes/forms/class.ilAssOrderingFormValuesObjectsConverter.php';
 
 1659        $converter->setPostVar(self::ORDERING_ELEMENT_FORM_FIELD_POSTVAR);
 
 1672        $formDataConverter->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
 
 1674        $formDataConverter->setImageFsPath($this->
getImagePath());
 
 1679        return $formDataConverter;
 
 1689        return $formDataConverter;
 
 1701            $formDataConverter->setImageRemovalCommand(self::ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG);
 
 1709        return $formDataConverter;
 
An exception for terminatinating execution or to throw for unit testing.
Class for ordering questions.
getOrderElements()
Returns the answers array.
const ORDERING_ELEMENT_FORM_CMD_UPLOAD_IMG
buildOrderingImagesFormDataConverter()
const ORDERING_ELEMENT_FORM_CMD_REMOVE_IMG
setOrderingElementList($orderingElementList)
getShuffledOrderingElementList()
getOperators($expression)
Get all available operations for a specific question.
getSolutionValuePairBrandedOrderingElementBySolutionIdentifier($value1, $value2)
getAnswer($index=0)
Returns the ordering element from the given position.
getExpressionTypes()
Get all available expression types for a specific question.
getQuestionType()
Returns the question type of the question.
setThumbGeometry($a_geometry)
copyImages($question_id, $source_questionpool)
initOrderingElementAuthoringProperties(ilFormPropertyGUI $formField)
getAnswerTableName()
Returns the name of the answer table in the database.
getSolutionOrderingElementList($indexedSolutionValues)
hasOrderingTypeUploadSupport()
saveWorkingData($active_id, $pass=null, $authorized=true)
Saves the learners input of the question to the database.
buildNestedOrderingElementInputGui()
toJSON()
Returns a JSON representation of the question.
fetchSolutionListFromFormSubmissionData($userSolutionPost)
dropImageFile($imageFilename)
setOrderingType($ordering_type=OQ_TERMS)
Sets the ordering question type.
createImageThumbnail(ilAssOrderingElement $element)
calculateReachedPoints($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
Returns the points, a learner has reached answering the question.
getMaximumPoints()
Returns the maximum points, a learner can reach answering the question.
isImageReplaced(ilAssOrderingElement $newElement, ilAssOrderingElement $oldElement)
isComplete()
Returns true, if a ordering question is complete for use.
saveToDb($original_id="")
Saves a assOrderingQuestion object to a database.
buildTestPresentationConfig()
Get the test question configuration.
buildNestedOrderingFormDataConverter()
duplicateOrderlingElementList()
fetchSolutionSubmit($formSubmissionDataStructure)
const ORDERING_ELEMENT_FORM_FIELD_POSTVAR
setElementHeight($a_height)
buildOrderingTextsInputGui()
getOrderingElementListForSolutionOutput($forceCorrectSolution, $activeId, $passIndex, $getUseIntermediateSolution=false)
setExportDetailsXLS($worksheet, $startrow, $active_id, $pass)
{Creates an Excel worksheet for the detailed cumulated results of this question.object}
savePreviewData(ilAssQuestionPreviewSession $previewSession)
__construct( $title="", $comment="", $author="", $owner=-1, $question="", $ordering_type=OQ_TERMS)
assOrderingQuestion constructor
initOrderingElementFormFieldLabels(ilFormPropertyGUI $formField)
$postSolutionOrderingElementList
handleThumbnailCreation(ilAssOrderingElementList $elementList)
duplicate($for_test=true, $title="", $author="", $owner="", $testObjId=null)
Duplicates an assOrderingQuestion.
getAvailableAnswerOptions($index=null)
If index is null, the function returns an array with all anwser options Else it returns the specific ...
getAdditionalTableName()
Returns the name of the additional question data table in the database.
getSolutionValuePairBrandedOrderingElementByRandomIdentifier($value1, $value2)
isImageFileStored($imageFilename)
getSolutionListFromPostSubmit()
buildOrderingTextsFormDataConverter()
buildOrderingElementFormDataConverter()
createNewOriginalFromThisDuplicate($targetParentId, $targetQuestionTitle="")
updateLeveledOrdering($a_index, $a_answer_text, $a_depth)
getOrderingType()
Returns the ordering question type.
loadFromDb($question_id)
Loads a assOrderingQuestion object from a database.
getEncryptedFilename($filename)
lookupSolutionOrderByRandomid($a_random_id)
duplicateImages($src_question_id, $src_object_id, $dest_question_id, $dest_object_id)
getSolutionOrderingElementListForTestOutput(ilAssNestedOrderingElementsInputGUI $inputGUI, $lastPost, $activeId, $pass)
afterSyncWithOriginal($origQuestionId, $dupQuestionId, $origParentObjId, $dupParentObjId)
{}
deleteAnswer($randomIdentifier)
Deletes an answer with a given index.
validateSolutionSubmit()
Checks the data to be saved for consistency.
calculateReachedPointsForSolution(ilAssOrderingElementList $solutionOrderingElementList)
getRTETextWithMediaObjects()
Collects all text in the question which could contain media objects which were created with the Rich ...
fetchSolutionListFromSubmittedForm(ilPropertyFormGUI $form)
buildOrderingImagesInputGui()
supportsJavascriptOutput()
Returns true if the question type supports JavaScript output.
calculateReachedPointsFromPreviewSession(ilAssQuestionPreviewSession $previewSession)
copyObject($target_questionpool_id, $title="")
Copies an assOrderingQuestion object.
buildOrderingElementInputGui()
generateThumbForFile($path, $file)
storeImageFile($uploadFile, $targetFile)
Sets the image file and uploads the image to the object's image directory.
saveAnswerSpecificDataToDb()
Saves the answer specific records into a question types answer table.
moveAnswerDown($position)
getAnswerCount()
Returns the number of answers.
Abstract basic class which is to be extended by the concrete assessment question type classes.
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.
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.
getSolutionMaxPass($active_id)
Returns the maximum pass a users question solution.
saveQuestionDataToDb($original_id="")
log($active_id, $langVar)
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.
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.
fetchIndexedValuesFromValuePairs(array $valuePairs)
deductHintPointsFromReachedPoints(ilAssQuestionPreviewSession $previewSession, $reachedPoints)
getImagePath($question_id=null, $object_id=null)
Returns the image path for web accessable images of a question.
removeCurrentSolution($active_id, $pass, $authorized=true)
setAuthor($author="")
Sets the authors name of the assQuestion object.
getPoints()
Returns the maximum available points for the question.
getTestOutputSolutions($activeId, $pass)
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.
getAuthor()
Gets the authors name 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.
ensureNonNegativePoints($points)
getElementByPosition($position)
static buildInstance($questionId, $orderingElements=array())
getParticipantsSolution()
setParticipantsSolution($participantSolution)
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
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 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 getDir($a_dir, $a_rec=false, $a_sub_dir="")
get directory
static makeDirParents($a_dir)
Create a new directory and all parent directories.
const OQ_PICTURES
Ordering question constants.
Class iQuestionCondition.
const PercentageResultExpression
const OrderingResultExpression
getUserQuestionResult($active_id, $pass)
Get the user solution for a question by active_id and the test pass.
const NumericResultExpression
const EmptyAnswerExpression
Interface ilObjAnswerScoringAdjustable.
Interface ilObjQuestionScoringAdjustable.
saveAdditionalQuestionDataToDb()
Saves a record to the question types additional data table.
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list
foreach($_POST as $key=> $value) $res