Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
workshop_random_allocator_setting Class Reference

Data object defining the settings structure for the random allocator. More...

Public Member Functions

 export_text ()
 Exports the instance data as a text for persistant storage. More...
 

Static Public Member Functions

static instance_from_object (stdClass $data)
 Factory method making the instance from data in the passed object. More...
 
static instance_from_text ($text)
 Factory method making the instance from data in the passed text. More...
 

Public Attributes

bool $addselfassessment
 add self-assessments
 
bool $assesswosubmission
 participants can assess without having submitted anything
 
bool $excludesamegroup
 prevent reviews by peers from the same group
 
int $numofreviews
 number of reviews
 
int $numper
 either self::NUMPER_SUBMISSION or self::NUMPER_REVIEWER
 
bool $removecurrent
 remove current allocations
 
const NUMPER_REVIEWER = 2
 aim to a number of reviews per one reviewer { More...
 
const NUMPER_SUBMISSION = 1
 aim to a number of reviews per one submission { More...
 

Protected Member Functions

 __construct ()
 Use the factory method self::instance_from_object().
 

Detailed Description

Data object defining the settings structure for the random allocator.

Member Function Documentation

◆ export_text()

workshop_random_allocator_setting::export_text ( )

Exports the instance data as a text for persistant storage.

The returned data can be later used by {@self::instance_from_text()} factory method to restore the instance data. The current implementation uses JSON export format.

Return values
stringJSON representation of our public properties

◆ instance_from_object()

static workshop_random_allocator_setting::instance_from_object ( stdClass  $data)
static

Factory method making the instance from data in the passed object.

Parameters
stdClass$dataan object holding the values for our public properties
Return values
workshop_random_allocator_setting

◆ instance_from_text()

static workshop_random_allocator_setting::instance_from_text (   $text)
static

Factory method making the instance from data in the passed text.

Parameters
string$textas returned by self::export_text()
Return values
workshop_random_allocator_setting

Member Data Documentation

◆ NUMPER_REVIEWER

const workshop_random_allocator_setting::NUMPER_REVIEWER = 2

aim to a number of reviews per one reviewer {

See also
self::$numper}

◆ NUMPER_SUBMISSION

const workshop_random_allocator_setting::NUMPER_SUBMISSION = 1

aim to a number of reviews per one submission {

See also
self::$numper}

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