Pathways towards quality primary education: improving completion and learning outcomes