Thank you Darko for your reply. Yes, I already went through it, but I couldn't extract the exact logic this moodle is using to display values for these fields. If someone can tell me the relevant tables used under these fields, then I can make the query.
Please help on this.