teammates icon indicating copy to clipboard operation
teammates copied to clipboard

[#4570] Instructor: support previewing results as a student

Open fans2619 opened this issue 2 years ago • 26 comments

Fixes #4570

Outline of Solution

Frontend changes: Add a preview session result panel at the bottom of the instructor session result page. The panel is similar to preview session panel. Clicking "Preview as Student"/"Preview as Instructor" opens the session result page and pass a new query parameter "previewas". The parameter is then passed to backend for further processing.

Backend changes: ~~In the process of getting session results, if it's in "preview mode", "remove" questions and comments (i.e., do not add those) that are NOT visible to instructors in general. However, take note of the corresponding [questions] and [responses (for comments)]. For [questions], pass the question attributes to frontend (to display brief and details) and set a boolean indicator hasResponseButNotVisibleForPreview. hasResponseButNotVisibleForPreview means "the question has responses that are viewable for respondent but the question responses are set to be not viewable to instructors". For [responses], just set a boolean indicator hasCommentNotVisibleForPreview (since the response is visible and should be returned to frontend). hasCommentNotVisibleForPreview means "the response has comments that are viewable for respondent but not viewable to instructors".~~ In the process of getting session results, if it's in "preview mode", "remove" questions and comments (i.e., do not add those) that are NOT visible to instructors in general. However, take note of the corresponding questions. For [questions that have responses which are visible for respondent but the question responses aren't set to be visible to instructors], pass the question attributes to frontend (to display brief and details) and set a boolean indicator hasResponseButNotVisibleForPreview. For [questions that have comments (on any responses) which are visible to respondent but not visible to instructors], set a boolean indicator hasCommentNotVisibleForPreview.

  • [x] Make frontend and backend changes
  • [x] Improve UI for non-visible questions?
  • [x] Fix bug with non-visible comments
  • [x] Show one "comment hidden" message for entire question
  • [x] Update tests and add more tests

Some examples of intended behavior:

  • Response is not visible to the respondent. -> question hidden
  • Response should be visible to respondent, but at least one of response/giver's name/recipient's name is set to invisible to instructors in general. -> question shown with no response and alert
  • Response is not visible to instructors in general, but visible to the instructor previewing the results, i.e., the instructor may be the targeted recipient. -> question shown with no response and alert
  • Response, giver's name, recipient's name are visible to instructors in general, a specific comment is not visible to instructors in general. -> question and response shown, specific comment hidden, alert shown for the ~~box containing the comment~~ question

The following of this comment are outdated. See the latest comments.

Setting: For this question, giver's name is not visible to instructors in general What respondent sees: image

What previewer sees: image


Setting: A comment is not visible to instructors in general What respondent sees: image

What previewer sees: image

@damithc I tried to improve the UI, do you think it's better now? It's just the comment alert is shown for every group of responses.

image

fans2619 avatar Jun 10 '22 15:06 fans2619

@wkurniawan07 take a quick review?

fans2619 avatar Jun 14 '22 11:06 fans2619

image

fans2619 avatar Jun 15 '22 12:06 fans2619

@fans2619 is the message about hidden comments shown only when there are actual comments? Or shown even if there are no actual comments?

Perhaps the message (for hidden responses) can be revised as Omitted from the preview because some (or all) parts of the responses are not visible to instructors, as per the visibility settings of the question.

damithc avatar Jun 15 '22 16:06 damithc

@fans2619 is the message about hidden comments shown only when there are actual comments? Or shown even if there are no actual comments?

The message about hidden comments is shown when there is at least one comment hidden for at least one response below. So it's not shown when there's simply no comment.

Perhaps the message (for hidden responses) can be revised as Omitted from the preview because some (or all) parts of the responses are not visible to instructors, as per the visibility settings of the question.

Sure.

fans2619 avatar Jun 15 '22 16:06 fans2619

@damithc For the hidden comments, an alternative way is to show only one alert message at question level. Let me know if that's preferred.

fans2619 avatar Jun 15 '22 17:06 fans2619

@damithc For the hidden comments, an alternative way is to show only one alert message at question level. Let me know if that's preferred.

Yes, that might be better (less noisy), if achievable without much extra cost.

damithc avatar Jun 15 '22 17:06 damithc

I guess it should be achievable and also simpler than the current implementation. I'll change to that later.

fans2619 avatar Jun 15 '22 17:06 fans2619

@damithc Could you please verify the position of hidden comment message is fine before I start implement? And you can suggest an actual message for it if you want.

image


image

fans2619 avatar Jun 16 '22 04:06 fans2619

@damithc Could you please verify the position of hidden comment message is fine before I start implement? And you can suggest an actual message for it if you want.

Yes, the location seems fine.

Message:

Some comments (on responses) received for this question are omitted from this preview because they are not visible to instructors, as per their visibility settings.

The other message can be revised as follows, to make the two more consistent with each other.

Responses received for this question are omitted from this preview because some (or all) parts of the responses are not visible to instructors, as per the visibility settings of the question.

What do you think?

If possible, we can use an icon like this at the start of the message to differentiate from other messages. https://fontawesome.com/icons/eye-slash?s=solid

damithc avatar Jun 16 '22 04:06 damithc

Thanks for the suggestions! 😀

fans2619 avatar Jun 16 '22 04:06 fans2619

Updated:

image


image

fans2619 avatar Jun 16 '22 07:06 fans2619

@damithc Another question is whether it's preferred for the info box to be above or below the page title "Feedback Session Results". Other two pages are putting it below the page title, although I prefer putting it above so that everything below is what the actual respondent sees. You're also welcome to suggest changes to the text in the box.

image


image

image

fans2619 avatar Jun 16 '22 07:06 fans2619

@damithc Another question is whether it's preferred for the info box to be above or below the page title "Feedback Session Results". Other two pages are putting it below the page title, although I prefer putting it above so that everything below is what the actual respondent sees. You're also welcome to suggest changes to the text in the box.

Yes, above-the-heading is probably better. However, follow what other similar pages does and create a separate issue to move the message box in all similar pages. This issue can be left to new contributors.

I'm OK with the message content. Do we call them alert boxes or message boxes (which is easier for users to understand)?

damithc avatar Jun 16 '22 07:06 damithc

I'm OK with the message content. Do we call them alert boxes or message boxes (which is easier for users to understand)?

I'm fine with "message box" :-)

image

fans2619 avatar Jun 16 '22 07:06 fans2619

@wkurniawan07 Ready for review.

fans2619 avatar Jun 20 '22 05:06 fans2619

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Jul 05 '22 15:07 nusoss-bot

@wkurniawan07 Reminder for a review for this PR!

fsgmhoward avatar Jul 12 '22 03:07 fsgmhoward

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Jul 19 '22 14:07 nusoss-bot

For any session in a course, only instructors who have course-wide permission of viewing session results are allowed to preview that session's results.

fans2619 avatar Jul 26 '22 17:07 fans2619

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Aug 08 '22 14:08 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Aug 15 '22 14:08 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Aug 22 '22 15:08 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Aug 29 '22 15:08 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 8 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Sep 06 '22 16:09 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Sep 14 '22 14:09 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Sep 21 '22 14:09 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Sep 28 '22 15:09 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 7 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Oct 06 '22 15:10 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 8 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Oct 14 '22 15:10 nusoss-bot

Guys, This PR seems to be stalling (no activities for the past 8 days). :snail: :cry: Hope someone can get it to move forward again soon...

nusoss-bot avatar Oct 22 '22 16:10 nusoss-bot