my Courses link in Learming Tab

4 views
Skip to first unread message

abdulkh...@gmail.com

unread,
May 21, 2015, 5:43:16 AM5/21/15
to open...@googlegroups.com
Hello sir,
 
To get the data to be populated in My courses link , i had gone through the code repository Manager class...
there is a function in repositoryManager  class where the below SQL query called .

List<RepositoryEntry> getLearningResourcesAsStudent(Identity identity, int firstResult, int maxResults, RepositoryEntryOrder... orderby) {
 in which the SQL query is called
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);
 
in this , please let me know where we need to look the olat code so that vmember.securityGroup=participantGroup
will call. if this is equals then we can able to view courses in MY courses link of Learming tab.
 
Please let me know how to pass the value in securityGroup of o_bs_membership same as participantGroup  in o_repositoryentry tables. i had seen values are not macthing in o_bs_membership table and o_repositoryentry tables.
 
o_bs_membership  for column secgroup_id is and from the table `o_repositoryentry`  for fk_participantgroup
 
 
Reply all
Reply to author
Forward
0 new messages