Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    I am not the developer of the Ocean Theme or the Ocean Modal Window plugin.

    “Unless I’m mistaken, the test page in question only contains a single quiz with multiple questions.”

    I believe you that that is all you did to the page. But there is a modal on that page too, and because this modal is duplicating the content, it is causing the issue. If you still want to fix it, you need to find out why a modal is on a page that you did not add it to.

    The page you sent me has the same quiz printed twice. Once on the page content as normal, and then another copy inside the lightbox modal from that plugin.

    You’ll need to find out how this is possible on your end as it is not related to HD Quiz. HD Quiz does not add itself to random parts of people’s websites. Perhaps you added a modal with a quiz on it to all pages or something? Or as a widget? Just throwing ideas out there, but ultimately this is something you’ll need to contact the Ocean team for support.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Thanks for the link

    So to start, there are two quizzes on this page, so we at least know that HD Quiz is not giving you an incorrect warning.

    You have… a lot of elements and JavaScript on your site, so it’s not the easiest to debug, but from what I can see, it is your lightbox plugin that is breaking stuff.

    You have the quiz added to the main content of your site. Great!
    The problem is that it looks like your lightbox has also automatically duplicated that content to add it to a separate lightbox area (or perhaps you have specifically added the same quiz to the lightbox?).

    The duplicated content is inside of a div called omw-modal . So either you have a configuration issue with that lightbox, or whatever plugin you are using has a bug and needs to be fixed on the developer side. OMW Model appears to be the Ocean Modal Window plugin? Looking at it, it seems to only work with the Ocean Theme, so maybe they are the best ones to ask for support for this.

    You can test by disabling the Ocean Modal Window plugin and verifying that the pages now work.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Hi drebin54,
    if you can send a link to a quiz I can take a look and confirm, but so far, there are two things to note.

    1. If by popup, you mean a lightbox, that is still the same page. Lightboxes don’t create new pages, they just visually show content in a “popup”. Your browser URL does not change.
    2. Something I’ve seen in the past is specifically with Elementor page builder. If you are using that, sometimes Elementor can have broken templates and print the content to your page twice, with the second being in a hidden div.
    3. “However, I’m getting a message that just appeared, even though everything was working normally”
      Do you mean quizzes that you already had working on a page, are now showing this message? If so, then the question we need to ask is: “what changed?”. HD Quiz hasn’t changed how quizzes are printed, so perhaps you changed something on your end? A new theme, different plugin update, etc.

    Once again, if you can provide a link to a page with this issue, I can take a look and confirm what’s going on

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Hi fiberbow,
    first – thank you for your review!

    For weighted questions, as the tooltip states: “If enabled, each answer can be given its own value – even negative points. Not all question types are compatible with this feature.”

    Currently, Multiple choice – text, and Multiple choice – image are the compatible question types.

    Select all that apply is not possible to have weighted questions at the moment because that question type only awards points if the user selects ALL of the correct answers and none of the incorrect. The next update will add compatibility for this where if weighted is enabled, then the question is no longer marked as correct or incorrect and is instead marked with the sum of all selected answers. Unfortunately I do not have a timeline for the next update though.

    As for the results page, I assume you meant the results page from the Save Results Light addon? There is no built-in option for this, but I think it’s a good idea. I’ll push out an update next week that will add a new shortcode for the addon that will print just the results table wherever you want.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Hi bjpbkk,
    this was already reported last week and is being worked on.

    Just note that this was reported as “Low priority – No impactful threat”, so there is nothing you need to worry about in the meantime. No secure data or information is leaked at all, and the vulnerability cannot be used to gain further access. The only thing an attacker can gain from this is the question HTML – which they can also get by just viewing the actual quiz.

    Still, it is unintended access nonetheless, and has already been patched – just awaiting approval before publishing.

    Here is the official patchstack report so that you don’t have to take my word on it 🙂

    https://patchstack.com/database/wordpress/plugin/hd-quiz/vulnerability/wordpress-hd-quiz-plugin-2-0-9-broken-access-control-vulnerability

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    The class for question titles is hdq_question_heading and answers is hdq_label_answer, so you can use those to target font families.

    Example:

    .hdq_question_heading,.hdq_label_answer {font-family: "Open Sans" !important} 

    Line height is pretty much the same

    .hdq_question_heading {line-height: 1.6 !important}
    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Please confirm that this functionality is working correctly.

    All I can do is confirm that it works for me across my test environments, and let you know that you are the only user to report any issues with that feature.

    Some things to try:

    • Under the HD Quiz Settings page, there is a feature called “Replace the_content filter for quizzes”. Try disabling this. A theme function, or function from another plugin, might be interacting with it in a bad way.
    • Try the basic WordPress debug steps of temporarily switching themes and disabling all other plugins to see if that helps.
    • You have not provided a link to a page with the issue (if issue persists, please provide a link so I can at least attempt to see what the issue might be for you) so I cannot take a look at anything, but something else to look at is if you are caching content using a CDN or something like CloudFlare. You might want to clear those caches as well
    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Hi wojciechborys
    HD Quiz does not come with an audio or video player, WordPress and your browser come with native implementations.

    The “Before question content” is where you can display any content that your site is compatible with. If your theme does weird things with embedded media (such as loading some custom styles etc), there is nothing I can do to help you other than offer advice.

    1. Always use WordPress’ native embed if possible. You can do this by selecting the “Add media” button, which will allow you to add images, video, and audio. If the embed shows when editing a question, it should show on the live quiz as well
    2. Try clearing your site caches. Page caching might be struggling if you have multiple embeds.
    3. If the above does not work, or is inconsistent for you, you’ll need to debug this further on your end as this would be “WordPress” / “Theme” stuff, and not related to HD Quiz itself.
    4. You can try using audio specific plugins to help with your theme compatibility. They will come with their own shortcodes and custom players.

    Here is documentation of WordPress’ native audio embeds: https://ww.wp.xz.cn/documentation/article/audio-shortcode/ and here is a list of audio plugins: https://en-ca.ww.wp.xz.cn/plugins/tags/audio-player/ – I haven’t used any before, but Compact WP Audio Player looks like it would work for your needs.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Hi mehdis,
    thank you for the review!

    This is not something that is a feature of HD Quiz, but it should be possible to extend it in this way.

    Off the top of my head, the process would look like this. I’m rolling my own lightbox here since I don’t know if you are already using a lightbox plugin or similar.

    The first thing to do is edit the quiz settings and set the result potion to “below”. This is to stop the site from scrolling to the top of the quiz on completion, which would feel weird since you are using a lightbox.

    Now we need a way to clone the results so that we can place it into a custom lightbox. We can use the hdq_after action to add custom JS and CSS to the page to do this. We can then add a custom function to the hdq_submit list to tell HD Quiz to run a function once the quiz completes – in our case, to show the lightbox.

    Here is a mockup of everything in action. You’ll probably want to play around with the styles to make it look better for your theme and site.

    /* First, we create the lightbox */
    function hdq_lightbox()
    {
    ?>

    <style>
    .hdq_results_wrapper {
    display: none !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    }

    #hdq_lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    place-items: center;
    z-index: 9999999999999;
    }

    #hdq_lightbox.active {
    display: grid;
    }

    #hdq_lightbox_content {
    max-width: 800px;
    width: 100%;
    padding: 4rem;
    position: relative;
    }

    #hdq_lightbox_close {
    position: absolute;
    top: -1em;
    right: -1em;
    width: 2rem;
    height: 2rem;
    background-color: red;
    color: #fff;
    line-height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    }
    </style>

    <script>
    const hdq_lightbox = {
    init: function() {
    // create the lightbox with result content
    const hdq_res = document.getElementsByClassName("hdq_results_wrapper")[0];
    const hdq_res_html = hdq_res.innerHTML;
    const hdq_lightbox_html = '<div id = "hdq_lightbox"><div id = "hdq_lightbox_content"><div id = "hdq_lightbox_close" role = "button" title = "Close results">x</div>' + hdq_res_html + "</div></div>";
    hdq_res.insertAdjacentHTML("afterend", hdq_lightbox_html);

    document.getElementById("hdq_lightbox_close").addEventListener("click", function() {
    hdq_lightbox.close();
    })
    },
    open: function() {
    // figure out which result to show
    const score = HDQ.VARS.hdq_score;
    let status = false;
    let percent = (score[0] / score[1]) * 100;
    if (percent >= HDQ.VARS.quiz.quiz_pass_percentage) {
    status = true;
    }

    const results = document.getElementById("hdq_lightbox");
    if (status) {
    results.getElementsByClassName("hdq_result_pass")[0].style.display = "block";
    } else {
    results.getElementsByClassName("hdq_result_fail")[0].style.display = "block";
    }
    const result_el = results.getElementsByClassName("hdq_result")[0];
    result_el.innerHTML =
    ${score&#091;0]} / ${score&#091;1]} - <span class = "hdq_result_percent">${percent.toFixed(2).replace(/&#091;.,]00$/, "")}%</span>;



    const el = document.getElementById("hdq_lightbox").classList.add("active");
    },
    close: function() {
    const el = document.getElementById("hdq_lightbox").classList.remove("active");
    }
    }
    hdq_lightbox.init();

    function hdq_lightbox_open() {
    hdq_lightbox.open();
    return {};
    }
    </script>
    <?php
    }
    add_action("hdq_after", "hdq_lightbox");

    /* Now, we activate the lightbox once a quiz completes */
    function hdq_onsubmit_lightbox($data)
    {
    array_push($data->hdq_submit, "hdq_lightbox_open");
    return $data;
    }
    add_action("hdq_submit", "hdq_onsubmit_lightbox");

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    First, the CSS.

    It looks like you are using Elementor, and Elementor is forcing H3 Headings (the same heading type that HD Quiz uses) to use font-size 38px. This doesn’t look too bad on desktop, but it’s definitely too large for mobile.

    Here is some CSS you can use to make it look better on your site.

    h2.hdq_results_title, h3.hdq_question_heading {font-size: 1.4rem !important;}

    I feel that 1.4rem was a good size that worked well on your site for both desktop and mobile, but feel free to play around with that number to find what you think works best. Just remember to clear your site cache with LiteSpeed (this is a plugin you have installed) once you’ve added the CSS.

    As for your other question, the good news is that this is already built in! It’s called “Extra content” and can be found when selecting the “Extra” tab when editing a question. By default, this content will only appear if the user gets the question wrong. BUT if you enable the quiz feature “Always show extra content” (on the Marking tab of quiz settings) it will also show when the user gets the answer correct.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    thanks Ekaterina,
    I’m out at the moment but I’ll be able to take a look and get you the solution later today

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    hi parma2025,

    hd quiz inherits things like font size directly from your theme and can be overridden with CSS including the theme customizer.

    if you can provide me with a link to a quiz, I’ll take a look and get back to you with the exact CSS needed to make it nicer on your site.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    What if you change themes?

    Even using the theme preview should be enough to test. It sounds to me like whatever theme you are using is not compatible with embeds and or is modifying the previously mentioned filters.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    Hi namelyjt,
    both short codes and embeds (such as YouTube) should work out of the gate in both the Results and Extra text sections. Just note that for YouTube, you don’t need to add any code. You can actually just paste the URL in and your site will automatically create the embed – this is a native WordPress feature.

    If this isn’t working for you, then there are only two possible reasons that I can think of.

    1. Page caching. If you are using a caching plugin, try clearing your site caches. It’s possible that they are not including the required WordPress embed coding
      • Also check the settings in whatever cache plugin you are using. You might have some setting that affects embeds by lazy loading them or something. It’s possible that HD Quiz is correctly printing the content you want, but due to your cache plugin, it isn’t loading when revealed.
    2. There might be something else on your site (either theme or another plugin) that is modifying default WordPress functionality and has broken embeds for you as a side effect.

    Something you can do that MIGHT help if #2 is the issue for you is to go to the HD Quiz settings page and disable “Replace the_content filter for quizzes”. If something else on your site is modifying some of your content filters, disabling this feature *might* bypass the problem and help.

    If none of the above works, then all I can do is to recommend the standard WordPress debug steps of temporarily switching themes and deactivating all plugins (other than HD Quiz) to see if that works. You can then re-enable one by one until you find the thing that is breaking it for you.

    Plugin Support Dylan – Harmonic Design

    (@dylanharmonicdesign)

    It’s 100% impossible for either of those above changes to affect the clickability of a button.

    You must have something else broken on your site setup/server (for example, I see that your SSL certificate is down at the moment, and the homepage provides a 403 Forbidden error – assuming this problem is on the “mcqs” site you previously posted).

    Beyond what I’ve already recommended, all I can offer more is general debugging steps. Clear all of your caches (browser, site, host, dns, anything else), and do the basic WordPress debug steps (disable all plugins except HD Quiz, use a default WordPress theme, check to see if uploads are still broken for you).

Viewing 15 replies - 1 through 15 (of 22 total)