Some Moodle SQL

Some Moodle SQL

A few queries which you may find helpful and time saving. Select All Students On A Course SELECT u.firstname, u.lastname, u.username FROM mdl_user u INNER JOIN mdl_role_assignments r ON r.userid = u.id INNER JOIN mdl_context c ON c.id = r.contextid WHERE c.instanceid = COURSE_ID_HERE AND r.roleid = 5 Select All Teachers On A Course SELECT [...]

Read more
Course Structure

Course Structure

One of the things which seems to be reasonably unique at our institution, is the way we structure our courses on Moodle. For instance, the popular way to do this (as most universities and colleges seem to) is to have a new course for every year. So for example one year we might have: Fullname: [...]

Read more
JISC VLE Forum 2011

JISC VLE Forum 2011

This was my first visit to the JISC forums, and it was pretty useful. We saw how a couple of other colleges have implemented Moodle, some of the ideas they have come up with, plus how Moodle 2 is coming along. Some of the better ideas to come out of the forum (which I will [...]

Read more
Moodle Contexts & Roles

Moodle Contexts & Roles

One thing which I found myself constantly having to look up when I started developing with Moodle was what all the Context and Role IDs were. So here is a quick list of them in case it helps anyone: Contexts Levels CONTEXT_SYSTEM = 10 CONTEXT_USER = 30 CONTEXT_COURSECAT = 40 CONTEXT_COURSE = 50 CONTEXT_MODULE = [...]

Read more