Duplicate entries are displaying under catalog folder

15 views
Skip to first unread message

mamtay...@gmail.com

unread,
Aug 14, 2014, 8:00:57 AM8/14/14
to open...@googlegroups.com
Hi,
 
I have following scenario:
1.Navigate to Learning Resources tab.
2. Select "Catalog" link displayed on the left margin
3. Click on Learning Resource under Add tool from the right margin
4. Courses created by the author are displayed, Choose one of the displayed Course.
5.Selected course will be display under that sub category page
6. Again click on learning resource and add same course in the same sub category
Issue: Course selected is displayed multiple times under learning Resources.
 
As per my analysis i came to know that entries are extracted from o_catentry table using below query:
select
catalogent0_.id as id1_24_0_,
securitygr1_.id as id1_23_1_,
catalogent2_.id as id1_24_2_,
securitygr3_.id as id1_23_3_,
repository4_.repositoryentry_id as reposito1_100_4_,
securitygr5_.id as id1_23_5_,
securitygr6_.id as id1_23_6_,
securitygr7_.id as id1_23_7_,
olatresour8_.resource_id as resource1_70_8_,
catalogent0_.version as version2_24_0_,
catalogent0_.creationdate as creation3_24_0_,
catalogent0_.name as name4_24_0_,
catalogent0_.description as descript5_24_0_,
catalogent0_.externalurl as external6_24_0_,
 catalogent0_.fk_repoentry as fk_repoe7_24_0_,
 catalogent0_.fk_ownergroup as fk_owner8_24_0_,
 catalogent0_.type as type9_24_0_,
 catalogent0_.parent_id as parent_10_24_0_,
 securitygr1_.version as version2_23_1_,
 securitygr1_.creationdate as creation3_23_1_,
 catalogent2_.version as version2_24_2_,
 catalogent2_.creationdate as creation3_24_2_,
 catalogent2_.name as name4_24_2_,
 catalogent2_.description as descript5_24_2_,
 catalogent2_.externalurl as external6_24_2_,
 catalogent2_.fk_repoentry as fk_repoe7_24_2_,
 catalogent2_.fk_ownergroup as fk_owner8_24_2_,
 catalogent2_.type as type9_24_2_,
 catalogent2_.parent_id as parent_10_24_2_,
 securitygr3_.version as version2_23_3_,
 securitygr3_.creationdate as creation3_23_3_,
 repository4_.version as version2_100_4_,
 repository4_.lastmodified as lastmodi3_100_4_,
 repository4_.creationdate as creation4_100_4_,
 repository4_.lastusage as lastusag5_100_4_,
 repository4_.softkey as softkey6_100_4_,
 repository4_.displayname as displayn7_100_4_,
 repository4_.resourcename as resource8_100_4_,
 repository4_.external_id as external9_100_4_,
 repository4_.external_ref as externa10_100_4_,
 repository4_.managed_flags as managed11_100_4_,
 repository4_.fk_olatresource as fk_olat12_100_4_,
 repository4_.fk_ownergroup as fk_owne13_100_4_,
 repository4_.fk_participantgroup as fk_part14_100_4_,
 repository4_.fk_tutorgroup as fk_tuto15_100_4_,
 repository4_.fk_lifecycle as fk_life16_100_4_,
 repository4_.description as descrip17_100_4_,
 repository4_.initialauthor as initial18_100_4_,
 repository4_.accesscode as accessc19_100_4_,
 repository4_.membersonly as members20_100_4_,
 repository4_.canlaunch as canlaun21_100_4_,
 repository4_.candownload as candown22_100_4_,
 repository4_.cancopy as cancopy23_100_4_,
 repository4_.canreference as canrefe24_100_4_,
 repository4_.launchcounter as launchc25_100_4_,
 repository4_.downloadcounter as downloa26_100_4_,
 repository4_.statuscode as statusc27_100_4_,
 repository4_.course_duration as course_28_100_4_,
 repository4_.course_type_id as course_29_100_4_,
 repository4_.noOfLessions as noOfLes30_100_4_,
 securitygr5_.version as version2_23_5_,
 securitygr5_.creationdate as creation3_23_5_,
 securitygr6_.version as version2_23_6_,
 securitygr6_.creationdate as creation3_23_6_,
 securitygr7_.version as version2_23_7_,
 securitygr7_.creationdate as creation3_23_7_,
 olatresour8_.version as version2_70_8_,
 olatresour8_.creationdate as creation3_70_8_,
 olatresour8_.resname as resname4_70_8_,
 olatresour8_.resid as resid5_70_8_
 from o_catentry catalogent0_
 inner join o_bs_secgroup securitygr1_
 on catalogent0_.fk_ownergroup=securitygr1_.id
 inner join o_catentry catalogent2_
 on catalogent0_.parent_id=catalogent2_.id
 inner join o_bs_secgroup securitygr3_ on
 catalogent2_.fk_ownergroup=securitygr3_.id
 left outer join o_repositoryentry repository4_
 on catalogent0_.fk_repoentry=repository4_.repositoryentry_id
 left outer join o_bs_secgroup securitygr5_ on repository4_.fk_ownergroup=securitygr5_.id
 left outer join o_bs_secgroup securitygr6_ on repository4_.fk_tutorgroup=securitygr6_.id
 left outer join o_bs_secgroup securitygr7_ on repository4_.fk_participantgroup=securitygr7_.id
 left outer join o_olatresource olatresour8_ on repository4_.fk_olatresource=olatresour8_.resource_id
   where catalogent2_.id=parent_id
 order by
   catalogent0_.name ASC
 
In o_catentry table duplicate entries are existing for same repositoryentry under same parent_id.
 
My queries are as following:
1.If we can restrict duplicate entries in o_catentry table,what will be the impact of this change in whole application.
2. What is the significance of fk_ownergroup field in this table abd what value is stored in this field.
 
 
 
 
Thanks,
Mamta.
 
 

Florian Gnägi

unread,
Aug 14, 2014, 2:07:10 PM8/14/14
to open...@googlegroups.com
Hi

You can set a constraint, however you need to implement the checks in the user interfaces as well, otherwise users will get errors. Make sure you get all places from which you can do the inserts…

The security group is to hold the users who have management rights on a particular level of the catalog. 

Cheers
Florian

--
--
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.

--------------------------------------------------------------------
professional services for the e-learning system OpenOLAT and OLATpro
 hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
--------------------------------------------------------------------















Reply all
Reply to author
Forward
0 new messages