Documentation
¶
Index ¶
Constants ¶
View Source
const ( FreeFormQuestion = "free_form" LabelTheDiagramQuestion = "label-the-diagram" MathematicalQuestion = "math" MultipleChoiceQuestion = "multiple_choice" MixedQuestion = "mixed" )
View Source
const MaxFreeFormLines = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EducationLevel ¶
type EducationLevel string
const ( Standard1 EducationLevel = "Standard 1" Standard2 EducationLevel = "Standard 2" Standard3 EducationLevel = "Standard 3" Standard4 EducationLevel = "Standard 4" Standard5 EducationLevel = "Standard 5" Standard6 EducationLevel = "Standard 6" Standard7 EducationLevel = "Standard 7" Standard8 EducationLevel = "Standard 8" Form1 EducationLevel = "Form 1" Form2 EducationLevel = "Form 2" Form3 EducationLevel = "Form 3" Form4 EducationLevel = "Form 4" Form5 EducationLevel = "Form 5" ALevels EducationLevel = "A-Levels" )
type ExamPaper ¶
type ExamPaper struct {
Title string `json:"title"`
ClassName EducationLevel `json:"className"`
SchoolName string `json:"schoolName"`
TeacherName string `json:"teacherName"`
SubjectName string `json:"subjectName"`
TimeAllowed string `json:"timeAllowed"`
ExamDate string `json:"examDate"` // TODO: use time.Time
IsDoubleColumn bool `json:"isDoubleColumn"`
Questions []ExamQuestion `json:"questions"`
}
func (*ExamPaper) TotalMarks ¶
TotalMarks calculates the total marks for the Questions
func (*ExamPaper) Validate ¶
func (p *ExamPaper) Validate() ValidationErrors
type ExamQuestion ¶
type ExamQuestion struct {
Section string `json:"section"`
Title string `json:"title"`
Content string `json:"content"`
QuestionType string `json:"questionType"`
AnswerOptions []MultipleChoiceOption `json:"answerOptions"`
SortOrder int `json:"sortOrder"`
Marks int `json:"marks"`
Image ImageInfo `json:"-"`
}
func (*ExamQuestion) WriteDocx ¶
func (q *ExamQuestion) WriteDocx(docxw *gingfrederikdocx.File) error
func (*ExamQuestion) WriteDocxLib ¶
func (q *ExamQuestion) WriteDocxLib(docxw *docxlib.DocxLib) error
type MultipleChoiceOption ¶
type ValidationErrors ¶
type ValidationErrors []string
func (ValidationErrors) ToJSON ¶
func (v ValidationErrors) ToJSON() string
Click to show internal directories.
Click to hide internal directories.