Browse: Home / Functions /

learndash_get_user_assignments

learndash_get_user_assignments( int $post_id,  int $user_id,  int $course_id,  string $fields = 'all' )

Gets a list of user’s assignments.


Description #


Parameters #

$post_id

(int) (Required) Lesson ID.

$user_id

(int) (Required) User ID.

$course_id

(int) (Optional) Course ID. Default 0.

$fields

(string) (Optional) Return array of assignment post IDs if set to 'ids'.

Default value: 'all'


Return #

(array) Array of post objects or post IDs.


Source #

File: includes/ld-assignment-uploads.php


Changelog #

Changelog
Version Description
4.5.0 Added optional param $fields.
2.1.0 Introduced.