Artemis
Artemis copied to clipboard
`Learning analytics`: Add empty student course dashboard behind feature flag
⚠️ Warning: Includes database migration! ⚠️
[!WARNING] Needs the future toggle to be activated by an admin on the server deployed in order to be tested.
Checklist
General
- [ ] I tested all changes and their related features with all corresponding user types on a test server.
- [x] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
- [x] I chose a title conforming to the naming conventions for pull requests.
Server
- [x] Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
- [x] I strictly followed the server coding and design guidelines.
- [x] I added multiple integration tests (Spring) related to the features (with a high test coverage).
- [x] I documented the Java code using JavaDoc style.
Client
- [x] Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
- [x] I strictly followed the client coding and design guidelines.
- [x] Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
- [x] I added
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons). - [x] I documented the TypeScript code using JSDoc style.
- [x] I added multiple screenshots/screencasts of my UI changes.
- [x] I translated all newly inserted strings into English and German.
Motivation and Context
In the future we want students to gain better insights about their performance in a course. Therefore, we proposed to add a new dashboard-view to the course overview page that will include learning analytics and an Iris chatbot. This PR lays the groundwork of the newly proposed feature
Description
- A - for now - empty dashboard view.
- Added a
FutureToggle
for the newly proposed dashboard view. - Added a toggle switch that allows (only admins) to enable/disable the new dashboard view on the course overview page.
- Added a database migration to add a
dashboard_enabled
column to theCourse
entity
Steps for Testing
Prerequisites:
- 1 Admin
- 1 Student
- 1 Instructor
- 1 Course
- As an admin log in to Artemis
- Toggle the dashboard in the Feature Toggles on the server settings.
- Go into a course with "Student View" and open the course overview page.
- Verify that dashboard tab on the course overview page is not yet visible.
- Edit the course and enable the dashboard for the course.
- Again go into course overview page and verify that dashboard tab is now visible.
- Navigate to dashboard view by clicking the tab
- You should now see a page with a
Work in Progress
placeholder text. - Again go into Feature Toggle section in the server administration and deselect the Dashboard option.
- Verify now on the course overview page that Dashboard tab is not visible.
- As a student go into a course with dashboard feature enabled.
- Verify that student can see the dashboard tab and navigate to the page.
- As an instructor edit a course and verify that you can not see
Enable Dashboard
checkbox. - Verify that everything regarding the new feature is correctly translated by switching the language.
Testserver States
[!NOTE] These badges show the state of the test servers. Green = Currently available, Red = Currently locked
Review Progress
Performance Review
- [ ] I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
- [ ] I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance
Code Review
- [ ] Code Review 1
- [ ] Code Review 2
Manual Tests
- [ ] Test 1
- [ ] Test 2
Test Coverage
Screenshots
Changes:
Sidebar:
Enable Dashboard toggle in settings:
Feature toggle:
Dashboard page (WIP)
Walkthrough
The updates across various files in the Artemis project introduce new dashboard features for courses, including analytics and display options. New boolean fields and corresponding methods have been added to manage these features, alongside updates to the UI components and services to support toggling and displaying these new functionalities. Additionally, security measures prevent unauthorized changes, and new routes enhance navigation.
Changes
File Path | Changes |
---|---|
.../domain/Course.java .../entities/course.model.ts |
Added dashboardEnabled and studentCourseAnalyticsDashboardEnabled fields with getters and setters. |
.../service/feature/Feature.java .../service/feature/FeatureToggleService.java .../shared/feature-toggle/feature-toggle.service.ts |
Introduced new features Dashboard and StudentCourseAnalyticsDashboard in enums and toggles. |
.../web/rest/CourseResource.java |
Added checks to prevent unauthorized dashboard setting changes. |
.../manage/course-update.component.* .../test/javascript/spec/component/course/course-update.component.spec.ts |
Updated course management components to handle new dashboard settings. |
.../overview/course-dashboard/... .../overview/course-overview.component.ts .../overview/courses-routing.module.ts |
Enhanced course dashboard components and routing for new dashboard features. |
.../overview/visualizations/... |
Updated visualization components to adapt to new dashboard settings. |
.../layouts/navbar/navbar.component.ts |
Added new dashboard menu item in the navigation bar. |
.../learninganalytics/StudentLearningAnalyticsIntegrationTest.java .../service/FeatureToggleServiceTest.java |
Updated integration and service tests to include new dashboard features. |
src/main/webapp/i18n/de/global.json |
Localization support for dashboard terminology in German. |
Recent Review Details
Configuration used: CodeRabbit UI Review profile: CHILL
Commits
Files that changed from the base of the PR and between 1d9a407503034e4366c16301de5b6ca4b03dc9bb and 822ba5dd7b45a4caa84c4dd6aec287fc4e8db01c.Files selected for processing (3)
- src/main/java/de/tum/in/www1/artemis/service/feature/FeatureToggleService.java (2 hunks)
- src/main/java/de/tum/in/www1/artemis/web/rest/CourseResource.java (1 hunks)
- src/main/webapp/app/shared/layouts/navbar/navbar.component.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- src/main/webapp/app/shared/layouts/navbar/navbar.component.ts
Files skipped from review as they are similar to previous changes (1)
- src/main/java/de/tum/in/www1/artemis/web/rest/CourseResource.java
Additional Context Used
Path-based Instructions (1)
src/main/java/de/tum/in/www1/artemis/service/feature/FeatureToggleService.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
Additional comments not posted (2)
src/main/java/de/tum/in/www1/artemis/service/feature/FeatureToggleService.java (2)
Line range hint
51-64
: Proper initialization ofStudentCourseAnalyticsDashboard
feature toggle.
Line range hint
1-64
: The rest of theFeatureToggleService
class is well-implemented and adheres to best practices.
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?
Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
-
I pushed a fix in commit <commit_id>.
-
Generate unit testing code for this file.
-
Open a follow-up GitHub issue for this discussion.
-
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitai
in a new review comment at the desired location with your query. Examples:-
@coderabbitai generate unit testing code for this file.
-
@coderabbitai modularize this function.
-
- PR comments: Tag
@coderabbitai
in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:-
@coderabbitai generate interesting stats about this repository and render them as a table.
-
@coderabbitai show all the console.log statements in this repository.
-
@coderabbitai read src/utils.ts and generate unit testing code.
-
@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
-
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)
-
@coderabbitai pause
to pause the reviews on a PR. -
@coderabbitai resume
to resume the paused reviews. -
@coderabbitai review
to trigger a review. This is useful when automatic reviews are disabled for the repository. -
@coderabbitai resolve
resolve all the CodeRabbit review comments. -
@coderabbitai help
to get help.
Additionally, you can add @coderabbitai ignore
anywhere in the PR description to prevent this PR from being reviewed.
CodeRabbit Configration File (.coderabbit.yaml
)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yaml
file to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
What will be shown to the instructors and tutors when they go to the dashboard? They would probably see something like Statistics
there, but we already have a statistics section. It also does not make sense to see the participation, i.e. scores/competencies of the tutor/instructor themselves since they are not taking exercises.
Should we disable the dashboard for tutors/instructors?
@FelixTJDietrich I have no clue. We can discuss this with @bassner
@FelixTJDietrich I have no clue. We can discuss this with @bassner
We discussed and it should also be visible for tutors and instructors
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.
Merged as part of #8582 into hd3-develop