summaryrefslogtreecommitdiff
path: root/courses.go
diff options
context:
space:
mode:
Diffstat (limited to 'courses.go')
-rw-r--r--courses.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/courses.go b/courses.go
index 5a1c3fc..781f69a 100644
--- a/courses.go
+++ b/courses.go
@@ -47,6 +47,8 @@ type courseT struct {
Group string
Teacher string
Location string
+ CourseID string
+ SectionID string
Usems sync.Map /* string, *usemT */
}
@@ -63,7 +65,7 @@ const staffDepartment = "Staff"
func setupCourses(ctx context.Context) error {
rows, err := db.Query(
ctx,
- "SELECT id, nmax, title, ctype, cgroup, teacher, location FROM courses",
+ "SELECT id, nmax, title, ctype, cgroup, teacher, location, course_id, section_id FROM courses",
)
if err != nil {
return wrapError(errUnexpectedDBError, err)
@@ -89,6 +91,8 @@ func setupCourses(ctx context.Context) error {
&currentCourse.Group,
&currentCourse.Teacher,
&currentCourse.Location,
+ &currentCourse.CourseID,
+ &currentCourse.SectionID,
)
if err != nil {
return wrapError(errUnexpectedDBError, err)