How to only clear the language cache in Moodle

Posted by jason on April 2, 2015, 6:19 a.m.
Tags: moodle

Sometimes, I only want to clear the language cache in Moodle while leaving the other cached stuff (CSS/JS files, for example) alone. Here's how:

  • As administrator, go to Site administration -> Language -> Language settings
  • Uncheck the box beside "Cache all language strings" and click "Save changes".
  • When the page ...

Moodle 2: Get number of students in a course

Posted by jason on June 15, 2011, 7:45 p.m.
Tags: moodle php programming web

I searched around and couldn't find anything about getting the # of students in a course in Moodle 2. So I wrote a function to do it. I basically just copy-pasted the needed stuff from the /user/index.php file. Yes, this function is ridiculously long, considering the simple question ...