Behavioural settings broken in Question Sets

spazfox's picture

I'm working with Question Sets consisting mostly of multiple-choice questions, and it appears that neither the individual (per question) nor the global (per question set) settings for Enable "Retry" button or Enable "Show Solution" button have any effect.

No matter what is selected with these settings, no "Retry" or "Show Solution" button is shown for individual questions, and both "Retry" and "Show Solution" are shown at the end of the Question Set. 

Hi!

Just wanted to report that we have the same problem. Very happy if you can fix it!

Best, Guro

falcon's picture

Thanks for sharing! This has been fixed a while ago, but not released yet. It will be part of our next release and this forum post will be updated when we do the release.
stopbit's picture

Hi,

I can confirm this has no effect in the question set. I am using the latest libraries and H5P plugin for Magento.

I am using a question set with only multiple choice questions.

Additional major issue - Results page

The results page does not get displayed regardless of pass or fail. So the viewer does not know the output message.

Can't Download H5P - Problem

I also cannot downlaod H5P, it just shows me a compression characters on screen when i click downlaod. I believe this is to do with gzip compression on my server. I made an exception in .htaccess, but was disapointed to find this does not work. Although this would usually do the trick to avoid compressing this file type (guessing H5P?).

Frist try:

<code>

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI .h5p$ no-gzip dont-vary
</IfModule>
<FilesMatch ".h5p$">
    FileETag None
    <IfModule mod_headers.c>
        Header unset ETag
        Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
        Header set Pragma "no-cache"
        Header set Expires "Thu, 1 Jan 1970 05:00:00 GMT"
    </IfModule>
</FilesMatch>

</code>

Second try:

I've also tried setting a force download in htaccess like so:

<code>

<FilesMatch "\.(?i:h5p)$">
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>

</code>

Third Try:

<code>

<FilesMatch "\.(zip|h5p|H5P|gzip)$" >
    ForceType application/octet-stream
    Header add Content-Disposition "attachment"
</FilesMatch>

</code>

Forth try:

<code>

AddType application/octet-stream .h5p
AddType application/octet-stream .H5P
AddType application/octet-stream .zip
AddType application/octet-stream .gzip

</code>

Perhaps I'm getting the file extension wrong? or there is a better way to acheive this? Maybe there's a coding issue in php?

If anyone can please help to resolve this issue, it's driving me nuts. I have to re-create the same exercises instead of been able to download then upload to duplicate them. In addition this means I won't be able to use the output file as an external ims package in Moodle (can't download, can't upload to moodle), I'll be stuck using iframes.

Many Thanks for any advice!

Steve

Attachments: 
stopbit's picture

Hi,

Ok, after my numerous tests the forcedownload I used within the htaccess suddenly started to work.

There may have been a server caching issue, I think I'm using PHP-FPM & FAST-CGI for gnix. This probably cached the server files long enough for my tests to be irrelevant. I was testing on files which had not been updated within the server cache.

So, this probably means the code used for my tries 1, 2 & would all work, but it was the last fourth try that did the job in the end:

Probably, it's only this line you need to add to your .htaccess file to force download of this type of file extension:

AddType application/octet-stream .h5p

The above does not have to be wrapped in a <FilesMatch> or it will break your site :-D

I hope this helps someone.

Steve

falcon's picture

Hi,

I'm glad you were able to solve your problem. I didn't know there were an H5P plugin for Magento. Where did you find it?

Best,
Svein-Tore

 

stopbit's picture

Hi Svein-Tore,

You got me there! haha, I have a number of websites, which use different CMS platforms. Obviously I got confused which server / cms I was working with.

I think I nabbed some of my htaccess commands from one of my other sites. That's probably why I quoted Magento, instead of what it should have been 'Wordpress'. So, to reiterate, I was working with WORDPRESS :-D

Although now, I'm kind of wishing I had a Magento plugin too.

All the best

 

falcon's picture

Oh :/ I was very happy to hear about our Magento support :)