Documentation
¶
Index ¶
- type AIGetVivaQuestionsRequest
- type AIGiveHintRequest
- type AIVerifyConstraintsAssignmentRequest
- type AIVerifyConstraintsInstantTestRequest
- type AddStudentToBlacklistRequest
- type AddUserToClassroomRequest
- type Answer
- type Assignment
- type AssignmentSubmission
- type AssignmentSubmitRequest
- type ChangeActiveStatusInstantTestRequest
- type Classroom
- type CreateAssignmentRequest
- type CreateClassroomRequest
- type CreateInstantTestRequest
- type ExampleTestCase
- type ExcuseStudentFromBlacklistRequest
- type ForgotPasswordRequest
- type GetAssignmentForEditRequest
- type GetAssignmentLeaderboardRequest
- type GetAssignmentRequest
- type GetAssignmentSubmissionsRequest
- type GetInstantTestRequest
- type GetStudentSubmissionRequest
- type InstantTest
- type InstantTestGetSubmissionsRequest
- type InstantTestSubmission
- type InstantTestSubmitRequest
- type IsTeacherFromTokenRequest
- type ListAssignmentsRequest
- type PopulateGoogleSheetAssignmentSubmissionsRequest
- type PopulateGoogleSheetInstantTestSubmissionsRequest
- type Question
- type ResetPasswordRequest
- type RunRequest
- type SaveEditedAssignmentRequest
- type SetVivaScoreRequest
- type SignInRequestEmail
- type SignInRequestUniversityID
- type SignUpRequest
- type TestCase
- type User
- type VerifiedTestCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIGiveHintRequest ¶
type AIVerifyConstraintsAssignmentRequest ¶
type AIVerifyConstraintsAssignmentRequest struct {
AssignmentID uint `json:"assignmentID"`
}
type AIVerifyConstraintsInstantTestRequest ¶
type AIVerifyConstraintsInstantTestRequest struct {
PrivateCode string `json:"privateCode"`
}
AI Stuff
type AddStudentToBlacklistRequest ¶
type AddStudentToBlacklistRequest struct {
AssignmentID uint `json:"assignmentID"`
}
type AddUserToClassroomRequest ¶
type AddUserToClassroomRequest struct {
ClassroomCode string `json:"classroomCode"`
}
type Answer ¶
type Answer struct { gorm.Model ParentID uint `json:"parentID"` ParentType string `json:"parentType"` QuestionID uint `json:"questionID"` Code string `json:"code"` TestCases []VerifiedTestCase `gorm:"constraint:OnDelete:CASCADE;" json:"testCases"` Score int `json:"score"` // total score for this particular question AIVerified bool `json:"AIVerified"` // if AI has verified the code AIVerdict bool `json:"AIVerdict"` // if AI has verified the code, this is the verdict. If true, it means it's aproved. else something is fishy AIVerdictFailReason string `json:"AIVerdictFailReason"` // if AI has flagged this answer, the reason why AIVivaScore int `json:"AIVivaScore"` // how many viva questions did the student answer correctly AIVivaTaken bool `json:"AIVivaTaken"` // if the student has taken the viva, or somehow hit back and not answered }
type Assignment ¶
type Assignment struct { gorm.Model Name string `json:"name"` Description string `json:"description"` StartTime time.Time `json:"startTime"` EndTime time.Time `json:"endTime"` EnableAIViva bool `json:"enableAIViva"` EnableAIHint bool `json:"enableAIHint"` EnableLeaderboard bool `json:"enableLeaderboard"` MaxWindowChangeAttempts int `json:"maxWindowChangeAttempts"` Classrooms []Classroom `gorm:"many2many:assignment_classroom;" json:"classrooms"` Questions []Question `gorm:"polymorphic:Parent;" json:"questions"` BlacklistedStudents []User `gorm:"many2many:assignment_user_blacklist;" json:"blacklistedStudents"` // students who've been caught cheating Submissions []AssignmentSubmission `gorm:"foreignKey:AssignmentID" json:"submissions"` }
aka test
type AssignmentSubmission ¶
type AssignmentSubmitRequest ¶
type Classroom ¶
type Classroom struct { gorm.Model Name string `json:"name"` Code string `json:"code"` // this is the code that students will use to join the classroom TeacherCode string `json:"teacherCode"` // this is the code that teachers will use to join the classroom Users []User `json:"users" gorm:"many2many:user_classroom;"` Assignments []Assignment `json:"assignments" gorm:"many2many:assignment_classroom;"` }
aka class
type CreateAssignmentRequest ¶
type CreateAssignmentRequest struct { Name string `json:"name"` Description string `json:"description"` Questions []Question `json:"questions"` ClassroomIDs []uint `json:"classroomIDs"` // IDs of the classroom the assignment is to be assigned to StartTime time.Time `json:"startTime"` // start time of the assignment EndTime time.Time `json:"endTime"` // end time of the assignment EnableAIViva bool `json:"enableAIViva"` EnableAIHint bool `json:"enableAIHint"` EnableLeaderboard bool `json:"enableLeaderboard"` MaxWindowChangeAttempts int `json:"maxWindowChangeAttempts"` }
type CreateClassroomRequest ¶
type CreateClassroomRequest struct {
Name string `json:"name"`
}
type ExampleTestCase ¶
type ForgotPasswordRequest ¶
type ForgotPasswordRequest struct {
UniversityID string `json:"universityID"`
}
type GetAssignmentForEditRequest ¶
type GetAssignmentForEditRequest struct {
AssignmentID uint `json:"assignmentID"`
}
type GetAssignmentLeaderboardRequest ¶
type GetAssignmentLeaderboardRequest struct {
AssignmentID uint `json:"assignmentID"`
}
type GetAssignmentRequest ¶
type GetAssignmentSubmissionsRequest ¶
type GetAssignmentSubmissionsRequest struct {
AssignmentID uint `json:"assignmentID"`
}
type GetInstantTestRequest ¶
type GetInstantTestRequest struct {
PublicCode string `json:"publicCode"`
}
type GetStudentSubmissionRequest ¶
type GetStudentSubmissionRequest struct {
AssignmentID uint `json:"assignmentID"`
}
type InstantTest ¶
type InstantTest struct { gorm.Model Email string `json:"email"` PrivateCode string `json:"privateCode"` PublicCode string `json:"publicCode"` IsActive bool `json:"isActive"` Questions []Question `gorm:"polymorphic:Parent;" json:"questions"` Submissions []InstantTestSubmission `gorm:"foreignKey:InstantTestID" json:"submissions"` BlacklistedUniversityIDs pq.StringArray `json:"blacklistedUniversityIDs" gorm:"type:text[]"` // students who've been caught cheatingy }
Instant tests are tests that are created on the fly by teachers. Private code is not shared. This code is used to edit the test Public code is shared with students. This code is used to attempt the test
type InstantTestGetSubmissionsRequest ¶
type InstantTestGetSubmissionsRequest struct {
PrivateCode string `json:"privateCode"`
}
type InstantTestSubmission ¶
type IsTeacherFromTokenRequest ¶
type IsTeacherFromTokenRequest struct {
Token string `json:"token"`
}
type ListAssignmentsRequest ¶
type ListAssignmentsRequest struct {
ClassroomCode string `json:"classroomCode"`
}
type Question ¶
type Question struct { gorm.Model ParentID uint `json:"parentID"` ParentType string `json:"parentType"` Title string `json:"title"` Question string `json:"question"` ExampleCases []ExampleTestCase `json:"exampleCases"` PreWrittenCode string `json:"preWrittenCode"` TestCases []TestCase `json:"testCases"` Constraints pq.StringArray `json:"constraints" gorm:"type:text[]"` // list of constraints that the code must satisfy. Used for AI Verification Languages pq.StringArray `json:"languages" gorm:"type:text[]"` // languages the student is allowed to submit in }
type ResetPasswordRequest ¶
type RunRequest ¶
type RunRequest struct { Code string `json:"code"` Language string `json:"language"` // this will be the extension of the file. Example: "py" for python, "c" for C, "cpp" for C++, "java" for Java Input string `json:"input"` }
this is the request for /run. It only runs the given code and sends the output back
type SaveEditedAssignmentRequest ¶
type SaveEditedAssignmentRequest struct {
EditedAssignment Assignment `json:"editedAssignment"`
}
type SetVivaScoreRequest ¶
type SignInRequestEmail ¶
type SignUpRequest ¶
type User ¶
type User struct { gorm.Model UniversityID string `json:"universityID"` // this may be employee ID or student ID (EMP ID and SRN in terms of PES) Name string `json:"name"` Email string `json:"email"` Password string `json:"password"` IsTeacher bool `json:"isTeacher"` Classrooms []Classroom `gorm:"many2many:user_classroom;" json:"classrooms"` Submissions []AssignmentSubmission `json:"submissions"` }
Click to show internal directories.
Click to hide internal directories.