kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Survey reports show the text entry placeholder for unanswered free text questions

Open pcenov opened this issue 1 year ago • 5 comments

🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:

  • Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
  • Confirm that you’ve read the guidelines in your comment.

Target branch: develop

Observed behavior

In a submitted survey's report, an unanswered free text response question shows the item's placeholder text ("Enter your answer here" in the channel below), which reads like a response. This happens in both the learner's and the coach's report.

Survey report showing placeholder text in an unanswered free text field

Context

  • A free text response is a QTI qti-text-entry-interaction, rendered by TextEntryInteraction.vue, which branches on the injected interactive flag.
  • While answering, it renders an <input> with the item's placeholder-text as its placeholder attribute. The browser shows this as hint text, styled differently from a typed value, and hides it once the learner types.
  • In reports, it renders a <span class="qti-text-entry-interaction-report"> whose text is reportDisplayValue || placeholder. With no response, the placeholder becomes the span's text, styled the same as a real response.
  • The report span keeps the field's width (widthStyle) and min-height, so an empty span still takes up the field's space in the sentence.

Steps to reproduce

  1. Import the Studio channel rasif-rasot.
  2. As a learner, open a survey from it, leave a free text response question blank, click Submit survey, then Review survey.
  3. As a coach, assign the survey in a lesson and open Coach > Lessons > (lesson) > (survey) > (learner).

Acceptance Criteria

  • [ ] In the learner's and coach's survey reports, an unanswered free text response question shows an empty field, as agreed.
  • [ ] An answered question still shows the learner's response, including 0.
  • [ ] The placeholder still shows while a learner is answering.
  • [ ] TextEntryInteraction.spec.js covers report mode with no response and a placeholder-text.

AI usage

@rtibbles decided the field shows blank; Claude Code located the fallback and drafted this revision.

pcenov avatar Oct 01 '25 15:10 pcenov

@radinamatic @rtibbles

pcenov avatar Oct 01 '25 15:10 pcenov

Yes, I think simply showing it as completely blank is preferable - otherwise there's always the possibility of it being mistaken for a response.

rtibbles avatar Oct 01 '25 23:10 rtibbles

Hi! 👋

This issue is available for contribution and supports self-assignment. Here's how to get started:

  • Comment /assign to assign yourself to this issue
  • You can have up to 2 issues assigned at a time across all community repos
  • Dropping an issue has a 7-day cooldown before the slot opens up
  • Link your pull request to this issue when you submit it

📖 Read the Contributing guidelines before starting.

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Oct 01 '26 22:10 learning-equality-bot

/assign

sarwar-jahin-port avatar Oct 01 '26 23:10 sarwar-jahin-port

Hi! 👋

You've been assigned to this issue. Here's what to do next:

  • Read the issue description carefully and make sure you understand the requirements
  • Link your pull request to this issue when you submit it
  • If you can no longer work on this, unassign yourself so others can pick it up

Good luck! 😊

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Oct 01 '26 23:10 learning-equality-bot