Hi All:

I have a new problem. I have a quiz with 21 questions, and every time you answer a question and press next, the next question still reads "Page 1 of 21". The question it displays however is different! But it the quiz still says you're only on question #1 no matter how many questiosn you go through. You can keep pressing next as as many times as youd like, more than 21 times and the quiz never ends. If the user is authenticated we have no problems. Only anonymous users see this problem.

My recent changes:

I switched to pressflow, and started using varnish and memcache. I know the problem has to do with the server caching the questions etc, but there has got to be a way around this.

Comments

sivaji_ganesh_jojodae’s picture

Issue tags: +Pressflow

I switched to pressflow, and started using varnish and memcache. I know the problem has to do with the server caching the questions etc, but there has got to be a way around this.

Does it works with drupal ? If yes then we can't help you much with this, fill a bug here https://bugs.launchpad.net/pressflow/ .Take a look at #672566: Compatibility with Pressflow and mailing list discussion on webform+pressflow issue for anonymous user http://lists.drupal.org/pipermail/development/2010-April/035412.html HTH.

WhenInRome’s picture

I flushed the theme registry cache and it seems to be working again. If it breaks again i'll keep everyone posted!

falcon’s picture

Title: Problem when turning cachiing on. » Problem with external caching(Varnish for instance)
Version: 6.x-3.4 » 6.x-5.x-dev
Category: bug » feature

I file this one as a feature request. We will add a javascript version of quiz this year, but it won't be able to store the users answers. It will only be possible to use it for self-tests.

WhenInRome’s picture

By Javascript version...do you mean something that stores the answers in cache(varnish for instance) and also doesn't write the users answers to the db? This could be useful to lessen the mysql load for a lot of people.

falcon’s picture

Yeah, all logic will be in the javascript. The answers won't be sent to the server. (Quiz takers answers won't be written to the db) It will be super-fast and scalable with Varnish.

AntiNSA’s picture

Whats the current status of Quiz /Varnish/memcache/pantheon? I am getting ready to try to install Drupal on my own vps, and trying to find the best solution. I cnt afford to see quiz stop working....

mbutcher’s picture

I've been working on Varnish a *lot* recently, so I've picked up a few tricks.

Short term solutions:

* Install the Cache Exclude module and set it to exclude quizzes. I've never tested this with Varnish, but I believe that it prevents Drupal from setting the cache headers.
* Change the Cache header to no-cache (using header()). This might not work in cases where Drupal forces a header rewrite.
* Append a random query string to the URL for each page request (again -- we did this a long time ago, too). Most configurations of Varnish do not ignore the query string. It wastes cache space temporarily, but Varnish's LRU will eventually catch up and kill the entry.
* Set a cookie. Most Varnish configurations will stop caching a page when there is an unknown cookie in the headers. Unfortunately, this will also prevent that user from getting cached content on the entire site (or until you clear the cookie).
* Force the request to use POST, which Varnish doesn't cache until you make it do so. I actually thought that Quiz did this already
* Reconfigure the Varnish VCL to never cache quiz pages (depends on a predictable URI)
* Add a header in Quiz (e.g. header('X-Drupal-Quiz: Yes')) and then configure Varnish to not cache anything with that header

Matt

AntiNSA’s picture

wow. Im not sure how to do any of those. As I am transferring my server, I may skip mercury and go with nginx....

But just because of this. If anyone has a working patch that would be cool.... Im sorry I am such a noob to managing my own server.

Does quiz have a problem with memcached?

AntiNSA’s picture

Can you give a step by step for any of those suggestions?

AntiNSA’s picture

Hi,, I really need quiz, and am switching right now to a vps. I dont know that much about vps, but am doing my best. I need to makake a decision soon. Will you be able to help me in a little more detail to get quiz functioning in the next weeks if I install pantheon / varnish / pressflow on Drupal 6.x dev?

Or should I go nginx?

seems like pantheon is the future of drupal?

djdevin’s picture

Component: Code - Quiz module » Code - Quiz core
Issue summary: View changes
Status: Active » Closed (outdated)

This issue is being closed because it was filed against a version that is no longer supported. If the issue still persists in the latest version of Quiz, please open a new issue.