Namespace

api/opportunity

api/opportunity

Classes

OpportunityCollection
OpportunityInstanceCollection
OpportunityTypeCollection

Members

api/opportunity.OpportunityCollection

# static constant exports.Opportunities

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

View Source api/opportunity/OpportunityCollection.ts, line 302

api/opportunity.OpportunityInstanceCollection

# static constant exports.OpportunityInstances

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

View Source api/opportunity/OpportunityInstanceCollection.ts, line 366

api/opportunity.OpportunityTypeCollection

# static constant exports.OpportunityTypes

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

View Source api/opportunity/OpportunityTypeCollection.ts, line 55

Methods

# static exports.clearPlannedOpportunityInstances(studentID)

Removes the planned Opportunities for the given studentID.

Parameters:
Name Type Description
studentID

View Source api/opportunity/OpportunityUtilities.ts, line 28

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

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.

View Source api/opportunity/OpportunityUtilities.ts, line 18

*

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

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.

View Source api/opportunity/SampleOpportunities.ts, line 29

The docID for the newly generated Opportunity.

String

# static exports.makeSampleOpportunityInstance(student, sponsor)

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.

View Source api/opportunity/SampleOpportunities.ts, line 59

# static exports.makeSampleOpportunityType() → {String}

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

View Source api/opportunity/SampleOpportunities.ts, line 16

The docID of the newly generated OpportunityType.

String