Module: submission

Methods

(async, inner) attemptToFindURN(submission)

Verify the integrity of a submission via the LinkedIn Learning API and update its status accordingly. Upon success, the submission's Unique Resource Identifier is set to match the LinkedIn Learning URN.
Parameters:
Name Type Description
submission Object
Source:

(async, inner) fetchAll() → {Array}

Fetch all submissions from database.
Source:
Returns:
submissions
Type
Array

(async, inner) fetchById(id) → {Object}

Fetch submission from database by id.
Parameters:
Name Type Description
id String
Source:
Returns:
submission object
Type
Object

(inner) generateSubmissionID(email, timestamp) → {String}

Generate unique submission id by hashing the email, timestamp and server secret.
Parameters:
Name Type Description
email String
timestamp String
Source:
Returns:
unique submission id
Type
String

(async, inner) insertNewSubmission(type, title, hyperlink, email)

Insert new submission in the database and send tracking link to user if an email was provided.
Parameters:
Name Type Description
type String course / video
title String
hyperlink String
email String
Source:

(async, inner) mapSubmission(id, capability, category, competency, phases)

Map a submission to given RDF parameters and update record in database.
Parameters:
Name Type Description
id String
capability Number id of capability
category Number id of category
competency Number id of competency
phases any array or single id number
Source:

(async, inner) publishSubmission(id)

Publish a submission: insert it as a new learning object and update its status to published.
Parameters:
Name Type Description
id String
Source:

(async, inner) rejectSubmission(id)

Update the status of a submission to rejected.
Parameters:
Name Type Description
id String
Source:

(async, inner) updateSubmission(submission)

Update a submission object in the database.
Parameters:
Name Type Description
submission Object
Source: