Skip to content

Commit

Permalink
Merge pull request #182 from cornell-dti/use-settings-for-survey
Browse files Browse the repository at this point in the history
Survey uses current semester setting instead of a hardcoded default
  • Loading branch information
mluo24 authored Jul 29, 2023
2 parents 84ef5e8 + bc2cae7 commit bb70018
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/functions/src/student/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from '../course/get_course_id'
import { mapDate } from '../course/functions'
import { FirestoreStudent, Student } from '../types'
import { getCurrentSemester } from '../settings/functions'
const courseRef = db.collection('courses')
const studentRef = db.collection('students')

Expand Down Expand Up @@ -104,7 +105,7 @@ export const addStudentSurveyResponse = async (
courseCatalogNames: string[],
surveySubmittable: boolean
) => {
const roster = 'SP23' // Spring 2023
const roster = await getCurrentSemester()

if (!surveySubmittable) {
throw new Error('Survey is Closed')
Expand Down

0 comments on commit bb70018

Please sign in to comment.