Students enroll in clubs/activities with max number of participants

More
7 months 3 days ago #175482 by magdacorreia
Hello,

i need to create a form so that the students from a school can enroll in clubs / activities. The clubs have a maximum number of 20 participants.

After the survey received 20 enollments on a club, it would not be possible to select that option anymore and just remain active the other options.

Can i do this on limesurvey?

Regards
Magda Correia

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
7 months 2 days ago #175489 by holch
Limesurvey is a survey tool and not a tool for enrollments. That said, LS does not have the feature you are looking for.

You could try to use quota, which allows to limit the number of participants for a given answer option. However, this would lead respondents to a end page (they are screened out) and not in hiding the option from display.

Unfortunately Expression Manager does not allow to access previous answers in the database (the quota count), otherwise we could hide the answer option via expression.

Denis has developed a plugin, which I think allowed access to previous answers. But I don't know exactly if this would help you in your case.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
7 months 1 day ago #175537 by DenisChenu

holch wrote: …

Denis has developed a plugin, which I think allowed access to previous answers. But I don't know exactly if this would help you in your case.

Yes, but it's done only via javascript, and use a lot Expression Manager (and not updated today).

gitlab.com/SondagesPro/getStatInSurvey


See the last example on gitlab.com/SondagesPro/getStatInSurvey#documentation

I think it can be great to have a Question template (or a plugin : question template can get quota …) to directly remove uneeded answer from HTML.
If there are some people interested, maybe i can open a liberapay.com/ system.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #177521 by magdacorreia
Hello Denis,

thanks a lot for your plugin. I've tested your plugin and it works perfectly. But i have on question:
- Is it possible to use this statement
{if(('[P1.nb.A1]')=='0',"9.00-9.15","Horário não disponível")} to populate a multiple choice question?

Congrats for your plugin!

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #177523 by DenisChenu

magdacorreia wrote: thanks a lot for your plugin. I've tested your plugin and it works perfectly. But i have on question:
- Is it possible to use this statement
{if(('[P1.nb.A1]')=='0',"9.00-9.15","Horário não disponível")} to populate a multiple choice question?

It means : if nobody answer A1 to P1 (before current user) : show "9.00-9.15", else "Horário não disponível"

Yes : it's done for this

In a real situation : i use {if('[P1.nb.A1]'=='0',"9.00-9.15","")} and a javascript to hide line without label.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #177547 by magdacorreia
Hi Denis,
Thanks for your reply.
If the expression is correct then why does it always write the ELSE statement? Even when '[P1.nb.A1]' is 0 the if statement return "Horário não disponível"

I've tryed to make a test and i believe that the value isn't an integer because if i make something like this: sum('[P1.nb.A1]',5) the value returned is always 5 even when the '[P1.nb.A1]' diferent than 0. The expression '[P1.nb.A1]' is counting correctly the number of A1 answers but it dosen't make the calc or compare well.

Is there a way to resolve this issue?

Thanks for your help,

Magda

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #177550 by DenisChenu
Did you try : "[P1.nb.A1]"==0 ?

Else : please : report issue on gitlab with a simple lsa file

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #177640 by magdacorreia
Hello Denis,

i've oppened an issue on Gitlab but can i make a call to [P1.nb.A1] value under a javascript function?

Thanks,
Magda Correia

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago - 5 months 2 weeks ago #177659 by DenisChenu
Ok,

New version allow usage of Expression Manager with value inside question texte and question help in 3.X version.
Since answers are more hard to find : no able to fix it easily.

Alternative solution usage of css
<span class="numberhide-[P1.nb.A1]">9.00-9.15</span><span class="numbershow-[P1.nb.A1]">Horário não disponível</span>

And in css :
.numbershow-0{display:none}
.numberhide-1{display:none}

But it's really less cool … and here : you ask only one answer, more easy …

With javascript:
<span data-current=[P1.nb.A1] data-max=1>9.00-9.15</span>

and something like this
$("[data-current]").each(function() {
    if($(this).data('current') >= $(this).data('max')) {
        $(this).closest(".answer-item").hide();
    }
});

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 5 months 2 weeks ago by DenisChenu.

Please Log in or Create an account to join the conversation.

More
5 months 2 weeks ago #177688 by magdacorreia
Hello Denis,

thanks so much for you help. Is't working perfectly :)
Regards
Magda Correia

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!