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

RS: As author order by lectures with module disabled

    XMLWordPrintable

    Details

      Description

      In an OpenOlat without lectures enable, an author can customise the courses list in author environment to see the courses with lectures but get a red screen if he/she orders the column.

      Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'lectureConfig.lectureEnabled' [select v, 1 as marks, (select count(offer.key) from org.olat.resource.accesscontrol.model.OfferImpl as offer where offer.resource.key=res.key and offer.valid=true ) as offers, (select count(ref.key) from org.olat.resource.references.ReferenceImpl as ref where ref.target.key=res.key ) as references, 0 as binders from org.olat.repository.RepositoryEntry as v inner join fetch v.olatResource as res inner join fetch v.statistics as stats left join fetch v.lifecycle as lifecycle where exists (select rel.entry.key from org.olat.repository.model.RepositoryEntryToGroupRelation as rel, org.olat.basesecurity.model.GroupMembershipImpl as membership where rel.group.key=membership.group.key and rel.entry.key=v.key and membership.identity.key=:identityKey and ( ( membership.role in ('administrator','principal','learnresourcemanager','owner') and v.status in ('preparation','review','coachpublished','published') ) or (membership.role not in ('invitee','guest','waiting') and (v.allUsers=true or v.bookable=true) and v.status in ('published') ) or ( membership.role ='author' and v.status in ('review','coachpublished','published') and (v.canCopy=true or v.canReference=true or v.canDownload=true) ) )) and res.resName in (:resourcetypes) and exists (select mark2.key from org.olat.core.commons.services.mark.impl.MarkImpl as mark2 where mark2.creator.key=:identityKey and mark2.resId=v.key and mark2.resName='RepositoryEntry' ) order by lectureConfig.lectureEnabled asc nulls first, lower(v.displayname) asc]
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:138)
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
        at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:718)
        at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:809)
        at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23)
        at org.olat.repository.manager.RepositoryEntryAuthorQueries.createViewQuery(RepositoryEntryAuthorQueries.java:308)
        at org.olat.repository.manager.RepositoryEntryAuthorQueries.searchViews(RepositoryEntryAuthorQueries.java:96)
        at org.olat.repository.manager.RepositoryServiceImpl.searchAuthorView(RepositoryServiceImpl.java:831)
        at org.olat.repository.ui.author.AuthoringEntryDataSource.getRows(AuthoringEntryDataSource.java:132)
        at org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiTableDataSourceModel.loadDatas(DefaultFlexiTableDataSourceModel.java:214)
        at org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiTableDataSourceModel.load(DefaultFlexiTableDataSourceModel.java:183)
        at org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl.sort(FlexiTableElementImpl.java:1084)
        at org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableElementImpl.evalFormRequest(FlexiTableElementImpl.java:900)
        at org.olat.core.gui.components.form.flexible.impl.Form$EvaluatingFormComponentVisitor.visit(Form.java:626)
        at org.olat.core.util.component.FormComponentTraverser.doVisit(FormComponentTraverser.java:65)
        at org.olat.core.util.component.FormComponentTraverser.doVisit(FormComponentTraverser.java:70)
        at org.olat.core.util.component.FormComponentTraverser.visitAll(FormComponentTraverser.java:60)
        at org.olat.core.gui.components.form.flexible.impl.Form.evalFormRequest(Form.java:265)
        at org.olat.core.gui.components.form.flexible.impl.FormWrapperContainer.doDispatchRequest(FormWrapperContainer.java:100)
        at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
        at org.olat.core.gui.components.Window.doDispatchToComponent(Window.java:1218)
        at org.olat.core.gui.components.Window.dispatchRequest(Window.java:400)
      ... 39 more Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'lectureConfig.lectureEnabled' [select v, 1 as marks, (select count(offer.key) from org.olat.resource.accesscontrol.model.OfferImpl as offer where offer.resource.key=res.key and offer.valid=true ) as offers, (select count(ref.key) from org.olat.resource.references.ReferenceImpl as ref where ref.target.key=res.key ) as references, 0 as binders from org.olat.repository.RepositoryEntry as v inner join fetch v.olatResource as res inner join fetch v.statistics as stats left join fetch v.lifecycle as lifecycle where exists (select rel.entry.key from org.olat.repository.model.RepositoryEntryToGroupRelation as rel, org.olat.basesecurity.model.GroupMembershipImpl as membership where rel.group.key=membership.group.key and rel.entry.key=v.key and membership.identity.key=:identityKey and ( ( membership.role in ('administrator','principal','learnresourcemanager','owner') and v.status in ('preparation','review','coachpublished','published') ) or (membership.role not in ('invitee','guest','waiting') and (v.allUsers=true or v.bookable=true) and v.status in ('published') ) or ( membership.role ='author' and v.status in ('review','coachpublished','published') and (v.canCopy=true or v.canReference=true or v.canDownload=true) ) )) and res.resName in (:resourcetypes) and exists (select mark2.key from org.olat.core.commons.services.mark.impl.MarkImpl as mark2 where mark2.creator.key=:identityKey and mark2.resId=v.key and mark2.resName='RepositoryEntry' ) order by lectureConfig.lectureEnabled asc nulls first, lower(v.displayname) asc]
        at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74)
        at org.hibernate.hql.internal.ast.ErrorTracker.throwQueryException(ErrorTracker.java:93)
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:278)
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:192)
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:144)
        at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:113)
        at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:73)
        at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:155)
        at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:600)
        at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:709) ... 58 more
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            srosse Stéphane Rossé
            Tester:
            Mandy Menzel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: