|
Moodle PHP Documentation 4.5
Moodle 4.5.5+ (Build: 20250711) (ce34e8ff087)
|
Workshop external functions. More...
Static Public Member Functions | |
| static | add_submission ($workshopid, $title, $content='', $contentformat=FORMAT_MOODLE, $inlineattachmentsid=0, $attachmentsid=0) |
| Add a new submission to a given workshop. | |
| static | add_submission_parameters () |
| Returns the description of the external function parameters. | |
| static | add_submission_returns () |
| Returns the description of the external function return value. | |
| static | delete_submission ($submissionid) |
| Deletes the given submission. | |
| static | delete_submission_parameters () |
| Returns the description of the external function parameters. | |
| static | delete_submission_returns () |
| Returns the description of the external function return value. | |
| static | evaluate_assessment ($assessmentid, $feedbacktext='', $feedbackformat=FORMAT_MOODLE, $weight=1, $gradinggradeover='') |
| Evaluates an assessment (used by teachers for provide feedback to the reviewer). | |
| static | evaluate_assessment_parameters () |
| Returns the description of the external function parameters. | |
| static | evaluate_assessment_returns () |
| Returns description of method result value. | |
| static | evaluate_submission ($submissionid, $feedbacktext='', $feedbackformat=FORMAT_MOODLE, $published=1, $gradeover='') |
| Evaluates a submission (used by teachers for provide feedback or override the submission grade). | |
| static | evaluate_submission_parameters () |
| Returns the description of the external function parameters. | |
| static | evaluate_submission_returns () |
| Returns description of method result value. | |
| static | get_assessment ($assessmentid) |
| Retrieves the given assessment. | |
| static | get_assessment_form_definition ($assessmentid, $mode='assessment') |
| Retrieves the assessment form definition (data required to be able to display the assessment form). | |
| static | get_assessment_form_definition_parameters () |
| Returns the description of the external function parameters. | |
| static | get_assessment_form_definition_returns () |
| Returns description of method result value. | |
| static | get_assessment_parameters () |
| Returns the description of the external function parameters. | |
| static | get_assessment_returns () |
| Returns description of method result value. | |
| static | get_grades ($workshopid, $userid=0) |
| Returns the grades information for the given workshop and user. | |
| static | get_grades_parameters () |
| Returns the description of the external function parameters. | |
| static | get_grades_report ($workshopid, $groupid=0, $sortby='lastname', $sortdirection='ASC', $page=0, $perpage=0) |
| Retrieves the assessment grades report. | |
| static | get_grades_report_parameters () |
| Returns description of method parameters. | |
| static | get_grades_report_returns () |
| Returns description of method result value. | |
| static | get_grades_returns () |
| Returns description of method result value. | |
| static | get_reviewer_assessments ($workshopid, $userid=0) |
| Retrieves all the assessments reviewed by the given user. | |
| static | get_reviewer_assessments_parameters () |
| Returns the description of the external function parameters. | |
| static | get_reviewer_assessments_returns () |
| Returns description of method result value. | |
| static | get_submission ($submissionid) |
| Retrieves the given submission. | |
| static | get_submission_assessments ($submissionid) |
| Retrieves the given submission assessments. | |
| static | get_submission_assessments_parameters () |
| Returns the description of the external function parameters. | |
| static | get_submission_assessments_returns () |
| Returns description of method result value. | |
| static | get_submission_parameters () |
| Returns the description of the external function parameters. | |
| static | get_submission_returns () |
| Returns description of method result value. | |
| static | get_submissions ($workshopid, $userid=0, $groupid=0, $page=0, $perpage=0) |
| Retrieves all the workshop submissions visible by the current user or the one done by the given user (except example submissions). | |
| static | get_submissions_parameters () |
| Returns description of method parameters. | |
| static | get_submissions_returns () |
| Returns description of method result value. | |
| static | get_user_plan ($workshopid, $userid=0) |
| Return the planner information for the given user. | |
| static | get_user_plan_parameters () |
| Describes the parameters for get_user_plan. | |
| static | get_user_plan_returns () |
| Describes the get_user_plan return value. | |
| static | get_workshop_access_information ($workshopid) |
| Return access information for a given workshop. | |
| static | get_workshop_access_information_parameters () |
| Describes the parameters for get_workshop_access_information. | |
| static | get_workshop_access_information_returns () |
| Describes the get_workshop_access_information return value. | |
| static | get_workshops_by_courses ($courseids=array()) |
| Returns a list of workshops in a provided list of courses. | |
| static | get_workshops_by_courses_parameters () |
| Describes the parameters for get_workshops_by_courses. | |
| static | get_workshops_by_courses_returns () |
| Describes the get_workshops_by_courses return value. | |
| static | update_assessment ($assessmentid, $data) |
| Updates an assessment. | |
| static | update_assessment_parameters () |
| Returns the description of the external function parameters. | |
| static | update_assessment_returns () |
| Returns description of method result value. | |
| static | update_submission ($submissionid, $title, $content='', $contentformat=FORMAT_MOODLE, $inlineattachmentsid=0, $attachmentsid=0) |
| Updates the given submission. | |
| static | update_submission_parameters () |
| Returns the description of the external function parameters. | |
| static | update_submission_returns () |
| Returns the description of the external function return value. | |
| static | view_submission ($submissionid) |
| Trigger the submission viewed event. | |
| static | view_submission_parameters () |
| Describes the parameters for view_submission. | |
| static | view_submission_returns () |
| Describes the view_submission return value. | |
| static | view_workshop ($workshopid) |
| Trigger the course module viewed event and update the module completion status. | |
| static | view_workshop_parameters () |
| Describes the parameters for view_workshop. | |
| static | view_workshop_returns () |
| Describes the view_workshop return value. | |
Static Protected Member Functions | |
| static | check_view_submission_assessments ($submission, workshop $workshop) |
| Helper method for validating if the current user can view the submission assessments. | |
| static | prepare_assessment_for_external ($assessment, workshop $workshop) |
| Helper method for returning the assessment data according the current user capabilities and current phase. | |
| static | prepare_submission_for_external ($submission, workshop $workshop, $canviewauthorpublished=null, $canviewauthornames=null, $canviewallsubmissions=null) |
| Helper method for returning the submission data according the current user capabilities and current phase. | |
| static | validate_submission ($submission, workshop $workshop) |
| Helper method for validating a submission. | |
| static | validate_workshop ($workshopid) |
| Utility function for validating a workshop. | |
Workshop external functions.
|
static |
Add a new submission to a given workshop.
| int | $workshopid | the workshop id |
| string | $title | the submission title |
| string | $content | the submission text content |
| int | $contentformat | the format used for the content |
| int | $inlineattachmentsid | the draft file area id for inline attachments in the content |
| int | $attachmentsid | the draft file area id for attachments |
| array | Containing the new created submission id and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns the description of the external function return value.
| core_external\external_description |
|
staticprotected |
Helper method for validating if the current user can view the submission assessments.
| stdClass | $submission | submission object |
| workshop | $workshop | workshop instance |
| void |
|
static |
Deletes the given submission.
| int | $submissionid | the submission id. |
| array | containing the result status and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns the description of the external function return value.
| core_external\external_description |
|
static |
Evaluates an assessment (used by teachers for provide feedback to the reviewer).
| int | $assessmentid | the assessment id |
| str | $feedbacktext | the feedback for the reviewer |
| int | $feedbackformat | the feedback format for the reviewer text |
| int | $weight | the new weight for the assessment |
| mixed | $gradinggradeover | the new grading grade (empty for no overriding the grade) |
| array | containing the status and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Evaluates a submission (used by teachers for provide feedback or override the submission grade).
| int | $submissionid | the submission id |
| str | $feedbacktext | the feedback for the author |
| int | $feedbackformat | the feedback format for the reviewer text |
| bool | $published | whether to publish the submission for other users |
| mixed | $gradeover | the new submission grade (empty for no overriding the grade) |
| array | containing the status and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Retrieves the given assessment.
| int | $assessmentid | the assessment id |
| array | containing the assessment and warnings. |
| moodle_exception |
|
static |
Retrieves the assessment form definition (data required to be able to display the assessment form).
| int | $assessmentid | the assessment id |
| string | $mode | the form mode (assessment or preview) |
| array | containing the assessment and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Returns the grades information for the given workshop and user.
| int | $workshopid | workshop instance id |
| int | $userid | user id |
| array | of warnings and the user plan |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_external_function_parameters |
|
static |
Retrieves the assessment grades report.
| int | $workshopid | the workshop instance id |
| int | $groupid | (optional) group id, 0 means that the function will determine the user group |
| string | $sortby | sort by this element |
| string | $sortdirection | sort direction: ASC or DESC |
| int | $page | page of records to return |
| int | $perpage | number of records to return per page |
| array | of warnings and the report data |
| moodle_exception |
|
static |
Returns description of method parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
|
static |
Retrieves all the assessments reviewed by the given user.
| int | $workshopid | the workshop instance id |
| int | $userid | the reviewer user id |
| array | containing the user assessments and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Retrieves the given submission.
| int | $submissionid | the submission id |
| array | containing the submission and warnings. |
| moodle_exception |
|
static |
Retrieves the given submission assessments.
| int | $submissionid | the submission id |
| array | containing the assessments and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Retrieves all the workshop submissions visible by the current user or the one done by the given user (except example submissions).
| int | $workshopid | the workshop instance id |
| int | $userid | get submissions done by this user |
| int | $groupid | (optional) group id, 0 means that the function will determine the user group |
| int | $page | page of records to return |
| int | $perpage | number of records to return per page |
| array | of warnings and the entries |
| moodle_exception |
|
static |
Returns description of method parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Return the planner information for the given user.
| int | $workshopid | workshop instance id |
| int | $userid | user id |
| array | of warnings and the user plan |
| moodle_exception |
|
static |
Describes the parameters for get_user_plan.
| external_external_function_parameters |
|
static |
|
static |
Return access information for a given workshop.
| int | $workshopid | workshop instance id |
| array | of warnings and the access information |
| moodle_exception |
|
static |
Describes the parameters for get_workshop_access_information.
| external_external_function_parameters |
|
static |
Describes the get_workshop_access_information return value.
| external_single_structure |
|
static |
Returns a list of workshops in a provided list of courses.
If no list is provided all workshops that the user can view will be returned.
| array | $courseids | course ids |
| array | of warnings and workshops |
|
static |
Describes the parameters for get_workshops_by_courses.
| external_function_parameters |
|
static |
Describes the get_workshops_by_courses return value.
| external_single_structure |
|
staticprotected |
Helper method for returning the assessment data according the current user capabilities and current phase.
| stdClass | $assessment | the assessment data |
| workshop | $workshop | the workshop class |
| stdClass | object with the assessment data filtered or null if is not viewable yet |
|
staticprotected |
Helper method for returning the submission data according the current user capabilities and current phase.
| stdClass | $submission | the submission data |
| workshop | $workshop | the workshop class |
| bool | $canviewauthorpublished | whether the user has the capability mod/workshop:viewauthorpublished on |
| bool | $canviewauthornames | whether the user has the capability mod/workshop:vviewauthornames on |
| bool | $canviewallsubmissions | whether the user has the capability mod/workshop:viewallsubmissions on |
| stdClass | object with the submission data filtered |
|
static |
Updates an assessment.
| int | $assessmentid | the assessment id |
| array | $data | the assessment data |
| array | indicates if the assessment was updated, the new raw grade and possible warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns description of method result value.
| core_external\external_description |
|
static |
Updates the given submission.
| int | $submissionid | the submission id |
| string | $title | the submission title |
| string | $content | the submission text content |
| int | $contentformat | the format used for the content |
| int | $inlineattachmentsid | the draft file area id for inline attachments in the content |
| int | $attachmentsid | the draft file area id for attachments |
| array | whether the submission was updated and warnings. |
| moodle_exception |
|
static |
Returns the description of the external function parameters.
| external_function_parameters |
|
static |
Returns the description of the external function return value.
| core_external\external_description |
|
staticprotected |
Helper method for validating a submission.
| stdClass | $submission | submission object |
| workshop | $workshop | workshop instance |
| void |
|
staticprotected |
Utility function for validating a workshop.
| int | $workshopid | workshop instance id |
| array | array containing the workshop object, course, context and course module objects |
|
static |
Trigger the submission viewed event.
| int | $submissionid | submission id |
| array | of warnings and status result |
| moodle_exception |
|
static |
Describes the parameters for view_submission.
| external_function_parameters |
|
static |
|
static |
Trigger the course module viewed event and update the module completion status.
| int | $workshopid | workshop instance id |
| array | of warnings and status result |
| moodle_exception |
|
static |
Describes the parameters for view_workshop.
| external_function_parameters |
|
static |