Adopt SummerCMS v0.1.1 admin features
Datepickers on native time.Time / lagoon.Date fields, file uploads on materials, readings and class sessions managed from the course form (course_id made nullable).
This commit is contained in:
@@ -32,8 +32,11 @@ func bounds(in map[string]any, lower time.Time) (time.Time, *time.Time) {
|
||||
return lower, nil
|
||||
}
|
||||
|
||||
// preloadSession queries the class sessions students see, with their course
|
||||
// and meeting. A session without a course is still pending on an unsaved
|
||||
// course form and is left out.
|
||||
func preloadSession(q *gorm.DB) *gorm.DB {
|
||||
return q.Preload("Course").Preload("Meeting")
|
||||
return q.Preload("Course").Preload("Meeting").Where("jz_bm_class_sessions.course_id IS NOT NULL")
|
||||
}
|
||||
|
||||
// Schedule answers GET /schedule?from=YYYY-MM-DD&to=YYYY-MM-DD: the class
|
||||
|
||||
Reference in New Issue
Block a user