ILIAS
Release_3_10_x_branch Revision 61812
|
Class for cloze question gaps. More...
Public Member Functions | |
assClozeGap ($a_type) | |
assClozeGap constructor | |
getType () | |
Gets the cloze gap type. | |
setType ($a_type=0) | |
Sets the cloze gap type. | |
getItems () | |
Gets the items of a cloze gap. | |
getItemsRaw () | |
Gets the items of a cloze gap. | |
getItemCount () | |
Gets the item count. | |
addItem ($a_item) | |
Adds a gap item. | |
setItemPoints ($order, $points) | |
Sets the points for a given item. | |
deleteItem ($order) | |
Deletes an item at a given index. | |
setItemLowerBound ($order, $bound) | |
Sets the lower bound for a given item. | |
setItemUpperBound ($order, $bound) | |
Sets the upper bound for a given item. | |
getItem ($a_index) | |
Gets the item with a given index. | |
clearItems () | |
Removes all gap items. | |
setShuffle ($a_shuffle=TRUE) | |
Sets the shuffle state of the items. | |
getShuffle () | |
Gets the shuffle state of the items. | |
arrayShuffle ($array) | |
Shuffles the values of a given array. | |
getMaxWidth () | |
Returns the maximum width of the gap. | |
getBestSolutionIndexes () | |
Returns the indexes of the best solutions for the gap. | |
getBestSolutionOutput () |
Data Fields | |
$type | |
$items | |
$shuffle |
Class for cloze question gaps.
assClozeGap is a class for the abstraction of cloze gaps. It represents a text gap.
Definition at line 37 of file class.assClozeGap.php.
assClozeGap::addItem | ( | $a_item | ) |
Adds a gap item.
Adds a gap item
object | $a_item | Cloze gap item public |
Definition at line 168 of file class.assClozeGap.php.
assClozeGap::arrayShuffle | ( | $array | ) |
Shuffles the values of a given array.
Shuffles the values of a given array
array | $array | An array which should be shuffled public |
Reimplemented in assClozeSelectGap.
Definition at line 329 of file class.assClozeGap.php.
Referenced by getItems().
assClozeGap::assClozeGap | ( | $a_type | ) |
assClozeGap constructor
string | $answertext | A string defining the answer text |
double | $points | The number of points given for the selected answer |
boolean | $correctness | A boolean value indicating the correctness of the answer |
integer | $order | A nonnegative value representing a possible display or sort order |
integer | $cloze_type | An integer representing the answer type public |
Definition at line 75 of file class.assClozeGap.php.
assClozeGap::clearItems | ( | ) |
Removes all gap items.
Removes all gap items
public
Definition at line 288 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 203 of file class.assClozeGap.php.
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 379 of file class.assClozeGap.php.
assClozeGap::getBestSolutionOutput | ( | ) |
Definition at line 400 of file class.assClozeGap.php.
References $lng, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, getItems(), and getType().
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 268 of file class.assClozeGap.php.
assClozeGap::getItemCount | ( | ) |
Gets the item count.
Gets the item count
Definition at line 154 of file class.assClozeGap.php.
assClozeGap::getItems | ( | ) |
Gets the items of a cloze gap.
Gets the items of a cloze gap
Reimplemented in assClozeSelectGap.
Definition at line 119 of file class.assClozeGap.php.
References $items, and arrayShuffle().
Referenced by getBestSolutionOutput().
assClozeGap::getItemsRaw | ( | ) |
Gets the items of a cloze gap.
Gets the items of a cloze gap
Definition at line 140 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 358 of file class.assClozeGap.php.
assClozeGap::getShuffle | ( | ) |
Gets the shuffle state of the items.
Gets the shuffle state of the items
Reimplemented in assClozeSelectGap.
Definition at line 316 of file class.assClozeGap.php.
References $shuffle.
assClozeGap::getType | ( | ) |
Gets the cloze gap type.
Gets the cloze gap type
Definition at line 91 of file class.assClozeGap.php.
References $type.
Referenced by getBestSolutionOutput().
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 227 of file class.assClozeGap.php.
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 183 of file class.assClozeGap.php.
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 248 of file class.assClozeGap.php.
assClozeGap::setShuffle | ( | $a_shuffle = TRUE | ) |
Sets the shuffle state of the items.
Sets the shuffle state of the items
boolean | $a_shuffle | Shuffle state public |
Definition at line 302 of file class.assClozeGap.php.
assClozeGap::setType | ( | $a_type = 0 | ) |
Sets the cloze gap type.
Sets the cloze gap type
integer | $a_type | Cloze gap type public |
Reimplemented in assClozeSelectGap.
Definition at line 105 of file class.assClozeGap.php.
assClozeGap::$items |
Definition at line 56 of file class.assClozeGap.php.
Referenced by getItems(), assClozeSelectGap\getItems(), and getItemsRaw().
assClozeGap::$shuffle |
Definition at line 63 of file class.assClozeGap.php.
Referenced by getShuffle().
assClozeGap::$type |
Definition at line 47 of file class.assClozeGap.php.
Referenced by getType().