Description

This function returns the data of documents of a course.

Usage

$doc_data = tp_documents::get_documents($course_id, $output_type);

Parameters

course_id

(int) The ID of the course.

output_type (optional)

(string) You can choice between:

  • OBJECT
  • ARRAY_A (default)
  • ARRAY_N

Return

(array or object)

An array or object containing all the document fields (doc_id, name, path, size, added,sort,course_id).

Example

$array_documents = tp_documents::get_documents(12, ARRAY_A);

Changelog

  • Since: 5.0.0