Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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.
 

Static Public Member Functions

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

Public Attributes

bool $addselfassessment
 add self-assessments
 
bool $assesswosubmission
 participants can assess without having submitted anything
 
bool $enablescheduled
 scheduled allocation status
 
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 {
 
const NUMPER_SUBMISSION = 1
 aim to a number of reviews per one submission {
 

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 {@selfinstance_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: