public
List<RepositoryEntry> getLearningResourcesAsStudent(Identity identity, int firstResult, int maxResults, RepositoryEntryOrder... orderby) {
StringBuilder sb =
new StringBuilder(1200);
sb.append(
"select v from ").append(RepositoryEntry.class.getName()).append(" as v ")
.append(
" inner join fetch v.olatResource as res ")
.append(
" left join fetch v.lifecycle as lifecycle")
.append(
" left join fetch v.ownerGroup as ownerGroup ")
.append(
" inner join fetch v.participantGroup as participantGroup ")
.append(
" left join fetch v.tutorGroup as tutorGroup ")
.append(
"where (v.access>=3 or (v.access=").append(RepositoryEntry.ACC_OWNERS).append(" and v.membersOnly=true))")
.append(
" and (")
.append(
" exists (from ").append(SecurityGroupMembershipImpl.class.getName()).append(" as vmember ")
.append(
" where vmember.identity.key=:identityKey and vmember.securityGroup=participantGroup)")
.append(
" or exists (from ").append(SecurityGroupMembershipImpl.class.getName()).append(" as vmember, ")
.append(
" ").append(BGResourceRelation.class.getName()).append(" as bresource, ")
.append(
" ").append(BusinessGroupImpl.class.getName()).append(" as bgroup")
.append(
" where bgroup.partipiciantGroup=vmember.securityGroup and res=bresource.resource and bgroup=bresource.group and vmember.identity=:identityKey")
.append(
" )")
.append(
" )");
appendOrderBy(sb,
"v", orderby);
System.
out.println("sb"+sb);
--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org
---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
the members onlu courses nned to visible in My courses link of Learmimng resource tab. for that the above code is called .i am not able to view this in MYcources link of Learning Resources.
and also `o_bs_membership` table the column secgroup_id is need to be same fromthe table `o_repositoryentry` fk_participantgroup
Am 18.05.2015 um 13:56 schrieb abdulkh...@gmail.com: