Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Professor Student View + Student Leave Queue Bug Fix #863

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

stevenyuser
Copy link
Contributor

@stevenyuser stevenyuser commented May 4, 2024

Summary

Adds professor student view, a feature where professors can view the queue as a student (and do all the things a student could do e.g. add themselves to the queue).

  • Once a professor adds themselves to a queue as a student, they are treated like a student inside of professor student view
  • In the normal SplitView (Queue tab), they still have all the permissions of a normal professor
    • includes the ability for a professor (or TA) to assign themselves to any queue question (including their own question)
  • Introduces new prop in SessionView and its children to showProfessorStudentView (overrides a potential Professor/TA's roles to display them as a student)
  • Does not affect functionality of normal SplitView (Queue tab)
image image image

Also fixes a bug which prevented students from removing themselves from the queue

  • Bug was caused by the Feedback feature, which didn't pass and set the removeQuestionId in SplitView.tsx properly
  • Fix by introducing new separate functions/props for setRemoveQuestionId (removes a student's question from the queue) and removeQuestionDisplayFeedback (used to display feedback prompt when a student's question is done)

Test Plan

ProfessorStudentView

  • Tested as a professor
    • Can add self to queue, can view and do everything like a student would in SplitView
    • Can remove the professor's question from the queue
    • In SplitView, professor can assign and answer questions just as before
  • Tested as a student to ensure SplitView still works as normal

Leave Queue Bug Fix

  • Tested leaving queue as a normal student
  • Tested leaving queue in ProfessorStudentView as a professor

Notes

  • There might be a possible bug in ProfessorStudentView with qmijinglefinal.mp3, because I see in the console that it cannot be found (HTTP 500 error code), so I think ProfessorStudentView can't play that audio. I think this has something to do with directories. Before, SessionView was inside SplitView only, but now it is in ProfessorStudentView, which has a different directory structure than qmijinglefinal.mp3. However, this bug doesn't really affect the core functionality of ProfessorStudentView.

Breaking Changes

None

  • I have updated the documentation accordingly.
  • My PR adds a @ts-ignore

- Fixed student self removing question
- Added full functionality for professorstudentview
@stevenyuser stevenyuser requested a review from a team as a code owner May 4, 2024 22:08
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 915.

Copy link
Contributor

@NIDHI2023 NIDHI2023 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works really well! I see that you considered the view for mobile users too, which I think is good forethought. Removing and adding my own question in the student view also seems to be working.

One thing I'm a little unsure of, is there a clearer way for the user to know when they are leaving Professor/Student view? Right now I think the pages look very similar visually, so it could benefit having a simple outline (like Sia's designs) around the student view in the ProfessorStudentView page

Also minor note:
On line 146 in ProfessorStudentView.tsx and line 152 in SplitView.tsx I don't think a console.log call is needed anymore. I think that it's good to avoid having prints to the console for the "finished" version once you're done debugging or developing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants