Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
mod_assign\externallib_advanced_testcase Class Reference

Base class for unit tests for external functions in mod_assign. More...

Protected Member Functions

 create_assign_with_student_and_teacher (array $params=[])
 Create a course, assignment module instance, student and teacher and enrol them in the course.
 
 create_submission_for_testing_status (bool $submitforgrading=false, array $params=[])
 Create a submission for testing the get_submission_status function.
 

Detailed Description

Base class for unit tests for external functions in mod_assign.

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
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ create_assign_with_student_and_teacher()

mod_assign\externallib_advanced_testcase::create_assign_with_student_and_teacher ( array $params = [])
protected

Create a course, assignment module instance, student and teacher and enrol them in the course.

Parameters
array$paramsparameters to be provided to the assignment module creation
Return values
arraycontaining the course, assignment module, student and teacher

◆ create_submission_for_testing_status()

mod_assign\externallib_advanced_testcase::create_submission_for_testing_status ( bool $submitforgrading = false,
array $params = [] )
protected

Create a submission for testing the get_submission_status function.

Parameters
bool$submitforgradingwhether to submit for grading the submission
array$paramsOptional params to use for creating assignment instance.
Return values
arrayan array containing all the required data for testing

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