Class

ProfileCareerGoalCollection

ProfileCareerGoalCollection()

Constructor

# new ProfileCareerGoalCollection()

Creates the ProfileCareerGoal collection

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 11

Methods

# assertValidRoleForMethod(userId)

Implementation of assertValidRoleForMethod. Asserts that userId is logged in as an Admin, Advisor or Student. This is used in the define, update, and removeIt Meteor methods associated with each class.

Parameters:
Name Type Description
userId

The userId of the logged in user. Can be null or undefined

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 91

If there is no logged in user, or the user is not an Admin or Advisor.

Meteor.Error

# checkIntegrity() → {Array}

Returns an array of strings, each one representing an integrity problem with this collection. Returns an empty array if no problems were found. Checks semesterID, careerGoalID, and userID.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 152

A (possibly empty) array of strings indicating integrity issues.

Array

# define(careerGoal, username, retired) → {void|*|boolean|Object}

Defines a new ProfileCareerGoal.

Parameters:
Name Type Description
careerGoal

the careerGoal slug.

username

the user's username.

retired

the retired status.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 25

void | * | boolean | Object

# dumpOne(docID) → {Object}

Returns an object representing the ProfileCareerGoal docID in a format acceptable to define().

Parameters:
Name Type Description
docID

The docID of a ProfileCareerGoal.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 170

An object representing the definition of docID.

Object

# dumpUser(usernameOrID) → {Array.<ProfileCareerGoalDefine>}

Dumps all the ProfileCareerGoals for the given usernameOrID.

Parameters:
Name Type Description
usernameOrID string

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 182

Array.<ProfileCareerGoalDefine>

# getCareerGoalDoc(instanceID) → {Object}

Returns the CareerGoal associated with the ProfileCareerGoal with the given instanceID.

Parameters:
Name Type Description
instanceID

The id of the CareerGoalInstance.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 100

If instanceID is not a valid ID.

Meteor.Error

The associated CareerGoal.

Object

# getCareerGoalSlug(instanceID) → {string}

Returns the CareerGoal slug for the Profile's corresponding CareerGoal.

Parameters:
Name Type Description
instanceID

The ProfileCareerGoal ID.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 110

The careerGoal slug.

string

# getCareerGoalSlugs(username) → {Array.<any>}

Returns the list of non-retired Career Goal slugs associated with this username.

Parameters:
Name Type Description
username

The username

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 120

Career Goal slugs.

Array.<any>

# getStudentDoc(instanceID) → {Object}

Returns the Student profile associated with the ProfileCareerGoal with the given instanceID.

Parameters:
Name Type Description
instanceID

The ID of the ProfileCareerGoal.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 131

If instanceID is not a valid ID.

Meteor.Error

The associated Student profile.

Object

# getStudentUsername(instanceID) → {*}

Returns the username associated with the userID.

Parameters:
Name Type Description
instanceID

the ProfileCareerGoal id.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 141

*

# publish()

Publish ProfileCareerGoals. If ADMIN get all, otherwise only get the ProfileCareerGoals for the userID. Also publishes the ProfileCareerGoals forecast.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 70

# removeIt(docID)

Remove the ProfileCareerGoal.

Parameters:
Name Type Description
docID

The docID of the ProfileCareerGoal.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 52

# removeUser(user)

Removes all the ProfileCareerGoals for the user.

Parameters:
Name Type Description
user

the username.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 62

# update(docID, retired)

Updates the retired status.

Parameters:
Name Type Description
docID

the ID of the ProfileCareerGoal.

retired

the new retired value.

View Source api/user/profile-entries/ProfileCareerGoalCollection.ts, line 40