ILIAS  release_8 Revision v8.24
assLongMenu Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for assLongMenu:
+ Collaboration diagram for assLongMenu:

Public Member Functions

 __construct ( $title="", $comment="", $author="", $owner=-1, $question="")
 
 getAnswerType ()
 
 setAnswerType ($answerType)
 
 getCorrectAnswers ()
 
 setCorrectAnswers ($correct_answers)
 
 getAnswerTableName ()
 
 setLongMenuTextValue ($long_menu_text="")
 
 getLongMenuTextValue ()
 
 setAnswers ($answers)
 
 getAnswers ()
 
 getJsonStructure ()
 
 setJsonStructure ($json_structure)
 
 setSpecificFeedbackSetting ($specificFeedbackSetting)
 
 getSpecificFeedbackSetting ()
 
 setMinAutoComplete ($minAutoComplete)
 
 getMinAutoComplete ()
 
 isComplete ()
 Returns true, if a question is complete for use. More...
 
 saveToDb (int $original_id=-1)
 
 checkQuestionCustomPart ($form=null)
 
 getMaximumPoints ()
 Returns the maximum points, a learner can reach answering the question. More...
 
 saveAdditionalQuestionDataToDb ()
 Saves a record to the question types additional data table. More...
 
 saveAnswerSpecificDataToDb ()
 
 loadFromDb ($question_id)
 
 getCorrectAnswersForQuestionSolution ($question_id)
 
 getAnswersObject ()
 
 getCorrectAnswersAsJson ()
 
 duplicate (bool $for_test=true, string $title="", string $author="", string $owner="", $testObjId=null)
 
 copyObject ($target_questionpool_id, $title="")
 
 createNewOriginalFromThisDuplicate ($targetParentId, $targetQuestionTitle="")
 
 calculateReachedPoints ($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
 Returns the points, a learner has reached answering the question. More...
 
 saveWorkingData (int $active_id, int $pass=null, bool $authorized=true)
 Saves the learners input of the question to the database. More...
 
 lookupForExistingSolutions (int $activeId, int $pass)
 Lookup if an authorized or intermediate solution exists. More...
 
 getSolutionSubmit ()
 
 getQuestionType ()
 Returns the question type of the question. More...
 
 getAdditionalTableName ()
 
 getRTETextWithMediaObjects ()
 Collects all text in the question which could contain media objects which were created with the Rich Text Editor. More...
 
 setExportDetailsXLS (ilAssExcelFormatHelper $worksheet, int $startrow, int $active_id, int $pass)
 {} More...
 
 getUserQuestionResult ($active_id, $pass)
 Get the user solution for a question by active_id and the test pass. More...
 
 getAvailableAnswerOptions ($index=null)
 If index is null, the function returns an array with all anwser options Else it returns the specific answer option. More...
 
 isShuffleAnswersEnabled ()
 
 clearAnswerSpecificDataFromDb ($question_id)
 
 delete (int $question_id)
 
 toJSON ()
 Returns a JSON representation of the question. More...
 
 getIdenticalScoring ()
 
 setIdenticalScoring ($a_identical_scoring)
 
- Public Member Functions inherited from assQuestion
 __construct (string $title="", string $comment="", string $author="", int $owner=-1, string $question="")
 assQuestion constructor More...
 
 getShuffler ()
 
 setShuffler (Transformation $shuffler)
 
 setProcessLocker (ilAssQuestionProcessLocker $processLocker)
 
 getProcessLocker ()
 
 fromXML ($item, int $questionpool_id, ?int $tst_id, &$tst_object, int &$question_counter, array $import_mapping, array &$solutionhints=[])
 Receives parameters from a QTI parser and creates a valid ILIAS question object. More...
 
 toXML (bool $a_include_header=true, bool $a_include_binary=true, bool $a_shuffle=false, bool $test_output=false, bool $force_image_references=false)
 Returns a QTI xml representation of the question. More...
 
 isComplete ()
 Returns true, if a question is complete for use. More...
 
 questionTitleExists (int $questionpool_id, string $title)
 Returns TRUE if the question title exists in a question pool in the database. More...
 
 setTitle (string $title="")
 
 setId (int $id=-1)
 
 setTestId (int $id=-1)
 
 setComment (string $comment="")
 
 setOutputType (int $outputType=OUTPUT_HTML)
 
 setShuffle (?bool $shuffle=true)
 
 setAuthor (string $author="")
 
 setOwner (int $owner=-1)
 
 getTitle ()
 
 getTitleForHTMLOutput ()
 
 getTitleFilenameCompliant ()
 
 getId ()
 
 getShuffle ()
 
 getTestId ()
 
 getComment ()
 
 getDescriptionForHTMLOutput ()
 
 getThumbSize ()
 
 setThumbSize (int $a_size)
 
 getMinimumThumbSize ()
 
 getMaximumThumbSize ()
 
 getOutputType ()
 
 supportsJavascriptOutput ()
 
 supportsNonJsOutput ()
 
 requiresJsSwitch ()
 
 getAuthor ()
 
 getAuthorForHTMLOutput ()
 
 getOwner ()
 
 getObjId ()
 
 setObjId (int $obj_id=0)
 
 getLifecycle ()
 
 setLifecycle (ilAssQuestionLifecycle $lifecycle)
 
 setExternalId (?string $external_id)
 
 getExternalId ()
 
 getSuggestedSolutionOutput ()
 
 _getSuggestedSolution (int $question_id, int $subquestion_index=0)
 
 loadSuggestedSolution (int $question_id, int $subquestion_index=0)
 Returns a suggested solution for a given subquestion index. More...
 
 getSuggestedSolutions ()
 
 getReachedPoints (int $active_id, int $pass)
 
 getMaximumPoints ()
 
 getAdjustedReachedPoints (int $active_id, int $pass, bool $authorizedSolution=true)
 returns the reached points ... More...
 
 calculateResultsFromSolution (int $active_id, int $pass, bool $obligationsEnabled=false)
 Calculates the question results from a previously saved question solution. More...
 
 persistWorkingState (int $active_id, $pass, bool $obligationsEnabled=false, bool $authorized=true)
 persists the working state for current testactive and testpass More...
 
 persistPreviewState (ilAssQuestionPreviewSession $previewSession)
 persists the preview state for current user and question More...
 
 validateSolutionSubmit ()
 
 saveWorkingData (int $active_id, int $pass, bool $authorized=true)
 Saves the learners input of the question to the database. More...
 
 moveUploadedMediaFile (string $file, string $name)
 Move an uploaded media file to an public accessible temp dir to present it. More...
 
 getSuggestedSolutionPath ()
 
 getImagePath ($question_id=null, $object_id=null)
 Returns the image path for web accessable images of a question. More...
 
 buildImagePath ($questionId, $parentObjectId)
 
 getFlashPath ()
 Returns the image path for web accessable flash files of a question. More...
 
 getSuggestedSolutionPathWeb ()
 
 getImagePathWeb ()
 Returns the web image path for web accessable images of a question. More...
 
 getTestOutputSolutions (int $activeId, int $pass)
 
 getUserSolutionPreferingIntermediate (int $active_id, $pass=null)
 
 getSolutionValues ($active_id, $pass=null, bool $authorized=true)
 Loads solutions of a given user from the database an returns it. More...
 
 isInUse (int $question_id=0)
 Checks whether the question is in use or not in pools or tests. More...
 
 usageNumber (int $question_id=0)
 Returns the number of place the question is in use in pools or tests. More...
 
 isClone (int $question_id=0)
 Checks whether the question is a clone of another question or not. More...
 
 getAdditionalTableName ()
 
 getAnswerTableName ()
 
 deleteAnswers (int $question_id)
 
 deleteAdditionalTableData (int $question_id)
 
 delete (int $question_id)
 
 getTotalAnswers ()
 
 copyXHTMLMediaObjectsOfQuestion (int $a_q_id)
 
 syncXHTMLMediaObjectsOfQuestion ()
 
 createPageObject ()
 
 copyPageOfQuestion (int $a_q_id)
 
 getPageOfQuestion ()
 
 setOriginalId (?int $original_id)
 
 getOriginalId ()
 
 fixSvgToPng (string $imageFilenameContainingString)
 
 fixUnavailableSkinImageSources (string $html)
 
 loadFromDb (int $question_id)
 
 createNewQuestion (bool $a_create_page=true)
 Creates a new question without an owner when a new question is created This assures that an ID is given to the question if a file upload or something else occurs. More...
 
 saveQuestionDataToDb (int $original_id=-1)
 
 saveToDb ()
 
 setNewOriginalId (int $newId)
 
 deleteSuggestedSolutions ()
 
 getSuggestedSolution (int $subquestion_index=0)
 Returns a suggested solution for a given subquestion index. More...
 
 getSuggestedSolutionTitle (int $subquestion_index=0)
 Returns the title of a suggested solution at a given subquestion_index. More...
 
 setSuggestedSolution (string $solution_id="", int $subquestion_index=0, bool $is_import=false)
 Sets a suggested solution for the question. More...
 
 updateSuggestedSolutions (int $original_id=-1, int $original_obj_id=-1)
 
 _resolveInternalLink (string $internal_link)
 
 _resolveIntLinks (int $question_id)
 
 syncWithOriginal ()
 
 _questionExists ($question_id)
 Returns true if the question already exists in the database. More...
 
 _questionExistsInPool (int $question_id)
 
 getPoints ()
 
 setPoints (float $points)
 
 getSolutionMaxPass (int $active_id)
 
 calculateReachedPoints ($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
 Returns the points, a learner has reached answering the question. More...
 
 deductHintPointsFromReachedPoints (ilAssQuestionPreviewSession $previewSession, $reachedPoints)
 
 calculateReachedPointsFromPreviewSession (ilAssQuestionPreviewSession $previewSession)
 
 isPreviewSolutionCorrect (ilAssQuestionPreviewSession $previewSession)
 
 adjustReachedPointsByScoringOptions ($points, $active_id, $pass=null)
 Adjust the given reached points by checks for all special scoring options in the test container. More...
 
 isHTML ($a_text)
 Checks if a given string contains HTML or not. More...
 
 prepareTextareaOutput (string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false)
 
 QTIMaterialToString (ilQTIMaterial $a_material)
 Reads an QTI material tag and creates a text or XHTML string. More...
 
 addQTIMaterial (ilXmlWriter $a_xml_writer, string $a_material, bool $close_material_tag=true, bool $add_mobs=true)
 
 buildHashedImageFilename (string $plain_image_filename, bool $unique=false)
 
 getQuestion ()
 
 getQuestionForHTMLOutput ()
 
 setQuestion (string $question="")
 
 getQuestionType ()
 Returns the question type of the question. More...
 
 getQuestionTypeID ()
 
 syncHints ()
 
 cleanupMediaObjectUsage ()
 
 getInstances ()
 
 getActiveUserData (int $active_id)
 Returns the user id and the test id for a given active id. More...
 
 hasSpecificFeedback ()
 
 setExportDetailsXLS (ilAssExcelFormatHelper $worksheet, int $startrow, int $active_id, int $pass)
 
 __get ($value)
 Object getter. More...
 
 __set ($key, $value)
 Object setter. More...
 
 __isset ($key)
 Object issetter. More...
 
 getNrOfTries ()
 
 setNrOfTries (int $a_nr_of_tries)
 
 setExportImagePath (string $path)
 
 formatSAQuestion ($a_q)
 
 setPreventRteUsage (bool $prevent_rte_usage)
 
 getPreventRteUsage ()
 
 migrateContentForLearningModule (ilAssSelfAssessmentMigrator $migrator)
 
 setSelfAssessmentEditingMode (bool $selfassessmenteditingmode)
 
 getSelfAssessmentEditingMode ()
 
 setDefaultNrOfTries (int $defaultnroftries)
 
 getDefaultNrOfTries ()
 
 syncSkillAssignments (int $srcParentId, int $srcQuestionId, int $trgParentId, int $trgQuestionId)
 
 ensureHintPageObjectExists ($pageObjectId)
 
 isAnswered (int $active_id, int $pass)
 
 isAutosaveable ()
 
 getAdditionalContentEditingMode ()
 
 setAdditionalContentEditingMode (?string $additionalContentEditingMode)
 
 isAdditionalContentEditingModePageObject ()
 
 isValidAdditionalContentEditingMode (string $additionalContentEditingMode)
 
 getValidAdditionalContentEditingModes ()
 
 getHtmlUserSolutionPurifier ()
 
 getHtmlQuestionContentPurifier ()
 
 setLastChange ($lastChange)
 
 getLastChange ()
 
 removeIntermediateSolution (int $active_id, int $pass)
 
 removeCurrentSolution (int $active_id, int $pass, bool $authorized=true)
 
 saveCurrentSolution (int $active_id, int $pass, $value1, $value2, bool $authorized=true, $tstamp=0)
 
 updateCurrentSolution (int $solutionId, $value1, $value2, bool $authorized=true)
 
 updateCurrentSolutionsAuthorization (int $activeId, int $pass, bool $authorized, bool $keepTime=false)
 
 setStep ($step)
 
 getStep ()
 
 toJSON ()
 
 duplicate (bool $for_test=true, string $title="", string $author="", string $owner="", $testObjId=null)
 
 intermediateSolutionExists (int $active_id, int $pass)
 
 authorizedSolutionExists (int $active_id, ?int $pass)
 
 authorizedOrIntermediateSolutionExists (int $active_id, int $pass)
 
 lookupForExistingSolutions (int $activeId, int $pass)
 Lookup if an authorized or intermediate solution exists. More...
 
 isAddableAnswerOptionValue (int $qIndex, string $answerOptionValue)
 
 addAnswerOptionValue (int $qIndex, string $answerOptionValue, float $points)
 
 removeAllExistingSolutions ()
 
 removeExistingSolutions (int $activeId, int $pass)
 
 resetUsersAnswer (int $activeId, int $pass)
 
 removeResultRecord (int $activeId, int $pass)
 
 fetchValuePairsFromIndexedValues (array $indexedValues)
 
 fetchIndexedValuesFromValuePairs (array $valuePairs)
 
 areObligationsToBeConsidered ()
 
 setObligationsToBeConsidered (bool $obligationsToBeConsidered)
 
 updateTimestamp ()
 
 getTestPresentationConfig ()
 
 savePartial ()
 
 isInActiveTest ()
 
 saveAdditionalQuestionDataToDb ()
 Saves a record to the question types additional data table. More...
 

Data Fields

const ANSWER_TYPE_SELECT_VAL = 0
 
const ANSWER_TYPE_TEXT_VAL = 1
 
const GAP_PLACEHOLDER = 'Longmenu'
 
const MIN_LENGTH_AUTOCOMPLETE = 3
 
const MAX_INPUT_FIELDS = 500
 
- Data Fields inherited from assQuestion
const IMG_MIME_TYPE_JPG = 'image/jpeg'
 
const IMG_MIME_TYPE_PNG = 'image/png'
 
const IMG_MIME_TYPE_GIF = 'image/gif'
 
const TRIM_PATTERN = '/^[\p{C}\p{Z}]+|[\p{C}\p{Z}]+$/u'
 
const ADDITIONAL_CONTENT_EDITING_MODE_RTE = 'default'
 
const ADDITIONAL_CONTENT_EDITING_MODE_IPE = 'pageobject'
 
ilAssQuestionFeedback $feedbackOBJ
 
bool $prevent_rte_usage = false
 
bool $selfassessmenteditingmode = false
 
int $defaultnroftries = 0
 
string $questionActionCmd = 'handleQuestionAction'
 
const KEY_VALUES_IMPLOSION_SEPARATOR = ':'
 

Protected Member Functions

 calculateReachedPointsForSolution ($found_values, $active_id=0)
 
 savePreviewData (ilAssQuestionPreviewSession $previewSession)
 
 lmMigrateQuestionTypeSpecificContent (ilAssSelfAssessmentMigrator $migrator)
 
- Protected Member Functions inherited from assQuestion
 getQuestionAction ()
 
 isNonEmptyItemListPostSubmission (string $postSubmissionFieldname)
 
 ensureCurrentTestPass (int $active_id, int $pass)
 
 lookupCurrentTestPass (int $active_id, int $pass)
 
 lookupTestId (int $active_id)
 @refactor Move to ilObjTest or similar More...
 
 log (int $active_id, string $langVar)
 
 savePreviewData (ilAssQuestionPreviewSession $previewSession)
 
 deletePageOfQuestion (int $question_id)
 
 onDuplicate (int $originalParentId, int $originalQuestionId, int $duplicateParentId, int $duplicateQuestionId)
 
 beforeSyncWithOriginal (int $origQuestionId, int $dupQuestionId, int $origParentObjId, int $dupParentObjId)
 
 afterSyncWithOriginal (int $origQuestionId, int $dupQuestionId, int $origParentObjId, int $dupParentObjId)
 
 onCopy (int $sourceParentId, int $sourceQuestionId, int $targetParentId, int $targetQuestionId)
 
 duplicateSuggestedSolutionFiles (int $parent_id, int $question_id)
 Duplicates the files of a suggested solution if the question is duplicated. More...
 
 syncSuggestedSolutionFiles (int $target_question_id, int $target_obj_id)
 
 copySuggestedSolutionFiles (int $source_questionpool_id, int $source_question_id)
 
 ensureNonNegativePoints ($points)
 
 purifyAndPrepareTextAreaOutput (string $content)
 
 getRTETextWithMediaObjects ()
 
 getSelfAssessmentFormatter ()
 
 lmMigrateQuestionTypeGenericContent (ilAssSelfAssessmentMigrator $migrator)
 
 lmMigrateQuestionTypeSpecificContent (ilAssSelfAssessmentMigrator $migrator)
 
 duplicateQuestionHints (int $originalQuestionId, int $duplicateQuestionId)
 
 duplicateSkillAssignments (int $srcParentId, int $srcQuestionId, int $trgParentId, int $trgQuestionId)
 
 buildQuestionDataQuery ()
 
 getCurrentSolutionResultSet (int $active_id, int $pass, bool $authorized=true)
 
 removeSolutionRecordById (int $solutionId)
 
 getSolutionRecordById (int $solutionId)
 
 deleteDummySolutionRecord (int $activeId, int $passIndex)
 
 isDummySolutionRecord (array $solutionRecord)
 
 deleteSolutionRecordByValues (int $activeId, int $passIndex, bool $authorized, array $matchValues)
 
 duplicateIntermediateSolutionAuthorized (int $activeId, int $passIndex)
 
 forceExistingIntermediateSolution (int $activeId, int $passIndex, bool $considerDummyRecordCreation)
 
 lookupMaxStep (int $active_id, int $pass)
 
 buildTestPresentationConfig ()
 build basic test question configuration instance More...
 

Protected Attributes

const HAS_SPECIFIC_FEEDBACK = false
 
- Protected Attributes inherited from assQuestion
const HAS_SPECIFIC_FEEDBACK = true
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ILIAS DI LoggingServices $ilLog
 
int $id
 
string $title
 
string $comment
 
string $owner
 
string $author
 
int $thumb_size
 
string $question
 The question text. More...
 
float $points
 The maximum available points for the question. More...
 
bool $shuffle
 Indicates whether the answers will be shuffled or not. More...
 
int $test_id
 The database id of a test in which the question is contained. More...
 
int $obj_id = 0
 Object id of the container object. More...
 
 $ilias
 
ilGlobalPageTemplate $tpl
 
ilLanguage $lng
 
ilDBInterface $db
 
Container $dic
 
int $outputType = OUTPUT_JAVASCRIPT
 Contains the output type of a question. More...
 
array $suggested_solutions
 
int $original_id = null
 
 $page
 
string $external_id = null
 
ilAssQuestionProcessLocker $processLocker
 
 $step
 
 $lastChange
 
Transformation $shuffler
 
ilTestQuestionConfig $testQuestionConfig
 
ilAssQuestionLifecycle $lifecycle
 
ilObjUser $current_user
 

Private Member Functions

 buildFolderName ()
 
 buildFileName ($gap_id)
 
 correctAnswerDoesNotExistInAnswerOptions ($answers, $answer_options)
 
 createFileFromArray ()
 
 createArrayFromFile ()
 
 clearFolder ($let_folder_exists=true)
 
 assertDirExists ()
 
 loadCorrectAnswerData ($question_id)
 
 getCorrectAnswersForGap ($question_id, $gap_id)
 
 getPointsForGap ($question_id, $gap_id)
 

Private Attributes

 $answerType
 
 $long_menu_text
 
 $json_structure
 
 $ilDB
 
 $specificFeedbackSetting
 
 $minAutoComplete
 
 $identical_scoring
 
 $correct_answers = []
 
 $answers = []
 

Additional Inherited Members

- Static Public Member Functions inherited from assQuestion
static setForcePassResultUpdateEnabled (bool $forcePassResultsUpdateEnabled)
 
static isForcePassResultUpdateEnabled ()
 
static isAllowedImageMimeType ($mimeType)
 
static fetchMimeTypeIdentifier (string $contentType)
 
static getAllowedFileExtensionsForMimeType (string $mimeType)
 
static isAllowedImageFileExtension (string $mimeType, string $fileExtension)
 
static getAllowedImageMaterialFileExtensions ()
 
static _getMaximumPoints (int $question_id)
 Returns the maximum points, a learner can reach answering the question. More...
 
static _getQuestionInfo (int $question_id)
 
static _getSuggestedSolutionCount (int $question_id)
 
static _getSuggestedSolutionOutput (int $question_id)
 
static _getReachedPoints (int $active_id, int $question_id, int $pass)
 
static _updateTestResultCache (int $active_id, ilAssQuestionProcessLocker $processLocker=null)
 @TODO Move this to a proper place. More...
 
static logAction (string $logtext, int $active_id, int $question_id)
 
static getQuestionTypeFromDb (int $question_id)
 
static _getTotalRightAnswers (int $a_q_id)
 
static _getTitle (int $a_q_id)
 
static _getQuestionText (int $a_q_id)
 
static isFileAvailable (string $file)
 
static _getQuestionType (int $question_id)
 
static _getQuestionTitle (int $question_id)
 
static saveOriginalId (int $questionId, int $originalId)
 
static resetOriginalId (int $questionId)
 
static _getInternalLinkHref (string $target="")
 
static _getOriginalId (int $question_id)
 
static originalQuestionExists (int $questionId)
 
static _instanciateQuestion (int $question_id)
 
static _instantiateQuestion (int $question_id)
 
static instantiateQuestion (int $question_id)
 
static _getSolutionMaxPass (int $question_id, int $active_id)
 Returns the maximum pass a users question solution. More...
 
static _isWriteable (int $question_id, int $user_id)
 
static _isUsedInRandomTest (int $question_id)
 
static _isWorkedThrough (int $active_id, int $question_id, int $pass)
 Returns true if the question was worked through in the given pass Worked through means that the user entered at least one value. More...
 
static _areAnswered (int $a_user_id, array $a_question_ids)
 Checks if an array of question ids is answered by a user or not. More...
 
static _setReachedPoints (int $active_id, int $question_id, float $points, float $maxpoints, int $pass, bool $manualscoring, bool $obligationsEnabled)
 Sets the points, a learner has reached answering the question Additionally objective results are updated. More...
 
static _needsManualScoring (int $question_id)
 
static _includeClass (string $question_type, int $gui=0)
 
static getFeedbackClassNameByQuestionType (string $questionType)
 
static isCoreQuestionType (string $questionType)
 
static includeCoreClass ($questionType, $withGuiClass)
 
static _getQuestionTypeName ($type_tag)
 
static _instanciateQuestionGUI (int $question_id)
 
static instantiateQuestionGUI (int $a_question_id)
 
static _questionExistsInTest (int $question_id, int $test_id)
 
static lookupParentObjId (int $questionId)
 
static lookupOriginalParentObjId (int $originalQuestionId)
 returns the parent object id for given original question id (should be a qpl id, but theoretically it can be a tst id, too) More...
 
static isObligationPossible (int $questionId)
 
static implodeKeyValues (array $keyValues)
 
static explodeKeyValues (string $keyValues)
 
static convertISO8601FormatH_i_s_ExtendedToSeconds (string $time)
 
static missingResultRecordExists (int $activeId, int $pass, array $questionIds)
 
static getQuestionsMissingResultRecord (int $activeId, int $pass, array $questionIds)
 
static lookupResultRecordExist (int $activeId, int $questionId, int $pass)
 
static extendedTrim (string $value)
 Trim non-printable characters from the beginning and end of a string. More...
 
- Static Protected Member Functions inherited from assQuestion
static getNumExistingSolutionRecords (int $activeId, int $pass, int $questionId)
 
- Static Protected Attributes inherited from assQuestion
static $allowedFileExtensionsByMimeType
 
static $allowedCharsetsByMimeType
 
static $allowedImageMaterialFileExtensionsByMimeType
 
static $forcePassResultsUpdateEnabled = false
 
static $imageSourceFixReplaceMap
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 21 of file class.assLongMenu.php.

Constructor & Destructor Documentation

◆ __construct()

assLongMenu::__construct (   $title = "",
  $comment = "",
  $author = "",
  $owner = -1,
  $question = "" 
)

Definition at line 45 of file class.assLongMenu.php.

51 {
52 global $DIC;
53 require_once 'Modules/TestQuestionPool/classes/feedback/class.ilAssConfigurableMultiOptionQuestionFeedback.php';
55 $this->minAutoComplete = self::MIN_LENGTH_AUTOCOMPLETE;
57 $this->ilDB = $DIC->database();
58 $this->identical_scoring = 1;
59 }
const MIN_LENGTH_AUTOCOMPLETE
string $question
The question text.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References assQuestion\$author, assQuestion\$comment, $DIC, assQuestion\$owner, assQuestion\$question, assQuestion\$title, ILIAS\GlobalScreen\Provider\__construct(), ilAssConfigurableMultiOptionQuestionFeedback\FEEDBACK_SETTING_ALL, and MIN_LENGTH_AUTOCOMPLETE.

+ Here is the call graph for this function:

Member Function Documentation

◆ assertDirExists()

assLongMenu::assertDirExists ( )
private

Definition at line 362 of file class.assLongMenu.php.

362 : void
363 {
364 $folder_name = $this->buildFolderName();
365 if (!ilFileUtils::makeDirParents($folder_name)) {
366 throw new ilException('Cannot create export directory');
367 }
368
369 if (
370 !is_dir($folder_name) ||
371 !is_readable($folder_name) ||
372 !is_writable($folder_name)
373 ) {
374 throw new ilException('Cannot create export directory');
375 }
376 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.

References buildFolderName(), and ilFileUtils\makeDirParents().

Referenced by buildFileName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFileName()

assLongMenu::buildFileName (   $gap_id)
private

Definition at line 101 of file class.assLongMenu.php.

101 : ?string
102 {
103 try {
104 $this->assertDirExists();
105 return $this->buildFolderName() . $gap_id . '.txt';
106 } catch (ilException $e) {
107 }
108 return null;
109 }

References Vendor\Package\$e, assertDirExists(), and buildFolderName().

Referenced by createFileFromArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildFolderName()

assLongMenu::buildFolderName ( )
private

Definition at line 91 of file class.assLongMenu.php.

91 : string
92 {
93 return ilFileUtils::getDataDir() . '/assessment/longMenuQuestion/' . $this->getId() . '/' ;
94 }
static getDataDir()
get data directory (outside webspace)

References ilFileUtils\getDataDir(), and assQuestion\getId().

Referenced by assertDirExists(), buildFileName(), clearFolder(), and createArrayFromFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateReachedPoints()

assLongMenu::calculateReachedPoints (   $active_id,
  $pass = null,
  $authorizedSolution = true,
  $returndetails = false 
)

Returns the points, a learner has reached answering the question.

The points are calculated from the given answers.

Parameters
integer$active_id
integer$pass
boolean$returndetails(deprecated !!)
Exceptions
ilTestException
Returns
integer/array $points/$details (array $details is deprecated !!)

Reimplemented from assQuestion.

Definition at line 611 of file class.assLongMenu.php.

612 {
613 if ($returndetails) {
614 throw new ilTestException('return details not implemented for ' . __METHOD__);
615 }
616
617 $found_values = array();
618 if (is_null($pass)) {
619 $pass = $this->getSolutionMaxPass($active_id);
620 }
621 $result = $this->getCurrentSolutionResultSet($active_id, $pass, $authorizedSolution);
622 while ($data = $this->ilDB->fetchAssoc($result)) {
623 $found_values[(int) $data['value1']] = $data['value2'];
624 }
625
626 return $this->calculateReachedPointsForSolution($found_values, $active_id);
627 }
calculateReachedPointsForSolution($found_values, $active_id=0)
getCurrentSolutionResultSet(int $active_id, int $pass, bool $authorized=true)
getSolutionMaxPass(int $active_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $data, calculateReachedPointsForSolution(), assQuestion\getCurrentSolutionResultSet(), assQuestion\getSolutionMaxPass(), and ILIAS\Repository\int().

Referenced by getUserQuestionResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateReachedPointsForSolution()

assLongMenu::calculateReachedPointsForSolution (   $found_values,
  $active_id = 0 
)
protected

Definition at line 629 of file class.assLongMenu.php.

630 {
631 if ($found_values == null) {
632 $found_values = [];
633 }
634 $points = 0.0;
635 $solution_values_text = array();
636 foreach ($found_values as $key => $answer) {
637 if ($answer != '') {
638 $correct_answers = $this->getCorrectAnswersForGap($this->id, $key);
639 if (in_array($answer, $correct_answers)) {
640 $points_gap = $this->getPointsForGap($this->id, $key);
641 if (!$this->getIdenticalScoring()) {
642 // check if the same solution text was already entered
643 if ((in_array($answer, $solution_values_text)) && ($points > 0)) {
644 $points_gap = 0;
645 }
646 }
647 $points += $points_gap;
648 array_push($solution_values_text, $answer);
649 }
650 }
651 }
652 return $points;
653 }
getCorrectAnswersForGap($question_id, $gap_id)
getPointsForGap($question_id, $gap_id)
float $points
The maximum available points for the question.
string $key
Consumer key/client ID value.
Definition: System.php:193

References $correct_answers, ILIAS\LTI\ToolProvider\$key, assQuestion\$points, getCorrectAnswersForGap(), getIdenticalScoring(), and getPointsForGap().

Referenced by calculateReachedPoints().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkQuestionCustomPart()

assLongMenu::checkQuestionCustomPart (   $form = null)
Parameters
ilPropertyFormGUI | null$form
Returns
bool

Definition at line 193 of file class.assLongMenu.php.

193 : bool
194 {
195 $hidden_text_files = $this->getAnswers();
197 $points = array();
198 if ($correct_answers === null || sizeof($correct_answers) == 0 || $hidden_text_files === null || sizeof($hidden_text_files) == 0) {
199 return false;
200 }
201 if (sizeof($correct_answers) != sizeof($hidden_text_files)) {
202 return false;
203 }
204 foreach ($correct_answers as $key => $correct_answers_row) {
205 if ($this->correctAnswerDoesNotExistInAnswerOptions($correct_answers_row, $hidden_text_files[$key])) {
206 return false;
207 }
208 if (!is_array($correct_answers_row[0]) || sizeof($correct_answers_row[0]) == 0) {
209 return false;
210 }
211 if ($correct_answers_row[1] > 0) {
212 array_push($points, $correct_answers_row[1]);
213 }
214 }
215 if (sizeof($correct_answers) != sizeof($points)) {
216 return false;
217 }
218
219 foreach ($points as $row) {
220 if ($row <= 0) {
221 return false;
222 }
223 }
224 return true;
225 }
correctAnswerDoesNotExistInAnswerOptions($answers, $answer_options)

References $correct_answers, ILIAS\LTI\ToolProvider\$key, assQuestion\$points, correctAnswerDoesNotExistInAnswerOptions(), getAnswers(), and getCorrectAnswers().

+ Here is the call graph for this function:

◆ clearAnswerSpecificDataFromDb()

assLongMenu::clearAnswerSpecificDataFromDb (   $question_id)

Definition at line 864 of file class.assLongMenu.php.

864 : void
865 {
866 $this->ilDB->manipulateF(
867 'DELETE FROM ' . $this->getAnswerTableName() . ' WHERE question_fi = %s',
868 array( 'integer' ),
869 array( $question_id )
870 );
871 }

References getAnswerTableName().

Referenced by saveAnswerSpecificDataToDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearFolder()

assLongMenu::clearFolder (   $let_folder_exists = true)
private

Definition at line 357 of file class.assLongMenu.php.

357 : void
358 {
359 ilFileUtils::delDir($this->buildFolderName(), $let_folder_exists);
360 }
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively

References buildFolderName(), and ilFileUtils\delDir().

Referenced by createFileFromArray(), and delete().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyObject()

assLongMenu::copyObject (   $target_questionpool_id,
  $title = "" 
)

Definition at line 544 of file class.assLongMenu.php.

544 : int
545 {
546 if ($this->getId() <= 0) {
547 throw new RuntimeException('The question has not been saved. It cannot be duplicated');
548 }
549 // duplicate the question in database
550 $clone = $this;
551 include_once("./Modules/TestQuestionPool/classes/class.assQuestion.php");
553 $clone->id = -1;
554 $source_questionpool_id = $this->getObjId();
555 $clone->setObjId($target_questionpool_id);
556 if ($title) {
557 $clone->setTitle($title);
558 }
559 $clone->saveToDb();
560
561 $clone->copyPageOfQuestion($original_id);
562 $clone->copyXHTMLMediaObjectsOfQuestion($original_id);
563
564 $clone->onCopy($source_questionpool_id, $original_id, $clone->getObjId(), $clone->getId());
565
566 return $clone->id;
567 }
static _getOriginalId(int $question_id)

References assQuestion\$original_id, assQuestion\$title, assQuestion\_getOriginalId(), assQuestion\getId(), and assQuestion\getObjId().

+ Here is the call graph for this function:

◆ correctAnswerDoesNotExistInAnswerOptions()

assLongMenu::correctAnswerDoesNotExistInAnswerOptions (   $answers,
  $answer_options 
)
private
Parameters
$answers
$answer_options
Returns
bool

Definition at line 232 of file class.assLongMenu.php.

232 : bool
233 {
234 foreach ($answers[0] as $key => $answer) {
235 if (!in_array($answer, $answer_options)) {
236 return true;
237 }
238 }
239 return false;
240 }

References $answers, and ILIAS\LTI\ToolProvider\$key.

Referenced by checkQuestionCustomPart().

+ Here is the caller graph for this function:

◆ createArrayFromFile()

assLongMenu::createArrayFromFile ( )
private

Definition at line 334 of file class.assLongMenu.php.

334 : array
335 {
336 $files = glob($this->buildFolderName() . '*.txt');
337
338 if ($files === false) {
339 $files = array();
340 }
341
342 $answers = array();
343
344 foreach ($files as $file) {
345 $gap = str_replace('.txt', '', basename($file));
346 $answers[(int) $gap] = explode("\n", file_get_contents($file));
347 }
348 // Sort by gap keys, to ensure the numbers are in ascending order.
349 // Glob will report the keys in files order like 0, 1, 10, 11, 2,...
350 // json_encoding the array with keys in order 0,1,10,11,2,.. will create
351 // a json_object instead of a list when keys are numeric, sorted and start with 0
352 ksort($answers);
353 $this->setAnswers($answers);
354 return $answers;
355 }
setAnswers($answers)

References $answers, buildFolderName(), ILIAS\Repository\int(), and setAnswers().

Referenced by getAnswersObject(), getAvailableAnswerOptions(), and loadFromDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createFileFromArray()

assLongMenu::createFileFromArray ( )
private

Definition at line 316 of file class.assLongMenu.php.

316 : void
317 {
318 $array = $this->getAnswers();
319 $this->clearFolder();
320 foreach ($array as $gap => $values) {
321 $file_content = '';
322 if (is_array($values)) {
323 foreach ($values as $key => $value) {
324 $file_content .= $value . "\n";
325 }
326 $file_content = rtrim($file_content, "\n");
327 $file = fopen($this->buildFileName($gap), "w");
328 fwrite($file, $file_content);
329 fclose($file);
330 }
331 }
332 }
buildFileName($gap_id)
clearFolder($let_folder_exists=true)

References ILIAS\LTI\ToolProvider\$key, buildFileName(), clearFolder(), and getAnswers().

Referenced by saveAdditionalQuestionDataToDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createNewOriginalFromThisDuplicate()

assLongMenu::createNewOriginalFromThisDuplicate (   $targetParentId,
  $targetQuestionTitle = "" 
)

Definition at line 569 of file class.assLongMenu.php.

569 : int
570 {
571 if ($this->getId() <= 0) {
572 throw new RuntimeException('The question has not been saved. It cannot be duplicated');
573 }
574
575 include_once("./Modules/TestQuestionPool/classes/class.assQuestion.php");
576
577 $sourceQuestionId = $this->id;
578 $sourceParentId = $this->getObjId();
579
580 // duplicate the question in database
581 $clone = $this;
582 $clone->id = -1;
583
584 $clone->setObjId($targetParentId);
585
586 if ($targetQuestionTitle) {
587 $clone->setTitle($targetQuestionTitle);
588 }
589
590 $clone->saveToDb();
591 $clone->copyPageOfQuestion($sourceQuestionId);
592 $clone->copyXHTMLMediaObjectsOfQuestion($sourceQuestionId);
593
594 $clone->onCopy($sourceParentId, $sourceQuestionId, $clone->getObjId(), $clone->getId());
595
596 return $clone->id;
597 }

References assQuestion\$id, assQuestion\getId(), and assQuestion\getObjId().

+ Here is the call graph for this function:

◆ delete()

assLongMenu::delete ( int  $question_id)

Reimplemented from assQuestion.

Definition at line 873 of file class.assLongMenu.php.

873 : void
874 {
875 parent::delete($question_id);
876 $this->clearFolder(false);
877 }

References clearFolder().

+ Here is the call graph for this function:

◆ duplicate()

assLongMenu::duplicate ( bool  $for_test = true,
string  $title = "",
string  $author = "",
string  $owner = "",
  $testObjId = null 
)

Reimplemented from assQuestion.

Definition at line 500 of file class.assLongMenu.php.

500 : int
501 {
502 if ($this->id <= 0) {
503 // The question has not been saved. It cannot be duplicated
504 return -1;
505 }
506
507 // duplicate the question in database
508 $this_id = $this->getId();
509 $thisObjId = $this->getObjId();
510
511 $clone = $this;
512 include_once("./Modules/TestQuestionPool/classes/class.assQuestion.php");
514 $clone->id = -1;
515
516 if ((int) $testObjId > 0) {
517 $clone->setObjId($testObjId);
518 }
519
520 if ($title) {
521 $clone->setTitle($title);
522 }
523
524 if ($author) {
525 $clone->setAuthor($author);
526 }
527 if ($owner) {
528 $clone->setOwner($owner);
529 }
530
531 if ($for_test) {
532 $clone->saveToDb($original_id);
533 } else {
534 $clone->saveToDb();
535 }
536
537 $clone->copyPageOfQuestion($this_id);
538 $clone->copyXHTMLMediaObjectsOfQuestion($this_id);
539 $clone->onDuplicate($thisObjId, $this_id, $clone->getObjId(), $clone->getId());
540
541 return $clone->id;
542 }

References assQuestion\$author, assQuestion\$original_id, assQuestion\$owner, assQuestion\$title, assQuestion\_getOriginalId(), assQuestion\getId(), and assQuestion\getObjId().

+ Here is the call graph for this function:

◆ getAdditionalTableName()

assLongMenu::getAdditionalTableName ( )
Returns
string|array Or Array?
See also
Deletion methods here

Reimplemented from assQuestion.

Definition at line 777 of file class.assLongMenu.php.

777 : string
778 {
779 return 'qpl_qst_lome';
780 }

Referenced by loadFromDb(), and saveAdditionalQuestionDataToDb().

+ Here is the caller graph for this function:

◆ getAnswers()

assLongMenu::getAnswers ( )

Definition at line 126 of file class.assLongMenu.php.

126 : array
127 {
128 return $this->answers;
129 }

References $answers.

Referenced by checkQuestionCustomPart(), createFileFromArray(), and toJSON().

+ Here is the caller graph for this function:

◆ getAnswersObject()

assLongMenu::getAnswersObject ( )

Definition at line 489 of file class.assLongMenu.php.

490 {
491 return json_encode($this->createArrayFromFile());
492 }

References createArrayFromFile().

+ Here is the call graph for this function:

◆ getAnswerTableName()

assLongMenu::getAnswerTableName ( )
Returns
string|array Or Array?
See also
Deletion methods here

Reimplemented from assQuestion.

Definition at line 96 of file class.assLongMenu.php.

96 : string
97 {
98 return "qpl_a_lome";
99 }

Referenced by clearAnswerSpecificDataFromDb(), getCorrectAnswersForGap(), getCorrectAnswersForQuestionSolution(), getPointsForGap(), and saveAnswerSpecificDataToDb().

+ Here is the caller graph for this function:

◆ getAnswerType()

assLongMenu::getAnswerType ( )
Returns
mixed

Definition at line 64 of file class.assLongMenu.php.

65 {
66 return $this->answerType;
67 }

References $answerType.

Referenced by saveAnswerSpecificDataToDb().

+ Here is the caller graph for this function:

◆ getAvailableAnswerOptions()

assLongMenu::getAvailableAnswerOptions (   $index = null)

If index is null, the function returns an array with all anwser options Else it returns the specific answer option.

Parameters
null | int$index
Returns
array|ASS_AnswerSimple

Definition at line 854 of file class.assLongMenu.php.

855 {
856 return $this->createArrayFromFile();
857 }

References createArrayFromFile().

+ Here is the call graph for this function:

◆ getCorrectAnswers()

assLongMenu::getCorrectAnswers ( )
Returns
mixed

Definition at line 80 of file class.assLongMenu.php.

81 {
83 }

References $correct_answers.

Referenced by checkQuestionCustomPart(), getMaximumPoints(), saveAnswerSpecificDataToDb(), setExportDetailsXLS(), and toJSON().

+ Here is the caller graph for this function:

◆ getCorrectAnswersAsJson()

assLongMenu::getCorrectAnswersAsJson ( )

Definition at line 494 of file class.assLongMenu.php.

495 {
496 $this->loadCorrectAnswerData($this->getId());
497 return $this->getJsonStructure();
498 }
loadCorrectAnswerData($question_id)

References assQuestion\getId(), getJsonStructure(), and loadCorrectAnswerData().

+ Here is the call graph for this function:

◆ getCorrectAnswersForGap()

assLongMenu::getCorrectAnswersForGap (   $question_id,
  $gap_id 
)
private

Definition at line 460 of file class.assLongMenu.php.

460 : array
461 {
462 $correct_answers = array();
463 $res = $this->db->queryF(
464 'SELECT answer_text FROM ' . $this->getAnswerTableName() . ' WHERE question_fi = %s AND gap_number = %s',
465 array('integer', 'integer'),
466 array($question_id, $gap_id)
467 );
468 while ($data = $this->ilDB->fetchAssoc($res)) {
469 $correct_answers[] = rtrim($data['answer_text']);
470 }
471 return $correct_answers;
472 }
$res
Definition: ltiservices.php:69

References $correct_answers, $data, $res, and getAnswerTableName().

Referenced by calculateReachedPointsForSolution().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCorrectAnswersForQuestionSolution()

assLongMenu::getCorrectAnswersForQuestionSolution (   $question_id)

Definition at line 441 of file class.assLongMenu.php.

441 : array
442 {
443 $correct_answers = array();
444 $res = $this->db->queryF(
445 'SELECT gap_number, answer_text FROM ' . $this->getAnswerTableName() . ' WHERE question_fi = %s',
446 array('integer'),
447 array($question_id)
448 );
449 while ($data = $this->ilDB->fetchAssoc($res)) {
450 if (array_key_exists($data['gap_number'], $correct_answers)) {
451 $correct_answers[$data['gap_number']] .= ' ' . $this->lng->txt("or") . ' ';
452 $correct_answers[$data['gap_number']] .= rtrim($data['answer_text']);
453 } else {
454 $correct_answers[$data['gap_number']] = rtrim($data['answer_text']);
455 }
456 }
457 return $correct_answers;
458 }

References $correct_answers, $data, $res, getAnswerTableName(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getIdenticalScoring()

assLongMenu::getIdenticalScoring ( )

Definition at line 914 of file class.assLongMenu.php.

914 : int
915 {
916 return ($this->identical_scoring) ? 1 : 0;
917 }

Referenced by calculateReachedPointsForSolution(), and saveAdditionalQuestionDataToDb().

+ Here is the caller graph for this function:

◆ getJsonStructure()

assLongMenu::getJsonStructure ( )
Returns
mixed

Definition at line 134 of file class.assLongMenu.php.

135 {
137 }

References $json_structure.

Referenced by getCorrectAnswersAsJson().

+ Here is the caller graph for this function:

◆ getLongMenuTextValue()

assLongMenu::getLongMenuTextValue ( )

Definition at line 116 of file class.assLongMenu.php.

117 {
119 }

References $long_menu_text.

Referenced by getRTETextWithMediaObjects(), saveAdditionalQuestionDataToDb(), and toJSON().

+ Here is the caller graph for this function:

◆ getMaximumPoints()

assLongMenu::getMaximumPoints ( )

Returns the maximum points, a learner can reach answering the question.

@access public

See also
$points

Reimplemented from assQuestion.

Definition at line 249 of file class.assLongMenu.php.

249 : float
250 {
251 $sum = 0;
252 $points = $this->getCorrectAnswers();
253 if ($points) {
254 foreach ($points as $add) {
255 $sum += (float) $add[1];
256 }
257 }
258 return $sum;
259 }

References assQuestion\$points, and getCorrectAnswers().

Referenced by getUserQuestionResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMinAutoComplete()

assLongMenu::getMinAutoComplete ( )

Definition at line 162 of file class.assLongMenu.php.

162 : int
163 {
164 return $this->minAutoComplete ? $this->minAutoComplete : self::MIN_LENGTH_AUTOCOMPLETE;
165 }

References MIN_LENGTH_AUTOCOMPLETE.

Referenced by saveAdditionalQuestionDataToDb().

+ Here is the caller graph for this function:

◆ getPointsForGap()

assLongMenu::getPointsForGap (   $question_id,
  $gap_id 
)
private

Definition at line 474 of file class.assLongMenu.php.

474 : float
475 {
476 $points = 0.0;
477 $res = $this->db->queryF(
478 'SELECT points FROM ' . $this->getAnswerTableName() . ' WHERE question_fi = %s AND gap_number = %s GROUP BY gap_number, points',
479 array('integer', 'integer'),
480 array($question_id, $gap_id)
481 );
482 while ($data = $this->ilDB->fetchAssoc($res)) {
483 $points = (float) $data['points'];
484 }
485 return $points;
486 }

References $data, assQuestion\$points, $res, and getAnswerTableName().

Referenced by calculateReachedPointsForSolution().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionType()

assLongMenu::getQuestionType ( )

Returns the question type of the question.

Returns
integer The question type of the question

Reimplemented from assQuestion.

Definition at line 772 of file class.assLongMenu.php.

772 : string
773 {
774 return "assLongMenu";
775 }

Referenced by toJSON().

+ Here is the caller graph for this function:

◆ getRTETextWithMediaObjects()

assLongMenu::getRTETextWithMediaObjects ( )

Collects all text in the question which could contain media objects which were created with the Rich Text Editor.

Reimplemented from assQuestion.

Definition at line 786 of file class.assLongMenu.php.

786 : string
787 {
788 return parent::getRTETextWithMediaObjects() . $this->getLongMenuTextValue();
789 }

References getLongMenuTextValue().

+ Here is the call graph for this function:

◆ getSolutionSubmit()

assLongMenu::getSolutionSubmit ( )

Definition at line 744 of file class.assLongMenu.php.

744 : array
745 {
746 $solutionSubmit = array();
747 $answer = ilArrayUtil::stripSlashesRecursive($_POST['answer']);
748
749 foreach ($answer as $key => $value) {
750 $solutionSubmit[$key] = $value;
751 }
752
753 return $solutionSubmit;
754 }
static stripSlashesRecursive($a_data, bool $a_strip_html=true, string $a_allow="")

References ILIAS\LTI\ToolProvider\$key, and ilArrayUtil\stripSlashesRecursive().

Referenced by saveWorkingData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSpecificFeedbackSetting()

assLongMenu::getSpecificFeedbackSetting ( )

Definition at line 152 of file class.assLongMenu.php.

152 : int
153 {
155 }

References $specificFeedbackSetting.

Referenced by saveAdditionalQuestionDataToDb().

+ Here is the caller graph for this function:

◆ getUserQuestionResult()

assLongMenu::getUserQuestionResult (   $active_id,
  $pass 
)

Get the user solution for a question by active_id and the test pass.

Parameters
int$active_id
int$pass
Returns
ilUserQuestionResult

Definition at line 834 of file class.assLongMenu.php.

835 {
836 $result = new ilUserQuestionResult($this, $active_id, $pass);
837
838 $points = $this->calculateReachedPoints($active_id, $pass);
839 $max_points = $this->getMaximumPoints();
840
841 $result->setReachedPercentage(($points / $max_points) * 100);
842
843 return $result;
844 }
getMaximumPoints()
Returns the maximum points, a learner can reach answering the question.
calculateReachedPoints($active_id, $pass=null, $authorizedSolution=true, $returndetails=false)
Returns the points, a learner has reached answering the question.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References assQuestion\$points, calculateReachedPoints(), and getMaximumPoints().

+ Here is the call graph for this function:

◆ isComplete()

assLongMenu::isComplete ( )

Returns true, if a question is complete for use.

Returns
boolean True, if the question is complete for use, otherwise false

Reimplemented from assQuestion.

Definition at line 167 of file class.assLongMenu.php.

167 : bool
168 {
169 if (strlen($this->title)
170 && $this->author
171 && $this->long_menu_text
172 && sizeof($this->answers) > 0
173 && sizeof($this->correct_answers) > 0
174 && $this->getPoints() > 0
175 ) {
176 return true;
177 }
178 return false;
179 }

References assQuestion\getPoints().

+ Here is the call graph for this function:

◆ isShuffleAnswersEnabled()

assLongMenu::isShuffleAnswersEnabled ( )

Definition at line 859 of file class.assLongMenu.php.

859 : bool
860 {
861 return false;
862 }

◆ lmMigrateQuestionTypeSpecificContent()

assLongMenu::lmMigrateQuestionTypeSpecificContent ( ilAssSelfAssessmentMigrator  $migrator)
protected
Parameters
ilAssSelfAssessmentMigrator$migrator

Reimplemented from assQuestion.

Definition at line 882 of file class.assLongMenu.php.

882 : void
883 {
884 $this->setLongMenuTextValue($migrator->migrateToLmContent($this->getLongMenuTextValue()));
885 }
setLongMenuTextValue($long_menu_text="")

References ilAssSelfAssessmentMigrator\migrateToLmContent(), and setLongMenuTextValue().

+ Here is the call graph for this function:

◆ loadCorrectAnswerData()

assLongMenu::loadCorrectAnswerData (   $question_id)
private

Definition at line 423 of file class.assLongMenu.php.

423 : void
424 {
425 $res = $this->db->queryF(
426 "SELECT * FROM {$this->getAnswerTableName()} WHERE question_fi = %s ORDER BY gap_number, position ASC",
427 array('integer'),
428 array($question_id)
429 );
430
431 $correct_answers = array();
432 while ($data = $this->ilDB->fetchAssoc($res)) {
433 $correct_answers[$data['gap_number']][0][$data['position']] = rtrim($data['answer_text']);
434 $correct_answers[$data['gap_number']][1] = $data['points'];
435 $correct_answers[$data['gap_number']][2] = $data['type'];
436 }
437 $this->setJsonStructure(json_encode($correct_answers));
439 }
setCorrectAnswers($correct_answers)
setJsonStructure($json_structure)

References $correct_answers, $data, $res, setCorrectAnswers(), and setJsonStructure().

Referenced by getCorrectAnswersAsJson(), and loadFromDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadFromDb()

assLongMenu::loadFromDb (   $question_id)

Definition at line 378 of file class.assLongMenu.php.

378 : void
379 {
380 $result = $this->ilDB->queryF(
381 "SELECT qpl_questions.*, " . $this->getAdditionalTableName() . ".* FROM qpl_questions LEFT JOIN " . $this->getAdditionalTableName() . " ON " . $this->getAdditionalTableName() . ".question_fi = qpl_questions.question_id WHERE qpl_questions.question_id = %s",
382 array("integer"),
383 array($question_id)
384 );
385 if ($result->numRows() == 1) {
386 $data = $this->ilDB->fetchAssoc($result);
387 $this->setId($question_id);
388 $this->setObjId($data["obj_fi"]);
389 $this->setNrOfTries($data['nr_of_tries']);
390 $this->setTitle((string) $data["title"]);
391 $this->setComment((string) $data["description"]);
392 $this->setOriginalId($data["original_id"]);
393 $this->setAuthor($data["author"]);
394 $this->setPoints($data["points"]);
395 $this->setIdenticalScoring($data["identical_scoring"]);
396 $this->setOwner($data["owner"]);
397 include_once("./Services/RTE/classes/class.ilRTE.php");
398 $this->setQuestion(ilRTE::_replaceMediaObjectImageSrc((string) $data['question_text'], 1));
399 $this->setLongMenuTextValue(ilRTE::_replaceMediaObjectImageSrc((string) $data['long_menu_text'], 1));
400 $this->loadCorrectAnswerData($question_id);
401 $this->setMinAutoComplete($data["min_auto_complete"]);
402 if (isset($data['feedback_setting'])) {
403 $this->setSpecificFeedbackSetting((int) $data['feedback_setting']);
404 }
405
406 try {
410 }
411
412 try {
413 $this->setAdditionalContentEditingMode($data['add_cont_edit_mode']);
415 }
416 }
417
418 $this->loadCorrectAnswerData($question_id);
419 $this->createArrayFromFile();
420 parent::loadFromDb($question_id);
421 }
setIdenticalScoring($a_identical_scoring)
setMinAutoComplete($minAutoComplete)
setSpecificFeedbackSetting($specificFeedbackSetting)
setOriginalId(?int $original_id)
setId(int $id=-1)
setAdditionalContentEditingMode(?string $additionalContentEditingMode)
setQuestion(string $question="")
setAuthor(string $author="")
setComment(string $comment="")
setObjId(int $obj_id=0)
setOwner(int $owner=-1)
setNrOfTries(int $a_nr_of_tries)
setLifecycle(ilAssQuestionLifecycle $lifecycle)
setTitle(string $title="")
setPoints(float $points)
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...

References $data, Vendor\Package\$e, ilRTE\_replaceMediaObjectImageSrc(), createArrayFromFile(), getAdditionalTableName(), ilAssQuestionLifecycle\getDraftInstance(), ilAssQuestionLifecycle\getInstance(), loadCorrectAnswerData(), assQuestion\setAdditionalContentEditingMode(), assQuestion\setAuthor(), assQuestion\setComment(), assQuestion\setId(), setIdenticalScoring(), assQuestion\setLifecycle(), setLongMenuTextValue(), setMinAutoComplete(), assQuestion\setNrOfTries(), assQuestion\setObjId(), assQuestion\setOriginalId(), assQuestion\setOwner(), assQuestion\setPoints(), assQuestion\setQuestion(), setSpecificFeedbackSetting(), and assQuestion\setTitle().

+ Here is the call graph for this function:

◆ lookupForExistingSolutions()

assLongMenu::lookupForExistingSolutions ( int  $activeId,
int  $pass 
)

Lookup if an authorized or intermediate solution exists.

Returns
array ['authorized' => bool, 'intermediate' => bool]

Reimplemented from assQuestion.

Definition at line 703 of file class.assLongMenu.php.

703 : array
704 {
705 global $DIC;
706 $ilDB = $DIC['ilDB'];
707
708 $return = array(
709 'authorized' => false,
710 'intermediate' => false
711 );
712
713 $query = "
714 SELECT authorized, COUNT(*) cnt
715 FROM tst_solutions
716 WHERE active_fi = " . $ilDB->quote($activeId, 'integer') . "
717 AND question_fi = " . $ilDB->quote($this->getId(), 'integer') . "
718 AND pass = " . $ilDB->quote($pass, 'integer') . "
719 AND value2 <> '-1'
720 ";
721
722 if ($this->getStep() !== null) {
723 $query .= " AND step = " . $ilDB->quote((int) $this->getStep(), 'integer') . " ";
724 }
725
726 $query .= "
727 GROUP BY authorized
728 ";
729
730 $result = $ilDB->query($query);
731
732 while ($row = $ilDB->fetchAssoc($result)) {
733 if ($row['authorized']) {
734 $return['authorized'] = $row['cnt'] > 0;
735 } else {
736 $return['intermediate'] = $row['cnt'] > 0;
737 }
738 }
739 return $return;
740 }
$query

References $DIC, $ilDB, $query, assQuestion\getId(), and assQuestion\getStep().

+ Here is the call graph for this function:

◆ saveAdditionalQuestionDataToDb()

assLongMenu::saveAdditionalQuestionDataToDb ( )

Saves a record to the question types additional data table.

Returns
mixed

Implements ilObjQuestionScoringAdjustable.

Definition at line 261 of file class.assLongMenu.php.

262 {
263 // save additional data
264 $this->ilDB->manipulateF(
265 "DELETE FROM " . $this->getAdditionalTableName() . " WHERE question_fi = %s",
266 array( "integer" ),
267 array( $this->getId() )
268 );
269 $this->ilDB->manipulateF(
270 "INSERT INTO " . $this->getAdditionalTableName(
271 ) . " (question_fi, long_menu_text, feedback_setting, min_auto_complete, identical_scoring) VALUES (%s, %s, %s, %s, %s)",
272 array( "integer", "text", "integer", "integer", "integer"),
273 array(
274 $this->getId(),
275 $this->getLongMenuTextValue(),
277 $this->getMinAutoComplete(),
278 $this->getIdenticalScoring()
279 )
280 );
281
282 $this->createFileFromArray();
283 }

References createFileFromArray(), getAdditionalTableName(), assQuestion\getId(), getIdenticalScoring(), getLongMenuTextValue(), getMinAutoComplete(), and getSpecificFeedbackSetting().

Referenced by saveToDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveAnswerSpecificDataToDb()

assLongMenu::saveAnswerSpecificDataToDb ( )

Definition at line 285 of file class.assLongMenu.php.

285 : void
286 {
287 $this->clearAnswerSpecificDataFromDb($this->getId());
288 $type_array = $this->getAnswerType();
289 $points = 0;
290 foreach ($this->getCorrectAnswers() as $gap_number => $gap) {
291 foreach ($gap[0] as $position => $answer) {
292 if ($type_array == null) {
293 $type = $gap[2];
294 } else {
295 $type = $type_array[$gap_number];
296 }
297 $this->db->replace(
298 $this->getAnswerTableName(),
299 array(
300 'question_fi' => array('integer', $this->getId()),
301 'gap_number' => array('integer', (int) $gap_number),
302 'position' => array('integer', (int) $position)
303 ),
304 array(
305 'answer_text' => array('text', $answer),
306 'points' => array('float', (float) str_replace(',', '.', $gap[1])),
307 'type' => array('integer', (int) $type)
308 )
309 );
310 }
311 $points += (float) str_replace(',', '.', $gap[1]);
312 }
313 $this->setPoints($points);
314 }
clearAnswerSpecificDataFromDb($question_id)
$type

References assQuestion\$points, $type, clearAnswerSpecificDataFromDb(), getAnswerTableName(), getAnswerType(), getCorrectAnswers(), assQuestion\getId(), and assQuestion\setPoints().

Referenced by saveToDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ savePreviewData()

assLongMenu::savePreviewData ( ilAssQuestionPreviewSession  $previewSession)
protected

Reimplemented from assQuestion.

Definition at line 756 of file class.assLongMenu.php.

756 : void
757 {
758 $answer = $_POST['answer'] ?? null;
759 if (is_array($answer)) {
760 $answer = array_map(function ($value) {
761 return trim($value);
762 }, $answer);
763 }
764 $previewSession->setParticipantsSolution($answer);
765 }

References ilAssQuestionPreviewSession\setParticipantsSolution().

+ Here is the call graph for this function:

◆ saveToDb()

assLongMenu::saveToDb ( int  $original_id = -1)

Definition at line 181 of file class.assLongMenu.php.

181 : void
182 {
186 parent::saveToDb();
187 }
saveAdditionalQuestionDataToDb()
Saves a record to the question types additional data table.
saveQuestionDataToDb(int $original_id=-1)

References assQuestion\$original_id, saveAdditionalQuestionDataToDb(), saveAnswerSpecificDataToDb(), and assQuestion\saveQuestionDataToDb().

+ Here is the call graph for this function:

◆ saveWorkingData()

assLongMenu::saveWorkingData ( int  $active_id,
int  $pass = null,
bool  $authorized = true 
)

Saves the learners input of the question to the database.

Parameters
int$active_idActive id of the user
int$passTest pass
bool$authorized
Returns
bool $status

Reimplemented from assQuestion.

Definition at line 655 of file class.assLongMenu.php.

655 : bool
656 {
657 if (is_null($pass)) {
658 include_once "./Modules/Test/classes/class.ilObjTest.php";
659 $pass = ilObjTest::_getPass($active_id);
660 }
661
662 $entered_values = 0;
663
664 $this->getProcessLocker()->executeUserSolutionUpdateLockOperation(function () use (&$entered_values, $active_id, $pass, $authorized) {
665 $this->removeCurrentSolution($active_id, $pass, $authorized);
666
667 foreach ($this->getSolutionSubmit() as $val1 => $val2) {
668 $value = ilUtil::stripSlashes(trim($val2), false);
669 if (strlen($value)) {
670 $this->saveCurrentSolution($active_id, $pass, $val1, $value, $authorized);
671 $entered_values++;
672 }
673 }
674 });
675
676 if ($entered_values) {
677 include_once("./Modules/Test/classes/class.ilObjAssessmentFolder.php");
679 assQuestion::logAction($this->lng->txtlng(
680 "assessment",
681 "log_user_entered_values",
683 ), $active_id, $this->getId());
684 }
685 } else {
686 include_once("./Modules/Test/classes/class.ilObjAssessmentFolder.php");
688 assQuestion::logAction($this->lng->txtlng(
689 "assessment",
690 "log_user_not_entered_values",
692 ), $active_id, $this->getId());
693 }
694 }
695 return true;
696 }
static logAction(string $logtext, int $active_id, int $question_id)
saveCurrentSolution(int $active_id, int $pass, $value1, $value2, bool $authorized=true, $tstamp=0)
removeCurrentSolution(int $active_id, int $pass, bool $authorized=true)
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), ilObjTest\_getPass(), assQuestion\getProcessLocker(), getSolutionSubmit(), ILIAS\Repository\lng(), assQuestion\logAction(), assQuestion\removeCurrentSolution(), assQuestion\saveCurrentSolution(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setAnswers()

assLongMenu::setAnswers (   $answers)

Definition at line 121 of file class.assLongMenu.php.

121 : void
122 {
123 $this->answers = $answers;
124 }

References $answers.

Referenced by createArrayFromFile().

+ Here is the caller graph for this function:

◆ setAnswerType()

assLongMenu::setAnswerType (   $answerType)
Parameters
mixed$answerType

Definition at line 72 of file class.assLongMenu.php.

72 : void
73 {
74 $this->answerType = $answerType;
75 }

References $answerType.

◆ setCorrectAnswers()

assLongMenu::setCorrectAnswers (   $correct_answers)

Definition at line 86 of file class.assLongMenu.php.

86 : void
87 {
88 $this->correct_answers = $correct_answers;
89 }

References $correct_answers.

Referenced by loadCorrectAnswerData().

+ Here is the caller graph for this function:

◆ setExportDetailsXLS()

assLongMenu::setExportDetailsXLS ( ilAssExcelFormatHelper  $worksheet,
int  $startrow,
int  $active_id,
int  $pass 
)

{}

Reimplemented from assQuestion.

Definition at line 794 of file class.assLongMenu.php.

794 : int
795 {
796 parent::setExportDetailsXLS($worksheet, $startrow, $active_id, $pass);
797
798 $solution = $this->getSolutionValues($active_id, $pass);
799
800 $i = 1;
801 foreach ($this->getCorrectAnswers() as $gap_index => $gap) {
802 $worksheet->setCell($startrow + $i, 0, $this->lng->txt('assLongMenu') . " $i");
803 $worksheet->setBold($worksheet->getColumnCoord(0) . ($startrow + $i));
804 foreach ($solution as $solutionvalue) {
805 if ($gap_index == $solutionvalue["value1"]) {
806 switch ($gap[2]) {
808 $value = $solutionvalue["value2"];
809 if ($value == -1) {
810 $value = '';
811 }
812 $worksheet->setCell($startrow + $i, 2, $value);
813 break;
815 $worksheet->setCell($startrow + $i, 2, $solutionvalue["value2"]);
816 break;
817 }
818 }
819 }
820 $i++;
821 }
822
823 return $startrow + $i + 1;
824 }
const ANSWER_TYPE_TEXT_VAL
const ANSWER_TYPE_SELECT_VAL
getSolutionValues($active_id, $pass=null, bool $authorized=true)
Loads solutions of a given user from the database an returns it.
setCell($a_row, $a_col, $a_value, $datatype=null)
setBold(string $a_coords)
Set cell(s) to bold.
getColumnCoord(int $a_col)
Get column "name" from number.
$i
Definition: metadata.php:41

References $i, ANSWER_TYPE_SELECT_VAL, ANSWER_TYPE_TEXT_VAL, ilExcel\getColumnCoord(), getCorrectAnswers(), assQuestion\getSolutionValues(), ILIAS\Repository\lng(), ilExcel\setBold(), and ilAssExcelFormatHelper\setCell().

+ Here is the call graph for this function:

◆ setIdenticalScoring()

assLongMenu::setIdenticalScoring (   $a_identical_scoring)
Parameters
$a_identical_scoring

Definition at line 922 of file class.assLongMenu.php.

922 : void
923 {
924 $this->identical_scoring = ($a_identical_scoring) ? 1 : 0;
925 }

Referenced by loadFromDb().

+ Here is the caller graph for this function:

◆ setJsonStructure()

assLongMenu::setJsonStructure (   $json_structure)
Parameters
mixed$json_structure

Definition at line 142 of file class.assLongMenu.php.

142 : void
143 {
144 $this->json_structure = $json_structure;
145 }

References $json_structure.

Referenced by loadCorrectAnswerData().

+ Here is the caller graph for this function:

◆ setLongMenuTextValue()

assLongMenu::setLongMenuTextValue (   $long_menu_text = "")

Definition at line 111 of file class.assLongMenu.php.

111 : void
112 {
113 $this->long_menu_text = $this->getHtmlQuestionContentPurifier()->purify($long_menu_text);
114 }

References $long_menu_text, and assQuestion\getHtmlQuestionContentPurifier().

Referenced by lmMigrateQuestionTypeSpecificContent(), and loadFromDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMinAutoComplete()

assLongMenu::setMinAutoComplete (   $minAutoComplete)

Definition at line 157 of file class.assLongMenu.php.

157 : void
158 {
159 $this->minAutoComplete = $minAutoComplete;
160 }

References $minAutoComplete.

Referenced by loadFromDb().

+ Here is the caller graph for this function:

◆ setSpecificFeedbackSetting()

assLongMenu::setSpecificFeedbackSetting (   $specificFeedbackSetting)

Definition at line 147 of file class.assLongMenu.php.

147 : void
148 {
149 $this->specificFeedbackSetting = $specificFeedbackSetting;
150 }

References $specificFeedbackSetting.

Referenced by loadFromDb().

+ Here is the caller graph for this function:

◆ toJSON()

assLongMenu::toJSON ( )

Returns a JSON representation of the question.

Reimplemented from assQuestion.

Definition at line 890 of file class.assLongMenu.php.

890 : string
891 {
892 include_once("./Services/RTE/classes/class.ilRTE.php");
893 $result = array();
894 $result['id'] = $this->getId();
895 $result['type'] = (string) $this->getQuestionType();
896 $result['title'] = $this->getTitleForHTMLOutput();
897 $replaced_quesiton_text = $this->getLongMenuTextValue();
898 $result['question'] = $this->formatSAQuestion($this->getQuestion());
899 $result['lmtext'] = $this->formatSAQuestion($replaced_quesiton_text);
900 $result['nr_of_tries'] = $this->getNrOfTries();
901 $result['shuffle'] = $this->getShuffle();
902 $result['feedback'] = array(
903 'onenotcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), false)),
904 'allcorrect' => $this->formatSAQuestion($this->feedbackOBJ->getGenericFeedbackTestPresentation($this->getId(), true))
905 );
906
907 $mobs = ilObjMediaObject::_getMobsOfObject("qpl:html", $this->getId());
908 $result['answers'] = $this->getAnswers();
909 $result['correct_answers'] = $this->getCorrectAnswers();
910 $result['mobs'] = $mobs;
911 return json_encode($result);
912 }
getQuestionType()
Returns the question type of the question.
static _getMobsOfObject(string $a_type, int $a_id, int $a_usage_hist_nr=0, string $a_lang="-")
$mobs
Definition: imgupload.php:70

References $mobs, ilObjMediaObject\_getMobsOfObject(), assQuestion\formatSAQuestion(), getAnswers(), getCorrectAnswers(), assQuestion\getId(), getLongMenuTextValue(), assQuestion\getNrOfTries(), assQuestion\getQuestion(), getQuestionType(), assQuestion\getShuffle(), and assQuestion\getTitleForHTMLOutput().

+ Here is the call graph for this function:

Field Documentation

◆ $answers

assLongMenu::$answers = []
private

◆ $answerType

assLongMenu::$answerType
private

Definition at line 23 of file class.assLongMenu.php.

Referenced by getAnswerType(), and setAnswerType().

◆ $correct_answers

◆ $identical_scoring

assLongMenu::$identical_scoring
private

Definition at line 29 of file class.assLongMenu.php.

◆ $ilDB

assLongMenu::$ilDB
private

Definition at line 26 of file class.assLongMenu.php.

Referenced by lookupForExistingSolutions().

◆ $json_structure

assLongMenu::$json_structure
private

Definition at line 25 of file class.assLongMenu.php.

Referenced by getJsonStructure(), and setJsonStructure().

◆ $long_menu_text

assLongMenu::$long_menu_text
private

Definition at line 24 of file class.assLongMenu.php.

Referenced by getLongMenuTextValue(), and setLongMenuTextValue().

◆ $minAutoComplete

assLongMenu::$minAutoComplete
private

Definition at line 28 of file class.assLongMenu.php.

Referenced by setMinAutoComplete().

◆ $specificFeedbackSetting

assLongMenu::$specificFeedbackSetting
private

Definition at line 27 of file class.assLongMenu.php.

Referenced by getSpecificFeedbackSetting(), and setSpecificFeedbackSetting().

◆ ANSWER_TYPE_SELECT_VAL

const assLongMenu::ANSWER_TYPE_SELECT_VAL = 0

◆ ANSWER_TYPE_TEXT_VAL

const assLongMenu::ANSWER_TYPE_TEXT_VAL = 1

◆ GAP_PLACEHOLDER

◆ HAS_SPECIFIC_FEEDBACK

const assLongMenu::HAS_SPECIFIC_FEEDBACK = false
protected

Definition at line 37 of file class.assLongMenu.php.

◆ MAX_INPUT_FIELDS

const assLongMenu::MAX_INPUT_FIELDS = 500

◆ MIN_LENGTH_AUTOCOMPLETE

const assLongMenu::MIN_LENGTH_AUTOCOMPLETE = 3

The documentation for this class was generated from the following file: