Browse: Home / Functions /

learndash_upload_assignment_init

learndash_upload_assignment_init( int $post_id,  string $fname,  string $file_uploaded_name = '' )

Handles an assignment uploading process after the file was loaded.


Description #

Updates assignment post meta with assignment data, creates a new assignment post, redirects to the needed page.


Parameters #

$post_id

(int) (Required) Post ID.

$fname

(string) (Required) Assignment file name.

$file_uploaded_name

(string) (Optional) Assignment file uploaded name. Optional.

Default value: ''


Return #

(void)


Source #

File: includes/ld-assignment-uploads.php


Changelog #

Changelog
Version Description
4.10.3 Assignments have a learndash_version meta field to help distinguish between old and new assignments. Added the $file_uploaded_name parameter.
2.1.0 Introduced.