Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
workshop_scheduled_allocator Class Reference

Allocates the submissions randomly in a cronjob task. More...

Inheritance diagram for workshop_scheduled_allocator:
workshop_allocator

Public Member Functions

 __construct (workshop $workshop)
 
 execute (bool $checksubmissionphase=true)
 Executes the allocation.
 
 init ()
 Save the settings for the random allocator to execute it later.
 
 ui ()
 Returns the HTML code to print the user interface.
 

Static Public Member Functions

static delete_instance ($workshopid)
 Delete all data related to a given workshop module instance.
 

Protected Member Functions

 store_settings ($enabled, $reset, workshop_random_allocator_setting $settings, workshop_allocation_result $result)
 Stores the pre-defined random allocation settings for later usage.
 

Protected Attributes

 $mform
 workshop_scheduled_allocator_form with settings for the random allocator
 
 $workshop
 workshop instance
 

Detailed Description

Allocates the submissions randomly in a cronjob task.

Constructor & Destructor Documentation

◆ __construct()

workshop_scheduled_allocator::__construct ( workshop $workshop)
Parameters
workshop$workshopWorkshop API object

Member Function Documentation

◆ delete_instance()

static workshop_scheduled_allocator::delete_instance ( $workshopid)
static

Delete all data related to a given workshop module instance.

See also
workshop_delete_instance()
Parameters
int$workshopidid of the workshop module instance being deleted
Return values
void

Implements workshop_allocator.

◆ execute()

workshop_scheduled_allocator::execute ( bool $checksubmissionphase = true)

Executes the allocation.

Parameters
bool$checksubmissionphaseCheck that the workshop is in submission phase before doing anything else.
Return values
workshop_allocation_result

◆ init()

workshop_scheduled_allocator::init ( )

Save the settings for the random allocator to execute it later.

Implements workshop_allocator.

◆ store_settings()

workshop_scheduled_allocator::store_settings ( $enabled,
$reset,
workshop_random_allocator_setting $settings,
workshop_allocation_result $result )
protected

Stores the pre-defined random allocation settings for later usage.

Parameters
bool$enabledis the scheduled allocation enabled
bool$resetreset the recent execution info
workshop_random_allocator_setting$settingssettings form data
workshop_allocation_result$resultlogger

◆ ui()

workshop_scheduled_allocator::ui ( )

Returns the HTML code to print the user interface.

Implements workshop_allocator.


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