Namespace

api/course

api/course

Classes

CourseCollection
CourseInstanceCollection

Members

# static constant exports.chooseBetween

Chooses the 'best' course to take given an array of slugs, the student and the courses the student has taken.

View Source api/course/CourseUtilities.ts, line 108

# static constant exports.CourseInstances

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

View Source api/course/CourseInstanceCollection.ts, line 442

# static constant exports.Courses

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

View Source api/course/CourseCollection.ts, line 340

# static constant exports.getDepartment

Returns the department from the given course slug.

View Source api/course/CourseUtilities.ts, line 146

# static constant exports.getFutureEnrollmentMethod

Given a courseID, returns enrollment data for the upcoming 9 academicTerms. The returned data is an object with fields courseID and enrollmentData. CourseID is the course ID. EnrollmentData is an array of arrays. Each interior array is a tuple: a string containing the shortname and an integer indicating the enrollment data.

View Source api/course/CourseCollection.methods.ts, line 35

Example
{ courseID: 'xghuyf2132q3',
  enrollmentData: [['Sp19', 0], ['Su19', 1], ['Fa19', 5],
                   ['Sp20', 25], ['Su20', 2], ['Fa20', 0],
                   ['Sp21', 1], ['Su21', 0], ['Fa21', 1]]
}

# static constant exports.makeSampleCourse

Creates a Course with a unique slug and returns its docID.

View Source api/course/SampleCourses.ts, line 55

# static constant exports.makeSampleCourseInstance

Creates a CourseInstance with a unique slug and returns its docID. Also creates a new Course.

View Source api/course/SampleCourses.ts, line 92

# static constant exports.prereqsMet

Returns true if the coursesTakenSlugs fulfills courseID's prerequisites.

View Source api/course/CourseUtilities.ts, line 18

Methods

# static getEnrollmentData(courseID, termID)

Returns an array with two elements: a string with the shortName of the academicTerm, and an integer indicating the current planned enrollment for the course in that academicTerm.

Parameters:
Name Type Description
courseID

The ID of the course.

termID

The ID of the academicTerm.

View Source api/course/CourseCollection.methods.ts, line 16