|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
Class for cloze question gaps. More...
Inheritance diagram for assClozeGap:
Collaboration diagram for assClozeGap:Public Member Functions | |
| __construct ($a_type) | |
| assClozeGap constructor More... | |
| getType () | |
| isTextGap () | |
| isSelectGap () | |
| isNumericGap () | |
| setType ($a_type=0) | |
| Sets the cloze gap type. More... | |
| getItems (Transformation $shuffler, ?int $gap_index=null) | |
| Gets the items of a cloze gap. More... | |
| getItemsRaw () | |
| Gets the items of a cloze gap. More... | |
| getItemCount () | |
| Gets the item count. More... | |
| addItem ($a_item) | |
| Adds a gap item. More... | |
| setItemPoints ($order, $points) | |
| Sets the points for a given item. More... | |
| deleteItem ($order) | |
| Deletes an item at a given index. More... | |
| setItemLowerBound ($order, $bound) | |
| Sets the lower bound for a given item. More... | |
| setItemUpperBound ($order, $bound) | |
| Sets the upper bound for a given item. More... | |
| getItem ($a_index) | |
| Gets the item with a given index. More... | |
| clearItems () | |
| Removes all gap items. More... | |
| setShuffle ($a_shuffle=true) | |
| Sets the shuffle state of the items. More... | |
| getShuffle () | |
| Gets the shuffle state of the items. More... | |
| getMaxWidth () | |
| Returns the maximum width of the gap. More... | |
| getBestSolutionIndexes () | |
| Returns the indexes of the best solutions for the gap. More... | |
| getBestSolutionOutput (Transformation $shuffler, $combinations=null) | |
| setGapSize (int $gap_size) | |
| getGapSize () | |
| numericRangeExists () | |
Data Fields | |
| const | TYPE_TEXT = 0 |
| const | TYPE_SELECT = 1 |
| const | TYPE_NUMERIC = 2 |
| int | $type |
| $items | |
| $shuffle | |
Private Attributes | |
| Transformation | $shuffler = null |
| $gap_size = 0 | |
Class for cloze question gaps.
assClozeGap is a class for the abstraction of cloze gaps. It represents a text gap.
Definition at line 35 of file class.assClozeGap.php.
| assClozeGap::__construct | ( | $a_type | ) |
assClozeGap constructor
| int | $a_type |
Definition at line 68 of file class.assClozeGap.php.
References ILIAS\Repository\int().
Here is the call graph for this function:| assClozeGap::addItem | ( | $a_item | ) |
Adds a gap item.
Adds a gap item
| object | $a_item | Cloze gap item public |
Definition at line 171 of file class.assClozeGap.php.
| assClozeGap::clearItems | ( | ) |
Removes all gap items.
Removes all gap items
public
Definition at line 299 of file class.assClozeGap.php.
| assClozeGap::deleteItem | ( | $order | ) |
Deletes an item at a given index.
Deletes an item at a given index
| integer | $0order Order of the item public |
Definition at line 222 of file class.assClozeGap.php.
References ILIAS\LTI\ToolProvider\$key.
| assClozeGap::getBestSolutionIndexes | ( | ) |
Returns the indexes of the best solutions for the gap.
Returns the indexes of the best solutions for the gap
Definition at line 353 of file class.assClozeGap.php.
References ILIAS\LTI\ToolProvider\$key.
| assClozeGap::getBestSolutionOutput | ( | Transformation | $shuffler, |
$combinations = null |
|||
| ) |
| Transformation | $shuffler | |
| null | array | $combinations |
Definition at line 375 of file class.assClozeGap.php.
References $DIC, $lng, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, getItems(), and getType().
Here is the call graph for this function:| assClozeGap::getGapSize | ( | ) |
| assClozeGap::getItem | ( | $a_index | ) |
Gets the item with a given index.
Gets the item with a given index
| integer | $a_index | Item index public |
Definition at line 282 of file class.assClozeGap.php.
Referenced by ilAssClozeTestFeedback\determineAnswerIndexForAnswerValue(), and numericRangeExists().
Here is the caller graph for this function:| assClozeGap::getItemCount | ( | ) |
Gets the item count.
Gets the item count
Definition at line 157 of file class.assClozeGap.php.
| assClozeGap::getItems | ( | Transformation | $shuffler, |
| ?int | $gap_index = null |
||
| ) |
Gets the items of a cloze gap.
| Transformation | $shuffler |
Definition at line 116 of file class.assClozeGap.php.
References $items, getShuffle(), and ILIAS\Refinery\Transformation\transform().
Referenced by ilAssClozeTestFeedback\buildGapFeedbackLabel(), ilAssClozeTestFeedback\completeFbPropsForSelectGap(), ilAssClozeTestFeedback\completeFbPropsForTextGap(), ilAssClozeTestFeedback\determineAnswerIndexForAnswerValue(), getBestSolutionOutput(), ilAssClozeTestFeedback\initFbPropsForSelectGap(), ilAssClozeTestFeedback\initFbPropsForTextGap(), ilAssClozeTestFeedback\saveFbPropsForSelectGap(), and ilAssClozeTestFeedback\saveFbPropsForTextGap().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeGap::getItemsRaw | ( | ) |
Gets the items of a cloze gap.
Gets the items of a cloze gap
Definition at line 143 of file class.assClozeGap.php.
References $items.
Referenced by assClozeTestGUI\saveGapCorrectionFormProperty(), and assClozeTestGUI\saveTextOrSelectGapCorrectionFormProperty().
Here is the caller graph for this function:| assClozeGap::getMaxWidth | ( | ) |
Returns the maximum width of the gap.
Returns the maximum width of the gap
Definition at line 334 of file class.assClozeGap.php.
| assClozeGap::getShuffle | ( | ) |
Gets the shuffle state of the items.
Definition at line 321 of file class.assClozeGap.php.
References $shuffle.
Referenced by getItems().
Here is the caller graph for this function:| assClozeGap::getType | ( | ) |
Definition at line 78 of file class.assClozeGap.php.
References $type.
Referenced by ilAssClozeTestFeedback\determineAnswerIndexForAnswerValue(), getBestSolutionOutput(), numericRangeExists(), and assClozeTestGUI\saveGapCorrectionFormProperty().
Here is the caller graph for this function:| assClozeGap::isNumericGap | ( | ) |
Definition at line 93 of file class.assClozeGap.php.
| assClozeGap::isSelectGap | ( | ) |
Definition at line 88 of file class.assClozeGap.php.
| assClozeGap::isTextGap | ( | ) |
Definition at line 83 of file class.assClozeGap.php.
| assClozeGap::numericRangeExists | ( | ) |
Definition at line 433 of file class.assClozeGap.php.
References CLOZE_NUMERIC, getItem(), and getType().
Referenced by ilAssClozeTestFeedback\completeFbPropsForNumericGap(), ilAssClozeTestFeedback\initFbPropsForNumericGap(), and ilAssClozeTestFeedback\saveFbPropsForNumericGap().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeGap::setGapSize | ( | int | $gap_size | ) |
| assClozeGap::setItemLowerBound | ( | $order, | |
| $bound | |||
| ) |
Sets the lower bound for a given item.
Sets the lower bound for a given item
| integer | $order | Order of the item |
| double | $bound | Lower bounds of the item public |
Definition at line 244 of file class.assClozeGap.php.
References ILIAS\LTI\ToolProvider\$key.
| assClozeGap::setItemPoints | ( | $order, | |
| $points | |||
| ) |
Sets the points for a given item.
Sets the points for a given item
| integer | $order | Order of the item |
| double | $points | Points of the item public |
Definition at line 204 of file class.assClozeGap.php.
References ILIAS\LTI\ToolProvider\$key.
| assClozeGap::setItemUpperBound | ( | $order, | |
| $bound | |||
| ) |
Sets the upper bound for a given item.
Sets the upper bound for a given item
| integer | $order | Order of the item |
| double | $bound | Upper bound of the item public |
Definition at line 263 of file class.assClozeGap.php.
References ILIAS\LTI\ToolProvider\$key.
| assClozeGap::setShuffle | ( | $a_shuffle = true | ) |
Sets the shuffle state of the items.
Sets the shuffle state of the items
| boolean | $a_shuffle | Shuffle state |
Definition at line 311 of file class.assClozeGap.php.
| assClozeGap::setType | ( | $a_type = 0 | ) |
Sets the cloze gap type.
| integer | $a_type | cloze gap type |
Definition at line 105 of file class.assClozeGap.php.
|
private |
Definition at line 60 of file class.assClozeGap.php.
Referenced by getGapSize(), and setGapSize().
| assClozeGap::$items |
Definition at line 51 of file class.assClozeGap.php.
Referenced by getItems(), and getItemsRaw().
| assClozeGap::$shuffle |
Definition at line 58 of file class.assClozeGap.php.
Referenced by getShuffle().
|
private |
Definition at line 40 of file class.assClozeGap.php.
| int assClozeGap::$type |
Definition at line 42 of file class.assClozeGap.php.
Referenced by getType().
| const assClozeGap::TYPE_NUMERIC = 2 |
Definition at line 39 of file class.assClozeGap.php.
Referenced by ilAssClozeTestFeedback\completeFormPropsForFeedbackModeGapAnswers(), ilAssClozeTestFeedback\initFeedbackFieldsPerGapAnswers(), and ilAssClozeTestFeedback\saveFeedbackFieldsPerGapAnswers().
| const assClozeGap::TYPE_SELECT = 1 |
Definition at line 38 of file class.assClozeGap.php.
Referenced by ilAssClozeTestFeedback\completeFormPropsForFeedbackModeGapAnswers(), ilAssClozeTestFeedback\initFeedbackFieldsPerGapAnswers(), and ilAssClozeTestFeedback\saveFeedbackFieldsPerGapAnswers().
| const assClozeGap::TYPE_TEXT = 0 |
Definition at line 37 of file class.assClozeGap.php.
Referenced by ilAssClozeTestFeedback\completeFormPropsForFeedbackModeGapAnswers(), assClozeTestGUI\getSpecificFeedbackOutput(), ilAssClozeTestFeedback\initFeedbackFieldsPerGapAnswers(), and ilAssClozeTestFeedback\saveFeedbackFieldsPerGapAnswers().