Scheduler class.  
 More...
|  | 
|  | __construct (int $instanceid=0, int $contextlevel=CONTEXT_COURSE) | 
|  | Scheduler constructor. 
 | 
|  | 
|  | create_schedule () | 
|  | Request this schedule object be added. 
 | 
|  | 
|  | delete_schedule () | 
|  | Request this schedule object be deleted. 
 | 
|  | 
|  | get_datarecord (int $status=self::STATUS_NOT_REQUESTED) | 
|  | Create and return a datarecord object for the data table. 
 | 
|  | 
|  | is_analyzed () | 
|  | Return true if this schedule object has been analyzed. 
 | 
|  | 
|  | is_in_schedule () | 
|  | Return true if this schedule object is in the schedule. 
 | 
|  | 
|  | is_scheduled () | 
|  | Return true if this schedule object has been requested to be analyzed. 
 | 
|  | 
|  | is_submitted () | 
|  | Return true if this schedule object has been submitted. 
 | 
|  | 
|  | mark_analyzed () | 
|  | Mark this schedule object as analyzed. 
 | 
|  | 
|  | request_analysis () | 
|  | Request this schedule object to be analyzed. 
 | 
|  | 
|  | 
| int | $contextlevel | 
|  | $contextlevel The context level of the instance id e.g. 
 | 
|  | 
| int | $instanceid | 
|  | $instanceid The specific instance id of the context e.g. 
 | 
|  | 
| const | DATA_TABLE = 'tool_brickfield_schedule' | 
|  | The data table used by the scheduler. 
 | 
|  | 
| const | STATUS_NOT_REQUESTED = 0 | 
|  | Analysis has not been requested. 
 | 
|  | 
| const | STATUS_REQUESTED = 1 | 
|  | Analysis has been requested but not submitted. 
 | 
|  | 
| const | STATUS_SUBMITTED = 2 | 
|  | Analysis has been submitted. 
 | 
|  | 
◆ __construct()
      
        
          | tool_brickfield\scheduler::__construct | ( | int | $instanceid = 0, | 
        
          |  |  | int | $contextlevel = CONTEXT_COURSE ) | 
      
 
Scheduler constructor. 
- Parameters
- 
  
    | int | $instanceid |  |  | int | $contextlevel |  |  
 
 
 
◆ create_course_schedule()
  
  | 
        
          | static tool_brickfield\scheduler::create_course_schedule | ( | int | $courseid | ) |  |  | static | 
 
Request the specified course be added. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ create_schedule()
      
        
          | tool_brickfield\scheduler::create_schedule | ( |  | ) |  | 
      
 
Request this schedule object be added. 
Return true if already added, or the status of the insert operation. 
- Return values
- 
  
  
 
 
◆ delete_course_schedule()
  
  | 
        
          | static tool_brickfield\scheduler::delete_course_schedule | ( | int | $courseid | ) |  |  | static | 
 
Delete the specified course from the schedule. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ delete_schedule()
      
        
          | tool_brickfield\scheduler::delete_schedule | ( |  | ) |  | 
      
 
Request this schedule object be deleted. 
- Return values
- 
  
  
 
 
◆ get_contextid()
  
  | 
        
          | tool_brickfield\scheduler::get_contextid | ( |  | ) |  |  | protected | 
 
Get the context id for the specified context level and instance. 
- Return values
- 
  
  
- Exceptions
- 
  
  
 
 
◆ get_datarecord()
      
        
          | tool_brickfield\scheduler::get_datarecord | ( | int | $status = self::STATUS_NOT_REQUESTED | ) |  | 
      
 
Create and return a datarecord object for the data table. 
- Parameters
- 
  
  
- Return values
- 
  
  
- Exceptions
- 
  
  
 
 
◆ initialize_schedule()
  
  | 
        
          | static tool_brickfield\scheduler::initialize_schedule | ( | int | $contextlevel = CONTEXT_COURSE | ) |  |  | static | 
 
Load all requested context types into the schedule as requested. 
Write records in groups of 100. 
- Parameters
- 
  
  
- Return values
- 
  
  
- Exceptions
- 
  
  
 
 
◆ is_analyzed()
      
        
          | tool_brickfield\scheduler::is_analyzed | ( |  | ) |  | 
      
 
Return true if this schedule object has been analyzed. 
- Return values
- 
  
  
 
 
◆ is_course_analyzed()
  
  | 
        
          | static tool_brickfield\scheduler::is_course_analyzed | ( | int | $courseid | ) |  |  | static | 
 
Return true if the specified course has been analyzed. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ is_course_in_schedule()
  
  | 
        
          | static tool_brickfield\scheduler::is_course_in_schedule | ( | int | $courseid | ) |  |  | static | 
 
Return true if the specified course is in the schedule. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ is_course_scheduled()
  
  | 
        
          | static tool_brickfield\scheduler::is_course_scheduled | ( | int | $courseid | ) |  |  | static | 
 
Return true if the specified course is scheduled. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ is_in_schedule()
      
        
          | tool_brickfield\scheduler::is_in_schedule | ( |  | ) |  | 
      
 
Return true if this schedule object is in the schedule. 
- Return values
- 
  
  
 
 
◆ is_scheduled()
      
        
          | tool_brickfield\scheduler::is_scheduled | ( |  | ) |  | 
      
 
Return true if this schedule object has been requested to be analyzed. 
- Return values
- 
  
  
 
 
◆ is_submitted()
      
        
          | tool_brickfield\scheduler::is_submitted | ( |  | ) |  | 
      
 
Return true if this schedule object has been submitted. 
- Return values
- 
  
  
 
 
◆ mark_analyzed()
      
        
          | tool_brickfield\scheduler::mark_analyzed | ( |  | ) |  | 
      
 
Mark this schedule object as analyzed. 
- Return values
- 
  
  
- Exceptions
- 
  
  
 
 
◆ process_scheduled_requests()
  
  | 
        
          | static tool_brickfield\scheduler::process_scheduled_requests | ( |  | ) |  |  | static | 
 
Process all the course analysis requests, and mark them as analyzed. 
Limit the number of requests processed by time. 
- Exceptions
- 
  
  
 
 
◆ request_analysis()
      
        
          | tool_brickfield\scheduler::request_analysis | ( |  | ) |  | 
      
 
Request this schedule object to be analyzed. 
Create the schedule if not present. 
- Return values
- 
  
  
 
 
◆ request_course_analysis()
  
  | 
        
          | static tool_brickfield\scheduler::request_course_analysis | ( | int | $courseid | ) |  |  | static | 
 
Request the specified course be analyzed. 
- Parameters
- 
  
  
- Return values
- 
  
  
 
 
◆ standard_search_params()
  
  | 
        
          | tool_brickfield\scheduler::standard_search_params | ( |  | ) |  |  | protected | 
 
The nornal data parameters to search for. 
- Return values
- 
  
  
 
 
◆ $contextlevel
      
        
          | int tool_brickfield\scheduler::$contextlevel | 
      
 
$contextlevel The context level of the instance id e.g. 
CONTEXT_COURSE / 50. 
 
 
◆ $instanceid
      
        
          | int tool_brickfield\scheduler::$instanceid | 
      
 
$instanceid The specific instance id of the context e.g. 
courseid. 
 
 
The documentation for this class was generated from the following file: