Browse: Home / Functions /


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 #


(int) (Required) Lesson ID.


(int) (Required) User ID.


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


(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 #

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