Adrian Rosebrock 2020-11-17T10:28:14-05:00

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • Adrian Rosebrock
    Participant
    Post count: 17

    Hello,

    Is there any update to this? Can BadgeOS verify if this is a bug or if it’s a problem with the Credly integration?

    Thanks!

    Adrian Rosebrock
    Participant
    Post count: 17

    It sounds like sanitize_post_field is causing the problem. I’ll dig into this some more 🙂 Unfortunately, my main setup is just editing PHP files in VIM. I don’t have an easy way to step through the code.

    Adrian Rosebrock
    Participant
    Post count: 17

    I’m honestly not sure. BadgeOS integrates with Credly. But the Congratulations plugin handles triggering events. I’m not sure where the code starts and starts in this case.

    So I guess you call tell me which forum this question belongs in?

    Adrian Rosebrock
    Participant
    Post count: 17
    in reply to: Hyper link #11508

    @Peter: I totally agree. I ended up hacking together a solution to include hyperlink links by using the “Post Snippets” plugin and directly modifying the code for the congratulations modal.

    Adrian Rosebrock
    Participant
    Post count: 17

    Thanks for the clarification Michael, that was super helpful and cleared everything up 🙂

    Adrian Rosebrock
    Participant
    Post count: 17

    I’ll keep that in mind as I continue to work with the plugin. For the time being, at least in my case (since I’m using LearnDash), it seems I can get around the issue by manually specifying that a set of lessons have to be complete instead of relying on the “All Achievements of type” option.

    Adrian Rosebrock
    Participant
    Post count: 17

    I believe I have it figured out now. I thought I was being smart by creating an “Achievement Type” for each module, so I could have a single rule that said:

    Require: All Achievements of type => Module name

    However, that doesn’t work the way you expect it to and leads to the results I detailed in the previous post.

    Instead, I have to do:

    Require: Learn Dash activity => Completed lesson => lesson name

    For each lesson in the module. It’s insanely time consuming, but it leads to the intended results.

    It also makes me worried about server load on the database server and if each of those rules has to be queried. For example, if I have 25 lessons in a module, are 25 queries executed against the server to see if the requirements are met?

    Adrian Rosebrock
    Participant
    Post count: 17

    For what it’s worth, I’ve resolved the error. A CSS selector:

    #TB_ajaxContent{width: 640px !important;}

    Takes care of it from a stylesheet perspective, but the real issue a combination of the JavaScript ThickBox uses along with the congrats_modal_resize_tb function call from within BadgeOS Congratulations. That method (correctly) resizes the BadgeOS div, but doesn’t take into account the ThickBox size:

    https://github.com/nikosd/jquery-thickbox/blob/master/thickbox.js#L187

    Adrian Rosebrock
    Participant
    Post count: 17

    If I got you a login, could you test it out?

    Adrian Rosebrock
    Participant
    Post count: 17

    Thanks Michael, I’ll be sure to do that! 🙂

    Adrian Rosebrock
    Participant
    Post count: 17

    I’ll go ahead and self-answer on this one. It is possible, but you need to change Line 190 of modal-functions.php to use the do_shortcode function.

    Here is a bit of code if anyone is interested:

    $output .= '<p>' . do_shortcode("[completed-lesson name='" . str_replace("Completed ", "", get_the_title( $achievement_id )) . "']") . '</p>';

Viewing 11 posts - 1 through 11 (of 11 total)