Hi, Just to add another possiblilty.
I encountered the same problem and found the solution. I actually added the same comment in https://tracker.moodle.org/browse/MDL-27312
Hope it helps
I just came into this problem recently and hope the solution that I used may help in this long pending issue.
I am using Moodle version 1.9.9 with Oracle 10g as the database.
The problem appeared when user view the submitted assignment and he clicks on the comment header field to sort the students by comment.
Apparently, the SQL statement that retrieves the list of student failed as a result of the CLOB data type for the comment field. Below is the error message when the SQL statment is executed.
ORA-00932: inconsistent datatypes: expected - got CLOB
The error occurs in the sort field when 'submissioncomment' field is included in the ORDER BY. I believe this only happens with oracle database.
The code can be found in mod/assignment/lib.php
The SQL statement occurs somewhere at line 1193 (may differ depending on the version). A search for the text '$table->get_sql_where()' will locate the sort statement which will be concatenated with the main SQL statement.
Fix: as it is impossible for me to change the database field type, I resorted to removing the 'submissioncomment' field from the sort statement.
Will it happen in 2.x version? I believe it is very likely.
Additional note: Since the fields for the sort criteria is stored in session, once you click on comment field, there is no way to display the list again until the session is being destroyed.