Graduate courses or research experience for PhD admissions: Which is more important?
I'd say the 1-2 years of research experience is the better option and here is why:

You are applying for a PhD position. Having research experience shows that you are already familiar with the challenges and you are not fresh. i.e. the department/lab/sponsor/etc. know that the learning curve is less for you. You may even bring or continue a project that you've already started. So, you may not need to start looking for a research subject either.

On the other hand, with all the MOOC, you can more or less learn or at least familiarize yourself with the some of the materials you need (I admit, this is not possible for every field or every course though).