|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| get_course () | |
| get_course_id () | |
| get_user_id () | |
| get_sections () | |
| get_cms () | |
| get_cm ($cmid) | |
| get_instances () | |
| get_instances_of ($modname) | |
| get_groups ($groupingid=0) | |
| __construct ($course, $userid) | |
Data Fields | |
| $courseid | |
| $userid | |
| $sections | |
| $cms | |
| $instances | |
| $groups | |
Information about a course that is cached in the course table 'modinfo' field (and then in memory) in order to reduce the need for other database queries.
This includes information about the course-modules and the sections on the course. It can also include dynamic data that has been updated for the current user.
Definition at line 43 of file modinfolib.php.
| __construct | ( | $ | course, |
| $ | userid | ||
| ) |
Constructs based on course. Note: This constructor should not usually be called directly. Use get_fast_modinfo($course) instead as this maintains a cache.
| object | $course | Moodle course object, which may include modinfo |
| int | $userid | User ID |
Definition at line 199 of file modinfolib.php.

| get_cm | ( | $ | cmid | ) |
Obtains a single course-module object (for a course-module that is on this course).
| int | $cmid | Course-module ID |
| moodle_exception | If the course-module does not exist |
Definition at line 144 of file modinfolib.php.
| get_cms | ( | ) |
Definition at line 134 of file modinfolib.php.

| get_course | ( | ) |
Definition at line 104 of file modinfolib.php.
| get_course_id | ( | ) |
Definition at line 111 of file modinfolib.php.

| get_groups | ( | $ | groupingid = 0 | ) |
Returns groups that the current user belongs to on the course. Note: If not already available, this may make a database query.
| int | $groupingid | Grouping ID or 0 (default) for all groups |
Definition at line 177 of file modinfolib.php.

| get_instances | ( | ) |
Obtains all module instances on this course.
Definition at line 155 of file modinfolib.php.
| get_instances_of | ( | $ | modname | ) |
Obtains all instances of a particular module on this course.
| $modname | Name of module (not full frankenstyle) e.g. 'label' |
Definition at line 164 of file modinfolib.php.
| get_sections | ( | ) |
Definition at line 126 of file modinfolib.php.
| get_user_id | ( | ) |
Definition at line 118 of file modinfolib.php.
| $cms |
Definition at line 80 of file modinfolib.php.
Definition at line 58 of file modinfolib.php.
| $groups |
Definition at line 96 of file modinfolib.php.
| $instances |
Definition at line 87 of file modinfolib.php.
| $sections |
Definition at line 73 of file modinfolib.php.
Definition at line 65 of file modinfolib.php.