Databases: Can I get My Course using Database table?

Databases: Can I get My Course using Database table?

by 志峰 刘 -
Number of replies: 1

Hi,everybody:

I want to get My Course using OLEDB connection in .NET plat

But the table mdl_course haven't CreateId field

How can I get My Course using "userId" Direct in Data Table mdl_course

thx.

Average of ratings: -
In reply to 志峰 刘

Re: Databases: Can I get My Course using Database table?

by Martín Langhoff -
Unfortunately, you cannot do that easily in any recent Moodle (1.7 or newer). You will want to use the PHP function "get_my_courses()" that is in lib/datalib.php -- you will see that it uses a lot of the functionality in lib/accesslib.php

Perhaps you can use XMLRPC to get it straight from PHP? Remember that it is _very_ expensive to compute, so cache it aggressively.