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

Integrated code lifecycle: Add repository buttons for exams #8155

Merged
merged 33 commits into from
Mar 10, 2024

Conversation

mateusmm01
Copy link
Contributor

@mateusmm01 mateusmm01 commented Mar 7, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I strictly followed the server coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).

Client

  • 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.
  • I strictly followed the client coding and design guidelines.
  • 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.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

Currently, users can't see the repositories in the Exam Summary View. This should be enabled not only for students but also instructors, etc.

Description

Mainly, new routes have been added, as well as an open repository button in programming-exam-summary.component. Furthermore the logic in the server side has to be changed to allow students to open their repositories with READ access also after the exam due date.

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 1 Students
  • 1 Exam with a Programming Exercise
  1. Log in to Artemis
  2. Participate in the exam as a student
  3. Check in the Exam Summary that you can open the repository of your programming exercise and everything works as expected
  4. As an instructor check that you can see the repository in the exam summary for different students.

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

Exam Mode Test

  • Test 1
  • Test 2

Test Coverage

Client

Class/File Line Coverage Confirmation (assert/expect)
programming-exam-summary.component.ts 100%
exercise-details-student-actions.component.ts 88.09% ✅ ❌

Server

Class/File Line Coverage Confirmation (assert/expect)
RepositoryAccessService.java 97% ✅ ❌
ResultService.java 92% ✅ ❌
PlagiarismService.java 91% ✅ ❌
ProgrammingExerciseParticipationResource.java 82% ✅ ❌

Screenshots

Screenshot 2024-03-10 at 09 54 46

Summary by CodeRabbit

  • New Features
    • Introduced a new variable exerciseStartDate and refined access control based on it.
  • Bug Fixes
    • Enhanced security by adjusting access control logic related to exercise start dates.
  • Tests
    • Updated integration tests to reflect changes in exercise timing, file access, plagiarism cases, and exam constraints.
    • Added tests for creating repository URLs in ExerciseDetailsStudentActionsComponent.

@artemis-bot artemis-bot added this to In progress in Artemis Development Mar 7, 2024
@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Mar 7, 2024
@mateusmm01 mateusmm01 temporarily deployed to artemis-test6.artemis.cit.tum.de March 7, 2024 14:28 — with GitHub Actions Inactive
@github-actions github-actions bot added the server Pull requests that update Java code. (Added Automatically!) label Mar 7, 2024
Copy link

github-actions bot commented Mar 7, 2024

⚠️ Unable to deploy to test servers ⚠️

The docker build needs to run through before deploying.

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label Mar 7, 2024
@mateusmm01 mateusmm01 added deploy:artemis-test6 and removed deployment-error Added by deployment workflows if an error occured labels Mar 7, 2024
@mateusmm01 mateusmm01 temporarily deployed to artemis-test6.artemis.cit.tum.de March 7, 2024 16:20 — with GitHub Actions Inactive
Copy link
Contributor

@laurenzfb laurenzfb left a comment

Choose a reason for hiding this comment

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

Tested on TS6 and Local CI Staging. Unfortunately, there seems to be a problem when trying to create a new exam:

image

2024-03-09 19:10:59.259 WARN 1 --- [nio-8080-exec-5] o.z.problem.spring.common.AdviceTraits : Bad Request: Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: "NaN"

I don't know, how this is caused by your changes but the problem does not occur on develop.

Concerning the code, I left some minor suggestions

Copy link
Contributor

@laurenzfb laurenzfb left a comment

Choose a reason for hiding this comment

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

tested on ts6. Everything works now. Students can see the repository view during and after the exam but not before. Code also lgtm

Copy link
Contributor

@RY997 RY997 left a comment

Choose a reason for hiding this comment

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

Tested on TS6, both the student and instructor can view the repo in the exam summary.

Copy link
Contributor

@marlon-luca-bu marlon-luca-bu left a comment

Choose a reason for hiding this comment

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

Tested on TS6, works as expected 👍

@krusche krusche merged commit d360314 into develop Mar 10, 2024
28 of 31 checks passed
@krusche krusche deleted the feature/localvc/enable-repository-view-for-exams branch March 10, 2024 19:49
@krusche krusche changed the title Integrated code lifecycle: Add repository buttons for exams Integrated code lifecycle: Add repository buttons for exams Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) ready for review server Pull requests that update Java code. (Added Automatically!) tests
Projects
No open projects
Artemis Development
  
Review in progress
Development

Successfully merging this pull request may close these issues.

None yet

7 participants