api/opportunity

api/opportunity

Classes

OpportunityCollection
OpportunityInstanceCollection
OpportunityTypeCollection

Members

(static, constant) exports.Opportunities :api/opportunity.OpportunityCollection

Source:

Provides the singleton instance of this class to all other entities.

Type:

(static, constant) exports.OpportunityInstances :api/opportunity.OpportunityInstanceCollection

Source:

Provides the singleton instance of this class to all other entities.

Type:

(static, constant) exports.OpportunityTypes :api/opportunity.OpportunityTypeCollection

Source:

Provides the singleton instance of this class to all other entities.

Type:

Methods

(static) exports.clearPlannedOpportunityInstances(studentID)

Source:

Removes the planned Opportunities for the given studentID.

Parameters:
Name Type Description
studentID

(static) exports.getRandomInt(min, max) → {*}

Source:

Returns a random int between min and max.

Parameters:
Name Type Description
min

the minimum value for the random number.

max

the maximum value for the random number.

Returns:
Type
*

(static) exports.makeSampleOpportunity(sponsor) → {String}

Source:

Creates an Opportunity with a unique slug and returns its docID.

Parameters:
Name Type Description
sponsor

The slug for the user (with Role.FACULTY) to be the sponsor for this opportunity.
Also creates a new OpportunityType.

Returns:

The docID for the newly generated Opportunity.

Type
String

(static) exports.makeSampleOpportunityInstance(student, sponsor)

Source:

Creates an OpportunityInstance with a unique slug and returns its docID.

Parameters:
Name Type Description
student

The slug for the user (with ROLE.STUDENT) who is taking advantage of this opportunity.

sponsor

The slug for the user (with ROLE.FACULTY) who is sponsoring the opportunity.
Implicitly creates an Opportunity and an OpportunityType.

(static) exports.makeSampleOpportunityType() → {String}

Source:

Creates an OpportunityType with a unique slug and returns its docID.

Returns:

The docID of the newly generated OpportunityType.

Type
String