-
Notifications
You must be signed in to change notification settings - Fork 303
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
Programming Exercise
: Add student view button to the programming exercises details page
#7905
Programming Exercise
: Add student view button to the programming exercises details page
#7905
Conversation
WalkthroughThe recent update introduces a "Student View" button on the Exercise Details page of a web application. This addition enhances the user experience by providing instructors with a direct link to view the programming exercise as a student, ensuring a streamlined navigation experience within the Cloud Software Engineering Lab environment. Changes
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
src/main/webapp/i18n/de/programmingExercise.json
is excluded by:!**/*.json
src/main/webapp/i18n/en/programmingExercise.json
is excluded by:!**/*.json
Files selected for processing (1)
- src/main/webapp/app/exercises/programming/manage/programming-exercise-detail.component.html (1 hunks)
Additional comments: 1
src/main/webapp/app/exercises/programming/manage/programming-exercise-detail.component.html (1)
- 104-106: The "Student View" button has been added as expected. Ensure that the
routerLink
directive is correctly bound to an array of route segments and that theprogrammingExercise.course.id
andprogrammingExercise.id
are guaranteed to be non-null where this template is used.
Hi Artemis Dev Team 👋 This is my first contribution to Artemis and I would appreciate it if you could help me to write a test for this button. I already took a look in the tests of #7597 but I wasn't able to write a test in Additionally, should we use the color from the screenshot or a different one? Should we add an icon? If yes, which one? |
@rabeatwork as you're now responsible for our new UI could you comment/give your feedback on that PR? |
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. |
Hi Nils, |
@@ -189,6 +189,7 @@ | |||
"createBehavioralSolutionEntriesTooltip": "Erstellt Lösungs Codeschnipsel für alle Verhaltenstests dieser Aufgabe.", | |||
"createBehavioralSolutionEntriesTitle": "Erstelle verhaltensweise Lösungs Codeschnipsel", | |||
"createBehavioralSolutionEntriesSuccess": "Verhaltensweise Lösungs Codeschnipsel wurden erfolgreich erstellt", | |||
"studentView": "Studentenansicht", |
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.
The translation was also added for the button in the course overview (#7597 ). Since we use this translation multiple times in different views, I would remove both and add a single entry in global.json --> entity --> action
@@ -101,6 +101,9 @@ <h2><span jhiTranslate="artemisApp.programmingExercise.detail.title">Programming | |||
<fa-icon [icon]="faChartBar"></fa-icon> <span jhiTranslate="statistics.statistics-title">Statistics</span> | |||
</a> | |||
} | |||
<a [routerLink]="['/courses', programmingExercise.course!.id!, 'exercises', programmingExercise.id!]" class="btn btn-info btn-sm"> |
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.
Please do not use the non-null assertion operator (the exclamation mark). Because by doing so you're telling the compiler that this expression can't be null or undefined and the compiler should stop complaining about it! But in case it is undefined for whatever reason, this would completely crash the view.
Thanks for the review! Because of the upcoming exams, I plan to complete this PR in March 👍 |
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. |
Checklist
General
Server
Client
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons).Changes affecting Programming Exercises
Motivation and Context
Description
This PR adds the student view button (first introduced in #7597) to the exercise detail page. This allows instructors to easily switch to the student view of this exercise.
Closes #7902
Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Exam Mode Test
Test Coverage
Screenshots
Video:
StudentView.mp4
Screenshot:
Summary by CodeRabbit