Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1075

RS on QTI statistics of FIB questions with PostgreSQL as database

    XMLWordPrintable

    Details

      Description

      When trying to watch the statistics of a FIB question (configured as case sensitive) a RS appears. The cause is a PostgreSQL error: "Spalte »qtistatist0_.answer« muss in der GROUP-BY-Klausel erscheinen oder in einer Aggregatfunktion verwendet werden".

      After searching for this error, it seems that the query is not standard compliant. MySQL is a little lax in that case and does not throw an error.

      Using PostgreSQL a "group by res.answer" will return the desired result (I think )

      The relevant code is org.olat.ims.qti.statistics.manager.QTIStatisticsManagerImpl.getStatisticAnswerOptionsOfItem().

      The query:
      select res.answer, count(res.key) from qtistatsresult res inner join res.resultSet rset where rset.olatResource=:resourceId and rset.olatResourceDetail=:resSubPath and rset.lastModified = (select max(r2set.lastModified) from org.olat.ims.qti.statistics.model.QTIStatisticResultSet r2set where r2set.identityKey=rset.identityKey and r2set.olatResource=rset.olatResource and r2set.olatResourceDetail=rset.olatResourceDetail ) and res.itemIdent=:itemIdent and res.duration > 0 group by res.key

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Tester:
            Stephan Clemenz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: