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

Adaptive learning: Visualize competencies linked to exercises correctly for exercise lecture units #9726

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

MaximilianAnzinger
Copy link
Collaborator

@MaximilianAnzinger MaximilianAnzinger commented Nov 10, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all 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).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Motivation and Context

When a lecture contains an exercise unit it did not show the competencies linked to the exercise even if they existed. This was due to the decision not to allow linking exercise units to competencies, but only exercises themself. This PR resolves this inconsistency in the user interface.

Resolves #9714

Description

Exercise units now have a transient field that is augmented before returning the lecture unit. Thus, the links will never be persisted in the database, but can be returned to the client for a consistent view.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Course with a lecture, exercise, and competency
  1. Log in to Artemis
  2. Navigate to Course Administration > Exercises
  3. Edit the exercise and link the competency to the exercise
  4. Navigate to Course Administration > Lectures > Units
  5. Create a new Exercise unit with the exercise that is linked to the competency
  6. Click on the Flag next to the Exercise unit
  7. The popup should show the linked competency

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Performance Review

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced functionality to link competencies with exercise units in lectures.
    • Added a method to retrieve competency links based on exercise ID.
  • Bug Fixes

    • Enhanced test coverage to validate competency links associated with exercise units.
  • Documentation

    • Updated method signatures and constructors to reflect new dependencies and functionality.

@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) atlas Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module labels Nov 10, 2024
@MaximilianAnzinger MaximilianAnzinger marked this pull request as ready for review November 10, 2024 14:33
@MaximilianAnzinger MaximilianAnzinger requested a review from a team as a code owner November 10, 2024 14:33
Copy link

coderabbitai bot commented Nov 10, 2024

Walkthrough

The changes introduced in this pull request enhance the functionality of the competency management system within the application. A new method for retrieving competency links by exercise ID is added to the CompetencyExerciseLinkRepository. The CompetencyService is updated to utilize this repository, allowing it to associate competencies with exercise units. Modifications are also made to the ExerciseUnit class to manage competency links, and the LectureResource class is updated to integrate these changes into the lecture retrieval process. Additionally, the integration tests are enhanced to validate these new features.

Changes

File Path Change Summary
src/main/java/de/tum/cit/aet/artemis/atlas/repository/CompetencyExerciseLinkRepository.java - Added method: List<CompetencyExerciseLink> findByExerciseIdWithCompetency(long exerciseId)
src/main/java/de/tum/cit/aet/artemis/atlas/service/competency/CompetencyService.java - Added method: public void addCompetencyLinksToExerciseUnits(Lecture lecture)
- Updated constructor to include CompetencyExerciseLinkRepository as a parameter
src/main/java/de/tum/cit/aet/artemis/lecture/domain/ExerciseUnit.java - Added field: private Set<CompetencyLectureUnitLink> competencyLinks
- Updated getter: public Set<CompetencyLectureUnitLink> getCompetencyLinks()
- Updated setter: public void setCompetencyLinks(Set<CompetencyLectureUnitLink> competencyLinks)
src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.java - Updated constructor to include CompetencyService
- Added field: private final CompetencyService competencyService
- Modified methods to call competencyService.addCompetencyLinksToExerciseUnits(lecture) after retrieving lecture details
src/test/java/de/tum/cit/aet/artemis/lecture/LectureIntegrationTest.java - Updated initTestCase to link competencies to exercises
- Added assertions in getLecture_ExerciseAndAttachmentReleased_shouldGetLectureWithAllLectureUnits to verify competency links are established correctly

Suggested labels

client, enhancement, bugfix, core, exercise

Suggested reviewers

  • JohannesStoehr
  • florian-glombik
  • Jan-Thurner
  • pzdr7

Warning

There were issues while running the following tools:

🔧 pmd
src/main/java/de/tum/cit/aet/artemis/atlas/repository/CompetencyExerciseLinkRepository.java

The following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.

src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.java

The following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c561c78 and 49af1e4.

📒 Files selected for processing (2)
  • src/main/java/de/tum/cit/aet/artemis/atlas/repository/CompetencyExerciseLinkRepository.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.java (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/de/tum/cit/aet/artemis/atlas/repository/CompetencyExerciseLinkRepository.java
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.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 (2)
src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.java (2)

70-71: LGTM: Clean dependency injection implementation.

The CompetencyService integration follows best practices with constructor injection and proper field encapsulation.

Also applies to: 95-105


307-307: ⚠️ Potential issue

Critical: Fix validation order and improve error handling.

The competency service call in getLectureWithDetails is placed before course validation, which could lead to unnecessary processing of invalid requests. Additionally, both methods lack error handling for the competency service call.

Apply this diff to fix the validation order in getLectureWithDetails:

-        competencyService.addCompetencyLinksToExerciseUnits(lecture);
         Course course = lecture.getCourse();
         if (course == null) {
             return ResponseEntity.badRequest().build();
         }
         User user = userRepository.getUserWithGroupsAndAuthorities();
         authCheckService.checkIsAllowedToSeeLectureElseThrow(lecture, user);
+        try {
+            competencyService.addCompetencyLinksToExerciseUnits(lecture);
+        } catch (Exception e) {
+            log.error("Failed to add competency links to lecture {}: {}", lecture.getId(), e.getMessage());
+        }

To eliminate code duplication and improve error handling, consider extracting the competency link addition to a private method as suggested in the previous review.

Also applies to: 335-337


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?

❤️ Share
🪧 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (4)
src/main/webapp/app/course/competencies/competencies-popover/competencies-popover.component.ts (1)

Line range hint 31-35: Use single quotes for string literals per style guide.

According to the Angular style guide and provided coding guidelines, string literals should use single quotes.

Apply this diff to align with the style guide:

-                    this.navigationArray = ['/courses', `${this.courseId}`, 'competencies'];
+                    this.navigationArray = ['/courses', '${this.courseId}', 'competencies'];
-                    this.navigationArray = ['/course-management', `${this.courseId}`, 'competency-management'];
+                    this.navigationArray = ['/course-management', '${this.courseId}', 'competency-management'];
🧰 Tools
🪛 Biome

[error] 24-24: This constructor is unnecessary.

Unsafe fix: Remove the unnecessary constructor.

(lint/complexity/noUselessConstructor)

src/main/java/de/tum/cit/aet/artemis/lecture/domain/ExerciseUnit.java (2)

37-42: LGTM: Well-structured field declaration with appropriate annotations.

The transient field implementation correctly handles the non-persistent nature of competency links. The initialization and annotations are properly configured.

Consider adding a more detailed Javadoc comment explaining the relationship between exercise units and competency links:

+    /**
+     * Temporary storage for competency links that are actually persisted in the associated exercise.
+     * This field is populated at runtime to provide a unified view of competencies in the lecture context.
+     */
     @Transient
     @JsonSerialize

Line range hint 37-87: Excellent architectural approach for handling transient competency data.

The implementation elegantly solves the UI inconsistency by:

  1. Using a transient field to avoid persistence conflicts
  2. Maintaining clean separation between exercise and exercise unit responsibilities
  3. Providing proper JSON serialization for API responses

This approach allows for displaying competencies in the UI while keeping the actual data properly normalized in the database.

src/main/java/de/tum/cit/aet/artemis/atlas/service/competency/CompetencyService.java (1)

142-143: Consider adding parameter validation and optimizing the stream operation.

  1. Add null check for the lecture parameter
  2. Use method reference for more concise and readable code
 public void addCompetencyLinksToExerciseUnits(Lecture lecture) {
+    if (lecture == null || lecture.getLectureUnits() == null) {
+        return;
+    }
-    var exerciseUnits = lecture.getLectureUnits().stream().filter(unit -> unit instanceof ExerciseUnit);
+    var exerciseUnits = lecture.getLectureUnits().stream().filter(ExerciseUnit.class::isInstance);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between bf2fbbd and c561c78.

📒 Files selected for processing (6)
  • src/main/java/de/tum/cit/aet/artemis/atlas/repository/CompetencyExerciseLinkRepository.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/atlas/service/competency/CompetencyService.java (4 hunks)
  • src/main/java/de/tum/cit/aet/artemis/lecture/domain/ExerciseUnit.java (3 hunks)
  • src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.java (6 hunks)
  • src/main/webapp/app/course/competencies/competencies-popover/competencies-popover.component.ts (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/lecture/LectureIntegrationTest.java (3 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
src/main/java/de/tum/cit/aet/artemis/atlas/repository/CompetencyExerciseLinkRepository.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

src/main/java/de/tum/cit/aet/artemis/atlas/service/competency/CompetencyService.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

src/main/java/de/tum/cit/aet/artemis/lecture/domain/ExerciseUnit.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

src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.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

src/main/webapp/app/course/competencies/competencies-popover/competencies-popover.component.ts (1)

Pattern src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

src/test/java/de/tum/cit/aet/artemis/lecture/LectureIntegrationTest.java (1)

Pattern src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

📓 Learnings (1)
src/test/java/de/tum/cit/aet/artemis/lecture/LectureIntegrationTest.java (2)
Learnt from: julian-christl
PR: ls1intum/Artemis#8052
File: src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java:310-310
Timestamp: 2024-02-23T00:03:06.365Z
Learning: Modifications to parameters in `competencyProgressUtilService.createCompetencyProgress` for debugging purposes are considered irrelevant to the test outcomes but helpful for clarity during debugging.
Learnt from: julian-christl
PR: ls1intum/Artemis#8052
File: src/test/java/de/tum/in/www1/artemis/lecture/CompetencyIntegrationTest.java:310-310
Timestamp: 2024-10-08T15:35:52.595Z
Learning: Modifications to parameters in `competencyProgressUtilService.createCompetencyProgress` for debugging purposes are considered irrelevant to the test outcomes but helpful for clarity during debugging.
🔇 Additional comments (13)
src/main/java/de/tum/cit/aet/artemis/atlas/repository/CompetencyExerciseLinkRepository.java (1)

5-6: LGTM!

The specific import for java.util.List follows best practices by avoiding wildcard imports.

src/main/java/de/tum/cit/aet/artemis/lecture/domain/ExerciseUnit.java (3)

14-14: LGTM: Import statements are well-organized.

The new imports are specific and necessary for the added functionality.

Also applies to: 19-21


86-87: LGTM: Setter implementation is clean and straightforward.

The method correctly assigns the provided competency links to the transient field.


78-82: LGTM: Getter implementation is consistent with field declaration.

The method correctly returns the transient field and maintains proper JSON serialization configuration.

Let's verify that this getter is used consistently across the codebase:

✅ Verification successful

Let's analyze the search results. The getCompetencyLinks() method is used across the codebase in several contexts:

  1. In services and controllers:

    • Used in deletion, import, and update operations
    • The returned set is properly handled with null checks and defensive programming
    • Services create new HashSet instances before modifications
  2. In test cases:

    • Used in integration tests for various unit types
    • Tests handle the returned set appropriately
    • No NPE-related failures in tests
  3. In domain classes:

    • Consistent implementation across different entity types
    • Used with proper JSON annotations
    • Part of the LearningObject interface contract

Based on this evidence, I can generate the final response:

Verified: The getter implementation is safe and consistently used

The getCompetencyLinks() method is used safely throughout the codebase with proper null handling and defensive programming practices in services. The implementation aligns with both the interface contract and JSON serialization requirements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usages of getCompetencyLinks() to ensure they handle potential null values
rg "getCompetencyLinks\(\)" -A 3

Length of output: 17553

src/main/java/de/tum/cit/aet/artemis/atlas/service/competency/CompetencyService.java (4)

10-10: LGTM: Import statements follow best practices.

The new imports are specific and necessary for the added functionality.

Also applies to: 33-34


47-59: LGTM: Constructor injection follows best practices.

The implementation correctly follows Spring's dependency injection pattern with:

  • Private final field for the repository
  • Constructor injection
  • Proper initialization

134-141: LGTM: Well-documented method with clear purpose.

The Javadoc clearly explains the temporary nature of the links and the reasoning behind the implementation.


144-153: Consider handling potential side effects and null safety.

The current implementation has a few considerations:

  1. It mutates the state of ExerciseUnit objects
  2. The exercise null check is good, but consider logging when exercise is null for debugging

Let's verify the impact of these mutations:

Consider adding debug logging when exercise is null to help troubleshoot issues:

     exerciseUnits.forEach(unit -> {
         var exerciseUnit = (ExerciseUnit) unit;
         var exercise = exerciseUnit.getExercise();
         if (exercise != null) {
             var competencyExerciseLinks = competencyExerciseLinkRepository.findByExerciseIdWithCompetency(exercise.getId());
             var competencyLectureUnitLinks = competencyExerciseLinks.stream()
                 .map(link -> new CompetencyLectureUnitLink(link.getCompetency(), exerciseUnit, link.getWeight()))
                 .collect(Collectors.toSet());
             exerciseUnit.setCompetencyLinks(competencyLectureUnitLinks);
+        } else {
+            log.debug("Exercise is null for ExerciseUnit {}", exerciseUnit.getId());
         }
     });
✅ Verification successful

Mutation of ExerciseUnit's competencyLinks is safe and well-handled

The codebase analysis reveals that the mutation of competencyLinks is a standard operation that's:

  • Properly encapsulated within domain models (Exercise, LectureUnit, ExerciseUnit)
  • Consistently used across services (CompetencyService, LectureUnitService, ExerciseService)
  • Well-handled in persistence operations with proper cleanup and re-linking
  • Used extensively in tests showing it's a core part of the domain model

The null check for exercise is sufficient as is, since:

  • It's a defensive check preventing NPEs
  • The operation is non-critical (setting competency links)
  • Adding debug logging would add noise for an expected condition
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for other places where ExerciseUnit's competencyLinks are accessed
rg "setCompetencyLinks|getCompetencyLinks" --type java

Length of output: 13654

src/main/java/de/tum/cit/aet/artemis/lecture/web/LectureResource.java (3)

30-30: LGTM! Clean dependency addition.

The CompetencyService integration follows best practices with proper encapsulation and constructor injection.

Also applies to: 70-71


95-95: LGTM! Constructor updated correctly.

The CompetencyService parameter is properly added and initialized, maintaining the constructor's consistency.

Also applies to: 105-105


307-307: Verify the error handling patterns in similar endpoints.

Let's verify if other endpoints in the codebase handle similar service calls with proper error handling.

Also applies to: 330-330

src/test/java/de/tum/cit/aet/artemis/lecture/LectureIntegrationTest.java (2)

130-130: LGTM! Test setup enhanced with competency linking.

The addition of competencyUtilService.linkExerciseToCompetency(competency, textExercise) properly sets up the test scenario for verifying competency links in exercise units.


301-302: LGTM! Assertion validates competency links.

The assertion correctly verifies that exercise units within the lecture have the expected competency links. The stream operation and size check ensure that exactly one competency link exists, matching the setup in the test initialization.

HawKhiem
HawKhiem previously approved these changes Nov 10, 2024
Copy link

@HawKhiem HawKhiem 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 TS1. Works as described

image

image

sachmii
sachmii previously approved these changes Nov 10, 2024
Copy link

@sachmii sachmii 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 TS1, everything worked as fine. Link sent me to the linked competency.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@github-actions github-actions bot removed the client Pull requests that update TypeScript code. (Added Automatically!) label Nov 10, 2024
Copy link

@HanyangXu0508 HanyangXu0508 left a comment

Choose a reason for hiding this comment

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

tested locally and worked as expected.

Copy link

@zagemello zagemello 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 TS1, works as expected!

Copy link

@JerroyTan JerroyTan 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 TS1]
Everything worked as described, except I was not shown a popup with the linked competency, instead was brought directly to the page with all the competencies. Not sure if that was intended as it differs from description

Copy link

@kevinfischer4 kevinfischer4 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 TS3, works as described. The linked competencies show up in the pop-up.
Screenshot 2024-11-11 at 13 39 12

Copy link

@flbrgit flbrgit 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 TS3. Everything works as expected.
Screenshot 2024-11-11 170626

@bassner bassner added this to the 7.7.1 milestone Nov 12, 2024
@bassner bassner merged commit 8205b58 into develop Nov 12, 2024
102 of 105 checks passed
@bassner bassner deleted the feature/add-transient-exercise-unit-competency-links branch November 12, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
atlas Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module ready for review ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Merged
Status: Done
Development

Successfully merging this pull request may close these issues.

Add linked competencies to exercise units
9 participants