Hello,
I have upgraded the Quiz module from version 4.0-beta2 to 5.0-alpha10. When i visit ../admin/quiz/reports/score-long-answer i get an error.
In my dblog it is saying the column `result_id` doesn't exists.
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.result_id' in 'field list': SELECT a.result_id AS result_id, a.question_nid AS question_nid, a.question_vid AS question_vid, a.answer_feedback AS answer_feedback, a.answer_feedback_format AS answer_feedback_format, r.title AS title, qnr.time_end AS time_end, qnr.time_start AS time_start, qnr.uid AS uid FROM {quiz_long_answer_user_answers} a INNER JOIN {node_revision} r ON a.question_vid = r.vid INNER JOIN {quiz_node_results} qnr ON a.result_id = qnr.result_id INNER JOIN {node} n ON qnr.nid = n.nid WHERE (a.is_evaluated = :db_condition_placeholder_0) AND( (n.uid = :db_condition_placeholder_1) OR (qnr.uid = :db_condition_placeholder_2) ); Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => 1 ) in LongAnswerResponse::fetchAllUnscoredAnswers() (line 219 of C:\sites\psp\sites\all\modules\contrib\quiz\question_types\long_answer\long_answer.classes.inc).
Can someone please help me out, because this error is on a live site.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2542644-sql-error-answer-evaluation.patch | 2.8 KB | martini9011 |
Comments
Comment #1
djdevinMaybe a silly question but did you run update.php?
Comment #2
djdevinI reproduced this. The long answer grading is broken.
As a workaround, you can still go to the individual user's attempt (in node/X/quiz), and grade the answer there.
Comment #3
martini9011 CreditAttribution: martini9011 commentedI Just did a "clean" install and ran into the same issue. This tells us this issue is not so much caused by updating from 4.0-beta2 to 5.0-alpha10, but that it's an issue within the 5.0-alpha10 version.
Comment #4
djdevinComment #5
martini9011 CreditAttribution: martini9011 commentedThis issue occurs from version 7.x-5.0-alpha8. Downgrading to 7.x-5.0-alpha7 seems to resolve the issue for now.EDIT: Downgrading does not solve the issue, since it's database related. I tested with a clean 7.x-5.0-alpha7 install.
Comment #6
martini9011 CreditAttribution: martini9011 commentedI have updated the SQL statements for the Long answer evaluation and the Short answer evaluation and it seems to be working.
Please confirm if this is working
Comment #7
martini9011 CreditAttribution: martini9011 commentedComment #8
djdevinThanks! That works and I committed the change.
Leaving this open to add tests.