[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Demexp-dev] A question : 2nd edition.. :)

From: David MENTRE
Subject: Re: [Demexp-dev] A question : 2nd edition.. :)
Date: Wed, 1 Aug 2007 14:48:28 +0200

Hello Diogene,

2007/8/1, Diogene Laerce <address@hidden>:
> Got another question : Id like to know if the demexp software can be easily
> changed to allow only global question (answer yes/no) ?

Easily is quite relative but I don't think such a requirement would be
difficult to do. We already automatically add new answers when a
question is created and it is easy to remove the ability to add new
answers. So yes, this can be done without extended knowledge of the

See function `add_question'  around line 244 in;file=srv/

The automatic response is added at line 264. You would modify this
call to `add_response' to add the "No" answer and add a second call to
add the "Yes" answer.

Regarding the ability to add a new response, you would have to remove
this ability by modifying handler `add_response'  in srv/
The handler would always respond  `rt_not_enough_rights' without
trying to add a response. See the corresponding code at line 229 in;file=srv/

Of course, you would have to do similar modification on the client
side, but removing or disabling the code to add a response is always
easier than adding new code. ;-)

I hope I'm clear.

> That kind of restriction, I think is a first step to limit the number of 
> questions
> and a easier way to sort the questions later - less parameters to handle.
> Can you tell me what you think about that ?

I don't have any opinion regarding the usefulness of this proposal.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]