Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
An alternative to my overkill?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Parijat Kalia  
View profile  
 More options Mar 29 2012, 7:00 pm
From: Parijat Kalia <kaliapari...@gmail.com>
Date: Thu, 29 Mar 2012 16:00:15 -0700
Local: Thurs, Mar 29 2012 7:00 pm
Subject: An alternative to my overkill?

Hi,

In my quest for perfection and minimalism, I post this question here to you
guys, seeking if there is a better and more alternative option than the one
I have.

I have a module with two different templates. Essentially the first is a
quiz template, the second is a page that displays the results of the quiz.
The quiz is a form whereas the results page is not. On my quiz page, the
action for the form is essentially 'module/quizResults?id='.$quizId

Now for the quiz action, I do a db query to retrieve the set of questions
that belong to the quiz and then when the post takes place the action that
is being called is that of quizResults, out here I must compare the answer
options of my user against the correct answer options for the questions of
a quiz. Essentially, I have to again query the db to retrieve the set of
questions for the quizzes in another db. I feel this is a slight overkill
and I am irked.

I think there can be better solutions. I can post back to the same quiz
page, but then that demands more complexity on the template as well as the
action making things a little murkier.

Any alternatives? Unless this is the way to go about it and I am probably
just overthinking it.

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ronald  
View profile  
 More options Apr 11 2012, 12:17 pm
From: Ronald <ron...@driebit.nl>
Date: Wed, 11 Apr 2012 09:17:46 -0700 (PDT)
Local: Wed, Apr 11 2012 12:17 pm
Subject: Re: An alternative to my overkill?

Hey,

In my quest for perfection and minimalism, I post this question here to you

This is what I would normally do:
- The action that creates the form also validates and handles it.
- Yes, you have to query the database each time this action is called. Do
not worry about it. If you do, use memcache to query the result and make it
faster. This would make your site a lot more complicated though.
- If the user has finished the quiz correctly redirect to a result page.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »