Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Unit tests for assignsubmission_comments.

Copyright: 2018 Adrian Greeve <adrian@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 363 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: provider_test  - X-Ref

Unit tests for mod/assign/submission/comments/classes/privacy/

create_comment_submission($assign, $student, $submissiontext)   X-Ref
Convenience function for creating feedback data.

param: object   $assign         assign object
param: stdClass $student        user object
param: string   $submissiontext Submission text
return: array   Submission plugin object and the submission object and the comment object.

test_get_metadata()   X-Ref
Quick test to make sure that get_metadata returns something.


test_get_context_for_userid_within_submission()   X-Ref
Test returning the context for a user who has made a comment in an assignment.


test_get_student_user_ids()   X-Ref
Test returning student ids given a user ID.


test_get_userids_from_context()   X-Ref
Test returning users related to a given context.


test_export_submission_user_data()   X-Ref
Test that comments are exported for a user.


test_delete_submission_for_context()   X-Ref
Test that all comments are deleted for this context.


test_delete_submission_for_userid()   X-Ref
Test that the comments for a user are deleted.


test_delete_submissions()   X-Ref
Test deletion of all submissions for a context works.