-
Notifications
You must be signed in to change notification settings - Fork 199
Description
We'd like to propose an enhancement to the Questionnaire plugin that enables two-way integration between questionnaire responses and user profile fields:
β Use case
In many organizations and educational contexts, questionnaires are used to collect user information that is already stored---or should be stored---in the user's profile. For example:
-
Job title
-
License or registration number
-
Department or employer
-
Country or region
-
Consent or eligibility-related fields
This leads to duplication of effort and introduces the risk of inconsistent data between the questionnaire and the user's Moodle profile.
β Proposed enhancement
We'd like to introduce a new configuration option for each question in the questionnaire, allowing the question to be associated with a specific user profile field (standard or custom). This enables two key features:
1. Prefill answers from user profile fields
When a user opens the questionnaire, any question that is mapped to a user profile field should be pre-filled with the value from that field (if available).
-
Users can still modify the answer before submitting the form.
-
This reduces friction and avoids repetitive data entry.
2. Save answers to user profile fields after submission
When the questionnaire is submitted, answers for mapped questions should update the corresponding user profile fields.
-
If the field is empty, it should be filled.
-
If the field has data, it can optionally be updated (this behavior could be configurable).
-
This ensures that profile data stays up-to-date and consistent with recent questionnaire responses.
β Additional notes
-
Mapping should be possible for both core and custom profile fields.
-
The feature could be enabled per questionnaire or per question for flexibility.
-
If either the prefill or save option is undesirable for a specific question, admins/teachers can simply leave the mapping blank.
-
A log or admin notification could be considered for changes to profile fields for auditing purposes.
π¬ Call for interest
Would this feature be useful to others in the community?
We're happy to collaborate on design or testing. If anyone has already implemented something similar or is interested in co-developing this, we'd love to connect.