Moodle 2.3.x ajax marking block PostgreSQL compatibility fix

I just added the wonderful ajax marking block to our Moodle system. After little testing it seems that this block has some issues with our PostgreSQL backend.

In detail one of the major queries are aborting with the meaningful error message:

ERROR: failed to find conversion function from “unknown” to text

nice stuff 🙂

It turns out that the usage of a “string as alias” are not handled correctly in postgresql, or so,… this part needs an explicit cast “::text”

If you also encountered this problem, you can download an updated query_base.class.php from -> here

have fun

Mario

2 thoughts on “Moodle 2.3.x ajax marking block PostgreSQL compatibility fix”

  1. Hi Mario

    Glad you like the block:)

    Thanks for finding this bug and working out a fix. I’ve sorted this out in the main codebase now using an adaptation of your code, and it will be OK in future releases.

    Please let me know if you find any other issues.

    Matt

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.