Class

FavoriteCareerGoalCollection

FavoriteCareerGoalCollection()

Constructor

# new FavoriteCareerGoalCollection()

Creates the FavoriteCareerGoal collection

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 12

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/favorite/FavoriteCareerGoalCollection.ts, line 111

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/favorite/FavoriteCareerGoalCollection.ts, line 162

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

Array

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

Defines a new FavoriteCareerGoal.

Parameters:
Name Type Description
careerGoal

the careerGoal slug.

username

the user's username.

share Boolean

share the favorite career goal? Defaults to false.

retired

the retired status.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 31

void | * | boolean | Object

# dumpOne(docID) → {Object}

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

Parameters:
Name Type Description
docID

The docID of a FavoriteAcademicPlan.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 180

An object representing the definition of docID.

Object

# getCareerGoalDoc(instanceID) → {Object}

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

Parameters:
Name Type Description
instanceID

The id of the CareerGoalInstance.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 120

If instanceID is not a valid ID.

Meteor.Error

The associated CareerGoal.

Object

# getCareerGoalSlug(instanceID) → {string}

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

Parameters:
Name Type Description
instanceID

The FavoriteCareerGoal ID.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 130

The careerGoal slug.

string

# getStudentDoc(instanceID) → {Object}

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

Parameters:
Name Type Description
instanceID

The ID of the FavoriteCareerGoal.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 141

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 FavoriteCareerGoal id.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 151

*

# publish()

Publish CareerGoalFavorites. If logged in as ADMIN get all, otherwise only get the CareerGoalFavorites for the userID. Also publishes the CareerGoalFavorites scoreboard.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 78

# removeIt(docID)

Remove the FavoriteCareerGoal.

Parameters:
Name Type Description
docID

The docID of the FavoriteCareerGoal.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 60

# removeUser(user)

Removes all the FavoriteCareerGoals for the user.

Parameters:
Name Type Description
user

the username.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 69

# update(docID, retired)

Updates the retired status.

Parameters:
Name Type Description
docID

the ID of the FavoriteCareerGoal.

retired

the new retired value.

View Source api/favorite/FavoriteCareerGoalCollection.ts, line 45