teammates
teammates copied to clipboard
[#4570] Instructor: support previewing results as a student
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:
What previewer sees:
Setting: A comment is not visible to instructors in general
What respondent sees:
What previewer sees:
@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.
@wkurniawan07 take a quick review?
@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.
@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.
@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.
@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.
I guess it should be achievable and also simpler than the current implementation. I'll change to that later.
@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.
@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
Thanks for the suggestions! 😀
Updated:
@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.
@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)?
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" :-)
@wkurniawan07 Ready for review.
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...
@wkurniawan07 Reminder for a review for this PR!
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...
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.
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...