Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: How can i show only N questions of one grp?

How can i show only N questions of one grp? 5 years 1 month ago #54247

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
Hi, i've used the new randomize function (randomize grp) of the 1.91beta. This is really cool, but now i've another problem... from that 100 questions in that randomized grp i need to show only 10 of them. Choose 10 random questions from a pool of 100. I know that is not possibible and i should look for the workaround secton. But i've only some .net coding skills, i'm not able to build a javascript :(
Any help? Tnks
Last Edit: 5 years 1 month ago by willyx.
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54253

  • Mazi
  • Mazi's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 5843
  • Thank you received: 348
  • Karma: 261
Well, the only solution I see is to ask a developer for advanced (paid) support to help you out. Even JS won't be a solution if the questions are spread over different pages. You'd probably have to edit the PHP source code.

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 topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54273

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
I can have all questions in one page isn't a problem for me
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54276

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5419
  • Thank you received: 1155
  • Karma: 480
Can you attach a sample survey?
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 topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54277

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
www.insomnia-guild.it/torre/index.php?si...77&newtest=Y&lang=it

It have 450+ questions divided in 5-6 groups Questions are random shuffled. I need to show only 3 storia (hystory) questions, 8 italian questions, 3 civic ecc. I've no problems to show all in one page, i need to have at the end only 25 questions...
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54278

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5419
  • Thank you received: 1155
  • Karma: 480
Okay, I would run the survey in group-by-group mode, set up the survey to use JavaScript and place the following script in the source of each group description. Replace"NN" (line 5) with the number of questions you want displayed in each group (page).

The script initially hides all questions on a page and then shows the first number of questions you want, Since the questions are already randomized on the page, you effectively get random sub-sets of questions for each respondent.
<script type="text/javascript" charset="utf-8">
 
    $(document).ready(function() {
 
        showQuestions(NN);
 
        function showQuestions(showNum) {
 
            $('div[id^="question"]').hide();
            $('div[id^="question"]').each(function(i) {
                if (i < showNum) {
                    $(this).show();
                }
            });
        }
    });
 
</script>
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 topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54296

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
Works, tnks.
I'll send some money to buy a pizza for the project, tnks .)
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54299

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
mmm...2 bugs:
1)Preview question grps uses the wrong gid. If my grps are as gid 1-2-3-4-5 is all ok. If i've 2-5-6-7-8 (deleted some) when i try to preview the first grp he pass the gid 2 and then show not the gid2 grp, but the second grp (in my example gid 5)
2)I've tryed to active my survey, but after the welcome screen i get a session error. I've no problems if disabled and i use preview.

I've post the first one in the bug traker
U can test it in www.insomnia-guild.it/torre/admin default password.
Last Edit: 5 years 1 month ago by willyx.
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54302

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5419
  • Thank you received: 1155
  • Karma: 480
Are the bugs related to the inserted JavaScript?
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 topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54309

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
The first one no, i had it from the beginning. The second one i need to check it, maybe is related to the javascript
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54346

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
I've removed the java code, build a new survey but i'm unable to use teh survey, it give to me the cookies error:(

Also if i go in response data entry screen i get :
Parse error: syntax error, unexpected T_ELSEIF in /web/htdocs/www.insomnia-guild.it/home/torre/admin/dataentry.php on line 429
Last Edit: 5 years 1 month ago by willyx.
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54348

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5419
  • Thank you received: 1155
  • Karma: 480
I don't believe that either of hese bugs are caused by the JavaScript. It is strictly client-side and only acts on the current page so cannot affect sessions or control the display of other groups.
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 topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54350

  • willyx
  • willyx's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 13
  • Karma: 0
Deleted all files, tables reinstalled, build a new survey, same error when activated...the only stuff left is config.php :(
The topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54388

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5419
  • Thank you received: 1155
  • Karma: 480
What exactly is the error? Can you post the contents of your config.php (removing passwords)?
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 topic has been locked.

How can i show only N questions of one grp? 5 years 1 month ago #54424

  • Mazi
  • Mazi's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 5843
  • Thank you received: 348
  • Karma: 261
Try to re-upload all files in binary mode. The error message "Parse error: syntax error, unexpected T_ELSEIF in /web/htdocs/www.insomnia-guild.it/home/torre/admin/dataentry.php on line 429" points to a broken/incomplete file upload.

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 topic has been locked.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.197 seconds