-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Make teacher toolkit accessible for non-teachers #7419
Make teacher toolkit accessible for non-teachers #7419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you seem to have added 'Manage Class' commit in this PR, can you remove it? I can help you if you don't find an easy way to get rid of it.
6b746f0
to
0efd083
Compare
WalkthroughThe recent changes enhance the teacher dashboard by allowing non-teacher users to preview teacher-specific resources. This includes conditional rendering based on user roles and the introduction of preview modes. The modifications ensure that non-teacher users can access certain teacher toolkit content while keeping some features restricted. Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant BaseResourceHub
participant BaseTeacherDashboard
participant TitleBar
User->>BaseResourceHub: Access Teacher Toolkit
BaseResourceHub->>BaseResourceHub: Check if user is teacher
alt User is teacher
BaseResourceHub->>BaseResourceHub: Fetch teacher prepaids and data
end
User->>BaseTeacherDashboard: Open Dashboard
BaseTeacherDashboard->>BaseTeacherDashboard: Call showNonTeacherPreview
alt showNonTeacherPreview is true
BaseTeacherDashboard->>BaseTeacherDashboard: Render preview mode
else
BaseTeacherDashboard->>BaseTeacherDashboard: Render full dashboard
end
User->>TitleBar: View Title Bar
TitleBar->>TitleBar: Check showPreviewMode prop
alt showPreviewMode is true
TitleBar->>TitleBar: Render sub-nav div
else
TitleBar->>TitleBar: Render full title bar
end
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- ozaria/site/components/teacher-dashboard/BaseResourceHub/index.vue (1 hunks)
- ozaria/site/components/teacher-dashboard/BaseTeacherDashboard/index.vue (6 hunks)
- ozaria/site/components/teacher-dashboard/common/TitleBar.vue (2 hunks)
Files skipped from review due to trivial changes (1)
- ozaria/site/components/teacher-dashboard/BaseResourceHub/index.vue
Additional comments not posted (4)
ozaria/site/components/teacher-dashboard/common/TitleBar.vue (2)
32-35
: The addition of theshowPreviewMode
prop is well-implemented.
183-186
: The conditional rendering usingshowPreviewMode
is correctly implemented to control the visibility of the sub-navigation bar.ozaria/site/components/teacher-dashboard/BaseTeacherDashboard/index.vue (2)
95-97
: TheshowNonTeacherPreview
method is correctly implemented to determine the visibility of teacher-specific UI elements for non-teachers.
321-321
: The usage ofshowNonTeacherPreview
in the template effectively controls the visibility of restricted content, aligning with the PR objectives.Also applies to: 332-334, 354-354
there is a conflict: |
e23cafe
to
9a31974
Compare
fixes ENG-598
The teacher toolkit is now previewable for non-teachers.
Summary by CodeRabbit
New Features
Improvements