• Resolved uzaircoupons

    (@uzaircoupons)


    Hi,

    First off: Your Viewer & the WP Plugin are life savers!

    I just installed the plugin, and it works fine in a regular post
    ex: https://radiologyroadmap.com/test00101010/

    However, I am building a quiz using the LearnDash Plugin…and when making the questions, it is like making post…so it allows you to insert media.
    For some reason, only the “View Fullscreen” link shows up..but the dicom viewer itself does not
    ex: https://radiologyroadmap.com/quizzes/students-1/
    (click on start quiz)

    It must be an issue with the LearnDash Quiz plugin I am using, but was wondering if you had any thoughts?

    WORKAROUND
    If it’s a problem with the LearnDash plugin not recognizing the dicom file as a media format or a problem with it running the javascript….

    I’m thinking of a work around solution: If I can get a direct link to the dicom file/viewer, Then I can embed it into the quiz questions using iframe

    So I copied the link for the “Full Screen” link, and embedded that….
    https://radiologyroadmap.com/quizzes/students-1/
    check out question #2…seems to be a work a round

    Next question is: Where do I get the link for the Full Screen?
    1) I can make a regular post and insert the dicom viewer
    ex:
    Then get the link for the dicom viewer/file by copying the address from the FULL SCREEN link

    2) I can insert the dicom media into the quiz question…and even though the dicom viewer does not show up; at least the “view Full Screen” link does, and therefore I can copy the web address for the dicom from there..which I can embed via iframe

    Any other ways to get the address which I can then embed via iframe?

    Ideally I could somehow just get the LearnDash plugin to show the dicom file when I Insert Media which would avoid having to use this workaround..I’ll reach out to their support as well, but again let me know if you have any ideas

    Thanks

    Thanks

    • This topic was modified 7 years, 9 months ago by uzaircoupons.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author ivmartel

    (@ivmartel)

    Hi, the issue seems to be related to line breaks in the dwv javascript code. It looks like the quiz plugin is removing them and since they start with a comment, the full block is considered a comment.

    I’ll check if I can enqueue this script in a better way. Or remove comments if I don’t find a nice way!

    Thread Starter uzaircoupons

    (@uzaircoupons)

    okay thank you!

    Plugin Author ivmartel

    (@ivmartel)

    Just create version 0.5.1 of the plugin that uses more ‘standard’ ways of inserting code. Can you give it a try and tell me?

    I looked for the quiz plugin you mention but could not tell which one it was, could you share a link?

    Thread Starter uzaircoupons

    (@uzaircoupons)

    Updated plugin: The navigation bar (Scroll, Zoom/Pan, etc) is now showing up, but the DICOM itself is still not loading:

    see Question 1 here: (after clicking start quiz)
    https://radiologyroadmap.com/quizzes/students-1/

    then see question 2, which loads it properly if I embed via an iframe

    LearnDash is a paid plugin
    https://www.learndash.com/

    Plugin Author ivmartel

    (@ivmartel)

    Ok, what I get from the generated code is that the second viewer is half dead. There is some code still alive that tries to load it but cannot find all it needs.

    Is it possible your second quiz question contains a reference to the ‘dcm’ shortcode? Could you try without the iframe?

    Thread Starter uzaircoupons

    (@uzaircoupons)

    The first viewer (question 1) is embedded via the plugin shortcode and that is the one that is not showing the viewer, but only showing the navigation bar
    [dcm src=”***DCM URL**”]

    The second viewer (question 2) embedded via iframe is the one that is working showing the viewer & navigation bar

    Plugin Author ivmartel

    (@ivmartel)

    So, after having played with the learndash plugin, two things:

    • the plugin seems to call the same shortcode twice. The shortcode generates two things, some javascript code and some html. The strange part with learndash is that there are two times the javascript but only once the html. the second javascript tries to find its associated html but cannot find it, so it generates an error… This can be solved with a try and catch to hide the error.
    • in order to show/hide the quiz questions, learndash plays with the display properties (css) of the html elements. This seems to perturb dwv and makes it set its size to zero

    I’ll try to get in contact with the people of learndash and if I get some, I will post it here. In the meantime the iframe seems to be the best solution.

    Thread Starter uzaircoupons

    (@uzaircoupons)

    Thank you for your help. The support provided is top notch.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Viewer not showing in Certain Post Type’ is closed to new replies.