Welcome, Guest
Username: Password: Remember me

TOPIC: Help with management of time slots for probands

Help with management of time slots for probands 3 years 7 months ago #55966

  • svollmar
  • svollmar's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Thank you received: 1
  • Karma: 0
Dear all,

we have a feature request which I posted to the Development forum some days ago - maybe here is a better place.

Our institute is prepared to spend 500 Euros on a feature to help us with this:

"For a particular experiment, we want probands to sign up for a particular time slot (from a number of choices). At the beginning of the survey, each time slot is available for a certain number of probands (possibly just one). Whenever a proband selects a particular time slot, that time slot should become unavailable for the next proband filling out the survey (if enough probands have registered for this particular time slot). Is this possible with LimeSurvey?"

Mazi proposed this solution:

Maybe one can implement a new question attribute like "disable answer option when quota is reached"? Seem to be the only solution to me because we somehow have to query the database to check for the number of given answers.

We think this might be a good way to tackle the problem but are open to other suggestions as well.

Many thanks in advance.
Warm regards,
Stefan
--
Dr. Stefan Vollmar, Dipl.-Phys.
Head of IT group
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213 FAX +49-221-4726-298
Tel.: +49-221-478-5713 Mobile: 0160-93874279
E-Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
The administrator has disabled public write access.

Re: Help with management of time slots for probands 3 years 7 months ago #55973

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 768
  • Karma: 349
My 2 cents worth...

I don't think you can check the database and disable answer options on page load because someone else may submit one of the available options while you are deciding. I think that, although it isn't as user-friendly, you'll need to check the DB for option availability on submit (which I think is how quotas work).
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Help with management of time slots for probands 3 years 7 months ago #55974

  • svollmar
  • svollmar's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Thank you received: 1
  • Karma: 0
Dear Tony,

I totally agree that just adjusting the user interface before displaying it is not good enough: in addition, one needs to check the availability of a time slot or item when the survey is submitted and it is quite possible, that while a particular state of availability is displayed, this is no longer valid as other participants have already claimed items/time slots which are still displayed as available. So we would need this additional check and, if necessary, a suitable error message.

Do you think this is difficult to implement?

Thanks,
Stefan
The administrator has disabled public write access.

Re: Help with management of time slots for probands 3 years 7 months ago #55992

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 768
  • Karma: 349
Hi Stefan,

I'm not a server-side developer so I can't say for sure how difficult it would be but I think that it's possible.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Help with management of time slots for probands 3 years 7 months ago #56001

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
Question is if you just need a general solution or just a one time hack. If there is only one survey and one Limesurvey installation this is needed for, we can try to hack something together and change some core files.
If you are looking for a general solution which will make it into the core later, this will be much more effort.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Help with management of time slots for probands 3 years 7 months ago #56008

  • svollmar
  • svollmar's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 10
  • Thank you received: 1
  • Karma: 0
Dear Mazi,

I have already written a little extension to LimeSurvey which caters to some specific things required at our institute. This extension uses parts of LimeSurvey's infrastructure (I added a hook in admin.php and based my code on tokens.php). So, yes, something between "a quick hack" and the next official release could work for us - we are probably able to adapt some "raw" version to our requirements. However, I hope what we want to accomplish is so interesting that others would like to see it in an official release eventually - but help with an intermediate version (with long-term, official integration in mind) is an acceptable solution. Anything you need from us to get started (should we use our subversion server)?

Warm regards,
Stefan
The administrator has disabled public write access.

Re: Help with management of time slots for probands 3 years 7 months ago #56012

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
The simplest hack I can think of is to edit the qanda.php file which generates the question for a survey. You can easily add some lines of code inside an IF statement so the code is only appliad to a certain survey (and question).
Just query the DB if there is an answer already given for a certain option and if so, disable this option or do not display it at all.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.122 seconds
Donation Image