MDL-39864 badges: Convert badge criteria into a plugin type

AMOS BEGIN
  MOV [addcourse,badges],[addcourse,badgecriteria_courseset]
  MOV [addcourse_help,badges],[addcourse_help,badgecriteria_courseset]
  MOV [allmethodactivity,badges],[allmethod,badgecriteria_activity]
  MOV [allmethodcourseset,badges],[allmethod,badgecriteria_courseset]
  MOV [allmethodmanual,badges],[allmethod,badgecriteria_manual]
  MOV [allmethodprofile,badges],[allmethod,badgecriteria_profile]
  MOV [anymethodactivity,badges],[anymethod,badgecriteria_activity]
  MOV [anymethodcourseset,badges],[anymethod,badgecriteria_courseset]
  MOV [anymethodmanual,badges],[anymethod,badgecriteria_manual]
  MOV [anymethodprofile,badges],[anymethod,badgecriteria_profile]
  MOV [completionnotenabled,badges],[completionnotenabled,badgecriteria_course]
  MOV [criteria_descr_short0,badges],[description_short,badgecriteria_overall]
  MOV [criteria_descr_short1,badges],[description_short,badgecriteria_activity]
  MOV [criteria_descr_short2,badges],[description_short,badgecriteria_manual]
  MOV [criteria_descr_short4,badges],[description_short,badgecriteria_course]
  MOV [criteria_descr_short5,badges],[description_short,badgecriteria_courseset]
  MOV [criteria_descr_short6,badges],[description_short,badgecriteria_profile]
  MOV [criteria_descr_single_short1,badges],[description_single_short,badgecriteria_activity]
  MOV [criteria_descr_single_short2,badges],[description_single_short,badgecriteria_manual]
  MOV [criteria_descr_single_short4,badges],[description_single_short,badgecriteria_course]
  MOV [criteria_descr_single_short5,badges],[description_single_short,badgecriteria_courseset]
  MOV [criteria_descr_single_short6,badges],[description_single_short,badgecriteria_profile]
  MOV [criteria_descr_single_1,badges],[description_single,badgecriteria_activity]
  MOV [criteria_descr_single_2,badges],[description_single,badgecriteria_manual]
  MOV [criteria_descr_single_4,badges],[description_single,badgecriteria_course]
  MOV [criteria_descr_single_5,badges],[description_single,badgecriteria_courseset]
  MOV [criteria_descr_single_6,badges],[description_single,badgecriteria_profile]
  MOV [criteria_descr_0,badges],[description,badgecriteria_overall]
  MOV [criteria_descr_1,badges],[description,badgecriteria_activity]
  MOV [criteria_descr_2,badges],[description,badgecriteria_manual]
  MOV [criteria_descr_4,badges],[description,badgecriteria_course]
  MOV [criteria_descr_5,badges],[description,badgecriteria_courseset]
  MOV [criteria_descr_6,badges],[description,badgecriteria_profile]
  MOV [criteria_0,badges],[pluginname,badgecriteria_overall]
  MOV [criteria_1,badges],[pluginname,badgecriteria_activity]
  MOV [criteria_1_help,badges],[pluginname_help,badgecriteria_activity]
  MOV [criteria_2,badges],[pluginname,badgecriteria_manual]
  MOV [criteria_2_help,badges],[pluginname_help,badgecriteria_manual]
  MOV [criteria_4,badges],[pluginname,badgecriteria_course]
  MOV [criteria_4_help,badges],[pluginname_help,badgecriteria_course]
  MOV [criteria_5,badges],[pluginname,badgecriteria_courseset]
  MOV [criteria_5_help,badges],[pluginname_help,badgecriteria_courseset]
  MOV [criteria_6,badges],[pluginname,badgecriteria_profile]
  MOV [criteria_6_help,badges],[pluginname_help,badgecriteria_profile]
  MOV [error:noactivities,badges],[error:noactivities,badgecriteria_activity]
  MOV [error:nosuchfield,badges],[error:nosuchfield,badgecriteria_profile]
  MOV [error:nosuchmod,badges],[error:nosuchmod,badgecriteria_activity]
  MOV [error:nosuchrole,badges],[error:nosuchrole,badgecriteria_manual]
  MOV [requiredcourse,badges],[requiredcourse,badgecriteria_courseset]
AMOS END