Picture of Russell Eden
Conditional display of component/ graphic
by Russell Eden - Friday, 22 December 2017, 10:09 AM
 

Hi

I would like to know how the only display a graphic or component subject to the learner answering a set of questions correctly. Until the questions have all been answered the graphic/ component needs to be hidden.

I look forward to a reply.

Thanks and Merry Xmas!

Regards

Russell

Picture of Barry Jenkin
Re: Conditional display of component/ graphic
by Barry Jenkin - Monday, 8 January 2018, 1:03 AM
 

I'm doing this at the moment in some of my quizzes using the authoring tool. I've been using an img tag in the html of my Assessment Results feedbacks to show a conditional image (and text) based on the quiz score. 

Your html in the Assessment Results component should appear like this: <img src="course/en/assets/7c4813405af085965c2db190374dae5408f6e084.gif"> where the file name references your image.

The tricky bit is to generate this filename. There may be a simpler way .. but my method involves creating and then hiding a graphic component in my course that contains the image I want to use in Assessment Results. Create the component with the image, preview it, use inspect element (or right-click save-as) to identify the filename and copy this to use in your img tag. Once you've got the filename, hide the block/component with the image by unchecking Is this available.

Let me know if you need more info.