public

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx *gin.Context, DB db.Database, sub *controllers.Subject)

Get gets a subject by its identifier: subject code, course code and course specialization code

func GetCourses

func GetCourses(ctx *gin.Context, DB db.Database, institute *controllers.Institute)

GetCourses gets all course codes from a given institute the database

func GetInstitutes

func GetInstitutes(ctx *gin.Context, DB db.Database)

GetInstitutes gets all institutes from the database

func GetOfferingComments added in v1.6.0

func GetOfferingComments(ctx *gin.Context, DB db.Database, off *controllers.Offering)

GetOfferingComments retrieves the comments made so far for a given offering

func GetOfferingsWithStats added in v1.6.0

func GetOfferingsWithStats(ctx *gin.Context, DB db.Database, sub *controllers.Subject)

GetOfferingsWithStats retrieves a list of offerings for a given subject, along with the comment stats associated with them

It is a closure for the GET /api/restricted/offerings endpoint

func GetProfessors added in v1.5.5

func GetProfessors(ctx *gin.Context, DB db.Database, institute *controllers.Institute)

GetProfessors gets all course codes from a given institute the database

func GetRelations

func GetRelations(ctx *gin.Context, DB db.Database, sub *controllers.Subject)

GetRelations gets the subject's graph: their direct predecessors and successors

func GetSiblingSubjects added in v1.5.9

func GetSiblingSubjects(ctx *gin.Context, DB db.Database, sub *controllers.Subject)

GetSiblingSubjects gets the subject's siblings: Subjects with same institute, course, specialization and semester

func GetStats

func GetStats(ctx *gin.Context, DB db.Database)

GetStats fetches some statistics from the database

func ListSubjectsByCourse added in v1.6.1

func ListSubjectsByCourse(ctx *gin.Context, DB db.Database, controller *controllers.Course)

ListSubjectsByCourse gets all subjects from a given course in the database

It differs from SearchSubjects because it does not take an institute parameter

func SearchSubjects added in v1.6.1

func SearchSubjects(ctx *gin.Context, DB db.Database, controller *controllers.InstituteCourse)

SearchSubjects gets all subjects from a given course in the database

This differs from SubjectsByCourseIdentifier because it uses the institute to find the course

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL