CCLE-3993 - Adding plugin to vanilla moodle.

Re-added some functions previously found in ucla-specific code.
Removed some dependencies on ucla-specific code that is no longer there.