Is there a way to pass a hidden value to the Questionnaire Plugin (or something similar)?

Is there a way to pass a hidden value to the Questionnaire Plugin (or something similar)?

by Ike Tylor -
Number of replies: 1

I have 50 courses in Moodle and want to ask everybody the same 3 questions using the Questionnaire plugin (or something similar). 

Instead of having 50 separate Questionnaires, I want to have a link that passes the CourseID  (or some other value) to the Questionaire so I can download one file and pivot the data on the CourseID (or some uniquely passed value).

For example:

Hiddenfield: 134      (the Course ID#)

Was this course relevant to your life? Y/N

Can you use this course to improve your life? Y/N

Feedback: [text field]


This way, I can report that 352 people took Course ID# 134 and 75% said the course was relevant to their life and 32% said this course will improve their life.

Average of ratings: -
In reply to Ike Tylor

Re: Is there a way to pass a hidden value to the Questionnaire Plugin (or something similar)?

by Itamar Tzadok -

I don't know about the Questionnaire, but you might be able to achieve the desired effect with the Dataform module. You can add to an instance some javascript to capture a url param and set a designated field when opening the entry form. You may probably want also to hide the form field with css so that students don't change its value. Then you can use a csv view to export the collected data. smile