Assignments
Actions
add_action( 'stm_lms_assignment_before_drafting', 'mslms_assignment_before_drafting', 10, 1 );
function mslms_assignment_before_drafting( $assignment_id ) {
$response = wp_remote_post(
'https://demo-website.com/',
array( 'body' => 'Assignment with ID ' . $assignment_id . ' has been started.' )
);
if ( is_wp_error( $response ) ) {
error_log( 'Request error while sending assignment start notice for ID ' . $assignment_id );
return;
}
}Filters
Last updated
Was this helpful?

