Thank you very much for the feedback. I will check and let you know about the results. best regards, F
On Friday, October 17, 2014 9:49:31 PM UTC+3, Dave S wrote: > > > > On Thursday, October 16, 2014 12:15:26 AM UTC-7, Fotis Gioulekas wrote: >> >> Hello, do you how is this possible to be performed? The user is not >> logged in. >> > > A session should exist whether the user is logged in or not. > > One way to implement this, in the controller that presents the page for > the quiz question, would be to add the question to a list stored in the > session variable. But the controller would also be checking if that page > was already in the list. Something like: > > questioncontroller: > thispage = request.vars.page > if thispage in session.pagelist: > redirect(somewhereelse) > session.pagelist.add(thispage) > question=SQLFORM(etc) > return(question) > > > > Sorry, that's very sketchy because I haven't yet actually used all of what > I have read in the book. > > /dps > > >> On Saturday, August 30, 2014 5:28:20 PM UTC+3, Anthony wrote: >>> >>> The details will depend on exactly how you want to control access to >>> quiz questions, but the general solution would be to store the user state >>> in the session, and when a particular page/question is requested, check the >>> session, and redirect elsewhere if the session check fails. >>> >>> Anthony >>> >>> On Tuesday, August 26, 2014 5:36:45 PM UTC-4, Fotis Gioulekas wrote: >>>> >>>> Hello to everybody, >>>> >>>> I have built a quiz that randomlycreates questions. >>>> Each time a user submits it's answer, the app redirects to another >>>> question. >>>> When the user does not want to continue to another question it presses >>>> a button "exit quiz" and the app redirects to another url. >>>> When the user presses the browser's back button, it can return back to >>>> the quiz. >>>> How can I prevent this? >>>> Is there a solution that either closes the browser's tab or redirects >>>> to a default html page when the user presses the back broswer's button or >>>> >>>> My app does not requires user registratrion and login. >>>> >>>> Thank you in advance, >>>> Fotios >>>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.