I guess my problem comes from the steps IDs… any way to solve this?
thank you again!
Maybe adding a way to “check” the log??
–> when creating a new quest involving say 3 badges, check which user has already earned each badge and automatically make the associated “new” step (with its own ID) as earned also???
The purpose is to be able to use each base badge in multiple quests, including some that will be created in the future…. without the user having to re-earn each badge to unlock the steps included in those different and future quests… I hope you get what I mean, sorry if its hard to get due to my bad english …..
thank you again for your help 😉 have a great day,
emilien
I know we have function badgeos_maybe_award_additional_achievements_to_user( $user_id = 0, $achievement_id = 0 ){} available, which may work, may not.
Otherwise, I think some sort of recheck function/trigger is something that we’re lacking at the moment. I have an enhancement issue open for it at https://github.com/opencredit/badgeos/issues/230 but we haven’t made any official traction on it at the moment.
Hi Michael and thank you so much for your answers,
I tried this solution but it didn’t work …
adding a login requirement aside the three “earn this specific badge” ones didn’t make the system to check if those badges had already been earned at the moment of logging in …
such a recheck function as you talk about would be absolutely necessary for any evolving BadgeOS system I guess, otherwise each installation you do is quite stuck…
the badgeos_maybe_award_additional_achievements_to_user function you talk about, how could it be used to be turned into a recheck function? I’m not a developer and I have to say I don’t know how to use it…
Thank you so much once more, have a great day,
Emilien
You would need to find a way to trigger it and provide the parent-most achievement needing rechecked for the user. I’m not wholly confident that this specific function meets the needs, it’s just what came to mind earlier with the initial reply.
I can’t say for sure, but I imagine part of why the re-check functionality wasn’t there from the start is because this was designed to not be modified and amended partway through.
Hello Micheal,
I hope you’re fine,
I reopen this thread because I’m considering to hire a dev to work on a recheck function, as this will be an absolute necessity in my case. I’d like to know what to tell him to begin with… could you please give some directions to follow, not to lose time searching dead ends?
thank you so much in advance,
have a great day,
Emilien
I’d be looking at the following functions for this type of thing. I provided the file that they’re located in, which are all in the ‘includes’ folder.
badgeos_user_get_active_achievements() — activity-functions.php
badgeos_maybe_award_achievement_to_user() — rules-engine.php
badgeos_check_achievement_completion_for_user() — rules-engine.php
badgeos_maybe_trigger_unlock_all() — rules-engine.php
OK thank you so much for this, I’ll try to find someone with the skills to work on it.
Have a great day,
Emilien