Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.66 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. select   c.id, c.shortname, g.name, gm.userid, u.username, r.enrol
  2. from     m_context j, m_course c, m_role_assignments r, m_role a, m_groups_members gm, m_groups g, m_user u
  3. where    j.contextlevel = 50
  4. and      j.id = r.contextid
  5. and      j.instanceid = c.id
  6. and      a.id = r.roleid
  7. and     r.userid = gm.userid
  8. and     r.userid = u.id
  9. and     g.id = gm.groupid
  10. and     c.id = g.courseid
  11. and      a.name = 'Student'
  12. --and     g.description = 'AUTO-GENERATED'
  13. --and     c.id = 11841
  14. AND c.shortname ~ '^[A-Z]{4}[0-9]{5}_[0-9]{4}$'
  15. and c.shortname = 'COMM11108_2102'
  16. --AND substring(c.shortname from '[0-9]{4}$') >= '2102'
  17. order by c.shortname, g.name, gm.userid
  18. ;