I've been working on a site where the client does not want to use the points system in achievements but does want to grant badges and then facilitate people adding them to their Mozilla Backpack. So, I have enabled the achievements_pointless submodule but found that the Add to Backpack button then fails to appear.

It seems that the achievements_pointless module removes the <a> link on the title of awarded badges so the amobb.js search mechanism at

    var image = jQuery(this).children('div.achievement-image');
    var a = image.children('a');
    var i = a.children('img');

...fails because there is no <a> surrounding the <img>.

Attached is a patch that uses var i = image.find('img'); as this will search recursively down more than one level for the <img>.

It seems to now work correctly whether the achievements_pointless submodule is enabled or not.

How does that look?

Rachel

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rachel_norfolk’s picture

Patch:

rachel_norfolk’s picture

EBIZON’s picture

Hi Rachel,

Thanks for showing up your interest in this project.

jessehs’s picture

Re-rolled patch against 1.2 (it was not applying).