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

Assessment: Fix display of exercise title in assessment dashboard #10103

Merged

Conversation

maximiliansoelch
Copy link
Member

@maximiliansoelch maximiliansoelch commented Jan 3, 2025

Checklist

General

Client

Motivation and Context

Fixes #10102
The bug was likely introduced in #7751 during the migration to the new control flow syntax.

Description

To show the exercise title in the page header again, this PR uses ng-container instead of ng-template (a residue of the old control flow syntax). This ensures that the content projection works correctly again.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Text or Modeling Exercise
  1. Navigate to Course Management
  2. Click on Assessment
  3. Click on Exercise Dashboard for the corresponding exercise
  4. Make sure the exercise title is displayed at the top of the page header

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 1 Exam with a Modeling/Programming Exercise
  1. Navigate to Course Management
  2. Click on Exam
  3. Click on Assessment for the specific exam
  4. Click on Exercise Dashboard for the corresponding exercise
  5. Make sure the exercise title is displayed at the top of the page header

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

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Exam Mode Test

  • Test 1
  • Test 2

Test Coverage

Screenshots

image

Summary by CodeRabbit

  • Style
    • Updated HTML template rendering for exercise assessment dashboard page title
    • Replaced <ng-template> with <ng-container> for improved template structure

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Jan 3, 2025
@maximiliansoelch maximiliansoelch marked this pull request as ready for review January 3, 2025 14:35
@maximiliansoelch maximiliansoelch requested a review from a team as a code owner January 3, 2025 14:35
@maximiliansoelch maximiliansoelch added small assessment Pull requests that affect the corresponding module labels Jan 3, 2025
@maximiliansoelch maximiliansoelch added this to the 7.8.1 milestone Jan 3, 2025
Copy link

coderabbitai bot commented Jan 3, 2025

Walkthrough

The pull request addresses an issue with the exercise assessment dashboard's header by modifying the HTML template. The change involves replacing an <ng-template> with an <ng-container> for the pagetitle directive within the jhi-header-exercise-page-with-details component. This modification aims to ensure the exercise title is correctly displayed in the page header, resolving a rendering issue previously observed in the dashboard.

Changes

File Change Summary
src/main/webapp/app/exercises/shared/dashboards/tutor/exercise-assessment-dashboard.component.html Replaced <ng-template> with <ng-container> for pagetitle directive

Assessment against linked issues

Objective Addressed Explanation
Show exercise title in assessment dashboard [#10102]

Possibly related PRs

Suggested labels

bugfix, ready for review, small

Suggested reviewers

  • SimonEntholzer
  • krusche
  • az108
  • HawKhiem

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 82bf67c and f035cf1.

📒 Files selected for processing (1)
  • src/main/webapp/app/exercises/shared/dashboards/tutor/exercise-assessment-dashboard.component.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/webapp/app/exercises/shared/dashboards/tutor/exercise-assessment-dashboard.component.html (1)

Pattern src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

🔇 Additional comments (1)
src/main/webapp/app/exercises/shared/dashboards/tutor/exercise-assessment-dashboard.component.html (1)

1-11: LGTM! The changes correctly fix the title display issue.

The replacement of ng-template with ng-container for the pagetitle directive is the right approach to fix the content projection issue. Additionally, the code properly uses the new @if syntax as per the coding guidelines.


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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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
Contributor

@ole-ve ole-ve 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, worked for regular exercises and exam exercises.

Copy link

github-actions bot commented Jan 3, 2025

⚠️ Unable to deploy to test servers ⚠️

Testserver "artemis-test3.artemis.cit.tum.de" is already in use by PR #10043.

@github-actions github-actions bot added the deployment-error Added by deployment workflows if an error occured label Jan 3, 2025
@github-actions github-actions bot removed the deployment-error Added by deployment workflows if an error occured label Jan 3, 2025
@DominikRemo DominikRemo temporarily deployed to artemis-test4.artemis.cit.tum.de January 3, 2025 17:05 — with GitHub Actions Inactive
Copy link
Contributor

@DominikRemo DominikRemo 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 ts4 for normal exercises and exam exercises. title is visible and code lgtm

Copy link

@Feras797 Feras797 left a comment

Choose a reason for hiding this comment

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

I tested on ts2.
The exercise title is displayed at the top of the page header 👍

@krusche krusche modified the milestones: 7.8.1, 7.8.2 Jan 4, 2025
@krusche krusche modified the milestones: 7.8.2, 7.8.1 Jan 4, 2025
@krusche krusche merged commit fca49a3 into develop Jan 4, 2025
125 of 129 checks passed
@krusche krusche deleted the bugfix/show-exercise-title-in-exercise-assessment-dashbaord branch January 4, 2025 18:44
@krusche krusche changed the title Assessment: Fix the display of the exercise title in the exercise assessment dashboard Assessment: Fix display of exercise title in assessment dashboard Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assessment Pull requests that affect the corresponding module bugfix client Pull requests that update TypeScript code. (Added Automatically!) ready to merge small
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Assessment: Exercise assessment dashboard does not show the exercise title
6 participants