|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class for cloze question gaps. More...
Inheritance diagram for assClozeGap:
Collaboration diagram for assClozeGap:Public Member Functions | |
| __construct ($a_type) | |
| assClozeGap constructor More... | |
| getType () | |
| Gets the cloze gap type. More... | |
| setType ($a_type=0) | |
| Sets the cloze gap type. More... | |
| getItems (ilArrayElementShuffler $shuffler) | |
| 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 (ilArrayElementShuffler $shuffler, $combinations=null) | |
| setGapSize ($gap_size) | |
| getGapSize () | |
Data Fields | |
| $type | |
| Type of gap. More... | |
| $items | |
| $shuffle | |
Private Attributes | |
| $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 18 of file class.assClozeGap.php.
| assClozeGap::__construct | ( | $a_type | ) |
assClozeGap constructor
| int | $a_type |
Definition at line 55 of file class.assClozeGap.php.
References $a_type.
| assClozeGap::addItem | ( | $a_item | ) |
Adds a gap item.
Adds a gap item
| object | $a_item | Cloze gap item @access public |
Definition at line 140 of file class.assClozeGap.php.
References $i.
| assClozeGap::clearItems | ( | ) |
Removes all gap items.
Removes all gap items
@access public
Definition at line 267 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 @access public |
Definition at line 191 of file class.assClozeGap.php.
References $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 321 of file class.assClozeGap.php.
| assClozeGap::getBestSolutionOutput | ( | ilArrayElementShuffler | $shuffler, |
$combinations = null |
|||
| ) |
| ilArrayElementShuffler | $shuffler | |
| null | array | $combinations |
Definition at line 343 of file class.assClozeGap.php.
References $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 @access public |
Definition at line 250 of file class.assClozeGap.php.
| assClozeGap::getItemCount | ( | ) |
Gets the item count.
Gets the item count
Definition at line 126 of file class.assClozeGap.php.
| assClozeGap::getItems | ( | ilArrayElementShuffler | $shuffler | ) |
Gets the items of a cloze gap.
| ilArrayElementShuffler | $shuffler |
Definition at line 94 of file class.assClozeGap.php.
References $items, getShuffle(), and ilArrayElementShuffler\shuffle().
Referenced by getBestSolutionOutput().
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 112 of file class.assClozeGap.php.
References $items.
| assClozeGap::getMaxWidth | ( | ) |
Returns the maximum width of the gap.
Returns the maximum width of the gap
Definition at line 302 of file class.assClozeGap.php.
| assClozeGap::getShuffle | ( | ) |
Gets the shuffle state of the items.
Definition at line 289 of file class.assClozeGap.php.
References $shuffle.
Referenced by getItems().
Here is the caller graph for this function:| assClozeGap::getType | ( | ) |
Gets the cloze gap type.
Gets the cloze gap type
Definition at line 71 of file class.assClozeGap.php.
References $type.
Referenced by getBestSolutionOutput().
Here is the caller graph for this function:| assClozeGap::setGapSize | ( | $gap_size | ) |
| integer | $gap_size |
Definition at line 388 of file class.assClozeGap.php.
References $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 @access public |
Definition at line 213 of file class.assClozeGap.php.
References $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 @access public |
Definition at line 173 of file class.assClozeGap.php.
References $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 @access public |
Definition at line 232 of file class.assClozeGap.php.
References $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 279 of file class.assClozeGap.php.
| assClozeGap::setType | ( | $a_type = 0 | ) |
|
private |
Definition at line 47 of file class.assClozeGap.php.
Referenced by getGapSize(), and setGapSize().
| assClozeGap::$items |
Definition at line 38 of file class.assClozeGap.php.
Referenced by getItems(), and getItemsRaw().
| assClozeGap::$shuffle |
Definition at line 45 of file class.assClozeGap.php.
Referenced by getShuffle().
| int assClozeGap::$type |
Type of gap.
An integer value indicating the type of the gap 0 == text gap, 1 == select gap, 2 == numeric gap
Definition at line 29 of file class.assClozeGap.php.
Referenced by getType().