A bug in quiz.admin.inc
In line: 1940 $filter['group'] .= " GROUP BY qnrs.uid"; should be enclosed in if-mysql check. It's not at the moment, hence
there's an invalid syntax GROUP BY qnrs.uid"; GROUP BY qnrs.uid, u.uid, u.name, qnrs.result_id, qnrs.score, qnrs.is_evaluated, qnrs.time_start, qnrs.time_end, qnp.pass_rate"; produced in PostgreSQL.
Dirty fix (just commented non-postgres stuff):
//$filter['group'] .= " GROUP BY qnrs.uid";
if ($db_type == 'pgsql') {
$filter['group'] .= " GROUP BY qnrs.uid, u.uid, u.name, qnrs.result_id, qnrs.score, qnrs.is_evaluated, qnrs.time_start, qnrs.time_end, qnp.pass_rate";
}
Comments
Comment #1
sebzur commentedAnd another thing, I had to add some explicit type casting, to have no error wher quering for some quize statistics: (quiz.module:2159-2166)
Comment #2
sebzur commentedAnd another one issue. Quiz complains when submited and sent via e-mail to authror:
fixed with explicit casting, line 2068 in quiz.module:
Comment #3
falcon commentedMarking this one as postponed. If we get a patch in here someone might review and commit it, but I don't think the current maintainers have the time to add postgres support :/
Comment #4
sebzur commentedOK, what can I do to help? I need the Quiz dramatically - I'm patching it version by version on my own - (I've even tried to port my DB form Postgres to MySQL, but it's quite complicated, though)...
So - shall I attach a patch file here? There are only minor changes, so It would be great to apply it and have the issue closed. I could even monitor Postgres compliance for Quiz.
Comment #5
falcon commentedYes, please attach a patch file here, and it would be great if you could monitor Postgres compliance for Quiz in the future.
Comment #6
ezraw commentedComment #7
ezraw commentedComment #8
ezraw commentedComment #9
thehong commentedComment #10
djdevin