## Moodle research

### Where can I find permalink codes in the database?

Where can I find permalink codes in the database?

Hello,

Im working with legacy logs from a bunch of courses, organizing data in order to analyse it. have restored courses from 2.5 version in a 3.1 version, then download the logs from every course.

I want to add some information to each row in the logs, using  the instance module included in description field (resource view 2). Some rows need to be modified, because I have, for instance, discussion id (forum add discussion 36)  instead of forum id.

I got stuck with post related logs ("forum_add post"    "forum_delete post" "forum_update post"), because what appears is the permalink.  The data I have in these rows is something like this (see in bold letters the column I'm interested in:

"﻿Time"    |  "User full name"|"Affected user" |"Event context" |"Component"| "Event name" |  "Description" | "Origin" |"IP address"
8/11/16, 12:39|-|- | Forum: forum name | Forum |forum_update post | forum update post 1542 | web |..

The number at the end of description field ("forum update post 1542") is the permalink of each post. I need to find where do these permalinks are stored in the database in order

Instead of permalink, I expected to find the post code (mdl_forum_posts.id), which I need to find  id forum (mdl_forum_discussions.forum`). Does anybody know if these permalinks are stored in the database and where could I find them?