Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | List of all members
question_variant_random_strategy Class Reference

A question_variant_selection_strategy that is completely random. More...

Inheritance diagram for question_variant_random_strategy:
question_variant_selection_strategy

Public Member Functions

 choose_variant ($maxvariants, $seed)
 

Detailed Description

A question_variant_selection_strategy that is completely random.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ choose_variant()

question_variant_random_strategy::choose_variant (   $maxvariants,
  $seed 
)
Parameters
int$maxvariantsthe num
string$seeddata that can be used to controls how the variant is selected in a semi-random way.
Return values
intthe variant to use, a number betweeb 1 and $maxvariants inclusive.

Implements question_variant_selection_strategy.


The documentation for this class was generated from the following file: