External function to notify Moodle that an assignment submission is starting.  
 More...
|  | 
| static | execute (int $assignid) | 
|  | Call to start an assignment submission. 
 | 
|  | 
| static | execute_parameters () | 
|  | Describes the parameters for submission_start. 
 | 
|  | 
| static | execute_returns () | 
|  | Describes the submission_start return value. 
 | 
|  | 
|  | 
| static | generate_warning (int $assignmentid, string $warningcode, string $detail) | 
|  | Generate a warning in a standard structure for a known failure. 
 | 
|  | 
| static | get_user_or_group_submission (\assign $assignment, int $userid=null, int $groupid=0, bool $create=false, int $attemptnumber=-1) | 
|  | Get a submission from an assignment for a user. 
 | 
|  | 
| static | validate_assign (int $assignid) | 
|  | Utility function for validating an assign. 
 | 
|  | 
External function to notify Moodle that an assignment submission is starting. 
- Author
- Andrew Madden andre.nosp@m.wmad.nosp@m.den@c.nosp@m.atal.nosp@m.yst-a.nosp@m.u.ne.nosp@m.t 
- Copyright
- 2021 Catalyst IT 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ execute()
  
  | 
        
          | static mod_assign\external\start_submission::execute | ( | int | $assignid | ) |  |  | static | 
 
Call to start an assignment submission. 
- Parameters
- 
  
    | int | $assignid | Assignment ID. |  
 
- Return values
- 
  
  
- Since
- Moodle 4.0 
 
 
◆ execute_parameters()
  
  | 
        
          | static mod_assign\external\start_submission::execute_parameters | ( |  | ) |  |  | static | 
 
Describes the parameters for submission_start. 
- Return values
- 
  
    | external_function_parameters |  |  
 
- Since
- Moodle 4.0 
 
 
◆ execute_returns()
  
  | 
        
          | static mod_assign\external\start_submission::execute_returns | ( |  | ) |  |  | static | 
 
Describes the submission_start return value. 
- Return values
- 
  
    | external_single_structure |  |  
 
- Since
- Moodle 4.0 
 
 
◆ generate_warning()
  
  | 
        
          | static mod_assign\external\external_api::generate_warning | ( | int | $assignmentid, |  
          |  |  | string | $warningcode, |  
          |  |  | string | $detail ) |  | staticprotectedinherited | 
 
Generate a warning in a standard structure for a known failure. 
- Parameters
- 
  
    | int | $assignmentid | - The assignment |  | string | $warningcode | - The key for the warning message |  | string | $detail | - A description of the error |  
 
- Return values
- 
  
    | array | - Warning structure containing item, itemid, warningcode, message |  
 
 
 
◆ get_user_or_group_submission()
  
  | 
        
          | static mod_assign\external\external_api::get_user_or_group_submission | ( | \assign | $assignment, |  
          |  |  | int | $userid = null, |  
          |  |  | int | $groupid = 0, |  
          |  |  | bool | $create = false, |  
          |  |  | int | $attemptnumber = -1 ) |  | staticprotectedinherited | 
 
Get a submission from an assignment for a user. 
Encapsulates checking whether it's a solo or team submission.
- Parameters
- 
  
    | assign | $assignment | Assignment object. |  | int | null | $userid | User id. |  | int | $groupid | Group id. |  | bool | $create | Whether a new submission should be created. |  | int | $attemptnumber | Attempt number. Use -1 for last attempt. |  
 
- Return values
- 
  
  
 
 
◆ validate_assign()
  
  | 
        
          | static mod_assign\external\external_api::validate_assign | ( | int | $assignid | ) |  |  | staticprotectedinherited | 
 
Utility function for validating an assign. 
- Parameters
- 
  
    | int | $assignid | assign instance id |  
 
- Return values
- 
  
    | array | array containing the assign, course, context and course module objects |  
 
- Since
- Moodle 3.2 
 
 
The documentation for this class was generated from the following file: