Fix typos
This commit is contained in:
parent
08aa7d278c
commit
084d39f6cf
5 changed files with 12 additions and 12 deletions
|
|
@ -70,11 +70,11 @@ func (e Exercice) GetMCQ() ([]MCQ, error) {
|
|||
|
||||
// GetMCQbyChoice returns the MCQ corresponding to a choice ID.
|
||||
func GetMCQbyChoice(cid int64) (m MCQ, c MCQ_entry, err error) {
|
||||
if errr := DBQueryRow("SELECT id_mcq, id_exercice, title FROM exercice_mcq WHERE id_mcq = (SELECT id_mcq FROM mcq_entries WHERE id_mcq_entry = ?)", cid).Scan(&m.Id, &m.IdExercice, &m.Title); err != nil {
|
||||
if errr := DBQueryRow("SELECT id_mcq, id_exercice, title FROM exercice_mcq WHERE id_mcq = (SELECT id_mcq FROM mcq_entries WHERE id_mcq_entry = ?)", cid).Scan(&m.Id, &m.IdExercice, &m.Title); errr != nil {
|
||||
return MCQ{}, MCQ_entry{}, errr
|
||||
}
|
||||
|
||||
if entries_rows, errr := DBQuery("SELECT id_mcq_entry, label, response FROM mcq_entries WHERE id_mcq = ?", m.Id); err != nil {
|
||||
if entries_rows, errr := DBQuery("SELECT id_mcq_entry, label, response FROM mcq_entries WHERE id_mcq = ?", m.Id); errr != nil {
|
||||
return MCQ{}, MCQ_entry{}, errr
|
||||
} else {
|
||||
defer entries_rows.Close()
|
||||
|
|
|
|||
Reference in a new issue