Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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 ()
 Executes the allocation. More...
 
 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. More...
 

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. More...
 

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 ( )

Executes the allocation.

Return values
workshop_allocation_result

◆ 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

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