ILIAS
Release_4_4_x_branch Revision 61816
|
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 | |
Type of gap. | |
$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 18 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 144 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 |
: Figure out why this method exists. (See note) MBecker: PHP knows the function shuffle since 4.2 which is out since April 2002. Still, Helmut built this function in 2007 with rev. 13281 ... This needs investigation.
Reimplemented in assClozeSelectGap.
Definition at line 329 of file class.assClozeGap.php.
Referenced by getItems().
assClozeGap::assClozeGap | ( | $a_type | ) |
assClozeGap constructor
int | $a_type |
Definition at line 53 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 130 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 95 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 116 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.
Reimplemented in assClozeSelectGap.
Definition at line 310 of file class.assClozeGap.php.
References $shuffle.
assClozeGap::getType | ( | ) |
Gets the cloze gap type.
Gets the cloze gap type
Definition at line 69 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 |
Definition at line 300 of file class.assClozeGap.php.
assClozeGap::setType | ( | $a_type = 0 | ) |
Sets the cloze gap type.
integer | $a_type | cloze gap type |
Reimplemented in assClozeSelectGap.
Definition at line 81 of file class.assClozeGap.php.
assClozeGap::$items |
Definition at line 38 of file class.assClozeGap.php.
Referenced by getItems(), assClozeSelectGap\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().