Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_assign\external\start_submission Class Reference
Inheritance diagram for mod_assign\external\start_submission:
mod_assign\external\external_api

Static Public Member Functions

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 Protected Member Functions

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.
 

Member Function Documentation

◆ execute()

static mod_assign\external\start_submission::execute ( int $assignid)
static

Call to start an assignment submission.

Parameters
int$assignidAssignment ID.
Return values
array
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$assignmentAssignment object.
int | null$useridUser id.
int$groupidGroup id.
bool$createWhether a new submission should be created.
int$attemptnumberAttempt number. Use -1 for last attempt.
Return values
bool|stdClass

◆ validate_assign()

static mod_assign\external\external_api::validate_assign ( int $assignid)
staticprotectedinherited

Utility function for validating an assign.

Parameters
int$assignidassign instance id
Return values
arrayarray containing the assign, course, context and course module objects
Since
Moodle 3.2

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