Since Ubuntu can install the various apps needed to run Moodle ... apache, php, mysql ... natively, why would one want to install them via XAMPP?
See:
http://docs.moodle.org/20/en/Step-by-step_Installation_Guide_for_Ubuntu
Another reason for NOT using XAMPP for Linux ... those apps will eventually need updating. More easily accomplished using the operating system ability to update/upgrade than a 3rd party package.
'spirit of sharing', Ken