Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

File Size: 172 lines (7 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 1 file
 mod/assign/tests/fixtures/testable_assign.php

Defines 1 class

externallib_advanced_testcase:: (2 methods):
  create_submission_for_testing_status()
  create_assign_with_student_and_teacher()


Class: externallib_advanced_testcase  - X-Ref

Base class for unit tests for external functions in mod_assign.

create_submission_for_testing_status(bool $submitforgrading = false, array $params = [])   X-Ref
Create a submission for testing the get_submission_status function.

return: array an array containing all the required data for testing
param: bool $submitforgrading whether to submit for grading the submission
param: array $params Optional params to use for creating assignment instance.

create_assign_with_student_and_teacher(array $params = [])   X-Ref
Create a course, assignment module instance, student and teacher and enrol them in
the course.

return: array containing the course, assignment module, student and teacher
param: array $params parameters to be provided to the assignment module creation