Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function onAfterPointsIncrease in Badging/Leveling/Ranking never called #15

Open
eminencecs opened this issue Nov 2, 2015 · 0 comments

Comments

@eminencecs
Copy link

I'm developing a custom plugin for my site. I'm trying to add badges for my users. It award points to user but the it never awards badges. In fact the method onAfterPointsIncrease in Badging/Leveling/Ranking is never called.
I tested with the plugin GamificationPoints. And it works. But when I'm calling $userPoints->increase($pointsType["value"], $options); from my plugin, the observer methods are not called though the increase function is called.

public function increase($value, $options = array())
    {
        // Implement JObservableInterface: Pre-processing by observers
        $this->observers->update('onBeforePointsIncrease', array(&$this, &$options));

        $this->points += abs($value);
        $this->store();


        // Implement JObservableInterface: Post-processing by observers
       $this->observers->update('onAfterPointsIncrease', array(&$this, &$options));
    }

I've no idea why the observers are not triggering the methods onBeforePointsIncrease or onAfterPointsIncrease
Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant