A question_variant_selection_strategy designed ONLY for testing.
More...
A question_variant_selection_strategy designed ONLY for testing.
For selected questions it wil return a specific variants. For the other slots it will use a fallback strategy.
- Copyright
- 2013 The Open University
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
◆ choose_variant()
question_variant_forced_choices_selection_strategy::choose_variant |
( |
|
$maxvariants, |
|
|
|
$seed |
|
) |
| |
- Parameters
-
int | $maxvariants | the num |
string | $seed | data that can be used to controls how the variant is selected in a semi-random way. |
- Return values
-
int | the variant to use, a number betweeb 1 and $maxvariants inclusive. |
Implements question_variant_selection_strategy.
◆ prepare_forced_choices_array()
static question_variant_forced_choices_selection_strategy::prepare_forced_choices_array |
( |
array |
$variantsbyslot, |
|
|
question_usage_by_activity |
$quba |
|
) |
| |
|
static |
Helper method for preparing the $forcedchoices array.
- Parameters
-
- Exceptions
-
- Return values
-
array | that can be passed to the constructor as $forcedchoices. |
The documentation for this class was generated from the following file: