Kolibri Content id's

Hi,

I have an out of the box question that I’m hoping someone on here might be able to provide some more information on. We are currently in the process of constructing an automated testing scenario for Kolibri on our system and we are looking for a way to identify the content id’s used in Kolibri. We have had a look at the db.sqlite3 file and haven’t been able to determine what valid content id’s are.

We have a suspicion it’s related to the table content_contentnode but we haven’t been able to identify anything that specifically calls out all the valid content id’s as of yet.

Any help anyone can provide on this matter is greatly appreciated please?

Hi,

Just an update with this one we appear to have found a query on the sqllite file that will return on valid content id’s. Query is below:

SELECT id FROM content_contentnode
WHERE parent_id NOTNULL
AND available = 1
AND kind NOT like “topic”

Hi @phack, in Kolibri, there is a many-to-one relationship between content node IDs and content IDs.

For example, in Khan Academy, the same video or exercise (Content ID) can appear in different place in the topic tree (place = Content Node Id).

In the content_contentnode Sqlite table, there is a column, content_id. There are other columns description and kind that give, the title of the item, and it’s type, respectively (e.g. whether it’s a video, exercise, pdf, etc.)

So in your, SQL, query you might want to select the unique content_id values, if I’m understanding your original question correctly. The other filters you have added will also filter items that are not topics, and also have been downloaded by and admin in the Device > Channels page. However, by selecting the id column, you are getting the Content Node Id, and not the Content Id.