ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
|
Class for matching questions. More...
Public Member Functions | |
__construct ( $title="", $comment="", $author="", $owner=-1, $question="", $matching_type=self::MT_TERMS_DEFINITIONS) | |
assMatchingQuestion constructor More... | |
getShuffleMode () | |
setShuffleMode (int $shuffle) | |
isComplete () | |
saveToDb (?int $original_id=null) | |
saveAnswerSpecificDataToDb () | |
Saves the answer specific records into a question types answer table. More... | |
saveAdditionalQuestionDataToDb () | |
Saves a record to the question types additional data table. More... | |
loadFromDb ($question_id) | |
Loads a assMatchingQuestion object from a database. More... | |
insertMatchingPair ($position, $term=null, $definition=null, $points=0.0) | |
Inserts a matching pair for an matching choice question. More... | |
addMatchingPair (?assAnswerMatchingTerm $term=null, ?assAnswerMatchingDefinition $definition=null, $points=0.0) | |
Adds an matching pair for an matching choice question. More... | |
getTermWithIdentifier ($a_identifier) | |
Returns a term with a given identifier. More... | |
getDefinitionWithIdentifier ($a_identifier) | |
Returns a definition with a given identifier. More... | |
getMatchingPair ($index=0) | |
Returns a matching pair with a given index. More... | |
deleteMatchingPair ($index=0) | |
Deletes a matching pair with a given index. More... | |
flushMatchingPairs () | |
Deletes all matching pairs. More... | |
withMatchingPairs (array $pairs) | |
getMatchingPairCount () | |
Returns the number of matching pairs. More... | |
getTerms () | |
Returns the terms of the matching question. More... | |
getDefinitions () | |
Returns the definitions of the matching question. More... | |
getTermCount () | |
Returns the number of terms. More... | |
getDefinitionCount () | |
Returns the number of definitions. More... | |
addTerm (assAnswerMatchingTerm $term) | |
addDefinition ($definition) | |
Adds a definition. More... | |
insertTerm ($position, ?assAnswerMatchingTerm $term=null) | |
Inserts a term. More... | |
insertDefinition ($position, ?assAnswerMatchingDefinition $definition=null) | |
Inserts a definition. More... | |
flushTerms () | |
Deletes all terms. More... | |
flushDefinitions () | |
Deletes all definitions. More... | |
deleteTerm ($position) | |
Deletes a term. More... | |
deleteDefinition ($position) | |
Deletes a definition. More... | |
setTerm ($term, $index) | |
Sets a specific term. More... | |
calculateReachedPoints (int $active_id, ?int $pass=null, bool $authorized_solution=true) | |
getMaximumPoints () | |
Calculates and Returns the maximum points, a learner can reach answering the question. More... | |
getMaximumScoringMatchingPairs () | |
fetchIndexedValuesFromValuePairs (array $valuePairs) | |
getEncryptedFilename ($filename) | |
Returns the encrypted save filename of a matching picture Images are saved with an encrypted filename to prevent users from cheating by guessing the solution from the image filename. More... | |
removeTermImage ($index) | |
removeDefinitionImage ($index) | |
deleteImagefile (string $filename) | |
Deletes an imagefile from the system if the file is deleted manually. More... | |
setImageFile (string $image_tempfilename, string $image_filename, string $previous_filename='') | |
saveWorkingData (int $active_id, ?int $pass=null, bool $authorized=true) | |
getRandomId () | |
setShuffle ($shuffle=true) | |
getQuestionType () | |
Returns the question type of the question. More... | |
getAdditionalTableName () | |
getAnswerTableName () | |
getRTETextWithMediaObjects () | |
Collects all text in the question which could contain media objects which were created with the Rich Text Editor. More... | |
getMatchingPairs () | |
Returns the matchingpairs array. More... | |
getThumbGeometry () | |
Get the thumbnail geometry. More... | |
getThumbSize () | |
Get the thumbnail geometry. More... | |
setThumbGeometry (int $a_geometry) | |
Set the thumbnail geometry. More... | |
rebuildThumbnails () | |
Rebuild the thumbnail images with a new thumbnail size. More... | |
getThumbPrefix () | |
toJSON () | |
Returns a JSON representation of the question. More... | |
setMatchingMode (string $matching_mode) | |
getMatchingMode () | |
getOperators (string $expression) | |
Get all available operations for a specific question. More... | |
getExpressionTypes () | |
Get all available expression types for a specific question. More... | |
getUserQuestionResult (int $active_id, int $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... | |
toLog (AdditionalInformationGenerator $additional_info) | |
MUST return an array of the question settings that can be stored in the log. More... | |
solutionValuesToText (array $solution_values) | |
MUST convert the given solution values into text. More... | |
getCorrectSolutionForTextOutput (int $active_id, int $pass) | |
![]() | |
getQuestionType () | |
isComplete () | |
saveWorkingData (int $active_id, ?int $pass=null, bool $authorized=true) | |
calculateReachedPoints (int $active_id, ?int $pass=null, bool $authorized_solution=true) | |
getAdditionalTableName () | |
getAnswerTableName () | |
toLog (AdditionalInformationGenerator $additional_info) | |
MUST return an array of the question settings that can be stored in the log. More... | |
getCurrentUser () | |
getShuffler () | |
setShuffler (Transformation $shuffler) | |
setProcessLocker (ilAssQuestionProcessLocker $processLocker) | |
getProcessLocker () | |
fromXML (string $importdirectory, int $user_id, ilQTIItem $item, int $questionpool_id, ?int $tst_id, ?ilObject &$tst_object, int &$question_counter, array $import_mapping) | |
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... | |
setTitle (string $title="") | |
setId (int $id=-1) | |
setTestId (int $id=-1) | |
setComment (string $comment="") | |
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 () | |
getAuthor () | |
getAuthorForHTMLOutput () | |
getOwner () | |
getObjId () | |
setObjId (int $obj_id=0) | |
getLifecycle () | |
setLifecycle (ilAssQuestionLifecycle $lifecycle) | |
setExternalId (?string $external_id) | |
getExternalId () | |
getSuggestedSolutionOutput () | |
getSuggestedSolutions () | |
getReachedPoints (int $active_id, int $pass) | |
getMaximumPoints () | |
getAdjustedReachedPoints (int $active_id, int $pass, bool $authorized_solution=true) | |
calculateResultsFromSolution (int $active_id, int $pass) | |
Calculates the question results from a previously saved question solution. More... | |
persistWorkingState (int $active_id, $pass, bool $authorized=true) | |
persists the working state for current testactive and testpass More... | |
persistPreviewState (ilAssQuestionPreviewSession $preview_session) | |
persists the preview state for current user and question More... | |
validateSolutionSubmit () | |
getSuggestedSolutionPath () | |
getImagePath ($question_id=null, $object_id=null) | |
Returns the image path for web accessable images 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, ?int $pass=null) | |
getSolutionValues (int $active_id, ?int $pass=null, bool $authorized=true) | |
Loads solutions of a given user from the database an returns it. More... | |
deleteAnswers (int $question_id) | |
deleteAdditionalTableData (int $question_id) | |
delete (int $question_id) | |
getTotalAnswers () | |
cloneXHTMLMediaObjectsOfQuestion (int $source_question_id) | |
createPageObject () | |
clonePageOfQuestion (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=null) | |
duplicate (bool $for_test=true, string $title='', string $author='', int $owner=-1, $test_obj_id=null) | |
copyObject (int $target_parent_id, string $title='') | |
createNewOriginalFromThisDuplicate (int $target_parent_id, string $target_question_title='') | |
saveToDb (?int $original_id=null) | |
deleteSuggestedSolutions () | |
getSuggestedSolution (int $subquestion_index=0) | |
resolveInternalLink (string $internal_link) | |
resolveSuggestedSolutionLinks () | |
getInternalLinkHref (string $target) | |
syncWithOriginal () | |
getPoints () | |
setPoints (float $points) | |
getSolutionMaxPass (int $active_id) | |
isWriteable () | |
calculateReachedPointsFromPreviewSession (ilAssQuestionPreviewSession $preview_session) | |
isPreviewSolutionCorrect (ilAssQuestionPreviewSession $preview_session) | |
adjustReachedPointsByScoringOptions (float $points, int $active_id) | |
Adjust the given reached points by checks for all special scoring options in the test container. More... | |
buildHashedImageFilename (string $plain_image_filename, bool $unique=false) | |
getQuestion () | |
getQuestionForHTMLOutput () | |
setQuestion (string $question="") | |
getQuestionTypeID () | |
cleanupMediaObjectUsage () | |
getInstances () | |
getActiveUserData (int $active_id) | |
Returns the user id and the test id for a given active id. More... | |
hasSpecificFeedback () | |
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) | |
isAnswered (int $active_id, int $pass) | |
getAdditionalContentEditingMode () | |
setAdditionalContentEditingMode (?string $additionalContentEditingMode) | |
isAdditionalContentEditingModePageObject () | |
isValidAdditionalContentEditingMode (string $additionalContentEditingMode) | |
getValidAdditionalContentEditingModes () | |
getHtmlUserSolutionPurifier () | |
getHtmlQuestionContentPurifier () | |
setLastChange (int $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 () | |
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 $value_pairs) | |
updateTimestamp () | |
getTestPresentationConfig () | |
hasWritableOriginalInQuestionPool () | |
answerToParticipantInteraction (AdditionalInformationGenerator $additional_info, int $test_ref_id, int $active_id, int $pass, string $source_ip, TestParticipantInteractionTypes $interaction_type) | |
toQuestionAdministrationInteraction (AdditionalInformationGenerator $additional_info, int $test_ref_id, TestQuestionAdministrationInteractionTypes $interaction_type) | |
getSolutionForTextOutput (int $active_id, int $pass) | |
getCorrectSolutionForTextOutput (int $active_id, int $pass) | |
getVariablesAsTextArray (int $active_id, int $pass) | |
validateSolutionSubmit () | |
toLog (AdditionalInformationGenerator $additional_info) | |
answerToParticipantInteraction (AdditionalInformationGenerator $additional_info, int $test_id, int $active_id, int $pass, string $source_ip, TestParticipantInteractionTypes $interaction_type) | |
toQuestionAdministrationInteraction (AdditionalInformationGenerator $additional_info, int $test_id, TestQuestionAdministrationInteractionTypes $interaction_type) | |
saveAdditionalQuestionDataToDb () | |
Saves a record to the question types additional data table. More... | |
saveAnswerSpecificDataToDb () | |
Saves the answer specific records into a question types answer table. More... | |
![]() | |
getOperators (string $expression) | |
Get all available operations for a specific question. More... | |
getExpressionTypes () | |
Get all available expression types for a specific question. More... | |
getUserQuestionResult (int $active_id, int $pass) | |
Get the user solution for a question by active_id and the test pass. More... | |
getAvailableAnswerOptions (?int $index=null) | |
If index is null, the function returns an array with all anwser options else it returns the specific answer option. More... | |
toJSON () | |
Protected Member Functions | |
cloneQuestionTypeSpecificProperties (\assQuestion $target) | |
savePreviewData (ilAssQuestionPreviewSession $previewSession) | |
generateThumbForFile ($path, $file) | |
calculateReachedPointsForSolution (?array $found_values) | |
afterSyncWithOriginal (int $original_question_id, int $clone_question_id, int $original_parent_id, int $clone_parent_id) | |
{} More... | |
createMatchingTerm (string $term='', string $picture='', int $identifier=0) | |
createMatchingDefinition (string $term='', string $picture='', int $identifier=0) | |
createMatchingPair (?assAnswerMatchingTerm $term=null, ?assAnswerMatchingDefinition $definition=null, float $points=0.0) | |
solutionValuesToLog (AdditionalInformationGenerator $additional_info, array $solution_values) | |
MUST convert the given solution values into an array or a string that can be stored in the log. More... | |
![]() | |
solutionValuesToLog (AdditionalInformationGenerator $additional_info, array $solution_values) | |
MUST convert the given solution values into an array or a string that can be stored in the log. More... | |
solutionValuesToText (array $solution_values) | |
MUST convert the given solution values into text. More... | |
getQuestionAction () | |
isNonEmptyItemListPostSubmission (string $post_submission_field_name) | |
savePreviewData (ilAssQuestionPreviewSession $preview_session) | |
deletePageOfQuestion (int $question_id) | |
cloneQuestionTypeSpecificProperties (self $target) | |
removeAllImageFiles (string $image_target_path) | |
onDuplicate (int $original_parent_id, int $original_question_id, int $duplicate_parent_id, int $duplicate_question_id) | |
afterSyncWithOriginal (int $original_question_id, int $clone_question_id, int $original_parent_id, int $clone_parent_id) | |
onCopy (int $sourceParentId, int $sourceQuestionId, int $targetParentId, int $targetQuestionId) | |
duplicateComments (int $parent_source_id, int $source_id, int $parent_target_id, int $target_id) | |
deleteComments () | |
getNotesManager () | |
getNotesDataService () | |
getNotesRepo () | |
cloneSuggestedSolutions (int $source_question_id, int $target_question_id) | |
duplicateSuggestedSolutionFiles (int $parent_id, int $question_id) | |
Duplicates the files of a suggested solution if the question is duplicated. More... | |
cloneSuggestedSolutionFiles (int $source_question_id, int $target_question_id) | |
copySuggestedSolutions (int $target_question_id) | |
ensureNonNegativePoints (float $points) | |
purifyAndPrepareTextAreaOutput (string $content) | |
getRTETextWithMediaObjects () | |
getSelfAssessmentFormatter () | |
lmMigrateQuestionTypeGenericContent (ilAssSelfAssessmentMigrator $migrator) | |
lmMigrateQuestionTypeSpecificContent (ilAssSelfAssessmentMigrator $migrator) | |
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 () | |
getSuggestedSolutionsRepo () | |
loadSuggestedSolutions () | |
answerToLog (AdditionalInformationGenerator $additional_info, int $active_id, int $pass) | |
Private Member Functions | |
cloneImages (int $source_question_id, int $source_parent_id, int $target_question_id, int $target_parent_id) | |
getPositiveScoredMatchingPairs () | |
getMostPositiveScoredUniqueTermMatchingPairs () | |
checkSubmittedMatchings (array $submitted_matchings) | |
Private Attributes | |
int | $shufflemode = 0 |
RandomGroup | $randomGroup |
Additional Inherited Members | |
![]() | |
static | setForcePassResultUpdateEnabled (bool $force_pass_results_update_enabled) |
static | isForcePassResultUpdateEnabled () |
static | _getSuggestedSolutionOutput (int $question_id) |
static | _getReachedPoints (int $active_id, int $question_id, int $pass) |
static | isFileAvailable (string $file) |
static | saveOriginalId (int $questionId, int $originalId) |
static | resetOriginalId (int $questionId) |
static | instantiateQuestion (int $question_id) |
static | _getSolutionMaxPass (int $question_id, int $active_id) |
Returns the maximum pass a users question solution. More... | |
static | getFeedbackClassNameByQuestionType (string $questionType) |
static | _questionExistsInTest (int $question_id, int $test_id) |
static | lookupParentObjId (int $question_id) |
static | implodeKeyValues (array $keyValues) |
static | explodeKeyValues (string $keyValues) |
static | convertISO8601FormatH_i_s_ExtendedToSeconds (string $time) |
static | extendedTrim (string $value) |
Trim non-printable characters from the beginning and end of a string. More... | |
![]() | |
static | getNumExistingSolutionRecords (int $activeId, int $pass, int $questionId) |
![]() | |
static | $force_pass_results_update_enabled = false |
static | $imageSourceFixReplaceMap |
Class for matching questions.
assMatchingQuestion is a class for matching questions.
Definition at line 40 of file class.assMatchingQuestion.php.
assMatchingQuestion::__construct | ( | $title = "" , |
|
$comment = "" , |
|||
$author = "" , |
|||
$owner = -1 , |
|||
$question = "" , |
|||
$matching_type = self::MT_TERMS_DEFINITIONS |
|||
) |
assMatchingQuestion constructor
The constructor takes possible arguments an creates an instance of the assMatchingQuestion object.
string | $title | A title string to describe the question |
string | $comment | A comment string to describe the question |
string | $author | A string containing the name of the questions author |
integer | $owner | A numerical ID to identify the owner/creator |
string | $question | The question string of the matching question |
int | $matching_type |
Definition at line 87 of file class.assMatchingQuestion.php.
References assQuestion\$author, assQuestion\$comment, $DIC, $matching_type, assQuestion\$owner, assQuestion\$question, assQuestion\$title, and ILIAS\GlobalScreen\Provider\__construct().
assMatchingQuestion::addDefinition | ( | $definition | ) |
Adds a definition.
object | $definition | The definition |
Definition at line 584 of file class.assMatchingQuestion.php.
assMatchingQuestion::addMatchingPair | ( | ?assAnswerMatchingTerm | $term = null , |
?assAnswerMatchingDefinition | $definition = null , |
||
$points = 0.0 |
|||
) |
Adds an matching pair for an matching choice question.
The students have to fill in an order for the matching pair. The matching pair is an ASS_AnswerMatching object that will be created and assigned to the array $this->matchingpairs.
assAnswerMatchingTerm | null | $term | A matching term |
assAnswerMatchingDefinition | null | $definition | A matching definition |
float | $points | The points for selecting the matching pair, incl. negative. |
Definition at line 422 of file class.assMatchingQuestion.php.
assMatchingQuestion::addTerm | ( | assAnswerMatchingTerm | $term | ) |
Definition at line 573 of file class.assMatchingQuestion.php.
|
protected |
{}
Reimplemented from assQuestion.
Definition at line 1309 of file class.assMatchingQuestion.php.
assMatchingQuestion::calculateReachedPoints | ( | int | $active_id, |
?int | $pass = null , |
||
bool | $authorized_solution = true |
||
) |
Reimplemented from assQuestion.
Definition at line 683 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 1194 of file class.assMatchingQuestion.php.
|
private |
Definition at line 887 of file class.assMatchingQuestion.php.
References ILIAS\Repository\lng().
|
private |
Definition at line 330 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 323 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 1331 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
|
protected |
Definition at line 1335 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
|
protected |
Definition at line 1327 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
assMatchingQuestion::deleteDefinition | ( | $position | ) |
Deletes a definition.
integer | $position | The position of the definition in the definition array |
Definition at line 665 of file class.assMatchingQuestion.php.
assMatchingQuestion::deleteImagefile | ( | string | $filename | ) |
Deletes an imagefile from the system if the file is deleted manually.
string | $filename | Image file filename |
Definition at line 832 of file class.assMatchingQuestion.php.
References Vendor\Package\$e, and $filename.
assMatchingQuestion::deleteMatchingPair | ( | $index = 0 | ) |
Deletes a matching pair with a given index.
The index of the first matching pair is 0, the index of the second matching pair is 1 and so on.
integer | $index | A nonnegative index of the n-th matching pair |
Definition at line 483 of file class.assMatchingQuestion.php.
assMatchingQuestion::deleteTerm | ( | $position | ) |
Deletes a term.
string | $term_id | The id of the term to delete |
Definition at line 653 of file class.assMatchingQuestion.php.
assMatchingQuestion::fetchIndexedValuesFromValuePairs | ( | array | $valuePairs | ) |
array | $valuePairs |
Reimplemented from assQuestion.
Definition at line 775 of file class.assMatchingQuestion.php.
assMatchingQuestion::flushDefinitions | ( | ) |
Deletes all definitions.
Definition at line 642 of file class.assMatchingQuestion.php.
assMatchingQuestion::flushMatchingPairs | ( | ) |
Deletes all matching pairs.
Definition at line 502 of file class.assMatchingQuestion.php.
assMatchingQuestion::flushTerms | ( | ) |
Deletes all terms.
Definition at line 633 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 1087 of file class.assMatchingQuestion.php.
References $filename, $path, and ilShellUtil\convertImage().
assMatchingQuestion::getAdditionalTableName | ( | ) |
Reimplemented from assQuestion.
Definition at line 983 of file class.assMatchingQuestion.php.
Referenced by saveAdditionalQuestionDataToDb().
assMatchingQuestion::getAnswerTableName | ( | ) |
Reimplemented from assQuestion.
Definition at line 988 of file class.assMatchingQuestion.php.
assMatchingQuestion::getAvailableAnswerOptions | ( | $index = null | ) |
If index is null, the function returns an array with all anwser options Else it returns the specific answer option.
null | int | $index |
Definition at line 1297 of file class.assMatchingQuestion.php.
assMatchingQuestion::getCorrectSolutionForTextOutput | ( | int | $active_id, |
int | $pass | ||
) |
Reimplemented from assQuestion.
Definition at line 1418 of file class.assMatchingQuestion.php.
References assAnswerMatchingPair\getDefinition(), and assAnswerMatchingPair\getTerm().
assMatchingQuestion::getDefinitionCount | ( | ) |
Returns the number of definitions.
Definition at line 568 of file class.assMatchingQuestion.php.
assMatchingQuestion::getDefinitions | ( | ) |
Returns the definitions of the matching question.
Definition at line 546 of file class.assMatchingQuestion.php.
assMatchingQuestion::getDefinitionWithIdentifier | ( | $a_identifier | ) |
Returns a definition with a given identifier.
Definition at line 444 of file class.assMatchingQuestion.php.
assMatchingQuestion::getEncryptedFilename | ( | $filename | ) |
Returns the encrypted save filename of a matching picture Images are saved with an encrypted filename to prevent users from cheating by guessing the solution from the image filename.
string | $filename | Original filename |
Definition at line 798 of file class.assMatchingQuestion.php.
References $filename.
assMatchingQuestion::getExpressionTypes | ( | ) |
Get all available expression types for a specific question.
Implements iQuestionCondition.
Definition at line 1221 of file class.assMatchingQuestion.php.
References iQuestionCondition\EmptyAnswerExpression, iQuestionCondition\MatchingResultExpression, iQuestionCondition\NumericResultExpression, and iQuestionCondition\PercentageResultExpression.
assMatchingQuestion::getMatchingMode | ( | ) |
Definition at line 1189 of file class.assMatchingQuestion.php.
Referenced by saveAdditionalQuestionDataToDb().
assMatchingQuestion::getMatchingPair | ( | $index = 0 | ) |
Returns a matching pair with a given index.
The index of the first matching pair is 0, the index of the second matching pair is 1 and so on.
integer | $index | A nonnegative index of the n-th matching pair |
Definition at line 462 of file class.assMatchingQuestion.php.
assMatchingQuestion::getMatchingPairCount | ( | ) |
Returns the number of matching pairs.
Definition at line 524 of file class.assMatchingQuestion.php.
assMatchingQuestion::getMatchingPairs | ( | ) |
Returns the matchingpairs array.
Definition at line 1005 of file class.assMatchingQuestion.php.
Referenced by saveAnswerSpecificDataToDb().
assMatchingQuestion::getMaximumPoints | ( | ) |
Calculates and Returns the maximum points, a learner can reach answering the question.
Reimplemented from assQuestion.
Definition at line 713 of file class.assMatchingQuestion.php.
Referenced by isComplete().
assMatchingQuestion::getMaximumScoringMatchingPairs | ( | ) |
Definition at line 724 of file class.assMatchingQuestion.php.
|
private |
Definition at line 750 of file class.assMatchingQuestion.php.
assMatchingQuestion::getOperators | ( | string | $expression | ) |
Get all available operations for a specific question.
$expression |
Implements iQuestionCondition.
Definition at line 1216 of file class.assMatchingQuestion.php.
References ilOperatorsExpressionMapping\getOperatorsByExpression().
|
private |
Definition at line 735 of file class.assMatchingQuestion.php.
assMatchingQuestion::getQuestionType | ( | ) |
Returns the question type of the question.
Reimplemented from assQuestion.
Definition at line 978 of file class.assMatchingQuestion.php.
assMatchingQuestion::getRandomId | ( | ) |
Definition at line 951 of file class.assMatchingQuestion.php.
assMatchingQuestion::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 997 of file class.assMatchingQuestion.php.
assMatchingQuestion::getShuffleMode | ( | ) |
Definition at line 105 of file class.assMatchingQuestion.php.
References $shufflemode.
Referenced by saveAdditionalQuestionDataToDb().
assMatchingQuestion::getTermCount | ( | ) |
Returns the number of terms.
Definition at line 557 of file class.assMatchingQuestion.php.
assMatchingQuestion::getTerms | ( | ) |
Returns the terms of the matching question.
Definition at line 535 of file class.assMatchingQuestion.php.
assMatchingQuestion::getTermWithIdentifier | ( | $a_identifier | ) |
Returns a term with a given identifier.
Definition at line 431 of file class.assMatchingQuestion.php.
assMatchingQuestion::getThumbGeometry | ( | ) |
Get the thumbnail geometry.
Definition at line 1015 of file class.assMatchingQuestion.php.
Referenced by saveAdditionalQuestionDataToDb().
assMatchingQuestion::getThumbPrefix | ( | ) |
Definition at line 1082 of file class.assMatchingQuestion.php.
assMatchingQuestion::getThumbSize | ( | ) |
Get the thumbnail geometry.
Reimplemented from assQuestion.
Definition at line 1025 of file class.assMatchingQuestion.php.
assMatchingQuestion::getUserQuestionResult | ( | int | $active_id, |
int | $pass | ||
) |
Get the user solution for a question by active_id and the test pass.
Implements iQuestionCondition.
Definition at line 1231 of file class.assMatchingQuestion.php.
References $data.
assMatchingQuestion::insertDefinition | ( | $position, | |
?assAnswerMatchingDefinition | $definition = null |
||
) |
Inserts a definition.
object | $definition | The definition |
Definition at line 615 of file class.assMatchingQuestion.php.
assMatchingQuestion::insertMatchingPair | ( | $position, | |
$term = null , |
|||
$definition = null , |
|||
$points = 0.0 |
|||
) |
Inserts a matching pair for an matching choice question.
The students have to fill in an order for the matching pair. The matching pair is an ASS_AnswerMatching object that will be created and assigned to the array $this->matchingpairs.
integer | $position | The insert position in the matching pairs array |
object | $term | A matching term |
object | $definition | A matching definition |
double | $points | The points for selecting the matching pair (even negative points can be used) |
Definition at line 398 of file class.assMatchingQuestion.php.
assMatchingQuestion::insertTerm | ( | $position, | |
?assAnswerMatchingTerm | $term = null |
||
) |
Inserts a term.
string | $term | The text of the term |
Definition at line 595 of file class.assMatchingQuestion.php.
assMatchingQuestion::isComplete | ( | ) |
Reimplemented from assQuestion.
Definition at line 115 of file class.assMatchingQuestion.php.
References getMaximumPoints().
assMatchingQuestion::loadFromDb | ( | $question_id | ) |
Loads a assMatchingQuestion object from a database.
object | $db | A pear DB object |
integer | $question_id | A unique key which defines the multiple choice test in the database |
Definition at line 227 of file class.assMatchingQuestion.php.
References $data, Vendor\Package\$e, ilRTE\_replaceMediaObjectImageSrc(), createMatchingDefinition(), createMatchingPair(), createMatchingTerm(), ilAssQuestionLifecycle\getDraftInstance(), ilAssQuestionLifecycle\getInstance(), assQuestion\setAdditionalContentEditingMode(), assQuestion\setAuthor(), assQuestion\setComment(), assQuestion\setId(), assQuestion\setLifecycle(), setMatchingMode(), assQuestion\setNrOfTries(), assQuestion\setObjId(), assQuestion\setOriginalId(), assQuestion\setOwner(), assQuestion\setPoints(), assQuestion\setQuestion(), setShuffle(), setShuffleMode(), setThumbGeometry(), and assQuestion\setTitle().
assMatchingQuestion::rebuildThumbnails | ( | ) |
Rebuild the thumbnail images with a new thumbnail size.
Definition at line 1043 of file class.assMatchingQuestion.php.
Referenced by saveAnswerSpecificDataToDb().
assMatchingQuestion::removeDefinitionImage | ( | $index | ) |
Definition at line 816 of file class.assMatchingQuestion.php.
assMatchingQuestion::removeTermImage | ( | $index | ) |
Definition at line 807 of file class.assMatchingQuestion.php.
assMatchingQuestion::saveAdditionalQuestionDataToDb | ( | ) |
Saves a record to the question types additional data table.
Implements ilObjQuestionScoringAdjustable.
Definition at line 204 of file class.assMatchingQuestion.php.
References getAdditionalTableName(), assQuestion\getId(), getMatchingMode(), getShuffleMode(), and getThumbGeometry().
Referenced by saveToDb().
assMatchingQuestion::saveAnswerSpecificDataToDb | ( | ) |
Saves the answer specific records into a question types answer table.
Implements ilObjAnswerScoringAdjustable.
Definition at line 137 of file class.assMatchingQuestion.php.
References $matchingpairs, assQuestion\getId(), getMatchingPairs(), and rebuildThumbnails().
Referenced by saveToDb().
|
protected |
Reimplemented from assQuestion.
Definition at line 942 of file class.assMatchingQuestion.php.
References ilAssQuestionPreviewSession\setParticipantsSolution().
assMatchingQuestion::saveToDb | ( | ?int | $original_id = null | ) |
Reimplemented from assQuestion.
Definition at line 128 of file class.assMatchingQuestion.php.
References assQuestion\$original_id, saveAdditionalQuestionDataToDb(), saveAnswerSpecificDataToDb(), and assQuestion\saveQuestionDataToDb().
assMatchingQuestion::saveWorkingData | ( | int | $active_id, |
?int | $pass = null , |
||
bool | $authorized = true |
||
) |
Reimplemented from assQuestion.
Definition at line 914 of file class.assMatchingQuestion.php.
References ilObjTest\_getPass().
assMatchingQuestion::setImageFile | ( | string | $image_tempfilename, |
string | $image_filename, | ||
string | $previous_filename = '' |
||
) |
Definition at line 844 of file class.assMatchingQuestion.php.
assMatchingQuestion::setMatchingMode | ( | string | $matching_mode | ) |
Definition at line 1184 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
assMatchingQuestion::setShuffle | ( | $shuffle = true | ) |
Definition at line 968 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
assMatchingQuestion::setShuffleMode | ( | int | $shuffle | ) |
Definition at line 110 of file class.assMatchingQuestion.php.
References assQuestion\$shuffle.
Referenced by loadFromDb().
assMatchingQuestion::setTerm | ( | $term, | |
$index | |||
) |
Sets a specific term.
string | $term | The text of the term |
string | $index | The index of the term |
Definition at line 678 of file class.assMatchingQuestion.php.
assMatchingQuestion::setThumbGeometry | ( | int | $a_geometry | ) |
Set the thumbnail geometry.
integer | $a_geometry | Geometry |
Definition at line 1035 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
|
protected |
MUST convert the given solution values into an array or a string that can be stored in the log.
Language variables must be generated through the corresponding functions in the AdditionalInformationGenerator. If an array is returned it will be rendered into a line per array entry in the format "key: value". If the key exists as a language variable, it will be translated.
Reimplemented from assQuestion.
Definition at line 1383 of file class.assMatchingQuestion.php.
assMatchingQuestion::solutionValuesToText | ( | array | $solution_values | ) |
MUST convert the given solution values into text.
If the text has multiple lines each line MUST be placed as an entry in an array.
Reimplemented from assQuestion.
Definition at line 1390 of file class.assMatchingQuestion.php.
References $c.
assMatchingQuestion::toJSON | ( | ) |
Returns a JSON representation of the question.
Reimplemented from assQuestion.
Definition at line 1112 of file class.assMatchingQuestion.php.
References ilObjMediaObject\_getMobsOfObject(), ILIAS\Survey\Mode\getId(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and ILIAS\Refinery\transform().
assMatchingQuestion::toLog | ( | AdditionalInformationGenerator | $additional_info | ) |
MUST return an array of the question settings that can be stored in the log.
Language variables must be generated through the corresponding functions in the AdditionalInformationGenerator. If an array is returned it will be rendered into a line per array entry in the format "key: value". If the key exists as a language variable, it will be translated.
Reimplemented from assQuestion.
Definition at line 1345 of file class.assMatchingQuestion.php.
References ILIAS\Test\Logging\AdditionalInformationGenerator\getTrueFalseTagForBool(), and ILIAS\Repository\int().
assMatchingQuestion::withMatchingPairs | ( | array | $pairs | ) |
assAnswerMatchingPair[] |
Definition at line 510 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 73 of file class.assMatchingQuestion.php.
int assMatchingQuestion::$element_height |
Definition at line 50 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 52 of file class.assMatchingQuestion.php.
int assMatchingQuestion::$matching_type |
Definition at line 51 of file class.assMatchingQuestion.php.
Referenced by __construct().
assMatchingQuestion::$matchingpairs |
Definition at line 63 of file class.assMatchingQuestion.php.
Referenced by saveAnswerSpecificDataToDb().
|
private |
Definition at line 54 of file class.assMatchingQuestion.php.
|
private |
Definition at line 49 of file class.assMatchingQuestion.php.
Referenced by getShuffleMode().
|
protected |
Definition at line 68 of file class.assMatchingQuestion.php.
int assMatchingQuestion::$thumb_geometry = 100 |
Definition at line 48 of file class.assMatchingQuestion.php.
const assMatchingQuestion::MATCHING_MODE_1_ON_1 = '1:1' |
Definition at line 45 of file class.assMatchingQuestion.php.
Referenced by assMatchingQuestionGUI\populateAssignedTerms(), and assMatchingQuestionGUI\populateQuestionSpecificFormPart().
const assMatchingQuestion::MATCHING_MODE_N_ON_N = 'n:n' |
Definition at line 46 of file class.assMatchingQuestion.php.
Referenced by assMatchingQuestionGUI\isValidTermAndDefinitionAmount(), and assMatchingQuestionGUI\populateQuestionSpecificFormPart().
const assMatchingQuestion::MT_TERMS_DEFINITIONS = 1 |
Definition at line 43 of file class.assMatchingQuestion.php.
const assMatchingQuestion::MT_TERMS_PICTURES = 0 |
Definition at line 42 of file class.assMatchingQuestion.php.