teammates icon indicating copy to clipboard operation
teammates copied to clipboard

[#13174] Option to hide self responses when viewing responses

Open henriquepaes1 opened this issue 1 year ago • 1 comments

Fixes #13174

Outline of Solution

The solution consists in adding a control variable in the session results screen. That was accomplished by creating a switch in the session-result-page component. The switch's status is then passed to the question-response-panel with the angular Input annotation. This variable is used as a conditional for self responses rendering.

The response view now has a switch controlling the self responses, as shown below:

image

When the switch isn't toggled, the student can view their own responses:

image

Once the switch is toggled:

image

The student can't see their own responses:

image

henriquepaes1 avatar Sep 17 '24 19:09 henriquepaes1

I would like to know if would be useful to create tests for the feature's expected behavior (considering the switch for conditional rendering). In case of positive answer, I could use some guidance to write the corresponding tests, since I'm new to Jest and front-end testing in general.

henriquepaes1 avatar Sep 17 '24 19:09 henriquepaes1