Namespace

api/ice

api/ice

Members

# static constant exports.gradeCompetency

The competency points earned for each grade A, B, or C.

View Source api/ice/IceProcessor.ts, line 35

Methods

# static exports.assertICE(obj)

Throws error if obj is not an ICE object.

Parameters:
Name Type Description
obj

The object to be tested for ICEness.

View Source api/ice/IceProcessor.ts, line 56

If obj is not ICE.

Meteor.Error

# static exports.getEarnedICE(docs) → {Object}

Returns an ICE object that represents the earned ICE points from the passed Course\Opportunity Instance Documents. ICE values are counted only if verified is true.

Parameters:
Name Type Description
docs

An array of CourseInstance or OpportunityInstance documents.

View Source api/ice/IceProcessor.ts, line 97

The ICE object.

Object

# static exports.getProjectedICE(docs) → {Object}

Returns an ICE object that represents the total ICE points from the passed Course/Opportunity Instance Documents. ICE values are counted whether or not they are verified.

Parameters:
Name Type Description
docs

An array of CourseInstance or OpportunityInstance documents.

View Source api/ice/IceProcessor.ts, line 119

The ICE object.

Object

# static exports.isICE(obj) → {boolean}

Returns true if the object passed conforms to the ICE object specifications. Note this does not test to see if additional fields are present.

Parameters:
Name Type Description
obj

The object, which must be an object with fields i, c, and e.

View Source api/ice/IceProcessor.ts, line 47

True if all fields are present and are numbers.

boolean

# static exports.makeCourseICE(course, grade) → {Object}

Returns an ICE object based upon the course slug and the passed grade. Students only earn ICE competency points for 'interesting' courses. Interesting courses are courses that have non other slugs. If an A, then return 9 competency points. If a B, then return 5 competency points. Otherwise return zero points.

Parameters:
Name Type Description
course

The course slug. If it's the "uninteresting" slug, then disregard it.

grade

The grade

View Source api/ice/IceProcessor.ts, line 73

The ICE object.

Object