Documentation
¶
Index ¶
- Constants
- func FormQuestionsToMap(form Form) map[uuid.UUID]Question
- func Index(c *gin.Context)
- func NewRouter(Db *gorm.DB) *gin.Engine
- type AbstractForm
- type Answer
- type Base
- type Cartridge
- type Course
- type CourseProf
- type CourseProfReport
- type CourseReport
- type CourseStats
- type Data
- type EmptyForm
- type EvalAPI
- func (ev *EvalAPI) CourseCourseIdStatsGet(c *gin.Context)
- func (ev *EvalAPI) CourseprofsCourseProfIdDelete(c *gin.Context)
- func (ev *EvalAPI) CourseprofsCourseProfIdGet(c *gin.Context)
- func (ev *EvalAPI) CourseprofsCourseProfIdPatch(c *gin.Context)
- func (ev *EvalAPI) CourseprofsCourseProfIdReportGet(c *gin.Context)
- func (ev *EvalAPI) CourseprofsGet(c *gin.Context)
- func (ev *EvalAPI) CourseprofsPost(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdDelete(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdGet(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdInvitationsGet(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdInvitationsSendPost(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdPatch(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdReportGet(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdTutorsGet(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdTutorsPost(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdTutorsTutorIdDelete(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdTutorsTutorIdGet(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdTutorsTutorIdPatch(c *gin.Context)
- func (ev *EvalAPI) CoursesCourseIdTutorsTutorIdReportGet(c *gin.Context)
- func (ev *EvalAPI) CoursesGet(c *gin.Context)
- func (ev *EvalAPI) CoursesPost(c *gin.Context)
- func (ev *EvalAPI) CreateUserPost(c *gin.Context)
- func (ev *EvalAPI) FacultiesFacultyIdGet(c *gin.Context)
- func (ev *EvalAPI) FacultiesFacultyIdPatch(c *gin.Context)
- func (ev *EvalAPI) FacultiesGet(c *gin.Context)
- func (ev *EvalAPI) FacultiesPost(c *gin.Context)
- func (ev *EvalAPI) FormsFormIdGet(c *gin.Context)
- func (ev *EvalAPI) FormsFormIdPatch(c *gin.Context)
- func (ev *EvalAPI) FormsGet(c *gin.Context)
- func (ev *EvalAPI) FormsPost(c *gin.Context)
- func (ev *EvalAPI) LTIConfig(c *gin.Context)
- func (ev *EvalAPI) LTILaunch(c *gin.Context)
- func (ev *EvalAPI) ModulesGet(c *gin.Context)
- func (ev *EvalAPI) ModulesModuleIdDelete(c *gin.Context)
- func (ev *EvalAPI) ModulesModuleIdGet(c *gin.Context)
- func (ev *EvalAPI) ModulesModuleIdPatch(c *gin.Context)
- func (ev *EvalAPI) ModulesPost(c *gin.Context)
- func (ev *EvalAPI) ProfsGet(c *gin.Context)
- func (ev *EvalAPI) ProfsPost(c *gin.Context)
- func (ev *EvalAPI) ProfsProfIdDelete(c *gin.Context)
- func (ev *EvalAPI) ProfsProfIdGet(c *gin.Context)
- func (ev *EvalAPI) ProfsProfIdPatch(c *gin.Context)
- func (ev *EvalAPI) QuestionaireInvitationIdGet(c *gin.Context)
- func (ev *EvalAPI) QuestionaireInvitationIdPost(c *gin.Context)
- func (ev *EvalAPI) StatusGet(c *gin.Context)
- func (ev *EvalAPI) TermsGet(c *gin.Context)
- func (ev *EvalAPI) TermsPost(c *gin.Context)
- func (ev *EvalAPI) TermsTermIdGet(c *gin.Context)
- func (ev *EvalAPI) TermsTermIdPatch(c *gin.Context)
- func (ev *EvalAPI) TermsTermIdReportGet(c *gin.Context)
- func (ev *EvalAPI) UsersGet(c *gin.Context)
- type EvalRepository
- func (ev *EvalRepository) AvgPerConcern(objectId, questionId uuid.UUID) float32
- func (ev *EvalRepository) AvgPerQuestion(questionId uuid.UUID) float32
- func (ev *EvalRepository) CountNotApplicable(questionId uuid.UUID, objectId uuid.UUID) int
- func (ev *EvalRepository) CountOfQuestionaires(courseId uuid.UUID) int
- func (ev *EvalRepository) CountPerOption(questionId uuid.UUID, objectId uuid.UUID) ([]Pair, error)
- func (ev *EvalRepository) CountTutor(questionId uuid.UUID, objectId uuid.UUID) int
- func (ev *EvalRepository) CreateUser(name, firstname, lastname, password string) (User, error)
- func (ev *EvalRepository) DeleteAllInvitationsOfCourse(courseId uuid.UUID) error
- func (ev *EvalRepository) DeleteAllQuestionairesAndSingleAnswersOfCourse(courseId uuid.UUID) error
- func (ev *EvalRepository) DeleteCourse(id uuid.UUID) error
- func (ev *EvalRepository) DeleteCourseProf(id uuid.UUID) error
- func (ev *EvalRepository) DeleteModule(id uuid.UUID) error
- func (ev *EvalRepository) DeleteProf(id uuid.UUID) error
- func (ev *EvalRepository) DeleteTutor(courseId, tutorId uuid.UUID) error
- func (ev *EvalRepository) FindAllCourseProfs(courseId uuid.UUID, profId uuid.UUID) []CourseProf
- func (ev *EvalRepository) FindAllCourseProfsForCourse(courseId uuid.UUID) ([]Prof, error)
- func (ev *EvalRepository) FindAllCourseTutors(courseId uuid.UUID) ([]Tutor, error)
- func (ev *EvalRepository) FindAllCourses() []Course
- func (ev *EvalRepository) FindAllFaculties() []Faculty
- func (ev *EvalRepository) FindAllForms() []Form
- func (ev *EvalRepository) FindAllModules() []Module
- func (ev *EvalRepository) FindAllProfs() []Prof
- func (ev *EvalRepository) FindAllSingleAnswers(questionId, objectId uuid.UUID) []SingleAnswer
- func (ev *EvalRepository) FindAllTerms() []Term
- func (ev *EvalRepository) FindCourse(id uuid.UUID) (Course, error)
- func (ev *EvalRepository) FindCourseByThirdPartyKey(thirdPartyKey string) (Course, error)
- func (ev *EvalRepository) FindCourseInvitations(courseId uuid.UUID) ([]Invitation, error)
- func (ev *EvalRepository) FindCourseProf(id uuid.UUID) (CourseProf, error)
- func (ev *EvalRepository) FindFaculty(id uuid.UUID) (Faculty, error)
- func (ev *EvalRepository) FindForm(id uuid.UUID) (Form, error)
- func (ev *EvalRepository) FindInvitation(id uuid.UUID) (Invitation, error)
- func (ev *EvalRepository) FindModule(id uuid.UUID) (Module, error)
- func (ev *EvalRepository) FindProf(id uuid.UUID) (Prof, error)
- func (ev *EvalRepository) FindTerm(id uuid.UUID) (Term, error)
- func (ev *EvalRepository) FindTutor(courseId, tutorId uuid.UUID) (Tutor, error)
- func (ev *EvalRepository) FindUserByName(name string) User
- func (ev *EvalRepository) FindUserByNameAndPW(name, password string) User
- func (ev *EvalRepository) FindUsers() ([]User, error)
- func (ev *EvalRepository) GetCount(tablename string) int32
- func (ev *EvalRepository) GetInvitationForLTIAssignment(courseId uuid.UUID, userId string) (string, error)
- func (ev *EvalRepository) InvalidateInvitationAndCommitQuestionaire(invitationId uuid.UUID, quest Questionaire) error
- func (ev *EvalRepository) Save(fac Faculty) Faculty
- func (ev *EvalRepository) SaveCourse(course Course) Course
- func (ev *EvalRepository) SaveCourseProf(courseprof CourseProf) CourseProf
- func (ev *EvalRepository) SaveForm(form Form) Form
- func (ev *EvalRepository) SaveInvitation(invitation Invitation) Invitation
- func (ev *EvalRepository) SaveModule(module Module) Module
- func (ev *EvalRepository) SaveProf(prof Prof) Prof
- func (ev *EvalRepository) SaveTerm(term Term) Term
- func (ev *EvalRepository) SaveTutor(tutor Tutor) Tutor
- func (ev *EvalRepository) StddevPerConcern(objectId, questionId uuid.UUID) float32
- func (ev *EvalRepository) StddevPerQuestion(questionId uuid.UUID) float32
- type EvalService
- func (ev *EvalService) CreateUser(name, firstname, lastname, pw string) (User, error)
- func (ev *EvalService) DeleteCourse(id uuid.UUID) error
- func (ev *EvalService) DeleteCourseProf(id uuid.UUID) error
- func (ev *EvalService) DeleteModule(id uuid.UUID) error
- func (ev *EvalService) DeleteProf(id uuid.UUID) error
- func (ev *EvalService) DeleteTutor(courseId uuid.UUID, tutorId uuid.UUID) error
- func (ev *EvalService) FindAllCourseProfs(courseId uuid.UUID, profId uuid.UUID) []CourseProf
- func (ev *EvalService) FindAllCourseTutors(courseId uuid.UUID) ([]Tutor, error)
- func (ev *EvalService) FindAllCourses() []Course
- func (ev *EvalService) FindAllFaculties() []Faculty
- func (ev *EvalService) FindAllForms() []Form
- func (ev *EvalService) FindAllModules() []Module
- func (ev *EvalService) FindAllProfs() []Prof
- func (ev *EvalService) FindAllTerms() []Term
- func (ev *EvalService) FindAllTutors(courseId uuid.UUID) ([]Tutor, error)
- func (ev *EvalService) FindCourse(id uuid.UUID) (Course, error)
- func (ev *EvalService) FindCourseProf(id uuid.UUID) (CourseProf, error)
- func (ev *EvalService) FindCourseTutor(courseId, tutorId uuid.UUID) (Tutor, error)
- func (ev *EvalService) FindFaculty(id uuid.UUID) (Faculty, error)
- func (ev *EvalService) FindForm(id uuid.UUID) (Form, error)
- func (ev *EvalService) FindModule(id uuid.UUID) (Module, error)
- func (ev *EvalService) FindOrGenerateCourseInvitations(courseId uuid.UUID, begin, end string) ([]Invitation, error)
- func (ev *EvalService) FindProf(id uuid.UUID) (Prof, error)
- func (ev *EvalService) FindTerm(id uuid.UUID) (Term, error)
- func (ev *EvalService) FindUserByName(name string) User
- func (ev *EvalService) FindUserByNameAndPW(name, pw string) User
- func (ev *EvalService) FindUsers() ([]User, error)
- func (ev *EvalService) GenerateCourseProfReport(courseprofId uuid.UUID) (CourseProfReport, error)
- func (ev *EvalService) GenerateCourseReport(courseId uuid.UUID) (CourseReport, error)
- func (ev *EvalService) GenerateTutorReport(courseId, tutorId uuid.UUID) (TutorReport, error)
- func (ev *EvalService) GetCounts() StatusCounts
- func (ev *EvalService) GetCourseStats(courseId uuid.UUID) CourseStats
- func (ev *EvalService) GetInvitationForLTI(infos LTIInfos) (string, error)
- func (ev *EvalService) RenderInvitationToEmptyForm(invitationID uuid.UUID) (EmptyForm, error)
- func (ev *EvalService) Save(fac Faculty) Faculty
- func (ev *EvalService) SaveCourse(course Course) (Course, error)
- func (ev *EvalService) SaveCourseProf(courseprof CourseProf) (CourseProf, error)
- func (ev *EvalService) SaveForm(form Form) Form
- func (ev *EvalService) SaveModule(module Module) (Module, error)
- func (ev *EvalService) SaveProf(prof Prof) (Prof, error)
- func (ev *EvalService) SaveTerm(term Term) (Term, error)
- func (ev *EvalService) SaveTutor(tutor Tutor) (Tutor, error)
- func (ev *EvalService) SendInvitations(id uuid.UUID, begin, end string, baseUrl, url string, force int32) (SendStatus, error)
- func (ev *EvalService) ValidateAndSaveQuestionaire(invitationId uuid.UUID, quest Questionaire) error
- type Faculty
- type Form
- type Invitation
- type LTIAssignment
- type LTIConfig
- type LTIInfos
- type LabeledObject
- type Module
- type Option
- type Page
- type Pair
- type Prof
- type Question
- type Questionaire
- type Result
- type ResultPair
- type ResultSection
- type Route
- type Routes
- type Section
- type SendStatus
- type SingleAnswer
- type Status
- type StatusCounts
- type StatusSysstats
- type Term
- type TermReport
- type TitledObject
- type Tutor
- type TutorReport
- type User
- Bugs
Constants ¶
const MIN_QUESTIONAIRES int = 5
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbstractForm ¶
type AbstractForm struct {
Base
FormId uuid.UUID `gorm:"type:uuid;" json:"-"`
Pages []Page `gorm:"foreignkey:AbstractFormId" json:"pages"`
}
AbstractForm - Describes an abstract form
type Answer ¶
type Answer struct {
QuestionaireId uuid.UUID `gorm:"type:uuid;" json:"questionaireId"`
QuestionId uuid.UUID `gorm:"type:uuid;index:idx_answer" json:"questionId"`
//BUG(henrik): Concerns must be integrated into the api
Concerns uuid.UUID `gorm:"type:uuid;index:idx_answer" json:"concerns"`
NotApplicable bool `json:"notApplicable"`
Values []string `gorm:"-" json:"values"`
}
type Course ¶
type Course struct {
Base
ModuleId uuid.UUID `gorm:"type:uuid;" json:"moduleId"`
FormId uuid.UUID `gorm:"type:uuid;" json:"formId"`
TermId uuid.UUID `gorm:"type:uuid;" json:"termId"`
Location string `json:"location"`
NumberOfStudents int32 `json:"numberOfStudents"`
Language string `json:"language"`
// Third-party Key, that identifies a course
ThirdPartyKey string `json:"thirdPartyKey,omitempty"`
// current status for sent mails for this course
Progress string `json:"progress"`
// Describes whether, this course is published to profs and tutors.
Clearance string `json:"clearance"`
Tutors []Tutor `json:"tutors"` //BUG(henrik): Autoload them via GORM
}
type CourseProf ¶
type CourseProf struct {
Base
CourseId uuid.UUID `gorm:"type:uuid;" json:"courseId"`
ProfId uuid.UUID `gorm:"type:uuid;" json:"profId"`
}
CourseProf - creates a link between courses and prof
type CourseProfReport ¶
type CourseProfReport struct {
Base
CourseProfId uuid.UUID `gorm:"type:uuid;" json:"courseProfId,omitempty"`
CourseId uuid.UUID `gorm:"type:uuid;" json:"courseId,omitempty"`
Generated time.Time `json:"generated,omitempty"`
CourseReport CourseReport `json:"courseReport,omitempty"`
// contains results only concerning courseProf
Sections []ResultSection `json:"sections,omitempty"`
}
type CourseReport ¶
type CourseReport struct {
Base
CourseId uuid.UUID `gorm:"type:uuid;" json:"courseId,omitempty"`
Generated time.Time `json:"generated,omitempty"`
TutorReports []TutorReport `json:"tutorReports,omitempty"`
// contains results only concerning course
Sections []ResultSection `json:"sections,omitempty"`
}
type CourseStats ¶
type CourseStats struct {
Questionnaires int32 `json:"questionnaires"`
}
type EmptyForm ¶
type EmptyForm struct {
Base
Profs []Prof `json:"profs,omitempty"`
Tutors []Tutor `json:"tutors,omitempty"`
AbstractForm AbstractForm `json:"abstractForm,omitempty"`
Course Course `json:"course,omitempty"`
ModuleName string `json:"moduleName"`
}
EmptyForm - Empty Form to be completed by student.
type EvalAPI ¶
type EvalAPI struct {
EvalService EvalService
}
func ProvideEvalAPI ¶
func ProvideEvalAPI(ev EvalService) EvalAPI
func (*EvalAPI) CourseCourseIdStatsGet ¶
func (*EvalAPI) CourseprofsCourseProfIdDelete ¶
CourseprofsCourseProfIdDelete - Deletes a module by ID
func (*EvalAPI) CourseprofsCourseProfIdGet ¶
CourseprofsCourseProfIdGet - Get a courseprof by ID
func (*EvalAPI) CourseprofsCourseProfIdPatch ¶
CourseprofsCourseProfIdPatch - Change a courseprof by ID
func (*EvalAPI) CourseprofsCourseProfIdReportGet ¶
CourseprofsCourseProfIdReportGet - Get a courseProf report
func (*EvalAPI) CourseprofsPost ¶
CourseprofsPost -
func (*EvalAPI) CoursesCourseIdDelete ¶
CoursesCourseIdDelete - Deletes a module by ID
func (*EvalAPI) CoursesCourseIdGet ¶
CoursesCourseIdGet - Get a course by ID
func (*EvalAPI) CoursesCourseIdInvitationsGet ¶
CoursesCourseIdInvitationsGet -
func (*EvalAPI) CoursesCourseIdInvitationsSendPost ¶
CoursesCourseIdInvitationsSendPost -
func (*EvalAPI) CoursesCourseIdPatch ¶
CoursesCourseIdPatch - Change a course by ID
func (*EvalAPI) CoursesCourseIdReportGet ¶
CoursesCourseIdReportGet - Get a course report
func (*EvalAPI) CoursesCourseIdTutorsGet ¶
CoursesCourseIdTutorsGet -
func (*EvalAPI) CoursesCourseIdTutorsPost ¶
CoursesCourseIdTutorsPost -
func (*EvalAPI) CoursesCourseIdTutorsTutorIdDelete ¶
CoursesCourseIdTutorsTutorIdDelete - Deletes a tutor by ID
func (*EvalAPI) CoursesCourseIdTutorsTutorIdGet ¶
CoursesCourseIdTutorsTutorIdGet - Get a tutor by ID
func (*EvalAPI) CoursesCourseIdTutorsTutorIdPatch ¶
CoursesCourseIdTutorsTutorIdPatch - Change a tutor by ID
func (*EvalAPI) CoursesCourseIdTutorsTutorIdReportGet ¶
CoursesCourseIdTutorsTutorIdReportGet - Get a tutor report
func (*EvalAPI) CreateUserPost ¶
func (*EvalAPI) FacultiesFacultyIdGet ¶
FacultiesFacultyIdGet - Get a faculty by ID
func (*EvalAPI) FacultiesFacultyIdPatch ¶
FacultiesFacultyIdPatch - Change a faculty by ID
func (*EvalAPI) FormsFormIdGet ¶
FormsFormIdGet - Get a form by ID
func (*EvalAPI) FormsFormIdPatch ¶
FormsFormIdPatch - Change a form by ID
func (*EvalAPI) LTILaunch ¶
LTILaunch Performs a search in database for a course with the given ID and returns a invitation.
func (*EvalAPI) ModulesModuleIdDelete ¶
ModulesModuleIdDelete - Deletes a module by ID
func (*EvalAPI) ModulesModuleIdGet ¶
ModulesModuleIdGet - Get a module by ID
func (*EvalAPI) ModulesModuleIdPatch ¶
ModulesModuleIdPatch - Change a module by ID
func (*EvalAPI) ProfsProfIdDelete ¶
ProfsProfIdDelete - Deletes a module by ID
func (*EvalAPI) ProfsProfIdGet ¶
ProfsProfIdGet - Get a prof by ID
func (*EvalAPI) ProfsProfIdPatch ¶
ProfsProfIdPatch - Change a prof by ID
func (*EvalAPI) QuestionaireInvitationIdGet ¶
QuestionaireInvitationIdGet -
func (*EvalAPI) QuestionaireInvitationIdPost ¶
QuestionaireInvitationIdPost -
func (*EvalAPI) TermsTermIdGet ¶
TermsTermIdGet - Get a term by ID
func (*EvalAPI) TermsTermIdPatch ¶
TermsTermIdPatch - Change a term by ID
func (*EvalAPI) TermsTermIdReportGet ¶
TermsTermIdReportGet - Get a term report
type EvalRepository ¶
func ProvideEvalRepository ¶
func ProvideEvalRepository(DB *gorm.DB) EvalRepository
ProvideEvalRepository provides Eval Repository
func (*EvalRepository) AvgPerConcern ¶
func (ev *EvalRepository) AvgPerConcern(objectId, questionId uuid.UUID) float32
func (*EvalRepository) AvgPerQuestion ¶
func (ev *EvalRepository) AvgPerQuestion(questionId uuid.UUID) float32
func (*EvalRepository) CountNotApplicable ¶
func (*EvalRepository) CountOfQuestionaires ¶
func (ev *EvalRepository) CountOfQuestionaires(courseId uuid.UUID) int
func (*EvalRepository) CountPerOption ¶
func (*EvalRepository) CountTutor ¶
CountTutor counts the number the tutor is named, question ID can be null, if question is unique
func (*EvalRepository) CreateUser ¶
func (ev *EvalRepository) CreateUser(name, firstname, lastname, password string) (User, error)
func (*EvalRepository) DeleteAllInvitationsOfCourse ¶
func (ev *EvalRepository) DeleteAllInvitationsOfCourse(courseId uuid.UUID) error
func (*EvalRepository) DeleteAllQuestionairesAndSingleAnswersOfCourse ¶
func (ev *EvalRepository) DeleteAllQuestionairesAndSingleAnswersOfCourse(courseId uuid.UUID) error
func (*EvalRepository) DeleteCourse ¶
func (ev *EvalRepository) DeleteCourse(id uuid.UUID) error
func (*EvalRepository) DeleteCourseProf ¶
func (ev *EvalRepository) DeleteCourseProf(id uuid.UUID) error
func (*EvalRepository) DeleteModule ¶
func (ev *EvalRepository) DeleteModule(id uuid.UUID) error
func (*EvalRepository) DeleteProf ¶
func (ev *EvalRepository) DeleteProf(id uuid.UUID) error
func (*EvalRepository) DeleteTutor ¶
func (ev *EvalRepository) DeleteTutor(courseId, tutorId uuid.UUID) error
func (*EvalRepository) FindAllCourseProfs ¶
func (ev *EvalRepository) FindAllCourseProfs(courseId uuid.UUID, profId uuid.UUID) []CourseProf
FindAllCourseProfs returns all courseprofs
func (*EvalRepository) FindAllCourseProfsForCourse ¶
func (ev *EvalRepository) FindAllCourseProfsForCourse(courseId uuid.UUID) ([]Prof, error)
FindAllCourseProfsForCourse returns all courseProfs profs with id = courseProfId
func (*EvalRepository) FindAllCourseTutors ¶
func (ev *EvalRepository) FindAllCourseTutors(courseId uuid.UUID) ([]Tutor, error)
FindAllTutors returns all tutors
func (*EvalRepository) FindAllCourses ¶
func (ev *EvalRepository) FindAllCourses() []Course
FindAllCourses returns all Courses
func (*EvalRepository) FindAllFaculties ¶
func (ev *EvalRepository) FindAllFaculties() []Faculty
FindAllFaculties returns all Faculties
func (*EvalRepository) FindAllForms ¶
func (ev *EvalRepository) FindAllForms() []Form
FindAllForms loads all forms and their abstractForms
func (*EvalRepository) FindAllModules ¶
func (ev *EvalRepository) FindAllModules() []Module
FindAllModules returns all modules
func (*EvalRepository) FindAllProfs ¶
func (ev *EvalRepository) FindAllProfs() []Prof
FindAllProfs returns all profs
func (*EvalRepository) FindAllSingleAnswers ¶
func (ev *EvalRepository) FindAllSingleAnswers(questionId, objectId uuid.UUID) []SingleAnswer
func (*EvalRepository) FindAllTerms ¶
func (ev *EvalRepository) FindAllTerms() []Term
FindAllTerms find all terms.
func (*EvalRepository) FindCourse ¶
func (ev *EvalRepository) FindCourse(id uuid.UUID) (Course, error)
FindCourse finds a course by id
func (*EvalRepository) FindCourseByThirdPartyKey ¶
func (ev *EvalRepository) FindCourseByThirdPartyKey(thirdPartyKey string) (Course, error)
FindCourseByThirdPartyKey finds a course By ThirdPartyKey
func (*EvalRepository) FindCourseInvitations ¶
func (ev *EvalRepository) FindCourseInvitations(courseId uuid.UUID) ([]Invitation, error)
func (*EvalRepository) FindCourseProf ¶
func (ev *EvalRepository) FindCourseProf(id uuid.UUID) (CourseProf, error)
func (*EvalRepository) FindFaculty ¶
func (ev *EvalRepository) FindFaculty(id uuid.UUID) (Faculty, error)
FindFaculty finds a specific faculty
func (*EvalRepository) FindInvitation ¶
func (ev *EvalRepository) FindInvitation(id uuid.UUID) (Invitation, error)
func (*EvalRepository) FindModule ¶
func (ev *EvalRepository) FindModule(id uuid.UUID) (Module, error)
FindModule finds a module by id
func (*EvalRepository) FindProf ¶
func (ev *EvalRepository) FindProf(id uuid.UUID) (Prof, error)
FindProf finds a prof by id
func (*EvalRepository) FindTerm ¶
func (ev *EvalRepository) FindTerm(id uuid.UUID) (Term, error)
FindTerm Finds a specific Term
func (*EvalRepository) FindTutor ¶
func (ev *EvalRepository) FindTutor(courseId, tutorId uuid.UUID) (Tutor, error)
func (*EvalRepository) FindUserByName ¶
func (ev *EvalRepository) FindUserByName(name string) User
func (*EvalRepository) FindUserByNameAndPW ¶
func (ev *EvalRepository) FindUserByNameAndPW(name, password string) User
func (*EvalRepository) FindUsers ¶
func (ev *EvalRepository) FindUsers() ([]User, error)
func (*EvalRepository) GetCount ¶
func (ev *EvalRepository) GetCount(tablename string) int32
func (*EvalRepository) GetInvitationForLTIAssignment ¶
func (*EvalRepository) InvalidateInvitationAndCommitQuestionaire ¶
func (ev *EvalRepository) InvalidateInvitationAndCommitQuestionaire(invitationId uuid.UUID, quest Questionaire) error
func (*EvalRepository) Save ¶
func (ev *EvalRepository) Save(fac Faculty) Faculty
Save upserts a faculty, i.e. if a faculty with this id exists it will be created.
func (*EvalRepository) SaveCourse ¶
func (ev *EvalRepository) SaveCourse(course Course) Course
SaveCourse upserts a term, i.e. if a course with this id exists it will be created.
func (*EvalRepository) SaveCourseProf ¶
func (ev *EvalRepository) SaveCourseProf(courseprof CourseProf) CourseProf
Save^ upserts a term, i.e. if a courseprof with this id exists it will be created.
func (*EvalRepository) SaveForm ¶
func (ev *EvalRepository) SaveForm(form Form) Form
SaveForm upserts a form, i.e. if a form with this id exists it will be created.
func (*EvalRepository) SaveInvitation ¶
func (ev *EvalRepository) SaveInvitation(invitation Invitation) Invitation
SaveInvitation upserts a term, i.e. if a invitation with this id exists it will be created.
func (*EvalRepository) SaveModule ¶
func (ev *EvalRepository) SaveModule(module Module) Module
SaveModule upserts a term, i.e. if a module with this id exists it will be created.
func (*EvalRepository) SaveProf ¶
func (ev *EvalRepository) SaveProf(prof Prof) Prof
SaveProf upserts a prof, i.e. if a prof with this id exists it will be created.
func (*EvalRepository) SaveTerm ¶
func (ev *EvalRepository) SaveTerm(term Term) Term
SaveTerm upserts a term, i.e. if a term with this id exists it will be created.
func (*EvalRepository) SaveTutor ¶
func (ev *EvalRepository) SaveTutor(tutor Tutor) Tutor
SaveTutor upserts a term, i.e. if a tutor with this id exists it will be created.
func (*EvalRepository) StddevPerConcern ¶
func (ev *EvalRepository) StddevPerConcern(objectId, questionId uuid.UUID) float32
func (*EvalRepository) StddevPerQuestion ¶
func (ev *EvalRepository) StddevPerQuestion(questionId uuid.UUID) float32
type EvalService ¶
type EvalService struct {
EvalRepository EvalRepository
}
func ProvideEvalService ¶
func ProvideEvalService(rep EvalRepository) EvalService
func (*EvalService) CreateUser ¶
func (ev *EvalService) CreateUser(name, firstname, lastname, pw string) (User, error)
func (*EvalService) DeleteCourse ¶
func (ev *EvalService) DeleteCourse(id uuid.UUID) error
func (*EvalService) DeleteCourseProf ¶
func (ev *EvalService) DeleteCourseProf(id uuid.UUID) error
func (*EvalService) DeleteModule ¶
func (ev *EvalService) DeleteModule(id uuid.UUID) error
func (*EvalService) DeleteProf ¶
func (ev *EvalService) DeleteProf(id uuid.UUID) error
func (*EvalService) DeleteTutor ¶
func (*EvalService) FindAllCourseProfs ¶
func (ev *EvalService) FindAllCourseProfs(courseId uuid.UUID, profId uuid.UUID) []CourseProf
func (*EvalService) FindAllCourseTutors ¶
func (ev *EvalService) FindAllCourseTutors(courseId uuid.UUID) ([]Tutor, error)
func (*EvalService) FindAllCourses ¶
func (ev *EvalService) FindAllCourses() []Course
func (*EvalService) FindAllFaculties ¶
func (ev *EvalService) FindAllFaculties() []Faculty
func (*EvalService) FindAllForms ¶
func (ev *EvalService) FindAllForms() []Form
func (*EvalService) FindAllModules ¶
func (ev *EvalService) FindAllModules() []Module
func (*EvalService) FindAllProfs ¶
func (ev *EvalService) FindAllProfs() []Prof
func (*EvalService) FindAllTerms ¶
func (ev *EvalService) FindAllTerms() []Term
func (*EvalService) FindAllTutors ¶
func (ev *EvalService) FindAllTutors(courseId uuid.UUID) ([]Tutor, error)
func (*EvalService) FindCourse ¶
func (ev *EvalService) FindCourse(id uuid.UUID) (Course, error)
func (*EvalService) FindCourseProf ¶
func (ev *EvalService) FindCourseProf(id uuid.UUID) (CourseProf, error)
func (*EvalService) FindCourseTutor ¶
func (ev *EvalService) FindCourseTutor(courseId, tutorId uuid.UUID) (Tutor, error)
func (*EvalService) FindFaculty ¶
func (ev *EvalService) FindFaculty(id uuid.UUID) (Faculty, error)
func (*EvalService) FindModule ¶
func (ev *EvalService) FindModule(id uuid.UUID) (Module, error)
func (*EvalService) FindOrGenerateCourseInvitations ¶
func (ev *EvalService) FindOrGenerateCourseInvitations(courseId uuid.UUID, begin, end string) ([]Invitation, error)
FindOrGenerateCourseInvitations finds or generates Course Invititations based on no of students, if there is a mismatch in numbers, they will be regenerated
func (*EvalService) FindUserByName ¶
func (ev *EvalService) FindUserByName(name string) User
func (*EvalService) FindUserByNameAndPW ¶
func (ev *EvalService) FindUserByNameAndPW(name, pw string) User
func (*EvalService) FindUsers ¶
func (ev *EvalService) FindUsers() ([]User, error)
func (*EvalService) GenerateCourseProfReport ¶
func (ev *EvalService) GenerateCourseProfReport(courseprofId uuid.UUID) (CourseProfReport, error)
GenerateCourseReport generates a report for course
func (*EvalService) GenerateCourseReport ¶
func (ev *EvalService) GenerateCourseReport(courseId uuid.UUID) (CourseReport, error)
GenerateCourseReport generates a report for course
func (*EvalService) GenerateTutorReport ¶
func (ev *EvalService) GenerateTutorReport(courseId, tutorId uuid.UUID) (TutorReport, error)
GenerateTutorReport generates a Tutor report
func (*EvalService) GetCounts ¶
func (ev *EvalService) GetCounts() StatusCounts
func (*EvalService) GetCourseStats ¶
func (ev *EvalService) GetCourseStats(courseId uuid.UUID) CourseStats
func (*EvalService) GetInvitationForLTI ¶
func (ev *EvalService) GetInvitationForLTI(infos LTIInfos) (string, error)
func (*EvalService) RenderInvitationToEmptyForm ¶
func (ev *EvalService) RenderInvitationToEmptyForm(invitationID uuid.UUID) (EmptyForm, error)
func (*EvalService) Save ¶
func (ev *EvalService) Save(fac Faculty) Faculty
func (*EvalService) SaveCourse ¶
func (ev *EvalService) SaveCourse(course Course) (Course, error)
func (*EvalService) SaveCourseProf ¶
func (ev *EvalService) SaveCourseProf(courseprof CourseProf) (CourseProf, error)
func (*EvalService) SaveForm ¶
func (ev *EvalService) SaveForm(form Form) Form
func (*EvalService) SaveModule ¶
func (ev *EvalService) SaveModule(module Module) (Module, error)
func (*EvalService) SendInvitations ¶
func (ev *EvalService) SendInvitations(id uuid.UUID, begin, end string, baseUrl, url string, force int32) (SendStatus, error)
SendInvitations finds or generates invitations and send them to the plattform
func (*EvalService) ValidateAndSaveQuestionaire ¶
func (ev *EvalService) ValidateAndSaveQuestionaire(invitationId uuid.UUID, quest Questionaire) error
ValidateAndSaveQuestionaire validates and saves a questionaire. Beaware, that there can only exist one subteacher in answer
type Form ¶
type Form struct {
Base
Name string `json:"name"`
TermId uuid.UUID `gorm:"type:uuid;" json:"termId"`
AbstractForm AbstractForm `json:"abstractForm" gorm:"foreignkey:FormId"`
}
type Invitation ¶
type Invitation struct {
Base
CourseId uuid.UUID `gorm:"type:uuid;" json:"courseId"`
ValidBegin string `json:"validBegin"`
ValidEnd string `json:"validEnd"`
Used bool `json:"used,omitempty"`
}
Invitation - Onetime invitation to take a certain evaluation of a course.
type LTIAssignment ¶
type LabeledObject ¶
type LabeledObject struct {
// Map of translations for a given string. A string might contain markdown code.
Label map[string]string `gorm:"-" json:"label"`
LabelJson string `json:"-"`
}
func (*LabeledObject) AfterFind ¶
func (lo *LabeledObject) AfterFind() (err error)
AfterFind is called by GORM
func (*LabeledObject) BeforeSave ¶
func (lo *LabeledObject) BeforeSave() (err error)
BeforeSave is called by GORM
type Module ¶
type Module struct {
Base
Name string `json:"name"`
Description string `json:"description"`
// Determines which faculty is in charge.
FacultyId uuid.UUID `gorm:"type:uuid;" json:"facultyId"`
}
Module - used to keep track of courses over many years.
type Option ¶
type Option struct {
Base
LabeledObject
Position int32 `json:"position"`
Value int32 `json:"value"`
QuestionId uuid.UUID `gorm:"type:uuid" json:"-"`
}
Option - Possibly labeled selection option
type Page ¶
type Page struct {
Base
Position int32 `json:"position"`
AbstractFormId uuid.UUID `gorm:"type:uuid" json:"-"`
Sections []Section `gorm:"foreignkey:PageId" json:"sections"`
}
Page - Group of sections that belong together
type Prof ¶
type Prof struct {
Base
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Title string `json:"title"`
// Determines, whether public reports can include, this persons results.
Censored bool `json:"censored"`
// Date of agreement that results can be published
CensoredDate string `json:"censoredDate"`
// Used to communicate to prof.
Email string `json:"email"`
}
type Question ¶
type Question struct {
Base
Position int32 `json:"position"`
SectionId uuid.UUID `gorm:"type:uuid" json:"-"`
// Unique, humanreadable label.
Shortcode string `json:"shortcode"`
TitledObject
// Whether this question is a single choice or multiple choice question
IsMulti bool `json:"isMulti"`
// Determines whether it is a free text form. Can not occur with isMulti and hasOtherOption.
IsComment bool `json:"isComment"`
// Some questions have an option that allows custom answers
HasOtherOption bool `json:"hasOtherOption"`
// Question either concerns course, lecturer or tutor.
Regards string `json:"regards"`
// Some questions need a not applicable option.
HasNotApplicableOption bool `json:"hasNotApplicableOption,omitempty"`
// isSlider: Render as slider.
IsSlider bool `json:"isSlider,omitempty"`
// Defines how results should be displayed.
Visualizer string `json:"visualizer"`
// Array of possibly labeled selection options.
Options []Option `gorm:"foreignkey:QuestionId" json:"options"`
}
type Questionaire ¶
Questionaire - A fully completed form.
type Result ¶
type Result struct {
Base
LabeledObject
// indicate, how result is displayed.
Visualizer string `json:"visualizer,omitempty"`
Shortcode string `json:"shortcode,omitempty"`
Values []ResultPair `json:"values,omitempty"`
NotApplicableCount int `json:"notApplicableCount,omitempty"`
// If applicable return the average of this field
Avg float32 `json:"avg,omitempty"`
// If applicable return the standard deviation of this answer
Stddev float32 `json:"stddev,omitempty"`
// If applicable return the average of this question globally.
AvgQuestion float32 `json:"avgQuestion,omitempty"`
// If applicable return the standard deviation of this question globally.
StddevQuestion float32 `json:"stddevQuestion,omitempty"`
}
type ResultPair ¶
type ResultPair struct {
// Map of translations for a given string. A string might contain markdown code.
LabeledObject
Value string `json:"value,omitempty"`
Position int32 `json:"position,omitempty"`
}
type ResultSection ¶
type ResultSection struct {
Base
LabeledObject
Results []Result `json:"results,omitempty"`
}
type Route ¶
type Route struct {
// Name is the name of this Route.
Name string
// Method is the string for the HTTP method. ex) GET, POST etc..
Method string
// Pattern is the pattern of the URI.
Pattern string
// HandlerFunc is the handler function of this route.
HandlerFunc gin.HandlerFunc
}
Route is the information for every URI.
type SendStatus ¶
type SingleAnswer ¶
type SingleAnswer struct {
QuestionaireId uuid.UUID `gorm:"type:uuid;" json:"questionaireId"`
QuestionId uuid.UUID `gorm:"type:uuid;index:idx_singleanswer" json:"questionId"`
//BUG(henrik): Concerns must be integrated into the api
Concerns uuid.UUID `gorm:"type:uuid;index:idx_singleanswer" json:"concerns"`
NotApplicable bool `json:"notApplicable"`
Value string `json:"value"`
}
type Status ¶
type Status struct {
Generated time.Time `json:"generated,omitempty"`
Counts StatusCounts `json:"counts,omitempty"`
Sysstats StatusSysstats `json:"sysstats,omitempty"`
}
Status struct for Status
type StatusCounts ¶
type StatusCounts struct {
Terms int32 `json:"terms,omitempty"`
Tutors int32 `json:"tutors,omitempty"`
Options int32 `json:"options,omitempty"`
Profs int32 `json:"profs,omitempty"`
Courseprofs int32 `json:"courseprofs,omitempty"`
Courses int32 `json:"courses,omitempty"`
Questionaires int32 `json:"questionaires,omitempty"`
Singleanswers int32 `json:"singleanswers,omitempty"`
Invitations int32 `json:"invitations,omitempty"`
}
StatusCounts struct for StatusCounts
type StatusSysstats ¶
type StatusSysstats struct {
Ram float32 `json:"ram,omitempty"`
Ram10 float32 `json:"ram10,omitempty"`
Cpu float32 `json:"cpu,omitempty"`
Cpu10 float32 `json:"cpu10,omitempty"`
}
StatusSysstats struct for StatusSysstats
type TermReport ¶
type TermReport struct {
Base
Generated time.Time `json:"generated,omitempty"`
TermId uuid.UUID `gorm:"type:uuid;" json:"termId,omitempty"`
FacultyId uuid.UUID `gorm:"type:uuid;" json:"facultyId,omitempty"`
Censored bool `json:"censored,omitempty"`
CourseProfReports []CourseProfReport `json:"courseProfReports,omitempty"`
}
type TitledObject ¶
type TitledObject struct {
// Map of translations for a given string. A string might contain markdown code.
Title map[string]string `gorm:"-" json:"title"`
TitleJson string `json:"-"`
}
func (*TitledObject) AfterFind ¶
func (lo *TitledObject) AfterFind() (err error)
AfterFind is called by GORM
func (*TitledObject) BeforeSave ¶
func (lo *TitledObject) BeforeSave() (err error)
BeforeSave is called by GORM
type Tutor ¶
type Tutor struct {
Base
Name string `json:"name"`
// Determines, whether public reports can include, this persons results.
Censored bool `json:"censored"`
// Date of agreement that results can be published
CensoredDate string `json:"censoredDate"`
// Third-party Key, that identifies a tutor.
ThirdPartyKey string `json:"thirdPartyKey,omitempty"`
Email string `json:"email"`
CourseId uuid.UUID `gorm:"type:uuid;" json:"courseId,omitempty"`
}
Tutor - Subteacher, only sees portions of the results of his course. Currently they are created for every year newly.
type TutorReport ¶
Notes ¶
Bugs ¶
if faculty id doesn't exists the faculty will be created.
check for errors!
Moodle is not standard compliant!
return only subset
return only subset
return only subset
Privacy
no validity check are done (yet!)
no validity check is done (yet!)
no validity check is done (yet!)
no validity check is done (yet!)
no validity check is done (yet!)
Use right format in parse!
we need the id of courseProf
Use right format in parse!
add isTutorselect!
Concerns must be integrated into the api
Concerns must be integrated into the api
Autoload them via GORM
Replace with db lookup!
Replace with db/casbin lookup!
Source Files
¶
- api_default.go
- eval_repository.go
- eval_service.go
- model_abstract_form.go
- model_answer.go
- model_base.go
- model_course.go
- model_course_prof.go
- model_course_prof_report.go
- model_course_report.go
- model_course_stats.go
- model_empty_form.go
- model_faculty.go
- model_form.go
- model_invitation.go
- model_labeled_object.go
- model_ltiassignment.go
- model_module.go
- model_option.go
- model_page.go
- model_prof.go
- model_question.go
- model_questionaire.go
- model_result.go
- model_result_pair.go
- model_result_section.go
- model_section.go
- model_status.go
- model_status_counts.go
- model_status_sysstats.go
- model_term.go
- model_term_report.go
- model_tutor.go
- model_tutor_report.go
- routers.go
- wire_gen.go